X-Git-Url: https://ruin.nu/git/?p=proglang.git;a=blobdiff_plain;f=Lexsyntax.x;h=db7f77e8d80c8e2cae337ee32e606375b8c6b1ac;hp=88f0e2d714f9a304daae1337c4ff2897ccece5a8;hb=HEAD;hpb=565fbd61dca527c23888e08783d0d91cee458524 diff --git a/Lexsyntax.x b/Lexsyntax.x index 88f0e2d..db7f77e 100644 --- a/Lexsyntax.x +++ b/Lexsyntax.x @@ -16,7 +16,7 @@ $i = [$l $d _ '] -- identifier character $u = [\0-\255] -- universal: any character @rsyms = -- symbols and non-identifier-like reserved words - \; | \{ | \} | \= | \( | \) | \+ \+ | \- \- | \- | \! | \< | \< \= | \> | \> \= | \= \= | \! \= | \+ | \* | \/ + \; | \{ | \} | \= | \( | \) | \+ \+ | \- \- | \- | \! | \, | \< | \< \= | \> | \> \= | \= \= | \! \= | \+ | \* | \/ :- "//" [.]* ; -- Toss single line comments @@ -79,7 +79,7 @@ eitherResIdent tv s = treeFind resWords | s > a = treeFind right | s == a = t -resWords = b "print" (b "false" (b "else" (b "bool" N N) N) (b "int" (b "if" N N) N)) (b "true" (b "readInt" (b "readBool" N N) N) (b "while" N N)) +resWords = b "print" (b "false" (b "else" (b "bool" N N) N) (b "int" (b "if" N N) N)) (b "return" (b "readInt" (b "readBool" N N) N) (b "while" (b "true" N N) N)) where b s = B s (TS s) unescapeInitTail :: String -> String