Skip to content

Commit

Permalink
[Does not build] Adding pgq_a_expr leads to reduce/reduce conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Dtenwolde committed Feb 19, 2024
1 parent 3e6d77b commit 4ffd20f
Show file tree
Hide file tree
Showing 3 changed files with 231 additions and 224 deletions.
10 changes: 8 additions & 2 deletions third_party/libpg_query/grammar/statements/select.y
Original file line number Diff line number Diff line change
Expand Up @@ -3315,6 +3315,12 @@ row: qualified_row { $$ = $1;}
| '(' expr_list ',' a_expr ')' { $$ = lappend($2, $4); }
;

pgq_a_expr:
a_expr { $$ = $1; }
| pgq_unreserved_keyword { $$ = pstrdup($1); }
;


dict_arg:
ColIdOrString ':' a_expr {
PGNamedArgExpr *na = makeNode(PGNamedArgExpr);
Expand All @@ -3328,15 +3334,15 @@ dict_arg:
dict_arguments:
dict_arg { $$ = list_make1($1); }
| dict_arguments ',' dict_arg { $$ = lappend($1, $3); }

;

dict_arguments_opt_comma:
dict_arguments { $$ = $1; }
| dict_arguments ',' { $$ = $1; }
;

map_arg:
a_expr ':' a_expr
pgq_a_expr ':' pgq_a_expr
{
$$ = list_make2($1, $3);
}
Expand Down
3 changes: 2 additions & 1 deletion third_party/libpg_query/grammar/types/pgq.yh
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@
%type <node> pgq_expr
%type <str> LabelOptional
%type <list> EdgeTablesClauseOptional
%type <range> GraphTableNameOptional
%type <range> GraphTableNameOptional
%type <node> pgq_a_expr
Loading

0 comments on commit 4ffd20f

Please sign in to comment.