On Wed, 15 Sep 1999, George Russell wrote:
> Re parser combinators. I think I was obviously too rude about
> these, because of my previous bad experience. Naively it seems
> to me that there is a trade-off. I am not prepared to settle
> for anything less than having my grammar statically checked
> for potential conflicts. This obviously rules out rules
> generated with complete generality at run time, and so rules
> out some kinds of parser combinators. I can conceive that you
> can restrict the use of parser combinators in such a way that
> a preprocessor can verify the grammar statically, and
> (by computing follow sets and so on) do as good a job as Yacc,
> while still allowing you the advantages of abstracting
> sequences. Fine.
>
I also like it when my code can be automatically check, in particular
parser grammars. So about 1 1/2 year ago I extended the parsing
combinators of Doaitse Swierstra so that it was possible to actually test
if the grammar was correct (i.e. LL(1)). The checking was done at runtime
but the way I used the checker was that I compiled the grammar and the
grammar checking code separately and ran the tester once. Then I could
(without any modification to the grammar) use it where it was ment to be
used. This way I could get both the freedom of parsing combinators and the
security a grammar analysing tool. It has prooved to be very useful.
/Josef
----------------------------------------------------------
|Josef Svenningsson|http://www.dtek.chalmers.se/~d95josef|
|Rubingatan 39 | email: [EMAIL PROTECTED] |
|421 62 G�teborg | tel: 031-7090774 |
----------------------------------------------------------
What is a magician but a practising theorist?
-- Obi-Wan Kenobi