(library
 (name parser_standard)
 (public_name ocamlformat-lib.parser_standard)
 (flags
  (:standard -w -9 -open Parser_shims -open Ocaml_common))
 (libraries compiler-libs.common menhirLib parser_shims 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})))
