summaryrefslogtreecommitdiff
path: root/src/parser.l
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-01-03 00:08:48 -0700
committerMike Buland <eichlan@xagasoft.com>2012-01-03 00:08:48 -0700
commit8b9a15a755ebc6681ff6be808615e375cb567080 (patch)
treec836f3a7a338e6bcc1fe88fe1207819005b92a83 /src/parser.l
parent340de5ebabbc60727b2aeb85b9faa72a75f1628b (diff)
downloadstage-8b9a15a755ebc6681ff6be808615e375cb567080.tar.gz
stage-8b9a15a755ebc6681ff6be808615e375cb567080.tar.bz2
stage-8b9a15a755ebc6681ff6be808615e375cb567080.tar.xz
stage-8b9a15a755ebc6681ff6be808615e375cb567080.zip
New functions, fixes, and a working bloodfields.
Diffstat (limited to 'src/parser.l')
-rw-r--r--src/parser.l8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parser.l b/src/parser.l
index 7b11765..e0bc340 100644
--- a/src/parser.l
+++ b/src/parser.l
@@ -67,7 +67,7 @@ null { return tokNull; }
67 67
68[a-zA-Z_][a-zA-Z0-9_]* { yylval->sValue = new Bu::String( yytext ); return tokIdent; } 68[a-zA-Z_][a-zA-Z0-9_]* { yylval->sValue = new Bu::String( yytext ); return tokIdent; }
69 69
70[1-9][0-9]* { 70-?[1-9][0-9]* {
71 yylval->iValue = strtoll( yytext, NULL, 10 ); 71 yylval->iValue = strtoll( yytext, NULL, 10 );
72 return tokInt; 72 return tokInt;
73} 73}
@@ -76,10 +76,10 @@ null { return tokNull; }
76 return tokInt; 76 return tokInt;
77} 77}
78 78
79([1-9][0-9]*)?\.[0-9]* { 79-?([1-9][0-9]*|0)?\.[0-9]* {
80 printf("Parsing float: %s\n", yytext ); 80// printf("Parsing float: %s\n", yytext );
81 yylval->dValue = strtod( yytext, NULL ); 81 yylval->dValue = strtod( yytext, NULL );
82 printf("Final float: %f\n", yylval->dValue ); 82// printf("Final float: %f\n", yylval->dValue );
83 return tokFloat; 83 return tokFloat;
84} 84}
85 85