Lines Matching defs:follow

128          *  to the set of symbols that can follow rule ref.
131 public virtual object Match(IIntStream input, int ttype, BitSet follow) {
144 matchedSymbol = RecoverFromMismatchedToken(input, ttype, follow);
159 public virtual bool MismatchIsMissingToken(IIntStream input, BitSet follow) {
160 if (follow == null) {
161 // we have no information about the follow; we can only consume
165 // compute what can follow this grammar element reference
166 if (follow.Member(TokenTypes.EndOfRule)) {
168 follow = follow.Or(viableTokensFollowingThisRule);
170 follow.Remove(TokenTypes.EndOfRule);
177 //System.out.println("viable tokens="+follow.toString(getTokenNames()));
181 // in follow set to indicate that the fall of the start symbol is
182 // in the set (EOF can follow).
183 if (follow.Member(input.LA(1)) || follow.Member(TokenTypes.EndOfRule)) {
406 * follow that rule reference on the stack; this amounts to
408 * enclosing rule. This local follow set only includes tokens
417 * can legally follow a call to r *or* any rule that called r.
432 * At each rule invocation, the set of tokens that could follow
434 * follow sets:
444 * and, hence, the follow context stack is:
446 * depth local follow set after call to rule
458 * could follow any reference in the call chain. We need to
501 * This is set of token types that can follow a specific rule
512 * FOLLOW(r) is the set of all tokens that can possibly follow
529 * FOLLOW sets are precisely what could follow a rule reference.
543 * What can follow that specific nested ref to atom? Exactly ')'
567 System.out.println("local follow depth "+i+"="+
575 // us know if have to include follow(start rule); i.e., EOF
613 * is in the set of tokens that can follow the ')' token
616 protected virtual object RecoverFromMismatchedToken(IIntStream input, int ttype, BitSet follow) {
636 if (MismatchIsMissingToken(input, follow)) {
637 object inserted = GetMissingSymbol(input, e, ttype, follow);
650 BitSet follow) {
651 if (MismatchIsMissingToken(input, follow)) {
655 return GetMissingSymbol(input, e, TokenTypes.Invalid, follow);
700 BitSet follow) {
724 /** <summary>Push a rule's follow set using our own hardcoded stack</summary> */