#
# DO NOT MODIFY!!!!
# This file is automatically generated by racc 1.4.2
# from racc grammer file "xmldtd.ry".
#

require 'racc/parser'

type.module_eval <<'..end xmldtd.ry modeval..ida8884ba114', 'xmldtd.ry', 216
#
# xmldtd.rb : generated by racc
#

require 'xmlscan'
require 'strscan'


..end xmldtd.ry modeval..ida8884ba114

class XMLDTDScanner < Racc::Parser

module_eval <<'..end xmldtd.ry modeval..id0da368fc49', 'xmldtd.ry', 225

  Keywords = {}
  KeywordsWithSpace = {}

  [ 'ELEMENT', 'ATTLIST',
    'INCLUDE', 'IGNORE', '#PCDATA', 'ENTITY', 'NOTATION',
  ].each { |i| Keywords[i] = i.tr('#', 'H').intern }

  [ 'EMPTY', 'ANY', 'CDATA', 'ID', 'IDREF', 'IDREFS', 'ENTITIES',
    'NMTOKEN', 'NMTOKENS', '#REQUIRED', '#IMPLIED', '#FIXED',
    'SYSTEM', 'PUBLIC', 'NDATA',
    'INCLUDE', 'IGNORE', '#PCDATA', 'ENTITY', 'NOTATION'
  ].each { |i| KeywordsWithSpace[i] = ('_' + i.tr('#', 'H')).intern }



  class DTDTokenizer

    # \s*<?...?> => PI
    # \s+--.*?-- => Comment following space
    # --.*?--    => Comment
    # \s*<![     => '<!['
    # \s*[       => '['
    # \s*]]>     => ']]>'
    # \s*<!      => '<!'
    # \s+\w+     => Name following space
    # \w+        => Name
    # \s*>       => '>'
    # \s+(       => ' ('
    # (          => '('
    # \s*|       => '|'
    # \s*,       => ','
    # \s*)       => ')'
    # \s+\*      => ' *'
    # \*         => '*'
    # \s+\?      => ' ?'
    # \?         => '?'
    # \s+\+      => ' +'
    # \+         => '+'
    # \s+".*?"   => String following space
    # ".*?"      => String
    # \s+'.*?'   => String following space
    # '.*?'      => String
    # \s*%\w+;   => PEReference
    # \s+%       => ' %'

    PortWrapper = XMLScanner::XMLSource::PortWrapper

    def initialize(src)
      @src = PortWrapper.new(src)
      @ignore = false
      @buf = []
      nextline
    end

    def lineno
      @src.lineno
    end

    def path
      @src.path
    end


    attr_reader :ignore

    def ignore=(f)
      @ignore = (f != nil and f != false)
    end


    def pushback(str)
      @buf.push @scan if @scan
      str = ' ' + str
      @scan = StringScanner.new(str << ' ')
      self
    end


    private

    def nextline
      @scan = (@buf.shift or ((s = @src.gets) and StringScanner.new(s)))
    end


    def scan_until(re, t)
      ret = @scan.scan_until(re)
      unless ret then
        ret = @scan.rest
        while true
          raise ParseError, "unterminated #{t} meets EOF" unless nextline
          s = @scan.scan_until(re)
          break if s
          ret << @scan.rest
        end
        ret << s
      end
      ret
    end


    def skip_until(re)
      ret = @scan.skip_until(re)
      unless ret then
        ret = @scan.restsize
        while true
          return nil unless nextline
          n = @scan.skip_until(re)
          break if n
          ret += @scan.restsize
        end
        ret += n
      end
      ret
    end


    def skip_space
      begin
        n = @scan.skip(/\s+/)
        break unless n
      end while @scan.empty? and nextline
      n
    end


    def scan_pi
      unless @scan.scan(/([^\s\?\>]+)(?:\s+|(?=\?>))/) then
        raise ParseError, "parse error at `<?'"
      end
      name = @scan[1]
      s = scan_until(/\?>/, 'PI')
      s.chop!.chop!
      if name == 'xml' then
        [ :TextDecl, s ]
      else
        [ :PI, [ name, s ] ]
      end
    end


    def on_name(s, space)
      if space then
        [ (KeywordsWithSpace[s] or :_Name), s ]
      else
        [ (Keywords[s] or :Name), s ]
      end
    end

    def on_pe_ref(s)
      [ :PEReference, s ]
    end

    def on_delimiter(c)
      skip_space
      [ c, c ]
    end


    public

    Delim = '\\s!"%&\'\\(\\)\\*\\+,\\/<=>\\?\\[\\]\\|'

    def next_token
      nextline while @scan and @scan.empty?
      space = skip_space if @scan
      if not @scan then
        [ false, :eof ]
      elsif @ignore then
        if @scan.skip_until(/<!\[|\]\]>/) then
          s = @scan[0]
          [ s, s ]
        else
          [ false, :eof ]
        end
      elsif s = @scan.scan(/[^-#{Delim}][^#{Delim}]*/o) then
        on_name s, space
      elsif s = @scan.scan(/<\?|<!\[?|\]\]>|--|[\[>()|,*?+%'"]/) then
        if s == '--' then
          s = scan_until(/--/, 'comment')
          s.chop!.chop!
          if space then
            [ :_Comment, s ]
          else
            [ :Comment, s ]
          end
        elsif s == '<?' then
          scan_pi
        elsif s == '"' or s == "'" then
          s = scan_until(/#{s}/, 'string')
          s.chop!
          if space then
            [ :_String, s ]
          else
            [ :String, s ]
          end
        elsif s == '%' then
          if @scan.skip(/([^-#{Delim}][^#{Delim}]*);/o) then
            on_pe_ref @scan[1]
          elsif space then
            [ ' %', s ]
          else
            [ s, s ]
          end
        elsif (s == '(' or s == '?' or s == '*' or s == '+') and space then
          [ ' ' + s, s ]
        else
          [ s, s ]
        end
      else
        on_delimiter @scan.getch
      end
    end

  end





  def initialize(src = nil)
    #@yydebug = true
    feed src
  end

  def feed(src)
    @src = (src and DTDTokenizer.new(src))
  end

  def parse(src = nil)
    feed src if src
    do_parse if @src
    self
  end

  def lineno
    if @src then
      @src.lineno
    else
      0
    end
  end

  def path
    if @src then
      @src.path
    else
      '-'
    end
  end

  #def do_parse
  #  while true
  #    t,v = next_token
  #    break unless t
  #  end
  #end


  def next_token
    t, v = @src.next_token
    #p [ t, v ]
    [ t, v ]
  end
  private :next_token


  private

  def on_general_entity(name, definition)
  end

  def on_parameter_entity(name, definition)
  end


..end xmldtd.ry modeval..id0da368fc49

##### racc 1.4.2 generates ###

racc_reduce_table = [
 0, 0, :racc_error,
 0, 49, :_reduce_none,
 2, 49, :_reduce_none,
 2, 49, :_reduce_none,
 2, 49, :_reduce_4,
 1, 49, :_reduce_none,
 0, 50, :_reduce_none,
 2, 50, :_reduce_7,
 2, 50, :_reduce_8,
 2, 50, :_reduce_none,
 3, 51, :_reduce_none,
 2, 51, :_reduce_none,
 4, 53, :_reduce_none,
 0, 57, :_reduce_13,
 5, 53, :_reduce_14,
 1, 54, :_reduce_none,
 1, 54, :_reduce_none,
 1, 55, :_reduce_none,
 1, 55, :_reduce_none,
 0, 56, :_reduce_none,
 3, 56, :_reduce_none,
 1, 52, :_reduce_none,
 1, 52, :_reduce_none,
 1, 52, :_reduce_none,
 1, 52, :_reduce_none,
 1, 52, :_reduce_25,
 3, 58, :_reduce_none,
 1, 63, :_reduce_none,
 1, 63, :_reduce_none,
 4, 63, :_reduce_none,
 0, 65, :_reduce_none,
 1, 65, :_reduce_none,
 1, 65, :_reduce_none,
 1, 65, :_reduce_none,
 1, 64, :_reduce_none,
 1, 64, :_reduce_none,
 2, 68, :_reduce_none,
 4, 68, :_reduce_none,
 1, 66, :_reduce_none,
 3, 66, :_reduce_none,
 3, 67, :_reduce_none,
 3, 67, :_reduce_none,
 3, 59, :_reduce_none,
 0, 70, :_reduce_none,
 4, 70, :_reduce_none,
 1, 71, :_reduce_none,
 1, 71, :_reduce_none,
 1, 71, :_reduce_none,
 1, 71, :_reduce_none,
 1, 71, :_reduce_none,
 1, 71, :_reduce_none,
 1, 71, :_reduce_none,
 1, 71, :_reduce_none,
 4, 71, :_reduce_none,
 3, 71, :_reduce_none,
 1, 73, :_reduce_none,
 3, 73, :_reduce_none,
 1, 72, :_reduce_none,
 1, 72, :_reduce_none,
 2, 72, :_reduce_none,
 1, 72, :_reduce_none,
 2, 60, :_reduce_none,
 2, 74, :_reduce_62,
 3, 74, :_reduce_63,
 1, 75, :_reduce_none,
 2, 75, :_reduce_none,
 0, 78, :_reduce_none,
 2, 78, :_reduce_none,
 1, 76, :_reduce_none,
 1, 76, :_reduce_none,
 2, 77, :_reduce_70,
 3, 77, :_reduce_71,
 3, 61, :_reduce_none,
 1, 79, :_reduce_none,
 2, 79, :_reduce_74,
 1, 62, :_reduce_none,
 1, 62, :_reduce_none,
 1, 69, :_reduce_none,
 1, 69, :_reduce_none,
 1, 69, :_reduce_none,
 1, 81, :_reduce_none,
 1, 81, :_reduce_none,
 1, 81, :_reduce_none,
 1, 81, :_reduce_none,
 1, 81, :_reduce_none,
 1, 81, :_reduce_none,
 1, 80, :_reduce_none,
 1, 80, :_reduce_none,
 1, 80, :_reduce_none,
 1, 80, :_reduce_none,
 1, 80, :_reduce_none,
 1, 80, :_reduce_none,
 1, 80, :_reduce_none,
 1, 80, :_reduce_none,
 1, 80, :_reduce_none,
 1, 80, :_reduce_none,
 1, 80, :_reduce_none,
 1, 80, :_reduce_none,
 1, 80, :_reduce_none,
 1, 80, :_reduce_none,
 1, 80, :_reduce_none,
 1, 80, :_reduce_none ]

racc_reduce_n = 102

racc_shift_n = 148

racc_action_table = [
    93,    34,    81,    37,   144,    88,    41,    43,   146,   101,
   143,   120,   122,   119,   143,   118,    87,    40,    42,    44,
    46,    48,    50,    33,    35,    36,    21,    96,    22,     3,
    90,     6,    47,    49,    32,    80,    38,    85,    93,    34,
    81,    37,   123,    88,    41,    43,     3,    21,     6,    22,
     3,    82,     6,   103,    87,    40,    42,    44,    46,    48,
    50,    33,    35,    36,    21,   115,    22,     3,    90,     6,
    47,    49,    32,    80,    38,    85,    93,    34,    81,    37,
    71,    88,    41,    43,    63,    69,    98,    63,    61,    82,
    63,    69,    87,    40,    42,    44,    46,    48,    50,    33,
    35,    36,    21,   125,    22,     3,    90,     6,    47,    49,
    32,    80,    38,    85,    93,    34,    81,    37,   117,    88,
    41,    43,     1,     2,    -6,     3,   127,     6,    76,   103,
    87,    40,    42,    44,    46,    48,    50,    33,    35,    36,
   128,   129,   130,   131,    90,    59,    47,    49,    32,    80,
    38,    85,    93,    34,    81,    37,   136,    88,    41,    43,
    29,    24,    26,    27,    58,    82,    57,   102,    87,    40,
    42,    44,    46,    48,    50,    33,    35,    36,   120,   122,
   119,   140,    90,    56,    47,    49,    32,    80,    38,    85,
    93,    34,    81,    37,   142,    88,    41,    43,    65,    66,
    67,    77,    94,    82,    20,   101,    87,    40,    42,    44,
    46,    48,    50,    33,    35,    36,   120,   122,   119,   nil,
    90,   nil,    47,    49,    32,    80,    38,    85,    93,    34,
    81,    37,   nil,    88,    41,    43,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,    87,    40,    42,    44,    46,    48,
    50,    33,    35,    36,   nil,   nil,   nil,   nil,    90,   nil,
    47,    49,    32,    80,    38,    85,    93,    34,    81,    37,
   nil,    88,    41,    43,   nil,   nil,   nil,   nil,   nil,    82,
   nil,   nil,    87,    40,    42,    44,    46,    48,    50,    33,
    35,    36,   nil,   nil,   nil,   nil,    90,   nil,    47,    49,
    32,    80,    38,    85,    34,   nil,    37,   nil,   nil,    41,
    43,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    40,    42,    44,    46,    48,    50,    33,    35,    36,   nil,
   nil,   nil,   nil,   nil,   nil,    47,    49,    32,    34,    38,
    37,   nil,   nil,    41,    43,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,    40,    42,    44,    46,    48,    50,
    33,    35,    36,   nil,   nil,   nil,   nil,   nil,   nil,    47,
    49,    32,    34,    38,    37,   nil,   nil,    41,    43,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    40,    42,
    44,    46,    48,    50,    33,    35,    36,   nil,   nil,   nil,
   nil,   nil,    54,    47,    49,    32,    34,    38,    37,   nil,
   nil,    41,    43,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,    40,    42,    44,    46,    48,    50,    33,    35,
    36,   nil,   nil,   nil,   nil,   nil,   nil,    47,    49,    32,
    34,    38,    37,   nil,   nil,    41,    43,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,    40,    42,    44,    46,
    48,    50,    33,    35,    36,   nil,   nil,   nil,   nil,   nil,
   nil,    47,    49,    32,    34,    38,    37,   nil,   nil,    41,
    43,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    40,    42,    44,    46,    48,    50,    33,    35,    36,   nil,
   nil,   nil,   nil,   nil,   nil,    47,    49,    32,    34,    38,
    37,    11,    14,    41,    43,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,    13,    40,    42,    44,    46,    48,    50,
    33,    35,    36,   nil,   nil,   110,   nil,    18,   nil,    47,
    49,    32,    10,    38,   107,   109,   111,   112,   113,   114,
   104,   105,   106 ]

racc_action_check = [
   143,   143,   143,   143,   134,   143,   143,   143,   141,   101,
   134,   123,   123,   123,   141,    84,   143,   143,   143,   143,
   143,   143,   143,   143,   143,   143,    31,    70,    31,    31,
   143,    31,   143,   143,   143,   143,   143,   143,    67,    67,
    67,    67,    92,    67,    67,    67,    59,     8,    59,     8,
     8,    67,     8,    94,    67,    67,    67,    67,    67,    67,
    67,    67,    67,    67,     9,    79,     9,     9,    67,     9,
    67,    67,    67,    67,    67,    67,    82,    82,    82,    82,
    53,    82,    82,    82,    53,    53,    73,    45,    45,    82,
    73,    73,    82,    82,    82,    82,    82,    82,    82,    82,
    82,    82,     5,   100,     5,     5,    82,     5,    82,    82,
    82,    82,    82,    82,   110,   110,   110,   110,    83,   110,
   110,   110,     0,     0,     0,     0,   106,     0,    61,    76,
   110,   110,   110,   110,   110,   110,   110,   110,   110,   110,
   108,   108,   108,   108,   110,    30,   110,   110,   110,   110,
   110,   110,   115,   115,   115,   115,   116,   115,   115,   115,
     6,     6,     6,     6,    25,   115,    20,    75,   115,   115,
   115,   115,   115,   115,   115,   115,   115,   115,   136,   136,
   136,   126,   115,    19,   115,   115,   115,   115,   115,   115,
   117,   117,   117,   117,   130,   117,   117,   117,    52,    52,
    52,    63,    69,   117,     4,    74,   117,   117,   117,   117,
   117,   117,   117,   117,   117,   117,    86,    86,    86,   nil,
   117,   nil,   117,   117,   117,   117,   117,   117,   127,   127,
   127,   127,   nil,   127,   127,   127,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   127,   127,   127,   127,   127,   127,
   127,   127,   127,   127,   nil,   nil,   nil,   nil,   127,   nil,
   127,   127,   127,   127,   127,   127,   118,   118,   118,   118,
   nil,   118,   118,   118,   nil,   nil,   nil,   nil,   nil,   118,
   nil,   nil,   118,   118,   118,   118,   118,   118,   118,   118,
   118,   118,   nil,   nil,   nil,   nil,   118,   nil,   118,   118,
   118,   118,   118,   118,    13,   nil,    13,   nil,   nil,    13,
    13,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    13,    13,    13,    13,    13,    13,    13,    13,    13,   nil,
   nil,   nil,   nil,   nil,   nil,    13,    13,    13,    14,    13,
    14,   nil,   nil,    14,    14,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,    14,    14,    14,    14,    14,    14,
    14,    14,    14,   nil,   nil,   nil,   nil,   nil,   nil,    14,
    14,    14,    18,    14,    18,   nil,   nil,    18,    18,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    18,    18,
    18,    18,    18,    18,    18,    18,    18,   nil,   nil,   nil,
   nil,   nil,    18,    18,    18,    18,    10,    18,    10,   nil,
   nil,    10,    10,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,    10,    10,    10,    10,    10,    10,    10,    10,
    10,   nil,   nil,   nil,   nil,   nil,   nil,    10,    10,    10,
    64,    10,    64,   nil,   nil,    64,    64,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,    64,    64,    64,    64,
    64,    64,    64,    64,    64,   nil,   nil,   nil,   nil,   nil,
   nil,    64,    64,    64,    54,    64,    54,   nil,   nil,    54,
    54,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    54,    54,    54,    54,    54,    54,    54,    54,    54,   nil,
   nil,   nil,   nil,   nil,   nil,    54,    54,    54,    96,    54,
    96,     3,     3,    96,    96,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,     3,    96,    96,    96,    96,    96,    96,
    96,    96,    96,   nil,   nil,    78,   nil,     3,   nil,    96,
    96,    96,     3,    96,    78,    78,    78,    78,    78,    78,
    78,    78,    78 ]

racc_action_pointer = [
   120,   nil,   nil,   497,   204,   100,   150,   nil,    45,    62,
   395,   nil,   nil,   293,   327,   nil,   nil,   nil,   361,   177,
   166,   nil,   nil,   nil,   nil,   156,   nil,   nil,   nil,   nil,
   137,    24,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,    44,   nil,   nil,   nil,   nil,
   nil,   nil,   182,    41,   463,   nil,   nil,   nil,   nil,    41,
   nil,    89,   nil,   162,   429,   nil,   nil,    28,   nil,   163,
   -15,   nil,   nil,    47,   198,   158,    90,   nil,   517,    41,
   nil,   nil,    66,    93,   -10,   nil,   196,   nil,   nil,   nil,
   nil,   nil,    23,   nil,    14,   nil,   497,   nil,   nil,   nil,
    94,     2,   nil,   nil,   nil,   nil,   108,   nil,   104,   nil,
   104,   nil,   nil,   nil,   nil,   142,   137,   180,   256,   nil,
   nil,   nil,   nil,    -9,   nil,   nil,   172,   218,   nil,   nil,
   155,   nil,   nil,   nil,   -15,   nil,   158,   nil,   nil,   nil,
   nil,   -11,   nil,   -10,   nil,   nil,   nil,   nil ]

racc_action_default = [
    -1,    -6,    -6,  -102,  -102,    -5,  -102,    -6,    -2,    -4,
  -102,   -25,   -21,  -102,  -102,   -22,   -23,   -24,  -102,  -102,
  -102,    -7,    -8,    -9,   -16,  -102,   -17,   -18,   -11,   -15,
  -102,    -3,  -100,   -96,   -86,   -97,   -98,   -87,   -75,   -76,
   -90,   -88,   -91,   -89,   -92,  -102,   -93,  -101,   -94,   -99,
   -95,   -43,  -102,  -102,  -102,   -61,   -10,   148,   -13,  -102,
   -73,  -102,   -72,  -102,   -42,   -27,   -28,  -102,   -26,  -102,
   -66,   -64,   -62,  -102,   -19,  -102,   -74,   -70,  -102,   -34,
   -85,   -81,  -102,   -35,   -38,   -77,   -30,   -83,   -82,   -79,
   -84,   -78,  -102,   -80,  -102,   -65,  -102,   -69,   -68,   -63,
  -102,   -19,   -12,   -71,   -51,   -52,  -102,   -45,  -102,   -46,
  -102,   -47,   -48,   -49,   -50,  -102,  -102,  -102,  -102,   -33,
   -31,   -36,   -32,   -30,   -67,   -14,  -102,  -102,   -57,   -58,
  -102,   -60,   -44,   -55,  -102,   -39,   -30,   -41,   -40,   -29,
   -20,  -102,   -59,  -102,   -54,   -37,   -53,   -56 ]

racc_goto_table = [
    45,     7,   121,    51,    52,   133,    60,   134,    53,   100,
    92,     5,     8,     9,    70,    68,    16,   135,    31,   137,
   138,    17,   133,    12,   141,   116,    15,    74,    25,    30,
    28,    64,   108,   132,    97,    19,   126,    55,   147,   139,
    72,    99,     4,    95,    73,    62,   nil,   nil,   nil,   nil,
   nil,   nil,   145,   nil,    78,   nil,   nil,   nil,   nil,   nil,
    75,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   124 ]

racc_goto_check = [
    14,     3,    17,    14,    14,    21,    29,    25,    14,     8,
    16,     2,     2,     2,    29,    15,    12,    20,     2,    20,
    20,    13,    21,    10,    25,    16,    11,     9,     7,     6,
     5,    22,    23,    24,    29,     4,     8,    26,    21,    17,
    27,    28,     1,    30,    14,    31,   nil,   nil,   nil,   nil,
   nil,   nil,    17,   nil,    14,   nil,   nil,   nil,   nil,   nil,
     3,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,    14 ]

racc_goto_pointer = [
   nil,    42,    11,     1,    32,    24,    23,    22,   -65,   -31,
    20,    23,    13,    18,   -10,   -37,   -57,   -84,   nil,   nil,
   -98,  -105,   -20,   -46,   -75,  -103,    19,   -13,   -32,   -39,
   -27,     0,   nil,   nil ]

racc_goto_default = [
   nil,   nil,   nil,    23,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,    91,   nil,   nil,   nil,    79,    83,
    84,    86,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,    39,    89 ]

racc_token_table = {
 false => 0,
 Object.new => 1,
 :PI => 2,
 :TextDecl => 3,
 :PEReference => 4,
 "<!" => 5,
 ">" => 6,
 "<![" => 7,
 "[" => 8,
 "]]>" => 9,
 :INCLUDE => 10,
 :_INCLUDE => 11,
 :IGNORE => 12,
 :_IGNORE => 13,
 :Comment => 14,
 :ELEMENT => 15,
 :_EMPTY => 16,
 :_ANY => 17,
 " (" => 18,
 ")" => 19,
 "?" => 20,
 "*" => 21,
 "+" => 22,
 "(" => 23,
 "," => 24,
 "|" => 25,
 :ATTLIST => 26,
 :_CDATA => 27,
 :_ID => 28,
 :_IDREF => 29,
 :_IDREFS => 30,
 :_ENTITY => 31,
 :_ENTITIES => 32,
 :_NMTOKEN => 33,
 :_NMTOKENS => 34,
 :_NOTATION => 35,
 :_HREQUIRED => 36,
 :_HIMPLIED => 37,
 :_FIXED => 38,
 :_String => 39,
 :ENTITY => 40,
 " %" => 41,
 :_NDATA => 42,
 :_SYSTEM => 43,
 :_PUBLIC => 44,
 :NOTATION => 45,
 :_Name => 46,
 :Name => 47 }

racc_use_result_var = false

racc_nt_base = 48

Racc_arg = [
 racc_action_table,
 racc_action_check,
 racc_action_default,
 racc_action_pointer,
 racc_goto_table,
 racc_goto_check,
 racc_goto_default,
 racc_goto_pointer,
 racc_nt_base,
 racc_reduce_table,
 racc_token_table,
 racc_shift_n,
 racc_reduce_n,
 racc_use_result_var ]

Racc_token_to_s_table = [
'$end',
'error',
'PI',
'TextDecl',
'PEReference',
'"<!"',
'">"',
'"<!["',
'"["',
'"]]>"',
'INCLUDE',
'_INCLUDE',
'IGNORE',
'_IGNORE',
'Comment',
'ELEMENT',
'_EMPTY',
'_ANY',
'" ("',
'")"',
'"?"',
'"*"',
'"+"',
'"("',
'","',
'"|"',
'ATTLIST',
'_CDATA',
'_ID',
'_IDREF',
'_IDREFS',
'_ENTITY',
'_ENTITIES',
'_NMTOKEN',
'_NMTOKENS',
'_NOTATION',
'_HREQUIRED',
'_HIMPLIED',
'_FIXED',
'_String',
'ENTITY',
'" %"',
'_NDATA',
'_SYSTEM',
'_PUBLIC',
'NOTATION',
'_Name',
'Name',
'$start',
'extSubset',
'extSubsetDecls',
'extSubsetDecl',
'markupDecl',
'conditionalSect',
'include',
'ignore',
'ignoreSectContents',
'@1',
'elementDecl',
'attlistDecl',
'entityDecl',
'notationDecl',
'_name',
'contentspec',
'childrenContent',
'repmark',
'seq',
'choice',
'cp',
'name',
'attDef',
'attType',
'defaultDecl',
'namelist',
'entity',
'entityDef',
'peDef',
'externalID',
'ndataDecl',
'notationID',
'_keywords',
'keywords']

Racc_debug_parser = true

##### racc system variables end #####

 # reduce 0 omitted

 # reduce 1 omitted

 # reduce 2 omitted

 # reduce 3 omitted

module_eval <<'.,.,', 'xmldtd.ry', 84
  def _reduce_4( val, _values)
 p val[0]
  end
.,.,

 # reduce 5 omitted

 # reduce 6 omitted

module_eval <<'.,.,', 'xmldtd.ry', 89
  def _reduce_7( val, _values)
 p [ :PI, val[1] ]
  end
.,.,

module_eval <<'.,.,', 'xmldtd.ry', 91
  def _reduce_8( val, _values)
 p [ :PI, val[1] ]
  end
.,.,

 # reduce 9 omitted

 # reduce 10 omitted

 # reduce 11 omitted

 # reduce 12 omitted

module_eval <<'.,.,', 'xmldtd.ry', 100
  def _reduce_13( val, _values)
 @src.ignore = true
  end
.,.,

module_eval <<'.,.,', 'xmldtd.ry', 102
  def _reduce_14( val, _values)
 @src.ignore = false
  end
.,.,

 # reduce 15 omitted

 # reduce 16 omitted

 # reduce 17 omitted

 # reduce 18 omitted

 # reduce 19 omitted

 # reduce 20 omitted

 # reduce 21 omitted

 # reduce 22 omitted

 # reduce 23 omitted

 # reduce 24 omitted

module_eval <<'.,.,', 'xmldtd.ry', 116
  def _reduce_25( val, _values)
 p [ :Comment, val[0] ]
  end
.,.,

 # reduce 26 omitted

 # reduce 27 omitted

 # reduce 28 omitted

 # reduce 29 omitted

 # reduce 30 omitted

 # reduce 31 omitted

 # reduce 32 omitted

 # reduce 33 omitted

 # reduce 34 omitted

 # reduce 35 omitted

 # reduce 36 omitted

 # reduce 37 omitted

 # reduce 38 omitted

 # reduce 39 omitted

 # reduce 40 omitted

 # reduce 41 omitted

 # reduce 42 omitted

 # reduce 43 omitted

 # reduce 44 omitted

 # reduce 45 omitted

 # reduce 46 omitted

 # reduce 47 omitted

 # reduce 48 omitted

 # reduce 49 omitted

 # reduce 50 omitted

 # reduce 51 omitted

 # reduce 52 omitted

 # reduce 53 omitted

 # reduce 54 omitted

 # reduce 55 omitted

 # reduce 56 omitted

 # reduce 57 omitted

 # reduce 58 omitted

 # reduce 59 omitted

 # reduce 60 omitted

 # reduce 61 omitted

module_eval <<'.,.,', 'xmldtd.ry', 171
  def _reduce_62( val, _values)
 on_general_entity(val[0], val[1])
  end
.,.,

module_eval <<'.,.,', 'xmldtd.ry', 173
  def _reduce_63( val, _values)
 on_parameter_entity(val[1], val[2])
  end
.,.,

 # reduce 64 omitted

 # reduce 65 omitted

 # reduce 66 omitted

 # reduce 67 omitted

 # reduce 68 omitted

 # reduce 69 omitted

module_eval <<'.,.,', 'xmldtd.ry', 186
  def _reduce_70( val, _values)
 [ nil, val[1] ]
  end
.,.,

module_eval <<'.,.,', 'xmldtd.ry', 188
  def _reduce_71( val, _values)
 [ val[1], val[2] ]
  end
.,.,

 # reduce 72 omitted

 # reduce 73 omitted

module_eval <<'.,.,', 'xmldtd.ry', 195
  def _reduce_74( val, _values)
 [ val[1], nil ]
  end
.,.,

 # reduce 75 omitted

 # reduce 76 omitted

 # reduce 77 omitted

 # reduce 78 omitted

 # reduce 79 omitted

 # reduce 80 omitted

 # reduce 81 omitted

 # reduce 82 omitted

 # reduce 83 omitted

 # reduce 84 omitted

 # reduce 85 omitted

 # reduce 86 omitted

 # reduce 87 omitted

 # reduce 88 omitted

 # reduce 89 omitted

 # reduce 90 omitted

 # reduce 91 omitted

 # reduce 92 omitted

 # reduce 93 omitted

 # reduce 94 omitted

 # reduce 95 omitted

 # reduce 96 omitted

 # reduce 97 omitted

 # reduce 98 omitted

 # reduce 99 omitted

 # reduce 100 omitted

 # reduce 101 omitted

 def _reduce_none( val, _values)
  val[0]
 end

end   # class XMLDTDScanner

type.module_eval <<'..end xmldtd.ry modeval..idd8346c69f1', 'xmldtd.ry', 503

s = XMLDTDScanner.new
STDOUT.sync = STDERR.sync = true

src = ARGF
s.parse src
..end xmldtd.ry modeval..idd8346c69f1
