summaryrefslogtreecommitdiff
path: root/lib/irb/slex.rb
diff options
context:
space:
mode:
author(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-25 21:10:58 +0000
committer(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-25 21:10:58 +0000
commite149ee88cf53bb5665ab240a138be41d0b337ea8 (patch)
tree6e0ff9f8c510431cf675ca9be2640d8761085b97 /lib/irb/slex.rb
parent99020d6e50702eb371111d73280eb80b4b29ba5b (diff)
This commit was manufactured by cvs2svn to create tag
'v1_6_4_preview4'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_6_4_preview4@1459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/slex.rb')
-rw-r--r--lib/irb/slex.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/irb/slex.rb b/lib/irb/slex.rb
index 85aa92bd73..26008906e5 100644
--- a/lib/irb/slex.rb
+++ b/lib/irb/slex.rb
@@ -1,9 +1,9 @@
#
-# irb-slex.rb - symple lex analizer
-# $Release Version: 0.6$
+# irb/slex.rb - symple lex analizer
+# $Release Version: 0.7.3$
# $Revision$
# $Date$
-# by Keiju ISHITSUKA(Nippon Rational Inc.)
+# by Keiju ISHITSUKA(keiju@ishituska.com)
#
# --
#
@@ -20,7 +20,7 @@ class SLex
def_exception :ErrNodeAlreadyExists, "node already exists"
class << self
- attr :debug_level, TRUE
+ attr_accessor :debug_level
def debug?
debug_level > 0
end
@@ -88,16 +88,16 @@ class SLex
#
#----------------------------------------------------------------------
class Node
- # if postproc no exist, this node is abstract node.
- # if postproc isn't nil, this node is real node.
+ # if postproc is nil, this node is an abstract node.
+ # if postproc is non-nil, this node is a real node.
def initialize(preproc = nil, postproc = nil)
@Tree = {}
@preproc = preproc
@postproc = postproc
end
- attr :preproc, TRUE
- attr :postproc, TRUE
+ attr_accessor :preproc
+ attr_accessor :postproc
def search(chrs, opt = nil)
return self if chrs.empty?
@@ -159,8 +159,8 @@ class SLex
#
# chrs: String
# character array
- # io It must have getc()/ungetc(), and ungetc() can be
- # called any number of times.
+ # io must have getc()/ungetc(); and ungetc() must be
+ # able to be called arbitrary number of times.
#
def match(chrs, op = "")
print "match>: ", chrs, "op:", op, "\n" if SLex.debug?
@@ -265,7 +265,7 @@ if $0 == __FILE__
print "0: ", tr.inspect, "\n"
tr.def_rule("=") {print "=\n"}
print "1: ", tr.inspect, "\n"
- tr.def_rule("==", proc{FALSE}) {print "==\n"}
+ tr.def_rule("==", proc{false}) {print "==\n"}
print "2: ", tr.inspect, "\n"
print "case 1:\n"