Parses LaTeX math strings—typically extracted from Markdown—and converts them into an abstract syntax tree (AST).