10
10
[-][-] \s . * \n /* skip sql comments */
11
11
[#] \s . * \n /* skip sql comments */
12
12
\s + /* skip whitespace */
13
-
13
+
14
14
[`][a-zA-Z_\u4e00 -\u9fa5 ][a-zA-Z0-9_\u4e00 -\u9fa5 ] * [`] return ' IDENTIFIER'
15
15
[\w ] + [\u4e00 -\u9fa5 ] + [0-9a-zA-Z_\u4e00 -\u9fa5 ] * return ' IDENTIFIER'
16
16
[\u4e00 -\u9fa5 ][0-9a-zA-Z_\u4e00 -\u9fa5 ] * return ' IDENTIFIER'
@@ -117,7 +117,7 @@ UNION return 'UNION'
117
117
"{" return ' {'
118
118
"}" return ' }'
119
119
";" return ' ;'
120
-
120
+
121
121
['] (\\ . | [^ '] )* ['] return ' STRING'
122
122
["] (\\ . | [^ "] )* ["] return ' STRING'
123
123
[0][x][0-9a-fA-F] + return ' HEX_NUMERIC'
@@ -127,7 +127,7 @@ UNION return 'UNION'
127
127
[a-zA-Z_\u4e00 -\u9fa5 ][a-zA-Z0-9_\u4e00 -\u9fa5 ] * return ' IDENTIFIER'
128
128
\. return ' DOT'
129
129
['"][a-zA-Z_\u4e00 -\u9fa5 ][a-zA-Z0-9_\u4e00 -\u9fa5 ] * ["'] return ' QUOTED_IDENTIFIER'
130
-
130
+
131
131
<<EOF>> return ' EOF'
132
132
. return ' INVALID'
133
133
@@ -189,7 +189,7 @@ unionClauseNotParenthesized
189
189
;
190
190
191
191
selectClause
192
- : SELECT
192
+ : SELECT
193
193
distinctOpt
194
194
highPriorityOpt
195
195
maxStateMentTimeOpt
@@ -228,7 +228,7 @@ selectClause
228
228
;
229
229
230
230
distinctOpt
231
- : ALL { $$ = $1 }
231
+ : ALL { $$ = $1 }
232
232
| DISTINCT { $$ = $1 }
233
233
| DISTINCTROW { $$ = $1 }
234
234
| { $$ = null }
@@ -361,7 +361,7 @@ simple_expr
361
361
;
362
362
bit_expr
363
363
: simple_expr { $$ = $1 }
364
- | bit_expr '|' bit_expr { $$ = { type: ' BitExpression' , operator: ' |' , left: $1 , right: $3 } }
364
+ | bit_expr '|' bit_expr { $$ = { type: ' BitExpression' , operator: ' |' , left: $1 , right: $3 } }
365
365
| bit_expr '&' bit_expr { $$ = { type: ' BitExpression' , operator: ' &' , left: $1 , right: $3 } }
366
366
| bit_expr '<<' bit_expr { $$ = { type: ' BitExpression' , operator: ' <<' , left: $1 , right: $3 } }
367
367
| bit_expr '>>' bit_expr { $$ = { type: ' BitExpression' , operator: ' >>' , left: $1 , right: $3 } }
@@ -494,12 +494,12 @@ selectDataSetOpt
494
494
{ $$ = { from: $2 , partition: $3 , where: $4 , groupBy: $5 , having: $6 , orderBy: $7 , limit: $8 , procedure: $9 , updateLockMode: $10 } }
495
495
;
496
496
table_refrences
497
- : escaped_table_reference { $$ = { type: ' TableRefrences ' , value: [ $1 ] } }
497
+ : escaped_table_reference { $$ = { type: ' TableReferences ' , value: [ $1 ] } }
498
498
| table_refrences ',' escaped_table_reference %prec TABLE_REF_COMMA { $$ = $1 ; $1 .value .push ($3 ); }
499
499
;
500
500
escaped_table_reference
501
- : table_reference { $$ = { type: ' TableRefrence ' , value: $1 } }
502
- | '{' OJ table_reference '}' { $$ = { type: ' TableRefrence ' , hasOj: true , value: $3 } }
501
+ : table_reference { $$ = { type: ' TableReference ' , value: $1 } }
502
+ | '{' OJ table_reference '}' { $$ = { type: ' TableReference ' , hasOj: true , value: $3 } }
503
503
;
504
504
join_inner_cross
505
505
: { $$ = null }
0 commit comments