company logo

BNFNode :: get - Locate BNF tree node

The function locates a BNF tree node at position or with a symbol name. The located tree node will be returned. When the current BNF tree node is not valid or when the requested tree node could not be located, the function throws an exception. In order to avoid exceptions, one may call tryGet(), instead.

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

Implementation overview

Implementation details

  1. Get BNF node at position
    odaba::BNFNode BNFNode  :: get ( int32 iPosition )

    The function returns the BNF tree node on next lower level at position passed in iPosition. The value in iPosition must be less then the number returned from count() and greater or equal to 0.

    • iPosition - Position in collection

      The position of an element in a collection is beginning with 0 for the first element.

  2. to list
  3. Locate BNF node recursively
    odaba::BNFNode BNFNode  :: get ( odaba::String &sSymbol, bool bRecursive )

    The function tries to locate a subordinated BNF tree 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 tree node exists, 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.

    • bRecursive - Process recursive

      The function is called recursively for subordinated elements.

  4. to list
  5. Locate BNF node
    odaba::BNFNode BNFNode  :: get ( 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 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.

  6. to list