EBNF for mathematical equations and inequalities

I would like to develop a math language that satisfies EBNF so that I can write systems of equations and inequalities as close as possible to a natural math language. I would like to have two parsers for this small language, one parser prepares equalities / inequalities written in that language for publication, another parser prepares it for computation, i.e. Retrieves all the coefficients into memory and stores them in my own data structure for later computation. I was thinking to use Latex2e syntax, so I don't have to write the first parser to post. However, I read from this forum that the Latex2e syntax itself does not contain enough information for the parser. Any suggestions on where to go? Thank!

+2


source to share


1 answer


The Fortress language is designed to give the user something akin to conventional mathematics (not that either of the two mathematics articles use exactly the same notation). As a result, Unicode characters are used and they follow conventions such as space as the default multiplication operator.



fortress site has a referenced implementation, it uses the PEG Rats implementation for the grammar , not EBNF.

+3


source







All Articles