`PPParser>>allParsers`, `allParsersDo:(seen:)` moved to base PetitParser package.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sat, 04 Oct 2014 21:26:15 +0100
changeset 381 0bbbcf5da2d4
parent 380 8fe3cb4e607f
child 382 1825151d6455
`PPParser>>allParsers`, `allParsersDo:(seen:)` moved to base PetitParser package. The method #allParsersDo: is actually used used by PPContext>>initializeFor: therefore it has to be in the package stx:goodies/petitparser (MC package PetitParser) and _NOT_ in stx:goodies/petitparser/analyzer (MC package PetitAnalyzer)
PPParser.st
PPPluggableParser.st
analyzer/PPParserReplaceRule.st
analyzer/analyzer.rc
analyzer/extensions.st
analyzer/stx_goodies_petitparser_analyzer.st
tests/PPContextTest.st
--- a/PPParser.st	Sun Oct 05 00:05:20 2014 +0100
+++ b/PPParser.st	Sat Oct 04 21:26:15 2014 +0100
@@ -24,7 +24,6 @@
 
 
 
-
 !PPParser methodsFor:'accessing'!
 
 children
@@ -133,6 +132,34 @@
 	properties := properties copy
 ! !
 
+!PPParser methodsFor:'enumerating'!
+
+allParsers
+	"Answer all the parse nodes of the receiver."
+
+	| result |
+	result := OrderedCollection new.
+	self allParsersDo: [ :parser | result addLast: parser ].
+	^ result
+!
+
+allParsersDo: aBlock
+	"Iterate over all the parse nodes of the receiver."
+
+	self allParsersDo: aBlock seen: IdentitySet new
+!
+
+allParsersDo: aBlock seen: aSet
+	"Iterate over all the parse nodes of the receiver, do not visit and follow the ones contained in aSet."
+
+	(aSet includes: self)
+		ifTrue: [ ^ self ].
+	aSet add: self.
+	aBlock value: self.
+	self children
+		do: [ :each | each allParsersDo: aBlock seen: aSet ]
+! !
+
 !PPParser methodsFor:'initialization'!
 
 initialize
--- a/PPPluggableParser.st	Sun Oct 05 00:05:20 2014 +0100
+++ b/PPPluggableParser.st	Sat Oct 04 21:26:15 2014 +0100
@@ -50,6 +50,11 @@
     ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPPluggableParser.st,v 1.4 2014-03-04 14:33:12 cg Exp $'
 !
 
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+!
+
 version_SVN
     ^ '$Id: PPPluggableParser.st,v 1.4 2014-03-04 14:33:12 cg Exp $'
 ! !
--- a/analyzer/PPParserReplaceRule.st	Sun Oct 05 00:05:20 2014 +0100
+++ b/analyzer/PPParserReplaceRule.st	Sat Oct 04 21:26:15 2014 +0100
@@ -37,5 +37,10 @@
 
 version_CVS
     ^ '$Header: /cvs/stx/stx/goodies/petitparser/analyzer/PPParserReplaceRule.st,v 1.3 2014-03-04 20:27:46 cg Exp $'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !
 
--- a/analyzer/analyzer.rc	Sun Oct 05 00:05:20 2014 +0100
+++ b/analyzer/analyzer.rc	Sat Oct 04 21:26:15 2014 +0100
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2014\nCopyright eXept Software AG 1998-2014\0"
       VALUE "ProductName", "Smalltalk/X\0"
       VALUE "ProductVersion", "6.2.4.0\0"
-      VALUE "ProductDate", "Sat, 04 Oct 2014 23:03:58 GMT\0"
+      VALUE "ProductDate", "Sat, 04 Oct 2014 20:20:15 GMT\0"
     END
 
   END
--- a/analyzer/extensions.st	Sun Oct 05 00:05:20 2014 +0100
+++ b/analyzer/extensions.st	Sat Oct 04 21:26:15 2014 +0100
@@ -106,38 +106,6 @@
 			ifTrue: [ aBlock value: each ] ]
 ! !
 
-!PPParser methodsFor:'*petitanalyzer-enumerating'!
-
-allParsers
-	"Answer all the parse nodes of the receiver."
-
-	| result |
-	result := OrderedCollection new.
-	self allParsersDo: [ :parser | result addLast: parser ].
-	^ result
-! !
-
-!PPParser methodsFor:'*petitanalyzer-enumerating'!
-
-allParsersDo: aBlock
-	"Iterate over all the parse nodes of the receiver."
-
-	self allParsersDo: aBlock seen: IdentitySet new
-! !
-
-!PPParser methodsFor:'*petitanalyzer-enumerating'!
-
-allParsersDo: aBlock seen: aSet
-	"Iterate over all the parse nodes of the receiver, do not visit and follow the ones contained in aSet."
-
-	(aSet includes: self)
-		ifTrue: [ ^ self ].
-	aSet add: self.
-	aBlock value: self.
-	self children
-		do: [ :each | each allParsersDo: aBlock seen: aSet ]
-! !
-
 !PPParser methodsFor:'*petitanalyzer-matching'!
 
 copyInContext: aDictionary
--- a/analyzer/stx_goodies_petitparser_analyzer.st	Sun Oct 05 00:05:20 2014 +0100
+++ b/analyzer/stx_goodies_petitparser_analyzer.st	Sat Oct 04 21:26:15 2014 +0100
@@ -7,6 +7,12 @@
 	category:'* Projects & Packages *'
 !
 
+!stx_goodies_petitparser_analyzer class methodsFor:'documentation'!
+
+extensionsVersion_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
 
 !stx_goodies_petitparser_analyzer class methodsFor:'accessing - monticello'!
 
@@ -118,9 +124,6 @@
         PPOptionalParser isNullable
         PPParser allNamedParsers
         PPParser allNamedParsersDo:
-        PPParser allParsers
-        PPParser allParsersDo:
-        PPParser allParsersDo:seen:
         PPParser copyInContext:
         PPParser copyInContext:seen:
         PPParser cycleSet
@@ -160,6 +163,8 @@
         PPParser isFirstSetTerminal
         PPRepeatingParser followSets:firstSets:into:
     )
+
+    "Modified: / 04-10-2014 / 21:20:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !stx_goodies_petitparser_analyzer class methodsFor:'description - project information'!
--- a/tests/PPContextTest.st	Sun Oct 05 00:05:20 2014 +0100
+++ b/tests/PPContextTest.st	Sat Oct 04 21:26:15 2014 +0100
@@ -7,6 +7,7 @@
 	category:'PetitTests-Tests'
 !
 
+
 !PPContextTest methodsFor:'as yet unclassified'!
 
 context
@@ -173,3 +174,10 @@
 	self assert: context atEnd.
 ! !
 
+!PPContextTest class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+