2
# This file is automatically generated. DO NOT MODIFY!!
6
# Copyright (c) 1999-2003 Minero Aoki <aamine@loveruby.net>
8
# This program is free software.
9
# You can distribute/modify this program under the terms of
10
# the GNU LGPL, Lesser General Public License version 2.
11
# For details of the GNU LGPL, see the file "COPYING".
16
require 'racc/grammarfilescanner'
17
require 'racc/usercodeparser'
22
class GrammarFileParser < Parser
24
def initialize( racc )
25
@yydebug = racc.d_parse && Racc_debug_parser
26
@ruletable = racc.ruletable
27
@symboltable = racc.symboltable
33
attr_reader :class_name
34
attr_reader :super_class
37
@scanner = GrammarFileScanner.new(str)
38
@scanner.debug = @yydebug
48
def on_error( tok, val, _values )
49
if val.respond_to?(:id2name)
56
raise ParseError, "#{@scanner.lineno}: unexpected token '#{v}'"
59
STATE_TRANSITION_TABLE