5

I am implementing a grammar in CUP, and it would often be helpful to see everything at a glance. This could also be useful in finding errors quickly.

Are there any programs out there that will visualize grammar in the CUP syntax? Or can you think of a very easy way of doing it (for instance, convert the grammar to another format that program X can read).

1 Answers1

1

You might need to convert it to another format first.

You could generate a graph of the grammar by using a combination of ANTLRWorks and GraphViz.

Someone did something similar here to generate graphs for the Ruby, JavaScript, and Java 1.5 grammars.

haylem
  • 29,005