Failure("lexing: empty token") when a parsing command does not end with a ';'
When a parsing command that does not end with a
; in a file that is loaded by acg, an uncaught exception is raised.
Note that if using redirection
<, nothing happens.
MWE: using the montague.acg file provided in the example directory and the following script file:
$ cat ~/tmp/test2 syntactic_realisation realize LOVE MARY JOHN : s
$ acg ~/tmp/test2 Welcome to the ACG toplevel Version 1.5.2-20201204 ©INRIA 2008-2021 Please send your comments or bug reports or feature requests to firstname.lastname@example.org Type help; to get help. Parsing script file "/home/pogodall/tmp/test2"... acg: internal error, uncaught exception: Failure("lexing: empty token") Raised by primitive operation at Stdlib__lexing.engine in file "lexing.ml", line 65, characters 15-37 Called from Scripting__Script_lexer.__ocaml_lex_string_rec in file "src/scripting/script_lexer.ml", line 2457, characters 8-65 Called from MenhirLib.Engine.Make.lexer_lexbuf_to_supplier in file "lib/pack/menhirLib.ml", line 1675, characters 18-30 Called from MenhirLib.Engine.Make.loop_handle in file "lib/pack/menhirLib.ml", line 1732, characters 21-27 Called from Scripting__Parse_functions.parse_file in file "src/scripting/parse_functions.ml", line 41, characters 22-274 Called from Stdlib__list.fold_left in file "list.ml", line 121, characters 24-34 Called from Acg.parse_files in file "src/scripting/acg.ml", line 97, characters 6-114 Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 25, characters 19-24 Called from Cmdliner.Term.run in file "cmdliner.ml", line 117, characters 32-39