I'm trying to understand .messages file generated by menhir.
From this sample, we could use menhir parser.mly --list-errors > parser.messages to generate parser.messages. An error is like follows:
main: INT MINUS TIMES
##
## Ends in an error in state: 12.
##
## expr -> expr MINUS . expr [ TIMES RPAREN PLUS MINUS EOF DIV ]
##
## The known suffix of the stack is as follows:
## expr MINUS
##
<YOUR SYNTAX ERROR MESSAGE HERE>
Normally, --list-errors should compute all possible ways of causing an error. But I don't understand why ways like main: INT PLUS DIV and main: INT MINUS DIV are not included in parser.messages (however, expression like 5+/ still correctly raises an error). Does anyone know the reason?