[to #47096137] fix a PL syntax conflict
This commit is contained in:
parent
f01b5a5ae1
commit
36c775efc6
@ -18,18 +18,25 @@ if [ "$BISON_VERSION" != "$NEED_VERSION" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
bison_parser() {
|
||||
BISON_OUTPUT="$(bison -v -Werror -d $1 -o $2 2>&1)"
|
||||
BISON_RETURN="$?"
|
||||
echo $BISON_OUTPUT
|
||||
if [ $BISON_RETURN -ne 0 ]
|
||||
then
|
||||
>&2 echo "Compile error: $BISON_OUTPUT, abort."
|
||||
exit 1
|
||||
fi
|
||||
if [[ $BISON_OUTPUT == *"conflict"* ]]
|
||||
then
|
||||
>&2 echo "Compile conflict: $BISON_OUTPUT, abort."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# generate pl_parser
|
||||
bison -v -Werror -d ../../../src/pl/parser/pl_parser_mysql_mode.y -o ../../../src/pl/parser/pl_parser_mysql_mode_tab.c
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo Compile error[$?], abort
|
||||
exit 1
|
||||
fi
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo Compile error[$?], abort.
|
||||
exit 1
|
||||
fi
|
||||
bison_parser ../../../src/pl/parser/pl_parser_mysql_mode.y ../../../src/pl/parser/pl_parser_mysql_mode_tab.c
|
||||
|
||||
flex -o ../../../src/pl/parser/pl_parser_mysql_mode_lex.c ../../../src/pl/parser/pl_parser_mysql_mode.l ../../../src/pl/parser/pl_parser_mysql_mode_tab.h
|
||||
#./gen_type_name.sh ob_item_type.h >type_name.c
|
||||
|
||||
|
@ -543,7 +543,7 @@ call_sp_stmt:
|
||||
|
||||
opt_sp_cparam_list:
|
||||
/* Empty */ { $$ = NULL; }
|
||||
| '(' ')' { $$ =NULL; }
|
||||
| '(' ')' { $$ = NULL; }
|
||||
| '(' sp_cparams ')'
|
||||
{
|
||||
merge_nodes($$, parse_ctx->mem_pool_, T_SP_CPARAM_LIST, $2);
|
||||
@ -589,7 +589,7 @@ opt_sp_cparam_with_assign:
|
||||
;
|
||||
|
||||
cexpr:
|
||||
{
|
||||
%prec LOWER_PARENS {
|
||||
//same as expr in sql rule, and terminate when read ';'
|
||||
do_parse_sql_expr_rule($$, parse_ctx, 3, ',', ')', PARAM_ASSIGN_OPERATOR);
|
||||
if (NULL == $$) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user