~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

Remove greedy use = for table alias allowance.

Show diffs side-by-side

added added

removed removed

Lines of Context:
298
298
%token  END_OF_INPUT                  /* INTERNAL */
299
299
%token  ENGINE_SYM
300
300
%token  ENUM_SYM
301
 
%token  EQ                            /* OPERATOR */
302
301
%token  EQUAL_SYM                     /* OPERATOR */
303
302
%token  ERRORS
304
303
%token  ESCAPED
564
563
%left  XOR
565
564
%left  AND_SYM
566
565
%right NOT_SYM
567
 
%right EQ
 
566
%right '='
568
567
%nonassoc EQUAL_SYM GE GT_SYM LE LT NE
569
568
%nonassoc LIKE REGEXP_SYM
570
569
%nonassoc BETWEEN_SYM
1926
1925
opt_to:
1927
1926
          /* empty */ {}
1928
1927
        | TO_SYM {}
1929
 
        | EQ {}
1930
1928
        | AS {}
1931
1929
        ;
1932
1930
 
2354
2352
          { $$= new Item_func_isnotnull($1); }
2355
2353
        | bool_pri EQUAL_SYM predicate %prec EQUAL_SYM
2356
2354
          { $$= new Item_func_equal($1,$3); }
2357
 
        | bool_pri comp_op predicate %prec EQ
 
2355
        | bool_pri comp_op predicate %prec '='
2358
2356
          { $$= (*$2)(0)->create($1,$3); }
2359
 
        | bool_pri comp_op all_or_any '(' subselect ')' %prec EQ
 
2357
        | bool_pri comp_op all_or_any '(' subselect ')' %prec '='
2360
2358
          { $$= all_any_subquery_creator($1, $2, $3, $5); }
2361
2359
        | predicate
2362
2360
        ;
2470
2468
        ;
2471
2469
 
2472
2470
comp_op:
2473
 
          EQ     { $$ = &comp_eq_creator; }
 
2471
          '='     { $$ = &comp_eq_creator; }
2474
2472
        | GE     { $$ = &comp_ge_creator; }
2475
2473
        | GT_SYM { $$ = &comp_gt_creator; }
2476
2474
        | LE     { $$ = &comp_le_creator; }
3686
3684
table_alias:
3687
3685
          /* empty */
3688
3686
        | AS
3689
 
        | EQ
3690
3687
        ;
3691
3688
 
3692
3689
opt_table_alias:
4183
4180
        ;
4184
4181
 
4185
4182
equal:
4186
 
          EQ {}
 
4183
          '=' {}
4187
4184
        | SET_VAR {}
4188
4185
        ;
4189
4186