From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA12365; Tue, 27 Jul 2004 23:45:37 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA12751 for ; Tue, 27 Jul 2004 23:45:36 +0200 (MET DST) Received: from trdlnk.com ([208.252.163.7]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i6RLjZEV009226 for ; Tue, 27 Jul 2004 23:45:35 +0200 Received: from minglewood.chicago.trdlnk.com (minglewood [10.10.1.79]) by trdlnk.com (8.12.10+Sun/8.12.9) with ESMTP id i6RLjE9o003085 for ; Tue, 27 Jul 2004 16:45:14 -0500 (CDT) Received: from minglewood.chicago.trdlnk.com (localhost [127.0.0.1]) by minglewood.chicago.trdlnk.com (8.12.10+Sun/8.12.9) with ESMTP id i6RLj5rO007988 for ; Tue, 27 Jul 2004 16:45:05 -0500 (CDT) Received: (from josh@localhost) by minglewood.chicago.trdlnk.com (8.12.10+Sun/8.12.9/Submit) id i6RLj4Hs007987 for caml-list@inria.fr; Tue, 27 Jul 2004 16:45:04 -0500 (CDT) Date: Tue, 27 Jul 2004 16:45:04 -0500 From: Josh Smith To: caml-list@inria.fr Subject: [Caml-list] Camlp4 help/questions Message-ID: <20040727214504.GA7950@trdlnk.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Miltered: at nez-perce with ID 4106CCFF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; camlp:01 camlp:01 regex:01 largish:01 descent:01 million:98 ocaml:01 ocaml:01 syntax:02 parser:02 parsers:03 recursive:03 library:03 data:03 data:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I apologize if this is not the right list to send this too, but I'm nearing my feeble wits' end and I'm starting here... I have a project that is currently using c++ that I would like to convert to Ocaml (parts of it are already in Ocaml and I'd like to simplify my codebase). However, I am using the Spirit library from Boost to do parsing in c++ and I cannot figure out Camlp4 to convert it. If there is anyone who knows both Spirit and Camlp4 who can help me I was appreciate it a lot. Maybe I am an idiot, but I've been through the tutorial and it didn't help me very much. I've been looking for example code for simple parsers and I've found many, many calculators but little else. I've even tried to go back to ocamlyacc/ocamllex but the yacc/lex syntax bothers me. I can even give you an example of what I'm trying to parse and then use the resulting data structure (I could do regex, but these are from largish data files and the robostness provided by a parser is what I need). a23fassssadfj4532|10,2;13,3;20;20|10|20|30|B aassafjeifdfj4532|11,21;13,33|1|2|3|T ... and so on for about a million lines or so the unasked question here is "Is this the right way to go?" I mean, is Camlp4 the tool I should be using? I think it is, because the top down, recursive descent parsing is what Spirit does, but maybe I've just confused things. Any help is appreciated. Thank you all. -jbs ------------------- 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