![Christian Rinderknecht](/assets/img/avatar_default.png)
like the absence of an input filename. (This simplifies all the clients codes.) Fixed the dune file for the preprocessor. Fixed the build of PreprocMain.exe and PreprocMain.byte. Restricted preprocessing errors [Preproc.Newline_in_string] and [Preproc.Open_string] to the argument of the #include directive (instead of general strings: this is for the LIGO lexer to report the error). I removed the error [Preproc.Open_comment] as this is for the LIGO lexer to report. The preprocessor scanner [Preproc.lex] does not take a parameter [is_file:bool] now: the source file (if any) is determined from the lexing buffer. Accordingly, the field [is_file] of the state of the preprocessing lexer has been removed: the lexing buffer becomes now the reference for the input source (bug fix and interface improvement). Fixed the comments of the test contract pledge.religo. I removed the data constructor [Lexer.Stdin], as redundant with [Lexer.Channel].
52 lines
1.0 KiB
Plaintext
52 lines
1.0 KiB
Plaintext
;; Building the preprocessor as a library
|
|
|
|
(library
|
|
(name Preprocessor)
|
|
(public_name Preprocessor)
|
|
(wrapped true)
|
|
(libraries
|
|
getopt
|
|
simple-utils)
|
|
(modules EvalOpt E_Parser E_Lexer E_AST Preproc)
|
|
(preprocess
|
|
(pps bisect_ppx --conditional)))
|
|
|
|
;; Building the lexers of the preprocessor
|
|
|
|
(ocamllex
|
|
E_Lexer Preproc)
|
|
|
|
;; Building the parser of the preprocessor (for boolean expressions)
|
|
|
|
(menhir
|
|
(modules E_Parser))
|
|
|
|
;; Building PreprocMain.exe for a standalone preprocessor
|
|
|
|
(executable
|
|
(name PreprocMain)
|
|
(modules PreprocMain)
|
|
(libraries Preprocessor)
|
|
(preprocess
|
|
(pps bisect_ppx --conditional)))
|
|
|
|
;; Building E_LexerMain.exe for a standalone lexer of boolean
|
|
;; expressions
|
|
|
|
(executable
|
|
(name E_LexerMain)
|
|
(modules E_LexerMain)
|
|
(libraries Preproc)
|
|
(preprocess
|
|
(pps bisect_ppx --conditional)))
|
|
|
|
;; Building E_ParserMain.exe for a standalone parser of boolean
|
|
;; expressions
|
|
|
|
(executable
|
|
(name E_ParserMain)
|
|
(modules E_ParserMain)
|
|
(libraries Preproc)
|
|
(preprocess
|
|
(pps bisect_ppx --conditional)))
|