diff options
Diffstat (limited to 'works/life/compile-principle-experiment/3/lex.l')
-rw-r--r-- | works/life/compile-principle-experiment/3/lex.l | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/works/life/compile-principle-experiment/3/lex.l b/works/life/compile-principle-experiment/3/lex.l deleted file mode 100644 index ddea92d..0000000 --- a/works/life/compile-principle-experiment/3/lex.l +++ /dev/null @@ -1,17 +0,0 @@ -%{ -#include "main.h" -#include "syn.h" -%} -%option noyywrap -%% -[ \t] { ; } /* skip blanks and tabs */ -[0-9]+\.?|[0-9]*\.[0-9]+ { - sscanf(yytext, "%lf", &yylval.val); return NUMBER; } -[a-zA-Z][a-zA-Z0-9]* { - Symbol *s; - if ((s=cru_symbol_lookup(yytext)) == 0) - s = cru_symbol_install(yytext, UNDEF, (SymbolValue)0.0); - yylval.sym = s; - return s->type == UNDEF ? VAR : s->type; } -\n { lineno++; return '\n'; } /* everything else */ -. { return yytext[0]; } |