Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: BNFC/bnfc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: BNFC/bnfc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 176-source-position
Choose a head ref
  • 3 commits
  • 7 files changed
  • 1 contributor

Commits on Nov 4, 2016

  1. [#176] Haskell: Store node position in the AST

    When using bnfc to generate haskell code with the --functor option, the
    parser will no store the begining position of the corresponding code in
    each node. This might be useful, for instance, to report errors.
    
    Note that this is possibly a larger change than it had to be because I
    tried something new: instead of generating code by putting together
    strings (or the slightly fancier PrettyPrint.Doc), I refactored the code
    that makes happy production to generate an AST which is then
    pretty-printed. Both the AST types and the pretty printer being of
    course generated by BNFC itself! This seems like an obvious thing to do
    but for some reason we never did.
    
    The main advantage is that it makes much better use of the type
    checker (whene everything is a string, it doesn't mean much that the
    type checking passes...).
    
    In addition, you get much cleaner code by getting rid of all the
    separators, keywords, symbols and parentheses that are now inserted by the
    pretty printer.
    gdetrez committed Nov 4, 2016
    Configuration menu
    Copy the full SHA
    90e28a4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    680fcb8 View commit details
    Browse the repository at this point in the history
  3. [#159] Add regression test

    Close #159
    gdetrez committed Nov 4, 2016
    Configuration menu
    Copy the full SHA
    164f0cc View commit details
    Browse the repository at this point in the history
Loading