1 /* Generated By:JavaCC: Do not edit this line. StandardSyntaxParser.java */
2 package org.apache.lucene.queryParser.standard.parser;
5 * Licensed to the Apache Software Foundation (ASF) under one or more
6 * contributor license agreements. See the NOTICE file distributed with
7 * this work for additional information regarding copyright ownership.
8 * The ASF licenses this file to You under the Apache License, Version 2.0
9 * (the "License"); you may not use this file except in compliance with
10 * the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
21 import java.io.StringReader;
22 import java.util.ArrayList;
23 import java.util.List;
24 import java.util.Vector;
26 import org.apache.lucene.messages.Message;
27 import org.apache.lucene.messages.MessageImpl;
28 import org.apache.lucene.queryParser.core.QueryNodeError;
29 import org.apache.lucene.queryParser.core.QueryNodeException;
30 import org.apache.lucene.queryParser.core.QueryNodeParseException;
31 import org.apache.lucene.queryParser.core.messages.QueryParserMessages;
32 import org.apache.lucene.queryParser.core.nodes.AndQueryNode;
33 import org.apache.lucene.queryParser.core.nodes.BooleanQueryNode;
34 import org.apache.lucene.queryParser.core.nodes.BoostQueryNode;
35 import org.apache.lucene.queryParser.core.nodes.FieldQueryNode;
36 import org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode;
37 import org.apache.lucene.queryParser.core.nodes.ModifierQueryNode;
38 import org.apache.lucene.queryParser.core.nodes.GroupQueryNode;
39 import org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode;
40 import org.apache.lucene.queryParser.core.nodes.OrQueryNode;
41 import org.apache.lucene.queryParser.core.nodes.ParametricQueryNode;
42 import org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode;
43 import org.apache.lucene.queryParser.core.nodes.SlopQueryNode;
44 import org.apache.lucene.queryParser.core.nodes.ProximityQueryNode;
45 import org.apache.lucene.queryParser.core.nodes.QueryNode;
46 import org.apache.lucene.queryParser.core.nodes.QueryNodeImpl;
47 import org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode;
48 import org.apache.lucene.queryParser.core.parser.SyntaxParser;
50 public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserConstants {
52 private static final int CONJ_NONE =0;
53 private static final int CONJ_AND =2;
54 private static final int CONJ_OR =2;
57 // syntax parser constructor
58 public StandardSyntaxParser() {
59 this(new StringReader(""));
61 /** Parses a query string, returning a {@link org.apache.lucene.queryParser.core.nodes.QueryNode}.
62 * @param query the query string to be parsed.
63 * @throws ParseException if the parsing fails
65 public QueryNode parse(CharSequence query, CharSequence field) throws QueryNodeParseException {
66 ReInit(new StringReader(query.toString()));
68 // TopLevelQuery is a Query followed by the end-of-input (EOF)
69 QueryNode querynode = TopLevelQuery(field);
72 catch (ParseException tme) {
77 Message message = new MessageImpl(QueryParserMessages.INVALID_SYNTAX_CANNOT_PARSE, query, tme.getMessage());
78 QueryNodeParseException e = new QueryNodeParseException(tme);
80 e.setNonLocalizedMessage(message);
85 // * Query ::= ( Clause )*
86 // * Clause ::= ["+", "-"] [<TERM> ":"] ( <TERM> | "(" Query ")" )
87 final public int Conjunction() throws ParseException {
89 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
92 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
94 jj_consume_token(AND);
103 jj_consume_token(-1);
104 throw new ParseException();
111 {if (true) return ret;}
112 throw new Error("Missing return statement in function");
115 final public ModifierQueryNode.Modifier Modifiers() throws ParseException {
116 ModifierQueryNode.Modifier ret = ModifierQueryNode.Modifier.MOD_NONE;
117 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
121 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
123 jj_consume_token(PLUS);
124 ret = ModifierQueryNode.Modifier.MOD_REQ;
127 jj_consume_token(MINUS);
128 ret = ModifierQueryNode.Modifier.MOD_NOT;
131 jj_consume_token(NOT);
132 ret = ModifierQueryNode.Modifier.MOD_NOT;
136 jj_consume_token(-1);
137 throw new ParseException();
144 {if (true) return ret;}
145 throw new Error("Missing return statement in function");
148 // This makes sure that there is no garbage after the query string
149 final public QueryNode TopLevelQuery(CharSequence field) throws ParseException {
153 {if (true) return q;}
154 throw new Error("Missing return statement in function");
157 // These changes were made to introduce operator precedence:
158 // - Clause() now returns a QueryNode.
159 // - The modifiers are consumed by Clause() and returned as part of the QueryNode Object
160 // - Query does not consume conjunctions (AND, OR) anymore.
161 // - This is now done by two new non-terminals: ConjClause and DisjClause
162 // The parse tree looks similar to this:
163 // Query ::= DisjQuery ( DisjQuery )*
164 // DisjQuery ::= ConjQuery ( OR ConjQuery )*
165 // ConjQuery ::= Clause ( AND Clause )*
166 // Clause ::= [ Modifier ] ...
167 final public QueryNode Query(CharSequence field) throws ParseException {
168 Vector<QueryNode> clauses = null;
169 QueryNode c, first=null;
170 first = DisjQuery(field);
173 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
189 c = DisjQuery(field);
190 if (clauses == null) {
191 clauses = new Vector<QueryNode>();
192 clauses.addElement(first);
194 clauses.addElement(c);
196 if (clauses != null) {
197 {if (true) return new BooleanQueryNode(clauses);}
199 {if (true) return first;}
201 throw new Error("Missing return statement in function");
204 final public QueryNode DisjQuery(CharSequence field) throws ParseException {
206 Vector<QueryNode> clauses = null;
207 first = ConjQuery(field);
210 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
218 jj_consume_token(OR);
219 c = ConjQuery(field);
220 if (clauses == null) {
221 clauses = new Vector<QueryNode>();
222 clauses.addElement(first);
224 clauses.addElement(c);
226 if (clauses != null) {
227 {if (true) return new OrQueryNode(clauses);}
229 {if (true) return first;}
231 throw new Error("Missing return statement in function");
234 final public QueryNode ConjQuery(CharSequence field) throws ParseException {
236 Vector<QueryNode> clauses = null;
237 first = ModClause(field);
240 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
248 jj_consume_token(AND);
249 c = ModClause(field);
250 if (clauses == null) {
251 clauses = new Vector<QueryNode>();
252 clauses.addElement(first);
254 clauses.addElement(c);
256 if (clauses != null) {
257 {if (true) return new AndQueryNode(clauses);}
259 {if (true) return first;}
261 throw new Error("Missing return statement in function");
264 // QueryNode Query(CharSequence field) :
266 // List clauses = new ArrayList();
267 // List modifiers = new ArrayList();
268 // QueryNode q, firstQuery=null;
269 // ModifierQueryNode.Modifier mods;
273 // mods=Modifiers() q=Clause(field)
275 // if (mods == ModifierQueryNode.Modifier.MOD_NONE) firstQuery=q;
277 // // do not create modifier nodes with MOD_NONE
278 // if (mods != ModifierQueryNode.Modifier.MOD_NONE) {
279 // q = new ModifierQueryNode(q, mods);
284 // conj=Conjunction() mods=Modifiers() q=Clause(field)
286 // // do not create modifier nodes with MOD_NONE
287 // if (mods != ModifierQueryNode.Modifier.MOD_NONE) {
288 // q = new ModifierQueryNode(q, mods);
291 // //TODO: figure out what to do with AND and ORs
295 // if (clauses.size() == 1 && firstQuery != null)
296 // return firstQuery;
298 // return new BooleanQueryNode(clauses);
302 final public QueryNode ModClause(CharSequence field) throws ParseException {
304 ModifierQueryNode.Modifier mods;
307 if (mods != ModifierQueryNode.Modifier.MOD_NONE) {
308 q = new ModifierQueryNode(q, mods);
310 {if (true) return q;}
311 throw new Error("Missing return statement in function");
314 final public QueryNode Clause(CharSequence field) throws ParseException {
316 Token fieldToken=null, boost=null;
317 boolean group = false;
319 fieldToken = jj_consume_token(TERM);
320 jj_consume_token(COLON);
321 field=EscapeQuerySyntaxImpl.discardEscapeChar(fieldToken.image);
325 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
334 jj_consume_token(LPAREN);
336 jj_consume_token(RPAREN);
337 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
339 jj_consume_token(CARAT);
340 boost = jj_consume_token(NUMBER);
350 jj_consume_token(-1);
351 throw new ParseException();
354 float f = (float)1.0;
356 f = Float.valueOf(boost.image).floatValue();
357 // avoid boosting null queries, such as those caused by stop words
359 q = new BoostQueryNode(q, f);
361 } catch (Exception ignored) {
362 /* Should this be handled somehow? (defaults to "no boost", if
363 * boost number is invalid)
367 if (group) { q = new GroupQueryNode(q);}
368 {if (true) return q;}
369 throw new Error("Missing return statement in function");
372 final public QueryNode Term(CharSequence field) throws ParseException {
373 Token term, boost=null, fuzzySlop=null, goop1, goop2;
374 boolean fuzzy = false;
376 ParametricQueryNode qLower, qUpper;
377 float defaultMinSimilarity = 0.5f;
378 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
381 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
383 term = jj_consume_token(TERM);
384 q = new FieldQueryNode(field, EscapeQuerySyntaxImpl.discardEscapeChar(term.image), term.beginColumn, term.endColumn);
387 term = jj_consume_token(NUMBER);
391 jj_consume_token(-1);
392 throw new ParseException();
394 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
396 fuzzySlop = jj_consume_token(FUZZY_SLOP);
403 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
405 jj_consume_token(CARAT);
406 boost = jj_consume_token(NUMBER);
407 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
409 fuzzySlop = jj_consume_token(FUZZY_SLOP);
422 float fms = defaultMinSimilarity;
424 fms = Float.valueOf(fuzzySlop.image.substring(1)).floatValue();
425 } catch (Exception ignored) { }
426 if(fms < 0.0f || fms > 1.0f){
427 {if (true) throw new ParseException(new MessageImpl(QueryParserMessages.INVALID_SYNTAX_FUZZY_LIMITS));}
429 q = new FuzzyQueryNode(field, EscapeQuerySyntaxImpl.discardEscapeChar(term.image), fms, term.beginColumn, term.endColumn);
433 jj_consume_token(RANGEIN_START);
434 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
436 goop1 = jj_consume_token(RANGEIN_GOOP);
439 goop1 = jj_consume_token(RANGEIN_QUOTED);
443 jj_consume_token(-1);
444 throw new ParseException();
446 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
448 jj_consume_token(RANGEIN_TO);
454 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
456 goop2 = jj_consume_token(RANGEIN_GOOP);
459 goop2 = jj_consume_token(RANGEIN_QUOTED);
463 jj_consume_token(-1);
464 throw new ParseException();
466 jj_consume_token(RANGEIN_END);
467 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
469 jj_consume_token(CARAT);
470 boost = jj_consume_token(NUMBER);
476 if (goop1.kind == RANGEIN_QUOTED) {
477 goop1.image = goop1.image.substring(1, goop1.image.length()-1);
479 if (goop2.kind == RANGEIN_QUOTED) {
480 goop2.image = goop2.image.substring(1, goop2.image.length()-1);
483 qLower = new ParametricQueryNode(field, ParametricQueryNode.CompareOperator.GE,
484 EscapeQuerySyntaxImpl.discardEscapeChar(goop1.image), goop1.beginColumn, goop1.endColumn);
485 qUpper = new ParametricQueryNode(field, ParametricQueryNode.CompareOperator.LE,
486 EscapeQuerySyntaxImpl.discardEscapeChar(goop2.image), goop2.beginColumn, goop2.endColumn);
487 q = new ParametricRangeQueryNode(qLower, qUpper);
490 jj_consume_token(RANGEEX_START);
491 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
493 goop1 = jj_consume_token(RANGEEX_GOOP);
496 goop1 = jj_consume_token(RANGEEX_QUOTED);
500 jj_consume_token(-1);
501 throw new ParseException();
503 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
505 jj_consume_token(RANGEEX_TO);
511 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
513 goop2 = jj_consume_token(RANGEEX_GOOP);
516 goop2 = jj_consume_token(RANGEEX_QUOTED);
520 jj_consume_token(-1);
521 throw new ParseException();
523 jj_consume_token(RANGEEX_END);
524 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
526 jj_consume_token(CARAT);
527 boost = jj_consume_token(NUMBER);
533 if (goop1.kind == RANGEEX_QUOTED) {
534 goop1.image = goop1.image.substring(1, goop1.image.length()-1);
536 if (goop2.kind == RANGEEX_QUOTED) {
537 goop2.image = goop2.image.substring(1, goop2.image.length()-1);
539 qLower = new ParametricQueryNode(field, ParametricQueryNode.CompareOperator.GT,
540 EscapeQuerySyntaxImpl.discardEscapeChar(goop1.image), goop1.beginColumn, goop1.endColumn);
541 qUpper = new ParametricQueryNode(field, ParametricQueryNode.CompareOperator.LT,
542 EscapeQuerySyntaxImpl.discardEscapeChar(goop2.image), goop2.beginColumn, goop2.endColumn);
543 q = new ParametricRangeQueryNode(qLower, qUpper);
546 term = jj_consume_token(QUOTED);
547 q = new QuotedFieldQueryNode(field, EscapeQuerySyntaxImpl.discardEscapeChar(term.image.substring(1, term.image.length()-1)), term.beginColumn + 1, term.endColumn - 1);
548 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
550 fuzzySlop = jj_consume_token(FUZZY_SLOP);
556 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
558 jj_consume_token(CARAT);
559 boost = jj_consume_token(NUMBER);
567 if (fuzzySlop != null) {
569 phraseSlop = Float.valueOf(fuzzySlop.image.substring(1)).intValue();
570 q = new SlopQueryNode(q, phraseSlop);
572 catch (Exception ignored) {
573 /* Should this be handled somehow? (defaults to "no PhraseSlop", if
574 * slop number is invalid)
581 jj_consume_token(-1);
582 throw new ParseException();
585 float f = (float)1.0;
587 f = Float.valueOf(boost.image).floatValue();
588 // avoid boosting null queries, such as those caused by stop words
590 q = new BoostQueryNode(q, f);
592 } catch (Exception ignored) {
593 /* Should this be handled somehow? (defaults to "no boost", if
594 * boost number is invalid)
598 {if (true) return q;}
599 throw new Error("Missing return statement in function");
602 private boolean jj_2_1(int xla) {
603 jj_la = xla; jj_lastpos = jj_scanpos = token;
604 try { return !jj_3_1(); }
605 catch(LookaheadSuccess ls) { return true; }
606 finally { jj_save(0, xla); }
609 private boolean jj_3_1() {
610 if (jj_scan_token(TERM)) return true;
611 if (jj_scan_token(COLON)) return true;
615 /** Generated Token Manager. */
616 public StandardSyntaxParserTokenManager token_source;
617 JavaCharStream jj_input_stream;
618 /** Current token. */
623 private Token jj_scanpos, jj_lastpos;
626 final private int[] jj_la1 = new int[24];
627 static private int[] jj_la1_0;
631 private static void jj_la1_init_0() {
632 jj_la1_0 = new int[] {0x300,0x300,0x1c00,0x1c00,0x763c00,0x200,0x100,0x10000,0x762000,0x440000,0x80000,0x80000,0x10000,0x6000000,0x800000,0x6000000,0x10000,0x60000000,0x8000000,0x60000000,0x10000,0x80000,0x10000,0x760000,};
634 final private JJCalls[] jj_2_rtns = new JJCalls[1];
635 private boolean jj_rescan = false;
636 private int jj_gc = 0;
638 /** Constructor with InputStream. */
639 public StandardSyntaxParser(java.io.InputStream stream) {
642 /** Constructor with InputStream and supplied encoding */
643 public StandardSyntaxParser(java.io.InputStream stream, String encoding) {
644 try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
645 token_source = new StandardSyntaxParserTokenManager(jj_input_stream);
649 for (int i = 0; i < 24; i++) jj_la1[i] = -1;
650 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
654 public void ReInit(java.io.InputStream stream) {
655 ReInit(stream, null);
658 public void ReInit(java.io.InputStream stream, String encoding) {
659 try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
660 token_source.ReInit(jj_input_stream);
664 for (int i = 0; i < 24; i++) jj_la1[i] = -1;
665 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
669 public StandardSyntaxParser(java.io.Reader stream) {
670 jj_input_stream = new JavaCharStream(stream, 1, 1);
671 token_source = new StandardSyntaxParserTokenManager(jj_input_stream);
675 for (int i = 0; i < 24; i++) jj_la1[i] = -1;
676 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
680 public void ReInit(java.io.Reader stream) {
681 jj_input_stream.ReInit(stream, 1, 1);
682 token_source.ReInit(jj_input_stream);
686 for (int i = 0; i < 24; i++) jj_la1[i] = -1;
687 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
690 /** Constructor with generated Token Manager. */
691 public StandardSyntaxParser(StandardSyntaxParserTokenManager tm) {
696 for (int i = 0; i < 24; i++) jj_la1[i] = -1;
697 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
701 public void ReInit(StandardSyntaxParserTokenManager tm) {
706 for (int i = 0; i < 24; i++) jj_la1[i] = -1;
707 for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
710 private Token jj_consume_token(int kind) throws ParseException {
712 if ((oldToken = token).next != null) token = token.next;
713 else token = token.next = token_source.getNextToken();
715 if (token.kind == kind) {
719 for (int i = 0; i < jj_2_rtns.length; i++) {
720 JJCalls c = jj_2_rtns[i];
722 if (c.gen < jj_gen) c.first = null;
731 throw generateParseException();
734 static private final class LookaheadSuccess extends java.lang.Error { }
735 final private LookaheadSuccess jj_ls = new LookaheadSuccess();
736 private boolean jj_scan_token(int kind) {
737 if (jj_scanpos == jj_lastpos) {
739 if (jj_scanpos.next == null) {
740 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
742 jj_lastpos = jj_scanpos = jj_scanpos.next;
745 jj_scanpos = jj_scanpos.next;
748 int i = 0; Token tok = token;
749 while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
750 if (tok != null) jj_add_error_token(kind, i);
752 if (jj_scanpos.kind != kind) return true;
753 if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
758 /** Get the next Token. */
759 final public Token getNextToken() {
760 if (token.next != null) token = token.next;
761 else token = token.next = token_source.getNextToken();
767 /** Get the specific Token. */
768 final public Token getToken(int index) {
770 for (int i = 0; i < index; i++) {
771 if (t.next != null) t = t.next;
772 else t = t.next = token_source.getNextToken();
777 private int jj_ntk() {
778 if ((jj_nt=token.next) == null)
779 return (jj_ntk = (token.next=token_source.getNextToken()).kind);
781 return (jj_ntk = jj_nt.kind);
784 private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
785 private int[] jj_expentry;
786 private int jj_kind = -1;
787 private int[] jj_lasttokens = new int[100];
788 private int jj_endpos;
790 private void jj_add_error_token(int kind, int pos) {
791 if (pos >= 100) return;
792 if (pos == jj_endpos + 1) {
793 jj_lasttokens[jj_endpos++] = kind;
794 } else if (jj_endpos != 0) {
795 jj_expentry = new int[jj_endpos];
796 for (int i = 0; i < jj_endpos; i++) {
797 jj_expentry[i] = jj_lasttokens[i];
799 jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) {
800 int[] oldentry = (int[])(it.next());
801 if (oldentry.length == jj_expentry.length) {
802 for (int i = 0; i < jj_expentry.length; i++) {
803 if (oldentry[i] != jj_expentry[i]) {
804 continue jj_entries_loop;
807 jj_expentries.add(jj_expentry);
808 break jj_entries_loop;
811 if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
815 /** Generate ParseException. */
816 public ParseException generateParseException() {
817 jj_expentries.clear();
818 boolean[] la1tokens = new boolean[31];
820 la1tokens[jj_kind] = true;
823 for (int i = 0; i < 24; i++) {
824 if (jj_la1[i] == jj_gen) {
825 for (int j = 0; j < 32; j++) {
826 if ((jj_la1_0[i] & (1<<j)) != 0) {
832 for (int i = 0; i < 31; i++) {
834 jj_expentry = new int[1];
836 jj_expentries.add(jj_expentry);
841 jj_add_error_token(0, 0);
842 int[][] exptokseq = new int[jj_expentries.size()][];
843 for (int i = 0; i < jj_expentries.size(); i++) {
844 exptokseq[i] = jj_expentries.get(i);
846 return new ParseException(token, exptokseq, tokenImage);
849 /** Enable tracing. */
850 final public void enable_tracing() {
853 /** Disable tracing. */
854 final public void disable_tracing() {
857 private void jj_rescan_token() {
859 for (int i = 0; i < 1; i++) {
861 JJCalls p = jj_2_rtns[i];
863 if (p.gen > jj_gen) {
864 jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
866 case 0: jj_3_1(); break;
871 } catch(LookaheadSuccess ls) { }
876 private void jj_save(int index, int xla) {
877 JJCalls p = jj_2_rtns[index];
878 while (p.gen > jj_gen) {
879 if (p.next == null) { p = p.next = new JJCalls(); break; }
882 p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
885 static final class JJCalls {