ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_bash.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_bash extends HFile{
6  function HFile_bash(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // Bash
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", "gray", "brown", "blue");
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  "'" => "1",
46  "{" => "1",
47  "}" => "1",
48  "&&" => "1",
49  "||" => "1",
50  "$" => "1",
51  "alias" => "1",
52  "break" => "1",
53  "case" => "1",
54  "continue" => "1",
55  "do" => "1",
56  "done" => "1",
57  "elif" => "1",
58  "else" => "1",
59  "esac" => "1",
60  "exit" => "1",
61  "export" => "1",
62  "fi" => "1",
63  "for" => "1",
64  "if" => "1",
65  "in" => "1",
66  "return" => "1",
67  "set" => "1",
68  "then" => "1",
69  "unalias" => "1",
70  "unset" => "1",
71  "while" => "1",
72  "halt" => "2",
73  "ifconfig" => "2",
74  "init" => "2",
75  "initlog" => "2",
76  "insmod" => "2",
77  "linuxconf" => "2",
78  "lsmod" => "2",
79  "modprobe" => "2",
80  "reboot" => "2",
81  "rmmod" => "2",
82  "route" => "2",
83  "shutdown" => "2",
84  "traceroute" => "2",
85  "]" => "3",
86  "[" => "3",
87  "awk" => "3",
88  "basename" => "3",
89  "cat" => "3",
90  "cp" => "3",
91  "echo" => "3",
92  "egrep" => "3",
93  "fgrep" => "3",
94  "gawk" => "3",
95  "grep" => "3",
96  "gzip" => "3",
97  "kill" => "3",
98  "killall" => "3",
99  "less" => "3",
100  "md" => "3",
101  "mkdir" => "3",
102  "mv" => "3",
103  "nice" => "3",
104  "pidof" => "3",
105  "ps" => "3",
106  "rd" => "3",
107  "read" => "3",
108  "rm" => "3",
109  "rmdir" => "3",
110  "sed" => "3",
111  "sleep" => "3",
112  "test" => "3",
113  "touch" => "3",
114  "ulimit" => "3",
115  "uname" => "3",
116  "usleep" => "3",
117  "zcat" => "3",
118  "zless" => "3",
119  "`" => "4",
120  "-a" => "4",
121  "-b" => "4",
122  "-c" => "4",
123  "-d" => "4",
124  "-e" => "4",
125  "-f" => "4",
126  "-g" => "4",
127  "-h" => "4",
128  "-i" => "4",
129  "-j" => "4",
130  "-k" => "4",
131  "-l" => "4",
132  "-m" => "4",
133  "-n" => "4",
134  "-o" => "4",
135  "-p" => "4",
136  "-q" => "4",
137  "-r" => "4",
138  "-s" => "4",
139  "-t" => "4",
140  "-u" => "4",
141  "-v" => "4",
142  "-w" => "4",
143  "-x" => "4",
144  "-z" => "4",
145  "-eq" => "5",
146  "-ge" => "5",
147  "-gt" => "5",
148  "-le" => "5",
149  "-lt" => "5",
150  "=" => "5",
151  "!=" => "5");
152 
153 // Special extensions
154 
155 // Each category can specify a PHP function that returns an altered
156 // version of the keyword.
157 
158 
159 
160 $this->linkscripts = array(
161  "1" => "donothing",
162  "2" => "donothing",
163  "3" => "donothing",
164  "4" => "donothing",
165  "5" => "donothing");
166 }
167 
168 
169 function donothing($keywordin)
170 {
171  return $keywordin;
172 }
173 
174 }?>