summaryrefslogtreecommitdiff
path: root/sql/sql_yacc_ora.yy
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-07-09 15:10:45 +0400
committerAlexander Barkov <bar@mariadb.com>2019-07-09 15:10:45 +0400
commit70c2bde931246ea4966d82fa56773b8ef1e0074f (patch)
tree219073f0607efd2ee1bcaa18dd121cc4af825a6b /sql/sql_yacc_ora.yy
parent69749629455605c64f7bb1a2012e9cbe13f61b76 (diff)
downloadmariadb-git-70c2bde931246ea4966d82fa56773b8ef1e0074f.tar.gz
MDEV-19996 Bison grammar: turn singe-character operators into <kwd>
Diffstat (limited to 'sql/sql_yacc_ora.yy')
-rw-r--r--sql/sql_yacc_ora.yy30
1 files changed, 15 insertions, 15 deletions
diff --git a/sql/sql_yacc_ora.yy b/sql/sql_yacc_ora.yy
index f789cc09317..cf3cd815cea 100644
--- a/sql/sql_yacc_ora.yy
+++ b/sql/sql_yacc_ora.yy
@@ -1274,7 +1274,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%type <simple_string>
remember_name remember_end remember_end_opt
- remember_tok_start remember_tok_end
+ remember_tok_start
wild_and_where
%type <const_simple_string>
@@ -1672,9 +1672,12 @@ END_OF_INPUT
%type <frame_exclusion> opt_window_frame_exclusion;
%type <window_frame_bound> window_frame_start window_frame_bound;
-%type <NONE>
+%type <kwd>
'-' '+' '*' '/' '%' '(' ')'
- ',' '!' '{' '}' '&' '|' AND_SYM OR_SYM BETWEEN_SYM CASE_SYM
+ ',' '!' '{' '}' '&' '|'
+
+%type <NONE>
+ AND_SYM OR_SYM BETWEEN_SYM CASE_SYM
THEN_SYM WHEN_SYM DIV_SYM MOD_SYM OR2_SYM AND_AND_SYM DELETE_SYM
MYSQL_CONCAT_SYM ORACLE_CONCAT_SYM
@@ -8915,6 +8918,7 @@ persistent_column_stat_spec:
}
table_column_list
')'
+ { }
;
persistent_index_stat_spec:
@@ -8928,6 +8932,7 @@ persistent_index_stat_spec:
}
table_index_list
')'
+ { }
;
table_column_list:
@@ -9694,12 +9699,6 @@ remember_tok_start:
}
;
-remember_tok_end:
- {
- $$= (char*) YYLIP->get_tok_end();
- }
- ;
-
remember_name:
{
$$= (char*) YYLIP->get_cpp_tok_start();
@@ -12582,6 +12581,7 @@ window_spec:
opt_window_ref opt_window_partition_clause
opt_window_order_clause opt_window_frame_clause
')'
+ { }
;
opt_window_ref:
@@ -15394,16 +15394,16 @@ with_list_element:
MYSQL_YYABORT;
Lex->with_column_list.empty();
}
- AS '(' remember_tok_start query_expression remember_tok_end ')'
+ AS '(' query_expression ')'
{
LEX *lex= thd->lex;
const char *query_start= lex->sphead ? lex->sphead->m_tmp_query
: thd->query();
- char *spec_start= $6 + 1;
- With_element *elem= new With_element($1, *$2, $7);
+ const char *spec_start= $5.pos() + 1;
+ With_element *elem= new With_element($1, *$2, $6);
if (elem == NULL || Lex->curr_with_clause->add_with_element(elem))
MYSQL_YYABORT;
- if (elem->set_unparsed_spec(thd, spec_start, $8,
+ if (elem->set_unparsed_spec(thd, spec_start, $7.pos(),
spec_start - query_start))
MYSQL_YYABORT;
}
@@ -17511,7 +17511,7 @@ opt_column_list:
LEX *lex=Lex;
lex->grant |= lex->which_columns;
}
- | '(' column_list ')'
+ | '(' column_list ')' { }
;
column_list:
@@ -17821,7 +17821,7 @@ view_suid:
view_list_opt:
/* empty */
{}
- | '(' view_list ')'
+ | '(' view_list ')' { }
;
view_list: