ANNOUNCEMENT: Syntax-diagram generator for YACC grammars

8 Sep 2000 02:18:55 -0400

          From comp.compilers

Related articles
ANNOUNCEMENT: Syntax-diagram generator for YACC grammars (2000-09-08)
| List of all articles for this month |

From: <>
Newsgroups: comp.compilers
Date: 8 Sep 2000 02:18:55 -0400
Organization: Compilers Central
Keywords: parse, tools


A few weeks ago, I wanted to have a syntax-diagram generator for my
YACC grammar. I had an idea of how to do it, and some time to play
with Python. My ideas turned out to be working nicely, and as a
result I now have `showgrammar', my syntax-diagram generator.

Written in Python, it takes a clean (i.e. not polluted with code) YACC
grammar, and generates PStricks code (a LaTeX package for drawing
postscript pictures). As a goodie, I added `stripgrammar.l', a LEX
specification for a grammar-cleaning tool. It may not be perfect, but
it is a nice starting point.

I tried to find some other programs that did the same, but all I could
find were BNF syntax-diagram generators. Although I cannot really
imagine that I am the first to write such a tool, people who are
interested in `showgrammar' can find it at


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.