broomhlda 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.md +201 -0
- data/lib/hl/define.ay +131 -0
- data/lib/hl/formatters/html.ay +26 -0
- data/lib/hl/lexer.ay +99 -0
- data/lib/hl/lexers/atomy.ay +122 -0
- data/lib/hl/lexers/haskell.ay +89 -0
- data/lib/hl/lexers/imported/abap.ay +43 -0
- data/lib/hl/lexers/imported/actionscript.ay +31 -0
- data/lib/hl/lexers/imported/actionscript3.ay +47 -0
- data/lib/hl/lexers/imported/ada.ay +107 -0
- data/lib/hl/lexers/imported/antlr.ay +95 -0
- data/lib/hl/lexers/imported/apacheconf.ay +29 -0
- data/lib/hl/lexers/imported/applescript.ay +48 -0
- data/lib/hl/lexers/imported/aspectj.ay +42 -0
- data/lib/hl/lexers/imported/asymptote.ay +64 -0
- data/lib/hl/lexers/imported/autohotkey.ay +76 -0
- data/lib/hl/lexers/imported/autoit.ay +64 -0
- data/lib/hl/lexers/imported/awk.ay +42 -0
- data/lib/hl/lexers/imported/bash.ay +63 -0
- data/lib/hl/lexers/imported/batch.ay +45 -0
- data/lib/hl/lexers/imported/bbcode.ay +23 -0
- data/lib/hl/lexers/imported/befunge.ay +26 -0
- data/lib/hl/lexers/imported/blitzmax.ay +44 -0
- data/lib/hl/lexers/imported/boo.ay +55 -0
- data/lib/hl/lexers/imported/brainfuck.ay +28 -0
- data/lib/hl/lexers/imported/bro.ay +57 -0
- data/lib/hl/lexers/imported/bugs.ay +31 -0
- data/lib/hl/lexers/imported/c.ay +84 -0
- data/lib/hl/lexers/imported/ca65.ay +26 -0
- data/lib/hl/lexers/imported/cbmbasicv2.ay +25 -0
- data/lib/hl/lexers/imported/ceylon.ay +47 -0
- data/lib/hl/lexers/imported/cfengine3.ay +50 -0
- data/lib/hl/lexers/imported/clojure.ay +32 -0
- data/lib/hl/lexers/imported/cmake.ay +38 -0
- data/lib/hl/lexers/imported/cobol.ay +44 -0
- data/lib/hl/lexers/imported/coffeescript.ay +79 -0
- data/lib/hl/lexers/imported/coldfusion.ay +36 -0
- data/lib/hl/lexers/imported/commonlisp.ay +65 -0
- data/lib/hl/lexers/imported/coq.ay +59 -0
- data/lib/hl/lexers/imported/croc.ay +37 -0
- data/lib/hl/lexers/imported/css.ay +55 -0
- data/lib/hl/lexers/imported/cuda.ay +84 -0
- data/lib/hl/lexers/imported/cython.ay +128 -0
- data/lib/hl/lexers/imported/d.ay +102 -0
- data/lib/hl/lexers/imported/darcspatch.ay +45 -0
- data/lib/hl/lexers/imported/dart.ay +84 -0
- data/lib/hl/lexers/imported/debiancontrol.ay +51 -0
- data/lib/hl/lexers/imported/dg.ay +61 -0
- data/lib/hl/lexers/imported/diff.ay +22 -0
- data/lib/hl/lexers/imported/django.ay +46 -0
- data/lib/hl/lexers/imported/dtd.ay +62 -0
- data/lib/hl/lexers/imported/dylan.ay +60 -0
- data/lib/hl/lexers/imported/dylanlid.ay +17 -0
- data/lib/hl/lexers/imported/ecl.ay +57 -0
- data/lib/hl/lexers/imported/elixir.ay +93 -0
- data/lib/hl/lexers/imported/erlang.ay +47 -0
- data/lib/hl/lexers/imported/factor.ay +89 -0
- data/lib/hl/lexers/imported/fancy.ay +54 -0
- data/lib/hl/lexers/imported/fantom.ay +149 -0
- data/lib/hl/lexers/imported/felix.ay +140 -0
- data/lib/hl/lexers/imported/fortran.ay +39 -0
- data/lib/hl/lexers/imported/foxpro.ay +37 -0
- data/lib/hl/lexers/imported/fsharp.ay +61 -0
- data/lib/hl/lexers/imported/gas.ay +51 -0
- data/lib/hl/lexers/imported/gettext.ay +21 -0
- data/lib/hl/lexers/imported/gherkin.ay +97 -0
- data/lib/hl/lexers/imported/glshader.ay +31 -0
- data/lib/hl/lexers/imported/gnuplot.ay +111 -0
- data/lib/hl/lexers/imported/go.ay +40 -0
- data/lib/hl/lexers/imported/gooddatacl.ay +33 -0
- data/lib/hl/lexers/imported/gosu.ay +58 -0
- data/lib/hl/lexers/imported/groff.ay +38 -0
- data/lib/hl/lexers/imported/groovy.ay +45 -0
- data/lib/hl/lexers/imported/haskell.ay +89 -0
- data/lib/hl/lexers/imported/haxe.ay +186 -0
- data/lib/hl/lexers/imported/hxml.ay +22 -0
- data/lib/hl/lexers/imported/hybris.ay +42 -0
- data/lib/hl/lexers/imported/idl.ay +23 -0
- data/lib/hl/lexers/imported/ini.ay +18 -0
- data/lib/hl/lexers/imported/io.ay +34 -0
- data/lib/hl/lexers/imported/ioke.ay +88 -0
- data/lib/hl/lexers/imported/irclogs.ay +24 -0
- data/lib/hl/lexers/imported/jags.ay +36 -0
- data/lib/hl/lexers/imported/java.ay +42 -0
- data/lib/hl/lexers/imported/javascript.ay +45 -0
- data/lib/hl/lexers/imported/json.ay +47 -0
- data/lib/hl/lexers/imported/julia.ay +60 -0
- data/lib/hl/lexers/imported/kconfig.ay +71 -0
- data/lib/hl/lexers/imported/koka.ay +104 -0
- data/lib/hl/lexers/imported/lasso.ay +143 -0
- data/lib/hl/lexers/imported/lighttpdconf.ay +24 -0
- data/lib/hl/lexers/imported/livescript.ay +82 -0
- data/lib/hl/lexers/imported/llvm.ay +36 -0
- data/lib/hl/lexers/imported/logtalk.ay +133 -0
- data/lib/hl/lexers/imported/lua.ay +56 -0
- data/lib/hl/lexers/imported/maql.ay +32 -0
- data/lib/hl/lexers/imported/matlab.ay +43 -0
- data/lib/hl/lexers/imported/minid.ay +37 -0
- data/lib/hl/lexers/imported/modula2.ay +63 -0
- data/lib/hl/lexers/imported/moinwiki.ay +33 -0
- data/lib/hl/lexers/imported/monkey.ay +84 -0
- data/lib/hl/lexers/imported/moocode.ay +26 -0
- data/lib/hl/lexers/imported/moonscript.ay +52 -0
- data/lib/hl/lexers/imported/mscgen.ay +35 -0
- data/lib/hl/lexers/imported/mupad.ay +36 -0
- data/lib/hl/lexers/imported/mysql.ay +37 -0
- data/lib/hl/lexers/imported/nasm.ay +52 -0
- data/lib/hl/lexers/imported/newlisp.ay +34 -0
- data/lib/hl/lexers/imported/newspeak.ay +49 -0
- data/lib/hl/lexers/imported/nginxconf.ay +41 -0
- data/lib/hl/lexers/imported/nimrod.ay +84 -0
- data/lib/hl/lexers/imported/nsis.ay +55 -0
- data/lib/hl/lexers/imported/numpy.ay +116 -0
- data/lib/hl/lexers/imported/objectivej.ay +120 -0
- data/lib/hl/lexers/imported/ocaml.ay +59 -0
- data/lib/hl/lexers/imported/octave.ay +39 -0
- data/lib/hl/lexers/imported/ooc.ay +45 -0
- data/lib/hl/lexers/imported/opa.ay +153 -0
- data/lib/hl/lexers/imported/openedge.ay +40 -0
- data/lib/hl/lexers/imported/perl.ay +130 -0
- data/lib/hl/lexers/imported/php.ay +63 -0
- data/lib/hl/lexers/imported/postscript.ay +39 -0
- data/lib/hl/lexers/imported/povray.ay +28 -0
- data/lib/hl/lexers/imported/powershell.ay +49 -0
- data/lib/hl/lexers/imported/prolog.ay +39 -0
- data/lib/hl/lexers/imported/properties.ay +17 -0
- data/lib/hl/lexers/imported/protobuf.ay +43 -0
- data/lib/hl/lexers/imported/puppet.ay +50 -0
- data/lib/hl/lexers/imported/pypylog.ay +44 -0
- data/lib/hl/lexers/imported/python.ay +116 -0
- data/lib/hl/lexers/imported/python3.ay +113 -0
- data/lib/hl/lexers/imported/qml.ay +47 -0
- data/lib/hl/lexers/imported/racket.ay +62 -0
- data/lib/hl/lexers/imported/ragel.ay +70 -0
- data/lib/hl/lexers/imported/rd.ay +22 -0
- data/lib/hl/lexers/imported/redcode.ay +23 -0
- data/lib/hl/lexers/imported/regedit.ay +25 -0
- data/lib/hl/lexers/imported/rpmspec.ay +57 -0
- data/lib/hl/lexers/imported/rust.ay +56 -0
- data/lib/hl/lexers/imported/s.ay +61 -0
- data/lib/hl/lexers/imported/scala.ay +72 -0
- data/lib/hl/lexers/imported/scheme.ay +31 -0
- data/lib/hl/lexers/imported/scilab.ay +37 -0
- data/lib/hl/lexers/imported/scss.ay +115 -0
- data/lib/hl/lexers/imported/smali.ay +71 -0
- data/lib/hl/lexers/imported/smalltalk.ay +93 -0
- data/lib/hl/lexers/imported/snobol.ay +42 -0
- data/lib/hl/lexers/imported/sourcepawn.ay +58 -0
- data/lib/hl/lexers/imported/sourceslist.ay +37 -0
- data/lib/hl/lexers/imported/sql.ay +31 -0
- data/lib/hl/lexers/imported/squidconf.ay +29 -0
- data/lib/hl/lexers/imported/stan.ay +38 -0
- data/lib/hl/lexers/imported/systemverilog.ay +65 -0
- data/lib/hl/lexers/imported/tcl.ay +110 -0
- data/lib/hl/lexers/imported/tcsh.ay +52 -0
- data/lib/hl/lexers/imported/tex.ay +49 -0
- data/lib/hl/lexers/imported/typescript.ay +51 -0
- data/lib/hl/lexers/imported/vala.ay +70 -0
- data/lib/hl/lexers/imported/vbnet.ay +62 -0
- data/lib/hl/lexers/imported/velocity.ay +50 -0
- data/lib/hl/lexers/imported/verilog.ay +61 -0
- data/lib/hl/lexers/imported/vgl.ay +25 -0
- data/lib/hl/lexers/imported/vhdl.ay +54 -0
- data/lib/hl/lexers/imported/vim.ay +28 -0
- data/lib/hl/lexers/imported/xml.ay +38 -0
- data/lib/hl/lexers/imported/xslt.ay +38 -0
- data/lib/hl/lexers/imported/xtend.ay +48 -0
- data/lib/hl/lexers/ruby.ay +238 -0
- data/lib/hl/state.ay +31 -0
- data/lib/hl/token.ay +8 -0
- data/lib/hl.ay +17 -0
- metadata +244 -0
@@ -0,0 +1,115 @@
|
|
1
|
+
use(require("atomy"))
|
2
|
+
use(require("hl/define"))
|
3
|
+
|
4
|
+
lexer = lexer:
|
5
|
+
name: "SCSS"
|
6
|
+
aliases: ["scss"]
|
7
|
+
extensions: [".scss"]
|
8
|
+
mimetypes: ["text/x-scss"]
|
9
|
+
start: .root
|
10
|
+
flags: Regexp IGNORECASE | Regexp MULTILINE
|
11
|
+
|
12
|
+
lex(string-url):
|
13
|
+
r"(\\\#|\#(?=[^\n{])|[^\n\#)])+" is(literal.string.other)
|
14
|
+
r"\#\{" is(literal.string.interpol) -> go-to(interpolation)
|
15
|
+
r"\)" is(literal.string.other) -> pop
|
16
|
+
|
17
|
+
lex(attr):
|
18
|
+
r"[^\s:=\"\[]+" is(name.attribute)
|
19
|
+
r"\#{" is(literal.string.interpol) -> go-to(interpolation)
|
20
|
+
r"[ \t]*:" is(operator) -> go-to(value)
|
21
|
+
|
22
|
+
lex(string-double):
|
23
|
+
r"(\\.|\#(?=[^\n{])|[^\n\"\#])+" is(literal.string.double)
|
24
|
+
r"\#\{" is(literal.string.interpol) -> go-to(interpolation)
|
25
|
+
r"\"" is(literal.string.double) -> pop
|
26
|
+
|
27
|
+
lex(class):
|
28
|
+
r"[\w-]+" is(name.class)
|
29
|
+
r"\#\{" is(literal.string.interpol) -> go-to(interpolation)
|
30
|
+
r"" is(text) -> pop
|
31
|
+
|
32
|
+
lex(pseudo-class):
|
33
|
+
r"[\w-]+" is(name.decorator)
|
34
|
+
r"\#\{" is(literal.string.interpol) -> go-to(interpolation)
|
35
|
+
r"" is(text) -> pop
|
36
|
+
|
37
|
+
lex(value):
|
38
|
+
r"[ \t]+" is(text)
|
39
|
+
r"[!$][\w-]+" is(name.variable)
|
40
|
+
r"url\(" is(literal.string.other) -> go-to(string-url)
|
41
|
+
r"[a-z_-][\w-]*(?=\()" is(name.function)
|
42
|
+
r"(azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-left-color|border-left-style|border-left-width|border-right|border-right-color|border-right-style|border-right-width|border-top-color|border-top-style|border-top-width|border-bottom|border-collapse|border-left|border-width|border-color|border-spacing|border-style|border-top|border|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|height|letter-spacing|line-height|list-style-type|list-style-image|list-style-position|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|marker-offset|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline|outline-color|outline-style|outline-width|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page|page-break-after|page-break-before|page-break-inside|pause-after|pause-before|pause|pitch|pitch-range|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index|bottom|left|above|absolute|always|armenian|aural|auto|avoid|baseline|behind|below|bidi-override|blink|block|bold|bolder|both|capitalize|center-left|center-right|center|circle|cjk-ideographic|close-quote|collapse|condensed|continuous|crop|crosshair|cross|cursive|dashed|decimal-leading-zero|decimal|default|digits|disc|dotted|double|e-resize|embed|extra-condensed|extra-expanded|expanded|fantasy|far-left|far-right|faster|fast|fixed|georgian|groove|hebrew|help|hidden|hide|higher|high|hiragana-iroha|hiragana|icon|inherit|inline-table|inline|inset|inside|invert|italic|justify|katakana-iroha|katakana|landscape|larger|large|left-side|leftwards|level|lighter|line-through|list-item|loud|lower-alpha|lower-greek|lower-roman|lowercase|ltr|lower|low|medium|message-box|middle|mix|monospace|n-resize|narrower|ne-resize|no-close-quote|no-open-quote|no-repeat|none|normal|nowrap|nw-resize|oblique|once|open-quote|outset|outside|overline|pointer|portrait|px|relative|repeat-x|repeat-y|repeat|rgb|ridge|right-side|rightwards|s-resize|sans-serif|scroll|se-resize|semi-condensed|semi-expanded|separate|serif|show|silent|slow|slower|small-caps|small-caption|smaller|soft|solid|spell-out|square|static|status-bar|super|sw-resize|table-caption|table-cell|table-column|table-column-group|table-footer-group|table-header-group|table-row|table-row-group|text|text-bottom|text-top|thick|thin|transparent|ultra-condensed|ultra-expanded|underline|upper-alpha|upper-latin|upper-roman|uppercase|url|visible|w-resize|wait|wider|x-fast|x-high|x-large|x-loud|x-low|x-small|x-soft|xx-large|xx-small|yes)\b" is(name.constant)
|
43
|
+
r"(indigo|gold|firebrick|indianred|darkolivegreen|darkseagreen|mediumvioletred|mediumorchid|chartreuse|mediumslateblue|springgreen|crimson|lightsalmon|brown|turquoise|olivedrab|cyan|skyblue|darkturquoise|goldenrod|darkgreen|darkviolet|darkgray|lightpink|darkmagenta|lightgoldenrodyellow|lavender|yellowgreen|thistle|violet|orchid|ghostwhite|honeydew|cornflowerblue|darkblue|darkkhaki|mediumpurple|cornsilk|bisque|slategray|darkcyan|khaki|wheat|deepskyblue|darkred|steelblue|aliceblue|gainsboro|mediumturquoise|floralwhite|coral|lightgrey|lightcyan|darksalmon|beige|azure|lightsteelblue|oldlace|greenyellow|royalblue|lightseagreen|mistyrose|sienna|lightcoral|orangered|navajowhite|palegreen|burlywood|seashell|mediumspringgreen|papayawhip|blanchedalmond|peru|aquamarine|darkslategray|ivory|dodgerblue|lemonchiffon|chocolate|orange|forestgreen|slateblue|mintcream|antiquewhite|darkorange|cadetblue|moccasin|limegreen|saddlebrown|darkslateblue|lightskyblue|deeppink|plum|darkgoldenrod|sandybrown|magenta|tan|rosybrown|pink|lightblue|palevioletred|mediumseagreen|dimgray|powderblue|seagreen|snow|mediumblue|midnightblue|paleturquoise|palegoldenrod|whitesmoke|darkorchid|salmon|lightslategray|lawngreen|lightgreen|tomato|hotpink|lightyellow|lavenderblush|linen|mediumaquamarine|blueviolet|peachpuff)\b" is(name.entity)
|
44
|
+
r"(black|silver|gray|white|maroon|red|purple|fuchsia|green|lime|olive|yellow|navy|blue|teal|aqua)\b" is(name.builtin)
|
45
|
+
r"\!(important|default)" is(name.exception)
|
46
|
+
r"(true|false)" is(name.pseudo)
|
47
|
+
r"(and|or|not)" is(operator.word)
|
48
|
+
r"/\*" is(comment.multiline) -> go-to(inline-comment)
|
49
|
+
r"//[^\n]*" is(comment.single)
|
50
|
+
r"\\#[a-z0-9]{1,6}" is(literal.number.hex)
|
51
|
+
r"(-?\d+)(\%|[a-z]+)?" is(by-groups(literal.number.integer, keyword.type))
|
52
|
+
r"(-?\d*\.\d+)(\%|[a-z]+)?" is(by-groups(literal.number.float, keyword.type))
|
53
|
+
r"\#{" is(literal.string.interpol) -> go-to(interpolation)
|
54
|
+
r"[\126\^\*!&%<>\|+=@:,./?-]+" is(operator)
|
55
|
+
r"[\[\]()]+" is(punctuation)
|
56
|
+
r"\"" is(literal.string.double) -> go-to(string-double)
|
57
|
+
r"'" is(literal.string.single) -> go-to(string-single)
|
58
|
+
r"[a-z_-][\w-]*" is(name)
|
59
|
+
r"\n" is(text)
|
60
|
+
r"[;{}]" is(punctuation) -> go-to(root)
|
61
|
+
|
62
|
+
lex(for):
|
63
|
+
r"(from|to|through)" is(operator.word)
|
64
|
+
any-of(value)
|
65
|
+
|
66
|
+
lex(string-single):
|
67
|
+
r"(\\.|\#(?=[^\n{])|[^\n'\#])+" is(literal.string.double)
|
68
|
+
r"\#\{" is(literal.string.interpol) -> go-to(interpolation)
|
69
|
+
r"'" is(literal.string.double) -> pop
|
70
|
+
|
71
|
+
lex(inline-comment):
|
72
|
+
r"(\\\#|\#(?=[^{])|\*(?=[^/])|[^\#*])+" is(comment.multiline)
|
73
|
+
r"\#\{" is(literal.string.interpol) -> go-to(interpolation)
|
74
|
+
r"\*/" is(comment) -> pop
|
75
|
+
|
76
|
+
lex(selector):
|
77
|
+
r"[ \t]+" is(text)
|
78
|
+
r"\:" is(name.decorator) -> go-to(pseudo-class)
|
79
|
+
r"\." is(name.class) -> go-to(class)
|
80
|
+
r"\\#" is(name.namespace) -> go-to(id)
|
81
|
+
r"[a-zA-Z0-9_-]+" is(name.tag)
|
82
|
+
r"\#\{" is(literal.string.interpol) -> go-to(interpolation)
|
83
|
+
r"&" is(keyword)
|
84
|
+
r"[\126\^\*!&\[\]\(\)<>\|+=@:;,./?-]" is(operator)
|
85
|
+
r"\"" is(literal.string.double) -> go-to(string-double)
|
86
|
+
r"'" is(literal.string.single) -> go-to(string-single)
|
87
|
+
r"\n" is(text)
|
88
|
+
r"[;{}]" is(punctuation) -> go-to(root)
|
89
|
+
|
90
|
+
lex(root):
|
91
|
+
r"\s+" is(text)
|
92
|
+
r"//.*?\n" is(comment.single)
|
93
|
+
r"/\*.*?\*/" is(comment.multiline)
|
94
|
+
r"@import" is(keyword) -> go-to(value)
|
95
|
+
r"@for" is(keyword) -> go-to(for)
|
96
|
+
r"@(debug|warn|if|while)" is(keyword) -> go-to(value)
|
97
|
+
r"(@mixin)( [\w-]+)" is(by-groups(keyword, name.function)) -> go-to(value)
|
98
|
+
r"(@include)( [\w-]+)" is(by-groups(keyword, name.decorator)) -> go-to(value)
|
99
|
+
r"@extend" is(keyword) -> go-to(selector)
|
100
|
+
r"@[a-z0-9_-]+" is(keyword) -> go-to(selector)
|
101
|
+
r"(\$[\w-]*\w)([ \t]*:)" is(by-groups(name.variable, operator)) -> go-to(value)
|
102
|
+
r"(?=[^;{}][;}])" is(name.attribute) -> go-to(attr)
|
103
|
+
r"(?=[^;{}:]+:[^a-z])" is(name.attribute) -> go-to(attr)
|
104
|
+
r"" is(text) -> go-to(selector)
|
105
|
+
|
106
|
+
lex(id):
|
107
|
+
r"[\w-]+" is(name.namespace)
|
108
|
+
r"\#\{" is(literal.string.interpol) -> go-to(interpolation)
|
109
|
+
r"" is(text) -> pop
|
110
|
+
|
111
|
+
lex(interpolation):
|
112
|
+
r"\}" is(literal.string.interpol) -> pop
|
113
|
+
any-of(value)
|
114
|
+
|
115
|
+
const-set(.Lexer, lexer)
|
@@ -0,0 +1,71 @@
|
|
1
|
+
use(require("atomy"))
|
2
|
+
use(require("hl/define"))
|
3
|
+
|
4
|
+
lexer = lexer:
|
5
|
+
name: "Smali"
|
6
|
+
aliases: ["smali"]
|
7
|
+
extensions: [".smali"]
|
8
|
+
mimetypes: ["text/smali"]
|
9
|
+
start: .root
|
10
|
+
flags: 0
|
11
|
+
|
12
|
+
lex(comment):
|
13
|
+
r"\#.*?\n" is(comment)
|
14
|
+
|
15
|
+
lex(instruction):
|
16
|
+
r"\b[vp]\d+\b" is(name.builtin)
|
17
|
+
r"\b[a-z][A-Za-z0-9/-]+\s+" is(text)
|
18
|
+
|
19
|
+
lex(class):
|
20
|
+
r"(L)((?:[A-Za-z0-9_$]+/)*)([A-Za-z0-9_$]+)(;)" is(by-groups(keyword.type, text, name.class, text))
|
21
|
+
|
22
|
+
lex(whitespace):
|
23
|
+
r"\n" is(text)
|
24
|
+
r"\s+" is(text)
|
25
|
+
|
26
|
+
lex(directive):
|
27
|
+
r"^[ \t]*\.(class|super|implements|field|subannotation|annotation|enum|method|registers|locals|array-data|packed-switch|sparse-switch|catchall|catch|line|parameter|local|prologue|epilogue|source)" is(keyword)
|
28
|
+
r"^[ \t]*\.end (field|subannotation|annotation|method|array-data|packed-switch|sparse-switch|parameter|local)" is(keyword)
|
29
|
+
r"^[ \t]*\.restart local" is(keyword)
|
30
|
+
|
31
|
+
lex(type):
|
32
|
+
r"[ZBSCIJFDV\[]+" is(keyword.type)
|
33
|
+
|
34
|
+
lex(punctuation):
|
35
|
+
r"->" is(punctuation)
|
36
|
+
r"[{},\(\):=\.-]" is(punctuation)
|
37
|
+
|
38
|
+
lex(label):
|
39
|
+
r":[A-Za-z0-9_]+" is(name.label)
|
40
|
+
|
41
|
+
lex(field):
|
42
|
+
r"(\$?\b)([A-Za-z0-9_$]*)(:)" is(by-groups(punctuation, name.variable, punctuation))
|
43
|
+
|
44
|
+
lex(literal):
|
45
|
+
r"\".*\"" is(literal.string)
|
46
|
+
r"0x[0-9A-Fa-f]+t?" is(literal.number.hex)
|
47
|
+
r"[0-9]*\.[0-9]+([eE][0-9]+)?[fd]?" is(literal.number.float)
|
48
|
+
r"[0-9]+L?" is(literal.number.integer)
|
49
|
+
|
50
|
+
lex(access-modifier):
|
51
|
+
r"(public|private|protected|static|final|synchronized|bridge|varargs|native|abstract|strictfp|synthetic|constructor|declared-synchronized|interface|enum|annotation|volatile|transient)" is(keyword)
|
52
|
+
|
53
|
+
lex(root):
|
54
|
+
any-of(comment)
|
55
|
+
any-of(label)
|
56
|
+
any-of(field)
|
57
|
+
any-of(method)
|
58
|
+
any-of(class)
|
59
|
+
any-of(directive)
|
60
|
+
any-of(access-modifier)
|
61
|
+
any-of(instruction)
|
62
|
+
any-of(literal)
|
63
|
+
any-of(punctuation)
|
64
|
+
any-of(type)
|
65
|
+
any-of(whitespace)
|
66
|
+
|
67
|
+
lex(method):
|
68
|
+
r"<(?:cl)?init>" is(name.function)
|
69
|
+
r"(\$?\b)([A-Za-z0-9_$]*)(\()" is(by-groups(punctuation, name.function, punctuation))
|
70
|
+
|
71
|
+
const-set(.Lexer, lexer)
|
@@ -0,0 +1,93 @@
|
|
1
|
+
use(require("atomy"))
|
2
|
+
use(require("hl/define"))
|
3
|
+
|
4
|
+
lexer = lexer:
|
5
|
+
name: "Smalltalk"
|
6
|
+
aliases: ["smalltalk", "squeak"]
|
7
|
+
extensions: [".st"]
|
8
|
+
mimetypes: ["text/x-smalltalk"]
|
9
|
+
start: .root
|
10
|
+
flags: 0
|
11
|
+
|
12
|
+
lex(objects):
|
13
|
+
r"\[" is(text) -> go-to(blockvariables)
|
14
|
+
r"\]" is(text) -> go-to(afterobject)
|
15
|
+
r"\b(self|super|true|false|nil|thisContext)\b" is(name.builtin.pseudo) -> go-to(afterobject)
|
16
|
+
r"\b[A-Z]\w*(?!:)\b" is(name.class) -> go-to(afterobject)
|
17
|
+
r"\b[a-z]\w*(?!:)\b" is(name.variable) -> go-to(afterobject)
|
18
|
+
r"\#(\"(\"\"|[^\"])*\"|[-+*/\\\126<>=|&!?,@%]+|[\w:]+)" is(literal.string.symbol) -> go-to(afterobject)
|
19
|
+
any-of(literals)
|
20
|
+
|
21
|
+
lex(blockvariables):
|
22
|
+
any-of(whitespaces)
|
23
|
+
r"(:)(\s*)(\w+)" is(by-groups(operator, text, name.variable))
|
24
|
+
r"\|" is(operator) -> pop
|
25
|
+
r"" is(text) -> pop
|
26
|
+
|
27
|
+
lex(_parenth-helper):
|
28
|
+
any-of(whitespaces)
|
29
|
+
r"(\d+r)?-?\d+(\.\d+)?(e-?\d+)?" is(literal.number)
|
30
|
+
r"[-+*/\\\126<>=|&\#!?,@%\w:]+" is(literal.string.symbol)
|
31
|
+
r"'(''|[^'])*'" is(literal.string)
|
32
|
+
r"\$." is(literal.string.char)
|
33
|
+
r"\#*\(" is(literal.string.symbol) -> go-to(inner-parenth)
|
34
|
+
|
35
|
+
lex(afterobject):
|
36
|
+
r"! !$" is(keyword) -> pop
|
37
|
+
any-of(whitespaces)
|
38
|
+
r"\b(ifTrue:|ifFalse:|whileTrue:|whileFalse:|timesRepeat:)" is(name.builtin) -> pop
|
39
|
+
r"\b(new\b(?!:))" is(name.builtin)
|
40
|
+
r"\:=|\_" is(operator) -> pop
|
41
|
+
r"\b[a-zA-Z]+\w*:" is(name.function) -> pop
|
42
|
+
r"\b[a-zA-Z]+\w*" is(name.function)
|
43
|
+
r"\w+:?|[-+*/\\\126<>=|&!?,@%]+" is(name.function) -> pop
|
44
|
+
r"\." is(punctuation) -> pop
|
45
|
+
r";" is(punctuation)
|
46
|
+
r"[\])}]" is(text)
|
47
|
+
r"[\[({]" is(text) -> pop
|
48
|
+
|
49
|
+
lex(literals):
|
50
|
+
r"'(''|[^'])*'" is(literal.string) -> go-to(afterobject)
|
51
|
+
r"\$." is(literal.string.char) -> go-to(afterobject)
|
52
|
+
r"\#\(" is(literal.string.symbol) -> go-to(parenth)
|
53
|
+
r"\)" is(text) -> go-to(afterobject)
|
54
|
+
r"(\d+r)?-?\d+(\.\d+)?(e-?\d+)?" is(literal.number) -> go-to(afterobject)
|
55
|
+
|
56
|
+
lex(method-definition):
|
57
|
+
r"([a-zA-Z]+\w*:)(\s*)(\w+)" is(by-groups(name.function, text, name.variable))
|
58
|
+
r"^(\b[a-zA-Z]+\w*\b)(\s*)$" is(by-groups(name.function, text))
|
59
|
+
r"^([-+*/\\\126<>=|&!?,@%]+)(\s*)(\w+)(\s*)$" is(by-groups(name.function, text, name.variable, text))
|
60
|
+
|
61
|
+
lex(parenth):
|
62
|
+
r"\)" is(literal.string.symbol) -> do-all(go-to(root), go-to(afterobject))
|
63
|
+
any-of(_parenth-helper)
|
64
|
+
|
65
|
+
lex(inner-parenth):
|
66
|
+
r"\)" is(literal.string.symbol) -> pop
|
67
|
+
any-of(_parenth-helper)
|
68
|
+
|
69
|
+
lex(whitespaces):
|
70
|
+
r"\s+" is(text)
|
71
|
+
r"\"(\"\"|[^\"])*\"" is(comment)
|
72
|
+
|
73
|
+
lex(squeak-fileout):
|
74
|
+
r"^\"(\"\"|[^\"])*\"!" is(keyword)
|
75
|
+
r"^'(''|[^'])*'!" is(keyword)
|
76
|
+
r"^(!)(\w+)( commentStamp: )(.*?)( prior: .*?!\n)(.*?)(!)" is(by-groups(keyword, name.class, keyword, literal.string, keyword, text, keyword))
|
77
|
+
r"^(!)(\w+(?: class)?)( methodsFor: )('(?:''|[^'])*')(.*?!)" is(by-groups(keyword, name.class, keyword, literal.string, keyword))
|
78
|
+
r"^(\w+)( subclass: )(\#\w+)(\s+instanceVariableNames: )(.*?)(\s+classVariableNames: )(.*?)(\s+poolDictionaries: )(.*?)(\s+category: )(.*?)(!)" is(by-groups(name.class, keyword, literal.string.symbol, keyword, literal.string, keyword, literal.string, keyword, literal.string, keyword, literal.string, keyword))
|
79
|
+
r"^(\w+(?: class)?)(\s+instanceVariableNames: )(.*?)(!)" is(by-groups(name.class, keyword, literal.string, keyword))
|
80
|
+
r"(!\n)(\].*)(! !)$" is(by-groups(keyword, text, keyword))
|
81
|
+
r"! !$" is(keyword)
|
82
|
+
|
83
|
+
lex(root):
|
84
|
+
r"(<)(\w+:)(.*?)(>)" is(by-groups(text, keyword, text, text))
|
85
|
+
any-of(squeak-fileout)
|
86
|
+
any-of(whitespaces)
|
87
|
+
any-of(method-definition)
|
88
|
+
r"(\|)([\w\s]*)(\|)" is(by-groups(operator, name.variable, operator))
|
89
|
+
any-of(objects)
|
90
|
+
r"\^|\:=|\_" is(operator)
|
91
|
+
r"[\]({}.;!]" is(text)
|
92
|
+
|
93
|
+
const-set(.Lexer, lexer)
|
@@ -0,0 +1,42 @@
|
|
1
|
+
use(require("atomy"))
|
2
|
+
use(require("hl/define"))
|
3
|
+
|
4
|
+
lexer = lexer:
|
5
|
+
name: "Snobol"
|
6
|
+
aliases: ["snobol"]
|
7
|
+
extensions: [".snobol"]
|
8
|
+
mimetypes: ["text/x-snobol"]
|
9
|
+
start: .root
|
10
|
+
flags: 0
|
11
|
+
|
12
|
+
lex(root):
|
13
|
+
r"\*.*\n" is(comment)
|
14
|
+
r"[\+\.] " is(punctuation) -> go-to(statement)
|
15
|
+
r"-.*\n" is(comment)
|
16
|
+
r"END\s*\n" is(name.label) -> go-to(heredoc)
|
17
|
+
r"[A-Za-z\$][\w$]*" is(name.label) -> go-to(statement)
|
18
|
+
r"\s+" is(text) -> go-to(statement)
|
19
|
+
|
20
|
+
lex(goto):
|
21
|
+
r"\s*\n" is(text) -> pop(2)
|
22
|
+
r"\s+" is(text)
|
23
|
+
r"F|S" is(keyword)
|
24
|
+
r"(\()([A-Za-z][\w.]*)(\))" is(by-groups(punctuation, name.label, punctuation))
|
25
|
+
|
26
|
+
lex(statement):
|
27
|
+
r"\s*\n" is(text) -> pop
|
28
|
+
r"\s+" is(text)
|
29
|
+
r"(?<=[^\w.])(LT|LE|EQ|NE|GE|GT|INTEGER|IDENT|DIFFER|LGT|SIZE|REPLACE|TRIM|DUPL|REMDR|DATE|TIME|EVAL|APPLY|OPSYN|LOAD|UNLOAD|LEN|SPAN|BREAK|ANY|NOTANY|TAB|RTAB|REM|POS|RPOS|FAIL|FENCE|ABORT|ARB|ARBNO|BAL|SUCCEED|INPUT|OUTPUT|TERMINAL)(?=[^\w.])" is(name.builtin)
|
30
|
+
r"[A-Za-z][\w\.]*" is(name)
|
31
|
+
r"\*\*|[\?\$\.!%\*/\#+\-@\|&\\=]" is(operator)
|
32
|
+
r"\"[^\"]*\"" is(literal.string)
|
33
|
+
r"'[^']*'" is(literal.string)
|
34
|
+
r"[0-9]+(?=[^\.EeDd])" is(literal.number.integer)
|
35
|
+
r"[0-9]+(\.[0-9]*)?([EDed][-+]?[0-9]+)?" is(literal.number.float)
|
36
|
+
r":" is(punctuation) -> go-to(goto)
|
37
|
+
r"[\(\)<>,;]" is(punctuation)
|
38
|
+
|
39
|
+
lex(heredoc):
|
40
|
+
r".*\n" is(literal.string.heredoc)
|
41
|
+
|
42
|
+
const-set(.Lexer, lexer)
|
@@ -0,0 +1,58 @@
|
|
1
|
+
use(require("atomy"))
|
2
|
+
use(require("hl/define"))
|
3
|
+
|
4
|
+
lexer = lexer:
|
5
|
+
name: "SourcePawn"
|
6
|
+
aliases: ["sp"]
|
7
|
+
extensions: [".sp"]
|
8
|
+
mimetypes: ["text/x-sourcepawn"]
|
9
|
+
start: .root
|
10
|
+
flags: 0
|
11
|
+
|
12
|
+
lex(macro):
|
13
|
+
r"[^/\n]+" is(comment.preproc)
|
14
|
+
r"/\*(.|\n)*?\*/" is(comment.multiline)
|
15
|
+
r"//.*?\n" is(comment.single) -> pop
|
16
|
+
r"/" is(comment.preproc)
|
17
|
+
r"(?<=\\)\n" is(comment.preproc)
|
18
|
+
r"\n" is(comment.preproc) -> pop
|
19
|
+
|
20
|
+
lex(root):
|
21
|
+
r"^\#if\s+0" is(comment.preproc) -> go-to(if0)
|
22
|
+
r"^\#" is(comment.preproc) -> go-to(macro)
|
23
|
+
r"^(?:\s|//.*?\n|/\*.*?\*/)+\#if\s+0" is(comment.preproc) -> go-to(if0)
|
24
|
+
r"^(?:\s|//.*?\n|/\*.*?\*/)+\#" is(comment.preproc) -> go-to(macro)
|
25
|
+
r"\n" is(text)
|
26
|
+
r"\s+" is(text)
|
27
|
+
r"\\\n" is(text)
|
28
|
+
r"/(\\\n)?/(\n|(.|\n)*?[^\\]\n)" is(comment.single)
|
29
|
+
r"/(\\\n)?\*(.|\n)*?\*(\\\n)?/" is(comment.multiline)
|
30
|
+
r"[{}]" is(punctuation)
|
31
|
+
r"L?\"" is(literal.string) -> go-to(string)
|
32
|
+
r"L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'" is(literal.string.char)
|
33
|
+
r"(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*" is(literal.number.float)
|
34
|
+
r"(\d+\.\d*|\.\d+|\d+[fF])[fF]?" is(literal.number.float)
|
35
|
+
r"0x[0-9a-fA-F]+[LlUu]*" is(literal.number.hex)
|
36
|
+
r"0[0-7]+[LlUu]*" is(literal.number.oct)
|
37
|
+
r"\d+[LlUu]*" is(literal.number.integer)
|
38
|
+
r"\*/" is(error)
|
39
|
+
r"[\126!%^&*+=|?:<>/-]" is(operator)
|
40
|
+
r"[()\[\],.;]" is(punctuation)
|
41
|
+
r"(case|const|continue|native|default|else|enum|for|if|new|operator|public|return|sizeof|static|decl|struct|switch)\b" is(keyword)
|
42
|
+
r"(bool|Float)\b" is(keyword.type)
|
43
|
+
r"(true|false)\b" is(keyword.constant)
|
44
|
+
r"[a-zA-Z_][a-zA-Z0-9_]*" is(name)
|
45
|
+
|
46
|
+
lex(string):
|
47
|
+
r"\"" is(literal.string) -> pop
|
48
|
+
r"\\([\\abfnrtv\"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})" is(literal.string.escape)
|
49
|
+
r"[^\\\"\n]+" is(literal.string)
|
50
|
+
r"\\\n" is(literal.string)
|
51
|
+
r"\\" is(literal.string)
|
52
|
+
|
53
|
+
lex(if0):
|
54
|
+
r"^\s*\#if.*?(?<!\\)\n" is(comment.preproc) -> push
|
55
|
+
r"^\s*\#endif.*?(?<!\\)\n" is(comment.preproc) -> pop
|
56
|
+
r".*?\n" is(comment)
|
57
|
+
|
58
|
+
const-set(.Lexer, lexer)
|
@@ -0,0 +1,37 @@
|
|
1
|
+
use(require("atomy"))
|
2
|
+
use(require("hl/define"))
|
3
|
+
|
4
|
+
lexer = lexer:
|
5
|
+
name: "Debian Sourcelist"
|
6
|
+
aliases: ["sourceslist", "sources.list"]
|
7
|
+
extensions: ["sources.list"]
|
8
|
+
mimetypes: []
|
9
|
+
start: .root
|
10
|
+
flags: 0
|
11
|
+
|
12
|
+
lex(distribution):
|
13
|
+
r"\#.*?$" is(comment) -> pop
|
14
|
+
r"\$\(ARCH\)" is(name.variable)
|
15
|
+
r"[^\s$\[]+" is(literal.string)
|
16
|
+
r"\[" is(literal.string.other) -> go-to(escaped-distribution)
|
17
|
+
r"\$" is(literal.string)
|
18
|
+
r"\s+" is(text) -> go-to(components)
|
19
|
+
|
20
|
+
lex(root):
|
21
|
+
r"\s+" is(text)
|
22
|
+
r"\#.*?$" is(comment)
|
23
|
+
r"^(deb(?:-src)?)(\s+)" is(by-groups(keyword, text)) -> go-to(distribution)
|
24
|
+
|
25
|
+
lex(escaped-distribution):
|
26
|
+
r"\]" is(literal.string.other) -> pop
|
27
|
+
r"\$\(ARCH\)" is(name.variable)
|
28
|
+
r"[^\]$]+" is(literal.string.other)
|
29
|
+
r"\$" is(literal.string.other)
|
30
|
+
|
31
|
+
lex(components):
|
32
|
+
r"\#.*?$" is(comment) -> pop(2)
|
33
|
+
r"$" is(text) -> pop(2)
|
34
|
+
r"\s+" is(text)
|
35
|
+
r"\S+" is(keyword.pseudo)
|
36
|
+
|
37
|
+
const-set(.Lexer, lexer)
|
@@ -0,0 +1,31 @@
|
|
1
|
+
use(require("atomy"))
|
2
|
+
use(require("hl/define"))
|
3
|
+
|
4
|
+
lexer = lexer:
|
5
|
+
name: "SQL"
|
6
|
+
aliases: ["sql"]
|
7
|
+
extensions: [".sql"]
|
8
|
+
mimetypes: ["text/x-sql"]
|
9
|
+
start: .root
|
10
|
+
flags: Regexp IGNORECASE
|
11
|
+
|
12
|
+
lex(multiline-comments):
|
13
|
+
r"/\*" is(comment.multiline) -> go-to(multiline-comments)
|
14
|
+
r"\*/" is(comment.multiline) -> pop
|
15
|
+
r"[^/\*]+" is(comment.multiline)
|
16
|
+
r"[/*]" is(comment.multiline)
|
17
|
+
|
18
|
+
lex(root):
|
19
|
+
r"\s+" is(text)
|
20
|
+
r"--.*?\n" is(comment.single)
|
21
|
+
r"/\*" is(comment.multiline) -> go-to(multiline-comments)
|
22
|
+
r"(ABORT|ABS|ABSOLUTE|ACCESS|ADA|ADD|ADMIN|AFTER|AGGREGATE|ALIAS|ALL|ALLOCATE|ALTER|ANALYSE|ANALYZE|AND|ANY|ARE|AS|ASC|ASENSITIVE|ASSERTION|ASSIGNMENT|ASYMMETRIC|AT|ATOMIC|AUTHORIZATION|AVG|BACKWARD|BEFORE|BEGIN|BETWEEN|BITVAR|BIT_LENGTH|BOTH|BREADTH|BY|C|CACHE|CALL|CALLED|CARDINALITY|CASCADE|CASCADED|CASE|CAST|CATALOG|CATALOG_NAME|CHAIN|CHARACTERISTICS|CHARACTER_LENGTH|CHARACTER_SET_CATALOG|CHARACTER_SET_NAME|CHARACTER_SET_SCHEMA|CHAR_LENGTH|CHECK|CHECKED|CHECKPOINT|CLASS|CLASS_ORIGIN|CLOB|CLOSE|CLUSTER|COALSECE|COBOL|COLLATE|COLLATION|COLLATION_CATALOG|COLLATION_NAME|COLLATION_SCHEMA|COLUMN|COLUMN_NAME|COMMAND_FUNCTION|COMMAND_FUNCTION_CODE|COMMENT|COMMIT|COMMITTED|COMPLETION|CONDITION_NUMBER|CONNECT|CONNECTION|CONNECTION_NAME|CONSTRAINT|CONSTRAINTS|CONSTRAINT_CATALOG|CONSTRAINT_NAME|CONSTRAINT_SCHEMA|CONSTRUCTOR|CONTAINS|CONTINUE|CONVERSION|CONVERT|COPY|CORRESPONTING|COUNT|CREATE|CREATEDB|CREATEUSER|CROSS|CUBE|CURRENT|CURRENT_DATE|CURRENT_PATH|CURRENT_ROLE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|CURSOR_NAME|CYCLE|DATA|DATABASE|DATETIME_INTERVAL_CODE|DATETIME_INTERVAL_PRECISION|DAY|DEALLOCATE|DECLARE|DEFAULT|DEFAULTS|DEFERRABLE|DEFERRED|DEFINED|DEFINER|DELETE|DELIMITER|DELIMITERS|DEREF|DESC|DESCRIBE|DESCRIPTOR|DESTROY|DESTRUCTOR|DETERMINISTIC|DIAGNOSTICS|DICTIONARY|DISCONNECT|DISPATCH|DISTINCT|DO|DOMAIN|DROP|DYNAMIC|DYNAMIC_FUNCTION|DYNAMIC_FUNCTION_CODE|EACH|ELSE|ENCODING|ENCRYPTED|END|END-EXEC|EQUALS|ESCAPE|EVERY|EXCEPT|ESCEPTION|EXCLUDING|EXCLUSIVE|EXEC|EXECUTE|EXISTING|EXISTS|EXPLAIN|EXTERNAL|EXTRACT|FALSE|FETCH|FINAL|FIRST|FOR|FORCE|FOREIGN|FORTRAN|FORWARD|FOUND|FREE|FREEZE|FROM|FULL|FUNCTION|G|GENERAL|GENERATED|GET|GLOBAL|GO|GOTO|GRANT|GRANTED|GROUP|GROUPING|HANDLER|HAVING|HIERARCHY|HOLD|HOST|IDENTITY|IGNORE|ILIKE|IMMEDIATE|IMMUTABLE|IMPLEMENTATION|IMPLICIT|IN|INCLUDING|INCREMENT|INDEX|INDITCATOR|INFIX|INHERITS|INITIALIZE|INITIALLY|INNER|INOUT|INPUT|INSENSITIVE|INSERT|INSTANTIABLE|INSTEAD|INTERSECT|INTO|INVOKER|IS|ISNULL|ISOLATION|ITERATE|JOIN|KEY|KEY_MEMBER|KEY_TYPE|LANCOMPILER|LANGUAGE|LARGE|LAST|LATERAL|LEADING|LEFT|LENGTH|LESS|LEVEL|LIKE|LIMIT|LISTEN|LOAD|LOCAL|LOCALTIME|LOCALTIMESTAMP|LOCATION|LOCATOR|LOCK|LOWER|MAP|MATCH|MAX|MAXVALUE|MESSAGE_LENGTH|MESSAGE_OCTET_LENGTH|MESSAGE_TEXT|METHOD|MIN|MINUTE|MINVALUE|MOD|MODE|MODIFIES|MODIFY|MONTH|MORE|MOVE|MUMPS|NAMES|NATIONAL|NATURAL|NCHAR|NCLOB|NEW|NEXT|NO|NOCREATEDB|NOCREATEUSER|NONE|NOT|NOTHING|NOTIFY|NOTNULL|NULL|NULLABLE|NULLIF|OBJECT|OCTET_LENGTH|OF|OFF|OFFSET|OIDS|OLD|ON|ONLY|OPEN|OPERATION|OPERATOR|OPTION|OPTIONS|OR|ORDER|ORDINALITY|OUT|OUTER|OUTPUT|OVERLAPS|OVERLAY|OVERRIDING|OWNER|PAD|PARAMETER|PARAMETERS|PARAMETER_MODE|PARAMATER_NAME|PARAMATER_ORDINAL_POSITION|PARAMETER_SPECIFIC_CATALOG|PARAMETER_SPECIFIC_NAME|PARAMATER_SPECIFIC_SCHEMA|PARTIAL|PASCAL|PENDANT|PLACING|PLI|POSITION|POSTFIX|PRECISION|PREFIX|PREORDER|PREPARE|PRESERVE|PRIMARY|PRIOR|PRIVILEGES|PROCEDURAL|PROCEDURE|PUBLIC|READ|READS|RECHECK|RECURSIVE|REF|REFERENCES|REFERENCING|REINDEX|RELATIVE|RENAME|REPEATABLE|REPLACE|RESET|RESTART|RESTRICT|RESULT|RETURN|RETURNED_LENGTH|RETURNED_OCTET_LENGTH|RETURNED_SQLSTATE|RETURNS|REVOKE|RIGHT|ROLE|ROLLBACK|ROLLUP|ROUTINE|ROUTINE_CATALOG|ROUTINE_NAME|ROUTINE_SCHEMA|ROW|ROWS|ROW_COUNT|RULE|SAVE_POINT|SCALE|SCHEMA|SCHEMA_NAME|SCOPE|SCROLL|SEARCH|SECOND|SECURITY|SELECT|SELF|SENSITIVE|SERIALIZABLE|SERVER_NAME|SESSION|SESSION_USER|SET|SETOF|SETS|SHARE|SHOW|SIMILAR|SIMPLE|SIZE|SOME|SOURCE|SPACE|SPECIFIC|SPECIFICTYPE|SPECIFIC_NAME|SQL|SQLCODE|SQLERROR|SQLEXCEPTION|SQLSTATE|SQLWARNINIG|STABLE|START|STATE|STATEMENT|STATIC|STATISTICS|STDIN|STDOUT|STORAGE|STRICT|STRUCTURE|STYPE|SUBCLASS_ORIGIN|SUBLIST|SUBSTRING|SUM|SYMMETRIC|SYSID|SYSTEM|SYSTEM_USER|TABLE|TABLE_NAME| TEMP|TEMPLATE|TEMPORARY|TERMINATE|THAN|THEN|TIMESTAMP|TIMEZONE_HOUR|TIMEZONE_MINUTE|TO|TOAST|TRAILING|TRANSATION|TRANSACTIONS_COMMITTED|TRANSACTIONS_ROLLED_BACK|TRANSATION_ACTIVE|TRANSFORM|TRANSFORMS|TRANSLATE|TRANSLATION|TREAT|TRIGGER|TRIGGER_CATALOG|TRIGGER_NAME|TRIGGER_SCHEMA|TRIM|TRUE|TRUNCATE|TRUSTED|TYPE|UNCOMMITTED|UNDER|UNENCRYPTED|UNION|UNIQUE|UNKNOWN|UNLISTEN|UNNAMED|UNNEST|UNTIL|UPDATE|UPPER|USAGE|USER|USER_DEFINED_TYPE_CATALOG|USER_DEFINED_TYPE_NAME|USER_DEFINED_TYPE_SCHEMA|USING|VACUUM|VALID|VALIDATOR|VALUES|VARIABLE|VERBOSE|VERSION|VIEW|VOLATILE|WHEN|WHENEVER|WHERE|WITH|WITHOUT|WORK|WRITE|YEAR|ZONE)\b" is(keyword)
|
23
|
+
r"(ARRAY|BIGINT|BINARY|BIT|BLOB|BOOLEAN|CHAR|CHARACTER|DATE|DEC|DECIMAL|FLOAT|INT|INTEGER|INTERVAL|NUMBER|NUMERIC|REAL|SERIAL|SMALLINT|VARCHAR|VARYING|INT8|SERIAL8|TEXT)\b" is(name.builtin)
|
24
|
+
r"[+*/<>=\126!@\#%^&|`?-]" is(operator)
|
25
|
+
r"[0-9]+" is(literal.number.integer)
|
26
|
+
r"'(''|[^'])*'" is(literal.string.single)
|
27
|
+
r"\"(\"\"|[^\"])*\"" is(literal.string.symbol)
|
28
|
+
r"[a-zA-Z_][a-zA-Z0-9_]*" is(name)
|
29
|
+
r"[;:()\[\],\.]" is(punctuation)
|
30
|
+
|
31
|
+
const-set(.Lexer, lexer)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
use(require("atomy"))
|
2
|
+
use(require("hl/define"))
|
3
|
+
|
4
|
+
lexer = lexer:
|
5
|
+
name: "SquidConf"
|
6
|
+
aliases: ["squidconf", "squid.conf", "squid"]
|
7
|
+
extensions: ["squid.conf"]
|
8
|
+
mimetypes: ["text/x-squidconf"]
|
9
|
+
start: .root
|
10
|
+
flags: Regexp IGNORECASE
|
11
|
+
|
12
|
+
lex(comment):
|
13
|
+
r"\s*TAG:.*" is(literal.string.escape) -> pop
|
14
|
+
r".*" is(comment) -> pop
|
15
|
+
|
16
|
+
lex(root):
|
17
|
+
r"\s+" is(text.whitespace)
|
18
|
+
r"\#" is(comment) -> go-to(comment)
|
19
|
+
r"\b(?:access_log|acl|always_direct|announce_host|announce_period|announce_port|announce_to|anonymize_headers|append_domain|as_whois_server|auth_param_basic|authenticate_children|authenticate_program|authenticate_ttl|broken_posts|buffered_logs|cache_access_log|cache_announce|cache_dir|cache_dns_program|cache_effective_group|cache_effective_user|cache_host|cache_host_acl|cache_host_domain|cache_log|cache_mem|cache_mem_high|cache_mem_low|cache_mgr|cachemgr_passwd|cache_peer|cache_peer_access|cahce_replacement_policy|cache_stoplist|cache_stoplist_pattern|cache_store_log|cache_swap|cache_swap_high|cache_swap_log|cache_swap_low|client_db|client_lifetime|client_netmask|connect_timeout|coredump_dir|dead_peer_timeout|debug_options|delay_access|delay_class|delay_initial_bucket_level|delay_parameters|delay_pools|deny_info|dns_children|dns_defnames|dns_nameservers|dns_testnames|emulate_httpd_log|err_html_text|fake_user_agent|firewall_ip|forwarded_for|forward_snmpd_port|fqdncache_size|ftpget_options|ftpget_program|ftp_list_width|ftp_passive|ftp_user|half_closed_clients|header_access|header_replace|hierarchy_stoplist|high_response_time_warning|high_page_fault_warning|hosts_file|htcp_port|http_access|http_anonymizer|httpd_accel|httpd_accel_host|httpd_accel_port|httpd_accel_uses_host_header|httpd_accel_with_proxy|http_port|http_reply_access|icp_access|icp_hit_stale|icp_port|icp_query_timeout|ident_lookup|ident_lookup_access|ident_timeout|incoming_http_average|incoming_icp_average|inside_firewall|ipcache_high|ipcache_low|ipcache_size|local_domain|local_ip|logfile_rotate|log_fqdn|log_icp_queries|log_mime_hdrs|maximum_object_size|maximum_single_addr_tries|mcast_groups|mcast_icp_query_timeout|mcast_miss_addr|mcast_miss_encode_key|mcast_miss_port|memory_pools|memory_pools_limit|memory_replacement_policy|mime_table|min_http_poll_cnt|min_icp_poll_cnt|minimum_direct_hops|minimum_object_size|minimum_retry_timeout|miss_access|negative_dns_ttl|negative_ttl|neighbor_timeout|neighbor_type_domain|netdb_high|netdb_low|netdb_ping_period|netdb_ping_rate|never_direct|no_cache|passthrough_proxy|pconn_timeout|pid_filename|pinger_program|positive_dns_ttl|prefer_direct|proxy_auth|proxy_auth_realm|query_icmp|quick_abort|quick_abort|quick_abort_max|quick_abort_min|quick_abort_pct|range_offset_limit|read_timeout|redirect_children|redirect_program|redirect_rewrites_host_header|reference_age|reference_age|refresh_pattern|reload_into_ims|request_body_max_size|request_size|request_timeout|shutdown_lifetime|single_parent_bypass|siteselect_timeout|snmp_access|snmp_incoming_address|snmp_port|source_ping|ssl_proxy|store_avg_object_size|store_objects_per_bucket|strip_query_terms|swap_level1_dirs|swap_level2_dirs|tcp_incoming_address|tcp_outgoing_address|tcp_recv_bufsize|test_reachability|udp_hit_obj|udp_hit_obj_size|udp_incoming_address|udp_outgoing_address|unique_hostname|unlinkd_program|uri_whitespace|useragent_log|visible_hostname|wais_relay|wais_relay_host|wais_relay_port)\b" is(keyword)
|
20
|
+
r"\b(?:proxy-only|weight|ttl|no-query|default|round-robin|multicast-responder|on|off|all|deny|allow|via|parent|no-digest|heap|lru|realm|children|q1|q2|credentialsttl|none|disable|offline_toggle|diskd)\b" is(name.constant)
|
21
|
+
r"\b(?:shutdown|info|parameter|server_list|client_list|squid\.conf)\b" is(literal.string)
|
22
|
+
r"stats/\b(?:shutdown|info|parameter|server_list|client_list|squid\.conf)\b" is(literal.string)
|
23
|
+
r"log/\b(?:shutdown|info|parameter|server_list|client_list|squid\.conf)\b=" is(literal.string)
|
24
|
+
r"\b(?:url_regex|urlpath_regex|referer_regex|port|proto|req_mime_type|rep_mime_type|method|browser|user|src|dst|time|dstdomain|ident|snmp_community)\b" is(keyword)
|
25
|
+
r"(?:(?:(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|0x0*[0-9a-f]{1,2}|0+[1-3]?[0-7]{0,2})(?:\.(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|0x0*[0-9a-f]{1,2}|0+[1-3]?[0-7]{0,2})){3})|(?!.*::.*::)(?:(?!:)|:(?=:))(?:[0-9a-f]{0,4}(?:(?<=::)|(?<!::):)){6}(?:[0-9a-f]{0,4}(?:(?<=::)|(?<!::):)[0-9a-f]{0,4}(?:(?<=::)|(?<!:)|(?<=:)(?<!::):)|(?:25[0-4]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-4]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))(?:/(?:(?:(?:(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|0x0*[0-9a-f]{1,2}|0+[1-3]?[0-7]{0,2})(?:\.(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|0x0*[0-9a-f]{1,2}|0+[1-3]?[0-7]{0,2})){3})|(?!.*::.*::)(?:(?!:)|:(?=:))(?:[0-9a-f]{0,4}(?:(?<=::)|(?<!::):)){6}(?:[0-9a-f]{0,4}(?:(?<=::)|(?<!::):)[0-9a-f]{0,4}(?:(?<=::)|(?<!:)|(?<=:)(?<!::):)|(?:25[0-4]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-4]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|\b\d+\b))?" is(literal.number.float)
|
26
|
+
r"(?:\b\d+\b(?:-\b\d+|%)?)" is(literal.number)
|
27
|
+
r"\S+" is(text)
|
28
|
+
|
29
|
+
const-set(.Lexer, lexer)
|
@@ -0,0 +1,38 @@
|
|
1
|
+
use(require("atomy"))
|
2
|
+
use(require("hl/define"))
|
3
|
+
|
4
|
+
lexer = lexer:
|
5
|
+
name: "Stan"
|
6
|
+
aliases: ["stan"]
|
7
|
+
extensions: [".stan"]
|
8
|
+
mimetypes: []
|
9
|
+
start: .root
|
10
|
+
flags: 0
|
11
|
+
|
12
|
+
lex(root):
|
13
|
+
r"\"[^\"]*\"" is(literal.string)
|
14
|
+
any-of(comments)
|
15
|
+
any-of(whitespace)
|
16
|
+
r"(data|transformed\s+?data|parameters|transformed\s+parameters|model|generated\s+quantities)(\s*)({)" is(by-groups(keyword.namespace, text, punctuation))
|
17
|
+
r"(for|in|while|repeat|until|if|then|else|true|false|T|lower|upper|print)\b" is(keyword.reserved)
|
18
|
+
r"(int|real|vector|simplex|ordered|row_vector|matrix|corr_matrix|cov_matrix|positive_ordered)\b" is(keyword.type)
|
19
|
+
r"[;:,\[\]()<>]" is(punctuation)
|
20
|
+
r"(Phi|abs|acos|acosh|asin|asinh|atan|atan2|atanh|bernoulli_log|beta_binomial_log|beta_log|binary_log_loss|binomial_coefficient_log|categorical_log|cauchy_log|cbrt|ceil|chi_square_log|cholesky_decompose|col|cols|cos|cosh|determinant|diag_matrix|diagonal|dirichlet_log|dot_product|dot_self|double_exponential_log|eigenvalues|eigenvalues_sym|erf|erfc|exp|exp2|expm1|exponential_cdf|exponential_log|fabs|fdim|floor|fma|fmax|fmin|fmod|gamma_log|hypergeometric_log|hypot|if_else|int_step|inv_chi_square_log|inv_cloglog|inv_gamma_log|inv_logit|inv_wishart_log|inverse|lbeta|lgamma|lkj_corr_cholesky_log|lkj_corr_log|lkj_cov_log|lmgamma|log|log10|log1m|log1p|log1p_exp|log2|log_sum_exp|logistic_log|logit|lognormal_cdf|lognormal_log|max|mean|min|multi_normal_cholesky_log|multi_normal_log|multi_student_t_log|multinomial_log|multiply_log|multiply_lower_tri_self_transpose|neg_binomial_log|normal_cdf|normal_log|ordered_logistic_log|pareto_log|poisson_log|pow|prod|round|row|rows|scaled_inv_chi_square_log|sd|sin|singular_values|sinh|softmax|sqrt|square|step|student_t_log|sum|tan|tanh|tgamma|trace|trunc|uniform_log|variance|weibull_cdf|weibull_log|wishart_log|bernoulli|beta|beta_binomial|categorical|cauchy|chi_square|dirichlet|double_exponential|exponential|gamma|hypergeometric|inv_chi_square|inv_gamma|inv_wishart|lkj_corr|lkj_corr_cholesky|lkj_cov|logistic|lognormal|multi_normal|multi_normal_cholesky|multi_student_t|multinomial|neg_binomial|normal|ordered_logistic|pareto|poisson|scaled_inv_chi_square|student_t|uniform|weibull|wishart)(?=\s*\()" is(name.builtin)
|
21
|
+
r"(e|epsilon|log10|log2|negative_epsilon|negative_infinity|not_a_number|pi|positive_infinity|sqrt2)(?=\s*\()" is(keyword.constant)
|
22
|
+
r"[A-Za-z][A-Za-z0-9_]*__\b" is(name.builtin.pseudo)
|
23
|
+
r"[A-Za-z][A-Za-z0-9_]*\b" is(name)
|
24
|
+
r"-?[0-9]+(\.[0-9]+)?[eE]-?[0-9]+" is(literal.number.float)
|
25
|
+
r"-?[0-9]*\.[0-9]*" is(literal.number.float)
|
26
|
+
r"-?[0-9]+" is(literal.number.integer)
|
27
|
+
r"<-|\126" is(operator)
|
28
|
+
r"\+|-|\.?\*|\.?/|\\|'|=" is(operator)
|
29
|
+
r"[{}]" is(punctuation)
|
30
|
+
|
31
|
+
lex(whitespace):
|
32
|
+
r"\s+" is(text)
|
33
|
+
|
34
|
+
lex(comments):
|
35
|
+
r"(?m)/\*.*?\*/" is(comment.multiline)
|
36
|
+
r"(//|\#).*$" is(comment.single)
|
37
|
+
|
38
|
+
const-set(.Lexer, lexer)
|
@@ -0,0 +1,65 @@
|
|
1
|
+
use(require("atomy"))
|
2
|
+
use(require("hl/define"))
|
3
|
+
|
4
|
+
lexer = lexer:
|
5
|
+
name: "systemverilog"
|
6
|
+
aliases: ["systemverilog", "sv"]
|
7
|
+
extensions: [".sv", ".svh"]
|
8
|
+
mimetypes: ["text/x-systemverilog"]
|
9
|
+
start: .root
|
10
|
+
flags: 0
|
11
|
+
|
12
|
+
lex(classname):
|
13
|
+
r"[a-zA-Z_][a-zA-Z0-9_]*" is(name.class) -> pop
|
14
|
+
|
15
|
+
lex(macro):
|
16
|
+
r"[^/\n]+" is(comment.preproc)
|
17
|
+
r"/[*](.|\n)*?[*]/" is(comment.multiline)
|
18
|
+
r"//.*?\n" is(comment.single) -> pop
|
19
|
+
r"/" is(comment.preproc)
|
20
|
+
r"(?<=\\)\n" is(comment.preproc)
|
21
|
+
r"\n" is(comment.preproc) -> pop
|
22
|
+
|
23
|
+
lex(root):
|
24
|
+
r"^\s*`define" is(comment.preproc) -> go-to(macro)
|
25
|
+
r"^(\s*)(package)(\s+)" is(by-groups(text, keyword.namespace, text))
|
26
|
+
r"^(\s*)(import)(\s+)" is(by-groups(text, keyword.namespace, text)) -> go-to(import)
|
27
|
+
r"\n" is(text)
|
28
|
+
r"\s+" is(text)
|
29
|
+
r"\\\n" is(text)
|
30
|
+
r"/(\\\n)?/(\n|(.|\n)*?[^\\]\n)" is(comment.single)
|
31
|
+
r"/(\\\n)?[*](.|\n)*?[*](\\\n)?/" is(comment.multiline)
|
32
|
+
r"[{}\#@]" is(punctuation)
|
33
|
+
r"L?\"" is(literal.string) -> go-to(string)
|
34
|
+
r"L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'" is(literal.string.char)
|
35
|
+
r"(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?" is(literal.number.float)
|
36
|
+
r"(\d+\.\d*|\.\d+|\d+[fF])[fF]?" is(literal.number.float)
|
37
|
+
r"([0-9]+)|(\'h)[0-9a-fA-F]+" is(literal.number.hex)
|
38
|
+
r"([0-9]+)|(\'b)[0-1]+" is(literal.number.hex)
|
39
|
+
r"([0-9]+)|(\'d)[0-9]+" is(literal.number.integer)
|
40
|
+
r"([0-9]+)|(\'o)[0-7]+" is(literal.number.oct)
|
41
|
+
r"\'[01xz]" is(literal.number)
|
42
|
+
r"\d+[Ll]?" is(literal.number.integer)
|
43
|
+
r"\*/" is(error)
|
44
|
+
r"[\126!%^&*+=|?:<>/-]" is(operator)
|
45
|
+
r"[()\[\],.;\']" is(punctuation)
|
46
|
+
r"`[a-zA-Z_][a-zA-Z0-9_]*" is(name.constant)
|
47
|
+
r"(accept_on|alias|always|always_comb|always_ff|always_latch|and|assert|assign|assume|automatic|before|begin|bind|bins|binsof|bit|break|buf|bufif0|bufif1|byte|case|casex|casez|cell|chandle|checker|class|clocking|cmos|config|const|constraint|context|continue|cover|covergroup|coverpoint|cross|deassign|default|defparam|design|disable|dist|do|edge|else|end|endcase|endchecker|endclass|endclocking|endconfig|endfunction|endgenerate|endgroup|endinterface|endmodule|endpackage|endprimitive|endprogram|endproperty|endsequence|endspecify|endtable|endtask|enum|event|eventually|expect|export|extends|extern|final|first_match|for|force|foreach|forever|fork|forkjoin|function|generate|genvar|global|highz0|highz1|if|iff|ifnone|ignore_bins|illegal_bins|implies|import|incdir|include|initial|inout|input|inside|instance|int|integer|interface|intersect|join|join_any|join_none|large|let|liblist|library|local|localparam|logic|longint|macromodule|matches|medium|modport|module|nand|negedge|new|nexttime|nmos|nor|noshowcancelled|not|notif0|notif1|null|or|output|package|packed|parameter|pmos|posedge|primitive|priority|program|property|protected|pull0|pull1|pulldown|pullup|pulsestyle_ondetect|pulsestyle_onevent|pure|rand|randc|randcase|randsequence|rcmos|real|realtime|ref|reg|reject_on|release|repeat|restrict|return|rnmos|rpmos|rtran|rtranif0|rtranif1|s_always|s_eventually|s_nexttime|s_until|s_until_with|scalared|sequence|shortint|shortreal|showcancelled|signed|small|solve|specify|specparam|static|string|strong|strong0|strong1|struct|super|supply0|supply1|sync_accept_on|sync_reject_on|table|tagged|task|this|throughout|time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|type|typedef|union|unique|unique0|unsigned|until|until_with|untyped|use|uwire|var|vectored|virtual|void|wait|wait_order|wand|weak|weak0|weak1|while|wildcard|wire|with|within|wor|xnor|xor)\b" is(keyword)
|
48
|
+
r"(`__FILE__|`__LINE__|`begin_keywords|`celldefine|`default_nettype|`define|`else|`elsif|`end_keywords|`endcelldefine|`endif|`ifdef|`ifndef|`include|`line|`nounconnected_drive|`pragma|`resetall|`timescale|`unconnected_drive|`undef|`undefineall)\b" is(comment.preproc)
|
49
|
+
r"(\$display|\$displayb|\$displayh|\$displayo|\$dumpall|\$dumpfile|\$dumpflush|\$dumplimit|\$dumpoff|\$dumpon|\$dumpports|\$dumpportsall|\$dumpportsflush|\$dumpportslimit|\$dumpportsoff|\$dumpportson|\$dumpvars|\$fclose|\$fdisplay|\$fdisplayb|\$fdisplayh|\$fdisplayo|\$feof|\$ferror|\$fflush|\$fgetc|\$fgets|\$fmonitor|\$fmonitorb|\$fmonitorh|\$fmonitoro|\$fopen|\$fread|\$fscanf|\$fseek|\$fstrobe|\$fstrobeb|\$fstrobeh|\$fstrobeo|\$ftell|\$fwrite|\$fwriteb|\$fwriteh|\$fwriteo|\$monitor|\$monitorb|\$monitorh|\$monitoro|\$monitoroff|\$monitoron|\$plusargs|\$readmemb|\$readmemh|\$rewind|\$sformat|\$sformatf|\$sscanf|\$strobe|\$strobeb|\$strobeh|\$strobeo|\$swrite|\$swriteb|\$swriteh|\$swriteo|\$test|\$ungetc|\$value\$plusargs|\$write|\$writeb|\$writeh|\$writememb|\$writememh|\$writeo)\b" is(name.builtin)
|
50
|
+
r"(class)(\s+)" is(by-groups(keyword, text)) -> go-to(classname)
|
51
|
+
r"(byte|shortint|int|longint|integer|time|bit|logic|reg|supply0|supply1|tri|triand|trior|tri0|tri1|trireg|uwire|wire|wand|worshortreal|real|realtime)\b" is(keyword.type)
|
52
|
+
r"[a-zA-Z_][a-zA-Z0-9_]*:(?!:)" is(name.label)
|
53
|
+
r"[a-zA-Z_][a-zA-Z0-9_]*" is(name)
|
54
|
+
|
55
|
+
lex(string):
|
56
|
+
r"\"" is(literal.string) -> pop
|
57
|
+
r"\\([\\abfnrtv\"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})" is(literal.string.escape)
|
58
|
+
r"[^\\\"\n]+" is(literal.string)
|
59
|
+
r"\\\n" is(literal.string)
|
60
|
+
r"\\" is(literal.string)
|
61
|
+
|
62
|
+
lex(import):
|
63
|
+
r"[a-zA-Z0-9_:]+\*?" is(name.namespace) -> pop
|
64
|
+
|
65
|
+
const-set(.Lexer, lexer)
|