|
Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
|
Qi Parser object for parsing text into the System class. More...
#include <system_rules.hpp>
Public Member Functions | |
| SystemParser () | |
| void | CollectFunctionNames (std::vector< std::string > const &names) |
| Record the declared function names (in declaration order). | |
| void | CollectConstantNames (std::vector< std::string > const &names) |
| Record the declared constant names. | |
| void | CollectParameterNames (std::vector< std::string > const &names) |
| Record the declared parameter names. | |
| void | DefineNamed (std::string const &name, Nd const &expr) |
| Bind a declared name to its (immutable) NamedExpression definition. | |
| void | AddPathVariableChecked (System &s, Var const &v) |
| Add the path variable, refusing a second declaration. | |
| void | EmitDeclaredFunctions (System &s) const |
| Emit the collected declared functions/constants/parameters to the System. | |
Qi Parser object for parsing text into the System class.
This ensures we can provide backwards compatibility with Bertini Classic input files.
To use this parser, construct an object of its type, then use it to parse.
Qi Parser object for parsing text into the System class.
This parser could not have been written without the help of SO user sehe.
|
inline |
|
inline |
Add the path variable, refusing a second declaration.
A system has exactly one path variable, so a second pathvariable line is a mistake in the input rather than a re-assignment. Enforced here, at the declaration, rather than in System::AddPathVariable, which stays permissive so that a caller building a system programmatically may still change its mind.
| s | The system being built. |
| v | The declared path variable. |
|
inline |
Record the declared constant names.
|
inline |
Record the declared function names (in declaration order).
|
inline |
Record the declared parameter names.
|
inline |
Bind a declared name to its (immutable) NamedExpression definition.
|
inline |
Emit the collected declared functions/constants/parameters to the System.
Every declared name must have been defined. A name that was declared and never defined is reported here, by name and kind: before this the missing definition reached std::map::at and surfaced as the meaningless map::at, which told the user nothing about which name they had forgotten (b2#441).
| s | The system to emit into. |