|references to yacc(1) grammar tools sought firstname.lastname@example.org (1991-01-31)|
|Re: references to yacc(1) grammar tools sought email@example.com (Josef Grosch) (1991-02-07)|
|From:||Josef Grosch <firstname.lastname@example.org>|
|Keywords:||yacc, debug, question|
|Organization:||GMD-Forschungsstelle Karlsruhe, Germany|
|Date:||Thu, 7 Feb 91 12:09:09 -0100|
DaviD W. Sanderson (email@example.com) writes:
> I am looking for references to tools for manipulating or debugging
> yacc grammars.
> For instance, one such tool might illustrate ambiguities in a grammar
> by exhibiting sequences of grammar symbols that can be parsed more than
> one way (and hopefully showing at least two derivation trees).
The following article describes a solution to this problem:
%A Frank DeRemer
%A Thomas Pennello
%T Efficient Computation of LALR(1) Look-Ahead Sets
%D OCT 1982
In case of ambiguities in the grammar, derivation trees can be printed
that illustrate the conflict. We have implemented this algorithm in our
parser generator Lalr. Using a preprocessor, yacc input can be directly
processed by this tool. Our experiences are very satisfying. Looking at the
derivation trees printed for conflicts you can more or less locate the
problem immediately. The time for debugging grammars is reduced significantly.
Josef Grosch (grosch@gmdka)
Return to the
Search the comp.compilers archives again.