summaryrefslogtreecommitdiff
path: root/src/parser.l
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-02-08 09:47:20 -0700
committerMike Buland <eichlan@xagasoft.com>2012-02-08 09:47:20 -0700
commitb6a33cf4c6c66d364986d7f652c8574953fac4d9 (patch)
treed18e84ec3750ff774239dd73f724a2005889b9b8 /src/parser.l
parent33b6c34a20545222088f645bbc3cc5610f7cc782 (diff)
downloadstage-b6a33cf4c6c66d364986d7f652c8574953fac4d9.tar.gz
stage-b6a33cf4c6c66d364986d7f652c8574953fac4d9.tar.bz2
stage-b6a33cf4c6c66d364986d7f652c8574953fac4d9.tar.xz
stage-b6a33cf4c6c66d364986d7f652c8574953fac4d9.zip
Fixed lexer issue on -, precidence of comparisons.
Diffstat (limited to 'src/parser.l')
-rw-r--r--src/parser.l4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser.l b/src/parser.l
index 70704b8..950c209 100644
--- a/src/parser.l
+++ b/src/parser.l
@@ -72,7 +72,7 @@ null { return tokNull; }
72 72
73[a-zA-Z_][a-zA-Z0-9_]* { yylval->sValue = new Bu::String( yytext ); return tokIdent; } 73[a-zA-Z_][a-zA-Z0-9_]* { yylval->sValue = new Bu::String( yytext ); return tokIdent; }
74 74
75-?[1-9][0-9]* { 75[1-9][0-9]* {
76 yylval->iValue = strtoll( yytext, NULL, 10 ); 76 yylval->iValue = strtoll( yytext, NULL, 10 );
77 return tokInt; 77 return tokInt;
78} 78}
@@ -81,7 +81,7 @@ null { return tokNull; }
81 return tokInt; 81 return tokInt;
82} 82}
83 83
84-?([1-9][0-9]*|0)?\.[0-9]* { 84([1-9][0-9]*|0)?\.[0-9]* {
85// printf("Parsing float: %s\n", yytext ); 85// printf("Parsing float: %s\n", yytext );
86 yylval->dValue = strtod( yytext, NULL ); 86 yylval->dValue = strtod( yytext, NULL );
87// printf("Final float: %f\n", yylval->dValue ); 87// printf("Final float: %f\n", yylval->dValue );