From 61b26469a7898930fd30ab2432d25105d1a57e22 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Thu, 22 Sep 2022 14:40:15 +0200 Subject: Initial commit --- scanner/marcus.l | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 scanner/marcus.l (limited to 'scanner/marcus.l') 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"); } + +%% + -- cgit v1.2.3