ligo/src/parser/ligodity/LexerMain.ml
Christian Rinderknecht af8d1083b7 Eased the translation from Ligodity AST to Liquidity AST.
More precisely,

  * I commented out the operator "@" on lists in Ligodity (it can
    be implemented as a function, as a workaround).

  * I removed the parallel "let" construct (hence the "and" keyword).

  * I renamed the type "field_assignment" into "field_assign", in
    order to match Pascaligo AST.

  * The reading of the command-line options is now done by
    calling the function [EvalOpt.read], instead of an ugly
    side-effect when loading the binary of the module. Options
    are now found in a record of type [EvalOpt.options].

  * I added support in the Ligodity lexer for #include CPP
    directives.
2019-05-15 16:05:03 +02:00

17 lines
351 B
OCaml

(* Driver for the lexer of Mini-ML *)
(* Error printing and exception tracing *)
Printexc.record_backtrace true;;
(* Running the lexer on the source *)
let options = EvalOpt.read ();;
open EvalOpt;;
if Utils.String.Set.mem "lexer" options.verbose then
Lexer.trace options.input
else Lexer.iter (fun _lexbuf _out _token -> ()) options.input
;;