Hello. I am currently writing a parser for some kind of simplified assembly language, and I am running into an obscure error spat out by menhir:
Uncaught exception:
Dune__exe__Parser.MenhirBasics.Error
Raised at file "src/parser.ml", line 965, characters 8-18
[...]
I am not used to reading this kind of errors, as it is not describing a shift/reduce conflict that I could fix in my parser.mly
file. Moreover the parser.ml
mentioned in the error is rather unreadable (it is generated by the library, thus not meant to be read or edited by humans). I have no clue what could have caused the problem. Here is my build configuration:
dune-project
:
(lang dune 2.4)
(using menhir 2.0)
dune
:
(ocamllex
(modules lexer))
(menhir
(modules parser))
(executables
(names assembler vm)
(libraries core))
NB: At the moment, vm.ml
is empty, and assembler.ml
only runs the parser, having as arguments the lexer (generated from a lexer.mll
file) and a lexbuf
variable generated from an input channel (In_channel.t
).
Any idea how to fix this kind of errors? Thanks in advance.