company logo

BNFNode :: tryGet - Try to locate BNF node

The function locates a BNFNode with a specific symbol name. The located tree node will be returned. When the current BNF tree node is not valid, the function throws an exception.

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

Implementation overview

Implementation details

  1. Try to locate BNF node recursively
    odaba::BNFNode BNFNode  :: tryGet ( odaba::String &sSymbol, bool bRecursive )

    The function tries to locate a subordinated BNF node with the symbol name passed in sSymbol. When bRecursive is false, the function only looks at next lower level. Otherwise, the function also looks at lower subordinated levels until the symbol is located. When no such node exists, the function returns an invalid BNFNode.

    • sSymbol - BNF symbol name

      The BNF symbol name is a name that has been defined as symbol in the BNF parser definition.

    • bRecursive - Process recursive

      The function is called recursively for subordinated elements.

  2. to list
  3. Try to locate BNF tree node
    odaba::BNFNode BNFNode  :: tryGet ( odaba::String &sSymbol )

    The function tries to locate a subordinated BNF tree node with the symbol name passed in sSymbol. When no such symbol exists, the function returns an invalid BNF tree node..

    • sSymbol - BNF symbol name

      The BNF symbol name is a name that has been defined as symbol in the BNF parser definition.

  4. to list