Lines Matching refs:Follow
431 /// good enough to handle runtime requirements such as FOLLOW sets
526 /// Tracks the set of token types that can follow any rule invocation.
719 /// symbols that can follow rule ref.
722 const Follow: IBitSet): IANTLRInterface;
728 const Follow: IBitSet): Boolean;
815 const E: ERecognitionException; const Follow: IBitSet): IANTLRInterface;
2018 /// differently. Override and call MismatchRecover(input, ttype, follow)
2024 const Follow: IBitSet); virtual;
2054 /// is in the set of tokens that can follow the ')' token
2058 const TokenType: Integer; const Follow: IBitSet): IANTLRInterface; virtual;
2083 const Follow: IBitSet): IANTLRInterface; virtual;
2086 /// Push a rule's follow set using our own hardcoded stack
2091 /// <summary>Compute the context-sensitive FOLLOW set for current rule.
2092 /// This is set of token types that can follow a specific rule
2096 /// definition of plain FOLLOW for rule r:
2098 /// FOLLOW(r)={x | S=>*alpha r beta in G and x in FIRST(beta)}
2102 /// FOLLOW(r) is the set of all tokens that can possibly follow
2110 /// stat : ID '=' expr ';' // FOLLOW(stat)=={EOF}
2113 /// expr : atom ('+' atom)* ; // FOLLOW(expr)=={';','.',')'}
2114 /// atom : INT // FOLLOW(atom)=={'+',')',';','.'}
2118 /// The FOLLOW sets are all inclusive whereas context-sensitive
2119 /// FOLLOW sets are precisely what could follow a rule reference.
2133 /// What can follow that specific nested ref to atom? Exactly ')'
2135 /// input. Contrast this with the FOLLOW(atom)={'+',')',';','.'}.
2147 * follow that rule reference on the stack; this amounts to
2149 * enclosing rule. This local follow set only includes tokens
2158 * can legally follow a call to r *or* any rule that called r.
2173 * At each rule invocation, the set of tokens that could follow
2175 * follow sets:
2177 * FOLLOW(b1_in_a) = FIRST(']') = ']'
2178 * FOLLOW(b2_in_a) = FIRST(')') = ')'
2179 * FOLLOW(c_in_b) = FIRST('^') = '^'
2185 * and, hence, the follow context stack is:
2187 * depth local follow set after call to rule
2196 * For error recovery, we cannot consider FOLLOW(c)
2198 * all context-sensitive FOLLOW sets--the set of all tokens that
2199 * could follow any reference in the call chain. We need to
2200 * resync to one of those tokens. Note that FOLLOW(c)='^' and if
2233 * Like Grosch I implemented local FOLLOW sets that are combined
2253 const Follow: IBitSet): IANTLRInterface; virtual;
2257 const Follow: IBitSet): Boolean;
2271 const E: ERecognitionException; const Follow: IBitSet): IANTLRInterface; virtual;
2493 const Follow: IBitSet): IANTLRInterface; override;
4236 // us know if have to include follow(start rule); i.e., EOF
4422 const Follow: IBitSet): IANTLRInterface;
4489 const TokenType: Integer; const Follow: IBitSet): IANTLRInterface;
4503 Mismatch(Input, TokenType, Follow);
4504 Result := RecoverFromMismatchedToken(Input, TokenType, Follow);
4534 const TokenType: Integer; const Follow: IBitSet);
4539 if MismatchIsMissingToken(Input, Follow) then
4546 const Follow: IBitSet): Boolean;
4550 if (Follow = nil) then
4551 // we have no information about the follow; we can only consume
4556 Follow2 := Follow;
4557 // compute what can follow this grammar element reference
4558 if (Follow.Member(TToken.EOR_TOKEN_TYPE)) then
4561 Follow2 := Follow.BitSetOr(ViableTokensFollowingThisRule);
4572 // in follow set to indicate that the fall of the start symbol is
4573 // in the set (EOF can follow).
4623 const E: ERecognitionException; const Follow: IBitSet): IANTLRInterface;
4625 if MismatchIsMissingToken(Input, Follow) then
4629 Result := GetMissingSymbol(Input, E, TToken.INVALID_TOKEN_TYPE, Follow);
4640 const TokenType: Integer; const Follow: IBitSet): IANTLRInterface;
4659 if MismatchIsMissingToken(Input, Follow) then
4662 Result := GetMissingSymbol(Input, E, TokenType, Follow);
5651 const Follow: IBitSet): IANTLRInterface;