--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCTokenGuard.st Thu May 21 14:12:22 2015 +0100
@@ -0,0 +1,38 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+Object subclass:#PPCTokenGuard
+ instanceVariableNames:'node'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'PetitCompiler-Guards'
+!
+
+!PPCTokenGuard class methodsFor:'as yet unclassified'!
+
+on: node
+ ^ self new
+ node: node;
+ yourself
+! !
+
+!PPCTokenGuard methodsFor:'as yet unclassified'!
+
+firstToken
+ self assert: node firstSetWithTokens size = 1.
+ ^ node firstSetWithTokens anyOne
+!
+
+makesSense
+ ^ node firstSetWithTokens size = 1 and: [ node firstSetWithTokens anyOne isTokenNode ]
+!
+
+node
+ ^ node
+!
+
+node: aPPCNode
+ node := aPPCNode
+! !
+