libSBML C++ API
5.20.4
|
This structure (FormulaTokenizer_t) is part of the simpler mathematical formula translation system designed to help convert between SBML Level 1 and Levels 2 and 3. SBML Level 1 uses a simple text-string representation of mathematical formulas, rather than the MathML-based representation used in SBML Levels 2 and 3. LibSBML implements a parser and converter to translate formulas between this text-string representation and MathML. The principal entry points to the translation system are SBML_formulaToString() and SBML_parseFormula().
LibSBML also provides a lower-level interface to the formula parser. This takes the form of the C functions FormulaTokenizer_createFromFormula() and FormulaTokenizer_nextToken(). The structure FormulaTokenizer_t is used to store the current parser state when callers invoke these methods.
An instance of a FormulaTokenizer_t maintains its own internal copy of the formula being tokenized and the current position within the formula string. The field formula
holds the former, and the field pos
holds the latter. Callers do not need to manipulate these fields themselves; instances of FormulaTokenizer_t are only meant to be passed around between the functions of the formula tokenizer system.
Public Attributes | |
char * | formula |
unsigned int | pos |
char* FormulaTokenizer_t::formula |
Field used to store the formula string.
unsigned int FormulaTokenizer_t::pos |
Field used to store the current parsing position.