module Text.Highlighter.Lexers.Befunge (lexer) where

import Text.Regex.PCRE.Light
import Text.Highlighter.Types

lexer :: Lexer
lexer = Lexer
    { lName = "\66\101\102\117\110\103\101"
    , lAliases = ["\98\101\102\117\110\103\101"]
    , lExtensions = ["\46\98\101\102\117\110\103\101"]
    , lMimetypes = ["\97\112\112\108\105\99\97\116\105\111\110\47\120\45\98\101\102\117\110\103\101"]
    , lStart = root'
    , lFlags = [multiline]
    }

root' :: TokenMatcher
root' =
    [ tok "\91\48\45\57\97\45\102\93" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\78\117\109\98\101\114")
    , tok "\91\92\43\92\42\47\37\33\96\45\93" (Arbitrary "\79\112\101\114\97\116\111\114")
    , tok "\91\60\62\94\118\63\92\91\92\93\114\120\106\107\93" (Arbitrary "\78\97\109\101" :. Arbitrary "\86\97\114\105\97\98\108\101")
    , tok "\91\58\92\92\36\46\44\110\93" (Arbitrary "\78\97\109\101" :. Arbitrary "\66\117\105\108\116\105\110")
    , tok "\91\124\95\109\119\93" (Arbitrary "\75\101\121\119\111\114\100")
    , tok "\91\123\125\93" (Arbitrary "\78\97\109\101" :. Arbitrary "\84\97\103")
    , tok "\34\46\42\63\34" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\83\116\114\105\110\103" :. Arbitrary "\68\111\117\98\108\101")
    , tok "\92\39\46" (Arbitrary "\76\105\116\101\114\97\108" :. Arbitrary "\83\116\114\105\110\103" :. Arbitrary "\83\105\110\103\108\101")
    , tok "\91\35\59\93" (Arbitrary "\67\111\109\109\101\110\116")
    , tok "\91\112\103\38\126\61\64\105\111\116\115\121\93" (Arbitrary "\75\101\121\119\111\114\100")
    , tok "\91\40\41\65\45\90\93" (Arbitrary "\67\111\109\109\101\110\116")
    , tok "\92\115\43" (Arbitrary "\84\101\120\116")
    ]