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

This interface represents a set of terminals (and only a set of terminals, unlike TerminalPred which includes actions and a Basis Node). Typical lexers and parsers use PGIntSet and PGNodeSet, respectively. More...


Source file:
Inheritance diagram for Loyc.LLParserGenerator.IPGTerminalSet:
Loyc.LLParserGenerator.PGIntSet Loyc.LLParserGenerator.PGNodeSet

Remarks

This interface represents a set of terminals (and only a set of terminals, unlike TerminalPred which includes actions and a Basis Node). Typical lexers and parsers use PGIntSet and PGNodeSet, respectively.

Properties

bool IsInverted [get]
 
bool ContainsEOF [get]
 
bool IsEmptySet [get]
 
bool ContainsEverything [get]
 
IPGTerminalSet Empty [get]
 Returns the empty set. More...
 

Public Member Functions

IPGTerminalSet UnionCore (IPGTerminalSet other)
 Merges two sets. More...
 
IPGTerminalSet IntersectionCore (IPGTerminalSet other, bool subtract=false, bool subtractThis=false)
 Computes the intersection of two sets. More...
 
IPGTerminalSet WithEOF (bool wantEOF=true)
 Adds or removes EOF from the set. If the set doesn't change, this method may return this. More...
 
IPGTerminalSet Inverted ()
 Creates a version of the set with IsInverted toggled. More...
 

Member Function Documentation

IPGTerminalSet Loyc.LLParserGenerator.IPGTerminalSet.IntersectionCore ( IPGTerminalSet  other,
bool  subtract = false,
bool  subtractThis = false 
)

Computes the intersection of two sets.

Returns
A set that has only items that are in both sets, or null if other's type is not supported.

Referenced by Loyc.LLParserGenerator.PGNodeSet.UnionCore(), and Loyc.LLParserGenerator.PGIntSet.WithEOF().

IPGTerminalSet Loyc.LLParserGenerator.IPGTerminalSet.Inverted ( )

Creates a version of the set with IsInverted toggled.

Referenced by Loyc.LLParserGenerator.PGIntSet.WithEOF(), and Loyc.LLParserGenerator.PGNodeSet.WithEOF().

IPGTerminalSet Loyc.LLParserGenerator.IPGTerminalSet.UnionCore ( IPGTerminalSet  other)

Merges two sets.

Returns
The combination of the two sets, or null if other's type is not supported.

Implemented in Loyc.LLParserGenerator.PGNodeSet.

Referenced by Loyc.LLParserGenerator.PGIntSet.WithEOF().

IPGTerminalSet Loyc.LLParserGenerator.IPGTerminalSet.WithEOF ( bool  wantEOF = true)

Adds or removes EOF from the set. If the set doesn't change, this method may return this.

Implemented in Loyc.LLParserGenerator.PGNodeSet, and Loyc.LLParserGenerator.PGIntSet.

Property Documentation

IPGTerminalSet Loyc.LLParserGenerator.IPGTerminalSet.Empty
get