B<char> = 0;
B<identifier> = 1;
B<integer-constant> = 2;
B<character-constant> = 3;
B<floating-constant> = 4;
B<string> = 5;
B<EOF> = 6;
P<primary-expression> = 
   <identifier>,
   <constant>,
   <string>,
   '(' <expression> ')';
P<post-increment-op> = 
   '++',
   '--';
P<postfix-lvalue-expression> = 
   <primary-expression> <rest-of-postfix-expression>;
P<rest-of-postfix-expression> = 
   '[' <expression> ']' <rest-of-postfix-expression>,
   '(' <param-list> ')' <non-empty-rest-of-postfix-expression>,
   '.' <identifier> <rest-of-postfix-expression>,
   '->' <identifier> <rest-of-postfix-expression>,
   <post-increment-op> <rest-of-postfix-expression>,
  ;
P<non-empty-rest-of-postfix-expression> = 
   '[' <expression> ']' <rest-of-postfix-expression>,
   '(' <param-list> ')' <non-empty-rest-of-postfix-expression>,
   '.' <identifier> <rest-of-postfix-expression>,
   '->' <identifier> <rest-of-postfix-expression>,
   <post-increment-op> <rest-of-postfix-expression>;
P<postfix-rvalue-expression> = 
   <primary-expression> <rest-of-postfix-rvalue-expression>;
P<rest-of-postfix-rvalue-expression> = 
   '[' <expression> ']' <rest-of-postfix-rvalue-expression>,
   '(' <param-list> ')' <rest-of-postfix-rvalue-expression>,
   '.' <identifier> <rest-of-postfix-rvalue-expression>,
   '->' <identifier> <rest-of-postfix-rvalue-expression>,
   <post-increment-op> <rest-of-postfix-rvalue-expression>,
  ;
P<signed> = 
   "signed",
   "unsigned",
  ;
P<inttype> = 
   "short" <int>,
   "long" "long" <int>,
   "long" <int>;
P<int> = 
   "int",
  ;
P<type-specifier> = 
   "void",
   <signed> "char",
   <signed> <inttype>,
   "float",
   "double",
   <typedef-name>;
P<indirection-unary-ops> = 
   '*' <rest-of-indirection-unary-ops>;
P<rest-of-indirection-unary-ops> = 
   '*' <rest-of-indirection-unary-ops>,
  ;
P<arithmetic-unary-op> = 
   '+',
   '-';
P<boolean-unary-ops> = 
   '!' <rest-of-boolean-unary-ops>;
P<rest-of-boolean-unary-ops> = 
   '!' <rest-of-boolean-unary-ops>,
  ;
P<bitwise-unary-ops> = 
   '~' <rest-of-bitwise-unary-ops>;
P<rest-of-bitwise-unary-ops> = 
   '~' <rest-of-bitwise-unary-ops>,
  ;
P<address-operator> = 
   '&';
P<pre-increment-op> = 
   '++',
   '--';
P<optionally-cast-unary-rvalue-expression> = 
   '(' <type-specifier> ')' <optionally-cast-unary-rvalue-expression>,
   <unary-rvalue-expression>;
P<optionally-cast-postfix-rvalue-expression> = 
   '(' <type-specifier> ')' <optionally-cast-postfix-rvalue-expression>,
   <postfix-rvalue-expression>;
P<unary-rvalue-expression> = 
   <arithmetic-unary-op> <optionally-cast-unary-rvalue-expression>,
   <boolean-unary-ops> <optionally-cast-unary-rvalue-expression>,
   <bitwise-unary-ops> <optionally-cast-unary-rvalue-expression>,
   <indirection-unary-ops> <unary-address-expression>,
   "sizeof" <unary-rvalue-expression>,
   "sizeof" <unary-lvalue-expression>,
   "sizeof" <type-specifier>,
   <optionally-cast-postfix-rvalue-expression>;
P<optionally-cast-unary-lvalue-expression> = 
   '(' <type-specifier> ')' <optionally-cast-unary-lvalue-expression>,
   <unary-lvalue-expression>;
P<unary-lvalue-expression> = 
   <pre-increment-op> <unary-lvalue-expression>,
   <indirection-unary-ops> <unary-address-expression>,
   <postfix-lvalue-expression>;
P<unary-address-expression> = 
   <address-operator> <optionally-cast-unary-lvalue-expression>;
P<multiplicative-expression> = 
   <unary-rvalue-expression> <rest-of-multiplicative-expression>;
P<rest-of-multiplicative-expression> = 
   <mulop> <unary-rvalue-expression> <rest-of-multiplicative-expression>,
  ;
P<mulop> = 
   '*',
   '/',
   '%';
P<additive-expression> = 
   <multiplicative-expression> <rest-of-additive-expression>;
P<rest-of-additive-expression> = 
   <plusminus> <multiplicative-expression> <rest-of-additive-expression>,
  ;
P<plusminus> = 
   '+',
   '-';
P<shift-expression> = 
   <additive-expression> <rest-of-shift-expression>;
P<rest-of-shift-expression> = 
   <shiftop> <additive-expression> <rest-of-shift-expression>,
  ;
P<shiftop> = 
   '<<',
   '>>';
P<relational-expression> = 
   <shift-expression> <rest-of-relational-expression>;
P<rest-of-relational-expression> = 
   <relop> <shift-expression> <rest-of-relational-expression>,
  ;
P<relop> = 
   '<=',
   '<',
   '>=',
   '>';
P<equality-expression> = 
   <relational-expression> <rest-of-equality-expression>;
P<rest-of-equality-expression> = 
   <eqop> <relational-expression> <rest-of-equality-expression>,
  ;
P<eqop> = 
   '==',
   '!=';
P<bitwise-and-expression> = 
   <equality-expression> <rest-of-bitwise-and-expression>;
P<rest-of-bitwise-and-expression> = 
   '&' <equality-expression> <rest-of-bitwise-and-expression>,
  ;
P<exclusive-or-expression> = 
   <bitwise-and-expression> <rest-of-exclusive-or-expression>;
P<rest-of-exclusive-or-expression> = 
   '^' <bitwise-and-expression> <rest-of-exclusive-or-expression>,
  ;
P<inclusive-or-expression> = 
   <exclusive-or-expression> <rest-of-inclusive-or-expression>;
P<rest-of-inclusive-or-expression> = 
   '|' <exclusive-or-expression> <rest-of-inclusive-or-expression>,
  ;
P<logical-and-expression> = 
   <inclusive-or-expression> <rest-of-logical-and-expression>;
P<rest-of-logical-and-expression> = 
   '&&' <inclusive-or-expression> <rest-of-logical-and-expression>,
  ;
P<logical-or-expression> = 
   <logical-and-expression> <rest-of-logical-or-expression>;
P<rest-of-logical-or-expression> = 
   '||' <logical-and-expression> <rest-of-logical-or-expression>,
  ;
P<conditional-expression> = 
   <logical-or-expression> <rest-of-conditional-expression>;
P<rest-of-conditional-expression> = 
   '?' <expression> ':' <conditional-expression>,
  ;
P<assignment-expression> = 
   <opt-lvalue-assign> <conditional-expression>;
P<opt-lvalue-assign> = 
   <unary-lvalue-expression> <assignment-operator>,
  ;
P<assignment-operator> = 
   '=',
   '*=',
   '/=',
   '%=',
   '+=',
   '-=',
   '<<=',
   '>>=',
   '&=',
   '^=',
   '|=';
P<comma-statement> = 
   <assignment-expression> <rest-of-comma-statement>;
P<rest-of-comma-statement> = 
   ',' <assignment-expression> <rest-of-comma-statement>,
  ;
P<expression> = 
   <comma-statement>;
P<constant-expression> = 
   <conditional-expression>;
P<param-list> = 
   <assignment-expression> <rest-of-param-list>,
  ;
P<rest-of-param-list> = 
   ',' <assignment-expression> <rest-of-param-list>,
  ;
P<constant> = 
   <integer-constant>,
   <character-constant>,
   <floating-constant>,
   <enumeration-constant>;
P<enumeration-constant> = 
   <identifier>;
P<typedef-name> = 
   <identifier>;
P<opt-labels> = 
   <label> ':' <opt-labels>,
   "case" <constant-expression> ':' <opt-labels>,
   "default" ':' <opt-labels>,
  ;
P<label> = 
   <identifier>;
P<SS> = 
   <opt-labels> "if" '(' <expression> ')' '{',
   '}',
   <opt-labels> <expression> ';';
E
