ligo/vendors/Preprocessor
Christian Rinderknecht 46eecb4027 Marked the errors that should be skipped (because catched by the
LIGO lexer later). Added field [is_file] to the state of the
lexer to know if the input is a file or not (insert or not a
first line directive). Fixed ReasonLIGO comments in
entrypoints-contracts.md and website2.religo. WIP on the LIGO
lexer to properly handle comments for all the syntaxes.
2020-04-08 20:24:34 +02:00
..
.E_LexerMain.tag Integrated the library for preprocessing. 2020-03-31 19:44:10 +02:00
.E_Parser.mly.tag Integrated the library for preprocessing. 2020-03-31 19:44:10 +02:00
.E_ParserMain.tag Integrated the library for preprocessing. 2020-03-31 19:44:10 +02:00
.links Simple_utils is now used as a library by the local builds. 2020-04-07 18:33:46 +02:00
.PreprocMain.ml Integrated the library for preprocessing. 2020-03-31 19:44:10 +02:00
.PreprocMain.tag Integrated the library for preprocessing. 2020-03-31 19:44:10 +02:00
build.sh Integrated the library for preprocessing. 2020-03-31 19:44:10 +02:00
clean.sh Integrated the library for preprocessing. 2020-03-31 19:44:10 +02:00
dune Simple_utils is now used as a library by the local builds. 2020-04-07 18:33:46 +02:00
dune-project Simple_utils is now used as a library by the local builds. 2020-04-07 18:33:46 +02:00
E_AST.ml Integrated the library for preprocessing. 2020-03-31 19:44:10 +02:00
E_Lexer.mli Integrated the library for preprocessing. 2020-03-31 19:44:10 +02:00
E_Lexer.mll Added # line directive at the start to recover the file name. Continued integration. 2020-04-01 19:22:46 +02:00
E_LexerMain.ml Removed error "Invalid directive" as PascaLIGO has the operator #. 2020-04-03 19:06:35 +02:00
E_Parser.mly Integrated the library for preprocessing. 2020-03-31 19:44:10 +02:00
E_ParserMain.ml Removed error "Invalid directive" as PascaLIGO has the operator #. 2020-04-03 19:06:35 +02:00
EvalOpt.ml Removed error "Invalid directive" as PascaLIGO has the operator #. 2020-04-03 19:06:35 +02:00
EvalOpt.mli Removed error "Invalid directive" as PascaLIGO has the operator #. 2020-04-03 19:06:35 +02:00
LICENSE Simple_utils is now used as a library by the local builds. 2020-04-07 18:33:46 +02:00
Makefile.cfg Simple_utils is now used as a library by the local builds. 2020-04-07 18:33:46 +02:00
Preproc.mli Marked the errors that should be skipped (because catched by the 2020-04-08 20:24:34 +02:00
Preproc.mll Marked the errors that should be skipped (because catched by the 2020-04-08 20:24:34 +02:00
Preprocessor.install Simple_utils is now used as a library by the local builds. 2020-04-07 18:33:46 +02:00
Preprocessor.ml Simple_utils is now used as a library by the local builds. 2020-04-07 18:33:46 +02:00
Preprocessor.opam Simple_utils is now used as a library by the local builds. 2020-04-07 18:33:46 +02:00
PreprocMain.ml Removed error "Invalid directive" as PascaLIGO has the operator #. 2020-04-03 19:06:35 +02:00
README.md Simple_utils is now used as a library by the local builds. 2020-04-07 18:33:46 +02:00

A preprocessor a la C# in OCaml

The following preprocessing directives are supported

  • #define
  • #elif
  • #else
  • #endif
  • #endregion
  • #error
  • #if
  • #include
  • #region
  • #undef

Note: Because it is meant for LIGO, there is no error raised for invalid preprocessing directives, as the symbol # is valid in PascaLIGO (cons operator for lists). Also, the preprocessor may report an error on some weird but valid PascaLIGO contracts, like

const include : list (int) = list [1] const l : list (int) = 0

include