Re: framework for building parsers and lexers?

Chris F Clark <>
19 Jun 1998 10:32:13 -0400

          From comp.compilers

Related articles
framework for building parsers and lexers? (KNAPEN, GREGORY) (1998-06-18)
Re: framework for building parsers and lexers? (Chris F Clark) (1998-06-19)
Re: framework for building parsers and lexers? (Frank Derichsweiler) (1998-06-19)
Re: framework for building parsers and lexers? (Peter Tin Yam Ho) (1998-06-24)
| List of all articles for this month |

From: Chris F Clark <>
Newsgroups: comp.compilers
Date: 19 Jun 1998 10:32:13 -0400
Organization: The World Public Access UNIX, Brookline, MA
References: 98-06-097
Keywords: parse, tools

The answer to your question is yes and no. The "Language Objects
Library" is a framework for parser and lexer applications, but it is
designed for using Yacc++ generated lexers and parsers. Using the
framework does provide more flexibility in how the generated lexers
and parsers are used, and provides some related class hierarchies,
such as symbol table management, and AST classes (the Yacc++ parser
generator can automagically define concrete AST classes based on the
library classes when given the appropriate grammar declarations.)
There was an article by Barbara Zino on the Language Objects Library's
framework architecture at an Object-Oriented Compilers Workshop a few
years back.

There is also a fair degree of flexibility in the ANTLR/PCCTS, JAVACC,
and Cocktail support code. It is a question of what your framework
definition is as to whether any of those tools support code would
qualify. Similar arguments might be advanced for Muskox, Eli, or
Gentle and perhaps other tools as well.

You can even find support code for almost anything you would want to
do with plain old yacc. It's just that no one has ever organized all
the hacks, add-ons, and etc. into any kind of an organized pile (much
less a framework where the pieces fit together).

However, I know of no parsing frameworks in C++ (or Java or C) which
do not have a parser generator at their heart. (Now, I have seen
articles about parsing in C++ without parser generators, but none
suggesting the kind of framework you are looking for.)

Disclaimers: I helped write Yacc++ and the Language Objects Library.
    I was one of the cosponsors of the workshop mentioned.
    I know (at least casually) the authors of many of the tools I mentioned.
    I am probably more biased on this topic than I would care to admit.


Chris Clark Internet :
Compiler Resources, Inc. CompuServe : 74252,1375
3 Proctor Street voice : (508) 435-5016
Hopkinton, MA 01748 USA fax : (508) 435-4847 (24 hours)
Web Site in Progress: Web Site :

Post a followup to this message

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