remove unsed symbol in parsers

This commit is contained in:
Pierre-Emmanuel Wulfman 2020-04-23 12:17:29 +02:00
parent c110670a38
commit f25456a7a6
3 changed files with 2 additions and 4 deletions

View File

@ -43,7 +43,6 @@ let concrete = function
| "PLUS" -> "+"
| "SLASH" -> "/"
| "TIMES" -> "*"
| "PERCENT" -> "%"
| "LPAR" -> "("
| "RPAR" -> ")"

View File

@ -395,7 +395,7 @@ and scan state = parse
| eof { mk_eof state lexbuf }
| "[@" (attr as a) "]" { mk_attr "[@" a state lexbuf }
| "[@@" (attr as a) "]" { mk_attr "[@@" a state lexbuf }
| "[%" (insert as i) "]" { mk_insert i state lexbuf }
| "[%" (insert as i) { mk_insert i state lexbuf }
(* Management of #include preprocessing directives

View File

@ -494,8 +494,7 @@ and translate_expression (expr:expression) (env:environment) : michelson result
]
)
| E_raw_michelson (code, type_anno) ->
let r = Str.regexp "^{|\\(.*\\)|}$\\|^\"\\(.*\\)\"" in
let code = Str.replace_first r "{\\1}" code in (*remplace the string quotes or varbatim symbol by michelson's code delimiters *)
let code = Format.asprintf "{%s}" code in
let%bind code = Proto_alpha_utils.Trace.trace_tzresult (raw_michelson_parsing_error code) @@
Tezos_micheline.Micheline_parser.no_parsing_error @@ Michelson_parser.V1.parse_expression ~check:false code in
let code = Tezos_micheline.Micheline.root code.expanded in