Ancient Haskell version of jq. Might be useful someday. Maybe.

This commit is contained in:
Stephen Dolan committed 2012-09-18 17:29:56 +01:00
1 parent eca89acee0
commit 3622810ea7
7 files changed
+269 -46

No files matched your search

+2 -1
View File
@@ -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 }