caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: erayo@cs.bilkent.edu.tr
Cc: "£ukasz Dobrek" <dobrek@dobrek.de>, caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Re: Efficient C++ Interfacing?
Date: 29 Jun 2004 11:35:36 +1000	[thread overview]
Message-ID: <1088472936.18587.154.camel@pelican.wigram> (raw)
In-Reply-To: <200406282258.24202.exa@kablonet.com.tr>

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, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2004-06-29  1:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-08 15:02 Fritz Wuehler
2004-06-08 19:13 ` skaller
2004-06-08 20:49 ` Eray Ozkural
2004-06-08 21:19   ` £ukasz Dobrek
2004-06-28 19:58     ` Eray Ozkural
2004-06-29  1:35       ` skaller [this message]
2004-07-07  1:02         ` Eray Ozkural
2004-07-07  6:59           ` skaller
2004-07-07  3:29         ` Ethan Lee Aubin
  -- strict thread matches above, loose matches on Subject: below --
2004-06-07 11:46 privacy.at Anonymous Remailer
2004-06-07 15:50 ` skaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1088472936.18587.154.camel@pelican.wigram \
    --to=skaller@users.sourceforge.net \
    --cc=caml-list@inria.fr \
    --cc=dobrek@dobrek.de \
    --cc=erayo@cs.bilkent.edu.tr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).