(library
 (name ocamlformat_parser_extended)
 (public_name ocamlformat-lib.parser_extended)
 (flags
  (:standard
   -w
   -9
   -open
   Ocamlformat_parser_shims
   -open
   Ocamlformat_ocaml_common))
 (libraries
  compiler-libs.common
  menhirLib
  ocamlformat_parser_shims
  ocamlformat_ocaml_common))

(ocamllex lexer)

(menhir
 (infer false)
 (flags
  :standard
  --lalr
  --strict
  --unused-token
  COMMENT
  --unused-token
  DOCSTRING
  --unused-token
  EOL
  --unused-token
  GREATERRBRACKET
  --fixed-exception
  --table
  --strategy
  simplified)
 (modules parser))

(rule
 (targets asttypes.ml)
 (mode fallback)
 (action
  (copy# asttypes.mli %{targets})))

(rule
 (targets parsetree.ml)
 (mode fallback)
 (action
  (copy# parsetree.mli %{targets})))
