summaryrefslogtreecommitdiff
path: root/lisp.l
diff options
context:
space:
mode:
authorFelix Perktold <Felix.Perktold@student.uibk.ac.at>2025-12-23 13:36:33 +0100
committerFelix Perktold <Felix.Perktold@student.uibk.ac.at>2025-12-23 13:36:33 +0100
commitb99be4933bcb850cbaf96f89750e925ecf2e8386 (patch)
treeb9bdfb0ae1a4731f414f1db1d959656a57657f34 /lisp.l
parentfddfed044719c2e8d9664a007b214dacc8a0aa36 (diff)
rename eq? to equal?, fix syntax error on empty newline
Diffstat (limited to 'lisp.l')
-rw-r--r--lisp.l5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp.l b/lisp.l
index fa2203a..cb0453a 100644
--- a/lisp.l
+++ b/lisp.l
@@ -7,8 +7,9 @@ int tcnt = 0;
%}
%%
-[[:space:]]+ { /* ignore whitespace */ }
-";"[^\n]* { /* ignore comment */ }
+[[:space:]&&[^\n]]+ { /* ignore whitespace */ }
+";"[^\n]* { /* ignore comment */ }
+\n { return NLINE; }
"(" { return LPAREN; }
")" { return RPAREN; }
"\." { return DOT; }