class Temple::Mixins::GrammarDSL::Or
def <<(rule)
def <<(rule) @children << @grammar.Rule(rule) self end
def after_copy(source)
def after_copy(source) @children = @children.map {|child| child.copy_to(@grammar) } end
def initialize(grammar, *children)
def initialize(grammar, *children) super(grammar) @children = children.map {|rule| @grammar.Rule(rule) } end
def match(exp, unmatched)
def match(exp, unmatched) tmp = [] @children.any? {|rule| rule.match(exp, tmp) } || (unmatched.concat(tmp) && false) end