--- a/ConstNode.st Mon Aug 22 14:39:47 1994 +0200
+++ b/ConstNode.st Mon Aug 22 14:42:14 1994 +0200
@@ -21,6 +21,8 @@
ConstantNode comment:'
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/Attic/ConstNode.st,v 1.8 1994-08-22 12:40:51 claus Exp $
'!
!ConstantNode class methodsFor:'documentation'!
@@ -41,7 +43,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/Attic/ConstNode.st,v 1.7 1994-06-02 20:25:56 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/ConstNode.st,v 1.8 1994-08-22 12:40:51 claus Exp $
"
!
--- a/ConstantNode.st Mon Aug 22 14:39:47 1994 +0200
+++ b/ConstantNode.st Mon Aug 22 14:42:14 1994 +0200
@@ -21,6 +21,8 @@
ConstantNode comment:'
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/ConstantNode.st,v 1.8 1994-08-22 12:40:51 claus Exp $
'!
!ConstantNode class methodsFor:'documentation'!
@@ -41,7 +43,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/ConstantNode.st,v 1.7 1994-06-02 20:25:56 claus Exp $
+$Header: /cvs/stx/stx/libcomp/ConstantNode.st,v 1.8 1994-08-22 12:40:51 claus Exp $
"
!
--- a/MessageNd.st Mon Aug 22 14:39:47 1994 +0200
+++ b/MessageNd.st Mon Aug 22 14:42:14 1994 +0200
@@ -20,6 +20,8 @@
MessageNode comment:'
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/Attic/MessageNd.st,v 1.10 1994-08-22 12:40:53 claus Exp $
'!
!MessageNode class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/Attic/MessageNd.st,v 1.9 1994-06-02 20:26:01 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/MessageNd.st,v 1.10 1994-08-22 12:40:53 claus Exp $
"
!
--- a/MessageNode.st Mon Aug 22 14:39:47 1994 +0200
+++ b/MessageNode.st Mon Aug 22 14:42:14 1994 +0200
@@ -20,6 +20,8 @@
MessageNode comment:'
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/MessageNode.st,v 1.10 1994-08-22 12:40:53 claus Exp $
'!
!MessageNode class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/MessageNode.st,v 1.9 1994-06-02 20:26:01 claus Exp $
+$Header: /cvs/stx/stx/libcomp/MessageNode.st,v 1.10 1994-08-22 12:40:53 claus Exp $
"
!
--- a/ParseNode.st Mon Aug 22 14:39:47 1994 +0200
+++ b/ParseNode.st Mon Aug 22 14:42:14 1994 +0200
@@ -20,6 +20,8 @@
ParseNode comment:'
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/ParseNode.st,v 1.7 1994-08-22 12:40:57 claus Exp $
'!
!ParseNode class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/ParseNode.st,v 1.6 1994-06-02 20:26:06 claus Exp $
+$Header: /cvs/stx/stx/libcomp/ParseNode.st,v 1.7 1994-08-22 12:40:57 claus Exp $
"
!
--- a/PrimNd.st Mon Aug 22 14:39:47 1994 +0200
+++ b/PrimNd.st Mon Aug 22 14:42:14 1994 +0200
@@ -20,6 +20,8 @@
PrimitiveNode comment:'
COPYRIGHT (c) 1990 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/Attic/PrimNd.st,v 1.5 1994-08-22 12:41:01 claus Exp $
'!
!PrimitiveNode class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/Attic/PrimNd.st,v 1.4 1994-06-02 20:26:11 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/PrimNd.st,v 1.5 1994-08-22 12:41:01 claus Exp $
"
!
--- a/PrimaryNd.st Mon Aug 22 14:39:47 1994 +0200
+++ b/PrimaryNd.st Mon Aug 22 14:42:14 1994 +0200
@@ -20,6 +20,8 @@
PrimaryNode comment:'
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/Attic/PrimaryNd.st,v 1.8 1994-08-22 12:41:04 claus Exp $
'!
!PrimaryNode class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/Attic/PrimaryNd.st,v 1.7 1994-06-02 20:26:13 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/PrimaryNd.st,v 1.8 1994-08-22 12:41:04 claus Exp $
"
!
--- a/PrimaryNode.st Mon Aug 22 14:39:47 1994 +0200
+++ b/PrimaryNode.st Mon Aug 22 14:42:14 1994 +0200
@@ -20,6 +20,8 @@
PrimaryNode comment:'
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/PrimaryNode.st,v 1.8 1994-08-22 12:41:04 claus Exp $
'!
!PrimaryNode class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/PrimaryNode.st,v 1.7 1994-06-02 20:26:13 claus Exp $
+$Header: /cvs/stx/stx/libcomp/PrimaryNode.st,v 1.8 1994-08-22 12:41:04 claus Exp $
"
!
--- a/PrimitiveNode.st Mon Aug 22 14:39:47 1994 +0200
+++ b/PrimitiveNode.st Mon Aug 22 14:42:14 1994 +0200
@@ -20,6 +20,8 @@
PrimitiveNode comment:'
COPYRIGHT (c) 1990 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/PrimitiveNode.st,v 1.5 1994-08-22 12:41:01 claus Exp $
'!
!PrimitiveNode class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/PrimitiveNode.st,v 1.4 1994-06-02 20:26:11 claus Exp $
+$Header: /cvs/stx/stx/libcomp/PrimitiveNode.st,v 1.5 1994-08-22 12:41:01 claus Exp $
"
!
--- a/Scanner.st Mon Aug 22 14:39:47 1994 +0200
+++ b/Scanner.st Mon Aug 22 14:42:14 1994 +0200
@@ -30,7 +30,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.9 1994-08-11 23:27:27 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.10 1994-08-22 12:42:14 claus Exp $
'!
!Scanner class methodsFor:'documentation'!
@@ -51,7 +51,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.9 1994-08-11 23:27:27 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.10 1994-08-22 12:42:14 claus Exp $
"
!
@@ -69,6 +69,52 @@
^ (super new) initializeFor:aStringOrStream
! !
+!Scanner class methodsFor:'initialization'!
+
+setupActions
+ |block|
+
+ ActionArray := Array new:256.
+ TypeArray := Array new:256.
+
+ block := [:s :char | s nextNumber].
+ ($0 asciiValue) to:($9 asciiValue) do:[:index |
+ ActionArray at:index put:block
+ ].
+
+ block := [:s :char | s nextIdentifier].
+ ($a asciiValue) to:($z asciiValue) do:[:index |
+ ActionArray at:index put:block
+ ].
+ ($A asciiValue) to:($Z asciiValue) do:[:index |
+ ActionArray at:index put:block
+ ].
+
+ block := [:s :char | s nextSpecial].
+ #( $& $- $+ $= $* $/ $\ $< $> $~ $@ $, $? ) do:[:binop |
+ TypeArray at:(binop asciiValue) put:#special.
+ ActionArray at:(binop asciiValue) put:block
+ ].
+
+ block := [:s :char | s nextToken:char].
+ #( $; $. $( $) $[ $] $! $^ $| $_ ) do:[:ch |
+ ActionArray at:(ch asciiValue) put:block
+ ].
+
+ "kludge: action is characterToken, but type is special"
+ TypeArray at:($| asciiValue) put:#special.
+
+ ActionArray at:($' asciiValue) put:[:s :char | s nextString].
+ ActionArray at:($$ asciiValue) put:[:s :char | s nextCharacter].
+ ActionArray at:($# asciiValue) put:[:s :char | s nextHash].
+ ActionArray at:($% asciiValue) put:[:s :char | s nextPrimitive].
+ ActionArray at:($: asciiValue) put:[:s :char | s nextColonOrAssign]
+
+ "
+ Scanner setupActions
+ "
+! !
+
!Scanner methodsFor:'private'!
initializeFor:aStringOrStream
@@ -91,41 +137,7 @@
warnSTXSpecialComment := true.
ActionArray isNil ifTrue:[
- ActionArray := Array new:256.
- TypeArray := Array new:256.
-
- block := [:s :char | s nextNumber].
- ($0 asciiValue) to:($9 asciiValue) do:[:index |
- ActionArray at:index put:block
- ].
-
- block := [:s :char | s nextIdentifier].
- ($a asciiValue) to:($z asciiValue) do:[:index |
- ActionArray at:index put:block
- ].
- ($A asciiValue) to:($Z asciiValue) do:[:index |
- ActionArray at:index put:block
- ].
-
- block := [:s :char | s nextSpecial].
- #( $& $- $+ $= $* $/ $\ $< $> $~ $@ $, $? ) do:[:binop |
- TypeArray at:(binop asciiValue) put:#special.
- ActionArray at:(binop asciiValue) put:block
- ].
-
- block := [:s :char | s nextToken:char].
- #( $; $. $( $) $[ $] $!! $^ $| $_ ) do:[:ch |
- ActionArray at:(ch asciiValue) put:block
- ].
-
- "kludge: action is characterToken, but type is special"
- TypeArray at:($| asciiValue) put:#special.
-
- ActionArray at:($' asciiValue) put:[:s :char | s nextString].
- ActionArray at:($$ asciiValue) put:[:s :char | s nextCharacter].
- ActionArray at:($# asciiValue) put:[:s :char | s nextHash].
- ActionArray at:($% asciiValue) put:[:s :char | s nextPrimitive].
- ActionArray at:($: asciiValue) put:[:s :char | s nextColonOrAssign]
+ self class setupActions
]
!
--- a/SelfNode.st Mon Aug 22 14:39:47 1994 +0200
+++ b/SelfNode.st Mon Aug 22 14:42:14 1994 +0200
@@ -20,6 +20,8 @@
SelfNode comment:'
COPYRIGHT (c) 1994 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/SelfNode.st,v 1.3 1994-08-22 12:41:07 claus Exp $
'!
!SelfNode class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/SelfNode.st,v 1.2 1994-06-02 20:26:18 claus Exp $
+$Header: /cvs/stx/stx/libcomp/SelfNode.st,v 1.3 1994-08-22 12:41:07 claus Exp $
"
!
--- a/StatNode.st Mon Aug 22 14:39:47 1994 +0200
+++ b/StatNode.st Mon Aug 22 14:42:14 1994 +0200
@@ -20,6 +20,8 @@
StatementNode comment:'
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/Attic/StatNode.st,v 1.5 1994-08-22 12:41:08 claus Exp $
'!
!StatementNode class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/Attic/StatNode.st,v 1.4 1994-06-02 20:26:19 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/StatNode.st,v 1.5 1994-08-22 12:41:08 claus Exp $
"
!
--- a/StatementNode.st Mon Aug 22 14:39:47 1994 +0200
+++ b/StatementNode.st Mon Aug 22 14:42:14 1994 +0200
@@ -20,6 +20,8 @@
StatementNode comment:'
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/StatementNode.st,v 1.5 1994-08-22 12:41:08 claus Exp $
'!
!StatementNode class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/StatementNode.st,v 1.4 1994-06-02 20:26:19 claus Exp $
+$Header: /cvs/stx/stx/libcomp/StatementNode.st,v 1.5 1994-08-22 12:41:08 claus Exp $
"
!
--- a/SuperNode.st Mon Aug 22 14:39:47 1994 +0200
+++ b/SuperNode.st Mon Aug 22 14:42:14 1994 +0200
@@ -20,6 +20,8 @@
SuperNode comment:'
COPYRIGHT (c) 1994 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/SuperNode.st,v 1.3 1994-08-22 12:41:10 claus Exp $
'!
!SuperNode class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/SuperNode.st,v 1.2 1994-06-02 20:26:22 claus Exp $
+$Header: /cvs/stx/stx/libcomp/SuperNode.st,v 1.3 1994-08-22 12:41:10 claus Exp $
"
!
--- a/UnaryNd.st Mon Aug 22 14:39:47 1994 +0200
+++ b/UnaryNd.st Mon Aug 22 14:42:14 1994 +0200
@@ -20,6 +20,8 @@
UnaryNode comment:'
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/Attic/UnaryNd.st,v 1.9 1994-08-22 12:41:12 claus Exp $
'!
!UnaryNode class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/Attic/UnaryNd.st,v 1.8 1994-06-02 20:26:23 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/UnaryNd.st,v 1.9 1994-08-22 12:41:12 claus Exp $
"
!
--- a/UnaryNode.st Mon Aug 22 14:39:47 1994 +0200
+++ b/UnaryNode.st Mon Aug 22 14:42:14 1994 +0200
@@ -20,6 +20,8 @@
UnaryNode comment:'
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/UnaryNode.st,v 1.9 1994-08-22 12:41:12 claus Exp $
'!
!UnaryNode class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/UnaryNode.st,v 1.8 1994-06-02 20:26:23 claus Exp $
+$Header: /cvs/stx/stx/libcomp/UnaryNode.st,v 1.9 1994-08-22 12:41:12 claus Exp $
"
!
--- a/UndefVar.st Mon Aug 22 14:39:47 1994 +0200
+++ b/UndefVar.st Mon Aug 22 14:42:14 1994 +0200
@@ -20,6 +20,8 @@
UndefinedVariable comment:'
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/Attic/UndefVar.st,v 1.4 1994-08-22 12:41:14 claus Exp $
'!
!UndefinedVariable class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/Attic/UndefVar.st,v 1.3 1994-06-02 20:26:25 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/UndefVar.st,v 1.4 1994-08-22 12:41:14 claus Exp $
"
!
--- a/UndefinedVariable.st Mon Aug 22 14:39:47 1994 +0200
+++ b/UndefinedVariable.st Mon Aug 22 14:42:14 1994 +0200
@@ -20,6 +20,8 @@
UndefinedVariable comment:'
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/UndefinedVariable.st,v 1.4 1994-08-22 12:41:14 claus Exp $
'!
!UndefinedVariable class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/UndefinedVariable.st,v 1.3 1994-06-02 20:26:25 claus Exp $
+$Header: /cvs/stx/stx/libcomp/UndefinedVariable.st,v 1.4 1994-08-22 12:41:14 claus Exp $
"
!