summaryrefslogtreecommitdiff
path: root/toks.m
diff options
context:
space:
mode:
Diffstat (limited to 'toks.m')
-rwxr-xr-xtoks.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/toks.m b/toks.m
new file mode 100755
index 0000000..1906c1c
--- /dev/null
+++ b/toks.m
@@ -0,0 +1,9 @@
+tok ::= ID [char] posn | CHAR char posn
+posn == (num,num)
+
+analyse =
+%lex
+letter = `a-z\xfff\&A-Z-`
+letter+ -> ID $$ $#
+. -> CHAR (hd $$) $#
+%%