10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-06-20 12:12:05 +02:00
QCaml/Basis/GamessReader.ml
2018-03-06 18:25:54 +01:00

17 lines
320 B
OCaml

let read_basis filename =
let lexbuf =
let ic = open_in filename in
Lexing.from_channel ic
in
let rec aux accu =
try
let key, basis =
GamessParser.input BasisLexer.read_all lexbuf
in
aux ((key, basis)::accu)
with
| Parsing.Parse_error -> List.rev accu
in
aux []