diff options
| author | Felix Perktold <Felix.Perktold@student.uibk.ac.at> | 2025-12-22 00:14:15 +0100 |
|---|---|---|
| committer | Felix Perktold <Felix.Perktold@student.uibk.ac.at> | 2025-12-22 00:14:15 +0100 |
| commit | a7a070371bcc10d0dbf94e503650856ac37ed81d (patch) | |
| tree | 7b2e5968b623d15947bc0537a4ff64a385119f68 /lisp.l | |
| parent | 33b3d80c2dcd12dbf692984e0d736bfa9906a8b5 (diff) | |
add reading from files, add quote shorthand (')
Diffstat (limited to 'lisp.l')
| -rw-r--r-- | lisp.l | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -9,9 +9,10 @@ int tcnt = 0; %% [[:space:]]+ { /* ignore whitespace */ } ";"[^\n]* { /* ignore comment */ } -"(" { return LPAREN; } -")" { return RPAREN; } -"\." { return DOT; } +"(" { return LPAREN; } +")" { return RPAREN; } +"\." { return DOT; } +"'" { return QUOTE; } [+-]?([0-9]+|([0-9]*\.[0-9]+))([eE][-+]?[0-9]+)? { yylval.dval = atof(yytext); @@ -32,7 +33,7 @@ int tcnt = 0; return STRING; } -[^[:space:]\"().]+ { +[^[:space:]\"()'.]+ { yylval.strval = strdup(yytext); return SYMBOL; |
