Enhanced C#
Language of your choice: library documentation
|
Computes the "canonical" interpretation of a position for prediction purposes, so that ConsolidateDuplicatePositions can detect duplicates reliably. Call Do() to use. More...
Computes the "canonical" interpretation of a position for prediction purposes, so that ConsolidateDuplicatePositions can detect duplicates reliably. Call Do() to use.
GrammarPos | Do (GrammarPos input) |
Computes the "canonical" interpretation of a position. More... | |
override void | Visit (Seq seq) |
override void | Visit (Gate gate) |
override void | Visit (ActionPred pred) |
override void | Visit (EndOfRule end) |
override void | VisitOther (Pred pred) |
Additional Inherited Members | |
Public Member Functions inherited from Loyc.LLParserGenerator.PredVisitor | |
void | Visit (Pred pred) |
virtual void | Visit (TerminalPred term) |
virtual void | Visit (RuleRef rref) |
virtual void | Visit (Alts alts) |
virtual void | Visit (AndPred and) |
void | VisitChildrenOf (Seq pred) |
void | VisitChildrenOf (AndPred pred) |
void | VisitChildrenOf (Gate pred) |
void | VisitChildrenOf (Alts pred, bool includeError) |
|
inline |
Computes the "canonical" interpretation of a position.
For example, given
The position before the sequence 'a' Y 'z'
is equivalent to the position before 'a', so the result points to 'a' rather than to the sequence itself.
The position after 'b'..'z' is equivalent to the position before 'z', if Y was called from X. Therefore, given the position after 'b'..'z' (a pointer to EndOfRule), and return address before 'z', this method returns the position before 'z'.