Skip to content
Oeiuwq Faith Blog OpenSource Porfolio

jemc/rubinius-wqparser

Adapter for using https://github.com/whitequark/parser as Rubinius' parser.

jemc/rubinius-wqparser.json
{
"createdAt": "2014-02-15T15:57:03Z",
"defaultBranch": "master",
"description": "Adapter for using https://github.com/whitequark/parser as Rubinius' parser.",
"fullName": "jemc/rubinius-wqparser",
"homepage": "",
"language": "Ruby",
"name": "rubinius-wqparser",
"pushedAt": "2014-11-24T03:18:39Z",
"stargazersCount": 2,
"topics": [],
"updatedAt": "2014-11-24T03:18:39Z",
"url": "https://github.com/jemc/rubinius-wqparser"
}

Adapter for using https://github.com/whitequark/parser as Rubinius’ parser.

Conceptually, this adapter replaces rubinius-processor so that parser can replace rubinius-melbourne to generate the same rubinius-ast nodes from a given source file or string. The resulting AST tree can be compiled to rubinius bytecode by the rubinius-compiler to be executed by the Rubinius runtime.

Not all specs pass yet. See the failure tags for specs known to be failing in the spec/tags directory.

This adapter is tested against three sets of specs:

  1. spec - The same set of specs that rubinius-melbourne tests itself with.
  2. spec/wq/parser_spec.rb - A set of specs automatically generated from spec/wq/test_parser.rb, which “writes” specs based on test cases taken from the specs for parser (see spec/wq/test_parser.rb for details).
  3. spec/added - Any other specs created to prevent regression of various other behaviors encountered that are not covered by the above two sets of specs.

In each case, a source string is parsed and converted to a sexp representation, which is then compared to an expected sexp.

Specs that are known to be failing can be found in spec/tags, which mirrors the spec directory with files full of failure tags.

You can run all of the specs known to be passing with:

Terminal window
mspec spec -G fails

You can run all specs (including failing ones) with:

Terminal window
mspec spec

See mspec --help for more details about its usage.