From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 4AD0CBCAF for ; Sun, 3 Jul 2005 21:13:12 +0200 (CEST) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.85]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j63JDBTc025275 for ; Sun, 3 Jul 2005 21:13:11 +0200 Received: from mac.com (smtpin08-en2 [10.13.10.153]) by smtpout.mac.com (Xserve/8.12.11/smtpout03/MantshX 4.0) with ESMTP id j63JD9r6011527 for ; Sun, 3 Jul 2005 12:13:09 -0700 (PDT) Received: from [192.168.0.100] (dsl092-032-215.lax1.dsl.speakeasy.net [66.92.32.215]) (authenticated bits=0) by mac.com (Xserve/smtpin08/MantshX 4.0) with ESMTP id j63JD77S019772 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Sun, 3 Jul 2005 12:13:08 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v730) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <73C4942E-2CD1-42AC-91D7-7D0939AA7FA6@mac.com> Content-Transfer-Encoding: 7bit From: Paul Snively Subject: Using ulex Date: Sun, 3 Jul 2005 12:12:57 -0700 To: caml-list@yquem.inria.fr X-Pgp-Agent: GPGMail 1.1 (Tiger) X-Gpgmail-State: signed X-Mailer: Apple Mail (2.730) X-Miltered: at concorde with ID 42C838C7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; hash:01 lexer:01 syntax:01 o'caml:01 findlib:01 ocaml:01 parsing:01 usr:01 lib:01 ocaml:01 site-lib:01 usr:01 lib:01 site-lib:01 lexer:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi folks, I'm trying to use Alain Frisch's ulex to write a simple .ini file lexer. I'm still pretty new to the module system, how libraries work, and in particular how camlp4 and syntax extensions work. Here are the things I've tried to just get ulex to tell me I'm not being foolish. This is with O'Caml 3.08.3 and findlib 1.0.4 on Mac OS X 10.4.1: - -------------------------------------snip snip------------------------------------- Valhalla:~ psnively$ ocaml Objective Caml version 3.08.3 # #load "camlp4o.cma";; Camlp4 Parsing version 3.08.3 # #load "/usr/local/lib/ocaml/site-lib/ulex/pa_ulex.cma";; # #load "/usr/local/lib/ocaml/site-lib/ulex/ulexing.cma";; # (lexer ("#!" [^ '\n']* "\n")? -> ()) lexbuf;; (* This is from the README *) Unbound value Ulexing.mark # - -------------------------------------snip snip------------------------------------- OK, so maybe I need to "open Ulexing;;": - -------------------------------------snip snip------------------------------------- # open Ulexing;; Unbound module Ulexing # - -------------------------------------snip snip------------------------------------- I'm working too hard: this is what findlib is for. So, in a fresh ocaml: - -------------------------------------snip snip------------------------------------- Valhalla:~ psnively$ ocaml Objective Caml version 3.08.3 # #use "topfind";; - - : unit = () Findlib has been successfully loaded. Additional directives: #require "package";; to load a package #list;; to list the available packages #camlp4o;; to load camlp4 (standard syntax) #camlp4r;; to load camlp4 (revised syntax) #predicates "p,q,...";; to set these predicates Topfind.reset();; to force that packages will be reloaded #thread;; to enable threads - - : unit = () # #camlp4o;; /usr/local/lib/ocaml/camlp4: added to search path /usr/local/lib/ocaml/camlp4/camlp4o.cma: loaded Camlp4 Parsing version 3.08.3 # #require "ulex";; /usr/local/lib/ocaml/site-lib/ulex: added to search path /usr/local/lib/ocaml/site-lib/ulex/pa_ulex.cma: loaded /usr/local/lib/ocaml/site-lib/ulex/ulexing.cma: loaded # (lexer ("#!" [^ '\n']* "\n")? -> ()) lexbuf;; Unbound value __ulex_partition_0 # - -------------------------------------snip snip------------------------------------- I confess to being stumped. Any advice would be most welcome. Best regards, Paul Snively -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iEYEARECAAYFAkLIOMEACgkQO3fYpochAqLSsACgyRinCveNEtyHRQUyt/1Y//ao q/gAn1tj7Zw0g1KyqBpeQMxd9LvscE13 =45hF -----END PGP SIGNATURE-----