rhighlightjs 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/.document +5 -0
  2. data/.gitignore +7 -0
  3. data/LICENSE +20 -0
  4. data/MIT-LICENSE +20 -0
  5. data/README.rdoc +51 -0
  6. data/Rakefile +58 -0
  7. data/VERSION +1 -0
  8. data/assets/images/brown_papersq.png +0 -0
  9. data/assets/images/paperbg.gif +0 -0
  10. data/assets/images/school_book.png +0 -0
  11. data/assets/javascripts/highlight.js +570 -0
  12. data/assets/javascripts/highlight.pack.js +1 -0
  13. data/assets/javascripts/languages/1c.js +95 -0
  14. data/assets/javascripts/languages/apache.js +442 -0
  15. data/assets/javascripts/languages/avrasm.js +89 -0
  16. data/assets/javascripts/languages/axapta.js +52 -0
  17. data/assets/javascripts/languages/bash.js +81 -0
  18. data/assets/javascripts/languages/cpp.js +42 -0
  19. data/assets/javascripts/languages/cs.js +47 -0
  20. data/assets/javascripts/languages/css.js +81 -0
  21. data/assets/javascripts/languages/delphi.js +82 -0
  22. data/assets/javascripts/languages/diff.js +65 -0
  23. data/assets/javascripts/languages/django.js +61 -0
  24. data/assets/javascripts/languages/dos.js +33 -0
  25. data/assets/javascripts/languages/dynamic.js +460 -0
  26. data/assets/javascripts/languages/html-xml.js +140 -0
  27. data/assets/javascripts/languages/ini.js +40 -0
  28. data/assets/javascripts/languages/java.js +58 -0
  29. data/assets/javascripts/languages/javascript.js +50 -0
  30. data/assets/javascripts/languages/lisp.js +89 -0
  31. data/assets/javascripts/languages/mel.js +51 -0
  32. data/assets/javascripts/languages/parser3.js +54 -0
  33. data/assets/javascripts/languages/perl.js +152 -0
  34. data/assets/javascripts/languages/php.js +54 -0
  35. data/assets/javascripts/languages/profile.js +51 -0
  36. data/assets/javascripts/languages/python.js +75 -0
  37. data/assets/javascripts/languages/renderman.js +239 -0
  38. data/assets/javascripts/languages/ruby.js +176 -0
  39. data/assets/javascripts/languages/smalltalk.js +52 -0
  40. data/assets/javascripts/languages/sql.js +52 -0
  41. data/assets/javascripts/languages/static.js +223 -0
  42. data/assets/javascripts/languages/vbscript.js +27 -0
  43. data/assets/javascripts/languages/www.js +257 -0
  44. data/assets/javascripts/styleswitch.js +57 -0
  45. data/assets/stylesheets/ascetic.css +42 -0
  46. data/assets/stylesheets/brown_paper.css +104 -0
  47. data/assets/stylesheets/brown_papersq.png +0 -0
  48. data/assets/stylesheets/dark.css +101 -0
  49. data/assets/stylesheets/default.css +103 -0
  50. data/assets/stylesheets/far.css +113 -0
  51. data/assets/stylesheets/github.css +90 -0
  52. data/assets/stylesheets/idea.css +74 -0
  53. data/assets/stylesheets/ir_black.css +67 -0
  54. data/assets/stylesheets/magula.css +105 -0
  55. data/assets/stylesheets/notebook.css +106 -0
  56. data/assets/stylesheets/school_book.css +106 -0
  57. data/assets/stylesheets/school_book.png +0 -0
  58. data/assets/stylesheets/sunburst.css +112 -0
  59. data/assets/stylesheets/vs.css +68 -0
  60. data/assets/stylesheets/zenburn.css +113 -0
  61. data/assets/stylesheets/zenburn.css.txt +108 -0
  62. data/bin/rhighlightjs +6 -0
  63. data/init.rb +2 -0
  64. data/install.rb +3 -0
  65. data/lib/rhighlightjs.rb +28 -0
  66. data/rhighlightjs.gemspec +170 -0
  67. data/tasks/rhighlightjs_tasks.rake +18 -0
  68. data/test/rhighlightjs_test.rb +7 -0
  69. data/test/test_helper.rb +10 -0
  70. data/uninstall.rb +1 -0
  71. metadata +135 -0
@@ -0,0 +1,442 @@
1
+ /*
2
+ Language: Apache
3
+ Author: Ruslan Keba <rukeba@gmail.com>
4
+ Website: http://rukeba.com/
5
+ Description: language definition for Apache configuration files (httpd.conf & .htaccess)
6
+ Version 1.1
7
+ Date: 2008-12-27
8
+ */
9
+
10
+ hljs.LANGUAGES.apache =
11
+ {
12
+ case_insensitive: true,
13
+ defaultMode: {
14
+ lexems: [hljs.IDENT_RE],
15
+ contains: ['comment', 'sqbracket', 'cbracket', 'number', 'tag', 'string'],
16
+ keywords: {
17
+ 'keyword': {
18
+ 'acceptfilter': 1,
19
+ 'acceptmutex': 1,
20
+ 'acceptpathinfo': 1,
21
+ 'accessfilename': 1,
22
+ 'action': 1,
23
+ 'addalt': 1,
24
+ 'addaltbyencoding': 1,
25
+ 'addaltbytype': 1,
26
+ 'addcharset': 1,
27
+ 'adddefaultcharset': 1,
28
+ 'adddescription': 1,
29
+ 'addencoding': 1,
30
+ 'addhandler': 1,
31
+ 'addicon': 1,
32
+ 'addiconbyencoding': 1,
33
+ 'addiconbytype': 1,
34
+ 'addinputfilter': 1,
35
+ 'addlanguage': 1,
36
+ 'addmoduleinfo': 1,
37
+ 'addoutputfilter': 1,
38
+ 'addoutputfilterbytype': 1,
39
+ 'addtype': 1,
40
+ 'alias': 1,
41
+ 'aliasmatch': 1,
42
+ 'allow': 1,
43
+ 'allowconnect': 1,
44
+ 'allowencodedslashes': 1,
45
+ 'allowoverride': 1,
46
+ 'anonymous': 1,
47
+ 'anonymous_logemail': 1,
48
+ 'anonymous_mustgiveemail': 1,
49
+ 'anonymous_nouserid': 1,
50
+ 'anonymous_verifyemail': 1,
51
+ 'authbasicauthoritative': 1,
52
+ 'authbasicprovider': 1,
53
+ 'authdbduserpwquery': 1,
54
+ 'authdbduserrealmquery': 1,
55
+ 'authdbmgroupfile': 1,
56
+ 'authdbmtype': 1,
57
+ 'authdbmuserfile': 1,
58
+ 'authdefaultauthoritative': 1,
59
+ 'authdigestalgorithm': 1,
60
+ 'authdigestdomain': 1,
61
+ 'authdigestnccheck': 1,
62
+ 'authdigestnonceformat': 1,
63
+ 'authdigestnoncelifetime': 1,
64
+ 'authdigestprovider': 1,
65
+ 'authdigestqop': 1,
66
+ 'authdigestshmemsize': 1,
67
+ 'authgroupfile': 1,
68
+ 'authldapbinddn': 1,
69
+ 'authldapbindpassword': 1,
70
+ 'authldapcharsetconfig': 1,
71
+ 'authldapcomparednonserver': 1,
72
+ 'authldapdereferencealiases': 1,
73
+ 'authldapgroupattribute': 1,
74
+ 'authldapgroupattributeisdn': 1,
75
+ 'authldapremoteuserattribute': 1,
76
+ 'authldapremoteuserisdn': 1,
77
+ 'authldapurl': 1,
78
+ 'authname': 1,
79
+ 'authnprovideralias': 1,
80
+ 'authtype': 1,
81
+ 'authuserfile': 1,
82
+ 'authzdbmauthoritative': 1,
83
+ 'authzdbmtype': 1,
84
+ 'authzdefaultauthoritative': 1,
85
+ 'authzgroupfileauthoritative': 1,
86
+ 'authzldapauthoritative': 1,
87
+ 'authzownerauthoritative': 1,
88
+ 'authzuserauthoritative': 1,
89
+ 'balancermember': 1,
90
+ 'browsermatch': 1,
91
+ 'browsermatchnocase': 1,
92
+ 'bufferedlogs': 1,
93
+ 'cachedefaultexpire': 1,
94
+ 'cachedirlength': 1,
95
+ 'cachedirlevels': 1,
96
+ 'cachedisable': 1,
97
+ 'cacheenable': 1,
98
+ 'cachefile': 1,
99
+ 'cacheignorecachecontrol': 1,
100
+ 'cacheignoreheaders': 1,
101
+ 'cacheignorenolastmod': 1,
102
+ 'cacheignorequerystring': 1,
103
+ 'cachelastmodifiedfactor': 1,
104
+ 'cachemaxexpire': 1,
105
+ 'cachemaxfilesize': 1,
106
+ 'cacheminfilesize': 1,
107
+ 'cachenegotiateddocs': 1,
108
+ 'cacheroot': 1,
109
+ 'cachestorenostore': 1,
110
+ 'cachestoreprivate': 1,
111
+ 'cgimapextension': 1,
112
+ 'charsetdefault': 1,
113
+ 'charsetoptions': 1,
114
+ 'charsetsourceenc': 1,
115
+ 'checkcaseonly': 1,
116
+ 'checkspelling': 1,
117
+ 'chrootdir': 1,
118
+ 'contentdigest': 1,
119
+ 'cookiedomain': 1,
120
+ 'cookieexpires': 1,
121
+ 'cookielog': 1,
122
+ 'cookiename': 1,
123
+ 'cookiestyle': 1,
124
+ 'cookietracking': 1,
125
+ 'coredumpdirectory': 1,
126
+ 'customlog': 1,
127
+ 'dav': 1,
128
+ 'davdepthinfinity': 1,
129
+ 'davgenericlockdb': 1,
130
+ 'davlockdb': 1,
131
+ 'davmintimeout': 1,
132
+ 'dbdexptime': 1,
133
+ 'dbdkeep': 1,
134
+ 'dbdmax': 1,
135
+ 'dbdmin': 1,
136
+ 'dbdparams': 1,
137
+ 'dbdpersist': 1,
138
+ 'dbdpreparesql': 1,
139
+ 'dbdriver': 1,
140
+ 'defaulticon': 1,
141
+ 'defaultlanguage': 1,
142
+ 'defaulttype': 1,
143
+ 'deflatebuffersize': 1,
144
+ 'deflatecompressionlevel': 1,
145
+ 'deflatefilternote': 1,
146
+ 'deflatememlevel': 1,
147
+ 'deflatewindowsize': 1,
148
+ 'deny': 1,
149
+ 'directoryindex': 1,
150
+ 'directorymatch': 1,
151
+ 'directoryslash': 1,
152
+ 'documentroot': 1,
153
+ 'dumpioinput': 1,
154
+ 'dumpiologlevel': 1,
155
+ 'dumpiooutput': 1,
156
+ 'enableexceptionhook': 1,
157
+ 'enablemmap': 1,
158
+ 'enablesendfile': 1,
159
+ 'errordocument': 1,
160
+ 'errorlog': 1,
161
+ 'example': 1,
162
+ 'expiresactive': 1,
163
+ 'expiresbytype': 1,
164
+ 'expiresdefault': 1,
165
+ 'extendedstatus': 1,
166
+ 'extfilterdefine': 1,
167
+ 'extfilteroptions': 1,
168
+ 'fileetag': 1,
169
+ 'filterchain': 1,
170
+ 'filterdeclare': 1,
171
+ 'filterprotocol': 1,
172
+ 'filterprovider': 1,
173
+ 'filtertrace': 1,
174
+ 'forcelanguagepriority': 1,
175
+ 'forcetype': 1,
176
+ 'forensiclog': 1,
177
+ 'gracefulshutdowntimeout': 1,
178
+ 'group': 1,
179
+ 'header': 1,
180
+ 'headername': 1,
181
+ 'hostnamelookups': 1,
182
+ 'identitycheck': 1,
183
+ 'identitychecktimeout': 1,
184
+ 'imapbase': 1,
185
+ 'imapdefault': 1,
186
+ 'imapmenu': 1,
187
+ 'include': 1,
188
+ 'indexheadinsert': 1,
189
+ 'indexignore': 1,
190
+ 'indexoptions': 1,
191
+ 'indexorderdefault': 1,
192
+ 'indexstylesheet': 1,
193
+ 'isapiappendlogtoerrors': 1,
194
+ 'isapiappendlogtoquery': 1,
195
+ 'isapicachefile': 1,
196
+ 'isapifakeasync': 1,
197
+ 'isapilognotsupported': 1,
198
+ 'isapireadaheadbuffer': 1,
199
+ 'keepalive': 1,
200
+ 'keepalivetimeout': 1,
201
+ 'languagepriority': 1,
202
+ 'ldapcacheentries': 1,
203
+ 'ldapcachettl': 1,
204
+ 'ldapconnectiontimeout': 1,
205
+ 'ldapopcacheentries': 1,
206
+ 'ldapopcachettl': 1,
207
+ 'ldapsharedcachefile': 1,
208
+ 'ldapsharedcachesize': 1,
209
+ 'ldaptrustedclientcert': 1,
210
+ 'ldaptrustedglobalcert': 1,
211
+ 'ldaptrustedmode': 1,
212
+ 'ldapverifyservercert': 1,
213
+ 'limitinternalrecursion': 1,
214
+ 'limitrequestbody': 1,
215
+ 'limitrequestfields': 1,
216
+ 'limitrequestfieldsize': 1,
217
+ 'limitrequestline': 1,
218
+ 'limitxmlrequestbody': 1,
219
+ 'listen': 1,
220
+ 'listenbacklog': 1,
221
+ 'loadfile': 1,
222
+ 'loadmodule': 1,
223
+ 'lockfile': 1,
224
+ 'logformat': 1,
225
+ 'loglevel': 1,
226
+ 'maxclients': 1,
227
+ 'maxkeepaliverequests': 1,
228
+ 'maxmemfree': 1,
229
+ 'maxrequestsperchild': 1,
230
+ 'maxrequestsperthread': 1,
231
+ 'maxspareservers': 1,
232
+ 'maxsparethreads': 1,
233
+ 'maxthreads': 1,
234
+ 'mcachemaxobjectcount': 1,
235
+ 'mcachemaxobjectsize': 1,
236
+ 'mcachemaxstreamingbuffer': 1,
237
+ 'mcacheminobjectsize': 1,
238
+ 'mcacheremovalalgorithm': 1,
239
+ 'mcachesize': 1,
240
+ 'metadir': 1,
241
+ 'metafiles': 1,
242
+ 'metasuffix': 1,
243
+ 'mimemagicfile': 1,
244
+ 'minspareservers': 1,
245
+ 'minsparethreads': 1,
246
+ 'mmapfile': 1,
247
+ 'mod_gzip_on': 1,
248
+ 'mod_gzip_add_header_count': 1,
249
+ 'mod_gzip_keep_workfiles': 1,
250
+ 'mod_gzip_dechunk': 1,
251
+ 'mod_gzip_min_http': 1,
252
+ 'mod_gzip_minimum_file_size': 1,
253
+ 'mod_gzip_maximum_file_size': 1,
254
+ 'mod_gzip_maximum_inmem_size': 1,
255
+ 'mod_gzip_temp_dir': 1,
256
+ 'mod_gzip_item_include': 1,
257
+ 'mod_gzip_item_exclude': 1,
258
+ 'mod_gzip_command_version': 1,
259
+ 'mod_gzip_can_negotiate': 1,
260
+ 'mod_gzip_handle_methods': 1,
261
+ 'mod_gzip_static_suffix': 1,
262
+ 'mod_gzip_send_vary': 1,
263
+ 'mod_gzip_update_static': 1,
264
+ 'modmimeusepathinfo': 1,
265
+ 'multiviewsmatch': 1,
266
+ 'namevirtualhost': 1,
267
+ 'noproxy': 1,
268
+ 'nwssltrustedcerts': 1,
269
+ 'nwsslupgradeable': 1,
270
+ 'options': 1,
271
+ 'order': 1,
272
+ 'passenv': 1,
273
+ 'pidfile': 1,
274
+ 'protocolecho': 1,
275
+ 'proxybadheader': 1,
276
+ 'proxyblock': 1,
277
+ 'proxydomain': 1,
278
+ 'proxyerroroverride': 1,
279
+ 'proxyftpdircharset': 1,
280
+ 'proxyiobuffersize': 1,
281
+ 'proxymaxforwards': 1,
282
+ 'proxypass': 1,
283
+ 'proxypassinterpolateenv': 1,
284
+ 'proxypassmatch': 1,
285
+ 'proxypassreverse': 1,
286
+ 'proxypassreversecookiedomain': 1,
287
+ 'proxypassreversecookiepath': 1,
288
+ 'proxypreservehost': 1,
289
+ 'proxyreceivebuffersize': 1,
290
+ 'proxyremote': 1,
291
+ 'proxyremotematch': 1,
292
+ 'proxyrequests': 1,
293
+ 'proxyset': 1,
294
+ 'proxystatus': 1,
295
+ 'proxytimeout': 1,
296
+ 'proxyvia': 1,
297
+ 'readmename': 1,
298
+ 'receivebuffersize': 1,
299
+ 'redirect': 1,
300
+ 'redirectmatch': 1,
301
+ 'redirectpermanent': 1,
302
+ 'redirecttemp': 1,
303
+ 'removecharset': 1,
304
+ 'removeencoding': 1,
305
+ 'removehandler': 1,
306
+ 'removeinputfilter': 1,
307
+ 'removelanguage': 1,
308
+ 'removeoutputfilter': 1,
309
+ 'removetype': 1,
310
+ 'requestheader': 1,
311
+ 'require': 2,
312
+ 'rewritebase': 1,
313
+ 'rewritecond': 10,
314
+ 'rewriteengine': 1,
315
+ 'rewritelock': 1,
316
+ 'rewritelog': 1,
317
+ 'rewriteloglevel': 1,
318
+ 'rewritemap': 1,
319
+ 'rewriteoptions': 1,
320
+ 'rewriterule': 10,
321
+ 'rlimitcpu': 1,
322
+ 'rlimitmem': 1,
323
+ 'rlimitnproc': 1,
324
+ 'satisfy': 1,
325
+ 'scoreboardfile': 1,
326
+ 'script': 1,
327
+ 'scriptalias': 1,
328
+ 'scriptaliasmatch': 1,
329
+ 'scriptinterpretersource': 1,
330
+ 'scriptlog': 1,
331
+ 'scriptlogbuffer': 1,
332
+ 'scriptloglength': 1,
333
+ 'scriptsock': 1,
334
+ 'securelisten': 1,
335
+ 'seerequesttail': 1,
336
+ 'sendbuffersize': 1,
337
+ 'serveradmin': 1,
338
+ 'serveralias': 1,
339
+ 'serverlimit': 1,
340
+ 'servername': 1,
341
+ 'serverpath': 1,
342
+ 'serverroot': 1,
343
+ 'serversignature': 1,
344
+ 'servertokens': 1,
345
+ 'setenv': 1,
346
+ 'setenvif': 1,
347
+ 'setenvifnocase': 1,
348
+ 'sethandler': 1,
349
+ 'setinputfilter': 1,
350
+ 'setoutputfilter': 1,
351
+ 'ssienableaccess': 1,
352
+ 'ssiendtag': 1,
353
+ 'ssierrormsg': 1,
354
+ 'ssistarttag': 1,
355
+ 'ssitimeformat': 1,
356
+ 'ssiundefinedecho': 1,
357
+ 'sslcacertificatefile': 1,
358
+ 'sslcacertificatepath': 1,
359
+ 'sslcadnrequestfile': 1,
360
+ 'sslcadnrequestpath': 1,
361
+ 'sslcarevocationfile': 1,
362
+ 'sslcarevocationpath': 1,
363
+ 'sslcertificatechainfile': 1,
364
+ 'sslcertificatefile': 1,
365
+ 'sslcertificatekeyfile': 1,
366
+ 'sslciphersuite': 1,
367
+ 'sslcryptodevice': 1,
368
+ 'sslengine': 1,
369
+ 'sslhonorciperorder': 1,
370
+ 'sslmutex': 1,
371
+ 'ssloptions': 1,
372
+ 'sslpassphrasedialog': 1,
373
+ 'sslprotocol': 1,
374
+ 'sslproxycacertificatefile': 1,
375
+ 'sslproxycacertificatepath': 1,
376
+ 'sslproxycarevocationfile': 1,
377
+ 'sslproxycarevocationpath': 1,
378
+ 'sslproxyciphersuite': 1,
379
+ 'sslproxyengine': 1,
380
+ 'sslproxymachinecertificatefile': 1,
381
+ 'sslproxymachinecertificatepath': 1,
382
+ 'sslproxyprotocol': 1,
383
+ 'sslproxyverify': 1,
384
+ 'sslproxyverifydepth': 1,
385
+ 'sslrandomseed': 1,
386
+ 'sslrequire': 1,
387
+ 'sslrequiressl': 1,
388
+ 'sslsessioncache': 1,
389
+ 'sslsessioncachetimeout': 1,
390
+ 'sslusername': 1,
391
+ 'sslverifyclient': 1,
392
+ 'sslverifydepth': 1,
393
+ 'startservers': 1,
394
+ 'startthreads': 1,
395
+ 'substitute': 1,
396
+ 'suexecusergroup': 1,
397
+ 'threadlimit': 1,
398
+ 'threadsperchild': 1,
399
+ 'threadstacksize': 1,
400
+ 'timeout': 1,
401
+ 'traceenable': 1,
402
+ 'transferlog': 1,
403
+ 'typesconfig': 1,
404
+ 'unsetenv': 1,
405
+ 'usecanonicalname': 1,
406
+ 'usecanonicalphysicalport': 1,
407
+ 'user': 1,
408
+ 'userdir': 1,
409
+ 'virtualdocumentroot': 1,
410
+ 'virtualdocumentrootip': 1,
411
+ 'virtualscriptalias': 1,
412
+ 'virtualscriptaliasip': 1,
413
+ 'win32disableacceptex': 1,
414
+ 'xbithack': 1
415
+ },
416
+ 'literal': {'on': 1, 'off': 1}
417
+ }
418
+ },
419
+ modes: [
420
+ hljs.HASH_COMMENT_MODE,
421
+ {
422
+ /* TODO: check tag content: Location, Files, VirtualHost, ... */
423
+ className: 'tag',
424
+ begin: '</?', end: '>'
425
+ },
426
+ {
427
+ className: 'sqbracket',
428
+ begin: '\\s\\[', end: '\\]$'
429
+ },
430
+ {
431
+ className: 'cbracket',
432
+ begin: '[\\$%]\\{', end: '\\}',
433
+ contains: ['cbracket', 'number']
434
+ },
435
+ {
436
+ className: 'number',
437
+ begin: '[\\$%]\\d+', end: '^'
438
+ },
439
+ hljs.QUOTE_STRING_MODE,
440
+ hljs.BACKSLASH_ESCAPE
441
+ ]
442
+ };
@@ -0,0 +1,89 @@
1
+ /*
2
+ Language: AVR Assembler
3
+ Author: Vladimir Ermakov <vooon341@gmail.com>
4
+ */
5
+
6
+ hljs.LANGUAGES.avrasm =
7
+ {
8
+ case_insensitive: true,
9
+ defaultMode: {
10
+ lexems: [hljs.IDENT_RE],
11
+ contains: ['comment', 'number', 'string', 'label', 'preprocessor', 'localvars'],
12
+ illegal: '',
13
+ keywords: {
14
+ 'keyword': {
15
+ /* mnemonic */
16
+ 'adc': 1, 'add': 1 , 'adiw': 1 , 'and': 1 , 'andi': 1 , 'asr': 1 , 'bclr': 1 , 'bld': 1 , 'brbc': 1 , 'brbs': 1 , 'brcc': 1 ,
17
+ 'brcs': 1, 'break': 1, 'breq': 1, 'brge': 1, 'brhc': 1, 'brhs': 1, 'brid': 1, 'brie': 1, 'brlo': 1, 'brlt': 1, 'brmi': 1,
18
+ 'brne': 1, 'brpl': 1, 'brsh': 1, 'brtc': 1, 'brts': 1, 'brvc': 1, 'brvs': 1, 'bset': 1, 'bst': 1, 'call': 1, 'cbi': 1,
19
+ 'cbr': 1, 'clc': 1, 'clh': 1, 'cli': 1, 'cln': 1, 'clr': 1, 'cls': 1, 'clt': 1, 'clv': 1, 'clz': 1, 'com': 1, 'cp': 1,
20
+ 'cpc': 1, 'cpi': 1, 'cpse': 1, 'dec': 1, 'eicall': 1, 'eijmp': 1, 'elpm': 1, 'eor': 1, 'fmul': 1, 'fmuls': 1, 'fmulsu': 1,
21
+ 'icall': 1, 'ijmp': 1, 'in': 1, 'inc': 1, 'jmp': 1, 'ld': 1, 'ldd': 1, 'ldi': 1, 'lds': 1, 'lpm': 1, 'lsl': 1, 'lsr': 1,
22
+ 'mov': 1, 'movw': 1, 'mul': 1, 'muls': 1, 'mulsu': 1, 'neg': 1, 'nop': 1, 'or': 1, 'ori': 1, 'out': 1, 'pop': 1, 'push': 1,
23
+ 'rcall': 1, 'ret': 1, 'reti': 1, 'rjmp': 1, 'rol': 1, 'ror': 1, 'sbc': 1, 'sbr': 1, 'sbrc': 1, 'sbrs': 1, 'sec': 1, 'seh': 1,
24
+ 'sbi': 1, 'sbci': 1, 'sbic': 1, 'sbis': 1, 'sbiw': 1, 'sei': 1, 'sen': 1, 'ser': 1, 'ses': 1, 'set': 1, 'sev': 1, 'sez': 1,
25
+ 'sleep': 1, 'spm': 1, 'st': 1, 'std': 1, 'sts': 1, 'sub': 1, 'subi': 1, 'swap': 1, 'tst': 1, 'wdr': 1
26
+ },
27
+ 'built_in': {
28
+ /* general purpose registers */
29
+ 'r0': 1, 'r1': 1, 'r2': 1, 'r3': 1, 'r4': 1, 'r5': 1, 'r6': 1, 'r7': 1, 'r8': 1, 'r9': 1, 'r10': 1, 'r11': 1, 'r12': 1,
30
+ 'r13': 1, 'r14': 1, 'r15': 1, 'r16': 1, 'r17': 1, 'r18': 1, 'r19': 1, 'r20': 1, 'r21': 1, 'r22': 1, 'r23': 1, 'r24': 1,
31
+ 'r25': 1, 'r26': 1, 'r27': 1, 'r28': 1, 'r29': 1, 'r30': 1, 'r31': 1,
32
+ 'x': 1 /* R27:R26 */, 'xh': 1 /* R27 */, 'xl': 1 /* R26 */,
33
+ 'y': 1 /* R29:R28 */, 'yh': 1 /* R29 */, 'yl': 1 /* R28 */,
34
+ 'z': 1 /* R31:R30 */, 'zh': 1 /* R31 */, 'zl': 1 /* R30 */,
35
+ /* IO Registers (ATMega128) */
36
+ 'ucsr1c': 1, 'udr1': 1, 'ucsr1a': 1, 'ucsr1b': 1, 'ubrr1l': 1, 'ubrr1h': 1, 'ucsr0c': 1, 'ubrr0h': 1, 'tccr3c': 1,
37
+ 'tccr3a': 1, 'tccr3b': 1, 'tcnt3h': 1, 'tcnt3l': 1, 'ocr3ah': 1, 'ocr3al': 1, 'ocr3bh': 1, 'ocr3bl': 1, 'ocr3ch': 1,
38
+ 'ocr3cl': 1, 'icr3h': 1, 'icr3l': 1, 'etimsk': 1, 'etifr': 1, 'tccr1c': 1, 'ocr1ch': 1, 'ocr1cl': 1, 'twcr': 1,
39
+ 'twdr': 1, 'twar': 1, 'twsr': 1, 'twbr': 1, 'osccal': 1, 'xmcra': 1, 'xmcrb': 1, 'eicra': 1, 'spmcsr': 1, 'spmcr': 1,
40
+ 'portg': 1, 'ddrg': 1, 'ping': 1, 'portf': 1, 'ddrf': 1, 'sreg': 1, 'sph': 1, 'spl': 1, 'xdiv': 1, 'rampz': 1,
41
+ 'eicrb': 1, 'eimsk': 1, 'gimsk': 1, 'gicr': 1, 'eifr': 1, 'gifr': 1, 'timsk': 1, 'tifr': 1, 'mcucr': 1,
42
+ 'mcucsr': 1, 'tccr0': 1, 'tcnt0': 1, 'ocr0': 1, 'assr': 1, 'tccr1a': 1, 'tccr1b': 1, 'tcnt1h': 1, 'tcnt1l': 1,
43
+ 'ocr1ah': 1, 'ocr1al': 1, 'ocr1bh': 1, 'ocr1bl': 1, 'icr1h': 1, 'icr1l': 1, 'tccr2': 1, 'tcnt2': 1, 'ocr2': 1,
44
+ 'ocdr': 1, 'wdtcr': 1, 'sfior': 1, 'eearh': 1, 'eearl': 1, 'eedr': 1, 'eecr': 1, 'porta': 1, 'ddra': 1, 'pina': 1,
45
+ 'portb': 1, 'ddrb': 1, 'pinb': 1, 'portc': 1, 'ddrc': 1, 'pinc': 1, 'portd': 1, 'ddrd': 1, 'pind': 1, 'spdr': 1,
46
+ 'spsr': 1, 'spcr': 1, 'udr0': 1, 'ucsr0a': 1, 'ucsr0b': 1, 'ubrr0l': 1, 'acsr': 1, 'admux': 1, 'adcsr': 1, 'adch': 1,
47
+ 'adcl': 1, 'porte': 1, 'ddre': 1, 'pine': 1, 'pinf': 1
48
+ }
49
+ }
50
+ },
51
+
52
+ modes: [
53
+ hljs.C_BLOCK_COMMENT_MODE,
54
+ {
55
+ className: 'comment',
56
+ begin: ';', end: '$'
57
+ },
58
+ hljs.BACKSLASH_ESCAPE,
59
+ hljs.QUOTE_STRING_MODE,
60
+ {
61
+ className: 'string',
62
+ begin: '\'', end: '[^\\\\]\'',
63
+ illegal: '[^\\\\][^\']'
64
+ },
65
+ hljs.C_NUMBER_MODE,
66
+ /*{ // Hex: 0x00, $00; Oct: 0o00; Bin: 0b00000000; Dec: 0
67
+ // пока что-то не получается :(, буду использовать сишную моду.
68
+ className: 'number',
69
+ begin: '((0[xX]|\$)[A-Fa-f0-9]+|0[oO][0-7]+|0[bB][0-1]+|\\d+)', end: '^'
70
+ }*/
71
+ {
72
+ className: 'label',
73
+ begin: '^[A-Za-z0-9_.$]+:', end: '^'
74
+ },
75
+ {
76
+ className: 'preprocessor',
77
+ begin: '#', end: '$'
78
+ },
79
+ { // директивы «.include» «.macro» и т.д.
80
+ className: 'preprocessor',
81
+ begin: '\\.[a-zA-Z]+', end: '^'
82
+ },
83
+ { // подстановка в «.macro»
84
+ className: 'localvars',
85
+ begin: '@[0-9]+', end: '^'
86
+ }
87
+ ]
88
+ };
89
+
@@ -0,0 +1,52 @@
1
+ /*
2
+ Language: Axapta
3
+ Author: Dmitri Roudakov <dmitri@roudakov.ru>
4
+ */
5
+
6
+ hljs.LANGUAGES.axapta = {
7
+ defaultMode: {
8
+ lexems: [hljs.UNDERSCORE_IDENT_RE],
9
+ contains: ['comment', 'string', 'class', 'number', 'preprocessor'],
10
+ keywords: {'false': 1, 'int': 1, 'abstract': 1, 'private': 1, 'char': 1, 'interface': 1, 'boolean': 1, 'static': 1, 'null': 1, 'if': 1, 'for': 1, 'true': 1, 'while': 1, 'long': 1, 'throw': 1, 'finally': 1, 'protected': 1, 'extends': 1, 'final': 1, 'implements': 1, 'return': 1, 'void': 1, 'enum': 1, 'else': 1, 'break': 1, 'new': 1, 'catch': 1, 'byte': 1, 'super': 1, 'class': 1, 'case': 1, 'short': 1, 'default': 1, 'double': 1, 'public': 1, 'try': 1, 'this': 1, 'switch': 1, 'continue': 1,
11
+ 'reverse':1, 'firstfast':1,'firstonly':1,'forupdate':1,'nofetch':1, 'sum':1, 'avg':1, 'minof':1, 'maxof':1, 'count':1, 'order':1, 'group':1, 'by':1, 'asc':1, 'desc':1, 'index':1, 'hint':1, 'like':1,
12
+ 'dispaly':1, 'edit':1, 'client':1, 'server':1, 'ttsbegin':1, 'ttscommit':1,
13
+ 'str':1, 'real':1, 'date':1, 'container':1, 'anytype':1, 'common':1, 'div':1,'mod':1
14
+ }
15
+ },
16
+ modes: [
17
+ {
18
+ className: 'class',
19
+ lexems: [hljs.UNDERSCORE_IDENT_RE],
20
+ begin: '(class |interface )', end: '{',
21
+ illegal: ':',
22
+ keywords: {'class': 1, 'interface': 1},
23
+ contains: ['inheritance', 'title']
24
+ },
25
+ {
26
+ className: 'inheritance',
27
+ begin: '(implements|extends)', end: '^',
28
+ lexems: [hljs.IDENT_RE],
29
+ keywords: {'extends': 1, 'implements': 1},
30
+ relevance: 10
31
+ },
32
+ {
33
+ className: 'title',
34
+ begin: hljs.UNDERSCORE_IDENT_RE, end: '^'
35
+ },
36
+ {
37
+ className: 'params',
38
+ begin: '\\(', end: '\\)',
39
+ contains: ['string', 'annotation']
40
+ },
41
+ hljs.C_NUMBER_MODE,
42
+ hljs.APOS_STRING_MODE,
43
+ hljs.QUOTE_STRING_MODE,
44
+ hljs.BACKSLASH_ESCAPE,
45
+ hljs.C_LINE_COMMENT_MODE,
46
+ hljs.C_BLOCK_COMMENT_MODE,
47
+ {
48
+ className: 'preprocessor',
49
+ begin: '#', end: '$'
50
+ }
51
+ ]
52
+ };
@@ -0,0 +1,81 @@
1
+ /*
2
+ Language: Bash
3
+ Author: vah <vahtenberg@gmail.com>
4
+ */
5
+
6
+ hljs.LANGUAGES.bash = function(){
7
+ var BASH_LITERAL = {'true' : 1, 'false' : 1}
8
+ return {
9
+ defaultMode: {
10
+ lexems: [hljs.IDENT_RE],
11
+ contains: ['string', 'shebang', 'comment', 'number', 'test_condition', 'string', 'variable'],
12
+ keywords: {
13
+ 'keyword': {'if' : 1, 'then' : 1, 'else' : 1, 'fi' : 1, 'for' : 1, 'break' : 1, 'continue' : 1, 'while' : 1, 'in' : 1, 'do' : 1, 'done' : 1, 'echo' : 1, 'exit' : 1, 'return' : 1, 'set' : 1, 'declare' : 1},
14
+ 'literal': BASH_LITERAL
15
+ }
16
+ },
17
+ case_insensitive: false,
18
+ modes: [
19
+ {
20
+ className: 'shebang',
21
+ begin: '(#!\\/bin\\/bash)|(#!\\/bin\\/sh)',
22
+ end: '^',
23
+ relevance: 10
24
+ },
25
+ hljs.HASH_COMMENT_MODE,
26
+ {
27
+ className: 'test_condition',
28
+ begin: '\\[ ',
29
+ end: ' \\]',
30
+ contains: ['string', 'variable', 'number'],
31
+ lexems: [hljs.IDENT_RE],
32
+ keywords: {
33
+ 'literal': BASH_LITERAL
34
+ },
35
+ relevance: 0
36
+ },
37
+ {
38
+ className: 'test_condition',
39
+ begin: '\\[\\[ ',
40
+ end: ' \\]\\]',
41
+ contains: ['string', 'variable', 'number'],
42
+ lexems: [hljs.IDENT_RE],
43
+ keywords: {
44
+ 'literal': BASH_LITERAL
45
+ }
46
+ },
47
+ {
48
+ className: 'variable',
49
+ begin: '\\$([a-zA-Z0-9_]+)\\b',
50
+ end: '^'
51
+ },
52
+ {
53
+ className: 'variable',
54
+ begin: '\\$\\{(([^}])|(\\\\}))+\\}',
55
+ end: '^',
56
+ contains: ['number']
57
+ },
58
+ {
59
+ className: 'string',
60
+ begin: '"', end: '"',
61
+ illegal: '\\n',
62
+ contains: ['escape', 'variable'],
63
+ relevance: 0
64
+ },
65
+ {
66
+ className: 'string',
67
+ begin: '"', end: '"',
68
+ illegal: '\\n',
69
+ contains: ['escape', 'variable'],
70
+ relevance: 0
71
+ },
72
+ hljs.BACKSLASH_ESCAPE,
73
+ hljs.C_NUMBER_MODE,
74
+ {
75
+ className: 'comment',
76
+ begin: '\\/\\/', end: '$',
77
+ illegal: '.'
78
+ }
79
+ ]
80
+ };
81
+ }();