caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Simon Cruanes <simon.cruanes.2007@m4x.org>
To: Jon Harrop <jon@ffconsultancy.com>,'caml-list' <caml-list@inria.fr>
Subject: RE: AW: [Caml-list] Working Group: the future of syntax extensions in OCaml, after camlp4
Date: Sun, 03 Feb 2013 15:38:59 +0100	[thread overview]
Message-ID: <ed69b8dc-c0db-4045-a67a-ac22585a616f@email.android.com> (raw)
In-Reply-To: <017801ce0216$f2b2c020$d8184060$@ffconsultancy.com>

[-- Attachment #1: Type: text/plain, Size: 3089 bytes --]

I like the idea of inline lexer/parsers. A problem I have with ocamllex/ocamlyacc is the fact that circular dependencies prevent from using/exporting a parser for some type in the same module where this type is defined. Inline parsers would allow to keep the type and its parser(s) defined together. First-class parsers, even better, would be great for composition.

Cheers, 
-- 
Simon


Jon Harrop <jon@ffconsultancy.com> a écrit :

>
>I worked on a commercial project written in OCaml in Q4 2012 that used
>stream parsing. However, my project was to translate the whole thing
>into
>F#...
>
>I never used stream parsing in any commercial code I wrote myself. I
>did use
>camlp4 quite a bit though and, I must say, the only problem I had was
>that
>it was never finished (the docs end in "..."!). Moreover, my main
>practical
>application of camlp4 was in using it to write parsers. Parsers written
>using Camlp4 are nicer than with any other tool I have ever used. Would
>be a
>shame if OCaml lost this or, if it did, gained the ability to write
>lex/yacc
>in-line without having to battle with multi-stage compilation and a
>wide
>selection of incomplete/broken build tools.
>
>Cheers,
>Jon.
>
>> -----Original Message-----
>> From: caml-list-request@inria.fr [mailto:caml-list-request@inria.fr]
>On
>Behalf
>> Of Alain Frisch
>> Sent: 28 January 2013 12:15
>> To: Gerd Stolpmann
>> Cc: Daniel Bünzli; caml-list; wg-camlp4@lists.ocaml.org; Leo P White;
>Anil
>> Madhavapeddy
>> Subject: Re: AW: [Caml-list] Working Group: the future of syntax
>extensions in
>> OCaml, after camlp4
>> 
>> On 01/24/2013 05:24 PM, Gerd Stolpmann wrote:
>> > It's used in the tool, but only for stream parsing. I could also
>> > distribute the already-preprocessed file (and maybe I'll do so in
>the
>> > next release).
>> >
>> > Stream parsing is certainly one of the topics to discuss.
>> 
>> I've no idea how widely stream parsing is used.  Has anyone some
>intuition
>> about this?
>> 
>> Stream parsers probably fall in the same category as bitstring or
>sedlex
>(custom
>> notions of pattern matching).  It seems that stream parsers (which
>I'm not
>> familiar with) require to be able to write expressions within
>"left-hand
>sides",
>> which might require special support.  Or maybe the whole left-hand
>sides
>should
>> just be quotations.
>> 
>> Anyway, for a basic infrastructure tool such as ocamlfind, I'd
>probably
>advocate
>> for a "manual" solution which works out of the box with a basic OCaml
>> installation (ocamlyacc or manual top-down parser).  Gerd: does that
>sound
>> reasonable to you?
>> 
>> 
>> Alain
>> 
>> 
>> --
>> Caml-list mailing list.  Subscription management and archives:
>> https://sympa.inria.fr/sympa/arc/caml-list
>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
>-- 
>Caml-list mailing list.  Subscription management and archives:
>https://sympa.inria.fr/sympa/arc/caml-list
>Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>Bug reports: http://caml.inria.fr/bin/caml-bugs

[-- Attachment #2: Type: text/html, Size: 4594 bytes --]

  reply	other threads:[~2013-02-03 14:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-24 14:31 Alain Frisch
2013-01-24 15:52 ` Török Edwin
2013-01-24 15:56   ` Ashish Agarwal
2013-01-24 16:03   ` Esther Baruk
2013-01-24 15:57 ` Daniel Bünzli
2013-01-24 16:24   ` AW: " Gerd Stolpmann
2013-01-28 12:15     ` Alain Frisch
2013-01-28 12:17       ` [wg-camlp4] " Alain Frisch
2013-02-03 14:01       ` AW: " Jon Harrop
2013-02-03 14:38         ` Simon Cruanes [this message]
2013-01-24 16:16 ` rixed
2013-01-24 17:08   ` Alain Frisch
2013-01-24 18:06     ` Jacques Carette

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=ed69b8dc-c0db-4045-a67a-ac22585a616f@email.android.com \
    --to=simon.cruanes.2007@m4x.org \
    --cc=caml-list@inria.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;
as well as URLs for NNTP newsgroup(s).