I'm writing a parser/transformer thingie that accepts valid LaTeX, and emits valid LaTeX. Is there a list of ASCII characters that are allowed in TeX math mode? Or is any character fair game? ...
Inspired by the author's motivation for asking Is there a BNF grammar of tex language. Are there any well done libraries that can parse some subset of TeX mathematics independently of the TeX engine? ...