BNFNode :: isSymbol - Is current symbol same as symbol passed
The function checks, whether the current symbol directly inherits from symbol passed in sSymbol or is the same (symbol() == sSymbol). Two BNF nodes also refer to the same symbol, when referring to the same value at same position in the expression. In the example, the operand tree node is the same as the std_integer tree node.
operation: 5+12*(3+7)-1
operand: 5
std_integer: 5
Return value: Success ( bool )
The value is true when the function was executed successfully. Otherwise the value is set to false.
Implementation details
bool
BNFNode  :: isSymbol ( odaba::String &sSymbol )
The function returns true, when the BNFNode inherith from or corresponds to a symbol passed in sSymbol. When the BNFNode is invalid, the function throws an exception.
- sSymbol
- BNF symbol name
The BNF symbol name is a name that has been defined as symbol in the BNF parser definition.