Re: LR(1) Parser Generator

Vladimir Makarov <>
18 Jul 2001 19:57:35 -0400

          From comp.compilers

Related articles
Minimal Scripting Lang (2001-06-14)
Re: Minimal Scripting Lang (2001-06-28)
LR(1) Parser Generator (Tim Josling) (2001-07-17)
Re: Minimal Scripting Lang (2001-07-17)
Re: LR(1) Parser Generator (2001-07-18)
Re: LR(1) Parser Generator (Vladimir Makarov) (2001-07-18)
Re: LR(1) Parser Generator (Mike Dimmick) (2001-07-18)
Re: LR(1) Parser Generator (Tim Josling) (2001-07-23)
Re: LR(1) Parser Generator (2001-07-23)
Re: LR(1) Parser Generator (David R Tribble) (2001-07-23)
Re: LR(1) Parser Generator (Mark) (2001-07-23)
Re: LR(1) Parser Generator (2001-07-30)
[3 later articles]
| List of all articles for this month |

From: Vladimir Makarov <>
Newsgroups: comp.compilers
Date: 18 Jul 2001 19:57:35 -0400
Organization: Red Hat (Toronto)
References: 01-06-030 01-06-069 01-07-084
Keywords: LR(1), parse
Posted-Date: 18 Jul 2001 19:57:35 EDT

Tim Josling wrote:
> I am looking for the source for an LR(1) compiler, preferably
> written in C, and with open source licencing.

    You could try MSTA. You can find it in COCOM toolset on

    The MSTA can emulate YACC (Posix standard or System V Yacc). The MSTA
have the following additional features:

        o Accepting LR(k) and LALR(k) grammars (with possibility of resolution
            of conflicts). Look ahead of only necessary depth (not necessary
            given k). Originally LALR(k) parsers are generated by modified
            fast DeRemer's algorithm. Parsers generated by MSTA are up to 30%
            faster than ones generated by BISON and BYACC but usually have
            bigger size.

        o Extended Backus-Naur Form (EBNF), and constructions for more
            convenient description of the scanners. More convenient
            naming attributes.

        o Optimizations (extracting LALR- and regular parts of grammars and
            implementing parsing them by adequate methods) which permit to
            use MSTA for generation of effective lexical analyzers. As
            consequence MSTA permits to describe easily (by CFG) scanners
            which can not be described by regular expressions (i.e. nested

        o More safe error recovery and reporting (besides standard error
            recovery method of YACC).

        o Fast generation of fast parsers.

Post a followup to this message

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