From 99e2e923d0c77b02f3fb4ff648ea916954868606 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 28 Feb 2025 23:13:39 +0800 Subject: chore(store): move everything to store. --- works/life/compile-principle-experiment/3/lex.l | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 works/life/compile-principle-experiment/3/lex.l (limited to 'works/life/compile-principle-experiment/3/lex.l') 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]; } -- cgit v1.2.3