Re: dynamic parsers re parser generators

"joel de guzman" <>
13 Apr 2002 23:00:56 -0400

          From comp.compilers

Related articles
dynamic parsers re parser generators (2002-03-31)
Re: dynamic parsers re parser generators (2002-04-06)
Re: dynamic parsers re parser generators (joel de guzman) (2002-04-13)
| List of all articles for this month |

From: "joel de guzman" <>
Newsgroups: comp.compilers
Date: 13 Apr 2002 23:00:56 -0400
Organization: Compilers Central
References: 02-03-206 02-04-007
Keywords: parse
Posted-Date: 13 Apr 2002 23:00:56 EDT

> > Question:
> > Is there any parser generator/lexical analyzer that delivers this
> > functionality and produces C/C++ (portable) code?
> The Spirit library ( can do this.
> However, it's not really a 'full strength' lexer/parser in the sense
> of the more familiar tools like lex/yacc/pccts - there is no separate
> lexer (i.e. the terminal symbols are characters). Syntactically
> grammars look like EBNF, but this is achieved using clever operator
> overloading in C++, so no preprocessor is needed. It is also possible
> to dynamically create, and to some extent modify, parsers at run time. ...

FYI, Spirit can have a separate lexer and indeed one is available. A
DFA based lexer was written by Dan Nuffer (an active Spirit
developer). The lexer was also written in, umm, Spirit. BTW this
lexer *IS* dynamically extensible at run time. That's why Dan calls it
a dynamic lexer.

Also, Spirit is not limited to full backtracking RD. In fact,
development is ongoing regarding the possibility to do "functional"
bottom up LR parsing (i.e. recursive ascent). Also, I am developing
the LL(1) module now through some quite interesting template
metaprogramming scheme. Here, I intend to eliminate direct left
recursion and do automatic left factoring. This can be done through
functional composition transformations. "Functional programming"
technique when applied to parsers as is done in Haskell combinators is
extremely flexible.


PS> Sarah, I would be very interested to form a collaboration.
Spirit is a boost candidate now and it would do us good to
put our minds together. Thanks...

Post a followup to this message

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