aboutsummaryrefslogtreecommitdiff
path: root/scanner/marcus.l
diff options
context:
space:
mode:
Diffstat (limited to 'scanner/marcus.l')
-rw-r--r--scanner/marcus.l16
1 files changed, 16 insertions, 0 deletions
diff --git a/scanner/marcus.l b/scanner/marcus.l
new file mode 100644
index 0000000..e5f613b
--- /dev/null
+++ b/scanner/marcus.l
@@ -0,0 +1,16 @@
+%{
+
+ #include "../parser/marcus.h"
+ #include "marcus.h"
+
+%}
+
+%%
+
+("hi"|"oi")"\n" { return HI; }
+("tchau"|"bye")"\n" { return BYE; }
+[-[]+.,><] { return yytext[0]; }
+. { yyerror("Unknow char"); }
+
+%%
+