diff --git a/DragonLisp.l b/DragonLisp.l index c5327a3..67a0f88 100644 --- a/DragonLisp.l +++ b/DragonLisp.l @@ -33,7 +33,7 @@ void printNothing(T _ign1) { ; } float [+-]?[0-9]*[.][0-9]+([eE][+-][0-9]+)? int [+-]?(0[xX][0-9A-Fa-f]*|0[0-7]*|[1-9][0-9]*) id [a-zA-Z_][a-zA-Z_0-9]* -blank [ \t\v\r] +blank [ \t\v\r]+ comment ;[^\n\r]* string \"(?:[^\"\\]|\\.)*\" @@ -78,17 +78,16 @@ defconstant [dD][eE][fF][cC][oO][nN][sS][tT][aA][nN][tT] %{ yylval = lval; + loc->step(); %} {blank}+ { - loc->step(); // PRINT_FUNC("Skipping blank\n"); // return token::TOKEN_SPACE; }; \n+ { loc->lines(yyleng); - loc->step(); // PRINT_FUNC("Skipping newline\n"); // return token::TOKEN_SPACE; } @@ -360,7 +359,6 @@ defconstant [dD][eE][fF][cC][oO][nN][sS][tT][aA][nN][tT] }; {string} { - loc->step(); PRINT_FUNC("Scanned string: %s\n", yytext); yylval->emplace(std::string(yytext + 1, yyleng - 2)); return token::TOKEN_STRING; @@ -368,7 +366,6 @@ defconstant [dD][eE][fF][cC][oO][nN][sS][tT][aA][nN][tT] {comment} { PRINT_FUNC("Scanned comment: %s\n", yytext); - loc->step(); } {id} { diff --git a/Makefile b/Makefile index 29fe736..2444578 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ CC = gcc CXX = g++ OUTPUT ?= $(PROJ).exe -COMMONFLAGS ?= -g -Wall +COMMONFLAGS ?= -O2 -Wall -ffast-math -fomit-frame-pointer CFLAGS ?= $(COMMONFLAGS) -std=c18 CXXFLAGS ?= $(COMMONFLAGS) -std=c++20