Module: Rattler::Grammar

Included in:
BackEnd::Compiler
Defined in:
lib/rattler/grammar.rb,
lib/rattler/grammar/grammar.rb,
lib/rattler/grammar/analysis.rb,
lib/rattler/grammar/grammar_dsl.rb,
lib/rattler/grammar/metagrammar.rb,
lib/rattler/grammar/grammar_parser.rb

Overview

The Grammar module defines the grammar parser

Author:

  • Jason Arhart

Defined Under Namespace

Modules: GrammarDSL, Metagrammar Classes: Analysis, Grammar, GrammarParser

Class Method Summary collapse

Class Method Details

.parse!(source, options = {}) ⇒ Grammar

Parse source as a grammar and raise a Runtime::SyntaxError if the parse fails.

Returns:



29
30
31
# File 'lib/rattler/grammar.rb', line 29

def self.parse!(source, options={})
  GrammarParser.parse!(source, options={})
end

.parser(source, options = {}) ⇒ Grammar

Parse source as a grammar.

Returns:



38
39
40
# File 'lib/rattler/grammar.rb', line 38

def self.parser(source, options={})
  GrammarParser.new(source, options={})
end