On Tue, 8 May 2007, Chris Velevitch wrote:
> I've created my first ocamllex program using the simple example in the
> tutorial
br>
>
> { }
> rule translate = parse
> | "current_directory" { print_string (Sys.getcwd ()); translate lexbuf }
> | _ as c { print_char c; translate lexbuf }
> | eof { exit 0 }
>
> I have successfully compile it. I tried running it
br>
>
> ./main.exe <test.dat
>
> but I get no output or errors. I'm using the windows verison 3.09.
>
> What am I doing wrong?
The problem here (from what little info you've included) is that while
you have defined your lexer, you don't have any code there to call it.
Did you include the footer code from the example that provides this call?
If so, what is the contents of test.dat?
William D. Neumann
---
"There's just so many extra children, we could just feed the
children to these tigers. We don't need them, we're not doing
anything with them.
Tigers are noble and sleek; children are loud and messy."
-- Neko Case
Life is unfair. Kill yourself or get over it.
-- Black Box Recorder
.