diff options
Diffstat (limited to 'imports/codemirror/mode/perl/perl.js')
-rwxr-xr-x | imports/codemirror/mode/perl/perl.js | 816 |
1 files changed, 816 insertions, 0 deletions
diff --git a/imports/codemirror/mode/perl/perl.js b/imports/codemirror/mode/perl/perl.js new file mode 100755 index 00000000..e2e1cbef --- /dev/null +++ b/imports/codemirror/mode/perl/perl.js | |||
@@ -0,0 +1,816 @@ | |||
1 | // CodeMirror2 mode/perl/perl.js (text/x-perl) beta 0.10 (2011-11-08) | ||
2 | // This is a part of CodeMirror from https://github.com/sabaca/CodeMirror_mode_perl (mail@sabaca.com) | ||
3 | CodeMirror.defineMode("perl",function(config,parserConfig){ | ||
4 | // http://perldoc.perl.org | ||
5 | var PERL={ // null - magic touch | ||
6 | // 1 - keyword | ||
7 | // 2 - def | ||
8 | // 3 - atom | ||
9 | // 4 - operator | ||
10 | // 5 - variable-2 (predefined) | ||
11 | // [x,y] - x=1,2,3; y=must be defined if x{...} | ||
12 | // PERL operators | ||
13 | '->' : 4, | ||
14 | '++' : 4, | ||
15 | '--' : 4, | ||
16 | '**' : 4, | ||
17 | // ! ~ \ and unary + and - | ||
18 | '=~' : 4, | ||
19 | '!~' : 4, | ||
20 | '*' : 4, | ||
21 | '/' : 4, | ||
22 | '%' : 4, | ||
23 | 'x' : 4, | ||
24 | '+' : 4, | ||
25 | '-' : 4, | ||
26 | '.' : 4, | ||
27 | '<<' : 4, | ||
28 | '>>' : 4, | ||
29 | // named unary operators | ||
30 | '<' : 4, | ||
31 | '>' : 4, | ||
32 | '<=' : 4, | ||
33 | '>=' : 4, | ||
34 | 'lt' : 4, | ||
35 | 'gt' : 4, | ||
36 | 'le' : 4, | ||
37 | 'ge' : 4, | ||
38 | '==' : 4, | ||
39 | '!=' : 4, | ||
40 | '<=>' : 4, | ||
41 | 'eq' : 4, | ||
42 | 'ne' : 4, | ||
43 | 'cmp' : 4, | ||
44 | '~~' : 4, | ||
45 | '&' : 4, | ||
46 | '|' : 4, | ||
47 | '^' : 4, | ||
48 | '&&' : 4, | ||
49 | '||' : 4, | ||
50 | '//' : 4, | ||
51 | '..' : 4, | ||
52 | '...' : 4, | ||
53 | '?' : 4, | ||
54 | ':' : 4, | ||
55 | '=' : 4, | ||
56 | '+=' : 4, | ||
57 | '-=' : 4, | ||
58 | '*=' : 4, // etc. ??? | ||
59 | ',' : 4, | ||
60 | '=>' : 4, | ||
61 | '::' : 4, | ||
62 | // list operators (rightward) | ||
63 | 'not' : 4, | ||
64 | 'and' : 4, | ||
65 | 'or' : 4, | ||
66 | 'xor' : 4, | ||
67 | // PERL predefined variables (I know, what this is a paranoid idea, but may be needed for people, who learn PERL, and for me as well, ...and may be for you?;) | ||
68 | 'BEGIN' : [5,1], | ||
69 | 'END' : [5,1], | ||
70 | 'PRINT' : [5,1], | ||
71 | 'PRINTF' : [5,1], | ||
72 | 'GETC' : [5,1], | ||
73 | 'READ' : [5,1], | ||
74 | 'READLINE' : [5,1], | ||
75 | 'DESTROY' : [5,1], | ||
76 | 'TIE' : [5,1], | ||
77 | 'TIEHANDLE' : [5,1], | ||
78 | 'UNTIE' : [5,1], | ||
79 | 'STDIN' : 5, | ||
80 | 'STDIN_TOP' : 5, | ||
81 | 'STDOUT' : 5, | ||
82 | 'STDOUT_TOP' : 5, | ||
83 | 'STDERR' : 5, | ||
84 | 'STDERR_TOP' : 5, | ||
85 | '$ARG' : 5, | ||
86 | '$_' : 5, | ||
87 | '@ARG' : 5, | ||
88 | '@_' : 5, | ||
89 | '$LIST_SEPARATOR' : 5, | ||
90 | '$"' : 5, | ||
91 | '$PROCESS_ID' : 5, | ||
92 | '$PID' : 5, | ||
93 | '$$' : 5, | ||
94 | '$REAL_GROUP_ID' : 5, | ||
95 | '$GID' : 5, | ||
96 | '$(' : 5, | ||
97 | '$EFFECTIVE_GROUP_ID' : 5, | ||
98 | '$EGID' : 5, | ||
99 | '$)' : 5, | ||
100 | '$PROGRAM_NAME' : 5, | ||
101 | '$0' : 5, | ||
102 | '$SUBSCRIPT_SEPARATOR' : 5, | ||
103 | '$SUBSEP' : 5, | ||
104 | '$;' : 5, | ||
105 | '$REAL_USER_ID' : 5, | ||
106 | '$UID' : 5, | ||
107 | '$<' : 5, | ||
108 | '$EFFECTIVE_USER_ID' : 5, | ||
109 | '$EUID' : 5, | ||
110 | '$>' : 5, | ||
111 | '$a' : 5, | ||
112 | '$b' : 5, | ||
113 | '$COMPILING' : 5, | ||
114 | '$^C' : 5, | ||
115 | '$DEBUGGING' : 5, | ||
116 | '$^D' : 5, | ||
117 | '${^ENCODING}' : 5, | ||
118 | '$ENV' : 5, | ||
119 | '%ENV' : 5, | ||
120 | '$SYSTEM_FD_MAX' : 5, | ||
121 | '$^F' : 5, | ||
122 | '@F' : 5, | ||
123 | '${^GLOBAL_PHASE}' : 5, | ||
124 | '$^H' : 5, | ||
125 | '%^H' : 5, | ||
126 | '@INC' : 5, | ||
127 | '%INC' : 5, | ||
128 | '$INPLACE_EDIT' : 5, | ||
129 | '$^I' : 5, | ||
130 | '$^M' : 5, | ||
131 | '$OSNAME' : 5, | ||
132 | '$^O' : 5, | ||
133 | '${^OPEN}' : 5, | ||
134 | '$PERLDB' : 5, | ||
135 | '$^P' : 5, | ||
136 | '$SIG' : 5, | ||
137 | '%SIG' : 5, | ||
138 | '$BASETIME' : 5, | ||
139 | '$^T' : 5, | ||
140 | '${^TAINT}' : 5, | ||
141 | '${^UNICODE}' : 5, | ||
142 | '${^UTF8CACHE}' : 5, | ||
143 | '${^UTF8LOCALE}' : 5, | ||
144 | '$PERL_VERSION' : 5, | ||
145 | '$^V' : 5, | ||
146 | '${^WIN32_SLOPPY_STAT}' : 5, | ||
147 | '$EXECUTABLE_NAME' : 5, | ||
148 | '$^X' : 5, | ||
149 | '$1' : 5, // - regexp $1, $2... | ||
150 | '$MATCH' : 5, | ||
151 | '$&' : 5, | ||
152 | '${^MATCH}' : 5, | ||
153 | '$PREMATCH' : 5, | ||
154 | '$`' : 5, | ||
155 | '${^PREMATCH}' : 5, | ||
156 | '$POSTMATCH' : 5, | ||
157 | "$'" : 5, | ||
158 | '${^POSTMATCH}' : 5, | ||
159 | '$LAST_PAREN_MATCH' : 5, | ||
160 | '$+' : 5, | ||
161 | '$LAST_SUBMATCH_RESULT' : 5, | ||
162 | '$^N' : 5, | ||
163 | '@LAST_MATCH_END' : 5, | ||
164 | '@+' : 5, | ||
165 | '%LAST_PAREN_MATCH' : 5, | ||
166 | '%+' : 5, | ||
167 | '@LAST_MATCH_START' : 5, | ||
168 | '@-' : 5, | ||
169 | '%LAST_MATCH_START' : 5, | ||
170 | '%-' : 5, | ||
171 | '$LAST_REGEXP_CODE_RESULT' : 5, | ||
172 | '$^R' : 5, | ||
173 | '${^RE_DEBUG_FLAGS}' : 5, | ||
174 | '${^RE_TRIE_MAXBUF}' : 5, | ||
175 | '$ARGV' : 5, | ||
176 | '@ARGV' : 5, | ||
177 | 'ARGV' : 5, | ||
178 | 'ARGVOUT' : 5, | ||
179 | '$OUTPUT_FIELD_SEPARATOR' : 5, | ||
180 | '$OFS' : 5, | ||
181 | '$,' : 5, | ||
182 | '$INPUT_LINE_NUMBER' : 5, | ||
183 | '$NR' : 5, | ||
184 | '$.' : 5, | ||
185 | '$INPUT_RECORD_SEPARATOR' : 5, | ||
186 | '$RS' : 5, | ||
187 | '$/' : 5, | ||
188 | '$OUTPUT_RECORD_SEPARATOR' : 5, | ||
189 | '$ORS' : 5, | ||
190 | '$\\' : 5, | ||
191 | '$OUTPUT_AUTOFLUSH' : 5, | ||
192 | '$|' : 5, | ||
193 | '$ACCUMULATOR' : 5, | ||
194 | '$^A' : 5, | ||
195 | '$FORMAT_FORMFEED' : 5, | ||
196 | '$^L' : 5, | ||
197 | '$FORMAT_PAGE_NUMBER' : 5, | ||
198 | '$%' : 5, | ||
199 | '$FORMAT_LINES_LEFT' : 5, | ||
200 | '$-' : 5, | ||
201 | '$FORMAT_LINE_BREAK_CHARACTERS' : 5, | ||
202 | '$:' : 5, | ||
203 | '$FORMAT_LINES_PER_PAGE' : 5, | ||
204 | '$=' : 5, | ||
205 | '$FORMAT_TOP_NAME' : 5, | ||
206 | '$^' : 5, | ||
207 | '$FORMAT_NAME' : 5, | ||
208 | '$~' : 5, | ||
209 | '${^CHILD_ERROR_NATIVE}' : 5, | ||
210 | '$EXTENDED_OS_ERROR' : 5, | ||
211 | '$^E' : 5, | ||
212 | '$EXCEPTIONS_BEING_CAUGHT' : 5, | ||
213 |