|
Grammatica 1.5 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.
| Field Summary | |
int |
Count
The production pattern alternative count property (read-only). |
internal ProductionPatternAlternative |
DefaultAlternative
The default pattern alternative property. |
int |
Id
The production pattern identity property (read-only). |
internal LookAheadSet |
LookAhead
The look-ahead set property. |
string |
Name
The production pattern name property (read-only). |
bool |
Synthetic
The synthetic production pattern property. |
ProductionPatternAlternative[ int index ] |
this
The production pattern alternative index (read-only). |
| 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 )
Deprecated. Use the class indexer instead. |
int |
GetAlternativeCount()
Deprecated. Use the Count property instead. |
int |
GetId()
Deprecated. Use the Id property instead. |
string |
GetName()
Deprecated. Use the Name property instead. |
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()
Deprecated. Use the Synthetic property instead. |
void |
SetSyntetic( bool synthetic )
Deprecated. Use the Synthetic property instead. |
override string |
ToString()
Returns a string representation of this object. |
| Field Detail |
public int Count;
internal ProductionPatternAlternative DefaultAlternative;
public int Id;
internal LookAheadSet LookAhead;
public string Name;
public bool Synthetic;
public ProductionPatternAlternative this[ int index ];
index - the alternative index, 0 <= pos < Count| 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 );
Returns an alternative in this pattern.
pos - the alternative position, 0 <= pos < countpublic int GetAlternativeCount();
Returns the number of alternatives in this pattern.
Countpublic int GetId();
Returns the unique production pattern identity value.
Idpublic string GetName();
Returns the production pattern name.
Namepublic bool IsLeftRecursive();
public bool IsMatchingEmpty();
public bool IsRightRecursive();
public bool IsSyntetic();
Checks if the synthetic production flag is set. If this flag is set, the production identified by this pattern has been artificially inserted into the grammar. No parse tree nodes will be created for such nodes, instead the child nodes will be added directly to the parent node.
Syntheticpublic void SetSyntetic( bool synthetic );
Sets the synthetic production pattern flag. If this flag is set, the production identified by this pattern has been artificially inserted into the grammar. By default this flag is set to false.
syntetic - the new value of the synthetic flagSyntheticpublic override string ToString();
|
Grammatica 1.5 Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||