Lines Matching defs:follow

98      *  to the set of symbols that can follow rule ref.
100 public Object match(IntStream input, int ttype, BitSet follow)
115 matchedSymbol = recoverFromMismatchedToken(input, ttype, follow);
130 public boolean mismatchIsMissingToken(IntStream input, BitSet follow) {
131 if ( follow==null ) {
132 // we have no information about the follow; we can only consume
136 // compute what can follow this grammar element reference
137 if ( follow.member(Token.EOR_TOKEN_TYPE) ) {
139 follow = follow.or(viableTokensFollowingThisRule);
141 follow.remove(Token.EOR_TOKEN_TYPE);
148 //System.out.println("viable tokens="+follow.toString(getTokenNames()));
152 // in follow set to indicate that the fall of the start symbol is
153 // in the set (EOF can follow).
154 if ( follow.member(input.LA(1)) || follow.member(Token.EOR_TOKEN_TYPE) ) {
379 * follow that rule reference on the stack; this amounts to
381 * enclosing rule. This local follow set only includes tokens
390 * can legally follow a call to r *or* any rule that called r.
405 * At each rule invocation, the set of tokens that could follow
407 * follow sets:
417 * and, hence, the follow context stack is:
419 * depth local follow set after call to rule
431 * could follow any reference in the call chain. We need to
473 * This is set of token types that can follow a specific rule
483 * FOLLOW(r) is the set of all tokens that can possibly follow
500 * FOLLOW sets are precisely what could follow a rule reference.
514 * What can follow that specific nested ref to atom? Exactly ')'
538 System.out.println("local follow depth "+i+"="+
546 // us know if have to include follow(start rule); i.e., EOF
585 * is in the set of tokens that can follow the ')' token
588 protected Object recoverFromMismatchedToken(IntStream input, int ttype, BitSet follow)
610 if ( mismatchIsMissingToken(input, follow) ) {
611 Object inserted = getMissingSymbol(input, e, ttype, follow);
624 BitSet follow)
627 if ( mismatchIsMissingToken(input, follow) ) {
631 return getMissingSymbol(input, e, Token.INVALID_TOKEN_TYPE, follow);
670 BitSet follow)
695 /** Push a rule's follow set using our own hardcoded stack */