ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
HFile_modula2.php
Go to the documentation of this file.
1 <?php
2 $BEAUT_PATH = realpath(".") . "/Services/COPage/syntax_highlight/php";
3 if (!isset($BEAUT_PATH)) {
4  return;
5 }
6 require_once("$BEAUT_PATH/Beautifier/HFile.php");
7  class HFile_modula2 extends HFile
8  {
9  public function HFile_modula2()
10  {
11  $this->HFile();
12  /*************************************/
13  // Beautifier Highlighting Configuration File
14  // Modula2/2k-02-6-nr
15  /*************************************/
16  // Flags
17 
18  $this->nocase = "0";
19  $this->notrim = "0";
20  $this->perl = "0";
21 
22  // Colours
23 
24  $this->colours = array("blue", "purple", "purple", "gray", "brown", "blue");
25  $this->quotecolour = "blue";
26  $this->blockcommentcolour = "green";
27  $this->linecommentcolour = "green";
28 
29  // Indent Strings
30 
31  $this->indent = array("ARRAY", "BEGIN", "CONST", "DO", "ELSE", "ELSIF", "FOR", "FROM", "IF", "IMPORT", "LOOP", "PROCEDURE", "RECORD", "REPEAT", "TYPE", "VAR", "WHILE", "WITH");
32  $this->unindent = array("ELSE", "ELSIF", "END", "UNTIL");
33 
34  // String characters and delimiters
35 
36  $this->stringchars = array();
37  $this->delimiters = array("~", "!", "@", "$", "%", "^", "&", "*", "(", ")", "_", "-", "+", "|", "\\", "/", "{", "}", "[", "]", ":", ";", "\"", "'", " ", ",", ".", "?", "/");
38  $this->escchar = "";
39 
40  // Comment settings
41 
42  $this->linecommenton = array("");
43  $this->blockcommenton = array("(*");
44  $this->blockcommentoff = array("*)");
45 
46  // Keywords (keyword mapping to colour number)
47 
48  $this->keywords = array(
49  "ABS" => "1",
50  "AND" => "1",
51  "ADDRESS" => "1",
52  "ARRAY" => "1",
53  "BEGIN" => "1",
54  "BITSET" => "1",
55  "BY" => "1",
56  "CASE" => "1",
57  "CONST" => "1",
58  "DEALLOCATE" => "6",
59  "DEFINITION" => "1",
60  "DO" => "1",
61  "ELSE" => "1",
62  "ELSIF" => "1",
63  "END" => "1",
64  "EXCL" => "1",
65  "EXIT" => "1",
66  "FOR" => "1",
67  "FOREIGN" => "1",
68  "FROM" => "1",
69  "HIGH" => "1",
70  "IF" => "1",
71  "IMPLEMENTATION" => "1",
72  "IMPORT" => "1",
73  "IN" => "1",
74  "INC" => "1",
75  "INCL" => "1",
76  "LOOP" => "1",
77  "MAX" => "1",
78  "MIN" => "1",
79  "MODULE" => "1",
80  "NOT" => "1",
81  "OF" => "1",
82  "OR" => "1",
83  "POINTER" => "1",
84  "PROCEDURE" => "1",
85  "RECORD" => "1",
86  "REPEAT" => "1",
87  "RETURN" => "1",
88  "SET" => "1",
89  "STEP" => "1",
90  "THEN" => "1",
91  "TO" => "1",
92  "TYPE" => "1",
93  "UNTIL" => "1",
94  "VAR" => "1",
95  "WHILE" => "1",
96  "WITH" => "1",
97  "^" => "2",
98  "BOOLEAN" => "2",
99  "BYTE" => "2",
100  "CARDINAL" => "2",
101  "CHAR" => "2",
102  "FLOAT" => "2",
103  "INTEGER" => "2",
104  "IntSet" => "2",
105  "NIL" => "2",
106  "REAL" => "2",
107  "=" => "3",
108  ":" => "3",
109  "<=" => "3",
110  ">=" => "3",
111  "#" => "3",
112  "+" => "3",
113  "-" => "3",
114  "*" => "3",
115  "//" => "3",
116  "/" => "3",
117  "DIV" => "3",
118  "MOD" => "3",
119  "[" => "4",
120  "]" => "4",
121  "FALSE" => "5",
122  "TRUE" => "5",
123  "ALLOCATE" => "6",
124  "CHR" => "6",
125  "DEC" => "6",
126  "DISPOSE" => "6",
127  "NEW" => "6",
128  "ORD" => "6",
129  "SIZE" => "6",
130  "SYSTEM" => "6",
131  "TRUNC" => "6");
132 
133  // Special extensions
134 
135  // Each category can specify a PHP function that returns an altered
136  // version of the keyword.
137 
138 
139 
140  $this->linkscripts = array(
141  "1" => "donothing",
142  "6" => "donothing",
143  "2" => "donothing",
144  "3" => "donothing",
145  "4" => "donothing",
146  "5" => "donothing");
147  }
148 
149 
150  public function donothing($keywordin)
151  {
152  return $keywordin;
153  }
154  }
$BEAUT_PATH
donothing($keywordin)
Create styles array
The data for the language used.
Definition: HFile.php:21