[to #47096137] fix a PL syntax conflict
This commit is contained in:
@ -18,18 +18,25 @@ if [ "$BISON_VERSION" != "$NEED_VERSION" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
# 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
|
bison_parser ../../../src/pl/parser/pl_parser_mysql_mode.y ../../../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
|
|
||||||
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
|
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
|
#./gen_type_name.sh ob_item_type.h >type_name.c
|
||||||
|
|
||||||
|
|||||||
@ -589,7 +589,7 @@ opt_sp_cparam_with_assign:
|
|||||||
;
|
;
|
||||||
|
|
||||||
cexpr:
|
cexpr:
|
||||||
{
|
%prec LOWER_PARENS {
|
||||||
//same as expr in sql rule, and terminate when read ';'
|
//same as expr in sql rule, and terminate when read ';'
|
||||||
do_parse_sql_expr_rule($$, parse_ctx, 3, ',', ')', PARAM_ASSIGN_OPERATOR);
|
do_parse_sql_expr_rule($$, parse_ctx, 3, ',', ')', PARAM_ASSIGN_OPERATOR);
|
||||||
if (NULL == $$) {
|
if (NULL == $$) {
|
||||||
|
|||||||
Reference in New Issue
Block a user