Exemple #1
0
 public final Enumeration Enumeration() throws ParseException {
   Token t;
   ASTStringNode name;
   ASTStringNode name1;
   ArrayList<ASTStringNode> name1List = new ArrayList<ASTStringNode>();
   Token firstToken = token;
   jj_consume_token(OB);
   t = jj_consume_token(NAME);
   name = new ASTStringNode(t.toString(), new WToken(token));
   label_6:
   while (true) {
     switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
       case 32:;
         break;
       default:
         jj_la1[16] = jj_gen;
         break label_6;
     }
     jj_consume_token(32);
     t = jj_consume_token(NAME);
     name1 = new ASTStringNode(t.toString(), new WToken(token));
     name1List.add(name1);
   }
   jj_consume_token(CB);
   {
     if (true) return new Enumeration(name, name1List, firstToken.next, token);
   }
   throw new Error("Missing return statement in function");
 }
Exemple #2
0
 public final AttListDecl AttListDecl() throws ParseException {
   Token t;
   ASTStringNode name;
   AttribDef attribDef;
   ArrayList<AttribDef> attribDefList = new ArrayList<AttribDef>();
   Token firstToken = token;
   jj_consume_token(34);
   t = jj_consume_token(NAME);
   name = new ASTStringNode(t.toString(), new WToken(token));
   label_4:
   while (true) {
     switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
       case NAME:;
         break;
       default:
         jj_la1[11] = jj_gen;
         break label_4;
     }
     attribDef = AttribDef();
     attribDefList.add(attribDef);
   }
   jj_consume_token(PCB);
   {
     if (true) return new AttListDecl(name, attribDefList, firstToken.next, token);
   }
   throw new Error("Missing return statement in function");
 }
Exemple #3
0
 public final DTD DTD() throws ParseException {
   DTDEntry dTDEntry;
   ArrayList<DTDEntry> dTDEntryList = new ArrayList<DTDEntry>();
   Token t;
   ASTStringNode eof;
   Token firstToken = token;
   label_1:
   while (true) {
     switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
       case 31:
       case 34:;
         break;
       default:
         jj_la1[0] = jj_gen;
         break label_1;
     }
     dTDEntry = DTDEntry();
     dTDEntryList.add(dTDEntry);
   }
   t = jj_consume_token(0);
   eof = new ASTStringNode(t.toString(), new WToken(token));
   {
     if (true) return new DTD(dTDEntryList, eof, firstToken.next, token);
   }
   throw new Error("Missing return statement in function");
 }
Exemple #4
0
 public final Token getToken(int index) {
   Token t = token;
   for (int i = 0; i < index; i++) {
     if (t.next != null) t = t.next;
     else t = t.next = token_source.getNextToken();
   }
   return t;
 }
Exemple #5
0
 public final Cp Cp() throws ParseException {
   Token t;
   ASTStringNode name;
   Modifier modifier = null;
   SeqOrChoice seqOrChoice;
   Modifier modifier1 = null;
   Token firstToken = token;
   switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
     case PCDATA:
       jj_consume_token(PCDATA);
       {
         if (true) return new Cp1(firstToken.next, token);
       }
       break;
     case NAME:
       t = jj_consume_token(NAME);
       name = new ASTStringNode(t.toString(), new WToken(token));
       switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
         case STAR:
         case PLUS:
         case Q:
           modifier = Modifier();
           break;
         default:
           jj_la1[7] = jj_gen;
           ;
       }
       {
         if (true) return new Cp2(name, modifier, firstToken.next, token);
       }
       break;
     case OB:
       seqOrChoice = SeqOrChoice();
       switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
         case STAR:
         case PLUS:
         case Q:
           modifier1 = Modifier();
           break;
         default:
           jj_la1[8] = jj_gen;
           ;
       }
       {
         if (true) return new Cp3(seqOrChoice, modifier1, firstToken.next, token);
       }
       break;
     default:
       jj_la1[9] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
   }
   throw new Error("Missing return statement in function");
 }
Exemple #6
0
 public final AttribValue AttribValue() throws ParseException {
   Token t;
   ASTStringNode quotedstr;
   Token firstToken = token;
   t = jj_consume_token(QUOTEDSTR);
   quotedstr = new ASTStringNode(t.toString(), new WToken(token));
   {
     if (true) return new AttribValue(quotedstr, firstToken.next, token);
   }
   throw new Error("Missing return statement in function");
 }
Exemple #7
0
 public final ElementDecl ElementDecl() throws ParseException {
   Token t;
   ASTStringNode name;
   ContentSpec contentSpec;
   Token firstToken = token;
   jj_consume_token(31);
   t = jj_consume_token(NAME);
   name = new ASTStringNode(t.toString(), new WToken(token));
   contentSpec = ContentSpec();
   jj_consume_token(PCB);
   {
     if (true) return new ElementDecl(name, contentSpec, firstToken.next, token);
   }
   throw new Error("Missing return statement in function");
 }
Exemple #8
0
 public final AttribDef AttribDef() throws ParseException {
   Token t;
   ASTStringNode name;
   AttribType attribType;
   DefaultDecl defaultDecl;
   Token firstToken = token;
   t = jj_consume_token(NAME);
   name = new ASTStringNode(t.toString(), new WToken(token));
   attribType = AttribType();
   defaultDecl = DefaultDecl();
   {
     if (true) return new AttribDef(name, attribType, defaultDecl, firstToken.next, token);
   }
   throw new Error("Missing return statement in function");
 }
Exemple #9
0
 public void ReInit(ManifestParserTokenManager tm) {
   token_source = tm;
   token = new Token();
   token.next = jj_nt = token_source.getNextToken();
   jj_gen = 0;
   for (int i = 0; i < 4; i++) jj_la1[i] = -1;
 }
Exemple #10
0
 public void ReInit(CharStream stream) {
   token_source.ReInit(stream);
   token = new Token();
   token.next = jj_nt = token_source.getNextToken();
   jj_gen = 0;
   for (int i = 0; i < 4; i++) jj_la1[i] = -1;
 }
Exemple #11
0
 public ManifestParser(CharStream stream) {
   token_source = new ManifestParserTokenManager(stream);
   token = new Token();
   token.next = jj_nt = token_source.getNextToken();
   jj_gen = 0;
   for (int i = 0; i < 4; i++) jj_la1[i] = -1;
 }
Exemple #12
0
 public final Token getNextToken() {
   if (token.next != null) token = token.next;
   else token = token.next = token_source.getNextToken();
   jj_ntk = -1;
   jj_gen++;
   return token;
 }
Exemple #13
0
 private final Token jj_consume_token(int kind) throws ParseException {
   Token oldToken = token;
   if ((token = jj_nt).next != null) jj_nt = jj_nt.next;
   else jj_nt = jj_nt.next = token_source.getNextToken();
   if (token.kind == kind) {
     jj_gen++;
     return token;
   }
   jj_nt = token;
   token = oldToken;
   jj_kind = kind;
   throw generateParseException();
 }
Exemple #14
0
 private final Token jj_consume_token(int kind) throws ParseException {
   Token oldToken;
   if ((oldToken = token).next != null) token = token.next;
   else token = token.next = token_source.getNextToken();
   jj_ntk = -1;
   if (token.kind == kind) {
     jj_gen++;
     if (++jj_gc > 100) {
       jj_gc = 0;
       for (int i = 0; i < jj_2_rtns.length; i++) {
         JJCalls c = jj_2_rtns[i];
         while (c != null) {
           if (c.gen < jj_gen) c.first = null;
           c = c.next;
         }
       }
     }
     return token;
   }
   token = oldToken;
   jj_kind = kind;
   throw generateParseException();
 }
Exemple #15
0
 private final boolean jj_scan_token(int kind) {
   if (jj_scanpos == jj_lastpos) {
     jj_la--;
     if (jj_scanpos.next == null) {
       jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
     } else {
       jj_lastpos = jj_scanpos = jj_scanpos.next;
     }
   } else {
     jj_scanpos = jj_scanpos.next;
   }
   if (jj_rescan) {
     int i = 0;
     Token tok = token;
     while (tok != null && tok != jj_scanpos) {
       i++;
       tok = tok.next;
     }
     if (tok != null) jj_add_error_token(kind, i);
   }
   if (jj_scanpos.kind != kind) return true;
   if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
   return false;
 }
Exemple #16
0
 public final Token getNextToken() {
   if ((token = jj_nt).next != null) jj_nt = jj_nt.next;
   else jj_nt = jj_nt.next = token_source.getNextToken();
   jj_gen++;
   return token;
 }
Exemple #17
0
 private final int jj_ntk() {
   if ((jj_nt = token.next) == null)
     return (jj_ntk = (token.next = token_source.getNextToken()).kind);
   else return (jj_ntk = jj_nt.kind);
 }