company logo

BNFNode :: toSymbol - Convert BNF node

The function provides a subordinated BNFNode for a passed symbol name.

Return value:  BNF tree node ( odaba::BNFNode & )

Implementation details

odaba::BNFNode BNFNode  :: toSymbol ( odaba::String &sSymbol )

The function tries to locate the BNF data for the symbol passed in sSymbol. When the BNF nodes are not the same or when the symbol could not be located, an invalid (empty) BNFNode will be returned.

When the BNFNode is not valid, 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.