lib/semantic_model/defining_rules.rb
# define custom rules to be used in that semantic model
define custom rules to be used in that semantic model
define custom rules to be used in that semantic model
def define_rule(expr, multiline_expr = nil, &block)
    if multiline_expr.nil?
      rule = Parser::Rule.new(expr, {}, &block)
    else
      rule = Parser::MultilineRule.new(expr, multiline_expr, {}, &block)
    end
    @rules << rule
  end
def define_rule ( expr , multiline_expr = nil , & block ) if multiline_expr . nil? rule = Parser :: Rule . new ( expr , { } , & block ) else rule = Parser :: MultilineRule . new ( expr , multiline_expr , { } , & block ) end @rules << rule end
define custom rules to be used in that semantic model
define custom rules to be used in that semantic model
expr
<not_specific>
multiline_expr
<not_specific>
block
<not_specific>