Пример #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;
   // 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;
 }
Пример #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_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;
 }