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 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