Changes between Version 2 and Version 3 of Commentary/Compiler/Parser


Ignore:
Timestamp:
Apr 17, 2009 3:49:27 PM (6 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/Parser

    v2 v3  
    3131There are plenty more examples.  A good feature of this approach is that the error messages later in compilation tend to produce much more helpful error messages.  Errors generated by the parser itself tend to say "Parse error on line X" and not much more. 
    3232 
    33 The main point is this.  If you are changing the parser, feel free to make it accept more programs than it does at the moment, provided you also add a later test that rejects the bad programs.  Typically you need this flexibility if some new thing you want to add makes the pars ambiguous, and you need more context to disambiguate. 
     33The main point is this.  If you are changing the parser, feel free to make it accept more programs than it does at the moment, provided you also add a later test that rejects the bad programs.  Typically you need this flexibility if some new thing you want to add makes the pars ambiguous, and you need more context to disambiguate.  Delicate hacking of the LR grammar is to be discouraged.  It's very hard to maintain and debug.