Extends: System.Object
The Rule class is used to represent the logical structures of the grammar. Rules consist of a head containing a nonterminal followed by a series of both nonterminals and terminals.
Public Properties
|
Gets the head symbol of this rule. | ||
|
Gets the number of symbols in the body (right-hand-side) of the rule. | ||
|
Gets the index of this Rule in the GoldParser's
rule-table. |
Public Methods
|
Returns the symbol in the body of the rule with the specified index. | ||
|
Returns the Backus-Naur representation of this Rule.
|
Property Detail
public GoldParser.Symbol RuleNonTerminal { get; }
Gets the head symbol of this rule.
public int SymbolCount { get; }
Gets the number of symbols in the body (right-hand-side) of the rule.
public int TableIndex { get; }
Gets the index of this Rule in the GoldParser's rule-table.
Method Detail
public GoldParser.Symbol GetSymbol(int p_index)
Returns the symbol in the body of the rule with the specified index.
public string ToString()
Returns the Backus-Naur representation of this Rule.