TERM
IDENTIFIER = 300
SIGNED = 301
CONST = 302
INLINE = 303
AUTO = 304
BREAK = 305
CASE = 306
CHAR = 307
CONTINUE = 308
DEFAULT = 310
DO = 311
DOUBLE = 312
ELSE = 313
ENUM = 314
EXTERN = 315
FLOAT = 316
FOR = 317
GOTO = 318
IF = 320
INT = 321
LONG = 322
REGISTER = 323
RETURN = 324
SHORT = 325
SIZEOF = 326
STATIC = 328
STRUCT = 330
SWITCH = 331
TYPEDEF = 332
UNION = 333
UNSIGNED = 334
VOID = 335
VOLATILE = 336
WHILE = 337
CONSTANT = 338
STRING_LITERAL = 340
RIGHT_ASSIGN = 341
LEFT_ASSIGN = 342
ADD_ASSIGN = 343
SUB_ASSIGN = 344
MUL_ASSIGN = 345
DIV_ASSIGN = 346
MOD_ASSIGN = 347
AND_ASSIGN = 348
XOR_ASSIGN = 350
OR_ASSIGN = 351
RIGHT_OP = 352
LEFT_OP = 353
INC_OP = 354
DEC_OP = 355
PTR_OP = 356
AND_OP = 357
OR_OP = 358
LE_OP = 360
GE_OP = 361
EQ_OP = 362
NE_OP = 363
ELIPSIS = 364
RESTRICT = 365
_BOOL = 366
_COMPLEX = 367
_IMAGINARY = 368

/* Additional rules: */

start : translation_unit # _210(0)
      ;

identifier : IDENTIFIER # _214(0)
           ;

constant : CONSTANT # _217(0)
         ;

string_literal : STRING_LITERAL # _220(0)
               ;

/* A.2  Phrase structure grammar: */
/* A.2.1  Expressions: */
/* (6.5.1): */
primary_expression : identifier # _226(0)
                   | constant # _227(0)
                   | string_literal # _228(0)
                   | '(' expression ')' # _229(1)
                   ;
/* (6.5.2): */
/* postfix_expression : primary_expression
                   | postfix_expression '[' expression ']'
                   | postfix_expression '(' [argument_expression_list] ')'
                   | postfix_expression '.' identifier
                   | postfix_expression PTR_OP identifier
                   | postfix_expression INC_OP
                   | postfix_expression DEC_OP
                   | '(' type_name ')' '{' initializer_list '}'
                   | '(' type_name ')' '{' initializer_list ',' '}' */

postfix_expression : primary_expression # _242(0)
                   | postfix_expression '[' expression ']' # _243(0 2)
                   | postfix_expression '(' argument_expression_list_opt ')' # _244(0 2)
                   | postfix_expression '.' identifier # _245(0 2)
                   | postfix_expression PTR_OP identifier # _246(0 2)
                   | postfix_expression INC_OP # _247(0)
                   | postfix_expression DEC_OP # _248(0)
                   | '(' type_name ')' '{' initializer_list '}' # _249(1 4)
                   | '(' type_name ')' '{' initializer_list ',' '}' # _250(1 4)
                   ;

argument_expression_list_opt :
                             | argument_expression_list # _254(0)
                             ;
/* (6.5.2): */
argument_expression_list : assignment_expression # _257(0)
                         | argument_expression_list ',' assignment_expression # _258(0 2)
                         ;

/* (6.5.3): */
unary_expression : postfix_expression # _262(0)
                 | INC_OP unary_expression # _263(1)
                 | DEC_OP unary_expression # _264(1)
                 | unary_operator  cast_expression # _265(0 1)
                 | SIZEOF unary_expression # _266(1)
                 | SIZEOF '(' type_name ')' # _267(2)
                 ;

/* (6.5.3): */
unary_operator : '&' # _271(0)
               | '*' # _272(0)
               | '+' # _273(0)
               | '-' # _274(0)
               | '~' # _275(0)
               | '!' # _276(0)
               ;

/* (6.5.4): */
cast_expression : unary_expression # _280(0)
                | '(' type_name ')' cast_expression # _281(1 3)
                ;

/* (6.5.5): */
multiplicative_expression : cast_expression # _285(0)
                          | multiplicative_expression '*' cast_expression # _286(0 2)
                          | multiplicative_expression '/' cast_expression # _287(0 2)
                          | multiplicative_expression '%' cast_expression # _288(0 2)
                          ;

/* (6.5.6): */
additive_expression : multiplicative_expression # _292(0)
                    | additive_expression '+' multiplicative_expression # _293(0 2)
                    | additive_expression '-' multiplicative_expression # _294(0 2)
                    ;

/* (6.5.7): */
shift_expression : additive_expression # _298(0)
                 | shift_expression LEFT_OP additive_expression # _299(0 2)
                 | shift_expression RIGHT_OP additive_expression # _300(0 2)
                 ;

/* (6.5.8): */
relational_expression : shift_expression # _304(0)
                      | relational_expression '<' shift_expression # _305(0 2)
                      | relational_expression '>' shift_expression # _306(0 2)
                      | relational_expression LE_OP shift_expression # _307(0 2)
                      | relational_expression GE_OP shift_expression # _308(0 2)
                      ;

/* (6.5.9): */
equality_expression : relational_expression # _312(0)
                    | equality_expression EQ_OP relational_expression # _313(0 2)
                    | equality_expression NE_OP relational_expression # _314(0 2)
                    ;

/* (6.5.10): */
AND_expression : equality_expression # _318(0)
               | AND_expression '&' equality_expression # _319(0 2)
               ;

/* (6.5.11): */
exclusive_OR_expression : AND_expression # _323(0)
                        | exclusive_OR_expression '^' AND_expression # _324(0 2)
                        ;

/* (6.5.12): */
inclusive_OR_expression : exclusive_OR_expression # _328(0)
                        | inclusive_OR_expression '|' exclusive_OR_expression # _329(0 2)
                        ;

/* (6.5.13): */
logical_AND_expression : inclusive_OR_expression # _333(0)
                       | logical_AND_expression AND_OP inclusive_OR_expression # _334(0 2)
                       ;

/* (6.5.14): */
logical_OR_expression : logical_AND_expression # _338(0)
                      | logical_OR_expression OR_OP logical_AND_expression # _339(0 2)
                      ;

/* (6.5.15): */
conditional_expression : logical_OR_expression # _343(0)
                       | logical_OR_expression '?' expression ':' conditional_expression # _344(0 2 4)
                       ;

/* (6.5.16): */
assignment_expression : conditional_expression # _348(0)
                      | unary_expression  assignment_operator  assignment_expression # _349(0 1 2)
                      ;

/* (6.5.16): */
assignment_operator :  '=' # _353(0)
                    |  MUL_ASSIGN # _354(0)
                    |  DIV_ASSIGN # _355(0)
                    |  MOD_ASSIGN # _356(0)
                    |  ADD_ASSIGN # _357(0)
                    |  SUB_ASSIGN # _358(0)
                    |  LEFT_ASSIGN # _359(0)
                    |  RIGHT_ASSIGN # _360(0)
                    |  AND_ASSIGN # _361(0)
                    |  XOR_ASSIGN # _362(0)
                    |  OR_ASSIGN # _363(0)
                    ;

/* (6.5.17): */
expression : assignment_expression # _367(0)
           | expression ',' assignment_expression # _368(0 2)
           ;

/* (6.6): */
constant_expression : conditional_expression # _372(0)
                    ;

/* A.2.2  Declarations: */
/* (6.7): */
/* declaration : declaration_specifiers [init_declarator_list] ';' */
               
declaration : declaration_specifiers init_declarator_list_opt ';' # _379(0 1)
            ;

init_declarator_list_opt :
                         | init_declarator_list # _383(0)
                         ;

/* (6.7): */
/* declaration_specifiers : storage_class_specifier  [declaration_specifiers]
   	               | type_specifier  [declaration_specifiers]
                       | type_qualifier  [declaration_specifiers]
                       | function_specifier  [declaration_specifiers] */

declaration_specifiers : storage_class_specifier  declaration_specifiers_opt # _392(0 1)
   	               | type_specifier  declaration_specifiers_opt # _393(0 1)
                       | type_qualifier  declaration_specifiers_opt # _394(0 1)
                       | function_specifier  declaration_specifiers_opt # _395(0 1)
                       ;

declaration_specifiers_opt :
                           | declaration_specifiers # _399(0)
                           ;

/* (6.7): */
init_declarator_list : init_declarator # _403(0)
                     | init_declarator_list ',' init_declarator # _404(0 2)
                     ;

/* (6.7): */
init_declarator : declarator # _408(0)
                | declarator '=' initializer # _409(0 2)
                ;
/* (6.7.1): */
storage_class_specifier : TYPEDEF # _412(0)
                        | EXTERN # _413(0)
                        | STATIC # _414(0)
                        | AUTO # _415(0)
	                | REGISTER # _416(0)
                        ;

/* (6.7.2): */
type_specifier : VOID # _420(0)
               | CHAR # _421(0)
               | SHORT # _422(0)
               | INT # _423(0)
               | LONG # _424(0)
               | FLOAT # _425(0)
               | DOUBLE # _426(0)
               | SIGNED # _427(0)
               | UNSIGNED # _428(0)
               | _BOOL # _429(0)
               | _COMPLEX # _430(0)
               | _IMAGINARY # _431(0)
               | struct_or_union_specifier # _432(0)
               | enum_specifier # _433(0)
               | typedef_name # _434(0)
               ;

/* (6.7.2.1): */
/* struct_or_union_specifier : struct_or_union  [identifier]
                                 '{' struct_declaration_list '}'
                          | struct_or_union  identifier */

struct_or_union_specifier : struct_or_union  identifier_opt
                                 '{' struct_declaration_list '}' # _443(0 1 3)
                          | struct_or_union  identifier # _444(0 1)
                          ;

identifier_opt :
               | identifier # _448(0)
               ;

/* (6.7.2.1): */
struct_or_union : STRUCT # _452(0)
                | UNION # _453(0)
                ;

/* (6.7.2.1): */
struct_declaration_list : struct_declaration # _457(0)
                        | struct_declaration_list  struct_declaration # _458(0 1)
                        ;

/* (6.7.2.1): */
struct_declaration : specifier_qualifier_list  struct_declarator_list ';' # _462(0 1)
                   ;

/* (6.7.2.1): */
/* specifier_qualifier_list : type_specifier  [specifier_qualifier_list]
                         | type_qualifier  [specifier_qualifier_list] */

specifier_qualifier_list : type_specifier  specifier_qualifier_list_opt # _469(0 1)
                         | type_qualifier  specifier_qualifier_list_opt # _470(0 1)
                         ;

specifier_qualifier_list_opt : 
                             | specifier_qualifier_list # _474(0)
                             ;

/* (6.7.2.1): */
struct_declarator_list : struct_declarator # _478(0)
                       | struct_declarator_list ',' struct_declarator # _479(0 2)
                       ;

/* (6.7.2.1): */
/* struct_declarator : declarator
                  | [declarator] ':' constant_expression */

struct_declarator : declarator # _486(0)
                  | declarator_opt ':' constant_expression # _487(0 2)
                  ;

declarator_opt :
               | declarator # _491(0)
               ;

/* (6.7.2.2): */
enum_specifier : ENUM identifier_opt '{' enumerator_list '}' # _495(1 3)
               | ENUM identifier_opt '{' enumerator_list ',' '}' # _496(1 3)
               | ENUM identifier # _497(1)
               ;

/* (6.7.2.2): */
enumerator_list : enumerator # _501(0)
                | enumerator_list ',' enumerator # _502(0 2)
                ;

/* (6.7.2.2): */
enumerator : enumeration_constant # _506(0)
           | enumeration_constant '=' constant_expression # _507(0 2)
           ;

/* (6.7.3): */
type_qualifier : CONST # _511(0)
               | RESTRICT # _512(0)
               | VOLATILE # _513(0)
               ;

/* (6.7.4): */
function_specifier : INLINE # _517(0)
                   ;

/* (6.7.5): */
/* declarator : [pointer] direct_declarator */

declarator : pointer_opt direct_declarator # _523(0 1)
           ;

pointer_opt :
            | pointer # _527(0)
            ;
/* (6.7.5): */
/* direct_declarator : identifier
                  | '(' declarator ')'
                  | direct_declarator '[' [type_qualifier_list] [assignment_expression] ']'
                  | direct_declarator '[' STATIC [type_qualifier_list] assignment_expression ']'
                  | direct_declarator '[' type_qualifier_list STATIC assignment_expression ']'
                  | direct_declarator '[' [type_qualifier_list] '*' ']'
                  | direct_declarator '(' parameter_type_list ')'
                  | direct_declarator '(' [identifier_list] ')' */

direct_declarator : identifier # _541(0)
                  | '(' declarator ')' # _542(1)
                  | direct_declarator '[' type_qualifier_list_opt assignment_expression_opt ']' # _544(0 2 3)
                  | direct_declarator '[' STATIC type_qualifier_list_opt assignment_expression ']' # _546(0 3 4)
                  | direct_declarator '[' type_qualifier_list STATIC assignment_expression ']' # _548(0 2 4)
                  | direct_declarator '[' type_qualifier_list_opt '*' ']' # _549(0 2)
                  | direct_declarator '(' parameter_type_list ')' # _550(0 2)
                  | direct_declarator '(' identifier_list_opt ')' # _551(0 2)
                  ;

type_qualifier_list_opt :
                        | type_qualifier_list # _555(0)
                        ;

identifier_list_opt :
                    | identifier_list # _559(0)
                    ;

/* (6.7.5): */
pointer : '*' type_qualifier_list_opt # _563(0)
        | '*' type_qualifier_list_opt pointer # _564(0 1)
        ;

/* (6.7.5): */
type_qualifier_list : type_qualifier # _568(0)
                    | type_qualifier_list  type_qualifier # _569(0 1)
                    ;

/* (6.7.5): */
parameter_type_list : parameter_list # _573(0)
                    | parameter_list ',' ELIPSIS # _574(0 2)
                    ;

/* (6.7.5): */
parameter_list : parameter_declaration # _578(0)
               | parameter_list ',' parameter_declaration # _579(0 2)
               ;

/* (6.7.5): */
/* parameter_declaration : declaration_specifiers declarator
                      | declaration_specifiers [abstract_declarator] */

parameter_declaration : declaration_specifiers declarator # _586(0 1)
                      | declaration_specifiers abstract_declarator_opt # _587(0 1)
                      ;

abstract_declarator_opt :
                        | abstract_declarator # _591(0)
                        ;

/* (6.7.5): */
identifier_list : identifier # _595(0)
                | identifier_list ',' identifier # _596(0 2)
                ;

/* (6.7.6): */
type_name: specifier_qualifier_list  abstract_declarator_opt # _600(0 1)
         ;

/* (6.7.6): */
abstract_declarator : pointer # _604(0)
                    | pointer_opt direct_abstract_declarator # _605(0 1)
                     ;

/* (6.7.6): */
/* direct_abstract_declarator : '(' abstract_declarator ')'
                           | [direct_abstract_declarator] '[' [assignment_expression] ']'
                           | [direct_abstract_declarator] '[' '*' ']'
                           | [direct_abstract_declarator] '(' [parameter_type_list] ')' */

direct_abstract_declarator : '(' abstract_declarator ')' # _614(1)
                           | direct_abstract_declarator_opt '[' assignment_expression_opt ']' # _616(0 2)
                           | direct_abstract_declarator_opt '[' '*' ']' # _617(0)
                           | direct_abstract_declarator_opt '(' parameter_type_list_opt ')' # _618(0 2)
                           ;

direct_abstract_declarator_opt :
                               | direct_abstract_declarator # _622(0)
                               ;

assignment_expression_opt :
                          | assignment_expression # _626(0)
                          ;

parameter_type_list_opt :
                        | parameter_type_list # _630(0)
                        ;

/* (6.7.7): */
typedef_name : identifier # _634(0)
             ;

/* (6.7.8): */
initializer : assignment_expression # _638(0)
            | '{' initializer_list '}' # _639(1)
            | '{' initializer_list ',' '}' # _640(1)
            ;

/* (6.7.8): */
/* initializer_list : [designation] initializer
                 | initializer_list ',' [designation] initializer */

initializer_list : designation_opt initializer # _647(0 1)
                 | initializer_list ',' designation_opt initializer # _648(0 2 3)
                 ;

designation_opt :
                | designation # _652(0)
                ;

/* (6.7.8): */
designation : designator_list '=' # _656(0)
            ;

/* (6.7.8): */
designator_list : designator # _660(0)
                | designator_list  designator # _661(0 1)
                ;

/* (6.7.8): */
designator : '[' constant_expression ']' # _665(1)
           | '.' identifier # _666(1)
           ;

/* A.2.3  Statements: */
/* (6.8): */
statement : labeled_statement # _671(0)
          | compound_statement # _672(0)
          | expression_statement # _673(0)
          | selection_statement # _674(0)
          | iteration_statement # _675(0)
          | jump_statement # _676(0)
          ;

/* (6.8.1): */
labeled_statement : identifier ':' statement # _680(0 2)
                  | CASE constant_expression ':' statement # _681(1 3)
                  | DEFAULT ':' statement # _682(2)
                  ;

/* (6.8.2): */
/* compound_statement : '{' [block_item_list] '}' */

compound_statement : '{' block_item_list_opt '}' # _688(1)
                   ;

block_item_list_opt :
                    | block_item_list # _692(0)
                    ;

/* (6.8.2): */
block_item_list : block_item # _696(0)
                | block_item_list  block_item # _697(0 1)
                ;

/* (6.8.2): */
block_item : declaration # _701(0)
           | statement # _702(0)
           ;

/* (6.8.3): */
/* expression_statement : [expression] ';' */

expression_statement : expression_opt ';' # _708(0)
                     ;
expression_opt :
               | expression # _711(0)
               ;

/* (6.8.4): */
selection_statement : IF '(' expression ')' statement # _715(2 4)
                    | IF '(' expression ')' statement ELSE statement # _716(2 4 6)
                    | SWITCH '(' expression ')' statement # _717(2 4)
                    ;

/* (6.8.5): */
iteration_statement : WHILE '(' expression ')' statement # _721(2 4)
                    | DO statement WHILE '(' expression ')' ';' # _722(1 4)
                    | FOR '(' expression_opt ';' expression_opt ';' expression_opt ')' statement # _724(2 4 6 8)
                    | FOR '(' declaration  expression_opt ';' expression_opt ')' statement # _725(2 3 5 7)
                    ;

/* (6.8.6): */
jump_statement : GOTO identifier ';' # _729(1)
               | CONTINUE ';' # _730(0)
               | BREAK ';' # _731(0)
               | RETURN expression_opt ';' # _732(1)
               ;

/* A.2.4  External definitions: */
/* (6.9): */
translation_unit : external_declaration # _737(0)
                 | translation_unit external_declaration # _738(0 1)
                 ;

/* (6.9): */
external_declaration : function_definition # _742(0)
                     | declaration # _743(0)
                     ;

/* (6.9.1): */
/* function_definition : declaration_specifiers declarator  [declaration_list] compound_statement */

function_definition : declaration_specifiers declarator  declaration_list_opt compound_statement # _751(0 1 2 3)
                   ;

declaration_list_opt :
                     | declaration_list # _755(0)
                     ;

/* (6.9.1): */
declaration_list : declaration # _759(0)
                 | declaration_list  declaration # _760(0 1)
                 ;

/* A.1.5  Constants: */
/* (6.4.4.3): */
enumeration_constant : identifier # _765(0)
                     ;
all time 0.01, memory=1052.0kB
