Home | History | Annotate | Download | only in Antlr3.Runtime

Lines Matching refs:Rule

526     /// Tracks the set of token types that can follow any rule invocation.
552 /// In lieu of a return value, this indicates that a rule or token
570 /// the stop token index for each rule.
575 /// associated rule or MEMO_RULE_FAILED.
577 /// This is only used if rule memoization is on (which it is by default).
593 /// matching lexer rule(s). If you subclass to allow multiple token
717 /// in a rule will cause an exception and immediate exit from
718 /// rule. Rule would recover by resynchronizing to the set of
719 /// symbols that can follow rule ref.
826 /// in the parser source code a rule is invoked.
837 /// pass in, for example, a RecognitionException to get it's rule
855 /// Given a rule number and a start token index number, return
856 /// MEMO_RULE_UNKNOWN if the rule has not parsed input starting from
857 /// start index. If this rule has parsed input starting from the
858 /// start index before, then return where the rule stopped parsing.
859 /// It returns the index of the last token matched by the rule.
869 /// Has this rule already parsed input at the current index in the
875 /// this rule and successfully parsed before, then seek ahead to
876 /// 1 past the stop token matched for this rule last time.
882 /// Record whether or not this rule parsed the input at this position
889 /// Return how many rule/input-index pairs there are in total.
943 /// TODO: how to access the full token stream? How to track all tokens matched per rule?
1003 /// As a point of reference, the Tokens rule DFA for the lexer in the Java grammar
1064 /// Instruct the lexer to skip creating a token for current lexer rule and
1066 /// rule finishes with token set to SKIP_TOKEN. Recall that if token==null
1067 /// at end of any token rule, it creates one for you and emits it.
1084 /// outermost lexical rule. The token object should point into the
1102 /// it all works out. You can instead use the rule invocation stack
1103 /// to do sophisticated error recovery if you are in a Fragment rule.
1201 /// to get the .text property anyway if the rule matches tokens from multiple
1365 /// also generates code to catch these exceptions in each rule. If you
1942 /// All tokens go to the parser (unless skip() is called in that rule)
1957 /// In an action, a lexer rule can set token to this SKIP_TOKEN and ANTLR
1973 // Moved to version 2 for v3.1: added grammar name to enter/exit Rule
2055 /// reference in rule atom. It can assume that you forgot the ')'.
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:
2119 /// FOLLOW sets are precisely what could follow a rule reference.
2145 (* Compute the error recovery set for the current rule. During
2146 * rule invocation, the parser pushes the set of tokens that can
2147 * follow that rule reference on the stack; this amounts to
2148 * computing FIRST of what follows the rule reference in the
2149 * enclosing rule. This local follow set only includes tokens
2150 * from within the rule; i.e., the FIRST computation done by
2151 * ANTLR stops at the end of a rule.
2156 * consistent with any of the alternatives for rule r. The best
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
2174 * that rule is pushed on a stack. Here are the various "local"
2187 * depth local follow set after call to rule
2193 * been called from a different context in rule a for ')' to be
2204 * not consume anything and after printing an error rule c would
2208 * set). The rule exception handler tries to Recover, but finds
2209 * the same recovery set and doesn't consume anything. Rule b
2210 * exits normally returning to rule a. Now it finds the ']' (and
4232 // can we see end of rule?
4235 // Only leave EOR in set if at top (start rule); this lets
4236 // us know if have to include follow(start rule); i.e., EOF
4241 // can't see end of rule, quit
4409 Result := 'rule ' + FPE.RuleName