Related articles |
---|
Minimal Scripting Lang c_wardell@hotmail.com (2001-06-14) |
Re: Minimal Scripting Lang nr@labrador.eecs.harvard.edu (2001-06-28) |
LR(1) Parser Generator tej@melbpc.org.au (Tim Josling) (2001-07-17) |
Re: Minimal Scripting Lang kelder@bco.com (2001-07-17) |
Re: LR(1) Parser Generator marcov@toad.stack.nl (2001-07-18) |
Re: LR(1) Parser Generator vmakarov@redhat.com (Vladimir Makarov) (2001-07-18) |
Re: LR(1) Parser Generator mike@dimmick.demon.co.uk (Mike Dimmick) (2001-07-18) |
Re: LR(1) Parser Generator tej@melbpc.org.au (Tim Josling) (2001-07-23) |
Re: LR(1) Parser Generator haberg@matematik.su.se (2001-07-23) |
Re: LR(1) Parser Generator david@tribble.com (David R Tribble) (2001-07-23) |
Re: LR(1) Parser Generator cotemark@globetrotter.net (Mark) (2001-07-23) |
Re: LR(1) Parser Generator thp@cs.ucr.edu (2001-07-30) |
[3 later articles] |
From: | Vladimir Makarov <vmakarov@redhat.com> |
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
http://cocom.sourceforge.net
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
comments).
o More safe error recovery and reporting (besides standard error
recovery method of YACC).
o Fast generation of fast parsers.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.