<goal> ::= <program>
=
<0001> ::=
<0001> ::= <0001> <top_level_declaration>

<program> ::= <0001>

<top_level_declaration> ::= <top_level_data_declaration>
<top_level_declaration> ::= top_level_function_declaration>

<top_level_data_declaration> ::= <opt_decl_specifier> ;
<top_level_data_declaration> ::= <opt_decl_specifier>
                                 <list_init_dcltr> ;

<0002> ::=
<0002> ::= <0002> <parameter_declaration>

<top_level_function_declaration> ::= <opt_decl_specifier>
                                     <dcltr>
                                     <0002>
                                     <compound_stmt>

<local_data_declaration> ::= <decl_specifier> ;
<local_data_declaration> ::= <decl_specifier>
                             <list_init_dcltr> ;

<parameter_declaration> ::= <decl_specifier> ;
<parameter_declaration> ::= <decl_specifier> <list_dcltr> ;

<typename_declaration> ::= <decl_specifier> <abs_dcltr>

<0003> ::=
<0003> ::= <0003> <struct_declaration>

<list_struct_declaration> ::= <0003>

<0004> ::= <formal_declaration>
<0004> ::= <0004> , <formal_declaration>

<formals_declaration> ::=
<formals_declaration> ::= <0004>

<formal_declaration> ::= <opt_decl_specifier> <dcltr>

<opt_decl_specifier> ::=
<opt_decl_specifier> ::= <decl_specifier>

<0005> ::= <tc_specifier>
<0005> ::= <0005> <tc_specifier>

<decl_specifier> ::= <0005>
<tc_specifier> ::= <std_class>
<tc_specifier> ::= <type_specifier>

<std_class> ::= auto
<std_class> ::= static
<std_class> ::= extern
<std_class> ::= register
<std_class> ::= typedef

<type_specifier> ::= <typedef_name>
<type_specifier> ::= <std_type>
<type_specifier> ::= <struct_specifier>
<type_specifier> ::= <enum_specifier>

<std_type> ::= char
<std_type> ::= float
<std_type> ::= double
<std_type> ::= int
<std_type> ::= short
<std_type> ::= long
<std_type> ::= unsigned
<std_type> ::= void

<struct_specifier> ::= <struct_type> <struct_name>
<struct_specifier> ::= <union_type> <union_name>
<struct_specifier> ::= <struct_type>
                       { <list_struct_declaration> }
<struct_specifier> ::= <struct_type> <str_tag_dcltr>
                       { <list_struct_declaration> }
<struct_specifier> ::= <union_ctype>
                       { <list_struct_declaration> }
<struct_specifier> ::= <union_ctype> <un_tag_dcltr>
                       { <list_struct_declaration> }

<struct_ctype> ::= struct

<union_ctype> ::= union

<struct_declaration> ::= <decl_specifier> <list_struct_dcltr> ;

<struct_dcltr> ::= <dcltr>
<struct_dcltr> ::= : <exp>
<struct_dcltr> ::= <dcltr> : <exp>

<0006> ::= <enum_dcltr>
<0006> ::= <0006> , <enum_dcltr>

<0007> ::= { <0006> }
<0007> ::= { <0006> , }

<enum_specifier> ::= <enum_ctype> <enum_name>
<enum_specifier> ::= <enum_ctype> <0007>
<enum_specifier> ::= <enum_ctype> <en_tag_dcltr> <0007>

<enum_ctype> ::= enum

<enum_dcltr> ::= <name_dcltr>
<enum_dcltr> ::= <name_dcltr> = <exp>

<name_dcltr> ::= <identifier>

<str_tag_dcltr> ::= <identifier>

<un_tag_dcltr> ::= <identifier>

<en_tag_dcltr> ::= <identifier>

<key_dcltr> ::= <identifier>

<p1_dcltr> ::= <name_dcltr>
<p1_dcltr> ::= ( <dcltr> )

<p2_dcltr> ::= <p1_dcltr>
<p2_dcltr> ::= <p2_dcltr> ( <formals_declaration> )
<p2_dcltr> ::= <p2_dcltr> [ ]
<p2_dcltr> ::= <p2_dcltr> [ <list_exp> ]

<0008> ::= <key_dcltr>
<0008> ::= <0008> , <key_dcltr>

<p3_dcltr> ::= <p2_dcltr>
<p3_dcltr> ::= * <p3_dcltr>

<dcltr> ::= <p3_dcltr>

<init_dcltr> ::= <dcltr>
<init_dcltr> ::= <dcltr> = <init_exp>

<0009> ::= <init_exp>
<0009> ::= <0009> , <init_exp>

<init_exp> ::= <exp>
<init_exp> ::= { <0009> }
<init_exp> ::= { <0009> , }

<p1_abs_dcltr> ::= ( <p3_abs_dcltr> )

<p2_abs_dcltr> ::= <p1_abs_dcltr>
<p2_abs_dcltr> ::= <p2_abs_dcltr> ( )
<p2_abs_dcltr> ::= ( )
<p2_abs_dcltr> ::= <p2_abs_dcltr> [ ]
<p2_abs_dcltr> ::= <p2_abs_dcltr> [ <list_exp> ]
<p2_abs_dcltr> ::= <e_abs_dcltr> [ ]
<p2_abs_dcltr> ::= <e_abs_dcltr> [ <list_exp> ]

<p3_abs_dcltr> ::= <p2_abs_dcltr>
<p3_abs_dcltr> ::= * <p3_abs_dcltr>
<p3_abs_dcltr> ::= * <e_abs_dcltr>

<e_abs_dcltr> ::=

<abs_dcltr> ::= <p3_abs_dcltr>
<abs_dcltr> ::= <e_abs_dcltr>

<0010> ::= <init_dcltr>
<0010> ::= <0010> , <init_dcltr>

<list_init_dcltr> ::= <0010>

<0011> ::= <struct_dcltr>
<0011> ::= <0011> , <struct_dcltr>

<list_struct_dcltr> ::= <0011>

<0012> ::= <dcltr>
<0012> ::= <0012> , <dcltr>

<list_dcltr> ::= <0012>

<0013> ::=
<0013> ::= <0013> <decl or stmt>

<compound_stmt ::= { <0013> }

<decl or stmt> ::= <local_data_declaration>
<decl or stmt> ::= <stmt>

<basic_stmt> ::= <e_stmt>
<basic_stmt> ::= <compound_stmt>
<basic_stmt> ::= <do_stmt>
<basic_stmt> ::= <break_stmt>
<basic_stmt> ::= <continue_stmt>
<basic_stmt> ::= <return_stmt>
<basic_stmt> ::= <goto_stmt>
<basic_stmt> ::= <null_stmt>

<bal_stmt> ::= <basic_stmt>
<bal_stmt> ::= <bal_while_stmt>
<bal_stmt> ::= <bal_for_stmt>
<bal_stmt> ::= <bal_ifelse_stmt>
<bal_stmt> ::= <bal_switch_stmt>
<bal_stmt> ::= <label> <bal_stmt>

<unbal_stmt> ::= <unbal_while_stmt>
<unbal_stmt> ::= <unbal_for_stmt>
<unbal_stmt> ::= <unbal_if_stmt>
<unbal_stmt> ::= <unbal_ifelse_stmt>
<unbal_stmt> ::= <unbal_switch_stmt>
<unbal_stmt> ::= <label> <unbal_stmt>

<bal_ifelse_stmt> ::= if ( <list_exp> ) <bal_stmt>
                      else <bal_stmt>

<unbal_ifelse_stmt> ::= if ( <list_exp> ) <bal_stmt>
                        else <unbal_stmt>

<unbal_if_stmt> ::= if ( <list_exp> ) <stmt>

<stmt> ::= <bal_stmt>
<stmt> ::= <unbal_stmt>

<e_stmt> ::= <list_exp> ;

<bal_while_stmt> ::= while ( <list_exp> ) <bal_stmt>

<unbal_while_stmt> ::= while ( <list_exp> ) <unbal_stmt>

<do_stmt> ::= do <stmt> while ( <list_exp> ) ;

<0014> ::= ; ) <bal_stmt>
<0014> ::= ; <list_exp> ) <bal_stmt>

<0015> ::= ; <0014>
<0015> ::= ; <list_exp> <0014>

<bal_for_stmt> ::= for ( <0015>
<bal_for_stmt> ::= for ( <list_exp> <0015>

<0016> ::= ; ) <unbal_stmt>
<0016> ::= ; <list_exp> ) <unbal_stmt>

<0017> ::= ; <0016>
<0017> ::= ; <list_exp> <0016>

<unbal_for_stmt> ::= for ( <0017>
<unbal_for_stmt> ::= for <list_exp> <0017>

<bal_switch_stmt> ::= switch ( <list_exp> ) <bal_stmt>

<unbal_switch_stmt> ::= switch ( <list_exp> ) <unbal_stmt>

<break_stmt> ::= break ;

<continue_stmt> ::= continue ;

<return_stmt> ::= return ;
<return_stmt> ::= return <list_exp> ;

<goto_stmt> ::= goto <label_name> ;

<null_stmt> ::= ;

<label> ::= <name_label>
<label> ::= <case_label>
<label> ::= <default_label>

<name_label> ::= <identifier> :

<case_label> ::= case <exp> :

<default_label> ::= default:

<literal> ::= <dec_int>
<literal> ::= <oct_int>
<literal> ::= <hex_int>
<literal> ::= <float>
<literal> ::= <char>
<literal> ::= <string>

<id_name> ::= <identifier>

<struct_name> ::= <identifier>

<union_name> ::= <identifier>

<enum_name> ::= <identifier>

<label_name> ::= <identifier>

<field_name> ::= <identifier>

<paren_exp> ::= ( <list_exp> )

<primary_p1_exp> ::= <id_name>
<primary_p1_exp> ::= <literal>
<primary_p1_exp> ::= <paren_exp>
<primary_p1_exp> ::= sizeof ( <typename_declaration> )

<primary_p2_exp> ::= <primary_p1_exp>
<primary_p2_exp> ::= <primary_p2_exp> [ <list_exp> ]
<primary_p2_exp> ::= <primary_p2_exp> ( )
<primary_p2_exp> ::= <primary_p2_exp> ( <list_exp> )
<primary_p2_exp> ::= <primary_p2_exp> . <field_name>
<primary_p2_exp> ::= <primary_p2_exp> -> <field_name>

<primary_exp> ::= <primary_p2_exp>

<postfix_exp> ::= <primary_exp>
<postfix_exp> ::= <postfix_exp> <postfix_op>

<postfix_op> ::= ++
<postfix_op> ::= --

<prefix_exp> ::= <postfix_exp>
<prefix_exp> ::= sizeof <prefix_exp>
<prefix_exp> ::= <prefix_op> <cast_exp>
<prefix_exp> ::= * <cast_exp>
<prefix_exp> ::= & <cast_exp>
<prefix_exp> ::= <negate_op> <cast_exp>

<prefix_op> ::= ++
<prefix_op> ::= --

<negate_op> ::= -
<negate_op> ::= !
<negate_op> ::= ~

<cast_exp> ::= <prefix_exp>
<cast_exp> ::= ( <typename_declaration> ) <cast_exp>

<unary_oper_exp> ::= <cast_exp>

<mult_oper_exp> ::= <unary_oper_exp>
<mult_oper_exp> ::= <mult_oper_exp> <mult_op> <unary_oper_exp>

<mult_op> ::= *
<mult_op> ::= /
<mult_op> ::= %

<add_oper_exp> ::= <mult_oper_exp>
<add_oper_exp> ::= <add_oper_exp> <add_op> <mult_oper_exp>

<add_op> ::= +
<add_op> ::= -

<shift_oper_exp> ::= <add_oper_exp>
<shift_oper_exp> ::= <shift_oper_exp> <add_op> <mult_oper_exp>

<shift_op> ::= <<
<shift_op> ::= >>

<rel_oper_exp> ::= <shift_oper_exp>
<rel_oper_exp> ::= <rel_oper_exp> <rel_op> <shift_oper_exp>

<rel_op> ::= <
<rel_op> ::= <=
<rel_op> ::= >=
<rel_op> ::= >

<equ_oper_exp> ::= <rel_oper_exp>
<equ_oper_exp> ::= <equ_oper_exp> <equ_op> <rel_oper_exp>

<equ_op> ::= ==
<equ_op> ::= !=

<bitand_oper_exp> ::= <equ_oper_exp>
<bitand_oper_exp> ::= <bitand_oper_exp> & <equ_oper_exp>

<bitxor_oper_exp> ::=<bitand_oper_exp>
<bitxor_oper_exp> ::= <bitxor_oper_exp> ^ <bitand_oper_exp>

<bitor_oper_exp> ::= <bitxor_oper_exp>
<bitor_oper_exp> ::= <bitor_oper_exp> | <bitxor_oper_exp>

<and_oper_exp> ::= <bitor_oper_exp>
<and_oper_exp> ::= <and_oper_exp> && <bitor_oper_exp>

<or_oper_exp> ::= <and_oper_exp>
<or_oper_exp> ::= <or_oper_exp> || <and_oper_exp>

<cond_exp> ::= <or_oper_exp>
<cond_exp> ::= <or_oper_exp> ? <list_exp> : <cond_exp>

<assign_exp> ::= <cond_exp>
<assign_exp> ::= <cond_exp> <asgn_op> <exp>

<asgn_op> ::= =
<asgn_op> ::= +=
<asgn_op> ::= -=
<asgn_op> ::= *=
<asgn_op> ::= /=
<asgn_op> ::= %=
<asgn_op> ::= >>=
<asgn_op> ::= <<=
<asgn_op> ::= &=
<asgn_op> ::= ^=
<asgn_op> ::= |=

<exp> ::= <assign_exp>

<list_exp> ::= <exp>
<list_exp> ::= <list_exp> , <exp>
