lexer unknown token passthrough

This commit is contained in:
Sven Vogel 2024-05-14 12:27:21 +02:00
parent 02e7c2775b
commit fa8c97d84f
2 changed files with 4 additions and 1 deletions

3
.gitignore vendored
View File

@ -15,3 +15,6 @@ parser.tab.c
parser.tab.h
build
/Testing/
CTestTestfile.cmake
DartConfiguration.tcl
*.cmake

View File

@ -94,5 +94,5 @@
\"([^\"\n])*\" {DEBUG("\"%s\" tokenized with \'ValStr\'", yytext); yylval.string = strdup(yytext); return(ValStr);};
\"\"\"([^\"\n]|\\\n)*\"\"\" {DEBUG("\"%s\" tokenized with \'ValMultistr\'", yytext); yylval.string = strdup(yytext); return(ValMultistr);};
[ \r\t] { /* ignore whitespace */ };
. { };
. { return yytext[0]; /* passthrough unknown token, let parser handle the error */ };
%%