%%% parse-tree: 
  TranslationUnit -> Declaration TranslationUnit   %attr { }
    Declaration -> FunctionDefinition   %attr { }
      FunctionDefinition -> DeclSpecifier Declarator FunctionBody   %attr { }
        DeclSpecifier -> StorageClassOpt TypeSpecifier   %attr { }
          StorageClassOpt -> empty   %attr { }
          TypeSpecifier -> SimpleTypeSpecifier   %attr { }
            SimpleTypeSpecifier -> "int"   %attr { }
              int
        Declarator -> DirectDeclarator   %attr { }
          DirectDeclarator -> DirectDeclarator "(" ParameterDeclarationClause ")" CVQualifierSeqOpt   %attr { }
            DirectDeclarator -> VariableName   %attr { }
              VariableName -> L2_NAME   %attr { }
                NAME(foo)
            (
            ParameterDeclarationClause -> empty   %attr { }
            )
            CVQualifierSeqOpt -> empty   %attr { }
        FunctionBody -> CompoundStatement   %attr { }
          CompoundStatement -> "{" StatementSeqOpt "}"   %attr { }
            {
            StatementSeqOpt -> StatementSeqOpt Statement   %attr { }
              StatementSeqOpt -> StatementSeqOpt Statement   %attr { }
                StatementSeqOpt -> StatementSeqOpt Statement   %attr { }
                  StatementSeqOpt -> StatementSeqOpt Statement   %attr { }
                    StatementSeqOpt -> empty   %attr { }
                    2 ALTERNATIVE PARSES for nonterminal Statement:
                      ---- alternative 1 ----
                      Statement -> ExpressionStatement   %attr { }
                        ExpressionStatement -> Expression ";"   %attr { }
                          Expression -> AssignmentExpression   %attr { }
                            AssignmentExpression -> ConditionalExpression   %attr { }
                              ConditionalExpression -> BinaryExpression   %attr { }
                                BinaryExpression -> CastExpression   %attr { prec=100 }
                                  CastExpression -> UnaryExpression   %attr { }
                                    UnaryExpression -> PostfixExpression   %attr { }
                                      PostfixExpression -> PostfixExpression "(" ExpressionList ")"   %attr { }
                                        PostfixExpression -> PrimaryExpression   %attr { }
                                          PrimaryExpression -> VariableName   %attr { }
                                            VariableName -> L2_NAME   %attr { }
                                              NAME(putc)
                                        (
                                        ExpressionList -> AssignmentExpression   %attr { }
                                          AssignmentExpression -> ConditionalExpression   %attr { }
                                            ConditionalExpression -> BinaryExpression   %attr { }
                                              BinaryExpression -> CastExpression   %attr { prec=100 }
                                                CastExpression -> UnaryExpression   %attr { }
                                                  UnaryExpression -> PostfixExpression   %attr { }
                                                    PostfixExpression -> PrimaryExpression   %attr { }
                                                      PrimaryExpression -> VariableName   %attr { }
                                                        VariableName -> L2_NAME   %attr { }
                                                          NAME(EOF)
                                        )
                          ;
                      ---- alternative 2 ----
                      Statement -> BlockDeclaration   %attr { }
                        BlockDeclaration -> SimpleDeclaration   %attr { }
                          SimpleDeclaration -> DeclSpecifier InitDeclaratorListOpt ";"   %attr { }
                            DeclSpecifier -> StorageClassOpt TypeSpecifier   %attr { }
                              StorageClassOpt -> empty   %attr { }
                              TypeSpecifier -> SimpleTypeSpecifier   %attr { }
                                SimpleTypeSpecifier -> TypedefName   %attr { }
                                  TypedefName -> L2_NAME   %attr { }
                                    NAME(putc)
                            InitDeclaratorListOpt -> InitDeclaratorList   %attr { }
                              InitDeclaratorList -> InitDeclarator   %attr { }
                                InitDeclarator -> Declarator   %attr { }
                                  Declarator -> DirectDeclarator   %attr { }
                                    DirectDeclarator -> "(" Declarator ")"   %attr { }
                                      (
                                      Declarator -> DirectDeclarator   %attr { }
                                        DirectDeclarator -> VariableName   %attr { }
                                          VariableName -> L2_NAME   %attr { }
                                            NAME(EOF)
                                      )
                            ;
                  Statement -> ExpressionStatement   %attr { }
                    ExpressionStatement -> Expression ";"   %attr { }
                      Expression -> AssignmentExpression   %attr { }
                        AssignmentExpression -> ConditionalExpression   %attr { }
                          ConditionalExpression -> BinaryExpression   %attr { }
                            BinaryExpression -> CastExpression   %attr { prec=100 }
                              CastExpression -> UnaryExpression   %attr { }
                                UnaryExpression -> PostfixExpression   %attr { }
                                  PostfixExpression -> PostfixExpression "(" ExpressionList ")"   %attr { }
                                    PostfixExpression -> PrimaryExpression   %attr { }
                                      PrimaryExpression -> VariableName   %attr { }
                                        VariableName -> L2_NAME   %attr { }
                                          NAME(printf)
                                    (
                                    ExpressionList -> AssignmentExpression   %attr { }
                                      AssignmentExpression -> ConditionalExpression   %attr { }
                                        ConditionalExpression -> BinaryExpression   %attr { }
                                          BinaryExpression -> CastExpression   %attr { prec=100 }
                                            CastExpression -> UnaryExpression   %attr { }
                                              UnaryExpression -> PostfixExpression   %attr { }
                                                PostfixExpression -> PrimaryExpression   %attr { }
                                                  PrimaryExpression -> Literal   %attr { }
                                                    Literal -> L2_STRING_LITERAL   %attr { }
                                                      STRING_LITERAL("foo\n")
                                    )
                      ;
                Statement -> ExpressionStatement   %attr { }
                  ExpressionStatement -> Expression ";"   %attr { }
                    Expression -> AssignmentExpression   %attr { }
                      AssignmentExpression -> ConditionalExpression   %attr { }
                        ConditionalExpression -> BinaryExpression   %attr { }
                          BinaryExpression -> CastExpression   %attr { prec=100 }
                            CastExpression -> UnaryExpression   %attr { }
                              2 ALTERNATIVE PARSES for nonterminal UnaryExpression:
                                ---- alternative 1 ----
                                UnaryExpression -> "sizeof" "(" TypeId ")"   %attr { }
                                  sizeof
                                  (
                                  TypeId -> TypeSpecifier AbstractDeclarator   %attr { }
                                    TypeSpecifier -> SimpleTypeSpecifier   %attr { }
                                      SimpleTypeSpecifier -> TypedefName   %attr { }
                                        TypedefName -> L2_NAME   %attr { }
                                          NAME(foo)
                                    AbstractDeclarator -> DirectAbstractDeclarator   %attr { }
                                      DirectAbstractDeclarator -> empty   %attr { }
                                  )
                                ---- alternative 2 ----
                                UnaryExpression -> "sizeof" UnaryExpression   %attr { }
                                  sizeof
                                  UnaryExpression -> PostfixExpression   %attr { }
                                    PostfixExpression -> PrimaryExpression   %attr { }
                                      PrimaryExpression -> "(" Expression ")"   %attr { }
                                        (
                                        Expression -> AssignmentExpression   %attr { }
                                          AssignmentExpression -> ConditionalExpression   %attr { }
                                            ConditionalExpression -> BinaryExpression   %attr { }
                                              BinaryExpression -> CastExpression   %attr { prec=100 }
                                                CastExpression -> UnaryExpression   %attr { }
                                                  UnaryExpression -> PostfixExpression   %attr { }
                                                    PostfixExpression -> PrimaryExpression   %attr { }
                                                      PrimaryExpression -> VariableName   %attr { }
                                                        VariableName -> L2_NAME   %attr { }
                                                          NAME(foo)
                                        )
                    ;
              Statement -> "return" Expression ";"   %attr { }
                return
                Expression -> AssignmentExpression   %attr { }
                  AssignmentExpression -> ConditionalExpression   %attr { }
                    ConditionalExpression -> BinaryExpression   %attr { }
                      BinaryExpression.result -> BinaryExpression.left BinaryOperator BinaryExpression.right   %attr { prec=56 }
                        BinaryExpression -> CastExpression   %attr { prec=100 }
                          CastExpression -> UnaryExpression   %attr { }
                            UnaryExpression -> PostfixExpression   %attr { }
                              PostfixExpression -> PrimaryExpression   %attr { }
                                PrimaryExpression -> Literal   %attr { }
                                  Literal -> L2_INT_LITERAL   %attr { }
                                    INT_LITERAL(1)
                        BinaryOperator -> "+"   %attr { leftAssoc=1, prec=56 }
                          +
                        BinaryExpression.result -> BinaryExpression.left BinaryOperator BinaryExpression.right   %attr { prec=60 }
                          BinaryExpression -> CastExpression   %attr { prec=100 }
                            CastExpression -> UnaryExpression   %attr { }
                              UnaryExpression -> PostfixExpression   %attr { }
                                PostfixExpression -> PrimaryExpression   %attr { }
                                  PrimaryExpression -> Literal   %attr { }
                                    Literal -> L2_INT_LITERAL   %attr { }
                                      INT_LITERAL(2)
                          BinaryOperator -> "*"   %attr { leftAssoc=1, prec=60 }
                            *
                          BinaryExpression -> CastExpression   %attr { prec=100 }
                            CastExpression -> UnaryExpression   %attr { }
                              UnaryExpression -> PostfixExpression   %attr { }
                                PostfixExpression -> PrimaryExpression   %attr { }
                                  PrimaryExpression -> Literal   %attr { }
                                    Literal -> L2_INT_LITERAL   %attr { }
                                      INT_LITERAL(3)
                ;
            }
    TranslationUnit -> empty   %attr { }
