Module: GhostWheel

Defined in:
lib/ghost_wheel.rb,
lib/ghost_wheel/errors.rb,
lib/ghost_wheel/parser.rb,
lib/ghost_wheel/scanner.rb,
lib/ghost_wheel/expression.rb,
lib/ghost_wheel/build_parser.rb,
lib/ghost_wheel/parse_results.rb,
lib/ghost_wheel/expression/rule.rb,
lib/ghost_wheel/expression/empty.rb,
lib/ghost_wheel/expression/query.rb,
lib/ghost_wheel/expression/literal.rb,
lib/ghost_wheel/expression/optional.rb,
lib/ghost_wheel/expression/sequence.rb,
lib/ghost_wheel/parser_builder/ruby.rb,
lib/ghost_wheel/expression/transform.rb,
lib/ghost_wheel/expression/look_ahead.rb,
lib/ghost_wheel/expression/repetition.rb,
lib/ghost_wheel/expression/alternation.rb,
lib/ghost_wheel/expression/end_of_file.rb,
lib/ghost_wheel/parser_builder/ghost_wheel.rb

Defined Under Namespace

Modules: ParserBuilder Classes: EmptyParseError, EmptyParseResult, EmptyRuleError, Expression, FailedParseError, FailedParseResult, ParseError, ParseResult, Parser, Scanner, StackUnderflowError

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.build_parser(grammar = nil, options = Hash.new, &parser_init) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/ghost_wheel/build_parser.rb', line 4

def self.build_parser(grammar = nil, options = Hash.new, &parser_init)
  if grammar
    ParserBuilder::GhostWheel.new(grammar, options).to_parser
  else
    ParserBuilder::Ruby.new(&parser_init).to_parser
  end
end