lex: add support for comments
MODIFY
tests/unit/undef.opt
tests/unit/undef.opt
+; a comment
Name: add undef1
-%r = add undef, 0
+%r = add undef, 1
=>
-%r = undef
+%r = undef ; undef + 1 -> undef
+
+
+Name: add undef2
+%r = add undef, %in
+ =>
+%r = undef ; undef + x -> undef
Name: add2

MODIFY
tools/alive_lexer.re
tools/alive_lexer.re
@@ -84,6 +84,10 @@ re2c:yyfill:check = 0;
YYRESTART();
}
+";" [^\r\n]* {
+ YYRESTART();
+}
+
"Name:" [ \t]* @tag1 [^\r\n]+ {
COPY_STR(tag1 - YYTEXT);
return NAME;

lex: add support for comments