Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
How to use camllex and camlyacc from camlwin
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1997-12-29 (17:58)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: How to use camllex and camlyacc from camlwin
>       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