ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_turbopascal.php
Go to the documentation of this file.
1 <?php
2 
3 $BEAUT_PATH = realpath(".")."/Services/COPage/syntax_highlight/php";
4 if (!isset ($BEAUT_PATH)) return;
5 require_once("$BEAUT_PATH/Beautifier/HFile.php");
6  class HFile_turbopascal extends HFile{
7  function HFile_turbopascal(){
8  $this->HFile();
9 
10 /*************************************/
11 // Beautifier Highlighting Configuration File
12 // Turbo Pascal
13 /*************************************/
14 // Flags
15 
16 $this->nocase = "1";
17 $this->notrim = "0";
18 $this->perl = "0";
19 
20 // Colours
21 
22 $this->colours = array("blue", "purple", "gray", "brown", "blue");
23 $this->quotecolour = "blue";
24 $this->blockcommentcolour = "green";
25 $this->linecommentcolour = "green";
26 
27 // Indent Strings
28 
29 $this->indent = array("begin", "type");
30 $this->unindent = array("end");
31 
32 // String characters and delimiters
33 
34 $this->stringchars = array("\"", "'");
35 $this->delimiters = array("~", "!", "@", "%", "^", "&", "*", "(", ")", "-", "+", "|", "\\", "/", "{", "}", "[", "]", ";", "\"", "'", "<", ">", " ", ",", " ", ".", "?");
36 $this->escchar = "";
37 
38 // Comment settings
39 
40 $this->linecommenton = array("//");
41 $this->blockcommenton = array("{");
42 $this->blockcommentoff = array("}");
43 
44 // Keywords (keyword mapping to colour number)
45 
46 $this->keywords = array(
47  "begin" => "1",
48  "const" => "1",
49  "else" => "1",
50  "end" => "1",
51  "function" => "1",
52  "goto" => "1",
53  "if" => "1",
54  "label" => "1",
55  "procedure" => "1",
56  "program" => "1",
57  "readln" => "1",
58  "repeat" => "1",
59  "uses" => "1",
60  "var" => "1",
61  "write" => "1",
62  "writeln" => "1",
63  "and" => "2",
64  "array" => "2",
65  "asm" => "2",
66  "case" => "2",
67  "destructor" => "2",
68  "div" => "2",
69  "do" => "2",
70  "downto" => "2",
71  "exports" => "2",
72  "file" => "2",
73  "for" => "2",
74  "implementation" => "2",
75  "in" => "2",
76  ":=" => "3",
77  "inhertited" => "3",
78  "inline" => "3",
79  "interface" => "3",
80  "library" => "3",
81  "mod" => "3",
82  "nil" => "3",
83  "not" => "3",
84  "object" => "3",
85  "of" => "3",
86  "or" => "3",
87  ";" => "4",
88  "+" => "4",
89  "-" => "4",
90  "=" => "4",
91  "//" => "4",
92  "/" => "4",
93  "%" => "4",
94  "&" => "4",
95  ">" => "4",
96  "<" => "4",
97  "^" => "4",
98  "!" => "4",
99  "|" => "4",
100  "packed" => "5",
101  "private" => "5",
102  "public" => "5",
103  "record" => "5",
104  "set" => "5",
105  "shl" => "5",
106  "shr" => "5",
107  "string" => "5",
108  "then" => "5",
109  "to" => "5",
110  "type" => "5",
111  "unit" => "5",
112  "until" => "5",
113  "with" => "5",
114  "xor" => "5");
115 
116 // Special extensions
117 
118 
119 // Each category can specify a PHP function that returns an altered
120 // version of the keyword.
121 
122 
123 
124 
125 
126 $this->linkscripts = array(
127  "1" => "donothing",
128  "2" => "donothing",
129  "3" => "donothing",
130  "4" => "donothing",
131  "5" => "donothing");
132 }
133 
134 
135 
136 function donothing($keywordin)
137 {
138  return $keywordin;
139 }
140 
141 }
142 ?>