Re: How to use camllex and camlyacc from camlwin

From: Xavier Leroy (
Date: Mon Dec 29 1997 - 15:49:22 MET

From: Xavier Leroy <>
Message-Id: <>
Subject: Re: How to use camllex and camlyacc from camlwin
In-Reply-To: <> from Marucita at "Dec 24, 97 05:19:33 pm"
To: (Marucita)
Date: Mon, 29 Dec 1997 15:49:22 +0100 (MET)

> I need to know how to compile and use camllex and camlyacc files from
> the PC version of camllight.
> I've been trying to do it, and the only thing that worked was manually
> from DOS prompt...

camlyacc and camllex are command-line tools, so the most natural way
to use them is indeed from a DOS shell, or (better) a Makefile.

Still, you can invoke them from the Caml graphical user interface
using the sys__system_command function. E.g.:

        cd "\\the\\right\\directory";;
        sys__system_command "camllex mylexer.mll";;
        compile "";;
        load_object "mylexer.zo";;

Yet another alternative is to use streams instead of camllex and


- Xavier Leroy

This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:13 MET