Bug #1134 ยป racc_runtime.patch
| lib/racc/parser.rb (working copy) | ||
|---|---|---|
|
#
|
||
|
# $originalId: parser.rb,v 1.8 2006/07/06 11:42:07 aamine Exp $
|
||
|
# $Id$
|
||
|
#
|
||
|
# Copyright (c) 1999-2006 Minero Aoki
|
||
|
#
|
||
| ... | ... | |
|
class Parser
|
||
|
Racc_Runtime_Version = '1.4.5'
|
||
|
Racc_Runtime_Revision = '$originalRevision: 1.8 $'.split[1]
|
||
|
Racc_Runtime_Version = '1.4.6'
|
||
|
Racc_Runtime_Revision = '$Id$'
|
||
|
Racc_Runtime_Core_Version_R = '1.4.5'
|
||
|
Racc_Runtime_Core_Revision_R = '$originalRevision: 1.8 $'.split[1]
|
||
|
Racc_Runtime_Core_Version_R = '1.4.6'
|
||
|
Racc_Runtime_Core_Revision_R = '$Id$'.split[1]
|
||
|
begin
|
||
|
require 'racc/cparse'
|
||
|
# Racc_Runtime_Core_Version_C = (defined in extention)
|
||
| ... | ... | |
|
reduce_n, use_result, * = arg
|
||
|
_racc_init_sysvars
|
||
|
act = nil
|
||
|
i = nil
|
||
|
nerr = 0
|
||
|
catch(:racc_end_parse) {
|
||
| ... | ... | |
|
;
|
||
|
end
|
||
|
while not(i = action_pointer[@racc_state[-1]]) or
|
||
|
not @racc_read_next or
|
||
|
@racc_t == 0 # $
|
||
|
while !(i = action_pointer[@racc_state[-1]]) ||
|
||
|
! @racc_read_next ||
|
||
|
@racc_t == 0 # $
|
||
|
unless i and i += @racc_t and
|
||
|
i >= 0 and
|
||
|
act = action_table[i] and
|
||
| ... | ... | |
|
toks.each {|t| out.print ' ', racc_token2str(t) }
|
||
|
end
|
||
|
out.puts " --> #{racc_token2str(sim)}"
|
||
|
|
||
|
racc_print_stacks tstack, vstack
|
||
|
@racc_debug_out.puts
|
||
|
end
|
||