BNFParser :: analyzeString - Analyze string
The function analyzes data in the passed expression string and creates a hierarchy of BNFNode elements (symbols). Each BNFNode element refers to the symbol or token and to a sub string in the expression, that contains the value for the symbol.
The function will parse the expression string according to the syntax defined in the BNF (top-symbol) or according to a given symbol of the syntax. When the file contains errors, the function returns an invalid BNFNode (BNFNode::isValid()). In this case an error text is returned by function BNFParser::lastError().
Implementation overview
- Analyze string
BNFParser :: analyzeString ( sExpression ) - Analyze string for symbol
BNFParser :: analyzeString ( sExpression, sSymbol )
Implementation details
-
Analyze string
odaba::BNFNode BNFParser  :: analyzeString ( odaba::String &sExpression )
The function analyzes the string passed in sExpression, which must correspond to the top symbol of the parser definition.
- sExpression - Expression string
to list
-
Analyze string for symbol
odaba::BNFNode BNFParser  :: analyzeString ( odaba::String &sExpression, odaba::String &sSymbol )
The function analyzes the string passed in sExpression, which must correspond to the symbol (sSymbol) of the parser definition.
- sExpression - Expression string
- sSymbol
- BNF symbol name
The BNF symbol name is a name that has been defined as symbol in the BNF parser definition.
to list