Class Parslet::Expression
In: lib/parslet/expression.rb
Parent: Object

Allows specifying rules as strings using the exact same grammar that treetop does, minus the actions. This is on one hand a good example of a fully fledged parser and on the other hand might even turn out really useful.

This can be viewed as an extension to parslet and might even be hosted in its own gem one fine day.

Methods

new   parse   to_parslet   transform  

Included Modules

Parslet

Public Class methods

Creates a parslet from a foreign language expression.

Example:

  Parslet::Expression.new("'a' 'b'")

Public Instance methods

Parses the string and returns a parse tree.

Turns this expression into a parslet.

Transforms the parse tree into a parslet expression.

[Validate]