Boost logo

Boost :

From: Larry Evans (jcampbell3_at_[hidden])
Date: 2001-05-22 10:50:23


joel de guzman wrote:

> From: "Larry Evans" :
>
> > From http://www20.brinkster.com/djowel/spirit_doc.html#N5, I'm inferring
> that no
> > analysis of the grammar (e.g. to calculate the first or follow sets
> > [ohttp://www.antlr.org/papers/pcctsbk.pdf, p.27] of a non-terminal)
> > is done. In other words, the code just keeps parsing and back-tracking
> > until it finds a match. Is that right? If so, then it would obviously be
> much slower
> > than yacc or an LL(1) parser. On the other hand, this would be OK for
> small
> > languages or files, I guess.
>
> Perhaps you are right. Yet in many occasions ambiguities does not
> ever span the whole input, typically, a line, if most a block. C/C++
> decarations
> come to mind. Also, you really have to hack yacc to parse ambiguous grammars
> and LL(1) cannot have ambiguities past 1 token.

What about the problem of backing-out the semantic actions when the parser
back-tracks? I haven't given it much thought, and I don't have an example, but
I'm a little worried that this could be a problem. Have you any experience with
this?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk