Method: Racc::LogFileGenerator#output_token
- Defined in:
- lib/racc/logfilegenerator.rb
#output_token(out) ⇒ Object
Tokens
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/racc/logfilegenerator.rb', line 185 def output_token(out) out.print "------- Symbols -------\n\n" out.print "**Nonterminals, with rules where they appear\n\n" @grammar.each_nonterminal do |t| tmp = " %s (%d)\non right: %s\non left : %s\n" out.printf tmp, t.to_s, t.ident, symbol_locations(t.locate).join(' '), symbol_locations(t.heads).join(' ') end out.print "\n**Terminals, with rules where they appear\n\n" @grammar.each_terminal do |t| out.printf " %s (%d) %s\n", t.to_s, t.ident, symbol_locations(t.locate).join(' ') end end |