Enhanced C#
Language of your choice: library documentation
Public fields | Properties | Public Member Functions | List of all members
Loyc.LLParserGenerator.LLParserGenerator.KthSet Class Reference

Represents the possible interpretations of a single input character, in terms of transitions in the grammar. More...


Source file:

Remarks

Represents the possible interpretations of a single input character, in terms of transitions in the grammar.

For example, suppose the grammar is as follows (where "strings" are actually aliases for tokens):

rule For "for" ($id "in" $collection | $id '=' range) };
rule Range start ".." stop };

If the starting position is right after "for", then ComputeNextSet will generate two Cases, one at $id."in" $collection and another at .'=' stop. In both cases, the Set is $id, so KthSet.Set will also be $id.

Public fields

int LA = -1
 
List< TransitionCases = new List<Transition>()
 
IPGTerminalSet Set
 
Set< AndPredAndReq
 
KthSet Prev
 
int Alt
 
bool IsNongreedyExit
 

Properties

bool HasAnyAndPreds [get]
 

Public Member Functions

 KthSet (KthSet prev)
 
 KthSet (Pred start, int alt, IPGTerminalSet emptySet, bool isNongreedyExit=false)
 
void UpdateSet (bool addEOF)
 
override string ToString ()
 
KthSet Clone (bool update)