|
Grammatica 1.4 Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
System.Object
|
+--ProductionPattern
in ProductionPattern.csA production pattern. This class represents a set of production alternatives that together forms a single production. A production pattern is identified by an integer id and a name, both provided upon creation. The pattern id is used for referencing the production pattern from production pattern elements.
| Constructor Summary | |
ProductionPattern( int id, string name )
Creates a new production pattern. |
|
| Method Summary | |
void |
AddAlternative( ProductionPatternAlternative alt )
Adds a production pattern alternative. |
ProductionPatternAlternative |
GetAlternative( int pos )
Returns an alternative in this pattern. |
int |
GetAlternativeCount()
Returns the number of alternatives in this pattern. |
internal ProductionPatternAlternative |
GetDefaultAlternative()
Returns the default pattern alternative. |
int |
GetId()
Returns the unique production pattern identity value. |
internal LookAheadSet |
GetLookAhead()
Returns the look-ahead set associated with this alternative. |
string |
GetName()
Returns the production pattern name. |
bool |
IsLeftRecursive()
Checks if this pattern is recursive on the left-hand side. |
bool |
IsMatchingEmpty()
Checks if this pattern would match an empty stream of tokens. |
bool |
IsRightRecursive()
Checks if this pattern is recursive on the right-hand side. |
bool |
IsSyntetic()
Checks if the syntetic production flag is set. |
internal void |
SetDefaultAlternative( int pos )
Sets the default pattern alternative. |
internal void |
SetLookAhead( LookAheadSet lookAhead )
Sets the look-ahead set for this alternative. |
void |
SetSyntetic( bool syntetic )
Sets the syntetic production pattern flag. |
override string |
ToString()
Returns a string representation of this object. |
| Constructor Detail |
public ProductionPattern( int id, string name );
id - the production pattern id
name - the production pattern name| Method Detail |
public void AddAlternative( ProductionPatternAlternative alt );
alt - the production pattern alternative to addParserCreationException - if an identical alternative has
already been addedpublic ProductionPatternAlternative GetAlternative( int pos );
pos - the alternative position, 0 <= pos < countpublic int GetAlternativeCount();
internal ProductionPatternAlternative GetDefaultAlternative();
public int GetId();
internal LookAheadSet GetLookAhead();
public string GetName();
public bool IsLeftRecursive();
public bool IsMatchingEmpty();
public bool IsRightRecursive();
public bool IsSyntetic();
internal void SetDefaultAlternative( int pos );
pos - the position of the default alternativeinternal void SetLookAhead( LookAheadSet lookAhead );
lookAhead - the new look-ahead setpublic void SetSyntetic( bool syntetic );
syntetic - the new value of the syntetic flagpublic override string ToString();
|
Grammatica 1.4 Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||