Related articles |
---|
Anyone got an LALR(2) parser-generator ? lindsay-j@rmc.ca (1995-08-25) |
Re: Anyone got an LALR(2) parser-generator ? Martin.Jourdan@inria.fr (1995-09-04) |
Re: Anyone got an LALR(2) parser-generator ? BARRETO%VELAHF@ECCSA.Tr.Unisys.com (1995-09-04) |
Re: Anyone got an LALR(2) parser-generator ? Thomas.Herter@mch.sni.de (1995-09-04) |
Re: Anyone got an LALR(2) parser-generator ? Martin.Jourdan@inria.fr (1995-09-11) |
Backtracking Parser Generators (was Re: Anyone got an LALR(2) ...) mw@ipx2.rz.uni-mannheim.de (1995-09-11) |
Re: Anyone got an LALR(2) parser-generator ? farzu@uvg.edu.gt (1995-09-18) |
Re: Anyone got an LALR(2) parser-generator ? grosch@cocolab.sub.com (1995-10-30) |
Newsgroups: | comp.compilers |
From: | Thomas.Herter@mch.sni.de (Thomas Herter) |
Keywords: | parse |
Organization: | himself |
References: | 95-09-009 |
Date: | Mon, 4 Sep 1995 13:27:09 GMT |
John H. Lindsay (lindsay-j@rmc.ca) wrote:
: I'm working with a language definition that needs an LALR(2)
: parser-generator for a couple of good reasons; does anyone have
: one or know where I can get one ?
Hallo John,
a good alternative to a LALR(n), n>1, or even LR(n), n>1 tool is
the usage of tools with a local definable trial parsing (or
backtrack parsing). One advantage of such approach is the better
speed, since no longer lookahead than 1 will be analysed in most
productions. Another advantage is, that such a trial parsing is
de facto an anlysis with an unlimitted lookahead, so that you can
formal describe even such nondeterministic grammars, like
the C++ grammar.
I am aware on two such tools based on bottom-up technique:
LADE by Xorian Ltd and Lark by J. Grosch and his CocoLab GmbH.
During an evaluation phase I have observed, that LADE generated
parsers are very, very slow. Compared to that, the parsers generated
by Lark are really quick. It is known, that without trial parsing
the lalr/Lark parsing machine outperforms yacc parsing machine
by a factor 1.5-3 depending on the particular grammar and input
_and_ provides an automatical error detection/correction on the fly.
With the trial parsing, some additional computational effort is
necessary (for example, one or two if's per token to ask for the
current parsing mode). Furthermore, Lark provides a fine support for
a couple of languages, whereas LADE supports just C++.
Lark supports Modula-2, Ansi C, C++, Eiffel and ADA
(and possibly some more).
It's a pleasure to use this tool and to parse almost
impossible looking grammars with it!
Thomas.
--
Thomas Herter email: thomas.herter@mch.sni.de
+89 636-49973 100275.541@compuserve.com
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.