First page Back Continue Last page Summary Graphic
Example 3: Source positions
Source position annotations are irritating; they complicate lots of other things unnecessarily
But they are vital for good error messages
Idea:
- make them implicit, except for tree leaves
- include eg "bracketed expression" nodes which you might otherwise discard early, in order to keep track of the key ( and ) tokens
- use symbol table entries to deal with internal nodes