(library
 (name js_of_ocaml_compiler)
 (public_name js_of_ocaml-compiler)
 (synopsis "Js_of_ocaml compiler library")
 (libraries
  compiler-libs.common
  compiler-libs.bytecomp
  menhirLib
  sedlex
  yojson)
 (flags
  (:standard -w -7-37 -safe-string))
 (preprocess
  (pps ppx_optcomp_light sedlex.ppx)))

(ocamllex annot_lexer)

(menhir
 (modules js_parser)
 (flags
  --table
  --external-tokens
  Js_token
  --unused-token
  TAnnot
  --unused-token
  TComment
  --unused-token
  TCommentLineDirective
  --unused-token
  T_ERROR
  --unused-token
  T_AT))

(menhir
 (modules annot_parser))

(rule
 (targets compiler_version.ml)
 (deps
  (:input-file ../../version.ml.in))
 (action
  (copy %{input-file} %{targets})))
