From 5886dcd8ff15f97b270d9e6bb92606467294de9f Mon Sep 17 00:00:00 2001 From: Dane Johnson Date: Fri, 26 Nov 2021 11:18:35 -0600 Subject: [PATCH] Allow dotted identifiers --- .gitignore | 4 ++++ lexer.l | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7f8c9c5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +deelang +*.o +parser.h +lexer.h \ No newline at end of file diff --git a/lexer.l b/lexer.l index bb0447a..24667b6 100644 --- a/lexer.l +++ b/lexer.l @@ -39,7 +39,7 @@ if return IF; else return ELSE; elif return ELIF; {digit}+|{digit}*\.{digit}+ yylval.num = atof(yytext); return NUM; -{letter}({letter}|{digit}|[?-])* yylval.sym = yytext; return ID; +{letter}({letter}|{digit}|[?.-])* yylval.sym = yytext; return ID; "<-" return GETS; "->" return MAPS; [(){}.,*/+-] return yytext[0];