Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/observer/sql/parser/lex_sql.l
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ QUOTE [\'\"]
{WHITE_SPACE} // ignore whitespace
\n ;

[\-]?{DIGIT}+ yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER);
[\-]?{DIGIT}+{DOT}{DIGIT}+ yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT);
{DIGIT}+ yylval->number=atoi(yytext); RETURN_TOKEN(NUMBER);
{DIGIT}+{DOT}{DIGIT}+ yylval->floats=(float)(atof(yytext)); RETURN_TOKEN(FLOAT);

";" RETURN_TOKEN(SEMICOLON);
{DOT} RETURN_TOKEN(DOT);
Expand Down
2 changes: 1 addition & 1 deletion src/observer/sql/parser/yacc_sql.y
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ UnboundAggregateExpr *create_aggregate_expression(const char *aggregate_name,

%left '+' '-'
%left '*' '/'
%nonassoc UMINUS
%right UMINUS
%%

commands: command_wrapper opt_semicolon //commands or sqls. parser starts here.
Expand Down