Re: Visualizing a grammar

Scott Stanchfield <scotts@metaware.com>
8 May 1997 21:25:47 -0400

          From comp.compilers

Related articles
Visualizing a grammar ttlegrady@plg.uwaterloo.ca (Tom Legrady) (1997-05-04)
Re: Visualizing a grammar scotts@metaware.com (Scott Stanchfield) (1997-05-08)
| List of all articles for this month |
From: Scott Stanchfield <scotts@metaware.com>
Newsgroups: comp.compilers.tools.pccts,comp.compilers
Date: 8 May 1997 21:25:47 -0400
Organization: MetaWare Incorporated
References: 97-05-035
Keywords: visual, parse, PCCTS

I'm working on a visual debugger for PCCTS 2.0 right now. It's mostly a
runtime beast (tracking the parse tree, lookahead, grammar breakpoints
etc) but I'm also going to add in static analysis as obtained from ANTLR
(PCCTS' parser generator). It should be an inexpensive shareware tool.
Terence Parr and John Lilley are providing a good debugging interface
for this in PCCTS 2.0


Tom (and others who are reading) -- what types of information would you
like to see, and how would you like it represented?


I get a general idea that you'd like a structure-chart-type tree
representation -- a top down view of how the rules are referenced
starting at a start rule.


I was thinking of using a treeview to display the grammar information,
and providing a hypertext version of the grammar (the tree and grammar
would be linked as well.) From either you could display first/follow
sets and fun things like that. If I'm feeling really ambitious, I'd
like to provide a "what if the next token were" type functionality so
you can see how a parse might proceed.


I'm working on ideas to display grammar conflicts visually as well.


Any ideas are welcome, as I want to make this a "really useful engine",
I mean "really useful tool." (Sorry -- too much "Shining Time Station"
with the kids...)


-- Scott


Tom Legrady wrote:
>
> Are there any tools to provide a visual representation of a grammar?
[snip re wanting tool to comprehend Roskind-like grammar]
--
Scott Stanchfield
MetaWare Incorporated
Santa Cruz, CA
--


Post a followup to this message

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