Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text.Parser: support for stateful grammars #4286

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Feb 26, 2018

  1. implement GrammarT, allowing Grammar to support state

    `Grammar` is now a type-level function producing a grammar with unit
    state.
    msmorgan committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    2eaf482 View commit details
    Browse the repository at this point in the history
  2. Don't discard state in return value of parseState.

    Also, prefer constructors to exported functions in `modify` and `gets`.
    msmorgan committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    9e2495c View commit details
    Browse the repository at this point in the history
  3. add Run constructor to GrammarT

    This allows a grammar with a different state type to be run
    in the current input stream context.
    
    Problematically, this causes the compiler to hang while processing `doParse`.
    msmorgan committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    2179132 View commit details
    Browse the repository at this point in the history
  4. remove state from Failure result

    This was never used.
    msmorgan committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    484b30c View commit details
    Browse the repository at this point in the history
  5. inline upgradeRes in doParse

    msmorgan committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    1a7a84d View commit details
    Browse the repository at this point in the history