diff options
| author | Felix Perktold <Felix.Perktold@student.uibk.ac.at> | 2025-12-21 00:35:10 +0100 |
|---|---|---|
| committer | Felix Perktold <Felix.Perktold@student.uibk.ac.at> | 2025-12-21 00:35:10 +0100 |
| commit | bb631d0e744fa91c663a7a35195125e36c1139b0 (patch) | |
| tree | 6bee67244cbbbbe5251dcb5aae64e12ee2b190c4 /lisp.l | |
| parent | 41d98bd3fde6fdc4d1550108f8528f8dfcc97206 (diff) | |
remove WHITESPACE token, ignore whitespace in lexer
Diffstat (limited to 'lisp.l')
| -rw-r--r-- | lisp.l | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -7,7 +7,7 @@ int tcnt = 0; %} %% -[[:space:]]+ { printf("%d: WHITESPACE\n", ++tcnt); return WHITESPACE; } +[[:space:]]+ { printf("%d: WHITESPACE\n", tcnt); /*ignore whitespace*/} "(" { printf("%d: LPAREN\n", ++tcnt); return LPAREN; } ")" { printf("%d: RPAREN\n", ++tcnt); return RPAREN; } "\." { printf("%d: DOT\n", ++tcnt); return DOT; } @@ -31,7 +31,7 @@ int tcnt = 0; return STRING; } -[^[:space:]\"()]+ { +[^[:space:]\"().]+ { yylval.strval = strdup(yytext); printf("%d: SYMBOL: %s\n", ++tcnt, yylval.strval); return SYMBOL; |
