highlighter-0.1: src/Text/Highlighter/Lexers/Haxe.hs
module Text.Highlighter.Lexers.Haxe (lexer) where
import Text.Regex.PCRE.Light
import Text.Highlighter.Types
lexer :: Lexer
lexer = Lexer
{ lName = "\104\97\88\101"
, lAliases = ["\104\120", "\104\97\88\101"]
, lExtensions = ["\46\104\120"]
, lMimetypes = ["\116\101\120\116\47\104\97\120\101"]
, lStart = root'
, lFlags = [multiline, dotall]
}
anonfundef' :: TokenMatcher
anonfundef' =
[ tokNext "\92\98\102\117\110\99\116\105\111\110\92\98" (Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\68\101\99\108\97\114\97\116\105\111\110") (GoTo fundecl')
]
instancefundef' :: TokenMatcher
instancefundef' =
[ tok "\40\63\58\112\117\98\108\105\99\124\112\114\105\118\97\116\101\124\111\118\101\114\114\105\100\101\124\115\116\97\116\105\99\124\105\110\108\105\110\101\124\101\120\116\101\114\110\124\100\121\110\97\109\105\99\41" (Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\68\101\99\108\97\114\97\116\105\111\110")
, tokNext "\92\98\40\102\117\110\99\116\105\111\110\41\40\92\115\43\41\40\40\63\58\91\97\45\122\65\45\90\95\93\91\97\45\122\65\45\90\48\45\57\95\93\42\41\41" (ByGroups [(Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\68\101\99\108\97\114\97\116\105\111\110"), (Arbitrary "\84\101\120\116"), (Arbitrary "\78\97\109\101" :. Arbitrary "\70\117\110\99\116\105\111\110")]) (GoTo fundecl')
]
typedecl' :: TokenMatcher
typedecl' =
[ anyOf whitespace'
, tok "\40\63\58\40\63\58\91\97\45\122\48\45\57\95\92\46\93\41\42\91\65\45\90\95\93\91\65\45\90\97\45\122\48\45\57\95\93\42\41" (Arbitrary "\78\97\109\101" :. Arbitrary "\67\108\97\115\115")
, tokNext "\60" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") (GoTo generictypedecl')
, tokNext "\40\63\61\91\123\125\40\41\61\44\97\45\122\93\41" (Arbitrary "\84\101\120\116") Pop
]
typedefbody' :: TokenMatcher
typedefbody' =
[ anyOf whitespace'
, anyOf instancevardef'
, anyOf instancefundef'
, tokNext "\62" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") (GoTo typedecl')
, tok "\44" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110")
, tokNext "\125" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") Pop
]
classdefbody' :: TokenMatcher
classdefbody' =
[ anyOf whitespace'
, anyOf instancevardef'
, anyOf instancefundef'
, tokNext "\125" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") Pop
, anyOf codeblock'
]
fundecl' :: TokenMatcher
fundecl' =
[ anyOf whitespace'
, anyOf typelabel'
, anyOf generictypedecl'
, tokNext "\92\40" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") (GoTo funargdecl')
, tokNext "\40\63\61\91\97\45\122\65\45\90\48\45\57\95\93\41" (Arbitrary "\84\101\120\116") Pop
, tokNext "\123" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") (DoAll [Pop, (GoTo codeblock')])
, tokNext "\59" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") Pop
]
interfacedef' :: TokenMatcher
interfacedef' =
[ tokNext "\105\110\116\101\114\102\97\99\101" (Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\68\101\99\108\97\114\97\116\105\111\110") (DoAll [(GoTo interfacedefprebody'), (GoTo typedecl')])
]
codekeywords' :: TokenMatcher
codekeywords' =
[ tok "\92\98\40\105\102\124\101\108\115\101\124\119\104\105\108\101\124\100\111\124\102\111\114\124\105\110\124\98\114\101\97\107\124\99\111\110\116\105\110\117\101\124\114\101\116\117\114\110\124\115\119\105\116\99\104\124\99\97\115\101\124\116\114\121\124\99\97\116\99\104\124\116\104\114\111\119\124\110\117\108\108\124\116\114\97\99\101\124\110\101\119\124\116\104\105\115\124\115\117\112\101\114\124\117\110\116\121\112\101\100\124\99\97\115\116\124\99\97\108\108\98\97\99\107\124\104\101\114\101\41\92\98" (Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\82\101\115\101\114\118\101\100")
]
enumdefbody' :: TokenMatcher
enumdefbody' =
[ anyOf whitespace'
, tok "\40\63\58\91\97\45\122\65\45\90\95\93\91\97\45\122\65\45\90\48\45\57\95\93\42\41" (Arbitrary "\78\97\109\101" :. Arbitrary "\86\97\114\105\97\98\108\101" :. Arbitrary "\73\110\115\116\97\110\99\101")
, tokNext "\92\40" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") (GoTo funargdecl')
, tok "\59" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110")
, tokNext "\125" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") Pop
]
typedefprebody' :: TokenMatcher
typedefprebody' =
[ anyOf whitespace'
, tokNext "\40\61\41\40\92\115\42\41\40\123\41" (ByGroups [(Arbitrary "\80\117\110\99\116\117\97\116\105\111\110"), (Arbitrary "\84\101\120\116"), (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110")]) (DoAll [Pop, (GoTo typedefbody')])
]
classdef' :: TokenMatcher
classdef' =
[ tokNext "\99\108\97\115\115" (Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\68\101\99\108\97\114\97\116\105\111\110") (DoAll [(GoTo classdefprebody'), (GoTo typedecl')])
]
generictypedecl' :: TokenMatcher
generictypedecl' =
[ anyOf whitespace'
, tok "\40\63\58\40\63\58\91\97\45\122\48\45\57\95\92\46\93\41\42\91\65\45\90\95\93\91\65\45\90\97\45\122\48\45\57\95\93\42\41" (Arbitrary "\78\97\109\101" :. Arbitrary "\67\108\97\115\115")
, tokNext "\60" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") Push
, tokNext "\62" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") Pop
, tok "\44" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110")
]
instancevardecl' :: TokenMatcher
instancevardecl' =
[ anyOf vardecl'
, anyOf propertydef'
]
classdefprebody' :: TokenMatcher
classdefprebody' =
[ anyOf whitespace'
, tokNext "\40\101\120\116\101\110\100\115\124\105\109\112\108\101\109\101\110\116\115\41" (Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\68\101\99\108\97\114\97\116\105\111\110") (GoTo typedecl')
, tokNext "\123" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") (DoAll [Pop, (GoTo classdefbody')])
]
vardef' :: TokenMatcher
vardef' =
[ tokNext "\92\98\40\118\97\114\41\40\92\115\43\41\40\40\63\58\91\97\45\122\65\45\90\95\93\91\97\45\122\65\45\90\48\45\57\95\93\42\41\41" (ByGroups [(Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\68\101\99\108\97\114\97\116\105\111\110"), (Arbitrary "\84\101\120\116"), (Arbitrary "\78\97\109\101" :. Arbitrary "\86\97\114\105\97\98\108\101")]) (GoTo vardecl')
]
propertydef' :: TokenMatcher
propertydef' =
[ tok "\40\92\40\41\40\40\63\58\100\101\102\97\117\108\116\124\110\117\108\108\124\110\101\118\101\114\41\41\40\44\41\40\40\63\58\100\101\102\97\117\108\116\124\110\117\108\108\124\110\101\118\101\114\41\41\40\92\41\41" (ByGroups [(Arbitrary "\80\117\110\99\116\117\97\116\105\111\110"), (Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\82\101\115\101\114\118\101\100"), (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110"), (Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\82\101\115\101\114\118\101\100"), (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110")])
]
codeblock' :: TokenMatcher
codeblock' =
[ anyOf whitespace'
, anyOf new'
, anyOf case'
, anyOf anonfundef'
, anyOf literals'
, anyOf vardef'
, anyOf codekeywords'
, tok "\91\40\41\59\44\92\91\92\93\93" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110")
, tok "\40\63\58\61\124\92\43\61\124\45\61\124\92\42\61\124\47\61\124\37\61\124\38\61\124\92\124\61\124\92\94\61\124\60\60\61\124\62\62\61\124\62\62\62\61\124\92\124\92\124\124\38\38\124\92\46\92\46\92\46\124\61\61\124\33\61\124\62\124\60\124\62\61\124\60\61\124\92\124\124\38\124\92\94\124\60\60\124\62\62\124\62\62\62\124\92\43\124\92\45\124\92\42\124\47\124\37\124\33\124\92\43\92\43\124\92\45\92\45\124\126\124\92\46\124\92\63\124\92\58\41" (Arbitrary "\79\112\101\114\97\116\111\114")
, tok "\40\63\58\91\97\45\122\65\45\90\95\93\91\97\45\122\65\45\90\48\45\57\95\93\42\41" (Arbitrary "\78\97\109\101")
, tokNext "\125" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") Pop
, tokNext "\123" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") Push
]
case' :: TokenMatcher
case' =
[ tokNext "\92\98\40\99\97\115\101\41\40\92\115\43\41\40\40\63\58\91\97\45\122\65\45\90\95\93\91\97\45\122\65\45\90\48\45\57\95\93\42\41\41\40\92\115\42\41\40\92\40\41" (ByGroups [(Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\82\101\115\101\114\118\101\100"), (Arbitrary "\84\101\120\116"), (Arbitrary "\78\97\109\101"), (Arbitrary "\84\101\120\116"), (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110")]) (GoTo funargdecl')
]
enumdefprebody' :: TokenMatcher
enumdefprebody' =
[ anyOf whitespace'
, tokNext "\123" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") (DoAll [Pop, (GoTo enumdefbody')])
]
typedef' :: TokenMatcher
typedef' =
[ tokNext "\116\121\112\101\100\101\102" (Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\68\101\99\108\97\114\97\116\105\111\110") (DoAll [(GoTo typedefprebody'), (GoTo typedecl')])
]
instancevardef' :: TokenMatcher
instancevardef' =
[ tok "\40\63\58\112\117\98\108\105\99\124\112\114\105\118\97\116\101\124\111\118\101\114\114\105\100\101\124\115\116\97\116\105\99\124\105\110\108\105\110\101\124\101\120\116\101\114\110\124\100\121\110\97\109\105\99\41" (Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\68\101\99\108\97\114\97\116\105\111\110")
, tokNext "\92\98\40\118\97\114\41\40\92\115\43\41\40\40\63\58\91\97\45\122\65\45\90\95\93\91\97\45\122\65\45\90\48\45\57\95\93\42\41\41" (ByGroups [(Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\68\101\99\108\97\114\97\116\105\111\110"), (Arbitrary "\84\101\120\116"), (Arbitrary "\78\97\109\101" :. Arbitrary "\86\97\114\105\97\98\108\101" :. Arbitrary "\73\110\115\116\97\110\99\101")]) (GoTo instancevardecl')
]
literals' :: TokenMatcher
literals' =
[ tok "\48\91\120\88\93\91\48\45\57\97\45\102\65\45\70\93\43" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\78\117\109\98\101\114" :. Arbitrary "\72\101\120")
, tok "\91\48\45\57\93\43" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\78\117\109\98\101\114" :. Arbitrary "\73\110\116\101\103\101\114")
, tok "\91\48\45\57\93\91\48\45\57\93\42\92\46\91\48\45\57\93\43\40\91\101\69\93\91\48\45\57\93\43\41\63\91\102\100\93\63" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\78\117\109\98\101\114" :. Arbitrary "\70\108\111\97\116")
, tok "\39\40\92\92\92\92\124\92\92\39\124\91\94\39\93\41\42\39" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\83\116\114\105\110\103" :. Arbitrary "\83\105\110\103\108\101")
, tok "\34\40\92\92\92\92\124\92\92\34\124\91\94\34\93\41\42\34" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\83\116\114\105\110\103" :. Arbitrary "\68\111\117\98\108\101")
, tok "\126\47\40\91\94\92\110\93\41\42\63\47\91\103\105\115\120\93\42" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\83\116\114\105\110\103" :. Arbitrary "\82\101\103\101\120")
, tok "\92\98\40\116\114\117\101\124\102\97\108\115\101\124\110\117\108\108\41\92\98" (Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\67\111\110\115\116\97\110\116")
]
whitespace' :: TokenMatcher
whitespace' =
[ anyOf comments'
, tok "\92\115\43" (Arbitrary "\84\101\120\116")
]
interfacedefprebody' :: TokenMatcher
interfacedefprebody' =
[ anyOf whitespace'
, tokNext "\40\101\120\116\101\110\100\115\41" (Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\68\101\99\108\97\114\97\116\105\111\110") (GoTo typedecl')
, tokNext "\123" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") (DoAll [Pop, (GoTo classdefbody')])
]
type' :: TokenMatcher
type' =
[ anyOf whitespace'
, tok "\40\63\58\40\63\58\91\97\45\122\48\45\57\95\92\46\93\41\42\91\65\45\90\95\93\91\65\45\90\97\45\122\48\45\57\95\93\42\41" (Arbitrary "\78\97\109\101" :. Arbitrary "\67\108\97\115\115")
, tokNext "\60" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") (GoTo generictypedecl')
, tok "\45\62" (Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\84\121\112\101")
, tokNext "\40\63\61\91\123\125\40\41\44\59\61\93\41" (Arbitrary "\84\101\120\116") Pop
]
vardecl' :: TokenMatcher
vardecl' =
[ anyOf whitespace'
, anyOf typelabel'
, tokNext "\61" (Arbitrary "\79\112\101\114\97\116\111\114") Pop
, tokNext "\59" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") Pop
]
comments' :: TokenMatcher
comments' =
[ tok "\47\47\46\42\63\92\110" (Arbitrary "\67\111\109\109\101\110\116" :. Arbitrary "\83\105\110\103\108\101")
, tok "\47\92\42\46\42\63\92\42\47" (Arbitrary "\67\111\109\109\101\110\116" :. Arbitrary "\77\117\108\116\105\108\105\110\101")
, tok "\35\91\94\92\110\93\42" (Arbitrary "\67\111\109\109\101\110\116" :. Arbitrary "\80\114\101\112\114\111\99")
]
enumdef' :: TokenMatcher
enumdef' =
[ tokNext "\101\110\117\109" (Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\68\101\99\108\97\114\97\116\105\111\110") (DoAll [(GoTo enumdefprebody'), (GoTo typedecl')])
]
imports' :: TokenMatcher
imports' =
[ tok "\40\112\97\99\107\97\103\101\124\105\109\112\111\114\116\124\117\115\105\110\103\41\40\92\115\43\41\40\91\94\59\93\43\41\40\59\41" (ByGroups [(Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\78\97\109\101\115\112\97\99\101"), (Arbitrary "\84\101\120\116"), (Arbitrary "\78\97\109\101" :. Arbitrary "\78\97\109\101\115\112\97\99\101"), (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110")])
]
new' :: TokenMatcher
new' =
[ tokNext "\92\98\110\101\119\92\98" (Arbitrary "\75\101\121\119\111\114\100") (GoTo typedecl')
]
typelabel' :: TokenMatcher
typelabel' =
[ tokNext "\58" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") (GoTo type')
]
root' :: TokenMatcher
root' =
[ anyOf whitespace'
, anyOf comments'
, tok "\40\63\58\112\117\98\108\105\99\124\112\114\105\118\97\116\101\124\111\118\101\114\114\105\100\101\124\115\116\97\116\105\99\124\105\110\108\105\110\101\124\101\120\116\101\114\110\124\100\121\110\97\109\105\99\41" (Arbitrary "\75\101\121\119\111\114\100" :. Arbitrary "\68\101\99\108\97\114\97\116\105\111\110")
, anyOf enumdef'
, anyOf typedef'
, anyOf classdef'
, anyOf imports'
]
funargdecl' :: TokenMatcher
funargdecl' =
[ anyOf whitespace'
, tok "\40\63\58\91\97\45\122\65\45\90\95\93\91\97\45\122\65\45\90\48\45\57\95\93\42\41" (Arbitrary "\78\97\109\101" :. Arbitrary "\86\97\114\105\97\98\108\101")
, anyOf typelabel'
, anyOf literals'
, tok "\61" (Arbitrary "\79\112\101\114\97\116\111\114")
, tok "\44" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110")
, tok "\92\63" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110")
, tokNext "\92\41" (Arbitrary "\80\117\110\99\116\117\97\116\105\111\110") Pop
]