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
[Caml-list] Re: Efficient C++ Interfacing?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-06-29 (01:35)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Re: Efficient C++ Interfacing?
On Tue, 2004-06-29 at 05:58, Eray Ozkural wrote:
>  The only sad thing about these systems is that they are not 
> written in ocaml. :) 

An Earley parser is easy to make, RD even easier
although it's a bit harder in that case to get the
grammar right.

The main problem is handling the silly identifier/typename
distinction, which is easy to do .. and hard to *undo*:
forgetting things is vital for a functional parser.
Tying the lexer and parser together solves this problem.

I assume performance isn't as vital to you as actually
parsing the input. Earley seems quite feasible for C++,
since in practice there are enough 'stopping symbols'
to restrict the O(n^3) performance problem to small
enough n to be practical.

The bottom line here is that it is a lot of work
to elaborate all the grammar productions, especially
if you want to take MSC/gnu extensions into account
and handle "C" as well (since C has distinct
rules for some things like enums and nested classes).

John Skaller,
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language

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