diff options
author | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-09-18 17:29:56 +0100 |
---|---|---|
committer | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-09-18 17:29:56 +0100 |
commit | 3622810ea7ca5d42694313810b9f0c2557711475 (patch) | |
tree | a8708ea4aa4bc153d115281d508765c0d817012a /Lexer.x | |
parent | eca89acee00faf6e9ef55d84780e6eeddf225e5c (diff) |
Ancient Haskell version of jq. Might be useful someday. Maybe.haskell-version
Diffstat (limited to 'Lexer.x')
-rw-r--r-- | Lexer.x | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -7,13 +7,14 @@ import Control.Monad.Error $digit = 0-9 $alpha = [a-zA-Z_] -@reserved = "."|"["|"]"|","|":"|"("|")"|"{"|"}"|"|"|"=="|"+" +@reserved = "."|"["|"]"|","|":"|"("|")"|"{"|"}"|"|"|"=="|"+"|"="|"$"|"def"|";"|"else"|"and"|"or"|"as" @ident = $alpha [$alpha $digit]* @string = \" ($printable)* \" tokens :- +<0> "#" ($printable # [\n\r])* ; <0> $white+ ; <0> @reserved { tok TRes } <0> @ident { tok TIdent } |