Re: Q: what parser generator can do this?

"Quinn Tyler Jackson" <>
28 Nov 1999 01:30:25 -0500

          From comp.compilers

Related articles
Q: what parser generator can do this? (Martin Gijsen) (1999-11-25)
Re: Q: what parser generator can do this? (Quinn Tyler Jackson) (1999-11-28)
Re: Q: what parser generator can do this? (1999-11-28)
| List of all articles for this month |

From: "Quinn Tyler Jackson" <>
Newsgroups: comp.compilers
Date: 28 Nov 1999 01:30:25 -0500
Organization: Compilers Central
References: 99-11-158
Keywords: parse

Martin Gijsen said:

> So can anyone out there
> recommend a parser generator that can do all of the following:
> - multiple entry points (multiple parsers, shared code)
> - supports parameters to rules and local variables (like LLgen)
> - error mechanism that enables context specific error messages
> (such as: "bar" expected after "foo")
> - generates C or C++ code (Unix environment)

PAISLEI seems to meet all the above requirements.

It can generate multiple grammars that are re-entrant. (You could
call a PAISLEI grammar for language B from the production code of
parser A, to parse a sub-language, or <SCRIPT> section in HTML, for

You can also extract substrings into "casts" that are easily
accessible from production code, using a macro, so that:


Would match (foobar), and in your C++ code, you can reference the
lexeme "foobar" like this:


This is not quite "variables and parameters..." but it works.

You can generate specific error messages, like this:

                ['a';'b';c' / "A, B, or C expected!" / $

The above would generate the message "A, B, or C expected!" if it
encountered (d), for instance.

Finally, PAISLEI patterns can be written as traditional regular
expressions if you are more comfortable with those, like this:


Although PAISLEI itself runs only on Win32 systems, the classes it
generates have proven to be portable to the *nix C++ compilers. You
can test and generate your grammar on a Win32 system, compile it on a
*nix system.

Version 2.0 is currently in beta at

(If that link doesn't work due to DNS problems, try: )

Quinn Tyler Jackson

Post a followup to this message

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