ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_clariontemplate.php
Go to the documentation of this file.
1 <?php
2 $BEAUT_PATH = realpath(".")."/Services/COPage/syntax_highlight/php";
3 if (!isset ($BEAUT_PATH)) return;
4 require_once("$BEAUT_PATH/Beautifier/HFile.php");
5  class HFile_clariontemplate extends HFile{
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // Clarion-Template
11 /*************************************/
12 // Flags
13 
14 $this->nocase = "1";
15 $this->notrim = "0";
16 $this->perl = "0";
17 
18 // Colours
19 
20 $this->colours = array("blue", "purple", "gray", "brown", "blue", "purple", "gray", "brown");
21 $this->quotecolour = "blue";
22 $this->blockcommentcolour = "green";
23 $this->linecommentcolour = "green";
24 
25 // Indent Strings
26 
27 $this->indent = array("#IF", "#LOOP", "#FOR");
28 $this->unindent = array("#ENDIF", "#ENDLOOP", "#ENDFOR");
29 
30 // String characters and delimiters
31 
32 $this->stringchars = array("'");
33 $this->delimiters = array("~", "{", "}", "@", "^", "&", "*", "(", ")", "-", "+", "=", "|", "\\", "/", "[", "]", ";", "\"", "'", ">", ".", ",");
34 $this->escchar = "";
35 
36 // Comment settings
37 
38 $this->linecommenton = array("#!");
39 $this->blockcommenton = array("");
40 $this->blockcommentoff = array("");
41 
42 // Keywords (keyword mapping to colour number)
43 
44 $this->keywords = array(
45  "#ACCEPT" => "1",
46  "#APPLICATION" => "1",
47  "#AT" => "1",
48  "#ATEND" => "1",
49  "#ATSTART" => "1",
50  "#CODE" => "1",
51  "#CONTROL" => "1",
52  "#CONTEXT" => "1",
53  "#EMBED" => "1",
54  "#EMPTYEMBED" => "1",
55  "#ENDAT" => "1",
56  "#ENDCONTEXT" => "1",
57  "#ENDRESTRICT" => "1",
58  "#EXTENSION" => "1",
59  "#GROUP" => "1",
60  "#MODULE" => "1",
61  "#POSTEMBED" => "1",
62  "#PREEMBED" => "1",
63  "#PROCEDURE" => "1",
64  "#PROGRAM" => "1",
65  "#PRIORITY" => "1",
66  "#RESTRICT" => "1",
67  "#REJECT" => "1",
68  "#TEMPLATE" => "1",
69  "#UTILITY" => "1",
70  "#WHERE" => "1",
71  "#ADD" => "2",
72  "#ALIAS" => "2",
73  "#CLEAR" => "2",
74  "#DECLARE" => "2",
75  "#DELETE" => "2",
76  "#DELETEALL" => "2",
77  "#DEFAULT" => "2",
78  "#ENDDEFAULT" => "2",
79  "#ENDGLOBALDATA" => "2",
80  "#ENDLOCALDATA" => "2",
81  "#ENDREPORTS" => "2",
82  "#ENDWINDOWS" => "2",
83  "#FIND" => "2",
84  "#FIX" => "2",
85  "#FREE" => "2",
86  "#GLOBALDATA" => "2",
87  "#LOCALDATA" => "2",
88  "#LINK" => "2",
89  "#ORIG" => "2",
90  "#POP" => "2",
91  "#PURGE" => "2",
92  "#REPORTS" => "2",
93  "#REQ" => "2",
94  "#SELECT" => "2",
95  "#SET" => "2",
96  "#UNFIX" => "2",
97  "#WINDOWS" => "2",
98  "SAVE" => "2",
99  "UNIQUE" => "2",
100  "#BOXED" => "3",
101  "#BUTTON" => "3",
102  "#DISPLAY" => "3",
103  "#ENABLE" => "3",
104  "#ENDBOXED" => "3",
105  "#ENDBUTTON" => "3",
106  "#ENDCASE" => "4",
107  "#ENDENABLE" => "3",
108  "#ENDFIELD" => "3",
109  "#ENDPREPARE" => "3",
110  "#ENDSHEET" => "3",
111  "#ENDTAB" => "3",
112  "#ENDWITH" => "3",
113  "#FIELD" => "3",
114  "#IMAGE" => "3",
115  "#PREPARE" => "3",
116  "#PROMPT" => "3",
117  "#SHEET" => "3",
118  "#TAB" => "3",
119  "#VALIDATE" => "3",
120  "#WITH" => "3",
121  "#?" => "4",
122  "#ABORT" => "4",
123  "#APPEND" => "4",
124  "#BREAK" => "4",
125  "#CALL" => "4",
126  "#CASE" => "4",
127  "#CLOSE" => "4",
128  "#CYCLE" => "4",
129  "#CREATE" => "4",
130  "#ELSE" => "4",
131  "#ELSIF" => "4",
132  "#ENDFOR" => "4",
133  "#ENDIF" => "4",
134  "#ENDLOOP" => "4",
135  "#ENDSECTION" => "4",
136  "#FOR" => "4",
137  "#GENERATE" => "4",
138  "#IF" => "4",
139  "#INVOKE" => "4",
140  "#INDENT" => "4",
141  "#INSERT" => "4",
142  "#LOOP" => "4",
143  "#OF" => "4",
144  "#OROF" => "4",
145  "#OPEN" => "4",
146  "#PRINT" => "4",
147  "#READ" => "4",
148  "#REDIRECT" => "4",
149  "#RELEASE" => "4",
150  "#REMOVE" => "4",
151  "#REPLACE" => "4",
152  "#RESUME" => "4",
153  "#RETURN" => "4",
154  "#RUN" => "4",
155  "#RUNDLL" => "4",
156  "#SERVICE" => "4",
157  "#SUSPEND" => "4",
158  "#SECTION" => "4",
159  "#<" => "5",
160  "#ASSERT" => "5",
161  "#CLASS" => "5",
162  "#COMMENT" => "5",
163  "#DEBUG" => "5",
164  "#ERROR" => "5",
165  "#EXPORT" => "5",
166  "#HELP" => "5",
167  "#IMPORT" => "5",
168  "#INCLUDE" => "5",
169  "#MESSAGE" => "5",
170  "#PROJECT" => "5",
171  "#PROTOTYPE" => "5",
172  "%ActiveTemplate" => "6",
173  "%ActiveTemplateInstance" => "6",
174  "%ActiveTemplateOwnerInstance" => "6",
175  "%ActiveTemplateParentInstance" => "6",
176  "%ActiveTemplatePrimaryInstance" => "6",
177  "%AliasFile" => "6",
178  "%Application" => "6",
179  "%ApplicationDebug" => "6",
180  "%ApplicationLocalLibrary" => "6",
181  "%ApplicationTemplate" => "6",
182  "%ApplicationTemplateInstance" => "6",
183  "%ApplicationTemplateParentInstance" => "6",
184  "%BytesOutput" => "6",
185  "%ConditionalGenerate" => "6",
186  "%Control" => "6",
187  "%ControlAlert" => "6",
188  "%ControlDefaultHeight" => "6",
189  "%ControlDefaultWidth" => "6",
190  "%ControlEvent" => "6",
191  "%ControlField" => "6",
192  "%ControlFieldFormat" => "6",
193  "%ControlFieldHasColor" => "6",
194  "%ControlFieldHasIcon" => "6",
195  "%ControlFieldHasLocator" => "6",
196  "%ControlFieldHasTree" => "6",
197  "%ControlFieldHeading" => "6",
198  "%ControlFieldPicture" => "6",
199  "%ControlFrom" => "6",
200  "%ControlIndent" => "6",
201  "%ControlInstance" => "6",
202  "%ControlMenu" => "6",
203  "%ControlMenuBar" => "6",
204  "%ControlOriginal" => "6",
205  "%ControlParameter" => "6",
206  "%ControlParent" => "6",
207  "%ControlParentTab" => "6",
208  "%ControlParentType" => "6",
209  "%ControlStatement" => "6",
210  "%ControlTemplate" => "6",
211  "%ControlTool" => "6",
212  "%ControlToolBar" => "6",
213  "%ControlType" => "6",
214  "%ControlUnsplitStatement" => "6",
215  "%ControlUse" => "6",
216  "%CreateLocalMap" => "6",
217  "%DictionaryChanged" => "6",
218  "%DictionaryFile" => "6",
219  "%Driver" => "6",
220  "%DriverBinMemo" => "6",
221  "%DriverCreate" => "6",
222  "%DriverDescription" => "6",
223  "%DriverDLL" => "6",
224  "%DriverEncrypt" => "6",
225  "%DriverLIB" => "6",
226  "%DriverMaxKeys" => "6",
227  "%DriverMemo" => "6",
228  "%DriverOpcode" => "6",
229  "%DriverOwner" => "6",
230  "%DriverReclaim" => "6",
231  "%DriverRequired" => "6",
232  "%DriverSQL" => "6",
233  "%DriverType" => "6",
234  "%DriverUniqueKey" => "6",
235  "%EditFilename" => "6",
236  "%EditProcedure" => "6",
237  "%EmbedDescription" => "6",
238  "%EmbedID" => "6",
239  "%EmbedParameters" => "6",
240  "%EOF" => "6",
241  "%False" => "6",
242  "%Field" => "6",
243  "%FieldChoices" => "6",
244  "%FieldDescription" => "6",
245  "%FieldDimension1" => "6",
246  "%FieldDimension2" => "6",
247  "%FieldDimension3" => "6",
248  "%FieldDimension4" => "6",
249  "%FieldDisplayPicture" => "6",
250  "%FieldFile" => "6",
251  "%FieldFormatWidth" => "6",
252  "%FieldHeader" => "6",
253  "%FieldHelpID" => "6",
254  "%FieldID" => "6",
255  "%FieldIdent" => "6",
256  "%FieldInitial" => "6",
257  "%FieldJustIndent" => "6",
258  "%FieldJustType" => "6",
259  "%FieldLongDesc" => "6",
260  "%FieldLookup" => "6",
261  "%FieldMemoImage" => "6",
262  "%FieldMemoSize" => "6",
263  "%FieldName" => "6",
264  "%FieldPicture" => "6",
265  "%FieldPlaces" => "6",
266  "%FieldQuickOptions" => "6",
267  "%FieldRangeHigh" => "6",
268  "%FieldRangeLow" => "6",
269  "%FieldRecordPicture" => "6",
270  "%FieldReportControl" => "6",
271  "%FieldReportControlHeight" => "6",
272  "%FieldReportControlWidth" => "6",
273  "%FieldScreenControl" => "6",
274  "%FieldScreenControlHeight" => "6",
275  "%FieldScreenControlWidth" => "6",
276  "%FieldStatement" => "6",
277  "%FieldStruct" => "6",
278  "%FieldType" => "6",
279  "%FieldUserOptions" => "6",
280  "%FieldValidation" => "6",
281  "%File" => "6",
282  "%File32BitOnly" => "6",
283  "%FileBindable" => "6",
284  "%FileCreate" => "6",
285  "%FileDescription" => "6",
286  "%FileDriver" => "6",
287  "%FileDriverParameter" => "6",
288  "%FileEncrypt" => "6",
289  "%FileExternal" => "6",
290  "%FileExternalModule" => "6",
291  "%FileIdent" => "6",
292  "%FileKey" => "6",
293  "%FileKeyField" => "6",
294  "%FileKeyFieldLink" => "6",
295  "%FileLongDesc" => "6",
296  "%FileName" => "6",
297  "%FileOwner" => "6",
298  "%FilePrefix" => "6",
299  "%FilePrimaryKey" => "6",
300  "%FileQuickOptions" => "6",
301  "%FileReclaim" => "6",
302  "%FileRelationType" => "6",
303  "%FileStatement" => "6",
304  "%FileStruct" => "6",
305  "%FileStructEnd" => "6",
306  "%FileStructRec" => "6",
307  "%FileStructRecEnd" => "6",
308  "%FileThreaded" => "6",
309  "%FileType" => "6",
310  "%FileUserOptions" => "6",
311  "%FirstProcedure" => "6",
312  "%Formula" => "6",
313  "%FormulaClass" => "6",
314  "%FormulaDescription" => "6",
315  "%FormulaExpression" => "6",
316  "%FormulaExpressionCase" => "6",
317  "%FormulaExpressionFalse" => "6",
318  "%FormulaExpressionTrue" => "6",
319  "%FormulaExpressionType" => "6",
320  "%FormulaInstance" => "6",
321  "%GlobalData" => "6",
322  "%GlobalDataStatement" => "6",
323  "%HelpFile" => "6",
324  "%Key" => "6",
325  "%KeyAuto" => "6",
326  "%KeyDescription" => "6",
327  "%KeyDuplicate" => "6",
328  "%KeyExcludeNulls" => "6",
329  "%KeyField" => "6",
330  "%KeyFieldSequence" => "6",
331  "%KeyFile" => "6",
332  "%KeyID" => "6",
333  "%KeyIdent" => "6",
334  "%KeyIndex" => "6",
335  "%KeyLongDesc" => "6",
336  "%KeyName" => "6",
337  "%KeyNoCase" => "6",
338  "%KeyPrimary" => "6",
339  "%KeyQuickOptions" => "6",
340  "%KeyStatement" => "6",
341  "%KeyStruct" => "6",
342  "%KeyUserOptions" => "6",
343  "%LocalData" => "6",
344  "%LocalDataStatement" => "6",
345  "%MenuBarStatement" => "6",
346  "%Module" => "6",
347  "%ModuleBase" => "6",
348  "%ModuleChanged" => "6",
349  "%ModuleData" => "6",
350  "%ModuleDataStatement" => "6",
351  "%ModuleExtension" => "6",
352  "%ModuleExternal" => "6",
353  "%ModuleInclude" => "6",
354  "%ModuleLanguage" => "6",
355  "%ModuleProcedure" => "6",
356  "%ModuleReadOnly" => "6",
357  "%ModuleTemplate" => "6",
358  "%Null" => "6",
359  "%OtherFiles" => "6",
360  "%Primary" => "6",
361  "%PrimaryInstance" => "6",
362  "%PrimaryKey" => "6",
363  "%Procedure" => "6",
364  "%ProcedureCalled" => "6",
365  "%ProcedureDateChanged" => "6",
366  "%ProcedureDateCreated" => "6",
367  "%ProcedureDescription" => "6",
368  "%ProcedureExported" => "6",
369  "%ProcedureIsGlobal" => "6",
370  "%ProcedureLanguage" => "6",
371  "%ProcedureLongDescription" => "6",
372  "%ProcedureReadOnly" => "6",
373  "%ProcedureReturnType" => "6",
374  "%ProcedureTemplate" => "6",
375  "%ProcedureTimeChanged" => "6",
376  "%ProcedureTimeCreated" => "6",
377  "%ProcedureToDo" => "6",
378  "%ProcedureType" => "6",
379  "%Program" => "6",
380  "%ProgramDateChanged" => "6",
381  "%ProgramDateCreated" => "6",
382  "%ProgramExtension" => "6",
383  "%ProgramTimeChanged" => "6",
384  "%ProgramTimeCreated" => "6",
385  "%Prototype" => "6",
386  "%QuickProcedure" => "6",
387  "%RegistryChanged" => "6",
388  "%Relation" => "6",
389  "%RelationAlias" => "6",
390  "%RelationConstraintDelete" => "6",
391  "%RelationConstraintUpdate" => "6",
392  "%RelationKey" => "6",
393  "%RelationKeyField" => "6",
394  "%RelationKeyFieldLink" => "6",
395  "%RelationPrefix" => "6",
396  "%RelationQuickOptions" => "6",
397  "%RelationUserOptions" => "6",
398  "%Report" => "6",
399  "%ReportControl" => "6",
400  "%ReportControlField" => "6",
401  "%ReportControlIndent" => "6",
402  "%ReportControlInstance" => "6",
403  "%ReportControlLabel" => "6",
404  "%ReportControlOriginal" => "6",
405  "%ReportControlStatement" => "6",
406  "%ReportControlTemplate" => "6",
407  "%ReportControlType" => "6",
408  "%ReportControlUse" => "6",
409  "%ReportStatement" => "6",
410  "%Secondary" => "6",
411  "%SecondaryTo" => "6",
412  "%SecondaryType" => "6",
413  "%Target32" => "6",
414  "%ToolbarStatement" => "6",
415  "%True" => "6",
416  "%ViewFile" => "6",
417  "%ViewFileField" => "6",
418  "%ViewFileFields" => "6",
419  "%ViewFiles" => "6",
420  "%ViewFileStruct" => "6",
421  "%ViewFileStructEnd" => "6",
422  "%ViewFilter" => "6",
423  "%ViewJoinedTo" => "6",
424  "%ViewPrimary" => "6",
425  "%ViewPrimaryField" => "6",
426  "%ViewPrimaryFields" => "6",
427  "%ViewStatement" => "6",
428  "%ViewStruct" => "6",
429  "%ViewStructEnd" => "6",
430  "%Window" => "6",
431  "%WindowEvent" => "6",
432  "%WindowStatement" => "6",
433  "%pClassName" => "7",
434  "%pClassIncFile" => "7",
435  "%pClassMethod" => "7",
436  "%pClassMethodPrototype" => "7",
437  "%pClassMethodPrivate" => "7",
438  "%pClassMethodVirtual" => "7",
439  "%pClassMethodProtected" => "7",
440  "%pClassMethodProcAttribute" => "7",
441  "%pClassMethodInherited" => "7",
442  "%pClassMethodReturnType" => "7",
443  "%pClassMethodParentCall" => "7",
444  "%pClassProperty" => "7",
445  "%pClassPropertyPrototype" => "7",
446  "%pClassPropertyPrivate" => "7",
447  "%pClassPropertyProtected" => "7",
448  "%pClassPropertyInherited" => "7",
449  "%ClassMethodList" => "7",
450  "%SysActiveInvisible" => "7",
451  "%SysAllowUnfilled" => "7",
452  "%SysRetainRow" => "7",
453  "%SysResetOnGainFocus" => "7",
454  "%SysAutoToolbar" => "7",
455  "%SysAutoRefresh" => "7",
456  "%PropertyList" => "7",
457  "%MethodList" => "7",
458  "%ObjectList" => "7",
459  "%ObjectListType" => "7",
460  "%CWTemplateVersion" => "7",
461  "%IsExternal" => "7",
462  "%SaveCreateLocalMap" => "7",
463  "%GlobalIncludeList" => "7",
464  "%ModuleIncludeList" => "7",
465  "%CalloutModules" => "7",
466  "%ClassDeclarations" => "7",
467  "%OOPConstruct" => "7",
468  "%ByteCount" => "7",
469  "%IncludePrototype" => "7",
470  "%UsedFile" => "7",
471  "%ProcFilesUsed" => "7",
472  "%UsedDriverDLLs" => "7",
473  "%PrintPreviewUsed" => "7",
474  "%FileExternalFlag" => "7",
475  "%FileThreadedFlag" => "7",
476  "%IniFileName" => "7",
477  "%GenerationCompleted" => "7",
478  "%GenerateModule" => "7",
479  "%VBXList" => "7",
480  "%OLENeeded" => "7",
481  "%OCXList" => "7",
482  "%LastTarget32" => "7",
483  "%LastProgramExtension" => "7",
484  "%LastApplicationDebug" => "7",
485  "%LastApplicationLocalLibrary" => "7",
486  "%CustomGlobalMapModule" => "7",
487  "%CustomGlobalMapProcedure" => "7",
488  "%CustomGlobalMapProcedurePrototype" => "7",
489  "%CustomGlobalData" => "7",
490  "%CustomGlobalDataDeclaration" => "7",
491  "%CustomGlobalDataBeforeFiles" => "7",
492  "%CustomGlobalDataComponent" => "7",
493  "%CustomGlobalDataComponentIndent" => "7",
494  "%CustomGlobalDataComponentDeclaration" => "7",
495  "%CustomModuleMapModule" => "7",
496  "%CustomModuleMapProcedure" => "7",
497  "%CustomModuleMapProcedurePrototype" => "7",
498  "%CustomModuleData" => "7",
499  "%CustomModuleDataDeclaration" => "7",
500  "%CustomModuleDataComponent" => "7",
501  "%CustomModuleDataComponentIndent" => "7",
502  "%CustomModuleDataComponentDeclaration" => "7",
503  "%CustomGlobalMapIncludes" => "7",
504  "%CustomGlobalDeclarationIncludes" => "7",
505  "%CustomFlags" => "7",
506  "%CustomFlagSetting" => "7",
507  "%AccessMode" => "7",
508  "%BuildFile" => "7",
509  "%BuildHeader" => "7",
510  "%BuildInclude" => "7",
511  "%ExportFile" => "7",
512  "%ValueConstruct" => "7",
513  "%HoldConstruct" => "7",
514  "%RegenerateGlobalModule" => "7",
515  "%ClipName" => "7",
516  "%UpdateRelationPrimary" => "7",
517  "%UpdateRelationSecondary" => "7",
518  "%UpdateAttachedFile" => "7",
519  "%DeleteRelationPrimary" => "7",
520  "%DeleteRelationSecondary" => "7",
521  "%DeleteAttachedFile" => "7",
522  "%AllFile" => "7",
523  "%BRWList" => "7",
524  "%GlobalRegenerate" => "7",
525  "%FilesPerBCModule" => "7",
526  "%RelatesPerRoutine" => "7",
527  "**" => "8",
528  "BEEP:" => "8",
529  "BUTTON:" => "8",
530  "COLOR:" => "8",
531  "CREATE:" => "8",
532  "CURSOR:" => "8",
533  "DDE:" => "8",
534  "EVENT:" => "8",
535  "ff_:" => "8",
536  "FILE:" => "8",
537  "FONT:" => "8",
538  "ICON:" => "8",
539  "LISTZONE:" => "8",
540  "PEN:" => "8",
541  "PROP:" => "8",
542  "PROPLIST:" => "8",
543  "PROPPRINT:" => "8",
544  "REJECT:" => "8",
545  "STD:" => "8",
546  "VBXEVENT:" => "8",
547  "#FIELDS" => "8",
548  "FALSE" => "8",
549  "TRUE" => "8");
550 
551 // Special extensions
552 
553 // Each category can specify a PHP function that returns an altered
554 // version of the keyword.
555 
556 
557 
558 $this->linkscripts = array(
559  "1" => "donothing",
560  "2" => "donothing",
561  "3" => "donothing",
562  "4" => "donothing",
563  "5" => "donothing",
564  "6" => "donothing",
565  "7" => "donothing",
566  "8" => "donothing");
567 }
568 
569 
570 function donothing($keywordin)
571 {
572  return $keywordin;
573 }
574 
575 }?>