i am defining a language in ocaml with ocamllex and ocamlyacc. The input for this language is a stream of ints from a file, for example:
1
2
3
open_in
takes a file name and returns a channel for this file. Here you give it stdin
which is already a channel.