dune 1.96 KB
Newer Older
1 2
;; -*-lisp-*-

3 4 5 6 7 8 9 10
(ocamllex script_lexer)

(menhir
; (flags (--explain --table --compile-errors /home/pogodall/work/dev/ACGtk/src/scripting/command_parser.messages))
 (flags (--explain --table))
 (modules command_parser))

;; Rule to generate the messages ml file
11
(rule
12
 (targets messages.ml)
13
 (enabled_if (= %{profile} dev))
14 15 16
 (mode promote)
 (deps
  (alias update)
17
  (alias check_all_messages)
18
  (:message_file command_parser.messages)
19 20 21
  (:parser command_parser.mly)
  )
 (action
22
  (with-stdout-to messages.ml (run menhir --explain --table --compile-errors %{message_file} %{parser})))
23 24
 )

25 26 27 28 29
;; Rule to generate the automatic message file
(rule
 (targets command_parser.messages.automatic)
 (deps (:parser command_parser.mly))
 (action
30
  (with-stdout-to command_parser.messages.automatic (run menhir --explain --table --list-errors %{parser})))
31 32 33 34 35 36
 )

;; Rule to generate the message file
(rule
 (targets command_parser.messages.new)
 (deps (:parser command_parser.mly))
37
 (action (with-stdout-to command_parser.messages.new (run menhir --explain --table --update-errors command_parser.messages %{parser}))
38 39 40 41 42 43 44 45 46
  )
 )

(alias
 (name update)
 (action (diff command_parser.messages command_parser.messages.new))
 )

(alias
47
 (name check_all_messages)
48 49 50 51 52
 (deps
  command_parser.messages.automatic
  command_parser.messages
  (:parser command_parser.mly)
  )
53
 (action (run menhir --explain --table --compare-errors command_parser.messages.automatic --compare-errors command_parser.messages %{parser}))
54 55 56
 )


57 58 59 60 61 62 63 64

;; This stanza declares the scripting library
(library
 (name scripting)
  (flags (:standard -w -58))
  (modules (:standard \ acg io_test))
  (libraries
   cairo2
POGODALLA Sylvain's avatar
POGODALLA Sylvain committed
65 66
   yojson
   
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
   utilsLib
   acgData
   grammars
   ))


;; This declares the acgc executable implemented by acg.ml
(executable
 (name acg)
 (public_name acg)
 (package acgtk)
 (modules acg)
 (flags (:standard -w -58))
 (libraries
  cairo2
82
  fmt.tty
83 84
  cmdliner
  
85 86 87 88 89 90 91
  utilsLib
  acgData
  grammars
  scripting
  ))
 

92
(documentation (package acgtkLib))