Context free grammars for generating mathematical expressions

771 Views Asked by At

I am looking for some resources on CFGs capable of generating mathematical expressions. For example an expression like the one below

$expression = a + 2b + 4ac$

Where a,b,c are some terminal symbols. Please note that I am not looking for a grammar that generates the above expression, but a repository which I can browse for similar grammars. The more complex the grammars the better.

EDIT: Changed expression to TeX