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 tree nodes 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.
When the BNF tree node is invalid, the function throws an exception.
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 )
- sSymbol
- BNF symbol name
The BNF symbol name is a name that has been defined as symbol in the BNF parser definition.