Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Eray Ozkural <exa@kablonet.com.tr>
To: skaller@users.sourceforge.net
Cc: "£ukasz Dobrek" <dobrek@dobrek.de>, caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Re: Efficient C++ Interfacing?
Date: Wed, 7 Jul 2004 04:02:43 +0300	[thread overview]
Message-ID: <200407070402.43790.exa@kablonet.com.tr> (raw)
In-Reply-To: <1088472936.18587.154.camel@pelican.wigram>

On Tuesday 29 June 2004 04:35, skaller wrote:
> 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).

I'd studied Earley parsers in an NLP course. I've no idea if it would be so 
much easier than an ANTLR or OpenC++ parser, though. Is it because we 
wouldn't have to factor the grammar or some other improvement in 
specification? Would we be able to maintain semantic predicates a la ANTLR 
easily? (The lead developer of ANTLR seems to suggest writing a C++ parser is 
a crafty, difficult thing regardless of which parser technology you 
choose...)

Regards,

-- 
Eray Ozkural (exa) <erayo@cs.bilkent.edu.tr>
Comp. Sci. Dept., Bilkent University, Ankara  KDE Project: http://www.kde.org
http://www.cs.bilkent.edu.tr/~erayo  Malfunction: http://malfunct.iuma.com
GPG public key fingerprint: 360C 852F 88B0 A745 F31B  EA0F 7C07 AE16 874D 539C

-------------------
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-07-07  1:02 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
2004-07-07  1:02         ` Eray Ozkural [this message]
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=200407070402.43790.exa@kablonet.com.tr \
    --to=exa@kablonet.com.tr \
    --cc=caml-list@inria.fr \
    --cc=dobrek@dobrek.de \
    --cc=erayo@cs.bilkent.edu.tr \
    --cc=skaller@users.sourceforge.net \
    /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