Spreadsheet: Fixed parser so it accepts integer numbers written as e.g 1e3.

This commit is contained in:
Eivind Kvedalen
2016-03-04 22:12:20 +01:00
committed by wmayer
parent b606ed8ce4
commit e270dee8cc
2 changed files with 4340 additions and 4330 deletions

View File

@@ -241,6 +241,7 @@ EXPO [eE][-+]?[0-9]+
{DIGIT}*"."{DIGIT}+{EXPO}? yylval.fvalue = num_change(yytext,'.',','); return yylval.fvalue == 1 ? ONE : NUM;
{DIGIT}*","{DIGIT}+{EXPO}? yylval.fvalue = num_change(yytext,',','.'); return yylval.fvalue == 1 ? ONE : NUM;
{DIGIT}+{EXPO} yylval.fvalue = num_change(yytext,',','.'); return yylval.fvalue == 1 ? ONE : NUM;
{DIGIT}+ yylval.ivalue = strtoll( yytext, NULL, 0 ); if (yylval.ivalue == 1) { yylval.fvalue = 1; return ONE; } else return INTEGER;
"pi" yylval.constant.fvalue = M_PI; yylval.constant.name = "pi"; return CONSTANT; // constant pi

File diff suppressed because it is too large Load Diff