Exemplo n.º 1
0
 public final void fileElement() throws ParseException {
   /*@bgen(jjtree) fileElement */
   SelfCompilingNode jjtn000 =
       (SelfCompilingNode) n3phele.service.nShell.ShellNode.jjtCreate(JJTFILEELEMENT);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   Token f;
   Token m;
   try {
     f = jj_consume_token(FILESPEC);
     m = f;
     switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
       case COLON:
         jj_consume_token(COLON);
         m = jj_consume_token(FILESPEC);
         break;
       default:
         jj_la1[21] = jj_gen;
         ;
     }
     jjtree.closeNodeScope(jjtn000, true);
     jjtc000 = false;
     jjtn000.jjtSetValue(f.image + ":" + m.image);
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
 }
Exemplo n.º 2
0
 public final void expression() throws ParseException {
   /*@bgen(jjtree) expression */
   SelfCompilingNode jjtn000 =
       (SelfCompilingNode) n3phele.service.nShell.ShellNode.jjtCreate(JJTEXPRESSION);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   Token t;
   try {
     switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
       case VARIABLE:
         t = jj_consume_token(VARIABLE);
         jjtree.pushNode(getExpressionNode(t.image, t.beginLine, t.beginColumn));
         break;
       case WRAPPEDEXPRESSION:
         t = jj_consume_token(WRAPPEDEXPRESSION);
         jjtree.pushNode(getExpressionNode(t.image, t.beginLine, t.beginColumn));
         break;
       case EXPRESSION:
         t = jj_consume_token(EXPRESSION);
         jjtree.pushNode(getExpressionNode(t.image, t.beginLine, t.beginColumn));
         break;
       default:
         jj_la1[12] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
     }
     jjtree.closeNodeScope(jjtn000, true);
     jjtc000 = false;
     if (t.specialToken != null) jjtn000.jjtSetValue(t.specialToken.image);
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
 }
Exemplo n.º 3
0
 public final void destroy() throws ParseException {
   /*@bgen(jjtree) destroy */
   SelfCompilingNode jjtn000 =
       (SelfCompilingNode) n3phele.service.nShell.ShellNode.jjtCreate(JJTDESTROY);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   try {
     jj_consume_token(DESTROY);
     expression();
   } catch (Throwable jjte000) {
     if (jjtc000) {
       jjtree.clearNodeScope(jjtn000);
       jjtc000 = false;
     } else {
       jjtree.popNode();
     }
     if (jjte000 instanceof RuntimeException) {
       {
         if (true) throw (RuntimeException) jjte000;
       }
     }
     if (jjte000 instanceof ParseException) {
       {
         if (true) throw (ParseException) jjte000;
       }
     }
     {
       if (true) throw (Error) jjte000;
     }
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
 }
Exemplo n.º 4
0
 public final void literalArg() throws ParseException {
   /*@bgen(jjtree) literalArg */
   SelfCompilingNode jjtn000 =
       (SelfCompilingNode) n3phele.service.nShell.ShellNode.jjtCreate(JJTLITERALARG);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   Token t;
   try {
     switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
       case NON_SPACE_ARG:
         t = jj_consume_token(NON_SPACE_ARG);
         break;
       case LITERAL_STRING:
         t = jj_consume_token(LITERAL_STRING);
         break;
       case LITERALBLOCK:
         t = jj_consume_token(LITERALBLOCK);
         break;
       default:
         jj_la1[7] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
     }
     jjtree.closeNodeScope(jjtn000, true);
     jjtc000 = false;
     jjtn000.jjtSetValue(t.image);
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
 }
Exemplo n.º 5
0
 public final void variableAssign() throws ParseException {
   /*@bgen(jjtree) variableAssign */
   SelfCompilingNode jjtn000 =
       (SelfCompilingNode) n3phele.service.nShell.ShellNode.jjtCreate(JJTVARIABLEASSIGN);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   Token t;
   try {
     t = jj_consume_token(VARIABLEASSIGN);
     switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
       case ON:
       case CREATEVM:
       case ONEXIT:
       case ASSIMILATEVM:
       case DESTROY:
       case LOG:
         simpleCommand();
         break;
       case VARIABLE:
       case EXPRESSION:
       case STRING_LITERAL:
       case NUMBER_CONSTANT:
       case WRAPPEDEXPRESSION:
         expressionOrConstant();
         break;
       default:
         jj_la1[11] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
     }
     jjtree.closeNodeScope(jjtn000, true);
     jjtc000 = false;
     jjtn000.jjtSetValue(t.image);
   } catch (Throwable jjte000) {
     if (jjtc000) {
       jjtree.clearNodeScope(jjtn000);
       jjtc000 = false;
     } else {
       jjtree.popNode();
     }
     if (jjte000 instanceof RuntimeException) {
       {
         if (true) throw (RuntimeException) jjte000;
       }
     }
     if (jjte000 instanceof ParseException) {
       {
         if (true) throw (ParseException) jjte000;
       }
     }
     {
       if (true) throw (Error) jjte000;
     }
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
 }
Exemplo n.º 6
0
 public final SelfCompilingNode script() throws ParseException {
   /*@bgen(jjtree) script */
   SelfCompilingNode jjtn000 =
       (SelfCompilingNode) n3phele.service.nShell.ShellNode.jjtCreate(JJTSCRIPT);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   try {
     label_1:
     while (true) {
       switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
         case ON:
         case CREATEVM:
         case FORLOOP:
         case ONEXIT:
         case EXPORT:
         case ASSIMILATEVM:
         case DESTROY:
         case LOG:
         case VARIABLEASSIGN:;
           break;
         default:
           jj_la1[0] = jj_gen;
           break label_1;
       }
       command();
     }
     jj_consume_token(0);
     jjtree.closeNodeScope(jjtn000, true);
     jjtc000 = false;
     {
       if (true) return (SelfCompilingNode) jjtn000;
     }
   } catch (Throwable jjte000) {
     if (jjtc000) {
       jjtree.clearNodeScope(jjtn000);
       jjtc000 = false;
     } else {
       jjtree.popNode();
     }
     if (jjte000 instanceof RuntimeException) {
       {
         if (true) throw (RuntimeException) jjte000;
       }
     }
     if (jjte000 instanceof ParseException) {
       {
         if (true) throw (ParseException) jjte000;
       }
     }
     {
       if (true) throw (Error) jjte000;
     }
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
   throw new Error("Missing return statement in function");
 }
Exemplo n.º 7
0
 public final void fileList() throws ParseException {
   /*@bgen(jjtree) fileList */
   SelfCompilingNode jjtn000 =
       (SelfCompilingNode) n3phele.service.nShell.ShellNode.jjtCreate(JJTFILELIST);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   Token f;
   Token m;
   try {
     jj_consume_token(FILELIST);
     switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
       case FILESPEC:
         fileElement();
         label_9:
         while (true) {
           switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
             case COMMA:;
               break;
             default:
               jj_la1[19] = jj_gen;
               break label_9;
           }
           jj_consume_token(COMMA);
           fileElement();
         }
         break;
       default:
         jj_la1[20] = jj_gen;
         ;
     }
     jj_consume_token(FILELISTEND);
   } catch (Throwable jjte000) {
     if (jjtc000) {
       jjtree.clearNodeScope(jjtn000);
       jjtc000 = false;
     } else {
       jjtree.popNode();
     }
     if (jjte000 instanceof RuntimeException) {
       {
         if (true) throw (RuntimeException) jjte000;
       }
     }
     if (jjte000 instanceof ParseException) {
       {
         if (true) throw (ParseException) jjte000;
       }
     }
     {
       if (true) throw (Error) jjte000;
     }
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
 }
Exemplo n.º 8
0
 public final void option() throws ParseException {
   /*@bgen(jjtree) option */
   SelfCompilingNode jjtn000 =
       (SelfCompilingNode) n3phele.service.nShell.ShellNode.jjtCreate(JJTOPTION);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   Token t;
   try {
     switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
       case OPTION:
         t = jj_consume_token(OPTION);
         arg();
         break;
       case NO_ARG_OPTION:
         t = jj_consume_token(NO_ARG_OPTION);
         break;
       default:
         jj_la1[5] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
     }
     jjtree.closeNodeScope(jjtn000, true);
     jjtc000 = false;
     jjtn000.jjtSetValue(t.image);
   } catch (Throwable jjte000) {
     if (jjtc000) {
       jjtree.clearNodeScope(jjtn000);
       jjtc000 = false;
     } else {
       jjtree.popNode();
     }
     if (jjte000 instanceof RuntimeException) {
       {
         if (true) throw (RuntimeException) jjte000;
       }
     }
     if (jjte000 instanceof ParseException) {
       {
         if (true) throw (ParseException) jjte000;
       }
     }
     {
       if (true) throw (Error) jjte000;
     }
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
 }
Exemplo n.º 9
0
 public final void onexit() throws ParseException {
   /*@bgen(jjtree) onexit */
   SelfCompilingNode jjtn000 =
       (SelfCompilingNode) n3phele.service.nShell.ShellNode.jjtCreate(JJTONEXIT);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   try {
     jj_consume_token(ONEXIT);
     expression();
     label_5:
     while (true) {
       switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
         case NO_ARG_OPTION:
         case OPTION:;
           break;
         default:
           jj_la1[9] = jj_gen;
           break label_5;
       }
       option();
     }
     pieces();
   } catch (Throwable jjte000) {
     if (jjtc000) {
       jjtree.clearNodeScope(jjtn000);
       jjtc000 = false;
     } else {
       jjtree.popNode();
     }
     if (jjte000 instanceof RuntimeException) {
       {
         if (true) throw (RuntimeException) jjte000;
       }
     }
     if (jjte000 instanceof ParseException) {
       {
         if (true) throw (ParseException) jjte000;
       }
     }
     {
       if (true) throw (Error) jjte000;
     }
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
 }
Exemplo n.º 10
0
 public final void forCommand() throws ParseException {
   /*@bgen(jjtree) forCommand */
   SelfCompilingNode jjtn000 =
       (SelfCompilingNode) n3phele.service.nShell.ShellNode.jjtCreate(JJTFORCOMMAND);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   Token t;
   try {
     t = jj_consume_token(FORLOOP);
     variable();
     jj_consume_token(COLON);
     expressionOrNumeric();
     switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
       case COLON:
         jj_consume_token(COLON);
         expressionOrNumeric();
         break;
       default:
         jj_la1[3] = jj_gen;
         ;
     }
     block(t.beginLine, t.beginColumn);
   } catch (Throwable jjte000) {
     if (jjtc000) {
       jjtree.clearNodeScope(jjtn000);
       jjtc000 = false;
     } else {
       jjtree.popNode();
     }
     if (jjte000 instanceof RuntimeException) {
       {
         if (true) throw (RuntimeException) jjte000;
       }
     }
     if (jjte000 instanceof ParseException) {
       {
         if (true) throw (ParseException) jjte000;
       }
     }
     {
       if (true) throw (Error) jjte000;
     }
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
 }
Exemplo n.º 11
0
 public final void assimilatevm() throws ParseException {
   /*@bgen(jjtree) assimilatevm */
   SelfCompilingNode jjtn000 =
       (SelfCompilingNode) n3phele.service.nShell.ShellNode.jjtCreate(JJTASSIMILATEVM);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   try {
     jj_consume_token(ASSIMILATEVM);
     label_6:
     while (true) {
       option();
       switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
         case NO_ARG_OPTION:
         case OPTION:;
           break;
         default:
           jj_la1[10] = jj_gen;
           break label_6;
       }
     }
   } catch (Throwable jjte000) {
     if (jjtc000) {
       jjtree.clearNodeScope(jjtn000);
       jjtc000 = false;
     } else {
       jjtree.popNode();
     }
     if (jjte000 instanceof RuntimeException) {
       {
         if (true) throw (RuntimeException) jjte000;
       }
     }
     if (jjte000 instanceof ParseException) {
       {
         if (true) throw (ParseException) jjte000;
       }
     }
     {
       if (true) throw (Error) jjte000;
     }
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
 }
Exemplo n.º 12
0
 public final void variable() throws ParseException {
   /*@bgen(jjtree) variable */
   SelfCompilingNode jjtn000 =
       (SelfCompilingNode) n3phele.service.nShell.ShellNode.jjtCreate(JJTVARIABLE);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   Token t;
   try {
     t = jj_consume_token(VARIABLE);
     jjtree.closeNodeScope(jjtn000, true);
     jjtc000 = false;
     jjtn000.jjtSetValue(t.image);
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
 }
Exemplo n.º 13
0
 public final void block(int blockLine, int indent) throws ParseException {
   /*@bgen(jjtree) block */
   SelfCompilingNode jjtn000 =
       (SelfCompilingNode) n3phele.service.nShell.ShellNode.jjtCreate(JJTBLOCK);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   try {
     label_2:
     while (true) {
       if (getToken(1).kind != EOF && indent < getToken(1).beginColumn) {;
       } else {
         break label_2;
       }
       command();
     }
   } catch (Throwable jjte000) {
     if (jjtc000) {
       jjtree.clearNodeScope(jjtn000);
       jjtc000 = false;
     } else {
       jjtree.popNode();
     }
     if (jjte000 instanceof RuntimeException) {
       {
         if (true) throw (RuntimeException) jjte000;
       }
     }
     if (jjte000 instanceof ParseException) {
       {
         if (true) throw (ParseException) jjte000;
       }
     }
     {
       if (true) throw (Error) jjte000;
     }
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
 }
Exemplo n.º 14
0
 public final void pieces() throws ParseException {
   /*@bgen(jjtree) pieces */
   SelfCompilingNode jjtn000 =
       (SelfCompilingNode) n3phele.service.nShell.ShellNode.jjtCreate(JJTPIECES);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   boolean lastWasExp = false;
   try {
     label_8:
     while (true) {
       switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
         case VARIABLE:
         case EXPRESSION:
         case WRAPPEDEXPRESSION:
           expression();
           lastWasExp = true;
           break;
         case STRING_LITERAL:
         case NUMBER_CONSTANT:
         case PASSTHRU:
         case PASSTHRUMORE:
           passThru(lastWasExp);
           lastWasExp = false;
           break;
         default:
           jj_la1[17] = jj_gen;
           jj_consume_token(-1);
           throw new ParseException();
       }
       switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
         case VARIABLE:
         case EXPRESSION:
         case STRING_LITERAL:
         case NUMBER_CONSTANT:
         case PASSTHRU:
         case PASSTHRUMORE:
         case WRAPPEDEXPRESSION:;
           break;
         default:
           jj_la1[18] = jj_gen;
           break label_8;
       }
     }
   } catch (Throwable jjte000) {
     if (jjtc000) {
       jjtree.clearNodeScope(jjtn000);
       jjtc000 = false;
     } else {
       jjtree.popNode();
     }
     if (jjte000 instanceof RuntimeException) {
       {
         if (true) throw (RuntimeException) jjte000;
       }
     }
     if (jjte000 instanceof ParseException) {
       {
         if (true) throw (ParseException) jjte000;
       }
     }
     {
       if (true) throw (Error) jjte000;
     }
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
 }
Exemplo n.º 15
0
 public final void passThru(boolean lastWasExp) throws ParseException {
   /*@bgen(jjtree) passThru */
   SelfCompilingNode jjtn000 =
       (SelfCompilingNode) n3phele.service.nShell.ShellNode.jjtCreate(JJTPASSTHRU);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
   Token t;
   String result = null;
   Token first = null;
   String prefix = "";
   try {
     label_7:
     while (true) {
       t = passThruFragment();
       if (first == null) {
         first = t;
         if (lastWasExp) {
           if (first.specialToken != null) {
             prefix = first.specialToken.image;
           }
         }
       }
       result =
           result == null
               ? prefix + t.image
               : result + (t.specialToken != null ? t.specialToken.image : "") + t.image;
       switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
         case STRING_LITERAL:
         case NUMBER_CONSTANT:
         case PASSTHRU:
         case PASSTHRUMORE:;
           break;
         default:
           jj_la1[16] = jj_gen;
           break label_7;
       }
     }
     jjtree.closeNodeScope(jjtn000, true);
     jjtc000 = false;
     jjtn000.jjtSetValue(result);
   } catch (Throwable jjte000) {
     if (jjtc000) {
       jjtree.clearNodeScope(jjtn000);
       jjtc000 = false;
     } else {
       jjtree.popNode();
     }
     if (jjte000 instanceof RuntimeException) {
       {
         if (true) throw (RuntimeException) jjte000;
       }
     }
     if (jjte000 instanceof ParseException) {
       {
         if (true) throw (ParseException) jjte000;
       }
     }
     {
       if (true) throw (Error) jjte000;
     }
   } finally {
     if (jjtc000) {
       jjtree.closeNodeScope(jjtn000, true);
     }
   }
 }