~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Brian Aker
  • Date: 2008-10-02 19:18:43 UTC
  • mto: (438.4.1 drizzle-clean-code)
  • mto: This revision was merged to the branch mainline in revision 435.
  • Revision ID: brian@tangent.org-20081002191843-tw3nnufik8qwf9rz
Removed UNSIGNED from parser.

Show diffs side-by-side

added added

removed removed

Lines of Context:
753
753
%token  SHARE_SYM
754
754
%token  SHOW
755
755
%token  SHUTDOWN
756
 
%token  SIGNED_SYM
757
756
%token  SIMPLE_SYM                    /* SQL-2003-N */
758
757
%token  SLAVE
759
758
%token  SNAPSHOT_SYM
824
823
%token  UNIQUE_SYM
825
824
%token  UNKNOWN_SYM                   /* SQL-2003-R */
826
825
%token  UNLOCK_SYM
827
 
%token  UNSIGNED
828
826
%token  UNTIL_SYM
829
827
%token  UPDATE_SYM                    /* SQL-2003-R */
830
828
%token  UPGRADE_SYM
1016
1014
        select_item_list select_item values_list no_braces
1017
1015
        opt_limit_clause delete_limit_clause fields opt_values values
1018
1016
        opt_precision opt_ignore opt_column
1019
 
        set lock unlock string_list field_options field_option
1020
 
        field_opt_list opt_binary table_lock_list table_lock
 
1017
        set lock unlock string_list
 
1018
        opt_binary table_lock_list table_lock
1021
1019
        ref_list opt_match_clause opt_on_update_delete use
1022
1020
        opt_delete_options opt_delete_option varchar
1023
1021
        opt_outer table_list table_name table_alias_ref_list table_alias_ref
1728
1726
        ;
1729
1727
 
1730
1728
type:
1731
 
        int_type field_options 
 
1729
        int_type
1732
1730
        { 
1733
1731
          $$=$1; 
1734
1732
          Lex->length=(char*) 0; /* use default length */
1735
1733
        }
1736
 
        | real_type opt_precision field_options { $$=$1; }
 
1734
        | real_type opt_precision { $$=$1; }
1737
1735
        | char '(' NUM ')' opt_binary
1738
1736
          {
1739
1737
            Lex->length=$3.str;
1778
1776
            $$=DRIZZLE_TYPE_BLOB; 
1779
1777
            Lex->length=(char*) 0; /* use default length */
1780
1778
          }
1781
 
        | DECIMAL_SYM float_options field_options
1782
 
          { $$=DRIZZLE_TYPE_NEWDECIMAL;}
1783
 
        | NUMERIC_SYM float_options field_options
1784
 
          { $$=DRIZZLE_TYPE_NEWDECIMAL;}
1785
 
        | FIXED_SYM float_options field_options
 
1779
        | DECIMAL_SYM float_options
 
1780
          { $$=DRIZZLE_TYPE_NEWDECIMAL;}
 
1781
        | NUMERIC_SYM float_options
 
1782
          { $$=DRIZZLE_TYPE_NEWDECIMAL;}
 
1783
        | FIXED_SYM float_options
1786
1784
          { $$=DRIZZLE_TYPE_NEWDECIMAL;}
1787
1785
        | ENUM
1788
1786
          {Lex->interval_list.empty();}
1791
1789
        | SERIAL_SYM
1792
1790
          {
1793
1791
            $$=DRIZZLE_TYPE_LONGLONG;
1794
 
            Lex->type|= (AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNSIGNED_FLAG |
1795
 
              UNIQUE_FLAG);
 
1792
            Lex->type|= (AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_FLAG);
1796
1793
          }
1797
1794
        ;
1798
1795
 
1839
1836
          }
1840
1837
        ;
1841
1838
 
1842
 
field_options:
1843
 
          /* empty */ {}
1844
 
        | field_opt_list {}
1845
 
        ;
1846
 
 
1847
 
field_opt_list:
1848
 
          field_opt_list field_option {}
1849
 
        | field_option {}
1850
 
        ;
1851
 
 
1852
 
field_option:
1853
 
          SIGNED_SYM {}
1854
 
        | UNSIGNED { Lex->type|= UNSIGNED_FLAG;}
1855
 
        ;
1856
 
 
1857
1839
opt_len:
1858
1840
          /* empty */ { Lex->length=(char*) 0; /* use default length */ }
1859
1841
        | '(' NUM ')' { Lex->length= $2.str; }
3753
3735
          { $$=ITEM_CAST_CHAR; Lex->charset= &my_charset_bin; Lex->dec= 0; }
3754
3736
        | CHAR_SYM opt_len opt_binary
3755
3737
          { $$=ITEM_CAST_CHAR; Lex->dec= 0; }
3756
 
        | SIGNED_SYM
3757
 
          { $$=ITEM_CAST_SIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
3758
 
        | SIGNED_SYM INT_SYM
3759
 
          { $$=ITEM_CAST_SIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
3760
 
        | UNSIGNED
3761
 
          { $$=ITEM_CAST_UNSIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
3762
 
        | UNSIGNED INT_SYM
3763
 
          { $$=ITEM_CAST_UNSIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
3764
3738
        | DATE_SYM
3765
3739
          { $$=ITEM_CAST_DATE; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; }
3766
3740
        | TIME_SYM
6108
6082
        | SAVEPOINT_SYM         {}
6109
6083
        | SECURITY_SYM          {}
6110
6084
        | SERVER_SYM            {}
6111
 
        | SIGNED_SYM            {}
6112
6085
        | SOCKET_SYM            {}
6113
6086
        | SLAVE                 {}
6114
6087
        | SONAME_SYM            {}