From: Larry Evans (jcampbell3_at_[hidden])
Date: 2001-05-21 11:03:24
Roman Yakovenko wrote:
> Right. There are a lot of problems with it.
> Moreover, recursive descent parser (= LL(1)) will have lots of conflicts.
> would you disambiguate? (The URL you've given doesn't work, so I haven't
> looked there).
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.
I'm also wondering about the scanner. Could the scanner actually be another
instance of the parser. For example, I'd like to use some sort of template argument
to specify the scanner. For example, one scanner may just return tokens, but another
may return AST's. Is this possible with SPIRIT?
> So, my final opinion is that "conventional compiler-compler" is better.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk