Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
RE: [Caml-list] CFG Parsers
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Ennals, Robert <robert.ennals@i...>
Subject: RE: [Caml-list] CFG Parsers
Have you tried using a combinatory parser?

Such parsers are usually *MUCH* easier to use, allow much wider choices
of grammar, much better error messages etc, and are usually more than
fast enough.

I don't know what combinator parsers are available for O'Caml, but
Parsec (for Haskell) is pretty sweet. 

Does anyone know of any good combinator parsing libraries for O'Caml? If
there aren't any then I might be tempted to do one myself (getting sick
of yacc).


> -----Original Message-----
> From: [mailto:owner-caml-
>] On Behalf Of David McClain
> Sent: 13 August 2004 16:42
> To: caml
> Subject: [Caml-list] CFG Parsers
> With all due respect, it appears that I need to reframe my thinking
> these YACC parser builders and go backward in time by about 30-40
> Now
> that I'm getting the hang of what it is doing, it looks strongly
> reminiscent
> of the style of programming we did back on old IBM 360's.
> I do notice that YACC becomes very sensitive to slight perturbations
> the
> grammar. This is not meant as a criticism of YACC, but rather a plea
> some more modern thinking in compiler generators. Perhaps the GLC tool
> will
> do better here.
> The problem seems to be the impedance mismatch between the way humans
> led to think when viewing the "structured" YACC input clauses, and the
> more
> or less blind way the computer is actually using that information. I
> that being a master of removing reduce/reduce conflicts seems to be a
> of passage. But surely there has to be a better way to approach these
> kinds
> of problems. Just because my ancestors used to hunt with spears
> mean
> I still ought to do so.
> David McClain
> Senior Corporate Scientist
> Avisere, Inc.
> +1.520.390.7738 (USA)
> -------------------
> To unsubscribe, mail Archives:
> Bug reports: FAQ:
> Beginner's list:

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: