summaryrefslogtreecommitdiff
path: root/ocml.l
diff options
context:
space:
mode:
Diffstat (limited to 'ocml.l')
-rw-r--r--ocml.l18
1 files changed, 18 insertions, 0 deletions
diff --git a/ocml.l b/ocml.l
new file mode 100644
index 0000000..6808935
--- /dev/null
+++ b/ocml.l
@@ -0,0 +1,18 @@
+%{
+#include "ocml.tab.h"
+extern int yylval;
+%}
+
+%%
+[0-9]+ yylval = atoi(yytext); return tNum;
+sk return tSkip;
+ch return tChain;
+sl return tSlip;
+sc return tSingle;
+hdc return tHalfDouble;
+dc return tDouble;
+tr return tTriple;
+\{ return tStartBlock;
+\} return tEndBlock;
+[ \t\n]+ ;
+. return tErr;