Class Symbol
Extends: System.Object
This class is used to store the nonterminals used by the DFA and LALR parser
Symbols can be either terminals (which represent a class of tokens, such as
identifiers) or non-terminals (which represent the rules and structures of
the grammar). Symbols fall into several categories for use by the
GoldParser Engine which are enumerated in type SymbolType enum.
Public Properties | Gets the SymbolType of the symbol.
|
| Gets the name of the symbol.
|
| Gets the index of this symbol in the GoldParser's symbol table.
|
Public Methods | Returns true if the specified symbol is equal to this one.
|
| Returns the hashcode for the symbol.
|
| Returns the text representation of the symbol.
|
Property Detail
Kind
public GoldParser.SymbolType Kind
{ get; }
Gets the SymbolType of the symbol.
Name
public string Name
{ get; }
Gets the name of the symbol.
TableIndex
public int TableIndex
{ get; }
Gets the index of this symbol in the GoldParser's symbol table.
Method Detail
Equals
public bool Equals(object p_object)Returns true if the specified symbol is equal to this one.
GetHashCode
public int GetHashCode()Returns the hashcode for the symbol.
ToString
public string ToString()Returns the text representation of the symbol.
RemarksIn the case of nonterminals, the name is delimited by angle brackets,
special terminals are delimited by parenthesis and terminals are delimited
by single quotes (if special characters are present).