reno.parser.parse#
- reno.parser.parse(string, refs=None)#
Turn an equation string into Reno’s math equation objects. This runs prefix parsing on equation strings/reprs, e.g. ‘(+ (- 5 ‘my_variable’) 3)’ to turn it into a fully populated EquationPart.
This function runs recursively through each level of an equation tree.
- Parameters:
string (str) – The string representation (repr) of a Reno equation tree: “(+ (- 5 ‘my_variable’))”
refs (dict[str, reno.components.Reference]) – Any references that have already been populated, so multiple
'my_variable'strings translate to the same object correctly.
- Returns:
An EquationPart populated with recursive sub_equation_parts.
- Return type: