Expand description
Expression parsing and tokenization functions
Functions§
- extract_
line_ references - Extract all line references from a text string Returns a vector of (start_pos, end_pos, line_number) tuples for each “lineN” found
- is_
valid_ math_ expression - Check if a string represents a valid mathematical expression
- is_
valid_ mathematical_ expression - Check if a sequence of tokens forms a valid mathematical expression
- parse_
line_ reference - Parse a line reference string like “line1”, “line2” etc.
- tokenize_
with_ units - Tokenize any text into tokens - always succeeds, may include non-mathematical tokens
- update_
line_ references_ in_ text - Update line references in text by applying an offset to references >= threshold If offset is positive: increment references >= threshold If offset is negative: decrement references > threshold, mark deleted line refs as invalid