--- a/compiler/PPCStarNode.st Wed Nov 19 10:52:37 2014 +0000
+++ b/compiler/PPCStarNode.st Mon Nov 24 00:09:23 2014 +0000
@@ -26,6 +26,7 @@
changeStatus change.
^ PPCStarMessagePredicateNode new
name: name;
+ child: child;
message: child message;
yourself
].
@@ -34,6 +35,7 @@
changeStatus change.
^ PPCStarAnyNode new
name: name;
+ child: child;
yourself
].
@@ -42,10 +44,17 @@
^ PPCStarCharSetPredicateNode new
name: name;
predicate: child predicate;
+ child: child;
yourself
]
! !
+!PPCStarNode methodsFor:'analyzing'!
+
+isNullable
+ ^ true
+! !
+
!PPCStarNode methodsFor:'as yet unclassified'!
compileWith: compiler effect: effect id: id
@@ -68,3 +77,13 @@
^ compiler stopMethod.
! !
+!PPCStarNode methodsFor:'first follow next'!
+
+followSets: aFollowDictionary firstSets: aFirstDictionary into: aSet suchThat: aBlock
+ | first |
+ super followSets: aFollowDictionary firstSets: aFirstDictionary into: aSet suchThat: aBlock.
+
+ first := aFirstDictionary at: self.
+ (aFollowDictionary at: child) addAll: (first reject: [:each | each isNullable])
+! !
+