class Racc::Grammar::PrecedenceDefinitionEnv
属性
reverse[R]
公共类方法
new(g) 点击切换源代码
# File racc-1.8.1/lib/racc/grammar.rb, line 368 def initialize(g) @grammar = g @prechigh_seen = false @preclow_seen = false @reverse = false end
公共实例方法
higher() 点击切换源代码
# File racc-1.8.1/lib/racc/grammar.rb, line 377 def higher if @prechigh_seen raise CompileError, "prechigh used twice" end @prechigh_seen = true end
left(*syms) 点击切换源代码
# File racc-1.8.1/lib/racc/grammar.rb, line 394 def left(*syms) @grammar.declare_precedence :Left, syms.map {|s| @grammar.intern(s) } end
lower() 点击切换源代码
# File racc-1.8.1/lib/racc/grammar.rb, line 384 def lower if @preclow_seen raise CompileError, "preclow used twice" end if @prechigh_seen @reverse = true end @preclow_seen = true end
nonassoc(*syms) 点击切换源代码
# File racc-1.8.1/lib/racc/grammar.rb, line 402 def nonassoc(*syms) @grammar.declare_precedence :Nonassoc, syms.map {|s| @grammar.intern(s)} end
right(*syms) 点击切换源代码
# File racc-1.8.1/lib/racc/grammar.rb, line 398 def right(*syms) @grammar.declare_precedence :Right, syms.map {|s| @grammar.intern(s) } end