From: skaller <skaller@users.sourceforge.net>
To: Jon Harrop <jon@ffconsultancy.com>
Cc: caml-list@yquem.inria.fr, Emmanuel Onzon <emmanuel.onzon@ens-lyon.fr>
Subject: Re: [Caml-list] Parsing
Date: Fri, 22 Jun 2007 14:03:14 +1000 [thread overview]
Message-ID: <1182484994.7140.26.camel@rosella.wigram> (raw)
In-Reply-To: <200706220014.39510.jon@ffconsultancy.com>
On Fri, 2007-06-22 at 00:14 +0100, Jon Harrop wrote:
> I'm not a parser junkie, so please bear with me if this is silly...
>
> The camlp4 stream parsing syntax extension is a very cool way to write
> efficient parsers for simple grammars:
[]
> However, you must factor heads in the pattern matches.
> Why is this? Is it because the streams are destructive?
Yes.
> Are there other parser tools that integrate into the language and do a better
> job?
Yes. Dypgen. I'm cc'ing to emmanuel, because a Dypgen parser using
a stream as an input would be very cool!
Dypgen is GLR, so all the cases get considered simultaneously.
The current build uses an LR0 kernel I think, so there's no
lookahead.
Also, dypgen is extensible, so you can build grammars at
run time and then parse with them. Doing that requires
a bit more code, some of which could be 'libraried' and the
rest probably supported with camlp4 macros if you're into that.
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
next prev parent reply other threads:[~2007-06-22 4:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-21 23:14 Parsing Jon Harrop
2007-06-21 23:26 ` [Caml-list] Parsing Jonathan Bryant
2007-06-21 23:45 ` Christian Stork
2007-06-22 4:03 ` skaller [this message]
2007-06-22 10:14 ` Bruno De Fraine
2007-06-24 17:17 ` Jon Harrop
2012-02-11 2:07 malc
2012-02-11 2:25 ` Ashish Agarwal
2012-02-11 17:41 ` Esther Baruk
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=1182484994.7140.26.camel@rosella.wigram \
--to=skaller@users.sourceforge.net \
--cc=caml-list@yquem.inria.fr \
--cc=emmanuel.onzon@ens-lyon.fr \
--cc=jon@ffconsultancy.com \
/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