Re: Parser generator that supports regular expressions?

compres!bz@primerd.prime.com (Chris Clark)
Mon, 29 Jun 1992 12:21:03 GMT

          From comp.compilers

Related articles
Parser generator that supports regular expressions? stickler@utrio.helsinki.fi (1992-06-12)
lex and yacc for C++ ubacw00@ucl.ac.uk (1992-06-16)
Re: lex and yacc for C++ dkoosis@aristotle.sbi.com (1992-06-17)
Re: Parser generator that supports regular expressions? N.Chapman@cs.ucl.ac.uk (Nigel Chapman) (1992-06-22)
Re: Parser generator that supports regular expressions? compres!bz@primerd.prime.com (1992-06-29)
| List of all articles for this month |

Newsgroups: comp.compilers,comp.lang.c++,comp.lang.c
From: compres!bz@primerd.prime.com (Chris Clark)
Organization: Compilers Central
Date: Mon, 29 Jun 1992 12:21:03 GMT
Keywords: C++, yacc
References: 92-06-064 92-06-074

While I hate to correct someone whose papers I hold in high esteem, (In
fact, his paper on ELR parsing helped inspire our work.) Nigel made a
slight mistake when he answered the following question.


>> Does anyone know of a YACC-like parse generator that allows regular
>> expressions in rules (i.e. iteration, optionality, disjunction, grouping,
>> etc.).
>
> Not exactly, but I know why you're unlikely to find one in a hurry, if you
> specially want to use an LR parser generator. . . .
>
> I think some of these people produced prototypes at least. (I know I did,
> but since it was written in BCPL it isn't likely to be much use to anyone
> any more. Anyway, it certainly wasn't lex compatible.)


As the LADE people have pointed out, there are parser generators which are
LR and also support regular expressions. The generators do yield fewer
conflicts and additionally have fewer states.


"Yacc++(R) and the Language Objects Library" has been commercially
available since 1990. It uses the common Yacc notation extended with the
typical operators, * for Kleene closure, + for positive closure, and ?
for optional items. Parenthesis are available for grouping and | can be
used for alternatives. [Although unrelated, the same notation was used by
Judith Grass of AT&T in her parser generator Ryacc. As far as I know, she
has not released it. I believe Karsten Nyblad also produced an ELR parser
generator.]


Yacc++ works with LEX if you want it to or includes its own integrated
lexer generator which uses the same notation as the parser. Having
productions in the lexer makes things like nested comments easy.


I won't post a summary of Yacc++'s other features as this group has
already seen them and the postings have been archived.


For people who want to receive the technical marketing literature, send
your snail-mail address to:


Compiler Resources, Inc.
3 Proctor St.
Hopkinton, MA 01748
USA


(508) 435-5016 fax: (508) 435-4847


email: primerd.prime.com!compres!bz
or crackers.clearpoint.com!compres!bz


Disclaimer: I work for the above.


Best Regards to All,
Chris (Clark)
[See messages 91-12-061, 91-09-005, 91-08-132, 91-04-071, and 91-03-095,
for more about yacc++. -John]
--


Post a followup to this message

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