-
- Downloads
Remove handcrafted error messages (fix issues #150 and #172).
Short story: it was a source of bugs, there was only one handcrafted message over 650, and, to quote François Pottier, "you seem to have misunderstood what the various commands do". Long story: the proper steps to update the error messages after modifying the parser are 1. update the old states with --update-errors 2. generate the new states with --list-errors 3. compare the old and new states with --compare-errors 4. manually reconcile the differences between the old and new states 5. write error messages for the new states 6. add %on_error_reduce and go back to step 1, if step 5 is too hard 7. check that the error messages for the old states are still meaningful 8. check that the set of states is both correct (--compile-errors) and complete (--compare-errors) We were doing only step 1 and half of step 8. Doing the other half of step 8 would have prevented issue #172 from occurring. But that would have meant doing step 4 after each parser modification, which was never done. Note that step 2 is so expensive that it is impossible to perform step 8 during continuous integration. Given the work needed to update the error messages after a syntax change, I don't think we can reliably use them until WhyML no longer evolves.
Showing
- .gitignore 0 additions, 2 deletions.gitignore
- Makefile.in 1 addition, 31 deletionsMakefile.in
- bench/parsing-bench 0 additions, 53 deletionsbench/parsing-bench
- bench/parsing/bad/module_name.mlw 0 additions, 3 deletionsbench/parsing/bad/module_name.mlw
- bench/parsing/bad/module_name.oracle 0 additions, 6 deletionsbench/parsing/bad/module_name.oracle
- bench/parsing/good/keywords.mlw 0 additions, 6 deletionsbench/parsing/good/keywords.mlw
- src/parser/handcrafted.messages 0 additions, 10051 deletionssrc/parser/handcrafted.messages
- src/parser/lexer.mll 14 additions, 51 deletionssrc/parser/lexer.mll
- src/parser/parser.mly 1 addition, 1 deletionsrc/parser/parser.mly
- src/parser/report.ml 0 additions, 87 deletionssrc/parser/report.ml
- src/parser/report.mli 0 additions, 2 deletionssrc/parser/report.mli
- src/parser/typing.ml 4 additions, 0 deletionssrc/parser/typing.ml
- src/parser/typing.mli 2 additions, 0 deletionssrc/parser/typing.mli
Loading
Please register or sign in to comment