ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_awk.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_awk extends HFile{
6  function HFile_awk(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // AWK Script
11 /*************************************/
12 // Flags
13 
14 $this->nocase = "0";
15 $this->notrim = "0";
16 $this->perl = "0";
17 
18 // Colours
19 
20 $this->colours = array("blue", "purple", "brown");
21 $this->quotecolour = "blue";
22 $this->blockcommentcolour = "green";
23 $this->linecommentcolour = "green";
24 
25 // Indent Strings
26 
27 $this->indent = array("{");
28 $this->unindent = array("}");
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  "atan2" => "1",
46  "break" => "1",
47  "BEGIN" => "1",
48  "close" => "1",
49  "continue" => "1",
50  "cos" => "1",
51  "delete" => "1",
52  "do" => "1",
53  "else" => "1",
54  "exp" => "1",
55  "exit" => "1",
56  "END" => "1",
57  "for" => "1",
58  "function" => "1",
59  "getline" => "1",
60  "gsub" => "1",
61  "if" => "1",
62  "index" => "1",
63  "int" => "1",
64  "length" => "1",
65  "local" => "1",
66  "log" => "1",
67  "match" => "1",
68  "next" => "1",
69  "print" => "1",
70  "printf" => "1",
71  "rand" => "1",
72  "return" => "1",
73  "sin" => "1",
74  "split" => "1",
75  "sprintf" => "1",
76  "sqrt" => "1",
77  "srand" => "1",
78  "sub" => "1",
79  "substr" => "1",
80  "system" => "1",
81  "tolower" => "1",
82  "toupper" => "1",
83  "while" => "1",
84  "ARGC" => "2",
85  "ARGV" => "2",
86  "CONVFMT" => "2",
87  "ENVIRON" => "2",
88  "FILENAME" => "2",
89  "FNR" => "2",
90  "FS" => "2",
91  "NF" => "2",
92  "NR" => "2",
93  "OFMT" => "2",
94  "OFS" => "2",
95  "ORS" => "2",
96  "RLENGTH" => "2",
97  "RS" => "2",
98  "RSTART" => "2",
99  "SUBSEP" => "2",
100  "+" => "4",
101  "-" => "4",
102  "=" => "4",
103  "//" => "4",
104  "/" => "4",
105  "%" => "4",
106  "&" => "4",
107  ">" => "4",
108  "<" => "4",
109  "^" => "4",
110  "!" => "4",
111  "|" => "4",
112  "$" => "4",
113  "*" => "4");
114 
115 // Special extensions
116 
117 // Each category can specify a PHP function that returns an altered
118 // version of the keyword.
119 
120 
121 
122 $this->linkscripts = array(
123  "1" => "donothing",
124  "2" => "donothing",
125  "4" => "donothing");
126 }
127 
128 
129 function donothing($keywordin)
130 {
131  return $keywordin;
132 }
133 
134 }?>