class Racc::GrammarFileScanner
Constants
- CACHE
- LEFT_TO_RIGHT
- ReservedWord
Attributes
debug[RW]
epilogue[R]
Public Class Methods
new(str, filename = '-')
click to toggle source
# File lib/racc/grammarfileparser.rb, line 403 def initialize(str, filename = '-') @lines = str.b.split(/\n|\r\n|\r/) @filename = filename @lineno = -1 @line_head = true @in_rule_blk = false @in_conv_blk = false @in_block = nil @epilogue = '' @debug = false next_line end
Public Instance Methods
lineno()
click to toggle source
# File lib/racc/grammarfileparser.rb, line 418 def lineno @lineno + 1 end
yylex() { |sym, tok| ... }
click to toggle source
# File lib/racc/grammarfileparser.rb, line 424 def yylex(&block) unless @debug yylex0(&block) else yylex0 do |sym, tok| $stderr.printf "%7d %-10s %s\n", lineno(), sym.inspect, tok.inspect yield [sym, tok] end end end