-
Notifications
You must be signed in to change notification settings - Fork 428
/
PLAN
27 lines (23 loc) · 1000 Bytes
/
PLAN
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Fix error recovery & error reporting
Step 1: remove existing implementation
OK * Put reason parser in its own file
OK * Remove menhir error management:
OK - remove "error" token
OK - remove error messages infrastructure
OK Now message defaults to "Syntax error"
* Fix reported error location (when recovering or not)
Step 2: reintroduce recovery
* Preprocess grammar:
- check exhaustivity of recovery
- produce a mapping of automaton states to automaton-items suitable for
recovery
* Instrument parser:
- first, always complete the AST and drop user input (":'(")
- second, introduce an heuristic for recovering based on location
Step 3: reintroduce error messages
* Ask the crowd:
What should messages look like?
Which situations are tricky or counter-intuitive?
* Make a testsuite representative of common syntax errors
* ... Design an analysis sufficient to produce the messages automatically
:P