GithubHelp home page GithubHelp logo

php-peg's People

Watchers

 avatar

php-peg's Issues

Continuous integration

Story

As a developer, I want continuous integration on all branches so that I can be sure my code is working in all expected environments.

Acceptance Criteria

  • A continuous integration engine is available to work with Github.
  • Each time a branch is updated on GitHub, CI is run on that branch for each build environment.
  • The CI engine runs all unit and integrations tests ensuring that they all succeed.
  • The CI engine fails if CRAP scores or other important metrics are outside of acceptable limits.

Packrat parsing expression library

Overview

Expanding from #2, we need our parsing expressions to be automatically memoized. The basic rule of a PEG is that each expression can have at most a single expansion at any position within the input, which makes a Packrat parser ideal for this scenario.

Acceptance Criteria

  • Our parser implements memoization for each expression at each input location.
  • Memoization is done on an as-needed basis.
  • Both failures and successes are memoized.
  • Parser performance is reduced to linear time in the number of expressions and the length of input.

Parsing Expression builder

Overview

Build off of #2, we should define a builder for parsers. This build should be configurable while giving a place to encapsulate things such as memoization (see #3).

Acceptance Criteria

  • A builder exists for defining parsers.
  • The builder should be future proof. In particular, it should be possible to add memoization and other modification strategies without changing the builder itself.
  • It should not be necessary to explicitly instantiate any built-in expressions. Such instantiations should be exposed via methods on the builder.
  • It is not necessary that the provided implementation be responsible for instantiating custom expression types, but such a future proof design would be accepted.

Basic parsing expression library

Overview

We need a basic implementation of parsing expressions.

Acceptance Criteria

  • A fully functional parser may be built from simple parsing expression objects.
  • The parsing expression objects must implement a minimal interface with minimal dependencies and must perform no other actions other than parsing.
  • The parser must implement a minimal interface with minimal dependencies.
  • The design must be extensible. In particular, in the future we will want to add memoization
  • Memoization is not required.
  • Performance is not a concern.
  • No builder is required.

Parsing Expression Library

Story

As a user, I want a parsing expression library written so that I can define parsers easily without having to use a code generator.

Acceptance Criteria

  • A parsing expression library exists
  • Types exist for each kind of PEG expression, and each expression must take the form of an object
    • These types should be simple, fulfilling a minimal interface with minimal dependencies.
  • It must be simple to translate from a PEG grammar to a set of parsing objects.
    • In particular, the user must not have to worry about which parsing strategy is used or whether memoizing is used, etc.
  • The resulting parser should be not expose any mutable behaviour.
    • Rules cannot be added to a parser, but must be defined using a builder.
    • Individual expression objects must also not expose any mutable behaviour
    • Memoization is an implementation detail and should be added transparently by the builder without any extra code when defining the parser.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.