class Racc::GrammarFileScanner
Constants
- CACHE
- LEFT_TO_RIGHT
- ReservedWord
Attributes
Public Class Methods
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
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