diff --git a/.travis.yml b/.travis.yml index cd4165ea..5d0a8753 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ before_install: - export OPAMVERBOSE=1 - opam switch ${OCAML_VERSION} - eval `opam config env` - - opam install ocamlfind dune iter + - opam install ocamlfind dune iter camlzip - if ${RUN_TEST}; then opam install containers ; fi install: - make build diff --git a/dune-project b/dune-project index 977e7d75..7655de07 100644 --- a/dune-project +++ b/dune-project @@ -1,2 +1 @@ (lang dune 1.1) -(using menhir 1.0) diff --git a/src/main/Dimacs_parse.mly b/src/main/Dimacs_parse.mly index 3ad9341b..408b8db9 100644 --- a/src/main/Dimacs_parse.mly +++ b/src/main/Dimacs_parse.mly @@ -21,21 +21,14 @@ prelude: | P CNF LIT LIT { () } - | error - { - failwith @@ Format.asprintf "expected prelude %a" pp_pos ($startpos,$endpos) - } clauses: - | l=clause* { l } - | error - { - failwith @@ Format.asprintf "expected list of clauses %a" - pp_pos ($startpos,$endpos) - } + | { [] } + | clause clauses { $1 :: $2 } file: - | prelude l=clauses EOF { l } + | prelude clauses EOF { $2 } clause: - | l=LIT+ ZERO { l } + | ZERO { [] } + | LIT clause { $1 :: $2 } diff --git a/src/main/dune b/src/main/dune index 96d0cc4a..073ec30f 100644 --- a/src/main/dune +++ b/src/main/dune @@ -10,5 +10,5 @@ -unbox-closures -unbox-closures-factor 20) ) -(menhir (modules Dimacs_parse)) +(ocamlyacc (modules Dimacs_parse)) (ocamllex (modules Dimacs_lex))