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