class Racc::DebugFlags

Attributes

la[R]
parse[R]
prec[R]
rule[R]
state[R]
status_logging[R]
token[R]

Public Class Methods

new(parse = false, rule = false, token = false, state = false, la = false, prec = false, conf = false) click to toggle source
# File racc-1.7.1/lib/racc/debugflags.rb, line 34
def initialize(parse = false, rule = false, token = false, state = false,
               la = false, prec = false, conf = false)
  @parse = parse
  @rule = rule
  @token = token
  @state = state
  @la = la
  @prec = prec
  @any = (parse || rule || token || state || la || prec)
  @status_logging = conf
end
parse_option_string(s) click to toggle source
# File racc-1.7.1/lib/racc/debugflags.rb, line 16
def DebugFlags.parse_option_string(s)
  parse = rule = token = state = la = prec = conf = false
  s.split(//).each do |ch|
    case ch
    when 'p' then parse = true
    when 'r' then rule = true
    when 't' then token = true
    when 's' then state = true
    when 'l' then la = true
    when 'c' then prec = true
    when 'o' then conf = true
    else
      raise "unknown debug flag char: #{ch.inspect}"
    end
  end
  new(parse, rule, token, state, la, prec, conf)
end

Public Instance Methods

any?() click to toggle source
# File racc-1.7.1/lib/racc/debugflags.rb, line 53
def any?
  @any
end