diff options
author | Greg Brown <gmb60@cam.ac.uk> | 2021-01-08 18:01:23 +0000 |
---|---|---|
committer | Greg Brown <gmb60@cam.ac.uk> | 2021-01-08 18:01:23 +0000 |
commit | eda4791472f5bf8daeba342efe97dc0977666613 (patch) | |
tree | cd10f6b19bd0657792dcba21af56dc9c497bd734 /autochomp/src/nibble.nb | |
parent | 0a837400e0ffa7fca1a1902b34f375d0dc5b5f6b (diff) |
Minor fix-ups to AutoChomp
Diffstat (limited to 'autochomp/src/nibble.nb')
-rw-r--r-- | autochomp/src/nibble.nb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/autochomp/src/nibble.nb b/autochomp/src/nibble.nb index fed3d46..d454adf 100644 --- a/autochomp/src/nibble.nb +++ b/autochomp/src/nibble.nb @@ -5,8 +5,8 @@ let star_(base, step) = [rec](base | step . rec); let Pattern_Whitespace = "\t"|"\n"|"\x0B"|"\x0c"|"\r"|" "|"\u{85}"|"\u{200e}"|"\u{200f}"|"\u{2028}"|"\u{2029}"; -let digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"; -let oct_digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7"; +let oct_digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" ; +let digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"; let hex_digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "A" | "B" | "C" | "D" | "E" | "F" ; @@ -42,8 +42,8 @@ let literal_char = let ws = plus(Pattern_Whitespace); -let punctuated(x, p) = [rec](x . opt(p . opt(ws) . opt(rec))); -let list(x) = "(" . opt(ws) . punctuated(x, ",") . ")"; +let punctuated(x, p) = [rec](x . opt(p . opt(ws) . rec)); +let list(x) = "(" . opt(ws) . [rec](x . opt("," . opt(ws) . opt(rec))) . ")"; let epsilon = "_"; let ident = XID_Start . star(XID_Continue); |