Exemplo n.º 1
0
 public final java_cup.runtime.Symbol do_action(
     int CUP$parser$act_num,
     java_cup.runtime.lr_parser CUP$parser$parser,
     java.util.Stack CUP$parser$stack,
     int CUP$parser$top,
     parser parser)
     throws java.lang.Exception {
   java_cup.runtime.Symbol CUP$parser$result;
   // n_template_parameters ::= n_template_parameters P_COMMA error
   {
     TemplateParameterList RESULT = null;
     TemplateParameterList s =
         (TemplateParameterList)
             ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 2)).value;
     RESULT = s;
     s.addError(parser.errorNode("template parameter list", "template parameter"));
     CUP$parser$result =
         parser
             .getSymbolFactory()
             .newSymbol(
                 "n_template_parameters",
                 160,
                 ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 2)),
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 RESULT);
   }
   return CUP$parser$result;
 }
Exemplo n.º 2
0
 public final java_cup.runtime.Symbol do_action(
     int CUP$parser$act_num,
     java_cup.runtime.lr_parser CUP$parser$parser,
     java.util.Stack CUP$parser$stack,
     int CUP$parser$top,
     parser parser)
     throws java.lang.Exception {
   java_cup.runtime.Symbol CUP$parser$result;
   // c_external_declaration ::= n_module
   {
     ExternalDeclaration RESULT = null;
     Module d = (Module) ((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;
     parser.scopes().clean();
     RESULT = d;
     CUP$parser$result =
         parser
             .getSymbolFactory()
             .newSymbol(
                 "c_external_declaration",
                 136,
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 RESULT);
   }
   return CUP$parser$result;
 }
Exemplo n.º 3
0
 public final java_cup.runtime.Symbol do_action(
     int CUP$parser$act_num,
     java_cup.runtime.lr_parser CUP$parser$parser,
     java.util.Stack CUP$parser$stack,
     int CUP$parser$top,
     parser parser)
     throws java.lang.Exception {
   java_cup.runtime.Symbol CUP$parser$result;
   // c_designator ::= P_POINT error
   {
     Designator RESULT = null;
     Token rl =
         (Token) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).value;
     FieldDesignator result =
         new FieldDesignator(parser.errorNode("field designator", "identifier"));
     RESULT = result;
     result.setLeft(rl.getLeft());
     CUP$parser$result =
         parser
             .getSymbolFactory()
             .newSymbol(
                 "c_designator",
                 120,
                 ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)),
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 RESULT);
   }
   return CUP$parser$result;
 }
Exemplo n.º 4
0
 public final java_cup.runtime.Symbol do_action(
     int CUP$parser$act_num,
     java_cup.runtime.lr_parser CUP$parser$parser,
     java.util.Stack CUP$parser$stack,
     int CUP$parser$top,
     parser parser)
     throws java.lang.Exception {
   java_cup.runtime.Symbol CUP$parser$result;
   // c_compound_literal_head ::= c_round_open c_round_close
   {
     CompoundLiteral RESULT = null;
     Token rl =
         (Token) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).value;
     Token rr = (Token) ((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;
     RESULT =
         new CompoundLiteral(
             parser.missing("compound literal", "type name", rl.getLeft(), rr.getRight()), null);
     CUP$parser$result =
         parser
             .getSymbolFactory()
             .newSymbol(
                 "c_compound_literal_head",
                 34,
                 ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)),
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 RESULT);
   }
   return CUP$parser$result;
 }
Exemplo n.º 5
0
 public final java_cup.runtime.Symbol do_action(
     int CUP$parser$act_num,
     java_cup.runtime.lr_parser CUP$parser$parser,
     java.util.Stack CUP$parser$stack,
     int CUP$parser$top,
     parser parser)
     throws java.lang.Exception {
   java_cup.runtime.Symbol CUP$parser$result;
   // c_storage_class_specifier_norg ::= K_TYPEDEF
   {
     StorageClass RESULT = null;
     Token k = (Token) ((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;
     parser.scopes().typedef();
     RESULT = new StorageClass(k, StorageClass.Storage.TYPEDEF);
     CUP$parser$result =
         parser
             .getSymbolFactory()
             .newSymbol(
                 "c_storage_class_specifier_norg",
                 84,
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 RESULT);
   }
   return CUP$parser$result;
 }
Exemplo n.º 6
0
 public final java_cup.runtime.Symbol do_action(
     int CUP$parser$act_num,
     java_cup.runtime.lr_parser CUP$parser$parser,
     java.util.Stack CUP$parser$stack,
     int CUP$parser$top,
     parser parser)
     throws java.lang.Exception {
   java_cup.runtime.Symbol CUP$parser$result;
   // c_declaration_specifiers ::= c_declaration_specifiers_notp_tn
   {
     DeclarationSpecifierList RESULT = null;
     DeclarationSpecifierList d =
         (DeclarationSpecifierList) ((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;
     RESULT = d;
     CUP$parser$result =
         parser
             .getSymbolFactory()
             .newSymbol(
                 "c_declaration_specifiers",
                 62,
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 RESULT);
   }
   return CUP$parser$result;
 }
Exemplo n.º 7
0
 public final java_cup.runtime.Symbol do_action(
     int CUP$parser$act_num,
     java_cup.runtime.lr_parser CUP$parser$parser,
     java.util.Stack CUP$parser$stack,
     int CUP$parser$top,
     parser parser)
     throws java.lang.Exception {
   java_cup.runtime.Symbol CUP$parser$result;
   // c_type_specifier_notn ::= K_CHAR
   {
     TypeSpecifier RESULT = null;
     Token k = (Token) ((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;
     RESULT = new PrimitiveSpecifier(k, PrimitiveSpecifier.Type.CHAR);
     CUP$parser$result =
         parser
             .getSymbolFactory()
             .newSymbol(
                 "c_type_specifier_notn",
                 88,
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 RESULT);
   }
   return CUP$parser$result;
 }
Exemplo n.º 8
0
 public final java_cup.runtime.Symbol do_action(
     int CUP$parser$act_num,
     java_cup.runtime.lr_parser CUP$parser$parser,
     java.util.Stack CUP$parser$stack,
     int CUP$parser$top,
     parser parser)
     throws java.lang.Exception {
   java_cup.runtime.Symbol CUP$parser$result;
   // c_compound_statement ::= c_curly_open c_curly_close
   {
     CompoundStatement RESULT = null;
     Token lr =
         (Token) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).value;
     Token rr = (Token) ((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;
     CompoundStatement result = new CompoundStatement();
     RESULT = result;
     result.setRanges(lr, rr);
     CUP$parser$result =
         parser
             .getSymbolFactory()
             .newSymbol(
                 "c_compound_statement",
                 124,
                 ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)),
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 RESULT);
   }
   return CUP$parser$result;
 }
Exemplo n.º 9
0
 public final java_cup.runtime.Symbol do_action(
     int CUP$parser$act_num,
     java_cup.runtime.lr_parser CUP$parser$parser,
     java.util.Stack CUP$parser$stack,
     int CUP$parser$top,
     parser parser)
     throws java.lang.Exception {
   java_cup.runtime.Symbol CUP$parser$result;
   // c_abstract_declarator ::= c_pointer c_direct_abstract_declarator
   {
     AbstractDeclarator RESULT = null;
     Pointer p =
         (Pointer)
             ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).value;
     AbstractDeclarator d =
         (AbstractDeclarator) ((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;
     RESULT = new PointerAbstractDeclarator(p, d);
     CUP$parser$result =
         parser
             .getSymbolFactory()
             .newSymbol(
                 "c_abstract_declarator",
                 113,
                 ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)),
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 RESULT);
   }
   return CUP$parser$result;
 }
Exemplo n.º 10
0
 public final java_cup.runtime.Symbol do_action(
     int CUP$parser$act_num,
     java_cup.runtime.lr_parser CUP$parser$parser,
     java.util.Stack CUP$parser$stack,
     int CUP$parser$top,
     parser parser)
     throws java.lang.Exception {
   java_cup.runtime.Symbol CUP$parser$result;
   // c_expression_statement ::= c_semicolon
   {
     Statement RESULT = null;
     Token s = (Token) ((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;
     RESULT = new EmptyStatement(s);
     CUP$parser$result =
         parser
             .getSymbolFactory()
             .newSymbol(
                 "c_expression_statement",
                 127,
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 RESULT);
   }
   return CUP$parser$result;
 }
Exemplo n.º 11
0
 public final java_cup.runtime.Symbol do_action(
     int CUP$parser$act_num,
     java_cup.runtime.lr_parser CUP$parser$parser,
     java.util.Stack CUP$parser$stack,
     int CUP$parser$top,
     parser parser)
     throws java.lang.Exception {
   java_cup.runtime.Symbol CUP$parser$result;
   // n_configuration ::= NK_GENERIC NK_CONFIGURATION error n_component_parameters
   // n_attributes_no_init n_uses_or_provides_block
   {
     Configuration RESULT = null;
     Token rl =
         (Token) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 5)).value;
     Token rr =
         (Token) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 4)).value;
     TemplateParameterList p =
         (TemplateParameterList)
             ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 2)).value;
     AttributeList a =
         (AttributeList)
             ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 1)).value;
     AccessList u = (AccessList) ((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;
     RESULT =
         new Configuration(
             true,
             parser.errorNode("configuration", "identifier"),
             p,
             a,
             u,
             parser.missing("configuration", "implementation", u.getRange().getRight()));
     RESULT.setLeft(rl.getLeft());
     CUP$parser$result =
         parser
             .getSymbolFactory()
             .newSymbol(
                 "n_configuration",
                 180,
                 ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 5)),
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 RESULT);
   }
   return CUP$parser$result;
 }
Exemplo n.º 12
0
 public final java_cup.runtime.Symbol do_action(
     int CUP$parser$act_num,
     java_cup.runtime.lr_parser CUP$parser$parser,
     java.util.Stack CUP$parser$stack,
     int CUP$parser$top,
     parser parser)
     throws java.lang.Exception {
   java_cup.runtime.Symbol CUP$parser$result;
   // c_enum_specifier ::= K_ENUM c_all_identifier n_attributes c_curly_open error c_curly_close
   {
     TypeSpecifier RESULT = null;
     Token rl =
         (Token) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 5)).value;
     Identifier i =
         (Identifier)
             ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 4)).value;
     AttributeList a =
         (AttributeList)
             ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 3)).value;
     Token rr = (Token) ((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;
     EnumDeclaration declaration =
         new EnumDeclaration(i, a, parser.errorNode("enum declaration", "enum constant list"));
     RESULT = declaration;
     declaration.setRanges(rl, rr);
     CUP$parser$result =
         parser
             .getSymbolFactory()
             .newSymbol(
                 "c_enum_specifier",
                 95,
                 ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top - 5)),
                 ((java_cup.runtime.Symbol) CUP$parser$stack.peek()),
                 RESULT);
   }
   return CUP$parser$result;
 }