summaryrefslogtreecommitdiff
path: root/lexer.l
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.l')
-rw-r--r--lexer.l5
1 files changed, 4 insertions, 1 deletions
diff --git a/lexer.l b/lexer.l
index 9a34d66..6b6b121 100644
--- a/lexer.l
+++ b/lexer.l
@@ -55,7 +55,10 @@ EOI [ \t\n#]
<inst>nop/{EOI} { BEGIN(args); return T_NOP; }
{SP}*{COMMENT}?\n { BEGIN(INITIAL); return T_EOL; }
-{SP}*{COMMENT} { BEGIN(INITIAL); return T_SPACE; }
+{SP}*{COMMENT} { BEGIN(INITIAL); return T_EOL; }
{SP}+ { return T_SPACE; }
+<INITIAL><<EOF>> { return 0; }
+<<EOF>> { BEGIN(INITIAL); return T_EOL; }
+
%%