highlighter-0.1: src/Text/Highlighter/Lexers/Tcl.hs
module Text.Highlighter.Lexers.Tcl (lexer) where
import Text.Regex.PCRE.Light
import Text.Highlighter.Types
lexer :: Lexer
lexer = Lexer
{ lName = "\84\99\108"
, lAliases = ["\116\99\108"]
, lExtensions = ["\46\116\99\108"]
, lMimetypes = ["\116\101\120\116\47\120\45\116\99\108", "\116\101\120\116\47\120\45\115\99\114\105\112\116\46\116\99\108", "\97\112\112\108\105\99\97\116\105\111\110\47\120\45\116\99\108"]
, lStart = root'
, lFlags = [multiline]
}
comment' :: TokenMatcher
comment' =
[ tokNext "\46\42\91\94\92\92\93\92\110" (Arbitrary "\67\111\109\109\101\110\116") Pop
, tok "\46\42\92\92\92\110" (Arbitrary "\67\111\109\109\101\110\116")
]
stringSquare' :: TokenMatcher
stringSquare' =
[ tokNext "\92\91" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\83\116\114\105\110\103" :. Arbitrary "\68\111\117\98\108\101") (GoTo stringSquare')
, tok "\40\63\115\41\40\92\92\92\92\124\92\92\91\48\45\55\93\43\124\92\92\46\124\92\92\92\110\124\91\94\92\93\92\92\93\41" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\83\116\114\105\110\103" :. Arbitrary "\68\111\117\98\108\101")
, tokNext "\92\93" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\83\116\114\105\110\103" :. Arbitrary "\68\111\117\98\108\101") Pop
]
string' :: TokenMatcher
string' =
[ tokNext "\92\91" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\83\116\114\105\110\103" :. Arbitrary "\68\111\117\98\108\101") (GoTo stringSquare')
, tok "\40\63\115\41\40\92\92\92\92\124\92\92\91\48\45\55\93\43\124\92\92\46\124\91\94\34\92\92\93\41" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\83\116\114\105\110\103" :. Arbitrary "\68\111\117\98\108\101")
, tokNext "\34" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\83\116\114\105\110\103" :. Arbitrary "\68\111\117\98\108\101") Pop
]
commandInParen' :: TokenMatcher
commandInParen' =
[ tokNext "\92\98\40\97\102\116\101\114\124\97\112\112\108\121\124\97\114\114\97\121\124\98\114\101\97\107\124\99\97\116\99\104\124\99\111\110\116\105\110\117\101\124\101\108\115\101\105\102\124\101\108\115\101\124\101\114\114\111\114\124\101\118\97\108\124\101\120\112\114\124\102\111\114\124\102\111\114\101\97\99\104\124\103\108\111\98\97\108\124\105\102\124\110\97\109\101\115\112\97\99\101\124\112\114\111\99\124\114\101\110\97\109\101\124\114\101\116\117\114\110\124\115\101\116\124\115\119\105\116\99\104\124\116\104\101\110\124\116\114\97\99\101\124\117\110\115\101\116\124\117\112\100\97\116\101\124\117\112\108\101\118\101\108\124\117\112\118\97\114\124\118\97\114\105\97\98\108\101\124\118\119\97\105\116\124\119\104\105\108\101\41\92\98" (Arbitrary "\75\101\121\119\111\114\100") (GoTo paramsInParen')
, tokNext "\92\98\40\97\112\112\101\110\100\124\98\103\101\114\114\111\114\124\98\105\110\97\114\121\124\99\100\124\99\104\97\110\124\99\108\111\99\107\124\99\108\111\115\101\124\99\111\110\99\97\116\124\100\100\101\124\100\105\99\116\124\101\110\99\111\100\105\110\103\124\101\111\102\124\101\120\101\99\124\101\120\105\116\124\102\98\108\111\99\107\101\100\124\102\99\111\110\102\105\103\117\114\101\124\102\99\111\112\121\124\102\105\108\101\124\102\105\108\101\101\118\101\110\116\124\102\108\117\115\104\124\102\111\114\109\97\116\124\103\101\116\115\124\103\108\111\98\124\104\105\115\116\111\114\121\124\104\116\116\112\124\105\110\99\114\124\105\110\102\111\124\105\110\116\101\114\112\124\106\111\105\110\124\108\97\112\112\101\110\100\124\108\97\115\115\105\103\110\124\108\105\110\100\101\120\124\108\105\110\115\101\114\116\124\108\105\115\116\124\108\108\101\110\103\116\104\124\108\111\97\100\124\108\111\97\100\84\107\124\108\114\97\110\103\101\124\108\114\101\112\101\97\116\124\108\114\101\112\108\97\99\101\124\108\114\101\118\101\114\115\101\124\108\115\101\97\114\99\104\124\108\115\101\116\124\108\115\111\114\116\124\109\97\116\104\102\117\110\99\124\109\97\116\104\111\112\124\109\101\109\111\114\121\124\109\115\103\99\97\116\124\111\112\101\110\124\112\97\99\107\97\103\101\124\112\105\100\124\112\107\103\58\58\99\114\101\97\116\101\124\112\107\103\95\109\107\73\110\100\101\120\124\112\108\97\116\102\111\114\109\124\112\108\97\116\102\111\114\109\58\58\115\104\101\108\108\124\112\117\116\115\124\112\119\100\124\114\101\95\115\121\110\116\97\120\124\114\101\97\100\124\114\101\102\99\104\97\110\124\114\101\103\101\120\112\124\114\101\103\105\115\116\114\121\124\114\101\103\115\117\98\124\115\99\97\110\124\115\101\101\107\124\115\111\99\107\101\116\124\115\111\117\114\99\101\124\115\112\108\105\116\124\115\116\114\105\110\103\124\115\117\98\115\116\124\116\101\108\108\124\116\105\109\101\124\116\109\124\117\110\107\110\111\119\110\124\117\110\108\111\97\100\41\92\98" (Arbitrary "\78\97\109\101" :. Arbitrary "\66\117\105\108\116\105\110") (GoTo paramsInParen')
, tokNext "\40\91\92\119\92\46\92\45\93\43\41" (Arbitrary "\78\97\109\101" :. Arbitrary "\86\97\114\105\97\98\108\101") (GoTo paramsInParen')
, tokNext "\35" (Arbitrary "\67\111\109\109\101\110\116") (GoTo comment')
]
data' :: TokenMatcher
data' =
[ tok "\92\115\43" (Arbitrary "\84\101\120\116")
, tok "\48\120\91\97\45\102\65\45\70\48\45\57\93\43" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\78\117\109\98\101\114" :. Arbitrary "\72\101\120")
, tok "\48\91\48\45\55\93\43" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\78\117\109\98\101\114" :. Arbitrary "\79\99\116")
, tok "\92\100\43\92\46\92\100\43" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\78\117\109\98\101\114" :. Arbitrary "\70\108\111\97\116")
, tok "\92\100\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 "\92\36\40\91\92\119\92\46\92\45\92\58\93\43\41" (Arbitrary "\78\97\109\101" :. Arbitrary "\86\97\114\105\97\98\108\101")
, tok "\40\91\92\119\92\46\92\45\92\58\93\43\41" (Arbitrary "\84\101\120\116")
]
brace' :: TokenMatcher
brace' =
[ tokNext "\125" (Arbitrary "\75\101\121\119\111\114\100") Pop
, anyOf commandInBrace'
, anyOf basic'
, anyOf data'
]
paren' :: TokenMatcher
paren' =
[ tokNext "\92\41" (Arbitrary "\75\101\121\119\111\114\100") Pop
, anyOf commandInParen'
, anyOf basic'
, anyOf data'
]
paramsInParen' :: TokenMatcher
paramsInParen' =
[ tokNext "\92\41" (Arbitrary "\75\101\121\119\111\114\100") (DoAll [Pop, Pop])
, anyOf params'
]
bracket' :: TokenMatcher
bracket' =
[ tokNext "\92\93" (Arbitrary "\75\101\121\119\111\114\100") Pop
, anyOf commandInBracket'
, anyOf basic'
, anyOf data'
]
command' :: TokenMatcher
command' =
[ tokNext "\92\98\40\97\102\116\101\114\124\97\112\112\108\121\124\97\114\114\97\121\124\98\114\101\97\107\124\99\97\116\99\104\124\99\111\110\116\105\110\117\101\124\101\108\115\101\105\102\124\101\108\115\101\124\101\114\114\111\114\124\101\118\97\108\124\101\120\112\114\124\102\111\114\124\102\111\114\101\97\99\104\124\103\108\111\98\97\108\124\105\102\124\110\97\109\101\115\112\97\99\101\124\112\114\111\99\124\114\101\110\97\109\101\124\114\101\116\117\114\110\124\115\101\116\124\115\119\105\116\99\104\124\116\104\101\110\124\116\114\97\99\101\124\117\110\115\101\116\124\117\112\100\97\116\101\124\117\112\108\101\118\101\108\124\117\112\118\97\114\124\118\97\114\105\97\98\108\101\124\118\119\97\105\116\124\119\104\105\108\101\41\92\98" (Arbitrary "\75\101\121\119\111\114\100") (GoTo params')
, tokNext "\92\98\40\97\112\112\101\110\100\124\98\103\101\114\114\111\114\124\98\105\110\97\114\121\124\99\100\124\99\104\97\110\124\99\108\111\99\107\124\99\108\111\115\101\124\99\111\110\99\97\116\124\100\100\101\124\100\105\99\116\124\101\110\99\111\100\105\110\103\124\101\111\102\124\101\120\101\99\124\101\120\105\116\124\102\98\108\111\99\107\101\100\124\102\99\111\110\102\105\103\117\114\101\124\102\99\111\112\121\124\102\105\108\101\124\102\105\108\101\101\118\101\110\116\124\102\108\117\115\104\124\102\111\114\109\97\116\124\103\101\116\115\124\103\108\111\98\124\104\105\115\116\111\114\121\124\104\116\116\112\124\105\110\99\114\124\105\110\102\111\124\105\110\116\101\114\112\124\106\111\105\110\124\108\97\112\112\101\110\100\124\108\97\115\115\105\103\110\124\108\105\110\100\101\120\124\108\105\110\115\101\114\116\124\108\105\115\116\124\108\108\101\110\103\116\104\124\108\111\97\100\124\108\111\97\100\84\107\124\108\114\97\110\103\101\124\108\114\101\112\101\97\116\124\108\114\101\112\108\97\99\101\124\108\114\101\118\101\114\115\101\124\108\115\101\97\114\99\104\124\108\115\101\116\124\108\115\111\114\116\124\109\97\116\104\102\117\110\99\124\109\97\116\104\111\112\124\109\101\109\111\114\121\124\109\115\103\99\97\116\124\111\112\101\110\124\112\97\99\107\97\103\101\124\112\105\100\124\112\107\103\58\58\99\114\101\97\116\101\124\112\107\103\95\109\107\73\110\100\101\120\124\112\108\97\116\102\111\114\109\124\112\108\97\116\102\111\114\109\58\58\115\104\101\108\108\124\112\117\116\115\124\112\119\100\124\114\101\95\115\121\110\116\97\120\124\114\101\97\100\124\114\101\102\99\104\97\110\124\114\101\103\101\120\112\124\114\101\103\105\115\116\114\121\124\114\101\103\115\117\98\124\115\99\97\110\124\115\101\101\107\124\115\111\99\107\101\116\124\115\111\117\114\99\101\124\115\112\108\105\116\124\115\116\114\105\110\103\124\115\117\98\115\116\124\116\101\108\108\124\116\105\109\101\124\116\109\124\117\110\107\110\111\119\110\124\117\110\108\111\97\100\41\92\98" (Arbitrary "\78\97\109\101" :. Arbitrary "\66\117\105\108\116\105\110") (GoTo params')
, tokNext "\40\91\92\119\92\46\92\45\93\43\41" (Arbitrary "\78\97\109\101" :. Arbitrary "\86\97\114\105\97\98\108\101") (GoTo params')
, tokNext "\35" (Arbitrary "\67\111\109\109\101\110\116") (GoTo comment')
]
params' :: TokenMatcher
params' =
[ tokNext "\59" (Arbitrary "\75\101\121\119\111\114\100") Pop
, tokNext "\92\110" (Arbitrary "\84\101\120\116") Pop
, tok "\40\101\108\115\101\124\101\108\115\101\105\102\124\116\104\101\110\41" (Arbitrary "\75\101\121\119\111\114\100")
, anyOf basic'
, anyOf data'
]
basic' :: TokenMatcher
basic' =
[ tokNext "\92\40" (Arbitrary "\75\101\121\119\111\114\100") (GoTo paren')
, tokNext "\92\91" (Arbitrary "\75\101\121\119\111\114\100") (GoTo bracket')
, tokNext "\92\123" (Arbitrary "\75\101\121\119\111\114\100") (GoTo brace')
, tokNext "\34" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\83\116\114\105\110\103" :. Arbitrary "\68\111\117\98\108\101") (GoTo string')
, tok "\40\101\113\124\110\101\124\105\110\124\110\105\41\92\98" (Arbitrary "\79\112\101\114\97\116\111\114" :. Arbitrary "\87\111\114\100")
, tok "\33\61\124\61\61\124\60\60\124\62\62\124\60\61\124\62\61\124\38\38\124\92\124\92\124\124\92\42\92\42\124\91\45\43\126\33\42\47\37\60\62\38\94\124\63\58\93" (Arbitrary "\79\112\101\114\97\116\111\114")
]
paramsInBracket' :: TokenMatcher
paramsInBracket' =
[ tokNext "\92\93" (Arbitrary "\75\101\121\119\111\114\100") (DoAll [Pop, Pop])
, anyOf params'
]
commandInBracket' :: TokenMatcher
commandInBracket' =
[ tokNext "\92\98\40\97\102\116\101\114\124\97\112\112\108\121\124\97\114\114\97\121\124\98\114\101\97\107\124\99\97\116\99\104\124\99\111\110\116\105\110\117\101\124\101\108\115\101\105\102\124\101\108\115\101\124\101\114\114\111\114\124\101\118\97\108\124\101\120\112\114\124\102\111\114\124\102\111\114\101\97\99\104\124\103\108\111\98\97\108\124\105\102\124\110\97\109\101\115\112\97\99\101\124\112\114\111\99\124\114\101\110\97\109\101\124\114\101\116\117\114\110\124\115\101\116\124\115\119\105\116\99\104\124\116\104\101\110\124\116\114\97\99\101\124\117\110\115\101\116\124\117\112\100\97\116\101\124\117\112\108\101\118\101\108\124\117\112\118\97\114\124\118\97\114\105\97\98\108\101\124\118\119\97\105\116\124\119\104\105\108\101\41\92\98" (Arbitrary "\75\101\121\119\111\114\100") (GoTo paramsInBracket')
, tokNext "\92\98\40\97\112\112\101\110\100\124\98\103\101\114\114\111\114\124\98\105\110\97\114\121\124\99\100\124\99\104\97\110\124\99\108\111\99\107\124\99\108\111\115\101\124\99\111\110\99\97\116\124\100\100\101\124\100\105\99\116\124\101\110\99\111\100\105\110\103\124\101\111\102\124\101\120\101\99\124\101\120\105\116\124\102\98\108\111\99\107\101\100\124\102\99\111\110\102\105\103\117\114\101\124\102\99\111\112\121\124\102\105\108\101\124\102\105\108\101\101\118\101\110\116\124\102\108\117\115\104\124\102\111\114\109\97\116\124\103\101\116\115\124\103\108\111\98\124\104\105\115\116\111\114\121\124\104\116\116\112\124\105\110\99\114\124\105\110\102\111\124\105\110\116\101\114\112\124\106\111\105\110\124\108\97\112\112\101\110\100\124\108\97\115\115\105\103\110\124\108\105\110\100\101\120\124\108\105\110\115\101\114\116\124\108\105\115\116\124\108\108\101\110\103\116\104\124\108\111\97\100\124\108\111\97\100\84\107\124\108\114\97\110\103\101\124\108\114\101\112\101\97\116\124\108\114\101\112\108\97\99\101\124\108\114\101\118\101\114\115\101\124\108\115\101\97\114\99\104\124\108\115\101\116\124\108\115\111\114\116\124\109\97\116\104\102\117\110\99\124\109\97\116\104\111\112\124\109\101\109\111\114\121\124\109\115\103\99\97\116\124\111\112\101\110\124\112\97\99\107\97\103\101\124\112\105\100\124\112\107\103\58\58\99\114\101\97\116\101\124\112\107\103\95\109\107\73\110\100\101\120\124\112\108\97\116\102\111\114\109\124\112\108\97\116\102\111\114\109\58\58\115\104\101\108\108\124\112\117\116\115\124\112\119\100\124\114\101\95\115\121\110\116\97\120\124\114\101\97\100\124\114\101\102\99\104\97\110\124\114\101\103\101\120\112\124\114\101\103\105\115\116\114\121\124\114\101\103\115\117\98\124\115\99\97\110\124\115\101\101\107\124\115\111\99\107\101\116\124\115\111\117\114\99\101\124\115\112\108\105\116\124\115\116\114\105\110\103\124\115\117\98\115\116\124\116\101\108\108\124\116\105\109\101\124\116\109\124\117\110\107\110\111\119\110\124\117\110\108\111\97\100\41\92\98" (Arbitrary "\78\97\109\101" :. Arbitrary "\66\117\105\108\116\105\110") (GoTo paramsInBracket')
, tokNext "\40\91\92\119\92\46\92\45\93\43\41" (Arbitrary "\78\97\109\101" :. Arbitrary "\86\97\114\105\97\98\108\101") (GoTo paramsInBracket')
, tokNext "\35" (Arbitrary "\67\111\109\109\101\110\116") (GoTo comment')
]
paramsInBrace' :: TokenMatcher
paramsInBrace' =
[ tokNext "\125" (Arbitrary "\75\101\121\119\111\114\100") (DoAll [Pop, Pop])
, anyOf params'
]
root' :: TokenMatcher
root' =
[ anyOf command'
, anyOf basic'
, anyOf data'
, tok "\125" (Arbitrary "\75\101\121\119\111\114\100")
]
commandInBrace' :: TokenMatcher
commandInBrace' =
[ tokNext "\92\98\40\97\102\116\101\114\124\97\112\112\108\121\124\97\114\114\97\121\124\98\114\101\97\107\124\99\97\116\99\104\124\99\111\110\116\105\110\117\101\124\101\108\115\101\105\102\124\101\108\115\101\124\101\114\114\111\114\124\101\118\97\108\124\101\120\112\114\124\102\111\114\124\102\111\114\101\97\99\104\124\103\108\111\98\97\108\124\105\102\124\110\97\109\101\115\112\97\99\101\124\112\114\111\99\124\114\101\110\97\109\101\124\114\101\116\117\114\110\124\115\101\116\124\115\119\105\116\99\104\124\116\104\101\110\124\116\114\97\99\101\124\117\110\115\101\116\124\117\112\100\97\116\101\124\117\112\108\101\118\101\108\124\117\112\118\97\114\124\118\97\114\105\97\98\108\101\124\118\119\97\105\116\124\119\104\105\108\101\41\92\98" (Arbitrary "\75\101\121\119\111\114\100") (GoTo paramsInBrace')
, tokNext "\92\98\40\97\112\112\101\110\100\124\98\103\101\114\114\111\114\124\98\105\110\97\114\121\124\99\100\124\99\104\97\110\124\99\108\111\99\107\124\99\108\111\115\101\124\99\111\110\99\97\116\124\100\100\101\124\100\105\99\116\124\101\110\99\111\100\105\110\103\124\101\111\102\124\101\120\101\99\124\101\120\105\116\124\102\98\108\111\99\107\101\100\124\102\99\111\110\102\105\103\117\114\101\124\102\99\111\112\121\124\102\105\108\101\124\102\105\108\101\101\118\101\110\116\124\102\108\117\115\104\124\102\111\114\109\97\116\124\103\101\116\115\124\103\108\111\98\124\104\105\115\116\111\114\121\124\104\116\116\112\124\105\110\99\114\124\105\110\102\111\124\105\110\116\101\114\112\124\106\111\105\110\124\108\97\112\112\101\110\100\124\108\97\115\115\105\103\110\124\108\105\110\100\101\120\124\108\105\110\115\101\114\116\124\108\105\115\116\124\108\108\101\110\103\116\104\124\108\111\97\100\124\108\111\97\100\84\107\124\108\114\97\110\103\101\124\108\114\101\112\101\97\116\124\108\114\101\112\108\97\99\101\124\108\114\101\118\101\114\115\101\124\108\115\101\97\114\99\104\124\108\115\101\116\124\108\115\111\114\116\124\109\97\116\104\102\117\110\99\124\109\97\116\104\111\112\124\109\101\109\111\114\121\124\109\115\103\99\97\116\124\111\112\101\110\124\112\97\99\107\97\103\101\124\112\105\100\124\112\107\103\58\58\99\114\101\97\116\101\124\112\107\103\95\109\107\73\110\100\101\120\124\112\108\97\116\102\111\114\109\124\112\108\97\116\102\111\114\109\58\58\115\104\101\108\108\124\112\117\116\115\124\112\119\100\124\114\101\95\115\121\110\116\97\120\124\114\101\97\100\124\114\101\102\99\104\97\110\124\114\101\103\101\120\112\124\114\101\103\105\115\116\114\121\124\114\101\103\115\117\98\124\115\99\97\110\124\115\101\101\107\124\115\111\99\107\101\116\124\115\111\117\114\99\101\124\115\112\108\105\116\124\115\116\114\105\110\103\124\115\117\98\115\116\124\116\101\108\108\124\116\105\109\101\124\116\109\124\117\110\107\110\111\119\110\124\117\110\108\111\97\100\41\92\98" (Arbitrary "\78\97\109\101" :. Arbitrary "\66\117\105\108\116\105\110") (GoTo paramsInBrace')
, tokNext "\40\91\92\119\92\46\92\45\93\43\41" (Arbitrary "\78\97\109\101" :. Arbitrary "\86\97\114\105\97\98\108\101") (GoTo paramsInBrace')
, tokNext "\35" (Arbitrary "\67\111\109\109\101\110\116") (GoTo comment')
]