Module: Grammoire

Defined in:
lib/grammoire.rb,
lib/grammoire/rule.rb,
lib/grammoire/grammar.rb,
lib/grammoire/evaluation_context.rb

Defined Under Namespace

Classes: EvaluationContext, Grammar, Rule

Class Method Summary collapse

Class Method Details

.define(&block) ⇒ Object



10
11
12
13
14
# File 'lib/grammoire.rb', line 10

def self.define(&block)
  grammar = Grammar.new
  grammar.instance_eval &block
  grammar
end