Loading...
Searching...
No Matches
doc_l3_parser_configuration_options Class Reference

## Detailed Description

- A Model object may optionally be provided to use identifiers (values of type `SId`) from the model in preference to pre-defined MathML symbols More precisely, the Model entities whose identifiers will shadow identical symbols in the mathematical formula are: Species, Compartment, Parameter, Reaction, and SpeciesReference. For instance, if the parser is given a Model containing a Species with the identifier "`pi`", and the formula to be parsed is "`3*pi`", the MathML produced by the parser will contain the construct `<ci> pi </ci>` instead of the construct `<pi/>`. Another example, if the passed-in Model contains a FunctionDefinition with the identifier "`sin`", that function will be used instead of the predefined MathML function `<sin/>`.
- The function `log` with a single argument ("`log(x)`") can be parsed as `log10(x)`, `ln(x)`, or treated as an error, as desired.
- Unary minus signs can be either collapsed or preserved; that is, the parser can either (1) remove sequential pairs of unary minuses (e.g., "`- -3`") from the input and incorporate single unary minuses into the number node, or (2) preserve all minuses in the AST node structure, turning them into ASTNode objects of type AST_MINUS
- The character sequence "`number id`" can be interpreted as a numerical value `number` followed by units of measurement indicated by `id`, or it can be treated as a syntax error. (In Level 3, MathML `<cn>` elements can have an attribute named `units` placed in the SBML namespace, which can be used to indicate the units to be associated with the number. The text-string infix formula parser allows units to be placed after raw numbers; they are interpreted as unit identifiers for units defined by the SBML specification or in the containing Model object.)
- The symbol `avogadro` can be parsed either as a MathML csymbol or as a identifier. More specifically, "`avogadro`" can be treated as an ASTNode of type AST_NAME_AVOGADRO or of type AST_NAME
- Strings that match built-in functions and constants can either be parsed as a match regardless of capitalization, or may be required to be all-lower-case to be considered a match.
- LibSBML plug-ins implementing support for SBML Level 3 packages may introduce extensions to the syntax understood by the parser. The precise nature of the extensions will be documented by the individual package plug-ins. An example of a possible extension is a notation for vectors and arrays, introduced by the SBML Level 3 Arrays package.