![](https://secure.gravatar.com/avatar/d246baeefae20788d6ea519b777a99c7.jpg?s=120&d=mm&r=g)
Dnia 2013-03-20, o godz. 12:22:55
Jonathan Barchi
BNF grammar descriptions, but some reading suggests that this can't be done for *TeX.
Don't listen to that. While it's technically true, (a) most users don't redefine catcodes or internal macros anyway (and imho there are fewer reasons to do such hacking in ConTeXt than in LaTeX) and (b) for the sake of syntax highlighting/parsing by external tools, you have to assume some sanity anyway (so that you don't have to reimplement full TeX instead of writing some parser). That said, I know little about regular languages, BNF notations etc. (with the exception of some _practical_ experience with regexen), so I'm not sure about what I've written above. But I would guess that if you make some (reasonable) assumptions about catcodes and command syntax, writing a BNF style grammar for (at least some part of) ConTeXt might be pretty doable. Regards, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University