123456789_123456789_123456789_123456789_123456789_

Class: Racc::DebugFlags

Relationships & Source Files
Inherits: Object
Defined in: lib/racc/debugflags.rb

Class Method Summary

Instance Attribute Summary

Constructor Details

.new(parse = false, rule = false, token = false, state = false, la = false, prec = false, conf = false) ⇒ DebugFlags

[ GitHub ]

  
# File 'lib/racc/debugflags.rb', line 33

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

Class Method Details

.parse_option_string(s)

[ GitHub ]

  
# File 'lib/racc/debugflags.rb', line 15

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

Instance Attribute Details

#any?Boolean (readonly)

[ GitHub ]

  
# File 'lib/racc/debugflags.rb', line 52

def any?
  @any
end

#la (readonly)

[ GitHub ]

  
# File 'lib/racc/debugflags.rb', line 49

attr_reader :la

#parse (readonly)

[ GitHub ]

  
# File 'lib/racc/debugflags.rb', line 45

attr_reader :parse

#prec (readonly)

[ GitHub ]

  
# File 'lib/racc/debugflags.rb', line 50

attr_reader :prec

#rule (readonly)

[ GitHub ]

  
# File 'lib/racc/debugflags.rb', line 46

attr_reader :rule

#state (readonly)

[ GitHub ]

  
# File 'lib/racc/debugflags.rb', line 48

attr_reader :state

#status_logging (readonly)

[ GitHub ]

  
# File 'lib/racc/debugflags.rb', line 56

attr_reader :status_logging

#token (readonly)

[ GitHub ]

  
# File 'lib/racc/debugflags.rb', line 47

attr_reader :token