-2

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
kkk
  • 33
  • 5

1 Answers1

1

open_in takes a file name and returns a channel for this file. Here you give it stdin which is already a channel.

Thomash
  • 6,339
  • 1
  • 30
  • 50