Class: Racc::DebugFlags
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/racc/debugflags.rb |
Class Method Summary
Instance Attribute Summary
- #any? ⇒ Boolean readonly
- #la readonly
- #parse readonly
- #prec readonly
- #rule readonly
- #state readonly
- #status_logging readonly
- #token readonly
Constructor Details
.new(parse = false, rule = false, token = false, state = false, la = false, prec = false, conf = false) ⇒ DebugFlags
# File '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
Class Method Details
.parse_option_string(s)
[ GitHub ]# File '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
Instance Attribute Details
#any? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/racc/debugflags.rb', line 53
def any? @any end
#la (readonly)
[ GitHub ]# File 'lib/racc/debugflags.rb', line 50
attr_reader :la
#parse (readonly)
[ GitHub ]# File 'lib/racc/debugflags.rb', line 46
attr_reader :parse
#prec (readonly)
[ GitHub ]# File 'lib/racc/debugflags.rb', line 51
attr_reader :prec
#rule (readonly)
[ GitHub ]# File 'lib/racc/debugflags.rb', line 47
attr_reader :rule
#state (readonly)
[ GitHub ]# File 'lib/racc/debugflags.rb', line 49
attr_reader :state
#status_logging (readonly)
[ GitHub ]# File 'lib/racc/debugflags.rb', line 57
attr_reader :status_logging
#token (readonly)
[ GitHub ]# File 'lib/racc/debugflags.rb', line 48
attr_reader :token