Server IP : 172.67.216.182 / Your IP : 104.23.176.8 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/ruby/3.0.0/racc/ |
Upload File : |
#-- # # # # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the same terms of ruby. # see the file "COPYING". # #++ module Racc # An "indexed" set. All items must respond to :ident. class ISet def initialize(a = []) @set = a end attr_reader :set def add(i) @set[i.ident] = i end def [](key) @set[key.ident] end def []=(key, val) @set[key.ident] = val end alias include? [] alias key? [] def update(other) s = @set o = other.set o.each_index do |idx| if t = o[idx] s[idx] = t end end end def update_a(a) s = @set a.each {|i| s[i.ident] = i } end def delete(key) i = @set[key.ident] @set[key.ident] = nil i end def each(&block) @set.compact.each(&block) end def to_a @set.compact end def to_s "[#{@set.compact.join(' ')}]" end alias inspect to_s def size @set.nitems end def empty? @set.nitems == 0 end def clear @set.clear end def dup ISet.new(@set.dup) end end # class ISet end # module Racc