Fixed builds of ParserMain.exe. Fixed parser (code_inj).
This commit is contained in:
parent
e42381fb84
commit
c379d1078e
@ -56,7 +56,6 @@ type c_Some = Region.t
|
||||
|
||||
type arrow = Region.t (* "->" *)
|
||||
type cons = Region.t (* "::" *)
|
||||
type percent = Region.t (* "%" *)
|
||||
type cat = Region.t (* "^" *)
|
||||
type append = Region.t (* "@" *)
|
||||
type dot = Region.t (* "." *)
|
||||
|
@ -586,15 +586,10 @@ core_expr:
|
||||
| par(expr) { EPar $1 }
|
||||
| par(annot_expr) { EAnnot $1 }
|
||||
|
||||
code_insert:
|
||||
"[" "%" Constr expr "]" {
|
||||
let region = cover $1 $5 in
|
||||
let value = {
|
||||
lbracket =$1;
|
||||
percent =$2;
|
||||
language =$3;
|
||||
code =$4;
|
||||
rbracket =$5}
|
||||
code_inj:
|
||||
"<lang>" expr "]" {
|
||||
let region = cover $1.region $3
|
||||
and value = {language=$1; code=$2; rbracket=$3}
|
||||
in {region; value} }
|
||||
|
||||
annot_expr:
|
||||
@ -709,9 +704,3 @@ let_in_sequence:
|
||||
|
||||
seq_expr:
|
||||
disj_expr_level | if_then_else (seq_expr) { $1 }
|
||||
|
||||
code_inj:
|
||||
"<lang>" expr "]" {
|
||||
let region = cover $1.region $3
|
||||
and value = {language=$1; code=$2; rbracket=$3}
|
||||
in {region; value} }
|
||||
|
@ -53,7 +53,7 @@
|
||||
(executable
|
||||
(name ParserMain)
|
||||
(libraries parser_cameligo)
|
||||
(modules ParserMain)
|
||||
(modules ParserMain Parser_msg)
|
||||
(preprocess
|
||||
(pps bisect_ppx --conditional))
|
||||
(flags (:standard -open Simple_utils -open Parser_shared -open Parser_cameligo)))
|
||||
@ -65,6 +65,19 @@
|
||||
(deps (:script_messages ../../../../vendors/ligo-utils/simple-utils/messages.sh) Parser.mly LexToken.mli ParToken.mly)
|
||||
(action (run %{script_messages} --lex-tokens=LexToken.mli --par-tokens=ParToken.mly Parser.mly)))
|
||||
|
||||
(rule
|
||||
(targets Parser_msg.ml)
|
||||
(deps Parser.mly ParToken.mly Parser.msg)
|
||||
(action
|
||||
(with-stdout-to %{targets}
|
||||
(bash
|
||||
"menhir \
|
||||
--compile-errors Parser.msg \
|
||||
--external-tokens LexToken \
|
||||
--base Parser \
|
||||
ParToken.mly \
|
||||
Parser.mly"))))
|
||||
|
||||
;; Build of all the LIGO source file that cover all error states
|
||||
|
||||
(rule
|
||||
@ -74,27 +87,6 @@
|
||||
|
||||
;; Error messages
|
||||
|
||||
;; Generate error messages from scratch
|
||||
; (rule
|
||||
; (targets error.messages)
|
||||
; (deps Parser.mly ParToken.mly error.messages.checked-in)
|
||||
; (action
|
||||
; (with-stdout-to %{targets}
|
||||
; (bash
|
||||
; "menhir \
|
||||
; --unused-tokens \
|
||||
; --list-errors \
|
||||
; --table \
|
||||
; --strict \
|
||||
; --external-tokens LexToken.mli \
|
||||
; --base Parser.mly \
|
||||
; ParToken.mly \
|
||||
; Parser.mly
|
||||
; "
|
||||
; )
|
||||
; ))
|
||||
; )
|
||||
|
||||
(rule
|
||||
(targets error.messages)
|
||||
(mode (promote (until-clean) (only *)))
|
||||
|
@ -66,6 +66,19 @@
|
||||
(deps (:script_messages ../../../../vendors/ligo-utils/simple-utils/messages.sh) Parser.mly LexToken.mli ParToken.mly)
|
||||
(action (run %{script_messages} --lex-tokens=LexToken.mli --par-tokens=ParToken.mly Parser.mly)))
|
||||
|
||||
(rule
|
||||
(targets Parser_msg.ml)
|
||||
(deps Parser.mly ParToken.mly Parser.msg)
|
||||
(action
|
||||
(with-stdout-to %{targets}
|
||||
(bash
|
||||
"menhir \
|
||||
--compile-errors Parser.msg \
|
||||
--external-tokens LexToken \
|
||||
--base Parser \
|
||||
ParToken.mly \
|
||||
Parser.mly"))))
|
||||
|
||||
;; Build of all the LIGO source file that cover all error states
|
||||
|
||||
(rule
|
||||
@ -75,27 +88,6 @@
|
||||
|
||||
;; Error messages
|
||||
|
||||
;; Generate error messages from scratch
|
||||
; (rule
|
||||
; (targets error.messages)
|
||||
; (deps Parser.mly ParToken.mly error.messages.checked-in)
|
||||
; (action
|
||||
; (with-stdout-to %{targets}
|
||||
; (bash
|
||||
; "menhir \
|
||||
; --unused-tokens \
|
||||
; --list-errors \
|
||||
; --table \
|
||||
; --strict \
|
||||
; --external-tokens LexToken.mli \
|
||||
; --base Parser.mly \
|
||||
; ParToken.mly \
|
||||
; Parser.mly
|
||||
; "
|
||||
; )
|
||||
; ))
|
||||
; )
|
||||
|
||||
(rule
|
||||
(targets error.messages)
|
||||
(mode (promote (until-clean) (only *)))
|
||||
@ -155,8 +147,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
(rule
|
||||
(targets ParErr.ml)
|
||||
(mode (promote (until-clean) (only *)))
|
||||
|
@ -65,6 +65,19 @@
|
||||
(deps (:script_messages ../../../../vendors/ligo-utils/simple-utils/messages.sh) Parser.mly LexToken.mli ParToken.mly)
|
||||
(action (run %{script_messages} --lex-tokens=LexToken.mli --par-tokens=ParToken.mly Parser.mly )))
|
||||
|
||||
(rule
|
||||
(targets Parser_msg.ml)
|
||||
(deps Parser.mly ParToken.mly Parser.msg)
|
||||
(action
|
||||
(with-stdout-to %{targets}
|
||||
(bash
|
||||
"menhir \
|
||||
--compile-errors Parser.msg \
|
||||
--external-tokens LexToken \
|
||||
--base Parser \
|
||||
ParToken.mly \
|
||||
Parser.mly"))))
|
||||
|
||||
;; Build of all the LIGO source file that cover all error states
|
||||
|
||||
(rule
|
||||
@ -72,28 +85,6 @@
|
||||
(deps (:script_cover ../../../../vendors/ligo-utils/simple-utils/cover.sh) Parser.mly LexToken.mli ParToken.mly Parser.msg Unlexer.exe)
|
||||
(action (run %{script_cover} --lex-tokens=LexToken.mli --par-tokens=ParToken.mly --ext=religo --unlexer=./Unlexer.exe --messages=Parser.msg --dir=. --concatenate Parser.mly )))
|
||||
|
||||
;; Error messages
|
||||
;; Generate error messages from scratch
|
||||
; (rule
|
||||
; (targets error.messages)
|
||||
; (deps Parser.mly ParToken.mly error.messages.checked-in)
|
||||
; (action
|
||||
; (with-stdout-to %{targets}
|
||||
; (bash
|
||||
; "menhir \
|
||||
; --unused-tokens \
|
||||
; --list-errors \
|
||||
; --table \
|
||||
; --strict \
|
||||
; --external-tokens LexToken.mli \
|
||||
; --base Parser.mly \
|
||||
; ParToken.mly \
|
||||
; Parser.mly
|
||||
; "
|
||||
; )
|
||||
; ))
|
||||
; )
|
||||
|
||||
(rule
|
||||
(targets error.messages)
|
||||
(mode (promote (until-clean) (only *)))
|
||||
|
Loading…
Reference in New Issue
Block a user