Skip to content
Snippets Groups Projects
Commit 53eab396 authored by Wanxin Li's avatar Wanxin Li
Browse files

fix create_limit_operator

parent 00fa322e
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ Query
printf("Query 3\n");
$$ = $1;
}
| SelectQuery LIMIT INTEGER
| SelectQuery LIMIT Integer
{
printf("Query 4\n");
$$ = create_limit_operator($1, $3);
......@@ -292,6 +292,12 @@ Term
}
Integer
: INTEGER
{
printf("INTEGER is |%s|", yytext);
$$ = create_constant(yytext);
}
Constant
......
......@@ -179,7 +179,7 @@ cons_cell* create_exist_operator(cons_cell* ra1) {
return create_cons_cell_w_atom(operator, ra1_cons);
}
// todo: ra2 number doesn't apprear in the parse tree
cons_cell* create_limit_operator(cons_cell* ra1, cons_cell* ra2) {
cons_cell* ra2_cons = create_cons_cell(ra2, NULL);
cons_cell* ra1_cons = create_cons_cell(ra1, ra2_cons);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment