Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Wanxin Li
Roseseed
Commits
53eab396
Commit
53eab396
authored
Aug 16, 2019
by
Wanxin Li
Browse files
fix create_limit_operator
parent
00fa322e
Changes
2
Hide whitespace changes
Inline
Side-by-side
SQLPGrammar_new.y
View file @
53eab396
...
...
@@ -43,7 +43,7 @@ Query
printf("Query 3\n");
$$ = $1;
}
| SelectQuery LIMIT I
NTEGER
| SelectQuery LIMIT I
nteger
{
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
...
...
util_new.c
View file @
53eab396
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment