views:

204

answers:

1

I would like to design a math language satisfying EBNF, to let me write equation systems and inequalities as close to natural math language as possible. I would like to have two parsers for this little language, one parser prepares the equalities/inequalities written in this language for publication, another parser prepares it for computing, i.e., retrieve all coefficients into memory and store them in my own data structure for further computing. I was thinking to use Latex2e syntax, so I don't need to write the first parser for publication. However I read from this forum that Latex2e syntax itself doesn't contain enough information for a parser. Any suggestions about where to go? Thanks!

+3  A: 

The Fortress language is designed to give the user something close to conventional maths notation ( not that any two maths papers use exactly the same notation ). The input exploits Unicode's symbols and follows conventions such as whitespace as the default multiplication operator.

The Fortress site has the reference implementation, it uses the Rats PEG implementation for its grammar rather than EBNF.

Pete Kirkham