Merge
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 24 Jul 2015 15:37:23 +0100
changeset 503 ff58cd9f1f3c
parent 501 e29bd90f388e (diff)
parent 502 1e45d3c96ec5 (current diff)
child 504 0fb1f0799fc1
Merge
bmake.bat
compiler/Make.proto
compiler/Make.spec
compiler/PEGFsa.st
compiler/PPCCodeBlock.st
compiler/PPCCodeGenerator.st
compiler/PPCCompiler.st
compiler/PPCInlinedMethod.st
compiler/PPCInliningVisitor.st
compiler/PPCMappedActionNode.st
compiler/PPCMethod.st
compiler/PPCNode.st
compiler/PPCScannerCodeGenerator.st
compiler/PPCSequenceNode.st
compiler/PPCSpecializingVisitor.st
compiler/PPCTokenCodeGenerator.st
compiler/PPCTokenizingCodeGenerator.st
compiler/PPCTokenizingVisitor.st
compiler/PPMappedActionParser.st
compiler/abbrev.stc
compiler/bc.mak
compiler/benchmarks/Make.proto
compiler/benchmarks/PPCBenchmark.st
compiler/benchmarks/PPCSmalltalkNoopParser.st
compiler/benchmarks/bc.mak
compiler/benchmarks/stx_goodies_petitparser_compiler_benchmarks.st
compiler/extensions.st
compiler/libInit.cc
compiler/stx_goodies_petitparser_compiler.st
compiler/tests/Make.proto
compiler/tests/PPCCodeGeneratorTest.st
compiler/tests/bc.mak
compiler/tests/extras/Make.proto
compiler/tests/extras/PPCompiledExpressionGrammarResource.st
compiler/tests/extras/PPCompiledJavaSyntaxTest.st
compiler/tests/extras/PPLL1ExpressionGrammar.st
compiler/tests/extras/PPTokenizedExpressionGrammarResource.st
compiler/tests/extras/PPTokenizedLL1ExpressionGrammarResource.st
compiler/tests/extras/PPTokenizedSmalltalkGrammarResource.st
compiler/tests/extras/abbrev.stc
compiler/tests/extras/bc.mak
compiler/tests/extras/stx_goodies_petitparser_compiler_tests_extras.st
mingwmake.bat
vcmake.bat
--- a/Make.proto	Fri Jul 24 15:06:54 2015 +0100
+++ b/Make.proto	Fri Jul 24 15:37:23 2015 +0100
@@ -21,7 +21,7 @@
 INCLUDE_TOP=$(TOP)/..
 
 # subdirectories where targets are to be made:
-SUBDIRS= analyzer tests
+SUBDIRS= analyzer tests parsers/smalltalk parsers/java compiler
 
 
 # subdirectories where Makefiles are to be made:
@@ -34,7 +34,7 @@
 # add the path(es) here:,
 # ********** OPTIONAL: MODIFY the next lines ***
 # LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/monticello -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic2 -I$(INCLUDE_TOP)/stx/libscm/mercurial/monticello
+LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic2
 
 
 # if you need any additional defines for embedded C code,
@@ -74,7 +74,8 @@
 		Class tryLocalSourceFirst: true.				\
 		Smalltalk packagePath add:'$(TOP)/..' .                       \
 		Smalltalk loadPackage:'stx:goodies/petitparser'.              \
-		(Smalltalk at: #'stx_goodies_petitparser') exportAsMczTo: 'mc'."
+		(Smalltalk at: #'stx_goodies_petitparser') monticelloExportTo: 'mc'.\
+                Smalltalk exit:0"
 
 
 
--- a/PPParser.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/PPParser.st	Fri Jul 24 15:37:23 2015 +0100
@@ -171,6 +171,33 @@
 initialize
 ! !
 
+!PPParser methodsFor:'inspecting'!
+
+inspector2TabTree
+    <inspector2Tab>
+
+    ^ (self newInspector2Tab)
+        label:'Tree';
+        priority:50;
+        view: [
+            | list view |
+
+            list := PluggableHierarchicalList new.
+            list childBlock: [ :parent | parent children ].
+            list labelBlock: [ :child | child printString ].
+            list root: self.
+            view := ScrollableView for:HierarchicalListView.
+            view useDefaultIcons: false.
+            view list: list.
+            view
+        ];
+        "/ application: [ ... ];
+        "/ text: [ ... ];
+        yourself
+
+    "Modified: / 22-05-2015 / 17:05:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !PPParser methodsFor:'operations'!
 
 , aParser 
@@ -654,6 +681,11 @@
     ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPParser.st,v 1.7 2014-03-04 23:58:41 cg Exp $'
 !
 
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+!
+
 version_SVN
     ^ '$Id: PPParser.st,v 1.7 2014-03-04 23:58:41 cg Exp $'
 ! !
--- a/bc.mak	Fri Jul 24 15:06:54 2015 +0100
+++ b/bc.mak	Fri Jul 24 15:37:23 2015 +0100
@@ -35,7 +35,7 @@
 
 
 
-LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\monticello -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libbasic2 -I$(INCLUDE_TOP)\stx\libscm\mercurial\monticello
+LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libbasic2
 LOCALDEFINES=
 
 STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES)  -varPrefix=$(LIBNAME)
--- a/bmake.bat	Fri Jul 24 15:06:54 2015 +0100
+++ b/bmake.bat	Fri Jul 24 15:37:23 2015 +0100
@@ -21,4 +21,25 @@
 @call bmake %1 %2 || exit /b "%errorlevel%"
 @popd
 
+@echo "***********************************"
+@echo "Buildung stx/goodies/petitparser/parsers/smalltalk
+@echo "***********************************"
+@pushd parsers\smalltalk
+@call bmake %1 %2 || exit /b "%errorlevel%"
+@popd
 
+@echo "***********************************"
+@echo "Buildung stx/goodies/petitparser/parsers/java
+@echo "***********************************"
+@pushd parsers\java
+@call bmake %1 %2 || exit /b "%errorlevel%"
+@popd
+
+@echo "***********************************"
+@echo "Buildung stx/goodies/petitparser/compiler
+@echo "***********************************"
+@pushd compiler
+@call bmake %1 %2 || exit /b "%errorlevel%"
+@popd
+
+
--- a/compiler/Make.proto	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/Make.proto	Fri Jul 24 15:37:23 2015 +0100
@@ -34,7 +34,7 @@
 # add the path(es) here:,
 # ********** OPTIONAL: MODIFY the next lines ***
 # LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/petitparser -I$(INCLUDE_TOP)/stx/goodies/petitparser/analyzer -I$(INCLUDE_TOP)/stx/goodies/petitparser/parsers/java -I$(INCLUDE_TOP)/stx/goodies/petitparser/parsers/smalltalk -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic2 -I$(INCLUDE_TOP)/stx/libview
+LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/petitparser -I$(INCLUDE_TOP)/stx/goodies/petitparser/analyzer -I$(INCLUDE_TOP)/stx/goodies/petitparser/parsers/java -I$(INCLUDE_TOP)/stx/goodies/petitparser/parsers/smalltalk -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic2 -I$(INCLUDE_TOP)/stx/libwidg -I$(INCLUDE_TOP)/stx/libwidg2
 
 
 # if you need any additional defines for embedded C code,
--- a/compiler/Make.spec	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/Make.spec	Fri Jul 24 15:37:23 2015 +0100
@@ -59,8 +59,8 @@
 	PEGFsaTransition \
 	PPCArguments \
 	PPCBridge \
+	PPCCodeBlock \
 	PPCClassBuilder \
-	PPCCodeBlock \
 	PPCCodeGen \
 	PPCCompiledMethod \
 	PPCCompiler \
@@ -167,8 +167,8 @@
     $(OUTDIR_SLASH)PEGFsaTransition.$(O) \
     $(OUTDIR_SLASH)PPCArguments.$(O) \
     $(OUTDIR_SLASH)PPCBridge.$(O) \
+    $(OUTDIR_SLASH)PPCCodeBlock.$(O) \
     $(OUTDIR_SLASH)PPCClassBuilder.$(O) \
-    $(OUTDIR_SLASH)PPCCodeBlock.$(O) \
     $(OUTDIR_SLASH)PPCCodeGen.$(O) \
     $(OUTDIR_SLASH)PPCCompiledMethod.$(O) \
     $(OUTDIR_SLASH)PPCCompiler.$(O) \
--- a/compiler/PEGFsa.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/PEGFsa.st	Fri Jul 24 15:37:23 2015 +0100
@@ -150,7 +150,7 @@
     ^ openSet
 !
 
-epsilonDestinationsFrom: state openSet: openSet.
+epsilonDestinationsFrom: state openSet: openSet
     (openSet includes: state) ifTrue: [ 
         ^ self 
     ].
--- a/compiler/PPCInlinedMethod.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/PPCInlinedMethod.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Compiler-Codegen'
 !
 
+
 !PPCInlinedMethod methodsFor:'as yet unclassified'!
 
 call
@@ -27,12 +28,6 @@
 
 !PPCInlinedMethod methodsFor:'code generation - variables'!
 
-allocateReturnVariable
-    self error: 'return variable must be assigned by the non-inlined method....'
-
-   "Created: / 23-04-2015 / 21:06:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
 allocateReturnVariableNamed: name
     self error: 'return variable must be assigned by the non-inlined method....'
 
@@ -45,3 +40,10 @@
    "Created: / 23-04-2015 / 21:06:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!PPCInlinedMethod class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/PPCInliningVisitor.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/PPCInliningVisitor.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Visitors'
 !
 
+
 !PPCInliningVisitor methodsFor:'initialization'!
 
 initialize
@@ -124,3 +125,10 @@
     ^ node
 ! !
 
+!PPCInliningVisitor class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/PPCLiteralNode.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/PPCLiteralNode.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Nodes'
 !
 
+
 !PPCLiteralNode methodsFor:'comparing'!
 
 recognizedSentencesPrim
@@ -28,3 +29,10 @@
     ^ visitor visitLiteralNode: self
 ! !
 
+!PPCLiteralNode class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/PPCMappedActionNode.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/PPCMappedActionNode.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Nodes'
 !
 
+
 !PPCMappedActionNode methodsFor:'visiting'!
 
 accept: visitor
@@ -17,3 +18,10 @@
     "Created: / 02-06-2015 / 17:27:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!PPCMappedActionNode class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/PPCNode.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/PPCNode.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Nodes'
 !
 
+
 !PPCNode class methodsFor:'as yet unclassified'!
 
 new
@@ -467,6 +468,32 @@
             shouldExpandToLevel: 6
 ! !
 
+!PPCNode methodsFor:'inspecting'!
+
+inspector2TabTree
+    <inspector2Tab>
+
+    ^ (self newInspector2Tab)
+        label:'Tree';
+        priority:50;
+        view: [
+            | list view |
+
+            list := PluggableHierarchicalList new.
+            list childBlock: [ :parent | parent children ].
+            list labelBlock: [ :child | child printString ].
+            list root: self.
+            view := ScrollableView for:HierarchicalListView.
+            view useDefaultIcons: false.
+            view list: list.
+            view
+        ];
+        yourself
+
+    "Modified: / 22-05-2015 / 17:05:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (comment): / 18-06-2015 / 06:04:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !PPCNode methodsFor:'printing'!
 
 printHashOn: aStream
@@ -563,3 +590,10 @@
     visitor visitNode: self
 ! !
 
+!PPCNode class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/PPCScannerCodeGenerator.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/PPCScannerCodeGenerator.st	Fri Jul 24 15:37:23 2015 +0100
@@ -170,7 +170,7 @@
     self generateStopMethod: state.
 !
 
-generateForSingleTransition: t from: state.
+generateForSingleTransition: t from: state
     
     (self isJoinPoint: t destination) ifTrue: [ self removeJoinTransition: t ].
     
@@ -192,12 +192,12 @@
             codeGen add: 'true'
         ]
     ] ifFalse: [ 
-        codeGen codeAssertPeek: (t characterSet) ifTrue: [.
+        codeGen codeAssertPeek: (t characterSet) ifTrue: [
             self generateFor: t destination.
         ].
     ].
 "
-    codeGen codeAssertPeek: (t characterSet) ifTrue: [.
+    codeGen codeAssertPeek: (t characterSet) ifTrue: [
         self generateFor: t destination.
     ].
     codeGen codeIfFalse.
@@ -212,7 +212,7 @@
     codeGen codeNlReturnResult: state priority.
 !
 
-generateStartMethod: state.
+generateStartMethod: state
     id := codeGen idFor: state.
 
     codeGen codeComment: 'START - Generated from state: ', state asString.
--- a/compiler/PPCSequenceNode.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/PPCSequenceNode.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Nodes'
 !
 
+
 !PPCSequenceNode methodsFor:'accessing'!
 
 preferredChildrenVariableNames
@@ -185,3 +186,10 @@
     ^ visitor visitSequenceNode: self
 ! !
 
+!PPCSequenceNode class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/PPCSpecializingVisitor.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/PPCSpecializingVisitor.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Visitors'
 !
 
+
 !PPCSpecializingVisitor methodsFor:'visiting'!
 
 visitActionNode: node
@@ -200,3 +201,10 @@
     "Modified: / 21-05-2015 / 14:41:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!PPCSpecializingVisitor class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/PPCTokenCodeGenerator.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/PPCTokenCodeGenerator.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Visitors'
 !
 
+
 !PPCTokenCodeGenerator methodsFor:'as yet unclassified'!
 
 afterAccept: node retval: retval
@@ -172,3 +173,10 @@
     self fromTokenMode.
 ! !
 
+!PPCTokenCodeGenerator class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/PPCTokenizingConfiguration.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/PPCTokenizingConfiguration.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Core'
 !
 
+
 !PPCTokenizingConfiguration methodsFor:'compiling'!
 
 invokePhases
@@ -59,3 +60,10 @@
     self remember: #tokenize
 ! !
 
+!PPCTokenizingConfiguration class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/PPCTokenizingVisitor.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/PPCTokenizingVisitor.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Visitors'
 !
 
+
 !PPCTokenizingVisitor methodsFor:'hooks'!
 
 afterAccept: node retval: parserNode
@@ -115,3 +116,10 @@
         yourself.
 ! !
 
+!PPCTokenizingVisitor class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/abbrev.stc	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/abbrev.stc	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 PEGFsaTransition PEGFsaTransition stx:goodies/petitparser/compiler 'PetitCompiler-FSA' 0
 PPCArguments PPCArguments stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
 PPCBridge PPCBridge stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
+PPCCodeBlock PPCCodeBlock stx:goodies/petitparser/compiler 'PetitCompiler-Compiler-Codegen' 0
 PPCClassBuilder PPCClassBuilder stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
 PPCCodeBlock PPCCodeBlock stx:goodies/petitparser/compiler 'PetitCompiler-Compiler-Codegen' 0
 PPCCodeGen PPCCodeGen stx:goodies/petitparser/compiler 'PetitCompiler-Compiler-Codegen' 0
@@ -41,6 +42,7 @@
 PPCCodeGenerator PPCCodeGenerator stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
 PPCDelegateNode PPCDelegateNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCEndOfFileNode PPCEndOfFileNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
+PPCInlinedMethod PPCInlinedMethod stx:goodies/petitparser/compiler 'PetitCompiler-Compiler-Codegen' 0
 PPCFSACodeGen PPCFSACodeGen stx:goodies/petitparser/compiler 'PetitCompiler-Scanner' 0
 PPCInlinedMethod PPCInlinedMethod stx:goodies/petitparser/compiler 'PetitCompiler-Compiler-Codegen' 0
 PPCInliningVisitor PPCInliningVisitor stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
--- a/compiler/bc.mak	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/bc.mak	Fri Jul 24 15:37:23 2015 +0100
@@ -85,6 +85,7 @@
 $(OUTDIR)PEGFsaTransition.$(O) PEGFsaTransition.$(H): PEGFsaTransition.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCArguments.$(O) PPCArguments.$(H): PPCArguments.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCBridge.$(O) PPCBridge.$(H): PPCBridge.st $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCCodeBlock.$(O) PPCCodeBlock.$(H): PPCCodeBlock.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCClassBuilder.$(O) PPCClassBuilder.$(H): PPCClassBuilder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCCodeBlock.$(O) PPCCodeBlock.$(H): PPCCodeBlock.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCCodeGen.$(O) PPCCodeGen.$(H): PPCCodeGen.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
--- a/compiler/benchmarks/PPCBenchmark.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/benchmarks/PPCBenchmark.st	Fri Jul 24 15:37:23 2015 +0100
@@ -681,6 +681,35 @@
 
 teardownSmalltalkGrammarTokenized
     parser class removeFromSystem.
+"       
+    size := input inject: 0 into: [:r :e | r + e size  ].
+    Transcript crShow: 'Compiled Grammar time: ', time asString.
+    Transcript crShow: 'Time per character: ', (time / size * 1000.0) asString, ' microseconds'.
+"
+
+    "Created: / 11-05-2015 / 16:33:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+teardownSmalltalkNoopParserCompiled
+    parser class removeFromSystem.
+"       
+    size := input inject: 0 into: [:r :e | r + e size  ].
+    Transcript crShow: 'Compiled Grammar time: ', time asString.
+    Transcript crShow: 'Time per character: ', (time / size * 1000.0) asString, ' microseconds'.
+"
+
+    "Created: / 16-05-2015 / 09:44:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+teardownSmalltalkNoopParserTokenized
+    parser class removeFromSystem.
+"       
+    size := input inject: 0 into: [:r :e | r + e size  ].
+    Transcript crShow: 'Compiled Grammar time: ', time asString.
+    Transcript crShow: 'Time per character: ', (time / size * 1000.0) asString, ' microseconds'.
+"
+
+    "Created: / 16-05-2015 / 09:44:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 teardownSmalltalkNoopParserCompiled
--- a/compiler/benchmarks/stx_goodies_petitparser_compiler_benchmarks.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/benchmarks/stx_goodies_petitparser_compiler_benchmarks.st	Fri Jul 24 15:37:23 2015 +0100
@@ -44,7 +44,10 @@
      my classes is considered to be a prerequisite package."
 
     ^ #(
+
     )
+
+    "Modified: / 16-05-2015 / 19:19:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 mandatoryPreRequisites
--- a/compiler/libInit.cc	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/libInit.cc	Fri Jul 24 15:37:23 2015 +0100
@@ -35,6 +35,7 @@
 _PEGFsaTransition_Init(pass,__pRT__,snd);
 _PPCArguments_Init(pass,__pRT__,snd);
 _PPCBridge_Init(pass,__pRT__,snd);
+_PPCCodeBlock_Init(pass,__pRT__,snd);
 _PPCClassBuilder_Init(pass,__pRT__,snd);
 _PPCCodeBlock_Init(pass,__pRT__,snd);
 _PPCCodeGen_Init(pass,__pRT__,snd);
--- a/compiler/stx_goodies_petitparser_compiler.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/stx_goodies_petitparser_compiler.st	Fri Jul 24 15:37:23 2015 +0100
@@ -77,7 +77,9 @@
         #'stx:goodies/petitparser/analyzer'    "PPSentinel - referenced by PPCompiledParser class>>referringParser"
         #'stx:goodies/refactoryBrowser/parser'    "RBAssignmentNode - referenced by PPCCodeGenerator>>visitActionNode:"
         #'stx:libbasic2'    "IdentityBag - referenced by PEGFsa>>checkTransitionsIdentity"
+        #'stx:libwidg'    "ScrollableView - referenced by PPCNode>>inspector2TabTree"
         #'stx:libview'    "Color - referenced by PEGFsa>>viewGraphOn:"
+        #'stx:libwidg2'    "HierarchicalListView - referenced by PPCNode>>inspector2TabTree"
     )
 !
 
@@ -117,6 +119,7 @@
         PEGFsaTransition
         PPCArguments
         PPCBridge
+        PPCCodeBlock
         PPCClassBuilder
         PPCCodeBlock
         PPCCodeGen
@@ -326,6 +329,8 @@
         PPParser allNodesDo:seen:
         PPSmalltalkWhitespaceParser hash
         PPParser compileTokenizing
+        PPCompositeParser asCompilerNode
+        PPSequenceParser map:
         Object canHavePPCId
         PPCompositeParser asCompilerNode
         PPSequenceParser map:
--- a/compiler/tests/PPCCodeGeneratorTest.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/PPCCodeGeneratorTest.st	Fri Jul 24 15:37:23 2015 +0100
@@ -10,6 +10,7 @@
 	category:'PetitCompiler-Tests-Visitors'
 !
 
+
 !PPCCodeGeneratorTest methodsFor:'as yet unclassified'!
 
 context	
@@ -916,6 +917,48 @@
     "Created: / 22-05-2015 / 11:47:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+testSequenceOptInlined1
+    | a b bOpt |
+
+    a := $a asParser asCompilerNode.
+    b := $b asParser asCompilerNode.
+    bOpt := PPCOptionalNode new
+                child:  b ;
+                markForInline;
+                yourself.
+    node := PPCSequenceNode new
+        children: { a . bOpt };
+        yourself.
+    self compileTree: node.
+    
+    self assert: parser parse: 'ab' to: #($a $b ) end: 2.
+    self assert: parser parse: 'a' to: #( $a nil ) end: 1.
+
+    "Created: / 22-05-2015 / 11:47:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+testSequenceOptInlined2
+    | a b bOpt |
+
+    a := $a asParser asCompilerNode.
+    a markForInline.
+    b := $b asParser asCompilerNode.
+    b markForInline.
+    bOpt := PPCOptionalNode new
+                child:  b ;
+                markForInline;
+                yourself.
+    node := PPCSequenceNode new
+        children: { a . bOpt };
+        yourself.
+    self compileTree: node.
+    
+    self assert: parser parse: 'ab' to: #($a $b ) end: 2.
+    self assert: parser parse: 'a' to: #( $a nil ) end: 1.
+
+    "Created: / 22-05-2015 / 11:47:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 testStarAnyNode
     arguments cacheFirstFollow: false.
     node := PPCStarAnyNode new 
@@ -1108,3 +1151,10 @@
     self assert: parser parse: '' to: nil.
 ! !
 
+!PPCCodeGeneratorTest class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/tests/PPCInliningVisitorTest.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/PPCInliningVisitorTest.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Tests-Visitors'
 !
 
+
 !PPCInliningVisitorTest methodsFor:'as yet unclassified'!
 
 assert: object type: class
@@ -171,3 +172,10 @@
     self assert: result child child type: PPCNilNode.
 ! !
 
+!PPCInliningVisitorTest class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/tests/PPCLL1VisitorTest.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/PPCLL1VisitorTest.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Tests-Visitors'
 !
 
+
 !PPCLL1VisitorTest methodsFor:'as yet unclassified'!
 
 setUp
@@ -139,3 +140,10 @@
     
 ! !
 
+!PPCLL1VisitorTest class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/tests/PPCSpecializingVisitorTest.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/PPCSpecializingVisitorTest.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Tests-Visitors'
 !
 
+
 !PPCSpecializingVisitorTest methodsFor:'as yet unclassified'!
 
 asNode: aPPParser
@@ -259,3 +260,10 @@
     self assert: result child literal = 'foo'.
 ! !
 
+!PPCSpecializingVisitorTest class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/tests/extras/Make.proto	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/extras/Make.proto	Fri Jul 24 15:37:23 2015 +0100
@@ -128,9 +128,31 @@
 
 
 # BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+$(OUTDIR)PPCCompiledJavaVerificationTest.$(O) PPCCompiledJavaVerificationTest.$(H): PPCCompiledJavaVerificationTest.st $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPAbstractParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCExpressionsVerificationTest.$(O) PPCExpressionsVerificationTest.$(H): PPCExpressionsVerificationTest.st $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPAbstractParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCResources.$(O) PPCResources.$(H): PPCResources.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestResource.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCSmalltalkTests.$(O) PPCSmalltalkTests.$(H): PPCSmalltalkTests.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCSmalltalkVerificationTest.$(O) PPCSmalltalkVerificationTest.$(H): PPCSmalltalkVerificationTest.st $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPAbstractParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCompiledExpressionGrammarResource.$(O) PPCompiledExpressionGrammarResource.$(H): PPCompiledExpressionGrammarResource.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestResource.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCompiledExpressionGrammarTest.$(O) PPCompiledExpressionGrammarTest.$(H): PPCompiledExpressionGrammarTest.st $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPAbstractParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPCompositeParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCompiledJavaResource.$(O) PPCompiledJavaResource.$(H): PPCompiledJavaResource.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestResource.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCompiledSmalltalkGrammarResource.$(O) PPCompiledSmalltalkGrammarResource.$(H): PPCompiledSmalltalkGrammarResource.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestResource.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCompiledSmalltalkGrammarTests.$(O) PPCompiledSmalltalkGrammarTests.$(H): PPCompiledSmalltalkGrammarTests.st $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPAbstractParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPCompositeParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPExpressionGrammar.$(O) PPExpressionGrammar.$(H): PPExpressionGrammar.st $(INCLUDE_TOP)/stx/goodies/petitparser/PPCompositeParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPDelegateParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPExpressionGrammarTest.$(O) PPExpressionGrammarTest.$(H): PPExpressionGrammarTest.st $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPAbstractParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPCompositeParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPLL1ExpressionGrammar.$(O) PPLL1ExpressionGrammar.$(H): PPLL1ExpressionGrammar.st $(INCLUDE_TOP)/stx/goodies/petitparser/PPCompositeParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPDelegateParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPLL1ExpressionGrammarTest.$(O) PPLL1ExpressionGrammarTest.$(H): PPLL1ExpressionGrammarTest.st $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPAbstractParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPCompositeParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedExpressionGrammarResource.$(O) PPTokenizedExpressionGrammarResource.$(H): PPTokenizedExpressionGrammarResource.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestResource.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedExpressionGrammarTest.$(O) PPTokenizedExpressionGrammarTest.$(H): PPTokenizedExpressionGrammarTest.st $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPAbstractParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPCompositeParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedLL1ExpressionGrammarResource.$(O) PPTokenizedLL1ExpressionGrammarResource.$(H): PPTokenizedLL1ExpressionGrammarResource.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestResource.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedLL1ExpressionGrammarTest.$(O) PPTokenizedLL1ExpressionGrammarTest.$(H): PPTokenizedLL1ExpressionGrammarTest.st $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPAbstractParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPCompositeParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedSmalltalkGrammarResource.$(O) PPTokenizedSmalltalkGrammarResource.$(H): PPTokenizedSmalltalkGrammarResource.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestResource.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedSmalltalkGrammarTests.$(O) PPTokenizedSmalltalkGrammarTests.$(H): PPTokenizedSmalltalkGrammarTests.st $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPAbstractParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPCompositeParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)stx_goodies_petitparser_compiler_tests_extras.$(O) stx_goodies_petitparser_compiler_tests_extras.$(H): stx_goodies_petitparser_compiler_tests_extras.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
+$(OUTDIR)PPCompiledExpressionsVerificationTest.$(O) PPCompiledExpressionsVerificationTest.$(H): PPCompiledExpressionsVerificationTest.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/tests/extras/PPCExpressionsVerificationTest.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPAbstractParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCompiledSmalltalkVerificationTest.$(O) PPCompiledSmalltalkVerificationTest.$(H): PPCompiledSmalltalkVerificationTest.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/tests/extras/PPCSmalltalkVerificationTest.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPAbstractParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedExpressionsVerificationTest.$(O) PPTokenizedExpressionsVerificationTest.$(H): PPTokenizedExpressionsVerificationTest.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/tests/extras/PPCExpressionsVerificationTest.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPAbstractParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedSmalltalkVerificationTest.$(O) PPTokenizedSmalltalkVerificationTest.$(H): PPTokenizedSmalltalkVerificationTest.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/tests/extras/PPCSmalltalkVerificationTest.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/tests/PPAbstractParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 
 # ENDMAKEDEPEND --- do not remove this line
 
--- a/compiler/tests/extras/Make.spec	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/extras/Make.spec	Fri Jul 24 15:37:23 2015 +0100
@@ -51,17 +51,61 @@
 STCWARNINGS=-warnNonStandard
 
 COMMON_CLASSES= \
+	PPCCompiledJavaVerificationTest \
+	PPCExpressionsVerificationTest \
+	PPCResources \
+	PPCSmalltalkTests \
+	PPCSmalltalkVerificationTest \
+	PPCompiledExpressionGrammarResource \
+	PPCompiledExpressionGrammarTest \
+	PPCompiledJavaResource \
+	PPCompiledSmalltalkGrammarResource \
+	PPCompiledSmalltalkGrammarTests \
 	PPExpressionGrammar \
+	PPExpressionGrammarTest \
 	PPLL1ExpressionGrammar \
+	PPLL1ExpressionGrammarTest \
+	PPTokenizedExpressionGrammarResource \
+	PPTokenizedExpressionGrammarTest \
+	PPTokenizedLL1ExpressionGrammarResource \
+	PPTokenizedLL1ExpressionGrammarTest \
+	PPTokenizedSmalltalkGrammarResource \
+	PPTokenizedSmalltalkGrammarTests \
 	stx_goodies_petitparser_compiler_tests_extras \
+	PPCompiledExpressionsVerificationTest \
+	PPCompiledSmalltalkVerificationTest \
+	PPTokenizedExpressionsVerificationTest \
+	PPTokenizedSmalltalkVerificationTest \
 
 
 
 
 COMMON_OBJS= \
+    $(OUTDIR_SLASH)PPCCompiledJavaVerificationTest.$(O) \
+    $(OUTDIR_SLASH)PPCExpressionsVerificationTest.$(O) \
+    $(OUTDIR_SLASH)PPCResources.$(O) \
+    $(OUTDIR_SLASH)PPCSmalltalkTests.$(O) \
+    $(OUTDIR_SLASH)PPCSmalltalkVerificationTest.$(O) \
+    $(OUTDIR_SLASH)PPCompiledExpressionGrammarResource.$(O) \
+    $(OUTDIR_SLASH)PPCompiledExpressionGrammarTest.$(O) \
+    $(OUTDIR_SLASH)PPCompiledJavaResource.$(O) \
+    $(OUTDIR_SLASH)PPCompiledSmalltalkGrammarResource.$(O) \
+    $(OUTDIR_SLASH)PPCompiledSmalltalkGrammarTests.$(O) \
     $(OUTDIR_SLASH)PPExpressionGrammar.$(O) \
+    $(OUTDIR_SLASH)PPExpressionGrammarTest.$(O) \
     $(OUTDIR_SLASH)PPLL1ExpressionGrammar.$(O) \
+    $(OUTDIR_SLASH)PPLL1ExpressionGrammarTest.$(O) \
+    $(OUTDIR_SLASH)PPTokenizedExpressionGrammarResource.$(O) \
+    $(OUTDIR_SLASH)PPTokenizedExpressionGrammarTest.$(O) \
+    $(OUTDIR_SLASH)PPTokenizedLL1ExpressionGrammarResource.$(O) \
+    $(OUTDIR_SLASH)PPTokenizedLL1ExpressionGrammarTest.$(O) \
+    $(OUTDIR_SLASH)PPTokenizedSmalltalkGrammarResource.$(O) \
+    $(OUTDIR_SLASH)PPTokenizedSmalltalkGrammarTests.$(O) \
     $(OUTDIR_SLASH)stx_goodies_petitparser_compiler_tests_extras.$(O) \
+    $(OUTDIR_SLASH)PPCompiledExpressionsVerificationTest.$(O) \
+    $(OUTDIR_SLASH)PPCompiledSmalltalkVerificationTest.$(O) \
+    $(OUTDIR_SLASH)PPTokenizedExpressionsVerificationTest.$(O) \
+    $(OUTDIR_SLASH)PPTokenizedSmalltalkVerificationTest.$(O) \
 
 
 
--- a/compiler/tests/extras/PPCResources.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/extras/PPCResources.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Extras-Tests-Support'
 !
 
+
 !PPCResources methodsFor:'expressions'!
 
 expressionOfSize: size
@@ -62,7 +63,7 @@
 
 expressionSourcesMedium
     | sources |
-    
+
     cache at: #expressionSourcesMedium ifAbsentPut: [ 
         sources := OrderedCollection new.
         
@@ -180,3 +181,10 @@
     ^ (self smalltalkInDirectory: '../smalltalk-src/') copyFrom: 1 to: 1000.
 ! !
 
+!PPCResources class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/tests/extras/PPCompiledExpressionGrammarResource.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/extras/PPCompiledExpressionGrammarResource.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Extras-Tests-Expressions'
 !
 
+
 !PPCompiledExpressionGrammarResource methodsFor:'as yet unclassified'!
 
 setUp
@@ -24,3 +25,10 @@
     
 ! !
 
+!PPCompiledExpressionGrammarResource class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/tests/extras/PPCompiledExpressionsVerificationTest.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/extras/PPCompiledExpressionsVerificationTest.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Extras-Tests-Expressions'
 !
 
+
 !PPCompiledExpressionsVerificationTest class methodsFor:'as yet unclassified'!
 
 resources
@@ -33,3 +34,10 @@
     ^ super testSanity
 ! !
 
+!PPCompiledExpressionsVerificationTest class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/tests/extras/PPCompiledJavaSyntaxTest.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/extras/PPCompiledJavaSyntaxTest.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Extras-Tests-Java'
 !
 
+
 !PPCompiledJavaSyntaxTest class methodsFor:'as yet unclassified'!
 
 resources
@@ -571,3 +572,10 @@
             rule: #methodDeclaration
 ! !
 
+!PPCompiledJavaSyntaxTest class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/tests/extras/PPCompiledSmalltalkVerificationTest.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/extras/PPCompiledSmalltalkVerificationTest.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Extras-Tests-Smalltalk'
 !
 
+
 !PPCompiledSmalltalkVerificationTest class methodsFor:'as yet unclassified'!
 
 resources
@@ -37,3 +38,10 @@
     super testSmalltalkObject
 ! !
 
+!PPCompiledSmalltalkVerificationTest class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/tests/extras/PPLL1ExpressionGrammarTest.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/extras/PPLL1ExpressionGrammarTest.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Extras-Tests-Expressions'
 !
 
+
 !PPLL1ExpressionGrammarTest methodsFor:'as yet unclassified'!
 
 parserClass
@@ -98,3 +99,10 @@
     self assert: result third = 3.
 ! !
 
+!PPLL1ExpressionGrammarTest class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/tests/extras/PPTokenizedSmalltalkVerificationTest.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/extras/PPTokenizedSmalltalkVerificationTest.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Extras-Tests-Smalltalk'
 !
 
+
 !PPTokenizedSmalltalkVerificationTest class methodsFor:'as yet unclassified'!
 
 resources
@@ -37,3 +38,10 @@
     super testSmalltalkObject
 ! !
 
+!PPTokenizedSmalltalkVerificationTest class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/tests/extras/bc.mak	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/extras/bc.mak	Fri Jul 24 15:37:23 2015 +0100
@@ -75,9 +75,31 @@
 
 
 # BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+$(OUTDIR)PPCCompiledJavaVerificationTest.$(O) PPCCompiledJavaVerificationTest.$(H): PPCCompiledJavaVerificationTest.st $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPAbstractParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCExpressionsVerificationTest.$(O) PPCExpressionsVerificationTest.$(H): PPCExpressionsVerificationTest.st $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPAbstractParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCResources.$(O) PPCResources.$(H): PPCResources.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestResource.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCSmalltalkTests.$(O) PPCSmalltalkTests.$(H): PPCSmalltalkTests.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCSmalltalkVerificationTest.$(O) PPCSmalltalkVerificationTest.$(H): PPCSmalltalkVerificationTest.st $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPAbstractParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCompiledExpressionGrammarResource.$(O) PPCompiledExpressionGrammarResource.$(H): PPCompiledExpressionGrammarResource.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestResource.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCompiledExpressionGrammarTest.$(O) PPCompiledExpressionGrammarTest.$(H): PPCompiledExpressionGrammarTest.st $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPAbstractParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPCompositeParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCompiledJavaResource.$(O) PPCompiledJavaResource.$(H): PPCompiledJavaResource.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestResource.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCompiledSmalltalkGrammarResource.$(O) PPCompiledSmalltalkGrammarResource.$(H): PPCompiledSmalltalkGrammarResource.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestResource.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCompiledSmalltalkGrammarTests.$(O) PPCompiledSmalltalkGrammarTests.$(H): PPCompiledSmalltalkGrammarTests.st $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPAbstractParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPCompositeParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPExpressionGrammar.$(O) PPExpressionGrammar.$(H): PPExpressionGrammar.st $(INCLUDE_TOP)\stx\goodies\petitparser\PPCompositeParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPDelegateParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPExpressionGrammarTest.$(O) PPExpressionGrammarTest.$(H): PPExpressionGrammarTest.st $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPAbstractParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPCompositeParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPLL1ExpressionGrammar.$(O) PPLL1ExpressionGrammar.$(H): PPLL1ExpressionGrammar.st $(INCLUDE_TOP)\stx\goodies\petitparser\PPCompositeParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPDelegateParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPLL1ExpressionGrammarTest.$(O) PPLL1ExpressionGrammarTest.$(H): PPLL1ExpressionGrammarTest.st $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPAbstractParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPCompositeParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedExpressionGrammarResource.$(O) PPTokenizedExpressionGrammarResource.$(H): PPTokenizedExpressionGrammarResource.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestResource.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedExpressionGrammarTest.$(O) PPTokenizedExpressionGrammarTest.$(H): PPTokenizedExpressionGrammarTest.st $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPAbstractParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPCompositeParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedLL1ExpressionGrammarResource.$(O) PPTokenizedLL1ExpressionGrammarResource.$(H): PPTokenizedLL1ExpressionGrammarResource.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestResource.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedLL1ExpressionGrammarTest.$(O) PPTokenizedLL1ExpressionGrammarTest.$(H): PPTokenizedLL1ExpressionGrammarTest.st $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPAbstractParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPCompositeParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedSmalltalkGrammarResource.$(O) PPTokenizedSmalltalkGrammarResource.$(H): PPTokenizedSmalltalkGrammarResource.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestResource.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedSmalltalkGrammarTests.$(O) PPTokenizedSmalltalkGrammarTests.$(H): PPTokenizedSmalltalkGrammarTests.st $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPAbstractParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPCompositeParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)stx_goodies_petitparser_compiler_tests_extras.$(O) stx_goodies_petitparser_compiler_tests_extras.$(H): stx_goodies_petitparser_compiler_tests_extras.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
+$(OUTDIR)PPCompiledExpressionsVerificationTest.$(O) PPCompiledExpressionsVerificationTest.$(H): PPCompiledExpressionsVerificationTest.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\tests\extras\PPCExpressionsVerificationTest.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPAbstractParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCompiledSmalltalkVerificationTest.$(O) PPCompiledSmalltalkVerificationTest.$(H): PPCompiledSmalltalkVerificationTest.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\tests\extras\PPCSmalltalkVerificationTest.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPAbstractParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedExpressionsVerificationTest.$(O) PPTokenizedExpressionsVerificationTest.$(H): PPTokenizedExpressionsVerificationTest.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\tests\extras\PPCExpressionsVerificationTest.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPAbstractParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizedSmalltalkVerificationTest.$(O) PPTokenizedSmalltalkVerificationTest.$(H): PPTokenizedSmalltalkVerificationTest.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\tests\extras\PPCSmalltalkVerificationTest.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\tests\PPAbstractParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 
 # ENDMAKEDEPEND --- do not remove this line
 
--- a/compiler/tests/extras/libInit.cc	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/extras/libInit.cc	Fri Jul 24 15:37:23 2015 +0100
@@ -27,9 +27,31 @@
 void _libstx_goodies_petitparser_compiler_tests_extras_Init(pass, __pRT__, snd)
 OBJ snd; struct __vmData__ *__pRT__; {
 __BEGIN_PACKAGE2__("libstx_goodies_petitparser_compiler_tests_extras", _libstx_goodies_petitparser_compiler_tests_extras_Init, "stx:goodies/petitparser/compiler/tests/extras");
+_PPCCompiledJavaVerificationTest_Init(pass,__pRT__,snd);
+_PPCExpressionsVerificationTest_Init(pass,__pRT__,snd);
+_PPCResources_Init(pass,__pRT__,snd);
+_PPCSmalltalkTests_Init(pass,__pRT__,snd);
+_PPCSmalltalkVerificationTest_Init(pass,__pRT__,snd);
+_PPCompiledExpressionGrammarResource_Init(pass,__pRT__,snd);
+_PPCompiledExpressionGrammarTest_Init(pass,__pRT__,snd);
+_PPCompiledJavaResource_Init(pass,__pRT__,snd);
+_PPCompiledSmalltalkGrammarResource_Init(pass,__pRT__,snd);
+_PPCompiledSmalltalkGrammarTests_Init(pass,__pRT__,snd);
 _PPExpressionGrammar_Init(pass,__pRT__,snd);
+_PPExpressionGrammarTest_Init(pass,__pRT__,snd);
 _PPLL1ExpressionGrammar_Init(pass,__pRT__,snd);
+_PPLL1ExpressionGrammarTest_Init(pass,__pRT__,snd);
+_PPTokenizedExpressionGrammarResource_Init(pass,__pRT__,snd);
+_PPTokenizedExpressionGrammarTest_Init(pass,__pRT__,snd);
+_PPTokenizedLL1ExpressionGrammarResource_Init(pass,__pRT__,snd);
+_PPTokenizedLL1ExpressionGrammarTest_Init(pass,__pRT__,snd);
+_PPTokenizedSmalltalkGrammarResource_Init(pass,__pRT__,snd);
+_PPTokenizedSmalltalkGrammarTests_Init(pass,__pRT__,snd);
 _stx_137goodies_137petitparser_137compiler_137tests_137extras_Init(pass,__pRT__,snd);
+_PPCompiledExpressionsVerificationTest_Init(pass,__pRT__,snd);
+_PPCompiledSmalltalkVerificationTest_Init(pass,__pRT__,snd);
+_PPTokenizedExpressionsVerificationTest_Init(pass,__pRT__,snd);
+_PPTokenizedSmalltalkVerificationTest_Init(pass,__pRT__,snd);
 
 
 __END_PACKAGE__();
--- a/compiler/tests/extras/stx_goodies_petitparser_compiler_tests_extras.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/extras/stx_goodies_petitparser_compiler_tests_extras.st	Fri Jul 24 15:37:23 2015 +0100
@@ -10,6 +10,32 @@
 !
 
 
+!stx_goodies_petitparser_compiler_tests_extras class methodsFor:'accessing'!
+
+additionalClassAttributesFor: aClass
+    "Answers additional set of class attributes for given class
+     Individual project definitions may override this method, but
+     overriding method should always merge its attributes with result
+     of 'super additionalClassAttributesFor: aClass'.
+
+     Here, we add #autoload attributes to all test cases and
+     test resources, as they are not neccessary for the package
+     and should not be compiled (because of unwanted dependency
+     on stx:goodies/sunit package)
+
+     But not make them autoloaded when the package is separate
+     test-package - by conventions such package should by named
+     #'module:package/subpackage/tests'
+    "
+    (TestCase notNil and:[aClass inheritsFrom: TestCase]) ifTrue:[^#()].
+    (TestResource notNil and:[aClass inheritsFrom: TestResource]) ifTrue:[^#()].
+
+
+    ^ super additionalClassAttributesFor: aClass
+
+    "Created: / 10-05-2015 / 14:17:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !stx_goodies_petitparser_compiler_tests_extras class methodsFor:'accessing - monticello'!
 
 monticelloLastMergedVersionInfo
@@ -102,37 +128,37 @@
 
     ^ #(
         "<className> or (<className> attributes...) in load order"
-        (PPCCompiledJavaVerificationTest autoload)
-        (PPCExpressionsVerificationTest autoload)
-        (PPCResources autoload)
-        (PPCSmalltalkTests autoload)
-        (PPCSmalltalkVerificationTest autoload)
-        (PPCompiledExpressionGrammarResource autoload)
-        (PPCompiledExpressionGrammarTest autoload)
-        (PPCompiledJavaResource autoload)
+        PPCCompiledJavaVerificationTest
+        PPCExpressionsVerificationTest
+        PPCResources
+        PPCSmalltalkTests
+        PPCSmalltalkVerificationTest
+        PPCompiledExpressionGrammarResource
+        PPCompiledExpressionGrammarTest
+        PPCompiledJavaResource
         (PPCompiledJavaSyntaxTest autoload)
-        (PPCompiledSmalltalkGrammarResource autoload)
-        (PPCompiledSmalltalkGrammarTests autoload)
+        PPCompiledSmalltalkGrammarResource
+        PPCompiledSmalltalkGrammarTests
         (PPCompiledSmalltalkParserResource autoload)
         (PPCompiledSmalltalkParserTests autoload)
         PPExpressionGrammar
-        (PPExpressionGrammarTest autoload)
+        PPExpressionGrammarTest
         PPLL1ExpressionGrammar
-        (PPLL1ExpressionGrammarTest autoload)
-        (PPTokenizedExpressionGrammarResource autoload)
-        (PPTokenizedExpressionGrammarTest autoload)
-        (PPTokenizedLL1ExpressionGrammarResource autoload)
-        (PPTokenizedLL1ExpressionGrammarTest autoload)
-        (PPTokenizedSmalltalkGrammarResource autoload)
-        (PPTokenizedSmalltalkGrammarTests autoload)
+        PPLL1ExpressionGrammarTest
+        PPTokenizedExpressionGrammarResource
+        PPTokenizedExpressionGrammarTest
+        PPTokenizedLL1ExpressionGrammarResource
+        PPTokenizedLL1ExpressionGrammarTest
+        PPTokenizedSmalltalkGrammarResource
+        PPTokenizedSmalltalkGrammarTests
         (PPTokenizedSmalltalkParserResource autoload)
         (PPTokenizedSmalltalkParserTests autoload)
         #'stx_goodies_petitparser_compiler_tests_extras'
-        (PPCompiledExpressionsVerificationTest autoload)
-        (PPCompiledSmalltalkVerificationTest autoload)
-        (PPTokenizedExpressionsVerificationTest autoload)
+        PPCompiledExpressionsVerificationTest
+        PPCompiledSmalltalkVerificationTest
+        PPTokenizedExpressionsVerificationTest
+        PPTokenizedSmalltalkVerificationTest
         (PPTokenizedSmalltalkParserVerificationTest autoload)
-        (PPTokenizedSmalltalkVerificationTest autoload)
     )
 !
 
--- a/lccmake.bat	Fri Jul 24 15:06:54 2015 +0100
+++ b/lccmake.bat	Fri Jul 24 15:37:23 2015 +0100
@@ -19,4 +19,25 @@
 @call lccmake %1 %2 || exit /b "%errorlevel%"
 @popd
 
+@echo "***********************************"
+@echo "Buildung stx/goodies/petitparser/parsers/smalltalk
+@echo "***********************************"
+@pushd parsers\smalltalk
+@call lccmake %1 %2 || exit /b "%errorlevel%"
+@popd
 
+@echo "***********************************"
+@echo "Buildung stx/goodies/petitparser/parsers/java
+@echo "***********************************"
+@pushd parsers\java
+@call lccmake %1 %2 || exit /b "%errorlevel%"
+@popd
+
+@echo "***********************************"
+@echo "Buildung stx/goodies/petitparser/compiler
+@echo "***********************************"
+@pushd compiler
+@call lccmake %1 %2 || exit /b "%errorlevel%"
+@popd
+
+
--- a/mingwmake.bat	Fri Jul 24 15:06:54 2015 +0100
+++ b/mingwmake.bat	Fri Jul 24 15:37:23 2015 +0100
@@ -24,4 +24,25 @@
 @call mingwmake %1 %2 || exit /b "%errorlevel%"
 @popd
 
+@echo "***********************************"
+@echo "Buildung stx/goodies/petitparser/parsers/smalltalk
+@echo "***********************************"
+@pushd parsers\smalltalk
+@call mingwmake %1 %2 || exit /b "%errorlevel%"
+@popd
 
+@echo "***********************************"
+@echo "Buildung stx/goodies/petitparser/parsers/java
+@echo "***********************************"
+@pushd parsers\java
+@call mingwmake %1 %2 || exit /b "%errorlevel%"
+@popd
+
+@echo "***********************************"
+@echo "Buildung stx/goodies/petitparser/compiler
+@echo "***********************************"
+@pushd compiler
+@call mingwmake %1 %2 || exit /b "%errorlevel%"
+@popd
+
+
--- a/parsers/java/Make.proto	Fri Jul 24 15:06:54 2015 +0100
+++ b/parsers/java/Make.proto	Fri Jul 24 15:37:23 2015 +0100
@@ -34,7 +34,7 @@
 # add the path(es) here:,
 # ********** OPTIONAL: MODIFY the next lines ***
 # LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/petitparser -I$(INCLUDE_TOP)/stx/goodies/petitparser/tests -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic2
+LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/petitparser -I$(INCLUDE_TOP)/stx/goodies/petitparser/tests -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic
 
 
 # if you need any additional defines for embedded C code,
--- a/parsers/java/PJEndOfLineCommentsNode.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/parsers/java/PJEndOfLineCommentsNode.st	Fri Jul 24 15:37:23 2015 +0100
@@ -23,7 +23,7 @@
 !
 
 printOn: aStream
-	.^	aStream 
+	^	aStream 
 		nextPutAll: 'EndOfLineComment value ==> ';
 		nextPutAll: self comment.
  
--- a/parsers/java/PJPackageDeclarationNode.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/parsers/java/PJPackageDeclarationNode.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitJava-AST'
 !
 
+
 !PJPackageDeclarationNode methodsFor:'accessing'!
 
 nameNode
@@ -26,3 +27,10 @@
 	aVisitor visitPackageDeclarationNode: self
 ! !
 
+!PJPackageDeclarationNode class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/parsers/java/PJSyntaxNode.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/parsers/java/PJSyntaxNode.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,3 @@
 	category:'PetitJava-AST'
 !
 
-PJSyntaxNode comment:''
-!
-
--- a/parsers/java/PPJavaLexicon.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/parsers/java/PPJavaLexicon.st	Fri Jul 24 15:37:23 2015 +0100
@@ -1,1 +1,547 @@
-"{ Package: 'stx:goodies/petitparser/parsers/java' }"

"{ NameSpace: Smalltalk }"

PPCompositeParser subclass:#PPJavaLexicon
	instanceVariableNames:'unicodeEscape rawInputCharacter unicodeMarker hexDigit
		lineTerminator unicodeInputCharacter inputElements sub
		inputElement whiteSpace comment javaToken keyword literal
		separator operator identifier traditionalComment endOfLineComment
		commentTail charactersInLine commentTailStar notStar
		notStarNotSlash inputCharacter booleanLiteral nullLiteral
		identifierChars javaLetter javaLetterOrDigit keywords
		floatingPointLiteral integerLiteral characterLiteral
		stringLiteral hexIntegerLiteral octalIntegerLiteral
		decimalIntegerLiteral decimalNumeral integerTypeSuffix hexNumeral
		octalNumeral nonZeroDigit digits hexDigits octalDigits octalDigit
		hexadecimalFloatingPointLiteral decimalFloatingPointLiteral
		exponentPart floatTypeSuffix exponentIndicator signedInteger sign
		hexSignificand binaryExponent binaryExponentIndicator
		escapeSequence singleCharacter stringCharacters stringCharacter
		octalEscape zeroToThree input operators separators trueToken
		falseToken nullToken'
	classVariableNames:''
	poolDictionaries:''
	category:'PetitJava-Core'
!

PPJavaLexicon comment:'A parser with a definitions for some basic Java gramar parts

Grammar rules follow as closely as possible the specification found in "The Java Language Specification Third Edition"

URL = '
!


!PPJavaLexicon class methodsFor:'accessing'!

ignoredNames
	"Answer a collection of instance-variables that should not be automatically initialized with productions, but that are used internal to the composite parser."

	| newArray |	
	newArray := Array new: ((self namesToIgnore size) + (super ignoredNames size)).
	newArray
		replaceFrom: 1
		to: self namesToIgnore size
		with: self namesToIgnore.
	newArray
		replaceFrom: (self namesToIgnore size + 1)
		to: newArray size
		with: super ignoredNames.	
	^newArray
!

namesToIgnore

	^#('keywords' 'operators' 'separators')
! !

!PPJavaLexicon methodsFor:'accessing'!

start
	"Default start production."

	^ input end
! !

!PPJavaLexicon methodsFor:'grammar-comments'!

charactersInLine   

	^ inputCharacter plus
!

comment
	"traditional -> /*
	 endOfLine -> //"
	^ traditionalComment / endOfLineComment
!

commentTail

	^ 	('*' asParser , commentTailStar ) /
		(notStar , commentTail)
!

commentTailStar 

	^ ('/' asParser ) /
	  ('*' asParser , commentTailStar ) /
	  (notStarNotSlash , commentTail )
!

endOfLineComment 

	^ '//' asParser , charactersInLine optional
!

notStar

	^  ('*' asParser not , inputCharacter)/lineTerminator
!

notStarNotSlash  

	^ lineTerminator / ((PPPredicateObjectParser anyOf: '*/') not , inputCharacter )
!

traditionalComment

	^ '/*' asParser , commentTail
! !

!PPJavaLexicon methodsFor:'grammar-identifiers'!

identifier 

	^  self asToken: (((keyword not) , (booleanLiteral not) , (nullLiteral not) , identifierChars ))
!

identifierChars
	
	^ javaLetter plus , javaLetterOrDigit star
!

javaLetter

	^ (#letter asParser) / (PPPredicateObjectParser anyOf: '_$')
!

javaLetterOrDigit

	^ javaLetter / (#digit asParser)
! !

!PPJavaLexicon methodsFor:'grammar-input'!

input

	^ (inputElements optional) , (sub optional)
!

inputElement

	^ whiteSpace / comment / javaToken
!

inputElements

	^ inputElement plus
!

javaToken


	^ identifier / keyword / literal / separator / operator
!

sub

	^ (Character value: 26) asParser 
! !

!PPJavaLexicon methodsFor:'grammar-keywords'!

keyword

        | keywordParsers |
        
        keywordParsers := keywords keys asSortedCollection collect: [:eachKey | keywords at: eachKey ].
        ^ self asToken: ( (keywordParsers reduce: [ :a :b | a / b ]) )

    "Modified (format): / 21-04-2015 / 15:27:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!PPJavaLexicon methodsFor:'grammar-lineTerminators'!

inputCharacter 

	^(lineTerminator not) , unicodeInputCharacter ==> #second
!

lineTerminator

    self flag: 'Hack alert - should be fixed immediately in PJTraditionalCommentsNode>>comment:'.

        ^ (((Character codePoint: 10) asParser) ==> [ :lf | Array with: lf with: nil ])
          / (((Character codePoint: 13) asParser , ((Character codePoint: 10) asParser ) optional )) ==> [ :nodes | Array with: nodes first with: nil ]

    "Modified: / 21-04-2015 / 17:16:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!PPJavaLexicon methodsFor:'grammar-literals'!

literal
	"a literal must be a single token. Whitespaces are not allowed inside the literal"
	
	^ nullLiteral / booleanLiteral / floatingPointLiteral / integerLiteral / characterLiteral / stringLiteral
! !

!PPJavaLexicon methodsFor:'grammar-literals-boolean'!

booleanLiteral 

 ^ trueToken / falseToken
!

falseToken
	^ ('false' asParser , #word asParser not) javaToken
!

nullToken
	^ ('null' asParser , #word asParser not) javaToken
!

trueToken
	^ ('true' asParser , #word asParser not) javaToken
! !

!PPJavaLexicon methodsFor:'grammar-literals-character'!

characterLiteral 

 ^ ($' asParser , ( escapeSequence / singleCharacter ), $' asParser) javaToken
!

singleCharacter 	

	^( PPPredicateObjectParser anyOf: '''\') not , inputCharacter ==> #second
! !

!PPJavaLexicon methodsFor:'grammar-literals-escape'!

escapeSequence 

	^ ($\ asParser , (PPPredicateObjectParser anyOf: 'btnfr""''\' ) ) /
	   octalEscape 
!

octalEscape

	^ $\ asParser , ( (zeroToThree , octalDigit , octalDigit) / (octalDigit , octalDigit optional) )
!

zeroToThree

	^PPPredicateObjectParser anyOf: '0123'
! !

!PPJavaLexicon methodsFor:'grammar-literals-floating'!

binaryExponent

 ^ binaryExponentIndicator , signedInteger
!

binaryExponentIndicator

  ^ PPPredicateObjectParser anyOf: 'pP'
!

decimalFloatingPointLiteral

	|dot|
	dot := $. asParser.

 ^ ( ( (dot , digits) 
        / 
        (digits , dot , digits optional)) , 
			exponentPart optional , floatTypeSuffix optional ) 
  	/ 
  	(digits , 
		( (exponentPart , floatTypeSuffix optional) 
		  /
		  (exponentPart optional , floatTypeSuffix) ))
!

exponentIndicator

  ^ PPPredicateObjectParser anyOf: 'eE'
!

exponentPart

 ^ exponentIndicator , signedInteger
!

floatTypeSuffix

	^ PPPredicateObjectParser anyOf: 'fFdD'
!

floatingPointLiteral

  ^ (hexadecimalFloatingPointLiteral / decimalFloatingPointLiteral) javaToken
!

hexSignificand 
	|dot|
	dot := $. asParser.

 ^  (hexNumeral , dot optional) /
    ($0 asParser , (PPPredicateObjectParser anyOf: 'xX') , hexDigits optional , dot , hexDigits )
!

hexadecimalFloatingPointLiteral

 ^ hexSignificand , binaryExponent , floatTypeSuffix optional
!

sign

  ^PPPredicateObjectParser anyOf: '-+'
!

signedInteger

  ^ sign optional , digits
! !

!PPJavaLexicon methodsFor:'grammar-literals-integer'!

decimalIntegerLiteral

 ^ decimalNumeral , (integerTypeSuffix optional)
!

decimalNumeral 

	^($0 asParser) / (nonZeroDigit , digits optional) 
!

digits 
	"digit is already defined, no need to redefine it"
	^#digit asParser plus
!

hexDigits 

	^hexDigit plus
!

hexIntegerLiteral 

  ^ hexNumeral , (integerTypeSuffix optional)
!

hexNumeral 

	^$0 asParser, (PPPredicateObjectParser anyOf: 'xX' ), hexDigits
!

integerLiteral

  ^ (hexIntegerLiteral / octalIntegerLiteral / decimalIntegerLiteral) javaToken
!

integerTypeSuffix

	^ PPPredicateObjectParser anyOf: 'lL'
!

nonZeroDigit 

	^PPPredicateObjectParser anyOf: '123456789'.
!

octalDigit 

	^PPPredicateObjectParser anyOf: '01234567'
!

octalDigits

	^ octalDigit plus
!

octalIntegerLiteral 

 ^ octalNumeral , (integerTypeSuffix optional)
!

octalNumeral 

	^($0 asParser) , octalDigits
! !

!PPJavaLexicon methodsFor:'grammar-literals-null'!

nullLiteral 

 ^ nullToken
! !

!PPJavaLexicon methodsFor:'grammar-literals-string'!

stringCharacter
		
	^ ( ( PPPredicateObjectParser anyOf: '"\') not , inputCharacter ==> #second ) /
	   escapeSequence 
!

stringCharacters

	^ stringCharacter plus
!

stringLiteral 

 ^ ($" asParser , stringCharacters optional , $" asParser) javaToken
! !

!PPJavaLexicon methodsFor:'grammar-operators'!

operator
        | operatorParsers |
        
        operatorParsers := operators keys asSortedCollection collect: [:eachKey | operators at: eachKey ].                                                
        ^self asToken:  (operatorParsers reduce: [ :a :b | a / b ])

    "Modified: / 21-04-2015 / 15:26:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!PPJavaLexicon methodsFor:'grammar-separators'!

separator	
	^self asToken: (PPPredicateObjectParser anyOf: '(){}[];,.' )
! !

!PPJavaLexicon methodsFor:'grammar-unicode-escapes'!

hexDigit 

	^#hex asParser
!

rawInputCharacter

	^#any asParser
!

unicodeEscape

	^ $\ asParser , unicodeMarker , hexDigit , hexDigit , hexDigit , hexDigit
!

unicodeInputCharacter
	 ^ unicodeEscape / rawInputCharacter
!

unicodeMarker

	^$u asParser plus
! !

!PPJavaLexicon methodsFor:'grammar-whiteSpace'!

whiteSpace

	^ (Character space asParser ) /
	  (Character tab asParser ) /
	  ((Character value: 12) asParser ) /
		lineTerminator 
! !

!PPJavaLexicon methodsFor:'initialization'!

initialize

	super initialize.
	
	self initializeKeywords.
	self initializeOperators.
	self initializeSeparators.
!

initializeKeywords

	| values |
	keywords := Dictionary new.
	values := #('abstract' 'assert' 'boolean' 'break' 'byte' 'case'  'catch' 'char' 'class' 'const'
	   'continue' 'default' 'do' 'double' 'else' 'enum' 'extends' 'final'  'finally' 'float'
	   'for' 'if' 'goto' 'implements' 'import' 'instanceof' 'int' 'interface' 'long' 'native'
	   'new' 'package' 'private' 'protected' 'public' 'return' 'short' 'static' 'strictfp' 'super'
	   'switch' 'synchronized' 'this' 'throw' 'throws' 'transient' 'try' 'void' 'volatile' 'while').
	
	values do: [:eachKeyword |
		keywords at: eachKeyword 
			put: (PPUnresolvedParser named: ('keyword', eachKeyword first asUppercase asString , eachKeyword allButFirst))		
		].
	
	keywords keysAndValuesDo:  [:key :value |
		(keywords at: key) def: (key asParser ,  #word asParser not)]
!

initializeOperators

	| values |
	operators := Dictionary new.
	values := #(	'>>>=' '>>>' '>>=' '>>' '>=' '>'	'<<=' '<<' '<=' '<'	'++' '+=' '+'	'--' '-=' '-'	'&&' '&=' '&'
					'||' '|=' '|'	'*=' '*'	'%=' '%'	'/=' '/'	'^=' '^'	'!!=' '!!'	'==' '='	'~'	'?'	':'	'@' ).
	" @ ? perhaps for annotation but not in the doc "
	values do: [:eachOperator |
		operators at: eachOperator 
			put: (PPUnresolvedParser named: ('operator', eachOperator asString))		
		].
	
	operators  keysAndValuesDo:  [:key :value |
		(operators at: key) def: (key asParser)]
!

initializeSeparators

	| values |
	separators := Dictionary new.
	values := #( '(' ')' '{' '}' '[' ']' ';' ',' '.' ).
	
	values do: [:eachSeparator |
		separators at: eachSeparator 
			put: (PPUnresolvedParser named: ('separator', eachSeparator asString))		
		].
	
	separators  keysAndValuesDo:  [:key :value |
		(separators at: key) def: (key asParser)]
! !

!PPJavaLexicon methodsFor:'utility'!

asToken: aParser

	^aParser javaToken
!

emptySquaredParenthesis

	^ self asToken: (((self tokenFor: '['), (self tokenFor: ']')))
!

tokenFor: aString

	^self asToken: (keywords at: aString 
						ifAbsent: [separators at: aString 
							ifAbsent: [operators at: aString] ])
! !

!PPJavaLexicon class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !
\ No newline at end of file
+"{ Package: 'stx:goodies/petitparser/parsers/java' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCompositeParser subclass:#PPJavaLexicon
+	instanceVariableNames:'unicodeEscape rawInputCharacter unicodeMarker hexDigit
+		lineTerminator unicodeInputCharacter inputElements sub
+		inputElement whiteSpace comment javaToken keyword literal
+		separator operator identifier traditionalComment endOfLineComment
+		commentTail charactersInLine commentTailStar notStar
+		notStarNotSlash inputCharacter booleanLiteral nullLiteral
+		identifierChars javaLetter javaLetterOrDigit keywords
+		floatingPointLiteral integerLiteral characterLiteral
+		stringLiteral hexIntegerLiteral octalIntegerLiteral
+		decimalIntegerLiteral decimalNumeral integerTypeSuffix hexNumeral
+		octalNumeral nonZeroDigit digits hexDigits octalDigits octalDigit
+		hexadecimalFloatingPointLiteral decimalFloatingPointLiteral
+		exponentPart floatTypeSuffix exponentIndicator signedInteger sign
+		hexSignificand binaryExponent binaryExponentIndicator
+		escapeSequence singleCharacter stringCharacters stringCharacter
+		octalEscape zeroToThree input operators separators trueToken
+		falseToken nullToken'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitJava-Core'
+!
+
+PPJavaLexicon comment:'A parser with a definitions for some basic Java gramar parts

Grammar rules follow as closely as possible the specification found in "The Java Language Specification Third Edition"

URL = '
+!
+
+
+!PPJavaLexicon class methodsFor:'accessing'!
+
+ignoredNames
+	"Answer a collection of instance-variables that should not be automatically initialized with productions, but that are used internal to the composite parser."
+
+	| newArray |	
+	newArray := Array new: ((self namesToIgnore size) + (super ignoredNames size)).
+	newArray
+		replaceFrom: 1
+		to: self namesToIgnore size
+		with: self namesToIgnore.
+	newArray
+		replaceFrom: (self namesToIgnore size + 1)
+		to: newArray size
+		with: super ignoredNames.	
+	^newArray
+!
+
+namesToIgnore
+
+	^#('keywords' 'operators' 'separators')
+! !
+
+!PPJavaLexicon methodsFor:'accessing'!
+
+start
+	"Default start production."
+
+	^ input end
+! !
+
+!PPJavaLexicon methodsFor:'grammar-comments'!
+
+charactersInLine   
+
+	^ inputCharacter plus
+!
+
+comment
+	"traditional -> /*
+	 endOfLine -> //"
+	^ traditionalComment / endOfLineComment
+!
+
+commentTail
+
+	^ 	('*' asParser , commentTailStar ) /
+		(notStar , commentTail)
+!
+
+commentTailStar 
+
+	^ ('/' asParser ) /
+	  ('*' asParser , commentTailStar ) /
+	  (notStarNotSlash , commentTail )
+!
+
+endOfLineComment 
+
+	^ '//' asParser , charactersInLine optional
+!
+
+notStar
+
+	^  ('*' asParser not , inputCharacter)/lineTerminator
+!
+
+notStarNotSlash  
+
+	^ lineTerminator / ((PPPredicateObjectParser anyOf: '*/') not , inputCharacter )
+!
+
+traditionalComment
+
+	^ '/*' asParser , commentTail
+! !
+
+!PPJavaLexicon methodsFor:'grammar-identifiers'!
+
+identifier 
+
+	^  self asToken: (((keyword not) , (booleanLiteral not) , (nullLiteral not) , identifierChars ))
+!
+
+identifierChars
+	
+	^ javaLetter plus , javaLetterOrDigit star
+!
+
+javaLetter
+
+	^ (#letter asParser) / (PPPredicateObjectParser anyOf: '_$')
+!
+
+javaLetterOrDigit
+
+	^ javaLetter / (#digit asParser)
+! !
+
+!PPJavaLexicon methodsFor:'grammar-input'!
+
+input
+
+	^ (inputElements optional) , (sub optional)
+!
+
+inputElement
+
+	^ whiteSpace / comment / javaToken
+!
+
+inputElements
+
+	^ inputElement plus
+!
+
+javaToken
+
+
+	^ identifier / keyword / literal / separator / operator
+!
+
+sub
+
+	^ (Character value: 26) asParser 
+! !
+
+!PPJavaLexicon methodsFor:'grammar-keywords'!
+
+keyword
+
+        | keywordParsers |
+        
+        keywordParsers := keywords keys asSortedCollection collect: [:eachKey | keywords at: eachKey ].
+        ^ self asToken: ( (keywordParsers reduce: [ :a :b | a / b ]) )
+
+    "Modified (format): / 21-04-2015 / 15:27:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!PPJavaLexicon methodsFor:'grammar-lineTerminators'!
+
+inputCharacter 
+
+	^(lineTerminator not) , unicodeInputCharacter ==> #second
+!
+
+lineTerminator
+
+    self flag: 'Hack alert - should be fixed immediately in PJTraditionalCommentsNode>>comment:'.
+
+        ^ (((Character codePoint: 10) asParser) ==> [ :lf | Array with: lf with: nil ])
+          / (((Character codePoint: 13) asParser , ((Character codePoint: 10) asParser ) optional )) ==> [ :nodes | Array with: nodes first with: nil ]
+
+    "Modified: / 21-04-2015 / 17:16:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!PPJavaLexicon methodsFor:'grammar-literals'!
+
+literal
+	"a literal must be a single token. Whitespaces are not allowed inside the literal"
+	
+	^ nullLiteral / booleanLiteral / floatingPointLiteral / integerLiteral / characterLiteral / stringLiteral
+! !
+
+!PPJavaLexicon methodsFor:'grammar-literals-boolean'!
+
+booleanLiteral 
+
+ ^ trueToken / falseToken
+!
+
+falseToken
+	^ ('false' asParser , #word asParser not) javaToken
+!
+
+nullToken
+	^ ('null' asParser , #word asParser not) javaToken
+!
+
+trueToken
+	^ ('true' asParser , #word asParser not) javaToken
+! !
+
+!PPJavaLexicon methodsFor:'grammar-literals-character'!
+
+characterLiteral 
+
+ ^ ($' asParser , ( escapeSequence / singleCharacter ), $' asParser) javaToken
+!
+
+singleCharacter 	
+
+	^( PPPredicateObjectParser anyOf: '''\') not , inputCharacter ==> #second
+! !
+
+!PPJavaLexicon methodsFor:'grammar-literals-escape'!
+
+escapeSequence 
+
+	^ ($\ asParser , (PPPredicateObjectParser anyOf: 'btnfr""''\' ) ) /
+	   octalEscape 
+!
+
+octalEscape
+
+	^ $\ asParser , ( (zeroToThree , octalDigit , octalDigit) / (octalDigit , octalDigit optional) )
+!
+
+zeroToThree
+
+	^PPPredicateObjectParser anyOf: '0123'
+! !
+
+!PPJavaLexicon methodsFor:'grammar-literals-floating'!
+
+binaryExponent
+
+ ^ binaryExponentIndicator , signedInteger
+!
+
+binaryExponentIndicator
+
+  ^ PPPredicateObjectParser anyOf: 'pP'
+!
+
+decimalFloatingPointLiteral
+
+	|dot|
+	dot := $. asParser.
+
+ ^ ( ( (dot , digits) 
+        / 
+        (digits , dot , digits optional)) , 
+			exponentPart optional , floatTypeSuffix optional ) 
+  	/ 
+  	(digits , 
+		( (exponentPart , floatTypeSuffix optional) 
+		  /
+		  (exponentPart optional , floatTypeSuffix) ))
+!
+
+exponentIndicator
+
+  ^ PPPredicateObjectParser anyOf: 'eE'
+!
+
+exponentPart
+
+ ^ exponentIndicator , signedInteger
+!
+
+floatTypeSuffix
+
+	^ PPPredicateObjectParser anyOf: 'fFdD'
+!
+
+floatingPointLiteral
+
+  ^ (hexadecimalFloatingPointLiteral / decimalFloatingPointLiteral) javaToken
+!
+
+hexSignificand 
+	|dot|
+	dot := $. asParser.
+
+ ^  (hexNumeral , dot optional) /
+    ($0 asParser , (PPPredicateObjectParser anyOf: 'xX') , hexDigits optional , dot , hexDigits )
+!
+
+hexadecimalFloatingPointLiteral
+
+ ^ hexSignificand , binaryExponent , floatTypeSuffix optional
+!
+
+sign
+
+  ^PPPredicateObjectParser anyOf: '-+'
+!
+
+signedInteger
+
+  ^ sign optional , digits
+! !
+
+!PPJavaLexicon methodsFor:'grammar-literals-integer'!
+
+decimalIntegerLiteral
+
+ ^ decimalNumeral , (integerTypeSuffix optional)
+!
+
+decimalNumeral 
+
+	^($0 asParser) / (nonZeroDigit , digits optional) 
+!
+
+digits 
+	"digit is already defined, no need to redefine it"
+	^#digit asParser plus
+!
+
+hexDigits 
+
+	^hexDigit plus
+!
+
+hexIntegerLiteral 
+
+  ^ hexNumeral , (integerTypeSuffix optional)
+!
+
+hexNumeral 
+
+	^$0 asParser, (PPPredicateObjectParser anyOf: 'xX' ), hexDigits
+!
+
+integerLiteral
+
+  ^ (hexIntegerLiteral / octalIntegerLiteral / decimalIntegerLiteral) javaToken
+!
+
+integerTypeSuffix
+
+	^ PPPredicateObjectParser anyOf: 'lL'
+!
+
+nonZeroDigit 
+
+	^PPPredicateObjectParser anyOf: '123456789'.
+!
+
+octalDigit 
+
+	^PPPredicateObjectParser anyOf: '01234567'
+!
+
+octalDigits
+
+	^ octalDigit plus
+!
+
+octalIntegerLiteral 
+
+ ^ octalNumeral , (integerTypeSuffix optional)
+!
+
+octalNumeral 
+
+	^($0 asParser) , octalDigits
+! !
+
+!PPJavaLexicon methodsFor:'grammar-literals-null'!
+
+nullLiteral 
+
+ ^ nullToken
+! !
+
+!PPJavaLexicon methodsFor:'grammar-literals-string'!
+
+stringCharacter
+		
+	^ ( ( PPPredicateObjectParser anyOf: '"\') not , inputCharacter ==> #second ) /
+	   escapeSequence 
+!
+
+stringCharacters
+
+	^ stringCharacter plus
+!
+
+stringLiteral 
+
+ ^ ($" asParser , stringCharacters optional , $" asParser) javaToken
+! !
+
+!PPJavaLexicon methodsFor:'grammar-operators'!
+
+operator
+        | operatorParsers |
+        
+        operatorParsers := operators keys asSortedCollection collect: [:eachKey | operators at: eachKey ].                                                
+        ^self asToken:  (operatorParsers reduce: [ :a :b | a / b ])
+
+    "Modified: / 21-04-2015 / 15:26:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!PPJavaLexicon methodsFor:'grammar-separators'!
+
+separator	
+	^self asToken: (PPPredicateObjectParser anyOf: '(){}[];,.' )
+! !
+
+!PPJavaLexicon methodsFor:'grammar-unicode-escapes'!
+
+hexDigit 
+
+	^#hex asParser
+!
+
+rawInputCharacter
+
+	^#any asParser
+!
+
+unicodeEscape
+
+	^ $\ asParser , unicodeMarker , hexDigit , hexDigit , hexDigit , hexDigit
+!
+
+unicodeInputCharacter
+	 ^ unicodeEscape / rawInputCharacter
+!
+
+unicodeMarker
+
+	^$u asParser plus
+! !
+
+!PPJavaLexicon methodsFor:'grammar-whiteSpace'!
+
+whiteSpace
+
+	^ (Character space asParser ) /
+	  (Character tab asParser ) /
+	  ((Character value: 12) asParser ) /
+		lineTerminator 
+! !
+
+!PPJavaLexicon methodsFor:'initialization'!
+
+initialize
+
+	super initialize.
+	
+	self initializeKeywords.
+	self initializeOperators.
+	self initializeSeparators.
+!
+
+initializeKeywords
+
+	| values |
+	keywords := Dictionary new.
+	values := #('abstract' 'assert' 'boolean' 'break' 'byte' 'case'  'catch' 'char' 'class' 'const'
+	   'continue' 'default' 'do' 'double' 'else' 'enum' 'extends' 'final'  'finally' 'float'
+	   'for' 'if' 'goto' 'implements' 'import' 'instanceof' 'int' 'interface' 'long' 'native'
+	   'new' 'package' 'private' 'protected' 'public' 'return' 'short' 'static' 'strictfp' 'super'
+	   'switch' 'synchronized' 'this' 'throw' 'throws' 'transient' 'try' 'void' 'volatile' 'while').
+	
+	values do: [:eachKeyword |
+		keywords at: eachKeyword 
+			put: (PPUnresolvedParser named: ('keyword', eachKeyword first asUppercase asString , eachKeyword allButFirst))		
+		].
+	
+	keywords keysAndValuesDo:  [:key :value |
+		(keywords at: key) def: (key asParser ,  #word asParser not)]
+!
+
+initializeOperators
+
+	| values |
+	operators := Dictionary new.
+	values := #(	'>>>=' '>>>' '>>=' '>>' '>=' '>'	'<<=' '<<' '<=' '<'	'++' '+=' '+'	'--' '-=' '-'	'&&' '&=' '&'
+					'||' '|=' '|'	'*=' '*'	'%=' '%'	'/=' '/'	'^=' '^'	'!!=' '!!'	'==' '='	'~'	'?'	':'	'@' ).
+	" @ ? perhaps for annotation but not in the doc "
+	values do: [:eachOperator |
+		operators at: eachOperator 
+			put: (PPUnresolvedParser named: ('operator', eachOperator asString))		
+		].
+	
+	operators  keysAndValuesDo:  [:key :value |
+		(operators at: key) def: (key asParser)]
+!
+
+initializeSeparators
+
+	| values |
+	separators := Dictionary new.
+	values := #( '(' ')' '{' '}' '[' ']' ';' ',' '.' ).
+	
+	values do: [:eachSeparator |
+		separators at: eachSeparator 
+			put: (PPUnresolvedParser named: ('separator', eachSeparator asString))		
+		].
+	
+	separators  keysAndValuesDo:  [:key :value |
+		(separators at: key) def: (key asParser)]
+! !
+
+!PPJavaLexicon methodsFor:'utility'!
+
+asToken: aParser
+
+	^aParser javaToken
+!
+
+emptySquaredParenthesis
+
+	^ self asToken: (((self tokenFor: '['), (self tokenFor: ']')))
+!
+
+tokenFor: aString
+
+	^self asToken: (keywords at: aString 
+						ifAbsent: [separators at: aString 
+							ifAbsent: [operators at: aString] ])
+! !
+
+!PPJavaLexicon class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/parsers/java/PPJavaTokenParser.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/parsers/java/PPJavaTokenParser.st	Fri Jul 24 15:37:23 2015 +0100
@@ -12,29 +12,31 @@
 !PPJavaTokenParser methodsFor:'parsing'!
 
 parseComments: anArray on: aStream
-	
-	| start comments |
-	comments := anArray.
-	[ 
-		| peekTwice |
-	[ aStream atEnd not and: [ aStream peek isSeparator ] ]
-		whileTrue: [ aStream next ].
-	peekTwice := aStream peekTwice.	
-	  ((peekTwice  first = $/) and: 
-		[ (peekTwice second = $*) or: [peekTwice second = $/]])] whileTrue: [
-"		
-		Transcript show: ('position ', aStream position asString, ' char ', aStream next asString); cr.
-"		
-		aStream next.
-		start := aStream position.
-		(aStream next = $*) 
-			ifTrue: [ aStream upToAll: '*/' ]
-			ifFalse: [ 
-				| position |
-				position := aStream position.
-				aStream upToAnyOf: CharacterSet crlf].
-		comments := comments copyWith: (start to: aStream position) ].
-	^ comments
+        
+        | start comments |
+        comments := anArray.
+        [ 
+                | peekTwice |
+        [ aStream atEnd not and: [ aStream peek isSeparator ] ]
+                whileTrue: [ aStream next ].
+        peekTwice := aStream peekTwice. 
+          ((peekTwice  first = $/) and: 
+                [ (peekTwice second = $*) or: [peekTwice second = $/]])] whileTrue: [
+"               
+                Transcript show: ('position ', aStream position asString, ' char ', aStream next asString); cr.
+"               
+                aStream next.
+                start := aStream position.
+                (aStream next = $*) 
+                        ifTrue: [ aStream upToAll: '*/' ]
+                        ifFalse: [ 
+                                | position |
+                                position := aStream position.
+                                aStream upToAnyOf: (String with: (Character codePoint: 13) with: (Character codePoint: 10))].
+                comments := comments copyWith: (start to: aStream position) ].
+        ^ comments
+
+    "Modified: / 21-04-2015 / 17:23:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 parseOn: aPPContext
--- a/parsers/java/PPJavaWhitespaceParser.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/parsers/java/PPJavaWhitespaceParser.st	Fri Jul 24 15:37:23 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitJava-Core'
 !
 
+
 !PPJavaWhitespaceParser methodsFor:'as yet unclassified'!
 
 acceptsEpsilon
@@ -36,25 +37,27 @@
 !
 
 parseOn: context
-	
-	| start |
+        
+        | start |
 
-	[ 
-		| peekTwice |
-		[ context atEnd not and: [ context peek isSeparator ] ]
-			whileTrue: [ context next ].
-		peekTwice := context peekTwice.	
-	  	((peekTwice  first = $/) and: 
-		[ (peekTwice second = $*) or: [peekTwice second = $/]])
-	] whileTrue: [
-		context next.
-		start := context position.
-		(context next = $*) 
-			ifTrue: [ context upToAll: '*/' ]
-			ifFalse: [ 
-				| position |
-				position := context position.
-				context upToAnyOf: CharacterSet crlf].
-	 ].
+        [ 
+                | peekTwice |
+                [ context atEnd not and: [ context peek isSeparator ] ]
+                        whileTrue: [ context next ].
+                peekTwice := context peekTwice. 
+                ((peekTwice  first = $/) and: 
+                [ (peekTwice second = $*) or: [peekTwice second = $/]])
+        ] whileTrue: [
+                context next.
+                start := context position.
+                (context next = $*) 
+                        ifTrue: [ context upToAll: '*/' ]
+                        ifFalse: [ 
+                                | position |
+                                position := context position.
+                                context upToAnyOf: String crlf].
+         ].
+
+    "Modified: / 10-05-2015 / 07:57:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
--- a/parsers/java/abbrev.stc	Fri Jul 24 15:06:54 2015 +0100
+++ b/parsers/java/abbrev.stc	Fri Jul 24 15:37:23 2015 +0100
@@ -22,7 +22,6 @@
 PJTypeNode PJTypeNode stx:goodies/petitparser/parsers/java 'PetitJava-AST' 0
 PJVariableDeclaratorNode PJVariableDeclaratorNode stx:goodies/petitparser/parsers/java 'PetitJava-AST' 0
 PPJavaSyntax PPJavaSyntax stx:goodies/petitparser/parsers/java 'PetitJava-Core' 0
-PPJavaSyntaxTest PPJavaSyntaxTest stx:goodies/petitparser/parsers/java 'PetitJava-Tests' 1
 PJAbstractTypeDeclarationNode PJAbstractTypeDeclarationNode stx:goodies/petitparser/parsers/java 'PetitJava-AST' 0
 PJAnnotationNode PJAnnotationNode stx:goodies/petitparser/parsers/java 'PetitJava-AST' 0
 PJArrayTypeNode PJArrayTypeNode stx:goodies/petitparser/parsers/java 'PetitJava-AST' 0
@@ -45,7 +44,6 @@
 PJStringLiteralNode PJStringLiteralNode stx:goodies/petitparser/parsers/java 'PetitJava-AST' 0
 PJWhileStatementNode PJWhileStatementNode stx:goodies/petitparser/parsers/java 'PetitJava-AST' 0
 PPJavaParser PPJavaParser stx:goodies/petitparser/parsers/java 'PetitJava-Core' 0
-PPJavaParserTest PPJavaParserTest stx:goodies/petitparser/parsers/java 'PetitJava-Tests' 1
 PJConstructorDeclarationNode PJConstructorDeclarationNode stx:goodies/petitparser/parsers/java 'PetitJava-AST' 0
 PJEndOfLineCommentsNode PJEndOfLineCommentsNode stx:goodies/petitparser/parsers/java 'PetitJava-AST' 0
 PJMethodDeclarationNode PJMethodDeclarationNode stx:goodies/petitparser/parsers/java 'PetitJava-AST' 1
@@ -53,3 +51,5 @@
 PJSimpleNameNode PJSimpleNameNode stx:goodies/petitparser/parsers/java 'PetitJava-AST' 0
 PJTraditionalCommentsNode PJTraditionalCommentsNode stx:goodies/petitparser/parsers/java 'PetitJava-AST' 0
 PJTypeDeclarationNode PJTypeDeclarationNode stx:goodies/petitparser/parsers/java 'PetitJava-AST' 0
+PPJavaParserTest PPJavaParserTest stx:goodies/petitparser/parsers/java 'PetitJava-Tests' 1
+PPJavaSyntaxTest PPJavaSyntaxTest stx:goodies/petitparser/parsers/java 'PetitJava-Tests' 1
--- a/parsers/java/bc.mak	Fri Jul 24 15:06:54 2015 +0100
+++ b/parsers/java/bc.mak	Fri Jul 24 15:37:23 2015 +0100
@@ -35,7 +35,7 @@
 
 
 
-LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\petitparser -I$(INCLUDE_TOP)\stx\goodies\petitparser\tests -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libbasic2
+LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\petitparser -I$(INCLUDE_TOP)\stx\goodies\petitparser\tests -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic
 LOCALDEFINES=
 
 STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES)  -varPrefix=$(LIBNAME)
--- a/parsers/java/extensions.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/parsers/java/extensions.st	Fri Jul 24 15:37:23 2015 +0100
@@ -11,10 +11,14 @@
 				ifFalse: [ aString ]])
 ! !
 
-!PPParser methodsFor:'*petitjava-operations'!
+!PPParser methodsFor:'*petitcompiler'!
 
 javaToken
-	^ PPJavaTokenParser on: self
+    | ws |
+    ws := PPJavaWhitespaceParser new.
+    ^ ((ws, ((PPTokenParser on: self) tokenClass: PPJavaToken; yourself), ws) ==> #second)
+        propertyAt: #'trimmingToken' put: true;
+        yourself
 ! !
 
 !stx_goodies_petitparser_parsers_java class methodsFor:'documentation'!
--- a/parsers/java/stx_goodies_petitparser_parsers_java.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/parsers/java/stx_goodies_petitparser_parsers_java.st	Fri Jul 24 15:37:23 2015 +0100
@@ -73,7 +73,6 @@
      by searching all classes (and their packages) which are referenced by my classes."
 
     ^ #(
-        #'stx:libbasic2'    "CharacterSet - referenced by PPJavaTokenParser>>parseComments:on:"
     )
 !
 
@@ -126,7 +125,6 @@
         PJTypeNode
         PJVariableDeclaratorNode
         PPJavaSyntax
-        (PPJavaSyntaxTest autoload)
         PJAbstractTypeDeclarationNode
         PJAnnotationNode
         PJArrayTypeNode
@@ -149,7 +147,6 @@
         PJStringLiteralNode
         PJWhileStatementNode
         PPJavaParser
-        (PPJavaParserTest autoload)
         PJConstructorDeclarationNode
         PJEndOfLineCommentsNode
         PJMethodDeclarationNode
@@ -157,6 +154,8 @@
         PJSimpleNameNode
         PJTraditionalCommentsNode
         PJTypeDeclarationNode
+        (PPJavaParserTest autoload)
+        (PPJavaSyntaxTest autoload)
     )
 !
 
--- a/stx_goodies_petitparser.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/stx_goodies_petitparser.st	Fri Jul 24 15:37:23 2015 +0100
@@ -62,7 +62,14 @@
      preRequisites scan. See #preRequisites for more."
 
     ^ #(
+        #'stx:goodies/monticello'    "MCDirectoryRepository - referenced by stx_goodies_petitparser class>>monticelloExportTo:"
+        #'stx:libscm/mercurial'    "HGPackageWorkingCopy - referenced by stx_goodies_petitparser class>>monticelloExportTo:"
+        #'stx:libscm/mercurial/monticello'    "HGMCVersionInfo - referenced by stx_goodies_petitparser class>>monticelloExportTo:"
+        #'stx:libwidg'    "ScrollableView - referenced by PPParser>>inspector2TabTree"
+        #'stx:libwidg2'    "HierarchicalListView - referenced by PPParser>>inspector2TabTree"            
     )
+
+    "Modified: / 03-06-2015 / 08:47:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 mandatoryPreRequisites
@@ -90,8 +97,6 @@
      by searching all classes (and their packages) which are referenced by my classes."
 
     ^ #(
-        #'stx:goodies/monticello'    "MCDirectoryRepository - referenced by stx_goodies_petitparser class>>exportAsMczTo:"
-        #'stx:libscm/mercurial/monticello'    "HGMCVersionInfo - referenced by stx_goodies_petitparser class>>exportAsMczTo:"
     )
 !
 
@@ -112,7 +117,10 @@
     ^ #(
         #'stx:goodies/petitparser/analyzer'
         #'stx:goodies/petitparser/tests'
-    )
+        #'stx:goodies/petitparser/parsers/smalltalk'
+        #'stx:goodies/petitparser/parsers/java'
+        #'stx:goodies/petitparser/compiler'
+)
 ! !
 
 !stx_goodies_petitparser class methodsFor:'description - compilation'!
@@ -129,7 +137,8 @@
 		Class tryLocalSourceFirst: true.				\
 		Smalltalk packagePath add:''$(TOP)/..'' .                       \
 		Smalltalk loadPackage:''stx:goodies/petitparser''.              \
-		(Smalltalk at: #''stx_goodies_petitparser'') exportAsMczTo: ''mc''."
+		(Smalltalk at: #''stx_goodies_petitparser'') monticelloExportTo: ''mc''.\
+		Smalltalk exit: 0."
 
 '
 
@@ -286,40 +295,66 @@
 
 !stx_goodies_petitparser class methodsFor:'utilities - monticello'!
 
-exportAsMczTo: directory
+monticelloExportTo: directory
     "Export .mcz packages to given directory"
 
-    | packages exporter mcrepo |
+    | packages message exporter mcrepo hgrev hgrepo |
 
     Smalltalk loadPackage: 'stx:goodies/monticello'.
     Smalltalk loadPackage: 'stx:libscm/mercurial/monticello'.
     Class tryLocalSourceFirst: true.
 
-
-   packages := #(
+    packages := #(
         'stx:goodies/petitparser'
         'stx:goodies/petitparser/tests'
         'stx:goodies/petitparser/analyzer'
         'stx:goodies/petitparser/analyzer/tests'
+
         'stx:goodies/petitparser/parsers/smalltalk'
         'stx:goodies/petitparser/parsers/smalltalk/tests'
+        'stx:goodies/petitparser/parsers/java'
+
         'stx:goodies/petitparser/compiler'
         'stx:goodies/petitparser/compiler/tests'
+        'stx:goodies/petitparser/compiler/tests/extras'
         'stx:goodies/petitparser/compiler/benchmarks'
     ).
 
+    packages do:[:pkgnm |
+        Smalltalk loadPackage: pkgnm. 
+    ].
+
+    packages do:[:pkgnm | 
+        | pm cs |
+
+        pm := HGPackageWorkingCopy named: pkgnm.
+        hgrepo isNil ifTrue:[
+            hgrepo := pm repository.
+        ].
+        hgrev isNil ifTrue:[ 
+            hgrev := pm revision.
+        ] ifFalse:[ 
+            hgrev = pm revision ifFalse:[ 
+                self error: 'Package revisions differ!!'
+            ].
+        ].
+    ].
+
+    message := (hgrepo @ hgrev) messageDigest.
+
     exporter := [:pkgnm|
         | mcpkg mcwc mcvi mcversion |
 
         Stdout nextPutAll: 'Exporting '; nextPutLine: pkgnm.
-        Smalltalk loadPackage: pkgnm.
         mcpkg := MCPackage named: pkgnm.
         mcwc := mcpkg workingCopy.
         mcvi := HGMCVersionInfo forPackage: pkgnm.
+        mcvi message: message.
         [
-           mcversion := mcwc newVersion
+           mcversion := mcwc newVersion.
+           mcversion snapshot includeExtrasForSTX: false.
         ] on: MCVersionNameAndMessageRequest do:[:ex |
-            ex resume: (Array with: mcvi name with: mcvi message)
+            ex resume: (Array with: mcvi name with: message)
         ].
         mcversion info: mcvi.
         mcrepo storeVersion: mcversion.
@@ -329,10 +364,11 @@
     packages do: exporter.
 
     "
-    stx_goodies_petitparser exportAsMczTo: '/tmp'
+    stx_goodies_petitparser monticelloExportTo: '/tmp'
     "
 
     "Created: / 04-10-2014 / 21:30:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-06-2015 / 08:06:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !stx_goodies_petitparser class methodsFor:'documentation'!
--- a/tests/PPArithmeticParserTest.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/tests/PPArithmeticParserTest.st	Fri Jul 24 15:37:23 2015 +0100
@@ -1,5 +1,7 @@
 "{ Package: 'stx:goodies/petitparser/tests' }"
 
+"{ NameSpace: Smalltalk }"
+
 PPCompositeParserTest subclass:#PPArithmeticParserTest
 	instanceVariableNames:''
 	classVariableNames:''
--- a/tests/PPCompositeParserTest.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/tests/PPCompositeParserTest.st	Fri Jul 24 15:37:23 2015 +0100
@@ -1,5 +1,7 @@
 "{ Package: 'stx:goodies/petitparser/tests' }"
 
+"{ NameSpace: Smalltalk }"
+
 PPAbstractParserTest subclass:#PPCompositeParserTest
 	instanceVariableNames:'parser result'
 	classVariableNames:''
--- a/tests/PPExpressionParserTest.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/tests/PPExpressionParserTest.st	Fri Jul 24 15:37:23 2015 +0100
@@ -1,5 +1,7 @@
 "{ Package: 'stx:goodies/petitparser/tests' }"
 
+"{ NameSpace: Smalltalk }"
+
 PPArithmeticParserTest subclass:#PPExpressionParserTest
 	instanceVariableNames:''
 	classVariableNames:''
--- a/tests/PPExtensionTest.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/tests/PPExtensionTest.st	Fri Jul 24 15:37:23 2015 +0100
@@ -112,16 +112,18 @@
 !PPExtensionTest methodsFor:'testing-stream'!
 
 testStream
-	| dot stream |
-	dot := (Character codePoint: 183) asString.
-	stream := 'abc' readStream asPetitStream.
-	self assert: stream class equals: PPStream.
-	self assert: stream printString equals: dot , 'abc'.
-	self assert: stream peek equals: $a.
-	self assert: stream uncheckedPeek equals: $a.
-	self assert: stream next equals: $a.
-	self assert: stream printString equals: 'a' , dot , 'bc'.
-	self assert: stream asPetitStream equals: stream
+        | dot stream |
+        dot := String with: (Character codePoint: 183).
+        stream := 'abc' readStream asPetitStream.
+        self assert: stream class equals: PPStream.
+        self assert: stream printString equals: dot , 'abc'.
+        self assert: stream peek equals: $a.
+        self assert: stream uncheckedPeek equals: $a.
+        self assert: stream next equals: $a.
+        self assert: stream printString equals: 'a' , dot , 'bc'.
+        self assert: stream asPetitStream equals: stream
+
+    "Modified: / 02-06-2015 / 17:22:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 testText
--- a/tests/PPLambdaParserTest.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/tests/PPLambdaParserTest.st	Fri Jul 24 15:37:23 2015 +0100
@@ -1,5 +1,7 @@
 "{ Package: 'stx:goodies/petitparser/tests' }"
 
+"{ NameSpace: Smalltalk }"
+
 PPCompositeParserTest subclass:#PPLambdaParserTest
 	instanceVariableNames:''
 	classVariableNames:''
--- a/tests/PPParserResource.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/tests/PPParserResource.st	Fri Jul 24 15:37:23 2015 +0100
@@ -1,5 +1,7 @@
 "{ Package: 'stx:goodies/petitparser/tests' }"
 
+"{ NameSpace: Smalltalk }"
+
 TestResource subclass:#PPParserResource
 	instanceVariableNames:'parsers'
 	classVariableNames:''
--- a/tests/PPScriptingTest.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/tests/PPScriptingTest.st	Fri Jul 24 15:37:23 2015 +0100
@@ -1,5 +1,7 @@
 "{ Package: 'stx:goodies/petitparser/tests' }"
 
+"{ NameSpace: Smalltalk }"
+
 PPAbstractParserTest subclass:#PPScriptingTest
 	instanceVariableNames:''
 	classVariableNames:''
--- a/vcmake.bat	Fri Jul 24 15:06:54 2015 +0100
+++ b/vcmake.bat	Fri Jul 24 15:37:23 2015 +0100
@@ -28,4 +28,25 @@
 @call vcmake %1 %2 || exit /b "%errorlevel%"
 @popd
 
+@echo "***********************************"
+@echo "Buildung stx/goodies/petitparser/parsers/smalltalk
+@echo "***********************************"
+@pushd parsers\smalltalk
+@call vcmake %1 %2 || exit /b "%errorlevel%"
+@popd
 
+@echo "***********************************"
+@echo "Buildung stx/goodies/petitparser/parsers/java
+@echo "***********************************"
+@pushd parsers\java
+@call vcmake %1 %2 || exit /b "%errorlevel%"
+@popd
+
+@echo "***********************************"
+@echo "Buildung stx/goodies/petitparser/compiler
+@echo "***********************************"
+@pushd compiler
+@call vcmake %1 %2 || exit /b "%errorlevel%"
+@popd
+
+