class Racc::Grammar::PrecedenceDefinitionEnv
def higher
def higher if @prechigh_seen raise CompileError, "prechigh used twice" end @prechigh_seen = true end
def initialize(g)
def initialize(g) @grammar = g @prechigh_seen = false @preclow_seen = false @reverse = false end
def left(*syms)
def left(*syms) @grammar.declare_precedence :Left, syms.map {|s| @grammar.intern(s) } end
def lower
def lower if @preclow_seen raise CompileError, "preclow used twice" end if @prechigh_seen @reverse = true end @preclow_seen = true end
def nonassoc(*syms)
def nonassoc(*syms) @grammar.declare_precedence :Nonassoc, syms.map {|s| @grammar.intern(s)} end
def right(*syms)
def right(*syms) @grammar.declare_precedence :Right, syms.map {|s| @grammar.intern(s) } end