I've made a BNF that tokenizes CG-3 almost correctly:
http://beta.visl.sdu.dk/svn/visl/tools/vislcg3/trunk/cg3.g made with
http://antlr.org/
Since I am not a BNF expert, I would like feedback from others on how
to best condense the grammar and solve the remaining parsing issues.
Search for Fixme through the file.
I am also not sure how strict a BNF should be...what is a parsing vs.
interpretation issue? I think a BNF that strictly parses CG-3 would be
many times more complex.
So it needs work, but it's a good start methinks.
-- Tino Didriksen
CG-3 Developer