Merge
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sun, 10 May 2015 06:46:56 +0100
changeset 453 bd5107faf4d6
parent 451 989570319d14 (current diff)
parent 452 9f4558b3be66 (diff)
child 454 a9cd5ea7cc36
Merge
compiler/PPCCodeGenerator.st
compiler/PPCCompiler.st
compiler/PPCFirstPrototype.st
compiler/PPCLLChoiceNode.st
compiler/PPCMethod.st
compiler/PPCOptimizingVisitor.st
compiler/PPCTokenSequenceNode.st
compiler/benchmarks/PPCBenchmarkResources.st
compiler/tests/PPCInliningVisitorTest.st
compiler/tests/PPCNodeCompilingTest.st
compiler/tests/PPCNodeTest.st
compiler/tests/PPCOptimizingTest.st
compiler/tests/PPCOptimizingVisitorTest.st
compiler/tests/PPCProtype1Test.st
compiler/tests/PPCTokenVisitorTest.st
compiler/tests/PPCVerificationTest.st
compiler/tests/PPCompiledExpressionGrammarResource.st
compiler/tests/PPCompiledJavaResource.st
compiler/tests/PPCompiledJavaSyntaxTest.st
compiler/tests/PPCompiledSmalltalkGrammarResource.st
compiler/tests/PPCompiledSmalltalkGrammarTests.st
--- a/compiler/Make.proto	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/Make.proto	Sun May 10 06:46:56 2015 +0100
@@ -135,6 +135,8 @@
 $(OUTDIR)PPCBridge.$(O) PPCBridge.$(H): PPCBridge.st $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCCompiledMethod.$(O) PPCCompiledMethod.$(H): PPCCompiledMethod.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCCompiler.$(O) PPCCompiler.$(H): PPCCompiler.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCCompilerTokenRememberStrategy.$(O) PPCCompilerTokenRememberStrategy.$(H): PPCCompilerTokenRememberStrategy.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCCompilerTokenizingRememberStrategy.$(O) PPCCompilerTokenizingRememberStrategy.$(H): PPCCompilerTokenizingRememberStrategy.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCConfiguration.$(O) PPCConfiguration.$(H): PPCConfiguration.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCContext.$(O) PPCContext.$(H): PPCContext.st $(INCLUDE_TOP)/stx/goodies/petitparser/PPStream.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/PeekableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/PositionableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/ReadStream.$(H) $(INCLUDE_TOP)/stx/libbasic/Stream.$(H) $(STCHDR)
 $(OUTDIR)PPCContextMemento.$(O) PPCContextMemento.$(H): PPCContextMemento.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
@@ -142,6 +144,7 @@
 $(OUTDIR)PPCMethod.$(O) PPCMethod.$(H): PPCMethod.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCNode.$(O) PPCNode.$(H): PPCNode.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCNodeVisitor.$(O) PPCNodeVisitor.$(H): PPCNodeVisitor.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCPluggableConfiguration.$(O) PPCPluggableConfiguration.$(H): PPCPluggableConfiguration.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCompiledParser.$(O) PPCompiledParser.$(H): PPCompiledParser.st $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)stx_goodies_petitparser_compiler.$(O) stx_goodies_petitparser_compiler.$(H): stx_goodies_petitparser_compiler.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
 $(OUTDIR)PPCAbstractCharacterNode.$(O) PPCAbstractCharacterNode.$(H): PPCAbstractCharacterNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
@@ -151,23 +154,27 @@
 $(OUTDIR)PPCCodeGenerator.$(O) PPCCodeGenerator.$(H): PPCCodeGenerator.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNodeVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCDelegateNode.$(O) PPCDelegateNode.$(H): PPCDelegateNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCEndOfFileNode.$(O) PPCEndOfFileNode.$(H): PPCEndOfFileNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)PPCFirstPrototype.$(O) PPCFirstPrototype.$(H): PPCFirstPrototype.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCConfiguration.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCInlinedMethod.$(O) PPCInlinedMethod.$(H): PPCInlinedMethod.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCMethod.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCInliningVisitor.$(O) PPCInliningVisitor.$(H): PPCInliningVisitor.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNodeVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCLL1Configuration.$(O) PPCLL1Configuration.$(H): PPCLL1Configuration.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCConfiguration.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCListNode.$(O) PPCListNode.$(H): PPCListNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCNilNode.$(O) PPCNilNode.$(H): PPCNilNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)PPCPluggableConfiguration.$(O) PPCPluggableConfiguration.$(H): PPCPluggableConfiguration.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCConfiguration.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCPluggableNode.$(O) PPCPluggableNode.$(H): PPCPluggableNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCProfilingContext.$(O) PPCProfilingContext.$(H): PPCProfilingContext.st $(INCLUDE_TOP)/stx/goodies/petitparser/PPStream.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCContext.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/PeekableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/PositionableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/ReadStream.$(H) $(INCLUDE_TOP)/stx/libbasic/Stream.$(H) $(STCHDR)
 $(OUTDIR)PPCRewritingVisitor.$(O) PPCRewritingVisitor.$(H): PPCRewritingVisitor.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNodeVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCTokenizingCompiler.$(O) PPCTokenizingCompiler.$(H): PPCTokenizingCompiler.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCCompiler.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCUniversalConfiguration.$(O) PPCUniversalConfiguration.$(H): PPCUniversalConfiguration.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCConfiguration.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCUnknownNode.$(O) PPCUnknownNode.$(H): PPCUnknownNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizingCompiledParser.$(O) PPTokenizingCompiledParser.$(H): PPTokenizingCompiledParser.st $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCompiledParser.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCAbstractActionNode.$(O) PPCAbstractActionNode.$(H): PPCAbstractActionNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCAndNode.$(O) PPCAndNode.$(H): PPCAndNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCCharSetPredicateNode.$(O) PPCCharSetPredicateNode.$(H): PPCCharSetPredicateNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCAbstractPredicateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCCharacterNode.$(O) PPCCharacterNode.$(H): PPCCharacterNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCAbstractCharacterNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCChoiceNode.$(O) PPCChoiceNode.$(H): PPCChoiceNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCListNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCCopyVisitor.$(O) PPCCopyVisitor.$(H): PPCCopyVisitor.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCRewritingVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCEndOfInputNode.$(O) PPCEndOfInputNode.$(H): PPCEndOfInputNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCForwardNode.$(O) PPCForwardNode.$(H): PPCForwardNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCLL1Visitor.$(O) PPCLL1Visitor.$(H): PPCLL1Visitor.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCRewritingVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCLiteralNode.$(O) PPCLiteralNode.$(H): PPCLiteralNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCAbstractLiteralNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCMergingVisitor.$(O) PPCMergingVisitor.$(H): PPCMergingVisitor.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCRewritingVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCMessagePredicateNode.$(O) PPCMessagePredicateNode.$(H): PPCMessagePredicateNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCAbstractPredicateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
@@ -176,30 +183,37 @@
 $(OUTDIR)PPCNotLiteralNode.$(O) PPCNotLiteralNode.$(H): PPCNotLiteralNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCAbstractLiteralNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCNotMessagePredicateNode.$(O) PPCNotMessagePredicateNode.$(H): PPCNotMessagePredicateNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCAbstractPredicateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCNotNode.$(O) PPCNotNode.$(H): PPCNotNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)PPCOptimizingVisitor.$(O) PPCOptimizingVisitor.$(H): PPCOptimizingVisitor.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCRewritingVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCOptimizeChoices.$(O) PPCOptimizeChoices.$(H): PPCOptimizeChoices.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCRewritingVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCOptionalNode.$(O) PPCOptionalNode.$(H): PPCOptionalNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCPlusNode.$(O) PPCPlusNode.$(H): PPCPlusNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCPredicateNode.$(O) PPCPredicateNode.$(H): PPCPredicateNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCAbstractPredicateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCRecognizerComponentDetector.$(O) PPCRecognizerComponentDetector.$(H): PPCRecognizerComponentDetector.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCRewritingVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCRecognizerComponentVisitor.$(O) PPCRecognizerComponentVisitor.$(H): PPCRecognizerComponentVisitor.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCRewritingVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCSentinelNode.$(O) PPCSentinelNode.$(H): PPCSentinelNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNilNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCSequenceNode.$(O) PPCSequenceNode.$(H): PPCSequenceNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCListNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCSpecializingVisitor.$(O) PPCSpecializingVisitor.$(H): PPCSpecializingVisitor.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCRewritingVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCStarNode.$(O) PPCStarNode.$(H): PPCStarNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTokenConsumeNode.$(O) PPCTokenConsumeNode.$(H): PPCTokenConsumeNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTokenDetector.$(O) PPCTokenDetector.$(H): PPCTokenDetector.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCRewritingVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTokenNode.$(O) PPCTokenNode.$(H): PPCTokenNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTokenVisitor.$(O) PPCTokenVisitor.$(H): PPCTokenVisitor.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCRewritingVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCTokenWhitespaceNode.$(O) PPCTokenWhitespaceNode.$(H): PPCTokenWhitespaceNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTokenizingCodeGenerator.$(O) PPCTokenizingCodeGenerator.$(H): PPCTokenizingCodeGenerator.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCCodeGenerator.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNodeVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)PPCTrimNode.$(O) PPCTrimNode.$(H): PPCTrimNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCTokenizingParserNode.$(O) PPCTokenizingParserNode.$(H): PPCTokenizingParserNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCListNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCTokenizingVisitor.$(O) PPCTokenizingVisitor.$(H): PPCTokenizingVisitor.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCRewritingVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTrimmingTokenNode.$(O) PPCTrimmingTokenNode.$(H): PPCTrimmingTokenNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCListNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCActionNode.$(O) PPCActionNode.$(H): PPCActionNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCAbstractActionNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)PPCLLChoiceNode.$(O) PPCLLChoiceNode.$(H): PPCLLChoiceNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCChoiceNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCListNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCDeterministicChoiceNode.$(O) PPCDeterministicChoiceNode.$(H): PPCDeterministicChoiceNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCChoiceNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCListNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCRecognizingSequenceNode.$(O) PPCRecognizingSequenceNode.$(H): PPCRecognizingSequenceNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCListNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCSequenceNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCStarAnyNode.$(O) PPCStarAnyNode.$(H): PPCStarAnyNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCStarNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCStarCharSetPredicateNode.$(O) PPCStarCharSetPredicateNode.$(H): PPCStarCharSetPredicateNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCStarNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCStarMessagePredicateNode.$(O) PPCStarMessagePredicateNode.$(H): PPCStarMessagePredicateNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCStarNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCSymbolActionNode.$(O) PPCSymbolActionNode.$(H): PPCSymbolActionNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCAbstractActionNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)PPCTokenSequenceNode.$(O) PPCTokenSequenceNode.$(H): PPCTokenSequenceNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCListNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCSequenceNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCTokenChoiceNode.$(O) PPCTokenChoiceNode.$(H): PPCTokenChoiceNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCChoiceNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCListNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)PPCTrimNode.$(O) PPCTrimNode.$(H): PPCTrimNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCListNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCSequenceNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTokenStarMessagePredicateNode.$(O) PPCTokenStarMessagePredicateNode.$(H): PPCTokenStarMessagePredicateNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCStarMessagePredicateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCStarNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTokenStarSeparatorNode.$(O) PPCTokenStarSeparatorNode.$(H): PPCTokenStarSeparatorNode.st $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCDelegateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCStarMessagePredicateNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCStarNode.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/compiler/PPCTokenStarMessagePredicateNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/stx/goodies/petitparser/PPActionParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPAndParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPCharSetPredicate.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPChoiceParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPCompositeParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPContext.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPDelegateParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPEpsilonParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPFailure.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPFlattenParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPListParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPLiteralObjectParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPLiteralParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPLiteralSequenceParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPNotParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPOptionalParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPPluggableParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPPossessiveRepeatingParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPPredicateObjectParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPPredicateParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPRepeatingParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPSequenceParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPStream.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPToken.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPTokenParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPTrimmingParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/parsers/java/PPJavaWhitespaceParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/parsers/smalltalk/PPSmalltalkGrammar.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/parsers/smalltalk/PPSmalltalkTokenParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/parsers/smalltalk/PPSmalltalkWhitespaceParser.$(H) $(INCLUDE_TOP)/stx/libbasic/Character.$(H) $(INCLUDE_TOP)/stx/libbasic/Magnitude.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/PeekableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/PositionableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/ReadStream.$(H) $(INCLUDE_TOP)/stx/libbasic/Stream.$(H) $(INCLUDE_TOP)/stx/libbasic/UndefinedObject.$(H) $(STCHDR)
+$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/stx/goodies/petitparser/PPActionParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPAndParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPCharSetPredicate.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPChoiceParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPCompositeParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPContext.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPDelegateParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPEndOfInputParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPEpsilonParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPFailure.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPFlattenParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPListParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPLiteralObjectParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPLiteralParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPLiteralSequenceParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPNotParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPOptionalParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPPluggableParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPPossessiveRepeatingParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPPredicateObjectParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPPredicateParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPRepeatingParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPSequenceParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPStream.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPToken.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPTokenParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPTrimmingParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/parsers/java/PPJavaWhitespaceParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/parsers/smalltalk/PPSmalltalkGrammar.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/parsers/smalltalk/PPSmalltalkTokenParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/parsers/smalltalk/PPSmalltalkWhitespaceParser.$(H) $(INCLUDE_TOP)/stx/libbasic/Character.$(H) $(INCLUDE_TOP)/stx/libbasic/Magnitude.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/PeekableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/PositionableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/ReadStream.$(H) $(INCLUDE_TOP)/stx/libbasic/Stream.$(H) $(INCLUDE_TOP)/stx/libbasic/UndefinedObject.$(H) $(STCHDR)
 
 # ENDMAKEDEPEND --- do not remove this line
 
--- a/compiler/Make.spec	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/Make.spec	Sun May 10 06:46:56 2015 +0100
@@ -55,6 +55,8 @@
 	PPCBridge \
 	PPCCompiledMethod \
 	PPCCompiler \
+	PPCCompilerTokenRememberStrategy \
+	PPCCompilerTokenizingRememberStrategy \
 	PPCConfiguration \
 	PPCContext \
 	PPCContextMemento \
@@ -62,6 +64,7 @@
 	PPCMethod \
 	PPCNode \
 	PPCNodeVisitor \
+	PPCPluggableConfiguration \
 	PPCompiledParser \
 	stx_goodies_petitparser_compiler \
 	PPCAbstractCharacterNode \
@@ -71,23 +74,27 @@
 	PPCCodeGenerator \
 	PPCDelegateNode \
 	PPCEndOfFileNode \
-	PPCFirstPrototype \
 	PPCInlinedMethod \
 	PPCInliningVisitor \
+	PPCLL1Configuration \
 	PPCListNode \
 	PPCNilNode \
-	PPCPluggableConfiguration \
 	PPCPluggableNode \
 	PPCProfilingContext \
 	PPCRewritingVisitor \
+	PPCTokenizingCompiler \
+	PPCUniversalConfiguration \
 	PPCUnknownNode \
+	PPTokenizingCompiledParser \
 	PPCAbstractActionNode \
 	PPCAndNode \
 	PPCCharSetPredicateNode \
 	PPCCharacterNode \
 	PPCChoiceNode \
 	PPCCopyVisitor \
+	PPCEndOfInputNode \
 	PPCForwardNode \
+	PPCLL1Visitor \
 	PPCLiteralNode \
 	PPCMergingVisitor \
 	PPCMessagePredicateNode \
@@ -96,27 +103,34 @@
 	PPCNotLiteralNode \
 	PPCNotMessagePredicateNode \
 	PPCNotNode \
-	PPCOptimizingVisitor \
+	PPCOptimizeChoices \
 	PPCOptionalNode \
 	PPCPlusNode \
 	PPCPredicateNode \
+	PPCRecognizerComponentDetector \
+	PPCRecognizerComponentVisitor \
 	PPCSentinelNode \
 	PPCSequenceNode \
+	PPCSpecializingVisitor \
 	PPCStarNode \
 	PPCTokenConsumeNode \
 	PPCTokenDetector \
 	PPCTokenNode \
 	PPCTokenVisitor \
+	PPCTokenWhitespaceNode \
 	PPCTokenizingCodeGenerator \
-	PPCTrimNode \
+	PPCTokenizingParserNode \
+	PPCTokenizingVisitor \
 	PPCTrimmingTokenNode \
 	PPCActionNode \
-	PPCLLChoiceNode \
+	PPCDeterministicChoiceNode \
+	PPCRecognizingSequenceNode \
 	PPCStarAnyNode \
 	PPCStarCharSetPredicateNode \
 	PPCStarMessagePredicateNode \
 	PPCSymbolActionNode \
-	PPCTokenSequenceNode \
+	PPCTokenChoiceNode \
+	PPCTrimNode \
 	PPCTokenStarMessagePredicateNode \
 	PPCTokenStarSeparatorNode \
 
@@ -128,6 +142,8 @@
     $(OUTDIR_SLASH)PPCBridge.$(O) \
     $(OUTDIR_SLASH)PPCCompiledMethod.$(O) \
     $(OUTDIR_SLASH)PPCCompiler.$(O) \
+    $(OUTDIR_SLASH)PPCCompilerTokenRememberStrategy.$(O) \
+    $(OUTDIR_SLASH)PPCCompilerTokenizingRememberStrategy.$(O) \
     $(OUTDIR_SLASH)PPCConfiguration.$(O) \
     $(OUTDIR_SLASH)PPCContext.$(O) \
     $(OUTDIR_SLASH)PPCContextMemento.$(O) \
@@ -135,6 +151,7 @@
     $(OUTDIR_SLASH)PPCMethod.$(O) \
     $(OUTDIR_SLASH)PPCNode.$(O) \
     $(OUTDIR_SLASH)PPCNodeVisitor.$(O) \
+    $(OUTDIR_SLASH)PPCPluggableConfiguration.$(O) \
     $(OUTDIR_SLASH)PPCompiledParser.$(O) \
     $(OUTDIR_SLASH)stx_goodies_petitparser_compiler.$(O) \
     $(OUTDIR_SLASH)PPCAbstractCharacterNode.$(O) \
@@ -144,23 +161,27 @@
     $(OUTDIR_SLASH)PPCCodeGenerator.$(O) \
     $(OUTDIR_SLASH)PPCDelegateNode.$(O) \
     $(OUTDIR_SLASH)PPCEndOfFileNode.$(O) \
-    $(OUTDIR_SLASH)PPCFirstPrototype.$(O) \
     $(OUTDIR_SLASH)PPCInlinedMethod.$(O) \
     $(OUTDIR_SLASH)PPCInliningVisitor.$(O) \
+    $(OUTDIR_SLASH)PPCLL1Configuration.$(O) \
     $(OUTDIR_SLASH)PPCListNode.$(O) \
     $(OUTDIR_SLASH)PPCNilNode.$(O) \
-    $(OUTDIR_SLASH)PPCPluggableConfiguration.$(O) \
     $(OUTDIR_SLASH)PPCPluggableNode.$(O) \
     $(OUTDIR_SLASH)PPCProfilingContext.$(O) \
     $(OUTDIR_SLASH)PPCRewritingVisitor.$(O) \
+    $(OUTDIR_SLASH)PPCTokenizingCompiler.$(O) \
+    $(OUTDIR_SLASH)PPCUniversalConfiguration.$(O) \
     $(OUTDIR_SLASH)PPCUnknownNode.$(O) \
+    $(OUTDIR_SLASH)PPTokenizingCompiledParser.$(O) \
     $(OUTDIR_SLASH)PPCAbstractActionNode.$(O) \
     $(OUTDIR_SLASH)PPCAndNode.$(O) \
     $(OUTDIR_SLASH)PPCCharSetPredicateNode.$(O) \
     $(OUTDIR_SLASH)PPCCharacterNode.$(O) \
     $(OUTDIR_SLASH)PPCChoiceNode.$(O) \
     $(OUTDIR_SLASH)PPCCopyVisitor.$(O) \
+    $(OUTDIR_SLASH)PPCEndOfInputNode.$(O) \
     $(OUTDIR_SLASH)PPCForwardNode.$(O) \
+    $(OUTDIR_SLASH)PPCLL1Visitor.$(O) \
     $(OUTDIR_SLASH)PPCLiteralNode.$(O) \
     $(OUTDIR_SLASH)PPCMergingVisitor.$(O) \
     $(OUTDIR_SLASH)PPCMessagePredicateNode.$(O) \
@@ -169,27 +190,34 @@
     $(OUTDIR_SLASH)PPCNotLiteralNode.$(O) \
     $(OUTDIR_SLASH)PPCNotMessagePredicateNode.$(O) \
     $(OUTDIR_SLASH)PPCNotNode.$(O) \
-    $(OUTDIR_SLASH)PPCOptimizingVisitor.$(O) \
+    $(OUTDIR_SLASH)PPCOptimizeChoices.$(O) \
     $(OUTDIR_SLASH)PPCOptionalNode.$(O) \
     $(OUTDIR_SLASH)PPCPlusNode.$(O) \
     $(OUTDIR_SLASH)PPCPredicateNode.$(O) \
+    $(OUTDIR_SLASH)PPCRecognizerComponentDetector.$(O) \
+    $(OUTDIR_SLASH)PPCRecognizerComponentVisitor.$(O) \
     $(OUTDIR_SLASH)PPCSentinelNode.$(O) \
     $(OUTDIR_SLASH)PPCSequenceNode.$(O) \
+    $(OUTDIR_SLASH)PPCSpecializingVisitor.$(O) \
     $(OUTDIR_SLASH)PPCStarNode.$(O) \
     $(OUTDIR_SLASH)PPCTokenConsumeNode.$(O) \
     $(OUTDIR_SLASH)PPCTokenDetector.$(O) \
     $(OUTDIR_SLASH)PPCTokenNode.$(O) \
     $(OUTDIR_SLASH)PPCTokenVisitor.$(O) \
+    $(OUTDIR_SLASH)PPCTokenWhitespaceNode.$(O) \
     $(OUTDIR_SLASH)PPCTokenizingCodeGenerator.$(O) \
-    $(OUTDIR_SLASH)PPCTrimNode.$(O) \
+    $(OUTDIR_SLASH)PPCTokenizingParserNode.$(O) \
+    $(OUTDIR_SLASH)PPCTokenizingVisitor.$(O) \
     $(OUTDIR_SLASH)PPCTrimmingTokenNode.$(O) \
     $(OUTDIR_SLASH)PPCActionNode.$(O) \
-    $(OUTDIR_SLASH)PPCLLChoiceNode.$(O) \
+    $(OUTDIR_SLASH)PPCDeterministicChoiceNode.$(O) \
+    $(OUTDIR_SLASH)PPCRecognizingSequenceNode.$(O) \
     $(OUTDIR_SLASH)PPCStarAnyNode.$(O) \
     $(OUTDIR_SLASH)PPCStarCharSetPredicateNode.$(O) \
     $(OUTDIR_SLASH)PPCStarMessagePredicateNode.$(O) \
     $(OUTDIR_SLASH)PPCSymbolActionNode.$(O) \
-    $(OUTDIR_SLASH)PPCTokenSequenceNode.$(O) \
+    $(OUTDIR_SLASH)PPCTokenChoiceNode.$(O) \
+    $(OUTDIR_SLASH)PPCTrimNode.$(O) \
     $(OUTDIR_SLASH)PPCTokenStarMessagePredicateNode.$(O) \
     $(OUTDIR_SLASH)PPCTokenStarSeparatorNode.$(O) \
     $(OUTDIR_SLASH)extensions.$(O) \
--- a/compiler/PPCAbstractActionNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCAbstractActionNode.st	Sun May 10 06:46:56 2015 +0100
@@ -13,28 +13,28 @@
 !PPCAbstractActionNode methodsFor:'accessing'!
 
 block
-	
-	^ block
+    
+    ^ block
 !
 
 block: anObject
-	
-	block := anObject
+    
+    block := anObject
 !
 
 prefix
-	^ #action
+    ^ #action
 ! !
 
 !PPCAbstractActionNode methodsFor:'comparing'!
 
 = anotherNode
-	super = anotherNode ifFalse: [ ^ false ].
-	^ block = anotherNode block.
+    super = anotherNode ifFalse: [ ^ false ].
+    ^ block = anotherNode block.
 !
 
 hash
-	^ super hash bitXor: block hash
+    ^ super hash bitXor: block hash
 ! !
 
 !PPCAbstractActionNode class methodsFor:'documentation'!
--- a/compiler/PPCAbstractCharacterNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCAbstractCharacterNode.st	Sun May 10 06:46:56 2015 +0100
@@ -13,55 +13,73 @@
 !PPCAbstractCharacterNode methodsFor:'accessing'!
 
 character
-	^ character
+    ^ character
 !
 
 character: char
-	character := char
+    character := char
 !
 
 prefix
-	^ #char
+    ^ #char
 ! !
 
 !PPCAbstractCharacterNode methodsFor:'analysis'!
 
 acceptsEpsilon
-	^ false
+    ^ false
 !
 
 firstCharSet
-	^ PPCharSetPredicate on: [:e | e = character ]
+    ^ PPCharSetPredicate on: [:e | e = character ]
+!
+
+recognizedSentencesPrim
+    ^ Array with: character asString
 ! !
 
 !PPCAbstractCharacterNode methodsFor:'comparison'!
 
 = anotherNode
-	super = anotherNode ifFalse: [ ^ false ].
-	^ character = anotherNode character.
+    super = anotherNode ifFalse: [ ^ false ].
+    ^ character = anotherNode character.
 !
 
 hash
-	^ super hash bitXor: character hash
+    ^ super hash bitXor: character hash
 ! !
 
 !PPCAbstractCharacterNode methodsFor:'compiling'!
 
 body: compiler
-	| id |
-	
-	character ppcPrintable ifTrue: [ 
-		id := character storeString 
-	] ifFalse: [ 
-		id := compiler idFor: character prefixed: #char.
-		compiler addConstant: (Character value: character asInteger) as: id .
-	].
-	
-	compiler add: '(context peek == ', id, ')'.
-	compiler indent.
-	compiler add: 'ifFalse: [ self error: ''', character asInteger asString, ' expected'' at: context position ] '.
-	compiler add: 'ifTrue: [ context next ].'.
-	compiler dedent.
+    | id |
+    
+    character ppcPrintable ifTrue: [ 
+        id := character storeString 
+    ] ifFalse: [ 
+        id := compiler idFor: character prefixed: #char.
+        compiler addConstant: (Character value: character asInteger) as: id .
+    ].
+    
+    compiler add: '(context peek == ', id, ')'.
+    compiler indent.
+    compiler add: 'ifFalse: [ self error: ''', character asInteger asString, ' expected'' at: context position ] '.
+    compiler add: 'ifTrue: [ context next ].'.
+    compiler dedent.
+! !
+
+!PPCAbstractCharacterNode methodsFor:'printing'!
+
+printNameOn: aStream
+    super printNameOn: aStream.
+
+    character = $" ifTrue: [ 
+        "this is hack to allow for printing '' in comments..."
+        aStream nextPutAll: ', '; nextPutAll: '$'''''.
+        ^ self
+    ].
+
+    aStream nextPutAll: ', '; print: character
 ! !
 
 !PPCAbstractCharacterNode class methodsFor:'documentation'!
--- a/compiler/PPCAbstractLiteralNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCAbstractLiteralNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,51 +12,51 @@
 !PPCAbstractLiteralNode methodsFor:'accessing'!
 
 literal
-	
-	^ literal
+    
+    ^ literal
 !
 
 literal: anObject
-	
-	literal := anObject
+    
+    literal := anObject
 !
 
 prefix
-	^ #lit
+    ^ #lit
 ! !
 
 !PPCAbstractLiteralNode methodsFor:'analysis'!
 
 acceptsEpsilon
-	^ literal size = 0
+    ^ literal size = 0
 !
 
 firstCharSet
-	| letter |
-	letter := literal first.
-	^ PPCharSetPredicate on: [:e | e = letter ]
+    | letter |
+    letter := literal first.
+    ^ PPCharSetPredicate on: [:e | e = letter ]
 ! !
 
 !PPCAbstractLiteralNode methodsFor:'comparison'!
 
 = anotherNode
-	super = anotherNode ifFalse: [ ^ false ].
-	^ literal = anotherNode literal.
+    super = anotherNode ifFalse: [ ^ false ].
+    ^ literal = anotherNode literal.
 !
 
 hash
-	^ super hash bitXor: literal hash
+    ^ super hash bitXor: literal hash
 ! !
 
 !PPCAbstractLiteralNode methodsFor:'compiling'!
 
 encodeQuotes: string
-	| x s |
-	s := WriteStream on: ''.
-	1 to: string size do: [ :i|
-		s nextPut: (x := string at: i).
-		x = $' ifTrue: [ s nextPut: x ].
-	].
-	^ s contents
+    | x s |
+    s := WriteStream on: ''.
+    1 to: string size do: [ :i|
+        s nextPut: (x := string at: i).
+        x = $' ifTrue: [ s nextPut: x ].
+    ].
+    ^ s contents
 ! !
 
--- a/compiler/PPCAbstractPredicateNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCAbstractPredicateNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,43 +12,56 @@
 !PPCAbstractPredicateNode methodsFor:'accessing'!
 
 predicate
-	
-	^ predicate
+    
+    ^ predicate
 !
 
 predicate: anObject
-	
-	predicate := anObject
+    
+    predicate := anObject
 !
 
 prefix
-	^ #predicate
+    ^ #predicate
 ! !
 
 !PPCAbstractPredicateNode methodsFor:'analysis'!
 
 acceptsEpsilon
-	^ false
+    ^ false
 !
 
 firstCharSet
-	^ PPCharSetPredicate on: predicate
+    ^ PPCharSetPredicate on: predicate
 ! !
 
 !PPCAbstractPredicateNode methodsFor:'comparing'!
 
 = anotherNode
-	super = anotherNode ifFalse: [ ^ false ].
-	^ predicate = anotherNode predicate.
+    super = anotherNode ifFalse: [ ^ false ].
+    ^ predicate = anotherNode predicate.
 !
 
 hash
-	^ super hash bitXor: predicate hash
+    ^ super hash bitXor: predicate hash
+!
+
+recognizedSentencesPrim
+    | retval |
+
+    retval := OrderedCollection new.
+    "TODO JK: Works only for ASCII :("
+    1 to: 255 do: [ :i |
+        (predicate value: (Character codePoint: i)) ifTrue: [ 
+            retval add: (Character codePoint: i) asString 
+        ]
+    ].
+    ^ retval
 ! !
 
 !PPCAbstractPredicateNode methodsFor:'compiling'!
 
 extendClassification: classification
-	^ (classification asOrderedCollection addLast: false; yourself) asArray
+    ^ (classification asOrderedCollection addLast: false; yourself) asArray
 ! !
 
--- a/compiler/PPCActionNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCActionNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,6 +12,6 @@
 !PPCActionNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitActionNode: self
+    ^ visitor visitActionNode: self
 ! !
 
--- a/compiler/PPCAndNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCAndNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,12 +12,12 @@
 !PPCAndNode methodsFor:'accessing'!
 
 prefix
-	^ #and
+    ^ #and
 ! !
 
 !PPCAndNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitAndNode: self
+    ^ visitor visitAndNode: self
 ! !
 
--- a/compiler/PPCAnyNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCAnyNode.st	Sun May 10 06:46:56 2015 +0100
@@ -13,23 +13,23 @@
 !PPCAnyNode methodsFor:'accessing'!
 
 prefix
-	^ #any
+    ^ #any
 ! !
 
 !PPCAnyNode methodsFor:'analysis'!
 
 acceptsEpsilon
-	^ false
+    ^ false
 !
 
 firstCharSet
-	^ PPCharSetPredicate on: [:e | true ] 
+    ^ PPCharSetPredicate on: [:e | true ] 
 ! !
 
 !PPCAnyNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitAnyNode: self
+    ^ visitor visitAnyNode: self
 ! !
 
 !PPCAnyNode class methodsFor:'documentation'!
--- a/compiler/PPCArguments.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCArguments.st	Sun May 10 06:46:56 2015 +0100
@@ -12,99 +12,135 @@
 !PPCArguments class methodsFor:'as yet unclassified'!
 
 default
-	^ self new
+    ^ self new
 !
 
 new
-	^ self basicNew 
-		initialize;
-		yourself
+    ^ self basicNew 
+        initialize;
+        yourself
 ! !
 
 !PPCArguments methodsFor:'accessing'!
 
+cacheFirstFollow
+    ^ self at: #cacheFirstFollow ifAbsent: true
+!
+
+cacheFirstFollow: value
+    self set: #cacheFirstFollow to: value.
+!
+
+codeGenerator
+    ^ self at: #codeGenerator ifAbsent: PPCCodeGenerator
+!
+
+codeGenerator: value
+    self set: #codeGenerator to: value.
+!
+
 debug
-	^ self at: #debug ifAbsent: true
+    ^ self at: #debug ifAbsent: true
 !
 
 debug: value
-	self set: #debug to: value.
+    self set: #debug to: value.
+!
+
+detectTokens
+    ^ self at: #detectTokens ifAbsent: true
+!
+
+detectTokens: value
+    self set: #detectTokens to: value.
 !
 
 generate
-	^ self at: #generate ifAbsent: true
+    ^ self at: #generate ifAbsent: true
+!
+
+generate: value
+    ^ self set: #generate to: value
 !
 
 guards
-	^ self at: #guards ifAbsent: true
+    ^ self at: #guards ifAbsent: true
 !
 
 guards: value
-	self set: #guards to: value.
+    self set: #guards to: value.
 !
 
 inline
-	^ self at: #inline ifAbsent: true
+    ^ self at: #inline ifAbsent: true
 !
 
 inline: value
-	self set: #inline to: value.
+    self set: #inline to: value.
 !
 
 merge
-	^ self at: #merge ifAbsent: true
+    ^ self at: #merge ifAbsent: true
 !
 
 merge: value
-	self set: #merge to: value.
+    self set: #merge to: value.
 !
 
 name
-	^ self at: #name ifAbsent: #PPGeneratedParser 
+    ^ self at: #name ifAbsent: #PPGeneratedParser 
 !
 
 name: value
-	self set: #name to: value.
+    self set: #name to: value.
 !
 
 profile
-	^ self at: #profile ifAbsent: false
+    ^ self at: #profile ifAbsent: false
 !
 
 profile: value
-	self set: #profile to: value.
+    self set: #profile to: value.
+!
+
+recognizingComponents
+    ^ self at: #recognizingComponents ifAbsent: true
+!
+
+recognizingComponents: value
+    self set: #recognizingComponents to: value.
 !
 
 specialize
-	^ self at: #specialize ifAbsent: true
+    ^ self at: #specialize ifAbsent: true
 !
 
 specialize: value
-	self set: #specialize to: value.
+    self set: #specialize to: value.
 !
 
 tokenize
-	^ self at: #tokenize ifAbsent: true
+    ^ self at: #tokenize ifAbsent: true
 !
 
 tokenize: value
-	self set: #tokenize to: value.
+    self set: #tokenize to: value.
 ! !
 
 !PPCArguments methodsFor:'initialization'!
 
 initialize
-	super initialize.
-	arguments := IdentityDictionary new
+    super initialize.
+    arguments := IdentityDictionary new
 ! !
 
 !PPCArguments methodsFor:'private'!
 
 at: symbol ifAbsent: defaultValue
-	^ arguments at: symbol ifAbsent: [ ^ defaultValue  ]
+    ^ arguments at: symbol ifAbsent: [ ^ defaultValue  ]
 !
 
 set: symbol to: defaultValue
-	^ arguments at: symbol put: defaultValue 
+    ^ arguments at: symbol put: defaultValue 
 ! !
 
--- a/compiler/PPCBridge.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCBridge.st	Sun May 10 06:46:56 2015 +0100
@@ -12,30 +12,30 @@
 !PPCBridge class methodsFor:'as yet unclassified'!
 
 on: aSymbol
-	^ self new
-		selector: aSymbol;
-		yourself
+    ^ self new
+        selector: aSymbol;
+        yourself
 ! !
 
 !PPCBridge methodsFor:'as yet unclassified'!
 
 call
-	^ 'self callParser: ', self id, '.'.
+    ^ 'self callParser: ', self id, '.'.
 !
 
 selector: aSymbol
-	selector := aSymbol
+    selector := aSymbol
 ! !
 
 !PPCBridge methodsFor:'parsing'!
 
 parseOn: aPPContext
-	| retval |
-	retval := (aPPContext compiledParser) perform: selector.
-	(aPPContext compiledParser isError) ifTrue: [ 
-		aPPContext compiledParser clearError.		
-		^ PPFailure message: 'error' context: aPPContext 
-	].
-	^ retval
+    | retval |
+    retval := (aPPContext compiledParser) perform: selector.
+    (aPPContext compiledParser isError) ifTrue: [ 
+        aPPContext compiledParser clearError.		
+        ^ PPFailure message: 'error' context: aPPContext 
+    ].
+    ^ retval
 ! !
 
--- a/compiler/PPCCharSetPredicateNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCCharSetPredicateNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,16 +12,16 @@
 !PPCCharSetPredicateNode methodsFor:'as yet unclassified'!
 
 start: compiler id: id
-	compiler startMethod: id
+    compiler startMethod: id
 !
 
 stop: compiler
-	^ compiler stopMethod
+    ^ compiler stopMethod
 ! !
 
 !PPCCharSetPredicateNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitCharSetPredicateNode: self
+    ^ visitor visitCharSetPredicateNode: self
 ! !
 
--- a/compiler/PPCCharacterNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCCharacterNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,17 +12,17 @@
 !PPCCharacterNode methodsFor:'as yet unclassified'!
 
 start: compiler id: id
-	compiler startMethod: id.
-	compiler add: '^ '.
+    compiler startMethod: id.
+    compiler add: '^ '.
 !
 
 stop: compiler
-	^ compiler stopMethod
+    ^ compiler stopMethod
 ! !
 
 !PPCCharacterNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitCharacterNode: self
+    ^ visitor visitCharacterNode: self
 ! !
 
--- a/compiler/PPCChoiceNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCChoiceNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,23 +12,41 @@
 !PPCChoiceNode methodsFor:'accessing'!
 
 prefix
-	^ #ch
+    ^ #ch
 ! !
 
 !PPCChoiceNode methodsFor:'analysis'!
 
 acceptsEpsilon
-	^ self acceptsEpsilonOpenSet: IdentitySet new.
+    ^ self acceptsEpsilonOpenSet: IdentitySet new.
 !
 
 acceptsEpsilonOpenSet: set
-	set add: self.
-	^ self children anySatisfy: [:e | e acceptsEpsilonOpenSet: set ].
+    set add: self.
+    ^ self children anySatisfy: [:e | e acceptsEpsilonOpenSet: set ].
+!
+
+check
+    ^ self children asIdentitySet size = children size ifFalse: [ 
+        Transcript cr; show: 'WARNING: Identical children in choice!!'; cr.
+        nil.
+    ] ifTrue: [ nil ]
+!
+
+recognizedSentencesPrim
+    | retval |
+    (self children anySatisfy: [ :child | child hasFiniteLanguage not ]) ifTrue: [ ^ #() ].
+    
+    retval := Set new.
+    self children do: [ : child |
+        retval addAll: child recognizedSentences.
+    ].
+    ^ retval asArray
 ! !
 
 !PPCChoiceNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitChoiceNode: self
+    ^ visitor visitChoiceNode: self
 ! !
 
--- a/compiler/PPCCodeGenerator.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCCodeGenerator.st	Sun May 10 06:46:56 2015 +0100
@@ -12,113 +12,113 @@
 !PPCCodeGenerator class methodsFor:'as yet unclassified'!
 
 on: aPPCCompiler
-	^ self new 
-		compiler: aPPCCompiler;
-		yourself
+    ^ self new 
+        compiler: aPPCCompiler;
+        yourself
 ! !
 
 !PPCCodeGenerator methodsFor:'accessing'!
 
 compiler: aPPCCompiler
-	compiler := aPPCCompiler 
+    compiler := aPPCCompiler 
 ! !
 
 !PPCCodeGenerator methodsFor:'hooks'!
 
 afterAccept: node retval: retval
-	"return the method from compiler"
-	^ self stopMethodForNode: node.
+    "return the method from compiler"
+    ^ self stopMethodForNode: node.
 !
 
 beforeAccept: node
-	self startMethodForNode: node
+    self startMethodForNode: node
 !
 
 closedDetected: node
-	^ node isMarkedForInline ifFalse: [ 
-		self error: 'Should not happen!!'
-	]
+    ^ node isMarkedForInline ifFalse: [ 
+        self error: 'Should not happen!!'
+    ]
 !
 
 openDetected: node
-	^ compiler checkCache: (compiler idFor: node)
+    ^ compiler checkCache: (compiler idFor: node)
 ! !
 
 !PPCCodeGenerator methodsFor:'support'!
 
 addGuard: node
-	|  guard firsts id |
-	(arguments guards not or: [(guard := PPCGuard on: node) makesSense not]) ifTrue: [ ^ self].
+    |  guard firsts id |
+    (arguments guards not or: [(guard := PPCGuard on: node) makesSense not]) ifTrue: [ ^ self].
 
-	id := compiler idFor: node.
-	firsts := (node firstSetSuchThat: [ :e | (e isKindOf: PPCTrimmingTokenNode) or: [ e isTerminal ] ]).
+    id := compiler idFor: node.
+    firsts := node firstSetWithTokens.
 
-	
-	(firsts allSatisfy: [ :e | e isKindOf: PPCTrimmingTokenNode ]) ifTrue: [  
-		"If we start with trimming, we should invoke the whitespace parser"
-		self compileTokenWhitespace: firsts anyOne.
-		
-		compiler add: 'context atEnd ifTrue: [ ^ self error ].'.
-		guard id: id, '_guard'.
-		guard compileGuard: compiler.
-		compiler addOnLine: 'ifFalse: [ ^ self error ].'
-	].
+    
+    (firsts allSatisfy: [ :e | e isKindOf: PPCTrimmingTokenNode ]) ifTrue: [  
+        "If we start with trimming, we should invoke the whitespace parser"
+        self compileTokenWhitespace: firsts anyOne.
+        
+        compiler add: 'context atEnd ifTrue: [ ^ self error ].'.
+        guard id: id, '_guard'.
+        guard compileGuard: compiler.
+        compiler addOnLine: 'ifFalse: [ ^ self error ].'
+    ].
 
-	(firsts allSatisfy: [ :e | e isTerminal ]) ifTrue: [  
-		compiler add: 'context atEnd ifTrue: [ ^ self error ].'.
-		guard id: id, '_guard'.
-		guard compileGuard: compiler.
-		compiler addOnLine: 'ifFalse: [ ^ self error ].'
-	].
+    (firsts allSatisfy: [ :e | e isTerminal ]) ifTrue: [  
+        compiler add: 'context atEnd ifTrue: [ ^ self error ].'.
+        guard id: id, '_guard'.
+        guard compileGuard: compiler.
+        compiler addOnLine: 'ifFalse: [ ^ self error ].'
+    ].
 !
 
 compileTokenWhitespace: node
-	compiler add: 'context atWs ifFalse: ['.
-	compiler indent.
-		compiler call: (self visit: node whitespace).
-		compiler add: 'context setWs.'.
-	compiler dedent.
-	compiler add: '].'.
+    compiler add: 'context atWs ifFalse: ['.
+    compiler indent.
+        compiler call: (self visit: node whitespace).
+        compiler add: 'context setWs.'.
+    compiler dedent.
+    compiler add: '].'.
 !
 
 notCharSetPredicateBody: node
-	| classificationId  classification |
-	self error: 'deprecated.'.
-	classification := node extendClassification: node predicate classification.
-	classificationId := (compiler idFor: classification prefixed: #classification).
-	compiler  addConstant: classification as: classificationId.
-	
-	compiler addOnLine: '(', classificationId, ' at: context peek asInteger)'.
-	compiler indent.
-	compiler add: ' ifTrue: [ self error: '' predicate not expected'' ]'.
-	compiler add: ' ifFalse: [ nil ].'.
-	compiler dedent.
+    | classificationId  classification |
+    self error: 'deprecated.'.
+    classification := node extendClassification: node predicate classification.
+    classificationId := (compiler idFor: classification prefixed: #classification).
+    compiler  addConstant: classification as: classificationId.
+    
+    compiler addOnLine: '(', classificationId, ' at: context peek asInteger)'.
+    compiler indent.
+    compiler add: ' ifTrue: [ self error: '' predicate not expected'' ]'.
+    compiler add: ' ifFalse: [ nil ].'.
+    compiler dedent.
 !
 
 notMessagePredicateBody: node
-	self error: 'deprecated'.
-	compiler addOnLine: '(context peek ', node message, ')'.
-	compiler indent.
-	compiler add: ' ifTrue: [ self error: '' predicate not expected'' ]'.
-	compiler add: ' ifFalse: [ nil ].'.
-	compiler dedent.
+    self error: 'deprecated'.
+    compiler addOnLine: '(context peek ', node message, ')'.
+    compiler indent.
+    compiler add: ' ifTrue: [ self error: '' predicate not expected'' ]'.
+    compiler add: ' ifFalse: [ nil ].'.
+    compiler dedent.
 !
 
 predicateBody: node
-	| tmpId |
-	self error:'deprecated'.
-	tmpId := (compiler idFor: node predicate prefixed: #predicate).
-	compiler addConstant: node predicate as: tmpId.
+    | tmpId |
+    self error:'deprecated'.
+    tmpId := (compiler idFor: node predicate prefixed: #predicate).
+    compiler addConstant: node predicate as: tmpId.
 
-	compiler addOnLine: '(context atEnd not and: [ ', tmpId , ' value: context uncheckedPeek])'.
-	compiler indent.
-	compiler add: 'ifFalse: [ self error: ''predicate not found'' ]'.
-	compiler add: 'ifTrue: [ context next ].'.
-	compiler dedent.	
+    compiler addOnLine: '(context atEnd not and: [ ', tmpId , ' value: context uncheckedPeek])'.
+    compiler indent.
+    compiler add: 'ifFalse: [ self error: ''predicate not found'' ]'.
+    compiler add: 'ifTrue: [ context next ].'.
+    compiler dedent.	
 !
 
 retvalVar
-	^ compiler currentReturnVariable 
+    ^ compiler currentReturnVariable 
 !
 
 startMethodForNode:node
@@ -153,233 +153,248 @@
 !PPCCodeGenerator methodsFor:'traversing - caching'!
 
 cache: node value: retval
-	"this is compiler thing, not mine"
+    "this is compiler thing, not mine"
 !
 
 cachedDetected: node
-	^ compiler checkCache: (compiler idFor: node)
+    ^ compiler checkCache: (compiler idFor: node)
 !
 
 isCached: node
-	^ (compiler checkCache: (compiler idFor: node)) isNil not
+    ^ (compiler checkCache: (compiler idFor: node)) isNil not
 ! !
 
 !PPCCodeGenerator methodsFor:'visiting'!
 
 visitActionNode: node
-    | elementVar |
+    | blockId |
 
-    compiler addConstant: node block as: (compiler idFor: node).
-    elementVar := compiler allocateTemporaryVariableNamed:'element'.
-    compiler add: elementVar,' := '.
-    compiler callOnLine: (self visit: node child).
-    compiler add: 'error ifFalse: [ ^ ',  (compiler idFor: node), ' value: ',elementVar,' ].'.
-    compiler add: '^ failure'.
+    blockId := 'block_', (compiler idFor: node).
+    compiler addConstant: node block as: blockId.
+        
+    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: self retvalVar.
+    compiler add: 'error ifFalse: ['.
+    compiler codeReturn: blockId, ' value: ', self retvalVar.
+    compiler add: '] ifTrue: ['.
+    compiler codeReturn: 'failure'.
+    compiler add: '].'.
 
     "Modified: / 05-05-2015 / 14:39:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 visitAndNode: node
-	| mementoVar |
-	
-	mementoVar := compiler allocateTemporaryVariableNamed: 'memento'.
-	compiler add: (compiler smartRemember: node child to: mementoVar).
+    | mementoVar |
+    
+    mementoVar := compiler allocateTemporaryVariableNamed: 'memento'.
+    compiler smartRemember: node child to: mementoVar.
 
-	compiler codeStoreValueOf: [ self visit: node child  ] intoVariable: self retvalVar.
-	compiler add: (compiler smartRestore: node child from: mementoVar).
+    compiler codeStoreValueOf: [ self visit: node child  ] intoVariable: self retvalVar.
+    compiler smartRestore: node child from: mementoVar.
 
-	compiler codeReturn.
+    compiler codeReturn.
 
     "Modified: / 23-04-2015 / 15:59:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 visitAnyNode: node
 
-	compiler codeReturn: 'context next ifNil: [ error := true. ].'.
+    compiler codeReturn: 'context next ifNil: [ error := true. ].'.
 
     "Modified: / 23-04-2015 / 20:52:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 visitCharSetPredicateNode: node
 
-	| classification classificationId |
-	classification := node extendClassification: node predicate classification.
-	classificationId := compiler idFor: classification prefixed: #classification.
-	compiler addConstant: classification as: classificationId.
-	
-	compiler addOnLine: '(', classificationId, ' at: context peek asInteger)'.
-	compiler indent.
-	compiler add: 'ifFalse: [ self error: ''predicate not found'' ]'.
-	compiler add: 'ifTrue: [ '.
-	compiler codeReturn: 'context next'.
-	compiler add: '].'.
-	compiler dedent.
+    | classification classificationId |
+    classification := node extendClassification: node predicate classification.
+    classificationId := compiler idFor: classification prefixed: #classification.
+    compiler addConstant: classification as: classificationId.
+    
+    compiler add: '(', classificationId, ' at: context peek asInteger)'.
+    compiler indent.
+    compiler add: 'ifFalse: [ self error: ''predicate not found'' ]'.
+    compiler add: 'ifTrue: [ '.
+    compiler codeReturn: 'context next'.
+    compiler add: '].'.
+    compiler dedent.
 !
 
 visitCharacterNode: node
-	| chid |
-	node character ppcPrintable ifTrue: [ 
-		chid := node character storeString 
-	] ifFalse: [ 
-		chid := compiler idFor: node character prefixed: #char.
-		compiler addConstant: (Character value: node character asInteger) as: chid .
-	].
-	
-	compiler add: '(context peek == ', chid, ')'.
-	compiler indent.
-	compiler add: 'ifFalse: [ self error: ''', node character asInteger asString, ' expected'' at: context position ] '.
-	compiler add: 'ifTrue: [ '.
-	compiler codeReturn: 'context next'.
-	compiler add: '].'.
-	compiler dedent.
+    | chid |
+    node character ppcPrintable ifTrue: [ 
+        chid := node character storeString 
+    ] ifFalse: [ 
+        chid := compiler idFor: node character prefixed: #char.
+        compiler addConstant: (Character value: node character asInteger) as: chid .
+    ].
+    
+    compiler add: '(context peek == ', chid, ')'.
+    compiler indent.
+    compiler add: 'ifFalse: [ self error: ''', node character asInteger asString, ' expected'' at: context position ] '.
+    compiler add: 'ifTrue: [ '.
+    compiler codeReturn: 'context next'.
+    compiler add: '].'.
+    compiler dedent.
 !
 
 visitChild: child of: node
-	|  |
+    |  |
 
-	(self isOpen: child) ifTrue: [ 
-		"already processing..."
-		^ nil
-	].
+    (self isOpen: child) ifTrue: [ 
+        "already processing..."
+        ^ nil
+    ].
 
-	"TODO JK: this is is wrong,.. to tired now to fix this :("
+    "TODO JK: this is is wrong,.. to tired now to fix this :("
 "	(self isCached: child) ifTrue: [ 
-		node replace: child with: (self cachedValue: child).
-		^ nil
-	]. 
+        node replace: child with: (self cachedValue: child).
+        ^ nil
+    ]. 
 "
-	^ self visit: child.
+    ^ self visit: child.
 !
 
 visitChoiceNode: node
-        | firsts guard whitespaceConsumed elementVar |
-
-
-        whitespaceConsumed := false.
-        firsts := (node firstSetSuchThat: [ :e | (e isKindOf: PPCTrimmingTokenNode) or: [ e isTerminal ] ]).
+    | firsts guard whitespaceConsumed elementVar |
+    "The code is not ready for inlining"
+    self assert: node isMarkedForInline not.
+    
+    whitespaceConsumed := false.
+    firsts := node firstSetWithTokens.
         
 
-        elementVar := compiler allocateTemporaryVariableNamed: 'element'.
-        "If we start with trimming token, we should invoke the whitespace parser"
-        (firsts allSatisfy: [ :e | e isKindOf: PPCTrimmingTokenNode ]) ifTrue: [  
-                self compileTokenWhitespace: firsts anyOne.
-                whitespaceConsumed := true.
-        ].
+    elementVar := compiler allocateTemporaryVariableNamed: 'element'.
+    "	
+        If we want to compile in guard and the choice starts with trimming token, 
+        we should invoke the whitespace parser
+    "
+    (arguments guards and: [ firsts allSatisfy: [ :e | e isTrimmingTokenNode ] ]) ifTrue: [  
+        self compileTokenWhitespace: firsts anyOne.
+        whitespaceConsumed := true.
+    ].
         
-        1 to: node children size do: [ :idx  | |child allowGuard |
-                child := node children at: idx.
-"               allowGuard := ((child isKindOf: PPCTrimmingTokenNode) and: [ whitespaceConsumed not ]) not.
-"       
-                allowGuard := whitespaceConsumed.
+    1 to: node children size do: [ :idx  | |child allowGuard |
+        child := node children at: idx.
+        allowGuard := whitespaceConsumed.
                                 
-                (allowGuard and: [arguments guards and: [ (guard := PPCGuard on: child) makesSense ]]) ifTrue: [         
-                        guard id: (compiler idFor: guard prefixed: #guard).
-                        guard compileGuard: compiler.
-                        compiler add: ' ifTrue: [ '.
-                        compiler indent.
-                                compiler add: 'self clearError.'.
-                                compiler codeStoreValueOf:  [self visit: child] intoVariable: elementVar.
-                                compiler add: 'error ifFalse: [ ^ ',elementVar,' ].'.
-                        compiler dedent.
-                        compiler add: ' ].'.
-                ] ifFalse: [
-                        compiler add: 'self clearError.'.
-                        compiler codeStoreValueOf:  [self visit: child] intoVariable: elementVar.
-                        compiler add: 'error ifFalse: [ ^ ',elementVar,' ].'.
-                ]
-        ].
-        compiler add: '^ self error: ''no choice suitable'''.
+        (allowGuard and: [arguments guards and: [ (guard := PPCGuard on: child) makesSense ]]) ifTrue: [         
+            guard id: (compiler idFor: guard prefixed: #guard).
+            guard compileGuard: compiler.
+            compiler add: ' ifTrue: [ '.
+            compiler indent.
+                compiler add: 'self clearError.'.
+                compiler codeStoreValueOf:  [self visit: child] intoVariable: elementVar.
+                compiler add: 'error ifFalse: [ ^ element ].'.
+            compiler dedent.
+            compiler add: ' ].'.
+        ] ifFalse: [
+            compiler add: 'self clearError.'.
+            compiler codeStoreValueOf:  [self visit: child] intoVariable: elementVar.
+            compiler add: 'error ifFalse: [ ^ element ].'.
+        ]
+    ].
+    compiler add: '^ self error: ''no choice suitable'''.
 
     "Modified: / 05-05-2015 / 14:10:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 visitEndOfFileNode: node
-	compiler codeReturn: 'context atEnd ifTrue: [ #EOF ] ifFalse: [ self error: ''EOF expected!!'' ].'.
+    compiler codeReturn: 'context atEnd ifTrue: [ #EOF ] ifFalse: [ self error: ''EOF expected!!'' ].'.
+!
+
+visitEndOfInputNode: node
+
+    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: self retvalVar.
+    compiler add: 'context atEnd ifTrue: ['.
+    compiler codeReturn.	
+    compiler add: '] ifFalse: ['.
+    compiler codeError: 'End of input expected'.
+    compiler add: ']'.
 !
 
 visitForwardNode: node
 
-	compiler codeStoreValueOf: [ self visit: node child ] intoVariable: self retvalVar.
-	compiler codeReturn.
+    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: self retvalVar.
+    compiler codeReturn.
 !
 
 visitLiteralNode: node
-	| positionVar encodedLiteral |
-	encodedLiteral := node encodeQuotes: node literal.
-	positionVar := compiler allocateTemporaryVariableNamed: 'position'.
+    | positionVar encodedLiteral |
+    encodedLiteral := node encodeQuotes: node literal.
+    positionVar := compiler allocateTemporaryVariableNamed: 'position'.
 
-	compiler codeAssign: 'context position.' to: positionVar.
-	compiler add: '((context next: ', node literal size asString, ') = #''', encodedLiteral, ''') ifTrue: ['.
-	compiler codeReturn: '#''', encodedLiteral, ''' '.
-	compiler add: '] ifFalse: ['.
-	compiler add: '  context position: ', positionVar, '.'.
-	compiler add: '  self error: ''', encodedLiteral,  ' expected'' at: position'.
-	compiler add: '].'.
+    compiler codeAssign: 'context position.' to: positionVar.
+    compiler add: '((context next: ', node literal size asString, ') = #''', encodedLiteral, ''') ifTrue: ['.
+    compiler codeReturn: '#''', encodedLiteral, ''' '.
+    compiler add: '] ifFalse: ['.
+    compiler add: '  context position: ', positionVar, '.'.
+    compiler add: '  self error: ''', encodedLiteral,  ' expected'' at: position'.
+    compiler add: '].'.
 !
 
 visitMessagePredicateNode: node
-	compiler add: '(context peek ', node message, ') ifFalse: ['.
-	compiler add: '  self error: ''predicate not found'''.
-	compiler add: '] ifTrue: [ '.
-	compiler codeReturn: ' context next'.
-	compiler add: '].'.
+    compiler add: '(context peek ', node message, ') ifFalse: ['.
+    compiler add: '  self error: ''predicate not found'''.
+    compiler add: '] ifTrue: [ '.
+    compiler codeReturn: ' context next'.
+    compiler add: '].'.
 
     "Modified: / 23-04-2015 / 18:39:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 visitNilNode: node
 
-	compiler codeReturn: 'nil.'.
+    compiler codeReturn: 'nil.'.
 !
 
 visitNotCharSetPredicateNode: node
-	| classificationId  classification |
-	classification := node extendClassification: node predicate classification.
-	classificationId := (compiler idFor: classification prefixed: #classification).
-	compiler  addConstant: classification as: classificationId.
-	
-	compiler addOnLine: '(', classificationId, ' at: context peek asInteger)'.
-	compiler indent.
-	compiler add: ' ifTrue: [ self error: '' predicate not expected'' ]'.
-	compiler add: ' ifFalse: ['.
-	compiler codeReturn: 'nil'.
-	compiler add: '].'.
-	compiler dedent.
+    | classificationId  classification |
+    classification := node extendClassification: node predicate classification.
+    classificationId := (compiler idFor: classification prefixed: #classification).
+    compiler  addConstant: classification as: classificationId.
+    
+    compiler addOnLine: '(', classificationId, ' at: context peek asInteger)'.
+    compiler indent.
+    compiler add: ' ifTrue: [ self error: '' predicate not expected'' ]'.
+    compiler add: ' ifFalse: ['.
+    compiler codeReturn: 'nil'.
+    compiler add: '].'.
+    compiler dedent.
 !
 
 visitNotLiteralNode: node
-	| encodedLiteral size |
-	encodedLiteral := node encodeQuotes: node literal.
-	size := node literal size asString.
-	
-	compiler add: '((context peek: ', size, ') =#''', encodedLiteral, ''')'.
-	compiler indent.
-	compiler add: 'ifTrue: [ self error: ''', encodedLiteral, ' not expected'' ]'.
-	compiler add: 'ifFalse: [ '.
-	compiler codeReturn: 'nil' .
-	compiler add: '].'.
-	compiler dedent.
+    | encodedLiteral size |
+    encodedLiteral := node encodeQuotes: node literal.
+    size := node literal size asString.
+    
+    compiler add: '((context peek: ', size, ') =#''', encodedLiteral, ''')'.
+    compiler indent.
+    compiler add: 'ifTrue: [ self error: ''', encodedLiteral, ' not expected'' ]'.
+    compiler add: 'ifFalse: [ '.
+    compiler codeReturn: 'nil' .
+    compiler add: '].'.
+    compiler dedent.
 !
 
 visitNotMessagePredicateNode: node
-	compiler addOnLine: '(context peek ', node message, ')'.
-	compiler indent.
-	compiler add: ' ifTrue: [ '.
-	compiler codeError: 'predicate not expected'.
-	compiler add: '] ifFalse: ['.
-	compiler codeReturn: 'nil'.
-	compiler add: ' ].'.
-	compiler dedent. 
+    compiler addOnLine: '(context peek ', node message, ')'.
+    compiler indent.
+    compiler add: ' ifTrue: [ '.
+    compiler codeError: 'predicate not expected'.
+    compiler add: '] ifFalse: ['.
+    compiler codeReturn: 'nil'.
+    compiler add: ' ].'.
+    compiler dedent. 
 !
 
 visitNotNode: node
     | mementoVar |
 
     mementoVar := compiler allocateTemporaryVariableNamed: 'memento'.
-    compiler add: (compiler smartRemember: node child to: mementoVar ).
+    compiler smartRemember: node child to: mementoVar.
     
-    compiler call: (self visit: node child).
-    compiler add: (compiler smartRestore: node child from: mementoVar ).
+    compiler codeStoreValueOf: [ self visit: node child  ] intoVariable: #whatever.
+    compiler smartRestore: node child from: mementoVar.
 
     compiler add: '^ error ifFalse: [ self error ] ifTrue: [ self clearError. nil ]'.
 
@@ -387,84 +402,112 @@
 !
 
 visitOptionalNode: node
-	compiler codeStoreValueOf: [ self visit: node child ] intoVariable: self retvalVar.
-	compiler add: 'error ifTrue: [ '.
-	compiler add: '  self clearError. '.
-	compiler codeAssign: 'nil.' to: self retvalVar.
-	compiler add: '].'.
-	compiler codeReturn.
+    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: self retvalVar.
+    compiler add: 'error ifTrue: [ '.
+    compiler add: '  self clearError. '.
+    compiler codeAssign: 'nil.' to: self retvalVar.
+    compiler add: '].'.
+    compiler codeReturn.
 !
 
 visitPluggableNode: node
-	| blockId |
-	blockId := compiler idFor: node block prefixed: #block.
-	
-	compiler addConstant: node block as: blockId.
-	compiler codeReturn: blockId, ' value: context.'.
+    | blockId |
+    blockId := compiler idFor: node block prefixed: #block.
+    
+    compiler addConstant: node block as: blockId.
+    compiler codeReturn: blockId, ' value: context.'.
 !
 
 visitPlusNode: node
-	| elementVar |
+    | elementVar |
                 
-	elementVar := compiler allocateTemporaryVariableNamed:  'element'.
+    elementVar := compiler allocateTemporaryVariableNamed:  'element'.
                 
-	compiler codeAssign: 'OrderedCollection new.' to: self retvalVar.
-	compiler codeStoreValueOf: [ self visit: node child ] intoVariable: elementVar.
+    compiler codeAssign: 'OrderedCollection new.' to: self retvalVar.
+    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: elementVar.
 
-	compiler add: 'error ifTrue: [ self error: ''at least one occurence expected'' ] ifFalse: ['.
-	compiler indent.
-	    compiler add: self retvalVar , ' add: ',elementVar , '.'.
+    compiler add: 'error ifTrue: [ self error: ''at least one occurence expected'' ] ifFalse: ['.
+    compiler indent.
+        compiler add: self retvalVar , ' add: ',elementVar , '.'.
             
-	    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: elementVar.
-	    compiler add: '[ error ] whileFalse: ['.
-	    compiler indent.
-	    compiler add: self retvalVar , ' add: ',elementVar , '.'.
-	    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: elementVar.
-	    compiler dedent.
-	    compiler add: '].'.
-	    compiler add: 'self clearError.'.
-	    compiler codeReturn: self retvalVar , ' asArray.'.         
-	compiler dedent.
-	compiler add: '].'.
+        compiler codeStoreValueOf: [ self visit: node child ] intoVariable: elementVar.
+        compiler add: '[ error ] whileFalse: ['.
+        compiler indent.
+        compiler add: self retvalVar , ' add: ',elementVar , '.'.
+        compiler codeStoreValueOf: [ self visit: node child ] intoVariable: elementVar.
+        compiler dedent.
+        compiler add: '].'.
+        compiler add: 'self clearError.'.
+        compiler codeReturn: self retvalVar , ' asArray.'.         
+    compiler dedent.
+    compiler add: '].'.
 
     "Modified (comment): / 23-04-2015 / 21:30:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 visitPredicateNode: node
-	| pid |
-	pid := (compiler idFor: node predicate prefixed: #predicate).
+    | pid |
+    pid := (compiler idFor: node predicate prefixed: #predicate).
 
-	compiler addConstant: node predicate as: pid.
+    compiler addConstant: node predicate as: pid.
 
-	compiler add: '(context atEnd not and: [ ', pid , ' value: context uncheckedPeek])'.
-	compiler indent.
-	compiler add: 'ifFalse: [ self error: ''predicate not found'' ]'.
-	compiler add: 'ifTrue: [ ', self retvalVar ,' := context next ].'.
-	compiler dedent.   
-	compiler codeReturn.
+    compiler add: '(context atEnd not and: [ ', pid , ' value: context uncheckedPeek])'.
+    compiler indent.
+    compiler add: 'ifFalse: [ self error: ''predicate not found'' ]'.
+    compiler add: 'ifTrue: [ ', self retvalVar ,' := context next ].'.
+    compiler dedent.   
+    compiler codeReturn.
 
     "Modified: / 23-04-2015 / 21:48:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+visitRecognizingSequenceNode: node
+    | mementoVar |
+
+    mementoVar := compiler allocateTemporaryVariableNamed: 'memento'.			
+    compiler smartRemember: node to: mementoVar.
+
+"	self addGuard: compiler."
+
+        compiler codeStoreValueOf: [ self visit: (node children at: 1) ] intoVariable: #whatever.
+    compiler add: 'error ifTrue: [ ^ failure ].'.
+
+    2 to: (node children size) do: [ :idx  | |child|
+        child := node children at: idx.
+        compiler codeStoreValueOf: [ self visit: child ] intoVariable: #whatever.
+        compiler add: 'error ifTrue: [ '.
+        compiler indent.
+        compiler smartRestore: node from: mementoVar.
+        compiler add: ' ^ failure .'.
+        compiler dedent.
+        compiler add: '].'.
+    ].
+!
+
 visitSequenceNode: node
 
-	| elementVar mementoVar |
+    | elementVar mementoVar |
 
-	elementVar := compiler allocateTemporaryVariableNamed: 'element'.
-	mementoVar := compiler allocateTemporaryVariableNamed: 'memento'.
+    elementVar := compiler allocateTemporaryVariableNamed: 'element'.
+    mementoVar := compiler allocateTemporaryVariableNamed: 'memento'.
 
-	compiler add: (compiler smartRemember: node to: mementoVar).
-	compiler codeAssign: 'Array new: ', node children size asString, '.' to: self retvalVar.
-	self addGuard: node.
+    compiler smartRemember: node to: mementoVar.
+    compiler codeAssign: 'Array new: ', node children size asString, '.' to: self retvalVar.
+    self addGuard: node.
 
-	1 to: (node children size) do: [ :idx  | |child|
-		child := node children at: idx.
-		compiler codeStoreValueOf: [ self visit: child ]  intoVariable: elementVar.
+    1 to: (node children size) do: [ :idx  | |child|
+        child := node children at: idx.
+        compiler codeStoreValueOf: [ self visit: child ]  intoVariable: elementVar.
         
-		compiler add: 'error ifTrue: [ ', (compiler smartRestore: node) ,' ^ failure ].'.
-		compiler add: self retvalVar , ' at: ', idx asString, ' put: ',elementVar,'.'.
-	].
-	compiler codeReturn
+        compiler add: 'error ifTrue: [ '.
+        compiler indent.
+        compiler smartRestore: node from: mementoVar.
+        compiler add: '^ failure.'.
+        compiler dedent.
+        compiler add: '].'.
+        compiler add: self retvalVar , ' at: ', idx asString, ' put: ',elementVar,'.'.
+    ].
+    compiler codeReturn
 
     "Modified: / 23-04-2015 / 22:03:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
@@ -478,211 +521,204 @@
     compiler add: retvalVar,' := Array new: ',sizeVar,'.'.
     compiler add: '(1 to: ',sizeVar,') do: [ :e | ',retvalVar,' at: e put: context next ].'.
     compiler codeReturn.
-
+    
     "Modified: / 05-05-2015 / 14:13:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 visitStarCharSetPredicateNode: node
-	| classification classificationId |
-	
+    | classification classificationId |
+    
 
-	classification := node extendClassification: node predicate classification.
-	classificationId := compiler idFor: classification prefixed: #classification.
-	compiler addConstant: classification as: classificationId.
-	
-	compiler codeAssign: 'OrderedCollection new.' to: self retvalVar.	
-	compiler add: '[ ', classificationId, ' at: context peek asInteger ] whileTrue: ['.
-	compiler indent.
-	compiler add: self retvalVar, ' add: context next.'.
-	compiler dedent.
-	compiler add: '].'.
+    classification := node extendClassification: node predicate classification.
+    classificationId := compiler idFor: classification prefixed: #classification.
+    compiler addConstant: classification as: classificationId.
+    
+    compiler codeAssign: 'OrderedCollection new.' to: self retvalVar.	
+    compiler add: '[ ', classificationId, ' at: context peek asInteger ] whileTrue: ['.
+    compiler indent.
+    compiler add: self retvalVar, ' add: context next.'.
+    compiler dedent.
+    compiler add: '].'.
    compiler codeReturn: 'retval asArray'.
 !
 
 visitStarMessagePredicateNode: node
 
-	compiler codeAssign: 'OrderedCollection new.' to: self retvalVar.	
-	compiler add: '[ context peek ', node message, ' ] whileTrue: ['.
-	compiler indent.
-	compiler add: self retvalVar, ' add: context next.'.
-	compiler dedent.
-	compiler add: '].'.
+    compiler codeAssign: 'OrderedCollection new.' to: self retvalVar.	
+    compiler add: '[ context peek ', node message, ' ] whileTrue: ['.
+    compiler indent.
+    compiler add: self retvalVar, ' add: context next.'.
+    compiler dedent.
+    compiler add: '].'.
    compiler codeReturn: 'retval asArray'.
 !
 
 visitStarNode: node
-	| elementVar |
-	
-	elementVar := compiler allocateTemporaryVariableNamed: 'element'.
+    | elementVar |
+    
+    elementVar := compiler allocateTemporaryVariableNamed: 'element'.
 
-	compiler codeAssign: 'OrderedCollection new.' to: self retvalVar.
-	compiler codeStoreValueOf: [ self visit: node child ] intoVariable: elementVar.
-	compiler add: '[ error ] whileFalse: ['.
-	compiler indent.
-	compiler add: self retvalVar, ' add: element.'.
-	compiler codeStoreValueOf: [ self visit: node child ] intoVariable: elementVar.
-	compiler dedent.
-	compiler add: '].'.
-	compiler codeClearError.
-	compiler codeReturn: self retvalVar, ' asArray'.
+    compiler codeAssign: 'OrderedCollection new.' to: self retvalVar.
+    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: elementVar.
+    compiler add: '[ error ] whileFalse: ['.
+    compiler indent.
+    compiler add: self retvalVar, ' add: ', elementVar, '.'.
+    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: elementVar.
+    compiler dedent.
+    compiler add: '].'.
+    compiler codeClearError.
+    compiler codeReturn: self retvalVar, ' asArray.'.
 !
 
 visitSymbolActionNode: node
-	| elementVar |
-	
-	elementVar := compiler allocateTemporaryVariableNamed: 'element'.	
-	compiler codeStoreValueOf: [ self visit: node child ] intoVariable: elementVar.
-	compiler add: 'error ifFalse: [ '.
-	compiler codeReturn: elementVar, ' ', node block asString, '.'.
-	compiler add: '] ifTrue: ['.
-	compiler codeReturn: 'failure'.
-	compiler add: ']'.
+    | elementVar |
+    
+    elementVar := compiler allocateTemporaryVariableNamed: 'element'.	
+    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: elementVar.
+    compiler add: 'error ifFalse: [ '.
+    compiler codeReturn: elementVar, ' ', node block asString, '.'.
+    compiler add: '] ifTrue: ['.
+    compiler codeReturn: 'failure'.
+    compiler add: ']'.
 !
 
 visitTokenActionNode: node
-	"
-		Actually, do nothing, we are in Token mode and the 
-		child does not return any result and token takes only
-		the input value.
-	"	
+    "
+        Actually, do nothing, we are in Token mode and the 
+        child does not return any result and token takes only
+        the input value.
+    "	
 
-	compiler add: '^ '.
-	compiler callOnLine: (node child compileWith: compiler).
+    compiler add: '^ '.
+    compiler callOnLine: (node child compileWith: compiler).
 !
 
 visitTokenNode: node
-	| startVar endVar |
-	startVar := compiler allocateTemporaryVariableNamed: 'start'.
-	endVar := compiler allocateTemporaryVariableNamed: 'end'.
-	
-	compiler codeAssign: 'context position + 1.' to: startVar.
-	compiler codeStoreValueOf: [ self visit: node child ] intoVariable: #whatever.
-	compiler add: 'error ifFalse: [ '.
-	compiler indent.	
-	compiler codeAssign: 'context position.' to: endVar.
-	
-	compiler codeReturn: node tokenClass asString, ' on: (context collection) 
-																start: ', startVar, '  
-																stop: ', endVar, '
-																value: nil.'.
-	compiler dedent.
-	compiler add: '].'.
-!
-
-visitTokenSequenceNode: node
-    | mementoVar |
-
-    mementoVar := compiler allocateTemporaryVariableNamed: 'memento'.                        
-    compiler add: (compiler smartRemember: node to: mementoVar).
-    "
-    self addGuard: compiler.
-    "
-    compiler codeStoreValueOf: [ self visit: (node children at: 1) ] intoVariable: #whatever.
-    compiler add: 'error ifTrue: [ ^ failure ].'.
-
-    2 to: (node children size) do: [ :idx  | |child|
-            child := node children at: idx.
-            compiler codeStoreValueOf: [ self visit: child ] intoVariable: #whatever.
-            compiler add: 'error ifTrue: [ ', (compiler smartRestore: node from: mementoVar) ,' ^ failure ].'.
-    ].
-
-    "Modified (comment): / 05-05-2015 / 14:31:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    | startVar endVar |
+    startVar := compiler allocateTemporaryVariableNamed: 'start'.
+    endVar := compiler allocateTemporaryVariableNamed: 'end'.
+    
+    compiler codeAssign: 'context position + 1.' to: startVar.
+    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: #whatever.
+    compiler add: 'error ifFalse: [ '.
+    compiler indent.	
+    compiler codeAssign: 'context position.' to: endVar.
+    
+    compiler codeReturn: node tokenClass asString, ' on: (context collection) 
+                                                                start: ', startVar, '  
+                                                                stop: ', endVar, '
+                                                                value: nil.'.
+    compiler dedent.
+    compiler add: '].'.
 !
 
 visitTokenStarMessagePredicateNode: node
 
-	compiler add: '[ context peek ', node message,' ] whileTrue: ['.
-	compiler indent.
-	compiler add: 'context next'.
-	compiler indent.
-	compiler dedent.
-	compiler add: '].'.
+    compiler add: '[ context peek ', node message,' ] whileTrue: ['.
+    compiler indent.
+    compiler add: 'context next'.
+    compiler indent.
+    compiler dedent.
+    compiler add: '].'.
 !
 
 visitTokenStarSeparatorNode: node
 
-	compiler add: 'context skipSeparators.'.
+    compiler add: 'context skipSeparators.'.
+!
+
+visitTokenWhitespaceNode: node
+    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: #whatever.
+    compiler codeReturn.
 !
 
 visitTrimNode: node
-	| mementoVar |
-	"TODO: This ignores the TrimmingParser trimmer object!!"
+    | mementoVar |
+    "TODO: This ignores the TrimmingParser trimmer object!!"
 
-	mementoVar := compiler allocateTemporaryVariableNamed:  'memento'.
+    mementoVar := compiler allocateTemporaryVariableNamed:  'memento'.
 
-	compiler add: (compiler smartRemember: node child to: mementoVar).
-	compiler add: 'context skipSeparators.'.
+    compiler smartRemember: node child to: mementoVar.
+    compiler add: 'context skipSeparators.'.
 
-	compiler codeStoreValueOf: [ self visit: node child ] intoVariable: self retvalVar.
-	
-	compiler add: 'error ifTrue: [ '.
-	compiler indent.
-		compiler add: (compiler smartRestore: node child from: mementoVar).
-		compiler codeReturn.
-	compiler dedent.
-	compiler add: '] ifFalse: ['	.
-		compiler indent.
-		compiler add: 'context skipSeparators.'.
-		compiler codeReturn.
-		compiler dedent.
-	compiler add: '].'.
+    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: self retvalVar.
+    
+    compiler add: 'error ifTrue: [ '.
+    compiler indent.
+        compiler smartRestore: node child from: mementoVar.
+        compiler codeReturn.
+    compiler dedent.
+    compiler add: '] ifFalse: ['	.
+        compiler indent.
+        compiler add: 'context skipSeparators.'.
+        compiler codeReturn.
+        compiler dedent.
+    compiler add: '].'.
 !
 
 visitTrimmingTokenNode: node
-	|  id guard startVar endVar |
+    |  id guard startVar endVar |
 
-	startVar := compiler allocateTemporaryVariableNamed: 'start'.
-	endVar := compiler allocateTemporaryVariableNamed:  'end'.
-	
-	id := compiler idFor: node.
+    startVar := compiler allocateTemporaryVariableNamed: 'start'.
+    endVar := compiler allocateTemporaryVariableNamed:  'end'.
+    
+    id := compiler idFor: node.
 "	(id beginsWith: 'kw') ifTrue: [ self halt. ]."
-	"self compileFirstWhitespace: compiler."
-	self compileTokenWhitespace: node.
+    "self compileFirstWhitespace: compiler."
+    self compileTokenWhitespace: node.
+
+    (arguments guards and: [(guard := PPCGuard on: node) makesSense]) ifTrue: [ 
+        guard id: id, '_guard'.
+        compiler add: 'context atEnd ifTrue: [ self error ].'.
+        guard compileGuard: compiler.
+        compiler addOnLine: 'ifFalse: [ self error ].'.
+        compiler add: 'error ifFalse: ['.
+        compiler indent.
+    ].
 
-	(arguments guards and: [(guard := PPCGuard on: node) makesSense]) ifTrue: [ 
-		compiler add: 'context atEnd ifTrue: [ ^ self error ].'.
-		guard id: id, '_guard'.
-		guard compileGuard: compiler.
-		compiler addOnLine: 'ifFalse: [ ^ self error ].'
-	].
+    compiler codeAssign: 'context position + 1.' to: startVar.
+    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: #whatever.
+
+    (arguments guards and: [(guard := PPCGuard on: node) makesSense]) ifTrue: [ 
+        compiler dedent.
+        compiler add: '].'.
+    ].
 
-	compiler codeAssign: 'context position + 1.' to: startVar.
-	compiler codeStoreValueOf: [ self visit: node child ] intoVariable: #whatever.
-	compiler add: 'error ifFalse: [ '.
-	compiler indent.	
-	compiler codeAssign: 'context position.' to: endVar.
-	
+    compiler add: 'error ifFalse: [ '.
+    compiler indent.	
+    compiler codeAssign: 'context position.' to: endVar.
+    
 "	self compileSecondWhitespace: compiler."
-	self compileTokenWhitespace: node.
+    self compileTokenWhitespace: node.
 
-	compiler codeReturn: node tokenClass asString, ' on: (context collection) 
-																start: ', startVar, ' 
-																stop: ', endVar, '
-																value: nil'.
-	compiler dedent.																
-	compiler add: '].'
+    compiler codeReturn: node tokenClass asString, ' on: (context collection) 
+                                                                start: ', startVar, ' 
+                                                                stop: ', endVar, '
+                                                                value: nil'.
+    compiler dedent.																
+    compiler add: '].'
 !
 
 visitUnknownNode: node
-	| compiledChild compiledParser id |
+    | compiledChild compiledParser id |
 
-	id := compiler idFor: node.
-	
-	compiledParser := node parser copy.
-	"Compile all the children and call compiled version of them instead of the original one"
-	compiledParser children do: [ :child | 
-		compiledChild := self visit: child.
-		compiledParser replace: child with: compiledChild bridge.
-	].
-	
-	compiler addConstant: compiledParser as: id. 
-	
-	compiler codeClearError.
-	compiler add: '(', self retvalVar, ' := ', id, ' parseOn: context) isPetitFailure'.
-	compiler indent.
-	compiler add: ' ifTrue: [self error: retval message at: ', self retvalVar, ' position ].'.
-	compiler dedent.
-	compiler add: 'error := ', self retvalVar, ' isPetitFailure.'.
-	compiler codeReturn.
+    id := compiler idFor: node.
+    
+    compiledParser := node parser copy.
+    "Compile all the children and call compiled version of them instead of the original one"
+    compiledParser children do: [ :child | 
+        compiledChild := self visit: child.
+        compiledParser replace: child with: compiledChild bridge.
+    ].
+    
+    compiler addConstant: compiledParser as: id. 
+    
+    compiler codeClearError.
+    compiler add: '(', self retvalVar, ' := ', id, ' parseOn: context) isPetitFailure'.
+    compiler indent.
+    compiler add: ' ifTrue: [self error: retval message at: ', self retvalVar, ' position ].'.
+    compiler dedent.
+    compiler add: 'error := ', self retvalVar, ' isPetitFailure.'.
+    compiler codeReturn.
 ! !
 
--- a/compiler/PPCCompiledMethod.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCCompiledMethod.st	Sun May 10 06:46:56 2015 +0100
@@ -13,15 +13,15 @@
 !PPCCompiledMethod methodsFor:'as yet unclassified'!
 
 call
-	^ 'self ', self methodName, '.'.
+    ^ 'self ', self methodName, '.'.
 !
 
 id: value
-	id := value
+    id := value
 !
 
 methodName
-	^ id
+    ^ id
 ! !
 
 !PPCCompiledMethod class methodsFor:'documentation'!
--- a/compiler/PPCCompiler.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCCompiler.st	Sun May 10 06:46:56 2015 +0100
@@ -3,8 +3,9 @@
 "{ NameSpace: Smalltalk }"
 
 Object subclass:#PPCCompiler
-	instanceVariableNames:'compilerStack compiledParser cache currentMethod ids rootNode
-		constants compiledParserName returnVariable arguments'
+	instanceVariableNames:'compilerStack compiledParser cache currentMethod ids constants
+		compiledParserName compiledParserSuperclass returnVariable
+		arguments'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'PetitCompiler-Core'
@@ -36,85 +37,85 @@
 !PPCCompiler methodsFor:'accessing'!
 
 arguments: args
-	arguments := args
+    arguments := args
 !
 
 compiledParser
-	^ compiledParser 
+    ^ compiledParser 
+!
+
+compiledParserSuperclass
+    ^ compiledParserSuperclass ifNil: [ PPCompiledParser ]
 !
 
 currentNonInlineMethod
-	^ compilerStack 
-	    detect:[:m | m isInline not ] 
-	    ifNone:[ self error: 'No non-inlined method']
+    ^ compilerStack 
+        detect:[:m | m isInline not ] 
+        ifNone:[ self error: 'No non-inlined method']
 
     "Created: / 23-04-2015 / 17:33:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 currentReturnVariable
-	^ currentMethod returnVariable 
+    ^ currentMethod returnVariable 
 !
 
 ids
-	^ ids
-!
-
-rootNode
-	^ rootNode
+    ^ ids
 ! !
 
 !PPCCompiler methodsFor:'cleaning'!
 
 clean: class
 "	Transcript crShow: 'Cleaning time: ',
-	[	
+    [	
 "		self cleanGeneratedMethods: class.
-		self cleanInstVars: class.
-		self cleanConstants: class.
+        self cleanInstVars: class.
+        self cleanConstants: class.
 "	] timeToRun asMilliSeconds asString, 'ms'."
 !
 
 cleanConstants: class
-	class constants removeAll.
+    class constants removeAll.
 !
 
 cleanGeneratedMethods: class
-	((Smalltalk respondsTo:#isSmalltalkX) and:[ Smalltalk isSmalltalkX ]) ifTrue:[
-		class methodsDo: [ :mthd |
-			mthd category = #generated ifTrue:[
-				class removeSelector: mthd selector.
-			]
-		]
-	] ifFalse: [ 
-		(class allSelectorsInProtocol: #generated) do: [ :selector | 
-			class removeSelectorSilently: selector ].
-	]
+    ((Smalltalk respondsTo:#isSmalltalkX) and:[ Smalltalk isSmalltalkX ]) ifTrue:[
+        class methodsDo: [ :mthd |
+            mthd category = #generated ifTrue:[
+                class removeSelector: mthd selector.
+            ]
+        ]
+    ] ifFalse: [ 
+        (class allSelectorsInProtocol: #generated) do: [ :selector | 
+            class removeSelectorSilently: selector ].
+    ]
 !
 
 cleanInstVars: class
-	class class instanceVariableNames: ''.
+    class class instanceVariableNames: ''.
 !
 
 cleanParsers: class
-	class parsers removeAll.
+    class parsers removeAll.
 ! !
 
 !PPCCompiler methodsFor:'code generation'!
 
 add: string
-	currentMethod add: string.
+    currentMethod add: string.
 !
 
 addComment: string
-	currentMethod add: '"', string, '"'.
+    currentMethod add: '"', string, '"'.
 !
 
 addConstant: value as: name
-	constants at: name put: value
+    constants at: name put: value
 !
 
 addOnLine: string
-	currentMethod addOnLine: string.
+    currentMethod addOnLine: string.
 !
 
 addVariable: name
@@ -124,74 +125,81 @@
 !
 
 call: anotherMethod
-	currentMethod add: anotherMethod call.
+    currentMethod add: anotherMethod call.
 !
 
 callOnLine: anotherMethod
-	currentMethod addOnLine: anotherMethod call.
+    currentMethod addOnLine: anotherMethod call.
 !
 
 dedent
-	currentMethod dedent
+    currentMethod dedent
 !
 
 indent
-	currentMethod indent
+    currentMethod indent
 !
 
 nl
-	currentMethod nl
-!
-
-smartRemember: parser
-	self flag: 'deprecated'.
-	^ self smartRemember: parser to: #memento 
+    currentMethod nl
 !
 
-smartRemember: parser to: variableName
-	parser isContextFree ifTrue: [ 
-		^ variableName, ' := context lwRemember.'.
-	].
-	^ variableName, ':= context remember.'
-!
-
-smartRestore: parser
-	self flag: 'deprecated'.
-	^ self smartRestore: parser from: #memento 
+smartRemember: parser to: variableName 
+    parser isContextFree ifTrue: [ 
+        self 	codeAssign: 'context lwRemember.' 
+                to: variableName.
+    ] ifFalse: [ 
+        self  codeAssign: 'context remember.'
+                to: variableName.
+    ]
 !
 
 smartRestore: parser from: mementoName
-	parser isContextFree ifTrue: [ 
-		^ 'context lwRestore: ', mementoName, '.'.
-	].
-	^ 'context restore: ', mementoName, '.'.
+    parser isContextFree ifTrue: [ 
+        self add: 'context lwRestore: ', mementoName, '.'.
+    ] ifFalse: [ 
+        self add: 'context restore: ', mementoName, '.'.
+    ]
 ! !
 
 !PPCCompiler methodsFor:'code generation - coding'!
 
 codeAssign: code to: variable
-	self assert: variable isNil not.
-	
-	"TODO JK: Hack alert, whatever is magic constant!!"
-	(variable == #whatever) ifFalse: [ 
-		"Do not assign, if somebody does not care!!"
-		self add: variable ,' := ', code.
+    self assert: variable isNil not.
+    
+    "TODO JK: Hack alert, whatever is magic constant!!"
+    (variable == #whatever) ifFalse: [ 
+        "Do not assign, if somebody does not care!!"
+        self add: variable ,' := ', code.
  	] ifTrue: [ 
-		"In case code hava a side effect"
+        "In case code hava a side effect"
  		self add: code	
-	]
+    ]
 !
 
 codeClearError
-	self add: 'self clearError.'.
+    self add: 'self clearError.'.
 !
 
 codeError: errorMessage
-	self add: 'self error: ''', errorMessage, '''.'
+    self add: 'self error: ''', errorMessage, '''.'
 !
 
 codeHalt
-	self add: 'self halt. '
+    self add: 'self halt. '
+!
+
+codeHaltIfShiftPressed
+    arguments debug ifTrue: [ 
+        self add: 'Halt ifShiftPressed.'
+    ]
+!
+
+codeNextToken
+    self add: 'self nextToken.'
+
+    "Created: / 23-04-2015 / 18:01:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 23-04-2015 / 20:51:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 codeReturn
@@ -206,162 +214,179 @@
 !
 
 codeReturn: code
-	" - returns whatever is in code OR
-	  - assigns whatever is in code into the returnVariable"
+    " - returns whatever is in code OR
+      - assigns whatever is in code into the returnVariable"
    currentMethod isInline ifTrue:[ 
-		self codeAssign: code to: currentMethod returnVariable. 
+        self codeAssign: code to: currentMethod returnVariable. 
    ] ifFalse: [ 
-		self add: '^ ', code 		
-	]
+        self add: '^ ', code 		
+    ]
 
     "Created: / 23-04-2015 / 18:01:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 23-04-2015 / 20:51:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 codeStoreValueOf: aBlock intoVariable: aString
-	| tmpVarirable method |
-	self assert: aBlock isBlock.
-	self assert: aString isNil not.
-	
-	tmpVarirable := returnVariable.
-	returnVariable := aString.
-	method := [  
-		aBlock value 
-	] ensure: [ 
-		returnVariable := tmpVarirable 
-	].
-	
-	method isInline ifTrue: [ 
-		self callOnLine: method 
-	] ifFalse: [ 
-		self codeAssign: (method call) to: aString.
-	]	
-	
-	"Created: / 23-04-2015 / 18:21:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    | tmpVarirable method |
+    self assert: aBlock isBlock.
+    self assert: aString isNil not.
+    
+    tmpVarirable := returnVariable.
+    returnVariable := aString.
+    method := [  
+        aBlock value 
+    ] ensure: [ 
+        returnVariable := tmpVarirable 
+    ].
+    
+    method isInline ifTrue: [ 
+        self callOnLine: method 
+    ] ifFalse: [ 
+        self codeAssign: (method call) to: aString.
+    ]	
+    
+    "Created: / 23-04-2015 / 18:21:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+codeTranscriptShow: text
+    (arguments profile) ifTrue: [ 
+        self add: 'Transcript show: ', text storeString, '; cr.'.
+    ]
 ! !
 
 !PPCCompiler methodsFor:'code generation - ids'!
 
+asSelector: string
+    "e.g. '234znak 43 ) 2' asLegalSelector = #v234znak432"
+    
+    | toUse |
+ 	toUse := string select: [:char | char isAlphaNumeric or: [ char = $_ ] ].
+    (toUse isEmpty or: [ toUse first isLetter not ])
+        ifTrue: [ toUse := 'v', toUse ].
+    ^ toUse uncapitalized asSymbol.
+!
+
 idFor: object
-	self assert: (object isKindOf: PPCNode).
-	^ self idFor: object prefixed: object prefix suffixed: object suffix effect: #none
+    self assert: (object isKindOf: PPCNode).
+    ^ self idFor: object prefixed: object prefix suffixed: object suffix effect: #none
 !
 
 idFor: object prefixed: prefix
-	^ self idFor: object prefixed: prefix effect: #none
+    ^ self idFor: object prefixed: prefix effect: #none
 !
 
 idFor: object prefixed: prefix effect: effect
-	^ self idFor: object prefixed: prefix suffixed: '' effect: effect.
+    ^ self idFor: object prefixed: prefix suffixed: '' effect: effect.
 !
 
 idFor: object prefixed: prefix suffixed: suffix effect: effect
-        | name id |
-        ^ ids at: object ifAbsentPut: [ 
-                ((object isKindOf: PPCNode) and: [object name isNotNil]) ifTrue: [ 
-                        "Do not use prefix, if there is a name"
-                        name := object name.
-                        "Selector sanitizing inlined here as Smalltalk/X does not
-                         support asLegalSelector"
-                        name := name select: [:char | char isAlphaNumeric].
-                        (name isEmpty or: [ name first isLetter not ])
-                            ifTrue: [ name := 'v', name ].
-                        id := (name, suffix) asSymbol.
-                        
-                        "Make sure, that the generated ID is uniqe!!"
-                        (ids includes: id) ifTrue: [ 
-                                (id, '_', ids size asString) asSymbol 
-                        ] ifFalse: [ 
-                                id
-                        ]
-                ] ifFalse: [ 
-                        (prefix, '_', (ids size asString), suffix) asSymbol
-                ]
+    | name id |
+    ^ ids at: object ifAbsentPut: [ 
+        ((object isKindOf: PPCNode) and: [object name isNotNil]) ifTrue: [ 
+            "Do not use prefix, if there is a name"
+            name := self asSelector: object name.
+            id := (name, suffix) asSymbol.
+            
+            "Make sure, that the generated ID is uniqe!!"
+            (ids includes: id) ifTrue: [ 
+                (id, '_', ids size asString) asSymbol 
+            ] ifFalse: [ 
+                id
+            ]
+        ] ifFalse: [ 
+            (prefix, '_', (ids size asString), suffix) asSymbol
         ]
+    ]
+!
 
-    "Modified: / 01-05-2015 / 14:38:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+idFor: object suffixed: suffix
+    self assert: (object isKindOf: PPCNode) description: 'Shold use PPCNode for ids'.
+    ^ self idFor: object prefixed: object prefix suffixed: suffix effect: #none
 ! !
 
 !PPCCompiler methodsFor:'code generation - support'!
 
 cache: id as: value
-	cache at: id put: value.
+    cache at: id put: value.
 !
 
 cachedValue: id
-	^ cache at: id ifAbsent: [ nil ]
+    ^ cache at: id ifAbsent: [ nil ]
 !
 
 checkCache: id
-	| method  |
-	"Check if method is hand written"
-	method := compiledParser ifNotNil: [ compiledParser compiledMethodAt: id ifAbsent: [ nil ] ].
-	method ifNotNil: [ ^ PPCCompiledMethod new id: id; yourself ].
-	
-	^ self cachedValue: id
+    | method  |
+    "Check if method is hand written"
+    method := compiledParser ifNotNil: [ compiledParser compiledMethodAt: id ifAbsent: [ nil ] ].
+    method ifNotNil: [ ^ PPCCompiledMethod new id: id; yourself ].
+    
+    ^ self cachedValue: id
 !
 
 pop
-	| retval |
-	retval := compilerStack pop.
-	currentMethod := compilerStack isEmpty 
-		ifTrue: [ nil ]
-		ifFalse: [ compilerStack top ].
-	^ retval
+    | retval |
+    retval := compilerStack pop.
+    currentMethod := compilerStack isEmpty 
+        ifTrue: [ nil ]
+        ifFalse: [ compilerStack top ].
+    ^ retval
 
     "Modified: / 21-11-2014 / 12:27:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 push
-        compilerStack push: currentMethod.
-        (compilerStack size > 500 )ifTrue: [ self error: 'unless it is very complex grammar, there is an error somewhere' ]
+    compilerStack push: currentMethod.
+    (compilerStack size > 500 )ifTrue: [ self error: 'unless it is very complex grammar, there is an error somewhere' ]
 
     "Modified: / 21-11-2014 / 12:27:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 startInline: id
-	(cache includesKey: id) ifTrue: [ self error: 'OOOUPS!!' ].
-
-	currentMethod := PPCInlinedMethod new.
-	currentMethod id: id.   
-	currentMethod profile: arguments profile.
-	currentMethod returnVariable: returnVariable.
-	self push.
+    | indentationLevel |
+    (cache includesKey: id) ifTrue: [ self error: 'OOOUPS!!' ].
+    indentationLevel := currentMethod indentationLevel.
+    
+    currentMethod := PPCInlinedMethod new.
+    currentMethod id: id.   
+    currentMethod profile: arguments profile.
+    currentMethod returnVariable: returnVariable.
+    currentMethod indentationLevel: indentationLevel.
+    self push.
 
     "Modified: / 23-04-2015 / 18:28:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 startMethod: id
-	(cache includesKey: id) ifTrue: [ self error: 'OOOUPS!!' ].
+    (cache includesKey: id) ifTrue: [ self error: 'OOOUPS!!' ].
 
-	currentMethod := PPCMethod new.
-	currentMethod id: id.
-	currentMethod profile: arguments profile.    
-	self push.      
+    currentMethod := PPCMethod new.
+    currentMethod id: id.
+    currentMethod profile: arguments profile.    
+    self push.      
                 
-	self cache: id as: currentMethod.
+    self cache: id as: currentMethod.
 
     "Modified: / 23-04-2015 / 18:36:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 stopInline
 
-	^ self pop.
+    ^ self pop.
 
     "Modified: / 23-04-2015 / 18:28:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 stopMethod
-        self cache: currentMethod methodName as: currentMethod.
-        
-        arguments profile ifTrue: [ Transcript show: currentMethod code; cr. ].
-        ^ self pop.
+    self cache: currentMethod methodName as: currentMethod.
+    
+    arguments profile ifTrue: [ Transcript show: currentMethod code; cr. ].
+    ^ self pop.
 
     "Modified: / 01-05-2015 / 14:18:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 top
-	^ compilerStack top
+    ^ compilerStack top
 ! !
 
 !PPCCompiler methodsFor:'code generation - variables'!
@@ -387,104 +412,73 @@
 !PPCCompiler methodsFor:'compiling'!
 
 compileParser
-	self installVariables.
-	self installMethods.
-	self installClassConstants.
+    self installVariables.
+    self installMethods.
+    self installClassConstants.
 
-	^ compiledParser
+    ^ compiledParser
 !
 
 copy: parser
-	^ parser transform: [ :p | p copy ].
+    ^ parser transform: [ :p | p copy ].
 !
 
 installClassConstants
-	constants keysAndValuesDo: [ :key :value |
-		compiledParser constants at: key put: value
-	]
+    constants keysAndValuesDo: [ :key :value |
+        compiledParser constants at: key put: value
+    ]
 !
 
 installMethods
-	cache keysAndValuesDo: [ :key :method |
-		compiledParser compileSilently: method code classified: 'generated'.
-	]
+    cache keysAndValuesDo: [ :key :method |
+        compiledParser compileSilently: method code classified: 'generated'.
+    ]
 !
 
 installVariables
-	| varString |
-	varString := constants keys inject: '' into: [:r :e | r, ' ', e  ].
-
-	PPCompiledParser 
-		subclass: compiledParserName  
-		instanceVariableNames: varString 
-		classVariableNames: '' 
-		poolDictionaries: '' 
-		category: 'PetitCompiler-Generated'.
-
-	compiledParser := Smalltalk at: compiledParserName.
-!
-
-precomputeFirstSets: root
-	| firstSets |
-	firstSets := root firstSets.
-	
-	root allNodesDo: [ :node |
-		node firstSet: (firstSets at: node).
-	]
-	
-!
+    | varString |
+    varString := constants keys inject: '' into: [:r :e | r, ' ', e  ].
 
-precomputeFollowSets: root
-	| followSets |
-	followSets := root followSets.
-	
-	root allNodesDo: [ :node |
-		node followSet: (followSets at: node).
-	]
-	
-!
+    (self compiledParserSuperclass) 
+        subclass: compiledParserName  
+        instanceVariableNames: varString 
+        classVariableNames: '' 
+        poolDictionaries: '' 
+        category: 'PetitCompiler-Generated'.
 
-precomputeFollowSetsWithTokens: root
-	| followSets |
-	followSets := root followSetsSuchThat: [:e | e isTerminal or: [ e isKindOf: PPCTrimmingTokenNode ]].
-	
-	root allNodesDo: [ :node |
-		node followSetWithTokens: (followSets at: node).
-	]
-	
-!
-
-toCompilerTree: parser
-	^ parser asCompilerTree
+    compiledParser := Smalltalk at: compiledParserName.
 ! !
 
 !PPCCompiler methodsFor:'initialization'!
 
 initializeForCompiledClassName: aString
-	
-	self initialize.
-	compilerStack := Stack new.
-	cache := IdentityDictionary new.
-	constants := IdentityDictionary new.
-	ids := IdentityDictionary new.
-	
+    
+    self initialize.
+    compilerStack := Stack new.
+    cache := IdentityDictionary new.
+    constants := IdentityDictionary new.
+    ids := IdentityDictionary new.
+    
 
-	compiledParserName := aString asSymbol.
-	
-	((Smalltalk respondsTo:#isSmalltalkX) and:[ Smalltalk isSmalltalkX ]) ifTrue:[
-		| rPackageOrganizer |
-		rPackageOrganizer := Smalltalk at: #RPackageOrganizer.
-		rPackageOrganizer notNil ifTrue:[
-			rPackageOrganizer default registerPackageNamed: 'PetitCompiler-Generated'.
-		].
-	] ifFalse: [ 
-		RPackageOrganizer default registerPackageNamed: 'PetitCompiler-Generated'.
-	].
+    compiledParserName := aString asSymbol.
+    
+    ((Smalltalk respondsTo:#isSmalltalkX) and:[ Smalltalk isSmalltalkX ]) ifTrue:[
+        | rPackageOrganizer |
+        rPackageOrganizer := Smalltalk at: #RPackageOrganizer.
+        rPackageOrganizer notNil ifTrue:[
+            rPackageOrganizer default registerPackageNamed: 'PetitCompiler-Generated'.
+        ].
+    ] ifFalse: [ 
+        RPackageOrganizer default registerPackageNamed: 'PetitCompiler-Generated'.
+    ].
 
-	Smalltalk at: compiledParserName ifPresent: [ :class |
-		compiledParser := class.
-		self clean: compiledParser.
-	].
+    Smalltalk at: compiledParserName ifPresent: [ :class |
+        compiledParser := class.
+        self clean: compiledParser.
+    ].
+
+
+    Transcript cr; show: 'intialized for: ', aString; cr.
 ! !
 
 !PPCCompiler class methodsFor:'documentation'!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCCompilerTokenRememberStrategy.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,45 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+Object subclass:#PPCCompilerTokenRememberStrategy
+	instanceVariableNames:'compiler'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Core'
+!
+
+!PPCCompilerTokenRememberStrategy class methodsFor:'instance creation'!
+
+on: aPPCCompiler
+    ^ self new
+        compiler: aPPCCompiler;
+        yourself
+! !
+
+!PPCCompilerTokenRememberStrategy methodsFor:'accessing'!
+
+compiler: aPPCCompiler
+    compiler := aPPCCompiler 
+! !
+
+!PPCCompilerTokenRememberStrategy methodsFor:'as yet unclassified'!
+
+smartRemember: parser to: variableName 
+    parser isContextFree ifTrue: [ 
+        compiler 	codeAssign: 'context lwRemember.' 
+                    to: variableName.
+    ] ifFalse: [ 
+        compiler codeAssign: 'context remember.'
+                    to: variableName.
+    ]
+!
+
+smartRestore: parser from: mementoName
+    parser isContextFree ifTrue: [ 
+        compiler add: 'context lwRestore: ', mementoName, '.'.
+    ] ifFalse: [ 
+        compiler add: 'context restore: ', mementoName, '.'.
+    ].
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCCompilerTokenizingRememberStrategy.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,47 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+Object subclass:#PPCCompilerTokenizingRememberStrategy
+	instanceVariableNames:'compiler'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Core'
+!
+
+!PPCCompilerTokenizingRememberStrategy class methodsFor:'instance creation'!
+
+on: aPPCCompiler
+    ^ self new
+        compiler: aPPCCompiler;
+        yourself
+! !
+
+!PPCCompilerTokenizingRememberStrategy methodsFor:'accessing'!
+
+compiler: aPPCCompiler
+    compiler := aPPCCompiler 
+! !
+
+!PPCCompilerTokenizingRememberStrategy methodsFor:'as yet unclassified'!
+
+smartRemember: parser to: variableName 
+    parser isContextFree ifTrue: [ 
+        compiler codeAssign: '{ context lwRemember. currentTokenType . currentTokenValue }.' 
+                    to: variableName.
+    ] ifFalse: [ 
+        compiler codeAssign: '{ context remember. currentTokenType . currentTokenValue }.'
+                    to: variableName.
+    ]
+!
+
+smartRestore: parser from: mementoName
+    parser isContextFree ifTrue: [ 
+        compiler add: 'context lwRestore: ', mementoName, ' first.'.
+    ] ifFalse: [ 
+        compiler add: 'context restore: ', mementoName, ' first.'.
+    ].
+    compiler codeAssign: mementoName, ' second.' to: 'currentTokenType'.
+    compiler codeAssign: mementoName, ' third.' to: 'currentTokenValue'.	
+! !
+
--- a/compiler/PPCConfiguration.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCConfiguration.st	Sun May 10 06:46:56 2015 +0100
@@ -11,125 +11,226 @@
 
 !PPCConfiguration class methodsFor:'as yet unclassified'!
 
+LL1
+    ^ PPCLL1Configuration new
+!
+
 default
-	^ PPCFirstPrototype new
+    ^ self universal
 !
 
 new
-	^ self basicNew
-		initialize;
-		yourself
+    ^ self basicNew
+        initialize;
+        yourself
+!
+
+universal
+    ^ PPCUniversalConfiguration new
 ! !
 
 !PPCConfiguration methodsFor:'accessing'!
 
+arguments
+ 	arguments isNil ifTrue: [ arguments := self defaultArguments ].
+	^ arguments
+!
+
 arguments: args
-	arguments := args
+    arguments := args
+!
+
+defaultArguments
+ 	^ PPCArguments default
 !
 
 input: whatever
-	ir := whatever.
-	self remember: #input.
+    ir := whatever.
+    self remember: #input.
 !
 
 ir
-	^ ir
+    ^ ir
 !
 
 ir: whatever
-	ir := whatever
+    ir := whatever
 ! !
 
-!PPCConfiguration methodsFor:'as yet unclassified'!
+!PPCConfiguration methodsFor:'caching'!
+
+cacheFirstSet
+    "Creates a PPCNodes from a PPParser"
+    | firstSets |
+    firstSets := ir firstSets.
+    ir allNodesDo: [ :node |
+        node firstSet: (firstSets at: node)
+    ]
+!
+
+cacheFirstSetWithProductions
+    "Creates a PPCNodes from a PPParser"
+    | firstSets |
+    firstSets := ir firstSetsSuchThat: [:e | e name isNil not ].
+    ir allNodesDo: [ :node |
+        node firstSetWithProductions: (firstSets at: node)
+    ]
+!
+
+cacheFirstSetWithTokens
+    "Creates a PPCNodes from a PPParser"
+    | firstSets |
+    firstSets := ir firstSetsSuchThat: [:e | e isTerminal or: [ e isTokenNode ] ].
+    ir allNodesDo: [ :node |
+        node firstSetWithTokens: (firstSets at: node)
+    ]
+!
+
+cacheFollowSet
+    "Creates a PPCNodes from a PPParser"
+    | followSets |
+    followSets := ir followSets.
+    ir allNodesDo: [ :node |
+        node followSet: (followSets at: node)
+    ]
+!
+
+cacheFollowSetWithTokens
+    "Creates a PPCNodes from a PPParser"
+    | followSets |
+    followSets := ir firstSetsSuchThat: [:e | e isTerminal or: [ e isTokenNode ] ].
+    ir allNodesDo: [ :node |
+        node followSetWithTokens: (followSets at: node)
+    ]
+! !
+
+!PPCConfiguration methodsFor:'compiling'!
 
 compile: whatever
-	self input: whatever.
-	self invokePhases.
-	^ ir
+    self input: whatever.
+    self invokePhases.
+    ^ ir
 !
 
-compile: whatever arguments: args
-	self arguments: args.
-	^ self compile: whatever.
+invokePhases
+    self subclassResponsibility
+! !
+
+!PPCConfiguration methodsFor:'debugging'!
+
+copy: somethingTransformable
+    ^ somethingTransformable transform: [ :e | e copy ]
 !
 
 remember: key
-	arguments debug ifTrue: [ 
-		history add: key -> (ir copy).
-	]
+    self arguments debug ifTrue: [ 
+        history add: key -> (self copy: ir).
+    ]
+! !
+
+!PPCConfiguration methodsFor:'hooks'!
+
+codeCompilerOn: args
+    ^ PPCCompiler on: args
+!
+
+codeGeneratorVisitorOn: compiler
+    ^ arguments codeGenerator on: compiler
 ! !
 
 !PPCConfiguration methodsFor:'initialization'!
 
 initialize
-	history := OrderedCollection new
+    history := OrderedCollection new
 ! !
 
 !PPCConfiguration methodsFor:'phases'!
 
+cacheFirstFollow
+    arguments cacheFirstFollow ifFalse: [ ^ self ] .
+    
+    self cacheFirstSet.
+    self cacheFollowSet.
+    self cacheFirstSetWithTokens.
+    self cacheFollowSetWithTokens.
+!
+
 check
-	ir checkTree 
+    ir checkTree 
+!
+
+createRecognizingComponents
+    arguments recognizingComponents ifFalse: [ ^ self ] .
+    
+    ir :=  PPCRecognizerComponentDetector new
+        arguments: arguments;
+        visit: ir.
+    self remember: #recognizingComponents
+!
+
+createTokens
+    arguments detectTokens ifFalse: [ ^ self ] .
+    
+    ir :=  PPCTokenDetector new
+        arguments: arguments;
+        visit: ir.
+    self remember: #createTokens
 !
 
 generate
-	| compiler rootMethod compiledParser |
-	arguments generate ifFalse: [ ^ self ].
-	
-	compiler := PPCCompiler on: arguments.
-	
-	rootMethod := (PPCCodeGenerator on: compiler)
-		arguments: arguments;
-		visit: ir.
-	
-	compiler compileParser.
-	compiler compiledParser startSymbol: rootMethod methodName.
-	compiledParser := compiler compiledParser new.
-	
-	ir := compiledParser.
+    | compiler rootMethod compiledParser |
+    arguments generate ifFalse: [ ^ self ].
+    
+    compiler := self codeCompilerOn: arguments.
+    
+    rootMethod := (self codeGeneratorVisitorOn: compiler)
+        arguments: arguments;
+        visit: ir.
+    
+    compiler compileParser.
+    compiler compiledParser startSymbol: rootMethod methodName.
+    compiledParser := compiler compiledParser new.
+    
+    ir := compiledParser.
 !
 
 inline
-	arguments inline ifFalse: [ ^ self ].
-	
-	ir := PPCInliningVisitor new
-		arguments: arguments;
-		visit: ir.
-	self remember: #inline.
+    arguments inline ifFalse: [ ^ self ].
+    
+    ir := PPCInliningVisitor new
+        arguments: arguments;
+        visit: ir.
+    self remember: #inline.
 !
 
 merge
-	arguments merge ifFalse: [ ^ self ].
-	
-	ir :=  PPCMergingVisitor new
-		arguments: arguments;
-		visit: ir.
-	self remember: #merge
+    "Merge equivalent nodes under one object with single identity"
+    arguments merge ifFalse: [ ^ self ].
+    
+    ir :=  PPCMergingVisitor new
+        arguments: arguments;
+        visit: ir.
+    self remember: #merge
 !
 
 specialize
-	arguments specialize ifFalse: [ ^ self ].
+    arguments specialize ifFalse: [ ^ self ].
 
-	" 
-		Invokes a visitor that creates specialized nodes
-		for some patterns of PPCNodes
-	"
-	ir :=  (PPCOptimizingVisitor new
-		arguments: arguments;
-		visit: ir).
-	self remember: #specialize
+    " 
+        Invokes a visitor that creates specialized nodes
+        for some patterns of PPCNodes, 
+        
+        e.g. $a astar can be represented by PPCCharacterStarNode
+    "
+    ir :=  (PPCSpecializingVisitor new
+        arguments: arguments;
+        visit: ir).
+    self remember: #specialize
 !
 
 toPPCIr
-	ir := ir asCompilerTree.
-	self remember: #ppcNodes
-!
-
-tokenize
-	arguments tokenize ifFalse: [ ^ self ] .
-	
-	ir :=  PPCTokenDetector new
-		arguments: arguments;
-		visit: ir.
-	self remember: #tokenize
+    "Creates a PPCNodes from a PPParser"
+    ir := ir asCompilerTree.
+    self remember: #ppcNodes
 ! !
 
--- a/compiler/PPCContext.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCContext.st	Sun May 10 06:46:56 2015 +0100
@@ -3,7 +3,8 @@
 "{ NameSpace: Smalltalk }"
 
 PPStream subclass:#PPCContext
-	instanceVariableNames:'root properties globals furthestFailure compiledParser rc ws'
+	instanceVariableNames:'root properties globals furthestFailure compiledParser rc ws
+		currentTokenType currentTokenValue'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'PetitCompiler-Context'
@@ -13,269 +14,269 @@
 !PPCContext class methodsFor:'as yet unclassified'!
 
 new
-	^ self basicNew initialize
+    ^ self basicNew initialize
 !
 
 on: aPPParser stream: aStream
-	^ self basicNew 
-		initialize;
-		root: aPPParser;
-		stream: aStream asPetitStream;
-		yourself
+    ^ self basicNew 
+        initialize;
+        root: aPPParser;
+        stream: aStream asPetitStream;
+        yourself
 ! !
 
 !PPCContext methodsFor:'accessing-globals'!
 
 globalAt: aKey
-	"Answer the global property value associated with aKey."
-	
-	^ self globalAt: aKey ifAbsent: [ self error: 'Property not found' ]
+    "Answer the global property value associated with aKey."
+    
+    ^ self globalAt: aKey ifAbsent: [ self error: 'Property not found' ]
 !
 
 globalAt: aKey ifAbsent: aBlock
-	"Answer the global property value associated with aKey or, if aKey isn't found, answer the result of evaluating aBlock."
-	
-	^ globals isNil
-		ifTrue: [ aBlock value ]
-		ifFalse: [ globals at: aKey ifAbsent: aBlock ]
+    "Answer the global property value associated with aKey or, if aKey isn't found, answer the result of evaluating aBlock."
+    
+    ^ globals isNil
+        ifTrue: [ aBlock value ]
+        ifFalse: [ globals at: aKey ifAbsent: aBlock ]
 !
 
 globalAt: aKey ifAbsentPut: aBlock
-	"Answer the global property associated with aKey or, if aKey isn't found store the result of evaluating aBlock as new value."
-	
-	^ self globalAt: aKey ifAbsent: [ self globalAt: aKey put: aBlock value ]
+    "Answer the global property associated with aKey or, if aKey isn't found store the result of evaluating aBlock as new value."
+    
+    ^ self globalAt: aKey ifAbsent: [ self globalAt: aKey put: aBlock value ]
 !
 
 globalAt: aKey put: anObject
-	"Set the global property at aKey to be anObject. If aKey is not found, create a new entry for aKey and set is value to anObject. Answer anObject."
+    "Set the global property at aKey to be anObject. If aKey is not found, create a new entry for aKey and set is value to anObject. Answer anObject."
 
-	^ (globals ifNil: [ globals := Dictionary new: 1 ])
-		at: aKey put: anObject
+    ^ (globals ifNil: [ globals := Dictionary new: 1 ])
+        at: aKey put: anObject
 !
 
 hasGlobal: aKey
-	"Test if the global property aKey is present."
-	
-	^ globals notNil and: [ globals includesKey: aKey ]
+    "Test if the global property aKey is present."
+    
+    ^ globals notNil and: [ globals includesKey: aKey ]
 !
 
 invoke: parser
-	^ parser parseOn: self
+    ^ parser parseOn: self
 !
 
 peek2
-	position = readLimit ifTrue: [ ^ nil ].
-	^ collection at: (position + 1)
+    position = readLimit ifTrue: [ ^ nil ].
+    ^ collection at: (position + 1)
 !
 
 removeGlobal: aKey
-	"Remove the property with aKey. Answer the property or raise an error if aKey isn't found."
-	
-	^ self removeGlobal: aKey ifAbsent: [ self error: 'Property not found' ]
+    "Remove the property with aKey. Answer the property or raise an error if aKey isn't found."
+    
+    ^ self removeGlobal: aKey ifAbsent: [ self error: 'Property not found' ]
 !
 
 removeGlobal: aKey ifAbsent: aBlock
-	"Remove the global property with aKey. Answer the value or, if aKey isn't found, answer the result of evaluating aBlock."
-	
-	| answer |
-	globals isNil ifTrue: [ ^ aBlock value ].
-	answer := globals removeKey: aKey ifAbsent: aBlock.
-	globals isEmpty ifTrue: [ globals := nil ].
-	^ answer
+    "Remove the global property with aKey. Answer the value or, if aKey isn't found, answer the result of evaluating aBlock."
+    
+    | answer |
+    globals isNil ifTrue: [ ^ aBlock value ].
+    answer := globals removeKey: aKey ifAbsent: aBlock.
+    globals isEmpty ifTrue: [ globals := nil ].
+    ^ answer
 ! !
 
 !PPCContext methodsFor:'accessing-properties'!
 
 hasProperty: aKey
-	"Test if the property aKey is present."
-	
-	^ properties notNil and: [ properties includesKey: aKey ]
+    "Test if the property aKey is present."
+    
+    ^ properties notNil and: [ properties includesKey: aKey ]
 !
 
 propertyAt: aKey
-	"Answer the property value associated with aKey."
-	
-	^ self propertyAt: aKey ifAbsent: [ self error: 'Property not found' ]
+    "Answer the property value associated with aKey."
+    
+    ^ self propertyAt: aKey ifAbsent: [ self error: 'Property not found' ]
 !
 
 propertyAt: aKey ifAbsent: aBlock
-	"Answer the property value associated with aKey or, if aKey isn't found, answer the result of evaluating aBlock."
-	
-	^ properties isNil
-		ifTrue: [ aBlock value ]
-		ifFalse: [ properties at: aKey ifAbsent: aBlock ]
+    "Answer the property value associated with aKey or, if aKey isn't found, answer the result of evaluating aBlock."
+    
+    ^ properties isNil
+        ifTrue: [ aBlock value ]
+        ifFalse: [ properties at: aKey ifAbsent: aBlock ]
 !
 
 propertyAt: aKey ifAbsentPut: aBlock
-	"Answer the property associated with aKey or, if aKey isn't found store the result of evaluating aBlock as new value."
-	
-	^ self propertyAt: aKey ifAbsent: [ self propertyAt: aKey put: aBlock value ]
+    "Answer the property associated with aKey or, if aKey isn't found store the result of evaluating aBlock as new value."
+    
+    ^ self propertyAt: aKey ifAbsent: [ self propertyAt: aKey put: aBlock value ]
 !
 
 propertyAt: aKey put: anObject
-	"Set the property at aKey to be anObject. If aKey is not found, create a new entry for aKey and set is value to anObject. Answer anObject."
+    "Set the property at aKey to be anObject. If aKey is not found, create a new entry for aKey and set is value to anObject. Answer anObject."
 
-	^ (properties ifNil: [ properties := Dictionary new: 1 ])
-		at: aKey put: anObject
+    ^ (properties ifNil: [ properties := Dictionary new: 1 ])
+        at: aKey put: anObject
 !
 
 removeProperty: aKey
-	"Remove the property with aKey. Answer the property or raise an error if aKey isn't found."
-	
-	^ self removeProperty: aKey ifAbsent: [ self error: 'Property not found' ]
+    "Remove the property with aKey. Answer the property or raise an error if aKey isn't found."
+    
+    ^ self removeProperty: aKey ifAbsent: [ self error: 'Property not found' ]
 !
 
 removeProperty: aKey ifAbsent: aBlock
-	"Remove the property with aKey. Answer the value or, if aKey isn't found, answer the result of evaluating aBlock."
-	
-	| answer |
-	properties isNil ifTrue: [ ^ aBlock value ].
-	answer := properties removeKey: aKey ifAbsent: aBlock.
-	properties isEmpty ifTrue: [ properties := nil ].
-	^ answer
+    "Remove the property with aKey. Answer the value or, if aKey isn't found, answer the result of evaluating aBlock."
+    
+    | answer |
+    properties isNil ifTrue: [ ^ aBlock value ].
+    answer := properties removeKey: aKey ifAbsent: aBlock.
+    properties isEmpty ifTrue: [ properties := nil ].
+    ^ answer
 ! !
 
 !PPCContext methodsFor:'acessing'!
 
 initializeFor: parser
-	rc := 0.
-	parser == root ifTrue: [ ^ self ].
-	
-	root := parser.
+    rc := 0.
+    parser == root ifTrue: [ ^ self ].
+    
+    root := parser.
 !
 
 root
-	^ root 
+    ^ root 
 !
 
 stream
-	^ self
+    ^ self
 !
 
 stream: aStream
-	collection := aStream collection.
-	position := aStream position.
-	readLimit := collection size.
+    collection := aStream collection.
+    position := aStream position.
+    readLimit := collection size.
 ! !
 
 !PPCContext methodsFor:'converting'!
 
 asCompiledParserContext
-	^ self
+    ^ self
 ! !
 
 !PPCContext methodsFor:'failures'!
 
 furthestFailure
-	^ furthestFailure 
+    ^ furthestFailure 
 !
 
 noteFailure: aPPFailure
-	(aPPFailure position > furthestFailure position)
-		ifTrue: [ furthestFailure := aPPFailure ].
+    (aPPFailure position > furthestFailure position)
+        ifTrue: [ furthestFailure := aPPFailure ].
 ! !
 
 !PPCContext methodsFor:'initialization'!
 
 compiledParser
-	^ compiledParser
+    ^ compiledParser
 !
 
 compiledParser: anObject
-	compiledParser := anObject
+    compiledParser := anObject
 !
 
 initialize
-	
-	rc := 0.
-	"Note a failure at -1"
-	furthestFailure  := PPFailure new position: -1; yourself.
+    
+    rc := 0.
+    "Note a failure at -1"
+    furthestFailure  := PPFailure new position: -1; yourself.
 ! !
 
 !PPCContext methodsFor:'memoization'!
 
 lwRemember
 
-	^ position
+    ^ position
 !
 
 lwRestore: aPPContextMemento
-	
-	position := aPPContextMemento.
+    
+    position := aPPContextMemento.
 !
 
 remember
-	| memento |
+    | memento |
 "
-	^ position
+    ^ position
 "
-	memento := PPCContextMemento new
-		position: position;
-		yourself.
-		
-	self rememberProperties: memento.
-	"JK: Just while developing"
-	rc := rc + 1.
-	(rc > ((self size + 1)* 1000*1000)) ifTrue: [ self error: 'Hey, this is not normal, is it?' ].
-	^ memento
+    memento := PPCContextMemento new
+        position: position;
+        yourself.
+        
+    self rememberProperties: memento.
+    "JK: Just while developing"
+    rc := rc + 1.
+    (rc > ((self size + 1)* 1000*1000)) ifTrue: [ self error: 'Hey, this is not normal, is it?' ].
+    ^ memento
 !
 
 rememberProperties: aPPContextMemento
-	properties ifNil: [ ^ self ].
-	
-	properties keysAndValuesDo: [ :key :value |
-		aPPContextMemento propertyAt: key put: value
-	].
+    properties ifNil: [ ^ self ].
+    
+    properties keysAndValuesDo: [ :key :value |
+        aPPContextMemento propertyAt: key put: value
+    ].
 !
 
 restore: aPPContextMemento
 "	
-	position := aPPContextMemento.
+    position := aPPContextMemento.
 "	
-	position := aPPContextMemento position.
-	
-	self restoreProperties: aPPContextMemento.
-			
+    position := aPPContextMemento position.
+    
+    self restoreProperties: aPPContextMemento.
+            
 !
 
 restoreProperties: aPPContextMemento
-	properties ifNil: [ ^ self ].
-	
-	properties keysDo: [ :key |
-		(aPPContextMemento hasProperty: key)
-			ifTrue: [ properties at: key put: (aPPContextMemento propertyAt: key) ]
-			ifFalse: [ properties removeKey: key  ]. 
-	].
+    properties ifNil: [ ^ self ].
+    
+    properties keysDo: [ :key |
+        (aPPContextMemento hasProperty: key)
+            ifTrue: [ properties at: key put: (aPPContextMemento propertyAt: key) ]
+            ifFalse: [ properties removeKey: key  ]. 
+    ].
 
-	aPPContextMemento keysAndValuesDo: [ :key :value |
-		properties at: key put: value
-	]
+    aPPContextMemento keysAndValuesDo: [ :key :value |
+        properties at: key put: value
+    ]
 ! !
 
 !PPCContext methodsFor:'whitespace'!
 
 atWs
-	^ position = ws
+    ^ position = ws
 !
 
 goUpTo: char
-	[ position < readLimit ] whileTrue: [ 
-		(collection at: position + 1) == char ifTrue: [ position := position + 1. ^ char ] .
-		position := position + 1.
-	]
-	
+    [ position < readLimit ] whileTrue: [ 
+        (collection at: position + 1) == char ifTrue: [ position := position + 1. ^ char ] .
+        position := position + 1.
+    ]
+    
 !
 
 setWs
-	^ ws := position
+    ^ ws := position
 !
 
 ws
-	^ ws
+    ^ ws
 !
 
 ws: anInteger
-	ws := anInteger
+    ws := anInteger
 ! !
 
 !PPCContext class methodsFor:'documentation'!
--- a/compiler/PPCContextMemento.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCContextMemento.st	Sun May 10 06:46:56 2015 +0100
@@ -12,99 +12,99 @@
 !PPCContextMemento methodsFor:'accessing'!
 
 position
-	^ position
+    ^ position
 !
 
 position: anInteger
-	position := anInteger 
+    position := anInteger 
 ! !
 
 !PPCContextMemento methodsFor:'accessing - properties'!
 
 hasProperty: aKey
-	"Test if the property aKey is present."
-	
-	^ properties notNil and: [ properties includesKey: aKey ]
+    "Test if the property aKey is present."
+    
+    ^ properties notNil and: [ properties includesKey: aKey ]
 !
 
 keysAndValuesDo: aBlock
-	properties ifNil: [ ^ self ].
-	properties keysAndValuesDo: [ :key :value | aBlock value: key value: value copy ] 
+    properties ifNil: [ ^ self ].
+    properties keysAndValuesDo: [ :key :value | aBlock value: key value: value copy ] 
 !
 
 propertiesSize
-	properties ifNil: [ ^ 0 ].
-	^ properties size.
+    properties ifNil: [ ^ 0 ].
+    ^ properties size.
 !
 
 propertyAt: aKey
-	"Answer the property value associated with aKey."
-	
-	^ self propertyAt: aKey ifAbsent: [ self error: 'Property not found' ]
+    "Answer the property value associated with aKey."
+    
+    ^ self propertyAt: aKey ifAbsent: [ self error: 'Property not found' ]
 !
 
 propertyAt: aKey ifAbsent: aBlock
-	"Answer the property value associated with aKey or, if aKey isn't found, answer the result of evaluating aBlock."
+    "Answer the property value associated with aKey or, if aKey isn't found, answer the result of evaluating aBlock."
         
-	properties isNil ifFalse: [ 
-		(properties includesKey: aKey) ifTrue: [ 
-			^ (properties at: aKey) copy
-		].
-	].
-	^ aBlock value
+    properties isNil ifFalse: [ 
+        (properties includesKey: aKey) ifTrue: [ 
+            ^ (properties at: aKey) copy
+        ].
+    ].
+    ^ aBlock value
 
     "Modified: / 15-04-2015 / 11:19:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 propertyAt: aKey ifAbsentPut: aBlock
-	"Answer the property associated with aKey or, if aKey isn't found store the result of evaluating aBlock as new value."
-	
-	^ self propertyAt: aKey ifAbsent: [ self propertyAt: aKey put: aBlock value ]
+    "Answer the property associated with aKey or, if aKey isn't found store the result of evaluating aBlock as new value."
+    
+    ^ self propertyAt: aKey ifAbsent: [ self propertyAt: aKey put: aBlock value ]
 !
 
 propertyAt: aKey put: anObject
-	"Set the property at aKey to be anObject. If aKey is not found, create a new entry for aKey and set is value to anObject. Answer anObject."
+    "Set the property at aKey to be anObject. If aKey is not found, create a new entry for aKey and set is value to anObject. Answer anObject."
 
-	^ (properties ifNil: [ properties := Dictionary new: 1 ])
-		at: aKey put: (anObject copy)
+    ^ (properties ifNil: [ properties := Dictionary new: 1 ])
+        at: aKey put: (anObject copy)
 !
 
 removeProperty: aKey
-	"Remove the property with aKey. Answer the property or raise an error if aKey isn't found."
-	
-	^ self removeProperty: aKey ifAbsent: [ self error: 'Property not found' ]
+    "Remove the property with aKey. Answer the property or raise an error if aKey isn't found."
+    
+    ^ self removeProperty: aKey ifAbsent: [ self error: 'Property not found' ]
 !
 
 removeProperty: aKey ifAbsent: aBlock
-	"Remove the property with aKey. Answer the value or, if aKey isn't found, answer the result of evaluating aBlock."
-	
-	| answer |
-	properties isNil ifTrue: [ ^ aBlock value ].
-	answer := properties removeKey: aKey ifAbsent: aBlock.
-	properties isEmpty ifTrue: [ properties := nil ].
-	^ answer
+    "Remove the property with aKey. Answer the value or, if aKey isn't found, answer the result of evaluating aBlock."
+    
+    | answer |
+    properties isNil ifTrue: [ ^ aBlock value ].
+    answer := properties removeKey: aKey ifAbsent: aBlock.
+    properties isEmpty ifTrue: [ properties := nil ].
+    ^ answer
 ! !
 
 !PPCContextMemento methodsFor:'comparing'!
 
 = anObject
-	
-	(self == anObject) ifTrue: [ ^ true ].
-	(anObject class = PPCContextMemento) ifFalse: [ ^ false ].
-	
-	(anObject position = position) ifFalse: [ ^ false ].
+    
+    (self == anObject) ifTrue: [ ^ true ].
+    (anObject class = PPCContextMemento) ifFalse: [ ^ false ].
+    
+    (anObject position = position) ifFalse: [ ^ false ].
 
-	(self propertiesSize = anObject propertiesSize) ifFalse: [ ^ false ].
+    (self propertiesSize = anObject propertiesSize) ifFalse: [ ^ false ].
 
-	self keysAndValuesDo: [ :key :value |
-		(anObject hasProperty: key) ifFalse: [ ^ false ].
-		((anObject propertyAt: key) = value) ifFalse: [ ^ false ]. 
+    self keysAndValuesDo: [ :key :value |
+        (anObject hasProperty: key) ifFalse: [ ^ false ].
+        ((anObject propertyAt: key) = value) ifFalse: [ ^ false ]. 
  	].
-	
-	^ true.
+    
+    ^ true.
 !
 
 hash
-	^ position hash bitXor: properties hash.
+    ^ position hash bitXor: properties hash.
 ! !
 
--- a/compiler/PPCCopyVisitor.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCCopyVisitor.st	Sun May 10 06:46:56 2015 +0100
@@ -12,9 +12,9 @@
 !PPCCopyVisitor methodsFor:'as yet unclassified'!
 
 visitNode: node
-	| newNode |
-	self change.
-	newNode := node copy.
-	^ super visitNode: newNode.
+    | newNode |
+    self change.
+    newNode := node copy.
+    ^ super visitNode: newNode.
 ! !
 
--- a/compiler/PPCDelegateNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCDelegateNode.st	Sun May 10 06:46:56 2015 +0100
@@ -13,35 +13,39 @@
 !PPCDelegateNode methodsFor:'accessing'!
 
 child
-	^ child
+    ^ child
 !
 
 child: whatever
-	child := whatever 
+    child := whatever 
 !
 
 children
-	^ { child }
+    ^ { child }
 ! !
 
 !PPCDelegateNode methodsFor:'analysis'!
 
 acceptsEpsilon
-	^ child acceptsEpsilonOpenSet: (IdentitySet with: self).
+    ^ child acceptsEpsilonOpenSet: (IdentitySet with: self).
 !
 
 acceptsEpsilonOpenSet: set
-	(set includes: child) ifFalse: [ 
-		set add: child.
-		^ child acceptsEpsilonOpenSet: set 
-	].
-	^ false
+    (set includes: child) ifFalse: [ 
+        set add: child.
+        ^ child acceptsEpsilonOpenSet: set 
+    ].
+    ^ false
+!
+
+recognizedSentencesPrim
+    ^ self child recognizedSentencesPrim 
 ! !
 
 !PPCDelegateNode methodsFor:'transformation'!
 
 replace: node with: anotherNode
-	child == node ifTrue: [ child := anotherNode ]
+    child == node ifTrue: [ child := anotherNode ]
 ! !
 
 !PPCDelegateNode class methodsFor:'documentation'!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCDeterministicChoiceNode.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,17 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCChoiceNode subclass:#PPCDeterministicChoiceNode
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Nodes'
+!
+
+!PPCDeterministicChoiceNode methodsFor:'visiting'!
+
+accept: visitor
+    ^ visitor visitDeterministicChoiceNode: self
+! !
+
--- a/compiler/PPCEndOfFileNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCEndOfFileNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,12 +12,24 @@
 !PPCEndOfFileNode methodsFor:'accessing'!
 
 prefix
-	^ #eof
+    ^ #eof
+! !
+
+!PPCEndOfFileNode methodsFor:'analysis'!
+
+acceptsEpsilon
+    self halt.
+    ^ false
+!
+
+acceptsEpsilonOpenSet: set
+    self halt.
+    ^ false
 ! !
 
 !PPCEndOfFileNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitEndOfFileNode: self.
+    ^ visitor visitEndOfFileNode: self.
 ! !
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCEndOfInputNode.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,21 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCDelegateNode subclass:#PPCEndOfInputNode
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Nodes'
+!
+
+!PPCEndOfInputNode methodsFor:'as yet unclassified'!
+
+accept: visitor
+    ^ visitor visitEndOfInputNode: self
+!
+
+prefix
+    ^ #endOfInput
+! !
+
--- a/compiler/PPCFirstPrototype.st	Tue May 05 16:25:23 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-"{ Package: 'stx:goodies/petitparser/compiler' }"
-
-"{ NameSpace: Smalltalk }"
-
-PPCConfiguration subclass:#PPCFirstPrototype
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'PetitCompiler-Core'
-!
-
-!PPCFirstPrototype methodsFor:'as yet unclassified'!
-
-invokePhases
-	self toPPCIr.
-	self specialize.
-	self tokenize.
-	self specialize.
-	self inline.
-	self merge.
-	self check.	
-	self generate.
-! !
-
--- a/compiler/PPCForwardNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCForwardNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,21 +12,21 @@
 !PPCForwardNode methodsFor:'accessing'!
 
 prefix
-	^ #fw
+    ^ #fw
 ! !
 
 !PPCForwardNode methodsFor:'analysis'!
 
 check
-	^ (self name notNil and: [ 
-		child name = self name and: [
-		child suffix = self suffix
-	]]) ifTrue: [ 'referring to itself!!' ]
+    ^ (self name notNil and: [ 
+        child name = self name and: [
+        child suffix = self suffix
+    ]]) ifTrue: [ 'referring to itself!!' ]
 ! !
 
 !PPCForwardNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitForwardNode: self
+    ^ visitor visitForwardNode: self
 ! !
 
--- a/compiler/PPCGuard.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCGuard.st	Sun May 10 06:46:56 2015 +0100
@@ -12,104 +12,76 @@
 !PPCGuard class methodsFor:'as yet unclassified'!
 
 on: aPPCNode
-	^ self new
-		initializeFor: aPPCNode;
-		yourself
+    ^ self new
+        initializeFor: aPPCNode;
+        yourself
 ! !
 
 !PPCGuard methodsFor:'accessing'!
 
 classification
-	^ classification
+    ^ classification
 !
 
 id
-	
-	^ id
+    
+    ^ id
 !
 
 id: anObject
-	
-	id := anObject
+    
+    id := anObject
 !
 
 message
-	(message == #unknown) ifTrue: [ 
-		(self testMessage: #isLetter) ifTrue: [ ^ message := #isLetter ].
-		(self testMessage: #isAlphaNumeric) ifTrue: [ ^ message := #isAlphaNumeric ].
-		(self testMessage: #isDigit) ifTrue: [ ^ message := #isDigit ].
-		
-		^ message := nil.
-	].
-	^ message
+    (message == #unknown) ifTrue: [ 
+        (self testMessage: #isLetter) ifTrue: [ ^ message := #isLetter ].
+        (self testMessage: #isAlphaNumeric) ifTrue: [ ^ message := #isAlphaNumeric ].
+        (self testMessage: #isDigit) ifTrue: [ ^ message := #isDigit ].
+        
+        ^ message := nil.
+    ].
+    ^ message
 ! !
 
 !PPCGuard methodsFor:'as yet unclassified'!
 
 classificationOn: aBlock
-	classification := Array new: 255.
-	1 to: classification size do: [ :index |
-		classification at: index put: (aBlock
-			value: (Character value: index)) ].
+    classification := Array new: 255.
+    1 to: classification size do: [ :index |
+        classification at: index put: (aBlock
+            value: (Character value: index)) ].
 !
 
 compileAny: compiler
-	compiler add: '(context atEnd not)'.
+    compiler add: '(context atEnd not)'.
 !
 
 compileCharacter: compiler
-	self assert: (classification select: [ :e | e ]) size = 1.
-	
-	classification keysAndValuesDo: [ :index :value | value ifTrue: [  
-		(index > 32 and: [ index < 127 ]) ifTrue: [ 
-			compiler add: '(context peek = ', (Character value: index) storeString, ')'
-		] ifFalse: [ 
-			id := compiler idFor: (Character value: index) prefixed: #character.
-			compiler addConstant: (Character value: index) as: id.
-			compiler add: '(context peek = ', id, ')'.
-	 	] 
-	] ].
-
+    self assert: (classification select: [ :e | e ]) size = 1.
+    
+    classification keysAndValuesDo: [ :index :value | value ifTrue: [  
+        (index > 32 and: [ index < 127 ]) ifTrue: [ 
+            compiler add: '(context peek = ', (Character value: index) storeString, ')'
+        ] ifFalse: [ 
+            id := compiler idFor: (Character value: index) prefixed: #character.
+            compiler addConstant: (Character value: index) as: id.
+            compiler add: '(context peek = ', id, ')'.
+     	] 
+    ] ].
 !
 
 compileGuard: compiler id: symbol
-	self id: symbol.
-	^ self compileGuard: compiler
+    self id: symbol.
+    ^ self compileGuard: compiler
 !
 
 compileMessage: compiler
-	compiler add: '(context peek ', message, ')'
-!
-
-initializeFor: node
-	message := #unknown.
-	id := nil.
-	
-	"No Guards for trimming parser so far"
-	((node firstSetSuchThat: [ :e | e isKindOf: PPCTrimNode ]) isEmpty) ifFalse: [ 
-		^ self initializeForNoGuard 
-	].
-	(node acceptsEpsilon) ifTrue: [  
-		^ self initializeForEpsilon
-	].
-
-	self classificationOn: [:char | node firstSet anySatisfy: [:e | (e firstCharSetCached value: char) ]]
-
-"	self classificationOn: [ :char | node firstSet anySatisfy: [ :e |  (e firstCharParser parse: char asString) isPetitFailure not ] ]"
-!
-
-initializeForEpsilon
-	classification := nil
-	
-!
-
-initializeForNoGuard
-	classification := nil
-	
+    compiler add: '(context peek ', message, ')'
 !
 
 testAny
-	^ classification allSatisfy: [ :e | e ].
+    ^ classification allSatisfy: [ :e | e ].
 !
 
 testMessage: selector
@@ -122,33 +94,62 @@
 !
 
 testSingleCharacter
-	^ (classification select: [ :e | e ]) size = 1
+    ^ (classification select: [ :e | e ]) size = 1
 ! !
 
 !PPCGuard methodsFor:'code generation'!
 
 compileArray: compiler
-	| array |
-	self assert: id isNotNil.
+    | array |
+    self assert: id isNotNil.
 
-	array := ((classification asOrderedCollection) addLast: false; yourself) asArray.
-	compiler addConstant: array as: id.
-	compiler add: '(', id, ' at: context peek asInteger)'.
+    array := ((classification asOrderedCollection) addLast: false; yourself) asArray.
+    compiler addConstant: array as: id.
+    compiler add: '(', id, ' at: context peek asInteger)'.
 !
 
 compileGuard: compiler
-	self assert: self makesSense description: 'No Guard could be compiled'.
-	self assert: id notNil.
-	
-	
-	self message ifNotNil: [ ^ self compileMessage: compiler ].
-	self testAny ifTrue: [ ^ self compileAny: compiler ].
-	self testSingleCharacter ifTrue: [ ^ self compileCharacter: compiler ].
-	
-	^ self compileArray: compiler
+    self assert: self makesSense description: 'No Guard could be compiled'.
+    self assert: id notNil.
+    
+    
+    self message ifNotNil: [ ^ self compileMessage: compiler ].
+    self testAny ifTrue: [ ^ self compileAny: compiler ].
+    self testSingleCharacter ifTrue: [ ^ self compileCharacter: compiler ].
+    
+    ^ self compileArray: compiler
 !
 
 makesSense
-	^ classification isNil not
+    ^ classification isNil not
 ! !
 
+!PPCGuard methodsFor:'initialization'!
+
+initializeFor: node
+    message := #unknown.
+    id := nil.
+    
+    "No Guards for trimming parser so far"
+"	((node firstSetSuchThat: [ :e | e isKindOf: PPCTrimNode ]) isEmpty) ifFalse: [ 
+        ^ self initializeForNoGuard 
+    ]."
+    (node acceptsEpsilon) ifTrue: [  
+        ^ self initializeForEpsilon
+    ].
+
+    self classificationOn: [:char | node firstSet anySatisfy: [:e | (e firstCharSetCached value: char) ]]
+
+"	self classificationOn: [ :char | node firstSet anySatisfy: [ :e |  (e firstCharParser parse: char asString) isPetitFailure not ] ]"
+!
+
+initializeForEpsilon
+    classification := nil
+    
+!
+
+initializeForNoGuard
+    classification := nil
+    
+! !
+
--- a/compiler/PPCInlinedMethod.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCInlinedMethod.st	Sun May 10 06:46:56 2015 +0100
@@ -12,27 +12,27 @@
 !PPCInlinedMethod methodsFor:'as yet unclassified'!
 
 call
-	^ self code
+    ^ self code
 !
 
 code
-	^ buffer contents trimRight
+    ^ buffer contents trimRight
 !
 
 isInline
-	^ true
+    ^ true
 ! !
 
 !PPCInlinedMethod methodsFor:'code generation - variables'!
 
 allocateReturnVariable
-	self error: 'return variable must be assigned by the non-inlined method....'
+    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>"
 !
 
 allocateTemporaryVariableNamed:aString
-	self error: 'sorry, I can''t allocate variables....'
+    self error: 'sorry, I can''t allocate variables....'
 
    "Created: / 23-04-2015 / 21:06:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
--- a/compiler/PPCInliningVisitor.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCInliningVisitor.st	Sun May 10 06:46:56 2015 +0100
@@ -12,61 +12,61 @@
 !PPCInliningVisitor methodsFor:'initialization'!
 
 initialize
-	super 	initialize.
-		
-	acceptedNodes := 0
+    super 	initialize.
+        
+    acceptedNodes := 0
 ! !
 
 !PPCInliningVisitor methodsFor:'testing'!
 
 canInline
-	^ acceptedNodes > 1
+    ^ acceptedNodes > 1
 ! !
 
 !PPCInliningVisitor methodsFor:'visiting'!
 
 beforeAccept: node
-	acceptedNodes := acceptedNodes + 1.
-	super beforeAccept: node
+    acceptedNodes := acceptedNodes + 1.
+    super beforeAccept: node
 !
 
 markForInline: node
-	self canInline ifTrue: [ 
-		node markForInline.
-	].
-	^ node
+    self canInline ifTrue: [ 
+        node markForInline.
+    ].
+    ^ node
 !
 
 visitCharSetPredicateNode: node
-	^ self markForInline: node
+    ^ self markForInline: node
 !
 
 visitCharacterNode: node
-	^ self markForInline: node
+    ^ self markForInline: node
 !
 
 visitLiteralNode: node
-	^ self markForInline: node
+    ^ self markForInline: node
 !
 
 visitMessagePredicateNode: node
-	^ self markForInline: node
+    ^ self markForInline: node
 !
 
 visitNilNode: node
-	^ self markForInline: node
+    ^ self markForInline: node
 !
 
 visitNotCharSetPredicateNode: node
-	^ self markForInline: node
+    ^ self markForInline: node
 !
 
 visitNotLiteralNode: node
-	^ self markForInline: node
+    ^ self markForInline: node
 !
 
 visitNotMessagePredicateNode: node
-	^ self markForInline: node
+    ^ self markForInline: node
 !
 
 visitPluggableNode: node
@@ -74,18 +74,32 @@
      the VM does not provide enough information to map
      it back to source code. Very bad indeed!!"
     ((Smalltalk respondsTo:#isSmalltalkX) and:[ Smalltalk isSmalltalkX ]) ifFalse:[
-			^ self markForInline: node
+			self markForInline: node
     ].
     ^ super visitPluggableNode: node.
 
     "Modified: / 23-04-2015 / 12:15:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+visitTokenConsumeNode: node
+    super visitTokenConsumeNode: node.
+    node name isNil ifTrue: [ 
+        self markForInline: node
+    ].
+    ^ node
+!
+
 visitTokenStarMessagePredicateNode: node
-	^ self markForInline: node
+    ^ self markForInline: node
 !
 
 visitTokenStarSeparatorNode: node
-	^ self markForInline: node
+    ^ self markForInline: node
+!
+
+visitTokenWhitespaceNode: node
+    super visitTokenWhitespaceNode: node.
+    self markForInline: node.
+    ^ node
 ! !
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCLL1Configuration.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,72 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCConfiguration subclass:#PPCLL1Configuration
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Core'
+!
+
+!PPCLL1Configuration methodsFor:'accessing'!
+
+defaultArguments
+ 	^ PPCArguments default
+		guards: false;
+		yourself
+! !
+
+!PPCLL1Configuration methodsFor:'compiling'!
+
+invokePhases
+    self toPPCIr.
+    self createTokens.
+    self cacheFirstFollow.
+    self createLL1Choices.
+    self tokenize.
+
+    "Merge duplicate tokens and recompute first follow"
+    self merge.
+    self cacheFirstFollow.
+
+    self specialize.
+    self createRecognizingComponents.
+    self specialize.
+    self inline.
+    self merge.
+    self check.	
+    self generate.
+! !
+
+!PPCLL1Configuration methodsFor:'hooks'!
+
+codeCompilerOn: args
+    ^ PPCTokenizingCompiler on: args
+!
+
+codeGeneratorVisitorOn: compiler
+    ^ PPCTokenizingCodeGenerator on: compiler
+! !
+
+!PPCLL1Configuration methodsFor:'phases'!
+
+createLL1Choices
+    ir :=  PPCLL1Visitor new
+        arguments: arguments;
+        visit: ir.
+    self remember: #LL1
+!
+
+tokenize
+    "
+        This will try transform the parser into the tokenizing parser
+    "
+    arguments tokenize ifFalse: [ ^ self ] .
+    
+    ir :=  PPCTokenizingVisitor new
+        arguments: arguments;
+        visit: ir.
+    self remember: #tokenize
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCLL1Visitor.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,54 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCRewritingVisitor subclass:#PPCLL1Visitor
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Visitors'
+!
+
+!PPCLL1Visitor methodsFor:'as yet unclassified'!
+
+isDeterministicChoice: node
+    | firsts |
+    firsts := OrderedCollection new.
+    node children do: [ :child |
+        (self startsWithToken: child) ifFalse: [ ^ false ].
+        firsts addAll: child firstSetWithTokens.
+    ].
+    (firsts asIdentitySet size = firsts size) ifFalse: [ ^ false ].
+
+    firsts allPairsDo: [ :e1 :e2 | 
+        e1 == e2 ifFalse: [
+            (e1 overlapsWith: e2) ifTrue: [ ^ false ] ].
+    ].
+    ^ true
+!
+
+startsWithToken: node
+    | firstSet terminal total |
+    total := 0.
+    firstSet := node firstSetWithTokens.
+        
+    terminal := (firstSet detect: [ :e | e isTerminal ] ifNone: [ nil ]).
+    terminal isNil ifFalse: [ ^ false ].
+        
+    ^ true
+!
+
+visitChoiceNode: node
+    super visitChoiceNode: node.
+    (self isDeterministicChoice: node) ifTrue: [ 
+        self change.
+        ^ PPCDeterministicChoiceNode new
+            children: node children;
+            name: node name;
+            firstFollowCache: node firstFollowCache;
+            yourself
+    ].
+
+    ^ node
+! !
+
--- a/compiler/PPCLLChoiceNode.st	Tue May 05 16:25:23 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-"{ Package: 'stx:goodies/petitparser/compiler' }"
-
-"{ NameSpace: Smalltalk }"
-
-PPCChoiceNode subclass:#PPCLLChoiceNode
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'PetitCompiler-Nodes'
-!
-
-!PPCLLChoiceNode methodsFor:'visiting'!
-
-accept: visitor
-	^ visitor visitLLChoiceNode: self
-! !
-
--- a/compiler/PPCListNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCListNode.st	Sun May 10 06:46:56 2015 +0100
@@ -13,51 +13,51 @@
 !PPCListNode class methodsFor:'as yet unclassified'!
 
 withAll: aCollection
-	^ self basicNew children: aCollection
+    ^ self basicNew children: aCollection
 ! !
 
 !PPCListNode methodsFor:'accessing'!
 
 children
-	^ children
+    ^ children
 !
 
 children: anObject
-	
-	children := anObject
+    
+    children := anObject
 !
 
 firstChild
-	^ self children first
+    ^ self children first
 !
 
 secondChild
-	^ self children second
+    ^ self children second
 ! !
 
 !PPCListNode methodsFor:'analysis'!
 
 acceptsEpsilon
-	self subclassResponsibility
+    self subclassResponsibility
 !
 
 acceptsEpsilonOpenSet: set
-	self subclassResponsibility
+    self subclassResponsibility
 ! !
 
 !PPCListNode methodsFor:'copying'!
 
 postCopy
-	super postCopy.
-	children := children copy
+    super postCopy.
+    children := children copy
 ! !
 
 !PPCListNode methodsFor:'transformation'!
 
 replace: node with: anotherNode
-	children keysAndValuesDo: [ :index :child |
-		child == node ifTrue: [ children at: index put: anotherNode ] 
-	]
+    children keysAndValuesDo: [ :index :child |
+        child == node ifTrue: [ children at: index put: anotherNode ] 
+    ]
 ! !
 
 !PPCListNode class methodsFor:'documentation'!
--- a/compiler/PPCLiteralNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCLiteralNode.st	Sun May 10 06:46:56 2015 +0100
@@ -9,9 +9,22 @@
 	category:'PetitCompiler-Nodes'
 !
 
+!PPCLiteralNode methodsFor:'comparing'!
+
+recognizedSentencesPrim
+    ^ Array with: literal.
+! !
+
+!PPCLiteralNode methodsFor:'printing'!
+
+printNameOn: aStream
+    super printNameOn: aStream.
+    aStream nextPutAll: ', '; print: literal
+! !
+
 !PPCLiteralNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitLiteralNode: self
+    ^ visitor visitLiteralNode: self
 ! !
 
--- a/compiler/PPCMergingVisitor.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCMergingVisitor.st	Sun May 10 06:46:56 2015 +0100
@@ -12,34 +12,34 @@
 !PPCMergingVisitor methodsFor:'as yet unclassified'!
 
 equivalentNode: node
-	^  nodeSet detect: [ :e | e = node ]
+    ^  nodeSet detect: [ :e | e = node ]
 !
 
 hasEquivalentNode: node
-	^ nodeSet includes: node
+    ^ nodeSet includes: node
 !
 
 initialize
-	super initialize.
-	
-	nodeSet := Set new
+    super initialize.
+    
+    nodeSet := Set new
 !
 
 store: node
-	self assert: (self hasEquivalentNode: node) not.
-	nodeSet add: node
+    self assert: (self hasEquivalentNode: node) not.
+    nodeSet add: node
 !
 
 visitNode: node
-	super visitNode: node.
-	
-	(self hasEquivalentNode: node) ifTrue: [
-		self change.
-		^ self equivalentNode: node
-	] ifFalse: [  
-		self store: node
-	].
+    super visitNode: node.
+    
+    (self hasEquivalentNode: node) ifTrue: [
+        self change.
+        ^ self equivalentNode: node
+    ] ifFalse: [  
+        self store: node
+    ].
 
-	^ node
+    ^ node
 ! !
 
--- a/compiler/PPCMessagePredicateNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCMessagePredicateNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,19 +12,19 @@
 !PPCMessagePredicateNode methodsFor:'accessing'!
 
 message
-	
-	^ message
+    
+    ^ message
 !
 
 message: anObject
-	
-	message := anObject
+    
+    message := anObject
 ! !
 
 !PPCMessagePredicateNode methodsFor:'analysis'!
 
 firstCharSet
-	^ PPCharSetPredicate on: [:e | e perform: message ]
+    ^ PPCharSetPredicate on: [:e | e perform: message ]
 
     "Modified: / 23-04-2015 / 22:13:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
@@ -32,17 +32,24 @@
 !PPCMessagePredicateNode methodsFor:'comparing'!
 
 = anotherNode
-	super = anotherNode ifFalse: [ ^ false ].
-	^ message = anotherNode message.
+    super = anotherNode ifFalse: [ ^ false ].
+    ^ message = anotherNode message.
 !
 
 hash
-	^ super hash bitXor: message hash
+    ^ super hash bitXor: message hash
+! !
+
+!PPCMessagePredicateNode methodsFor:'printing'!
+
+printNameOn: aStream
+    super printNameOn: aStream.
+    aStream nextPutAll: ', '; print: message
 ! !
 
 !PPCMessagePredicateNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitMessagePredicateNode: self
+    ^ visitor visitMessagePredicateNode: self
 ! !
 
--- a/compiler/PPCMethod.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCMethod.st	Sun May 10 06:46:56 2015 +0100
@@ -18,117 +18,87 @@
     ^ self basicNew initialize.
 ! !
 
-!PPCMethod methodsFor:'as yet unclassified'!
-
-add: string
-	self nl.
-	indentation timesRepeat: [ buffer nextPut: Character tab  ].
-	self addOnLine: string.
-!
-
-addOnLine: string
-	buffer nextPutAll: string.
-!
-
-addVariable: name
-    <resource: #obsolete>
-    self obsoleteFeatureWarning:'Use #allocateTemporaryVariableNamed: instead'.
-    self error: 'Should no longer be used'
-
-    "Modified: / 02-05-2015 / 06:49:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
+!PPCMethod methodsFor:'accessing'!
 
 body
-	^ buffer contents
+    ^ buffer contents
 !
 
 bridge
-	^ PPCBridge on: self methodName.
-!
-
-call
-	^ 'self ', self methodName, '.'.
+    ^ PPCBridge on: self methodName.
 !
 
 code
-	^ self methodName, Character cr asString,  
-		self variables, Character cr asString,
-		self profilingBegin, Character cr asString,
-		self body, Character cr asString
+    ^ self methodName, Character cr asString,  
+        self variables, Character cr asString,
+        self profilingBegin, Character cr asString,
+        self body, Character cr asString
 "               self profilingEnd"
 
     "Modified: / 23-04-2015 / 19:26:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-dedent
-	indentation := indentation - 1
-!
-
 id: value
-	id := value
-!
-
-indent 
-	indentation := indentation + 1
-!
-
-isInline
-	^ false
-!
-
-isMethod
-	^ true
+    id := value
 !
 
 methodName
-	^ id
-!
-
-nl
-	^ buffer nextPut: Character cr
+    ^ id
 !
 
 profile
-	^ profile
+    ^ profile
 !
 
 profile: aBoolean
-	profile := aBoolean 
+    profile := aBoolean 
+! !
+
+!PPCMethod methodsFor:'as yet unclassified'!
+
+add: string
+    self nl.
+    indentation timesRepeat: [ buffer nextPut: Character tab  ].
+    self addOnLine: string.
+!
+
+addOnLine: string
+    buffer nextPutAll: string.
+!
+
+call
+    ^ 'self ', self methodName, '.'.
+!
+
+nl
+    ^ buffer nextPut: Character cr
 !
 
 profilingBegin
-	self profile ifTrue: [ 
+    self profile ifTrue: [ 
  		^ '  context methodInvoked: #', id, '.'	
-	].
-	^ ''
+    ].
+    ^ ''
 !
 
 profilingEnd
-	self profile ifTrue: [ 
+    self profile ifTrue: [ 
  		^ '  context methodFinished: #', id, '.'	
-	].
-	^ ''
-!
-
-returnVariable
-    ^  variableForReturn
-
-    "Created: / 23-04-2015 / 20:50:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-returnVariable: aString
-    ^ variableForReturn := aString
-
-    "Created: / 23-04-2015 / 18:23:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 23-04-2015 / 21:08:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-variables
-	^ '  | ', (variables inject: '' into: [ :s :e | s, ' ', e]), ' |'
+    ].
+    ^ ''
 ! !
 
 !PPCMethod methodsFor:'code generation - variables'!
 
+addVariable: name
+    (variables includes: name) ifTrue:[ 
+        self error:'Duplicate variable name, must rename'.
+    ].
+    variables add: name.
+
+    "Modified: / 23-04-2015 / 12:29:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 allocateReturnVariable
     
 	^ variableForReturn isNil ifTrue:[ 
@@ -156,17 +126,52 @@
     ].
 
     "Created: / 23-04-2015 / 17:37:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+returnVariable
+    ^  variableForReturn
+
+    "Created: / 23-04-2015 / 20:50:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+returnVariable: aString
+    ^ variableForReturn := aString
+
+    "Created: / 23-04-2015 / 18:23:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 23-04-2015 / 21:08:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+variables
+    ^ '  | ', (variables inject: '' into: [ :s :e | s, ' ', e]), ' |'
+! !
+
+!PPCMethod methodsFor:'indentation'!
+
+dedent
+    indentation := indentation - 1
+!
+
+indent 
+    indentation := indentation + 1
+!
+
+indentationLevel
+    ^ indentation
+!
+
+indentationLevel: value
+    indentation := value
 ! !
 
 !PPCMethod methodsFor:'initialization'!
 
 initialize
-	buffer := WriteStream on: ''.
-	indentation := 1.
-	variables := OrderedCollection new.
+    buffer := WriteStream on: ''.
+    indentation := 1.
+    variables := OrderedCollection new.
 ! !
 
-!PPCMethod methodsFor:'printing & storing'!
+!PPCMethod methodsFor:'printing'!
 
 printOn:aStream
     "append a printed representation if the receiver to the argument, aStream"
@@ -178,6 +183,16 @@
     "Modified: / 23-04-2015 / 12:32:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!PPCMethod methodsFor:'testing'!
+
+isInline
+    ^ false
+!
+
+isMethod
+    ^ true
+! !
+
 !PPCMethod class methodsFor:'documentation'!
 
 version_HG
--- a/compiler/PPCNegateNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCNegateNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,6 +12,6 @@
 !PPCNegateNode methodsFor:'accessing'!
 
 prefix
-	^ #negate
+    ^ #negate
 ! !
 
--- a/compiler/PPCNilNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCNilNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,26 +12,26 @@
 !PPCNilNode methodsFor:'accessing'!
 
 prefix
-	^ #nil
+    ^ #nil
 ! !
 
 !PPCNilNode methodsFor:'analysis'!
 
 acceptsEpsilon
-	^ true
+    ^ true
 !
 
 firstCharSet
-	^ PPCharSetPredicate on: [:e | false ] 
+    ^ PPCharSetPredicate on: [:e | false ] 
 !
 
 isNullable
-	^ true
+    ^ true
 ! !
 
 !PPCNilNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitNilNode: self
+    ^ visitor visitNilNode: self
 ! !
 
--- a/compiler/PPCNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCNode.st	Sun May 10 06:46:56 2015 +0100
@@ -3,7 +3,7 @@
 "{ NameSpace: Smalltalk }"
 
 Object subclass:#PPCNode
-	instanceVariableNames:'contextFree name firstFollowCache firstCharSet properties'
+	instanceVariableNames:'contextFree name properties'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'PetitCompiler-Nodes'
@@ -12,13 +12,39 @@
 !PPCNode class methodsFor:'as yet unclassified'!
 
 new
-	^ self basicNew initialize
+    ^ self basicNew initialize
+! !
+
+!PPCNode methodsFor:'PetitParser mimicry'!
+
+allParsersDo: aBlock
+    "I need to mimic PetitParser protocol in order to get transformed from PPParser to PPCNode"
+    ^ self allNodesDo: aBlock
+!
+
+allParsersDo: aBlock seen: aSet
+    "I need to mimic PetitParser protocol in order to get transformed from PPParser to PPCNode"
+    ^ self allNodesDo: aBlock seen: aSet
 ! !
 
 !PPCNode methodsFor:'accessing'!
 
 children
-	^ #()
+    ^ #()
+!
+
+firstFollowCache
+    ^ self propertyAt: #firstFollowCache ifAbsentPut: [ IdentityDictionary new ]
+!
+
+firstFollowCache: value
+    self propertyAt: #firstFollowCache put: value
+!
+
+markForGuard
+    "Marks receiver for guards, i.e., it's guard code
+     should be part of the generated code"
+    self propertyAt: #guard put: true
 !
 
 markForInline
@@ -30,20 +56,35 @@
 !
 
 name
-	^ name
+    ^ name
 !
 
 name: anObject
-	
-	name := anObject
+    
+    name := anObject
+!
+
+parser
+    ^ self propertyAt: #parser ifAbsent: [ nil ]
+!
+
+parser: value
+    self propertyAt: #parser put: value
 !
 
 prefix
-	^ 'anode' 
+    ^ 'node' 
 !
 
 suffix
-	^ ''
+    ^ ''
+!
+
+unmarkForGuard
+    "Forbids compiling of guards, if guards would be available"
+    self propertyAt: #guard put: false
+
+    "Created: / 23-04-2015 / 15:39:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 unmarkForInline
@@ -56,354 +97,397 @@
 !PPCNode methodsFor:'accessing-properties'!
 
 hasProperty: aKey
-	"Test if the property aKey is present."
-	
-	^ properties notNil and: [ properties includesKey: aKey ]
+    "Test if the property aKey is present."
+    
+    ^ properties notNil and: [ properties includesKey: aKey ]
 !
 
 properties
-	^ properties
+    ^ properties
 !
 
 properties: aDictionary
-	properties := aDictionary 
+    properties := aDictionary 
 !
 
 propertyAt: aKey 
-	^ self propertyAt: [ aKey ] ifAbsent: [ nil ]
+    ^ self propertyAt: aKey  ifAbsent: [ nil ]
 !
 
 propertyAt: aKey ifAbsent: aBlock
-	"Answer the property value associated with aKey or, if aKey isn't found, answer the result of evaluating aBlock."
-	
-	^ properties isNil
-		ifTrue: [ aBlock value ]
-		ifFalse: [ properties at: aKey ifAbsent: aBlock ]
+    "Answer the property value associated with aKey or, if aKey isn't found, answer the result of evaluating aBlock."
+    
+    ^ properties isNil
+        ifTrue: [ aBlock value ]
+        ifFalse: [ properties at: aKey ifAbsent: aBlock ]
+!
+
+propertyAt: aKey ifAbsentPut: aBlock
+    "Answer the property associated with aKey or, if aKey isn't found store the result of evaluating aBlock as new value."
+    
+    ^ self propertyAt: aKey ifAbsent: [ self propertyAt: aKey put: aBlock value ]
 !
 
 propertyAt: aKey put: anObject
-	"Set the property at aKey to be anObject. If aKey is not found, create a new entry for aKey and set is value to anObject. Answer anObject."
+    "Set the property at aKey to be anObject. If aKey is not found, create a new entry for aKey and set is value to anObject. Answer anObject."
 
-	^ (properties ifNil: [ properties := Dictionary new: 1 ])
-		at: aKey put: anObject
+    ^ (properties ifNil: [ properties := Dictionary new: 1 ])
+        at: aKey put: anObject
 ! !
 
 !PPCNode methodsFor:'analysis'!
 
 acceptsEpsilon
-	"return true, if parser can accept epsilon without failure"
-	^ self subclassResponsibility
+    "return true, if parser can accept epsilon without failure"
+    ^ self subclassResponsibility
 !
 
 acceptsEpsilonOpenSet: set
-	"private helper for acceptsEmpsilon that makes sure to avoid cycles (using open set)"
-	self children isEmpty ifTrue: [ ^ self acceptsEpsilon ].
-	
-	self shouldBeImplemented .
+    "private helper for acceptsEmpsilon that makes sure to avoid cycles (using open set)"
+    self children isEmpty ifTrue: [ ^ self acceptsEpsilon ].
+    
+    self shouldBeImplemented .
 !
 
 allNodes
-	| result |
-	result := OrderedCollection new.
-	self allParsersDo: [ :parser | result add: parser ].
-	^ result
+    | result |
+    result := OrderedCollection new.
+    self allParsersDo: [ :parser | result add: parser ].
+    ^ result
 !
 
 allNodesDo: aBlock
-	"Iterate over all the parse nodes of the receiver."
+    "Iterate over all the parse nodes of the receiver."
 
-	self allNodesDo: aBlock seen: IdentitySet new
+    self allNodesDo: aBlock seen: IdentitySet new
 !
 
 allNodesDo: aBlock seen: aSet
-	"Iterate over all the parse nodes of the receiver, do not visit and follow the ones contained in aSet."
+    "Iterate over all the parse nodes of the receiver, do not visit and follow the ones contained in aSet."
 
-	(aSet includes: self)
-		ifTrue: [ ^ self ].
-	aSet add: self.
-	aBlock value: self.
-	self children
-		do: [ :each | each allNodesDo: aBlock seen: aSet ]
+    (aSet includes: self) ifTrue: [ ^ self ].
+    
+    aSet add: self.
+    aBlock value: self.
+    self children do: [ :each | 
+        each allNodesDo: aBlock seen: aSet 
+    ]
 !
 
 check
-	"nothing to do"
-	^ nil
+    "nothing to do"
+    ^ nil
+!
+
+checkTree
+    | message |
+    self allNodes do: [ :node | (message := node check) ifNotNil: [ self error: message ]  ].
 !
 
 firstCharSetCached
-	firstCharSet ifNil: [ 
- 		firstCharSet := self firstCharSet.
-	].
-	^ firstCharSet
-!
-
-firstSetSuchThat: block
-	^ self firstSetSuchThat: block into: (OrderedCollection new) openSet: IdentitySet new.
+    ^ self propertyAt: #firstCharSet ifAbsentPut: [ self firstCharSet ].
 !
 
-firstSetSuchThat: block into: aCollection openSet: aSet
-	(aSet includes: self) ifTrue: [ ^ aCollection ].
-	aSet add: self.
-	
-	(block value: self) ifTrue: [aCollection add: self. ^ aCollection ].
-	self children do: [ :child | 
-		child firstSetSuchThat: block into: aCollection openSet: aSet 
-	].
-	^ aCollection
+hasFiniteLanguage
+    ^ self recognizedSentences isEmpty not
 !
 
 isContextFree
-	^ contextFree ifNil: [ contextFree := self allNodes allSatisfy: [ :n | n isContextFreePrim  ] ]
+    ^ contextFree ifNil: [ contextFree := self allNodes allSatisfy: [ :n | n isContextFreePrim  ] ]
 !
 
 isContextFreePrim
-	^ true
+    ^ true
 !
 
 isFirstSetTerminal
-	"Answer true if the receiver is a terminal or leaf parser, that means it does not delegate to any other parser."
+    "Answer true if the receiver is a terminal or leaf parser, that means it does not delegate to any other parser."
 
-	^ self isTerminal
+    ^ self isTerminal
 !
 
 isNullable
-	"Answer true if the receiver is a nullable parser, e.g. it can successfully parse nothing."
-	
-	^ false
+    "Answer true if the receiver is a nullable parser, e.g. it can successfully parse nothing."
+    
+    ^ false
 !
 
 isTerminal
-	"Answer true if the receiver is a terminal or leaf parser, that means it does not delegate to any other parser."
+    "Answer true if the receiver is a terminal or leaf parser, that means it does not delegate to any other parser."
+
+    ^ self children isEmpty
+!
 
-	^ self children isEmpty
+overlapsWith: anotherNode
+    | finite infinite |
+    "infinite - infinite"
+    (self hasFiniteLanguage not and: [ anotherNode hasFiniteLanguage not ]) ifTrue: [ 
+        ^ false
+    ].
+    
+    "finite - finite"
+    (self hasFiniteLanguage and: [ anotherNode hasFiniteLanguage ]) ifTrue: [ 
+        | union cnt|
+        cnt := self recognizedSentences size + anotherNode recognizedSentences size.
+        
+        union :=  Set new
+                addAll: self recognizedSentences;
+                addAll: anotherNode recognizedSentences;
+                yourself.
+        ^ (union size = cnt) not.
+    ].
+
+    self hasFiniteLanguage ifTrue: [ 
+        finite := self.
+        infinite := anotherNode.
+    ] ifFalse: [ 
+ 		finite := anotherNode.
+        infinite := self.	
+    ].
+        
+    finite recognizedSentences do: [ :sentence |
+            (infinite parser matches: sentence) ifTrue: [ ^ true ].
+    ].
+    ^ false
+    
+!
+
+recognizedSentences
+    ^ self propertyAt: #recognizedSentences ifAbsentPut: [ self recognizedSentencesPrim ].
+!
+
+recognizedSentencesPrim
+    ^ #()
 ! !
 
 !PPCNode methodsFor:'comparing'!
 
 = anotherNode
-	(self == anotherNode) ifTrue: [ ^ true ].
-	(anotherNode class = self class) ifFalse: [ ^ false ].
-	
-	(anotherNode name = name) ifFalse: [ ^ false ].
-	^ anotherNode children = self children.
+    (self == anotherNode) ifTrue: [ ^ true ].
+    (anotherNode class = self class) ifFalse: [ ^ false ].
+    
+    (anotherNode name = name) ifFalse: [ ^ false ].
+    ^ anotherNode children = self children.
 !
 
 hash
-	"TODO JK: IMO not a good hashing function bacause of children size, 
-		but at least it is not recursive, which would be worse :)
-	"
-	^ self class hash bitXor: (name hash bitXor: self children size hash)
+    "TODO JK: IMO not a good hashing function bacause of children size, 
+        but at least it is not recursive, which would be worse :)
+    "
+    ^ self class hash bitXor: (name hash bitXor: self children size hash)
+! !
+
+!PPCNode methodsFor:'copying'!
+
+postCopy
+    super postCopy.
+    properties := properties copy
 ! !
 
 !PPCNode methodsFor:'first follow next'!
 
 firstSet
-	^ firstFollowCache at: #firstSet ifAbsentPut: [
-		self firstSets at: self
-	]
+    ^ self firstFollowCache  at: #firstSet ifAbsentPut: [
+        self firstSets at: self
+    ]
 !
 
 firstSet: set
-	firstFollowCache at: #firstSet put: set
+    self firstFollowCache  at: #firstSet put: set
+!
+
+firstSetSuchThat: block
+    ^ (self firstSetsSuchThat: block) at: self
+!
+
+firstSetWithProductions
+    ^ self firstFollowCache  at: #firstSetWithProductions ifAbsentPut: [ 
+        self firstSetSuchThat: [:e | e name isNil not ].
+    ]
+!
+
+firstSetWithProductions: aSet
+    ^ self firstFollowCache  at: #firstSetWithProductions put: aSet
+!
+
+firstSetWithTokens
+    ^ self firstFollowCache  at: #firstSetWithTokens ifAbsentPut: [ 
+        self firstSetSuchThat: [:e | e isTerminal or: [ e isTokenNode ] ].
+    ]
+!
+
+firstSetWithTokens: aSet
+    ^ self firstFollowCache  at: #firstSetWithTokens put: aSet
 !
 
 firstSets
-	^ self firstSetsSuchThat: [ :e | e isFirstSetTerminal ]
+    ^ self firstSetsSuchThat: [ :e | e isFirstSetTerminal ]
 !
 
 firstSets: aFirstDictionary into: aSet suchThat: aBlock
-	"PRIVATE: Try to add additional elements to the first-set aSet of the receiver, use the incomplete aFirstDictionary."
+    "PRIVATE: Try to add additional elements to the first-set aSet of the receiver, use the incomplete aFirstDictionary."
 
-	(aBlock value: self) ifFalse: [ 
-		self children do: [ :node | aSet addAll: (aFirstDictionary at: node) ]
-	]
+    (aBlock value: self) ifFalse: [ 
+        self children do: [ :node | aSet addAll: (aFirstDictionary at: node) ]
+    ]
 !
 
 firstSetsSuchThat: block
 
-	| firstSets |
-	firstSets := IdentityDictionary new.
-	self allParsersDo: [ :each |
-		firstSets at: each put: ((block value: each)
-			ifTrue: [ IdentitySet with: each ]
-			ifFalse: [ IdentitySet new ]).
-		each isNullable
-			ifTrue: [ (firstSets at: each) add: PPCSentinelNode instance ] ].
-		
-		
-	[	| changed tally |
-		changed := false.
-		firstSets keysAndValuesDo: [ :node :first |
-			tally := first size.
-			node firstSets: firstSets into: first suchThat: block.
-			changed := changed or: [ tally ~= first size ] ].
-		changed ] whileTrue.
-	^ firstSets
+    | firstSets |
+    firstSets := IdentityDictionary new.
+    self allNodesDo: [ :each |
+        firstSets at: each put: ((block value: each)
+            ifTrue: [ IdentitySet with: each ]
+            ifFalse: [ IdentitySet new ]).
+        each isNullable
+            ifTrue: [ (firstSets at: each) add: PPCSentinelNode instance ] ].
+        
+        
+    [	| changed tally |
+        changed := false.
+        firstSets keysAndValuesDo: [ :node :first |
+            tally := first size.
+            node firstSets: firstSets into: first suchThat: block.
+            changed := changed or: [ tally ~= first size ] ].
+        changed ] whileTrue.
+    ^ firstSets
 !
 
 followSet
-	^ firstFollowCache at: #followSet ifAbsent: [ self error: 'no follow set cached' ]
+    ^ self firstFollowCache at: #followSet ifAbsent: [ 
+        self error: 'no follow set cached' 
+    ]
 !
 
 followSet: aSet
-	^ firstFollowCache at: #followSet put: aSet
+    ^ self firstFollowCache at: #followSet put: aSet
 !
 
 followSetIn: rootNode
-	^ rootNode followSets at: self
+    ^ rootNode followSets at: self
 !
 
 followSetWithTokens
-	^ firstFollowCache at: #followSetWithTokens ifAbsent: [ self error: 'no follow with tokens cached' ]
+    ^ self firstFollowCache  at: #followSetWithTokens ifAbsent: [ 
+        self error: 'no follow with tokens cached' 
+    ]
 !
 
 followSetWithTokens: aSet
-	^ firstFollowCache at: #followSetWithTokens put: aSet
+    ^ self firstFollowCache  at: #followSetWithTokens put: aSet
 !
 
 followSets
-	^ self followSetsSuchThat: [ :e | e isFirstSetTerminal ]
+    ^ self followSetsSuchThat: [ :e | e isFirstSetTerminal ]
 !
 
 followSets: aFollowDictionary firstSets: aFirstDictionary into: aSet suchThat: aBlock
-	"PRIVATE: Try to add additional elements to the follow-set aSet of the receiver, use the incomplete aFollowDictionary and the complete aFirstDictionary."
-	
-	self children do: [ :node | (aFollowDictionary at: node) addAll: aSet ]
+    "PRIVATE: Try to add additional elements to the follow-set aSet of the receiver, use the incomplete aFollowDictionary and the complete aFirstDictionary."
+    
+    self children do: [ :node | (aFollowDictionary at: node) addAll: aSet ]
 !
 
 followSetsSuchThat: aBlock
-	"Answer a dictionary with all the parsers reachable from the receiver as key and their follow-set as value. The follow-set of a parser is the list of terminal parsers that can appear immediately to the right of that parser."
-	
-	| current previous continue firstSets followSets |
-	current := previous := 0.
-	firstSets := self firstSetsSuchThat: aBlock.
-	followSets := IdentityDictionary new.
-	self allNodesDo: [ :each | followSets at: each put: IdentitySet new ].
-	(followSets at: self) add: PPCSentinelNode instance.
-	[	followSets keysAndValuesDo: [ :node :follow |
-			node 
-				followSets: followSets
-				firstSets: firstSets
-				into: follow
-				suchThat: aBlock ].
-		current := followSets
-			inject: 0
-			into: [ :result :each | result + each size ].
-		continue := previous < current.
-		previous := current.
-		continue ] whileTrue.
-	^ followSets
+    "Answer a dictionary with all the parsers reachable from the receiver as key and their follow-set as value. The follow-set of a parser is the list of terminal parsers that can appear immediately to the right of that parser."
+    
+    | current previous continue firstSets followSets |
+    current := previous := 0.
+    firstSets := self firstSetsSuchThat: aBlock.
+    followSets := IdentityDictionary new.
+    self allNodesDo: [ :each | followSets at: each put: IdentitySet new ].
+    (followSets at: self) add: PPCSentinelNode instance.
+    [	followSets keysAndValuesDo: [ :node :follow |
+            node 
+                followSets: followSets
+                firstSets: firstSets
+                into: follow
+                suchThat: aBlock ].
+        current := followSets
+            inject: 0
+            into: [ :result :each | result + each size ].
+        continue := previous < current.
+        previous := current.
+        continue ] whileTrue.
+    ^ followSets
 !
 
 nextSetIn: rootNode
-	^ rootNode nextSets at: self
+    ^ rootNode nextSets at: self
 !
 
 nextSets
-		| nextSets |
-	
-	nextSets := IdentityDictionary new.
-	self allNodesDo: [ :each | nextSets at: each put: IdentitySet new ].
-	
-	(nextSets at: self) add: PPCSentinelNode instance.
-	
-	[ 	| changed |
-		changed := false.
-	
-		nextSets keysAndValuesDo: [:node :next |
-			changed := (node 
-				nextSets: nextSets
-				into: next) or: [ changed ].
-		].
-		changed ] whileTrue.
-	
-	^ nextSets
+        | nextSets |
+    
+    nextSets := IdentityDictionary new.
+    self allNodesDo: [ :each | nextSets at: each put: IdentitySet new ].
+    
+    (nextSets at: self) add: PPCSentinelNode instance.
+    
+    [ 	| changed |
+        changed := false.
+    
+        nextSets keysAndValuesDo: [:node :next |
+            changed := (node 
+                nextSets: nextSets
+                into: next) or: [ changed ].
+        ].
+        changed ] whileTrue.
+    
+    ^ nextSets
 !
 
 nextSets: aNextDictionary into: aSet
-	"return true/false, if something has changed or not...."
-	| childSet change tally |
-	
-	change := false.
-	
-	self children do: [:each | 
-		childSet := aNextDictionary at: each.
-		tally := childSet size.
-		childSet addAll: aSet.
-		change := change or: [ tally ~= childSet size ].
-	].
+    "return true/false, if something has changed or not...."
+    | childSet change tally |
+    
+    change := false.
+    
+    self children do: [:each | 
+        childSet := aNextDictionary at: each.
+        tally := childSet size.
+        childSet addAll: aSet.
+        change := change or: [ tally ~= childSet size ].
+    ].
 
-	^ change
-	
+    ^ change
+    
 ! !
 
 !PPCNode methodsFor:'gt'!
 
 gtTreeViewIn: composite
-	<gtInspectorPresentationOrder: 40>
-
-	composite tree
-			title: 'Tree';
-			children: [:n | n children ];
-			format: [:n| String streamContents: [:s | n printOn: s. n printHashOn: s] ];
-			shouldExpandToLevel: 6
-! !
-
-!PPCNode methodsFor:'initialization'!
-
-initialize
-	super initialize.
-	firstFollowCache := IdentityDictionary new.
-! !
-
-!PPCNode methodsFor:'optimizing'!
+    <gtInspectorPresentationOrder: 40>
 
-checkTree
-	| message |
-	self allNodes do: [ :node | (message := node check) ifNotNil: [ self error: message ]  ].
-!
-
-optimizeTree
-	^ self optimizeTree: #(#token #inline #rewrite #merge)
-!
-
-optimizeTree: params
-	| retval | 
-
-	"Default optimization sequence"
-	retval := self.
-	
-	(params includes: #rewrite) ifTrue: [ retval := PPCOptimizingVisitor new visit: retval ].
-	(params includes: #token) ifTrue: [ retval := PPCTokenDetector new visit: retval ].
-	(params includes: #rewrite) ifTrue: [ retval := PPCOptimizingVisitor new visit: retval ].
-	(params includes: #inline) ifTrue: [ retval := PPCInliningVisitor new visit: retval ].
-	(params includes: #merge) ifTrue: [ retval := PPCMergingVisitor new visit: retval ].
-	^ retval
+    composite tree
+            title: 'Tree';
+            children: [:n | n children ];
+            format: [:n| String streamContents: [:s | n printOn: s. n printHashOn: s] ];
+            shouldExpandToLevel: 6
 ! !
 
 !PPCNode methodsFor:'printing'!
 
 printHashOn: aStream
-	aStream print: 'Hash:', self hash asString
+    aStream print: 'Hash:', self hash asString
 !
 
 printIdOn: aStream
-	aStream print: 'ID:', self identityHash asString
+    aStream print: 'ID:', self identityHash asString
 !
 
 printNameOn: aStream
-	self name isNil
-		ifFalse: [ aStream nextPutAll: self name. aStream nextPut: $-.  ].
-		
-	aStream print: self identityHash
+    self name isNil
+        ifFalse: [ aStream nextPutAll: self name. aStream nextPut: $-.  ].
+        
+    aStream print: self identityHash
 !
 
 printOn: aStream
-	super printOn: aStream.
-	aStream nextPut: $(.
-	self printNameOn: aStream.
-	aStream nextPut: $)
+    super printOn: aStream.
+    aStream nextPut: $(.
+    self printNameOn: aStream.
+    aStream nextPut: $)
 ! !
 
 !PPCNode methodsFor:'testing'!
@@ -412,60 +496,48 @@
     ^ self propertyAt: #inlined ifAbsent: [ false ].
 
     "Created: / 23-04-2015 / 15:40:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!PPCNode methodsFor:'todel'!
-
-allParsersDo: aBlock
-	"Iterate over all the parse nodes of the receiver."
-
-	self allParsersDo: aBlock seen: IdentitySet new
 !
 
-allParsersDo: aBlock seen: aSet
-	"Iterate over all the parse nodes of the receiver, do not visit and follow the ones contained in aSet."
+isTokenNode
+    ^ false
+!
 
-	(aSet includes: self)
-		ifTrue: [ ^ self ].
-	aSet add: self.
-	aBlock value: self.
-	self children
-		do: [ :each | each allParsersDo: aBlock seen: aSet ]
+isTrimmingTokenNode
+    ^ false
 ! !
 
 !PPCNode methodsFor:'transformation'!
 
 asCompilerNode
-	^ self
+    ^ self
 !
 
 replace: node with: anotherNode
 !
 
 transform: aBlock
-	"Answer a copy of all parsers reachable from the receiver transformed using aBlock."
-	| mapping root |
-	self halt: 'doprecate?'.
-	mapping := IdentityDictionary new.
-	self allParsersDo: [ :each |
-		mapping
-			at: each
-			put: (aBlock value: each copy) ].
-	root := mapping at: self.
-	[	| changed |
-		changed := false.
-		root allParsersDo: [ :each |
-			each children do: [ :old |
-				mapping at: old ifPresent: [ :new |
-					each replace: old with: new.
-					changed := true ] ] ].
-		changed ] whileTrue.
-	^ root
+    "Answer a copy of all parsers reachable from the receiver transformed using aBlock."
+    | mapping root |
+    mapping := IdentityDictionary new.
+    self allNodesDo: [ :each |
+        mapping
+            at: each
+            put: (aBlock value: each copy) ].
+    root := mapping at: self.
+    [	| changed |
+        changed := false.
+        root allNodesDo: [ :each |
+            each children do: [ :old |
+                mapping at: old ifPresent: [ :new |
+                    each replace: old with: new.
+                    changed := true ] ] ].
+        changed ] whileTrue.
+    ^ root
 ! !
 
 !PPCNode methodsFor:'visiting'!
 
 accept: visitor
-	visitor visitNode: self
+    visitor visitNode: self
 ! !
 
--- a/compiler/PPCNodeVisitor.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCNodeVisitor.st	Sun May 10 06:46:56 2015 +0100
@@ -12,307 +12,275 @@
 !PPCNodeVisitor class methodsFor:'instance creation'!
 
 new
-	^ self basicNew initialize
+    ^ self basicNew initialize
 ! !
 
 !PPCNodeVisitor methodsFor:'accessing'!
 
 arguments: args
-	arguments := args
+    arguments := args
 ! !
 
 !PPCNodeVisitor methodsFor:'hooks'!
 
 afterAccept: node retval: retval
-	"nothing to do"
-	^ retval
+    "nothing to do"
+    ^ retval
 !
 
 beforeAccept: node
-	"nothing to do"
+    "nothing to do"
 !
 
 closedDetected: node
-	^ #closed
+    ^ #closed
 !
 
 openDetected: node
-	^ #open
+    ^ #open
 ! !
 
 !PPCNodeVisitor methodsFor:'initialization'!
 
 initialize
-	super initialize.
-	openSet := IdentitySet new.
-	closeSet := IdentitySet new.	
-	cache := IdentityDictionary new.
+    super initialize.
+    openSet := IdentitySet new.
+    closeSet := IdentitySet new.	
+    cache := IdentityDictionary new.
 ! !
 
 !PPCNodeVisitor methodsFor:'traversing'!
 
 close: node
-	self assert: (self isOpen: node) description: 'should be opened first!!'.
-	
-	openSet remove: node.
-	closeSet add: node
+    self assert: (self isOpen: node) description: 'should be opened first!!'.
+    
+    openSet remove: node.
+    closeSet add: node
 !
 
 isClosed: child
-	^ closeSet includes: child
+    ^ closeSet includes: child
 !
 
 isOpen: child
-	^ openSet includes: child
+    ^ openSet includes: child
 !
 
 open: node
-	self assert: (self isOpen: node) not description: 'already opened!!'.
-	openSet add: node
+    self assert: (self isOpen: node) not description: 'already opened!!'.
+    openSet add: node
 !
 
 visit: node
-	| retval |
-	(self isOpen: node) ifTrue: [ 
-		^ self openDetected: node
-	].
+    | retval |
+    (self isOpen: node) ifTrue: [ 
+        ^ self openDetected: node
+    ].
 
-	(self isCached: node) ifTrue: [ 
-		^ self cachedDetected: node.
-	].
+    (self isCached: node) ifTrue: [ 
+        ^ self cachedDetected: node.
+    ].
 
-	(self isClosed: node) ifTrue: [ 
-		self closedDetected: node
-	].
+    (self isClosed: node) ifTrue: [ 
+        self closedDetected: node
+    ].
 
-	self open: node.
-	self beforeAccept: node.
-	retval := node accept: self.
-	retval := self afterAccept: node retval: retval.
-	self close: node.
-	self cache: node value: retval.	
-	
-	^ retval
+    self open: node.
+    self beforeAccept: node.
+    retval := node accept: self.
+    retval := self afterAccept: node retval: retval.
+    self close: node.
+    self cache: node value: retval.	
+    
+    ^ retval
 !
 
 visitChildren: node
-	node children do: [ :child | 
-		self visit: child
-	]
+    node children do: [ :child | 
+        self visit: child
+    ]
 ! !
 
 !PPCNodeVisitor methodsFor:'traversing - caching'!
 
 cache: node value: retval
-	self assert: (cache includesKey: node) not.
-	cache at: node put: retval
+    self assert: (cache includesKey: node) not.
+    cache at: node put: retval
 !
 
 cachedDetected: node
-	^ self cachedValue: node
+    ^ self cachedValue: node
 !
 
 cachedValue: node
-	^ cache at: node
+    ^ cache at: node
 !
 
 isCached: node
-	^ cache includesKey: node
+    ^ cache includesKey: node
 ! !
 
 !PPCNodeVisitor methodsFor:'visiting'!
 
 visitActionNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitAndNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitAnyNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitCharSetPredicateNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitCharacterNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitChoiceNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
+!
+
+visitDeterministicChoiceNode: node
+    ^ self visitNode: node
 !
 
 visitEndOfFileNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
+!
+
+visitEndOfInputNode: node
+    ^ self visitNode: node
 !
 
 visitForwardNode: node
-	^ self visitNode: node
-!
-
-visitInlineAnyNode: node
-	^ self visitNode: node
-!
-
-visitInlineCharSetPredicateNode: node
-	^ self visitNode: node
-!
-
-visitInlineCharacterNode: node
-	^ self visitNode: node
-!
-
-visitInlineLiteralNode: node
-	^ self visitNode: node
-!
-
-visitInlineMessagePredicateNode: node
-	^ self visitNode: node
-!
-
-visitInlineNilNode: node
-	^ self visitNode: node
-!
-
-visitInlineNotCharSetPredicateNode: node
-	^ self visitNode: node
-!
-
-visitInlineNotLiteralNode: node
-	^ self visitNode: node
-!
-
-visitInlineNotMessagePredicateNode: node
-	^ self visitNode: node
-!
-
-visitInlinePluggableNode: node
-	^ self visitNode: node
-!
-
-visitInlineTokenStarMessagePredicateNode: node
-	^ self visitNode: node
-!
-
-visitInlineTokenStarSeparatorNode: node
-	^ self visitNode: node
-!
-
-visitLLChoiceNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitLiteralNode: node
-	"default implementation"
-	^ self visitNode: node.
+    "default implementation"
+    ^ self visitNode: node.
 !
 
 visitMessagePredicateNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitNilNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitNode: node
-	self visitChildren: node.
-	^ node
+    self visitChildren: node.
+    ^ node
 !
 
 visitNotCharSetPredicateNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitNotLiteralNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitNotMessagePredicateNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitNotNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitOptionalNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitPluggableNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitPlusNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitPredicateNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
+!
+
+visitRecognizingSequenceNode: node
+    ^ self visitNode: node
 !
 
 visitSequenceNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitStarAnyNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitStarCharSetPredicateNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitStarMessagePredicateNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitStarNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitSymbolActionNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitTokenActionNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
+!
+
+visitTokenChoiceNode: node
+    ^ self visitNode: node
 !
 
 visitTokenConsumeNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitTokenNode: node
-	^ self visitNode: node
-!
-
-visitTokenSequenceNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitTokenStarMessagePredicateNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitTokenStarSeparatorNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
+!
+
+visitTokenWhitespaceNode: node
+    ^ self visitNode: node
+!
+
+visitTokenizingParserNode: node
+    ^ self visitNode: node
 !
 
 visitTrimNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitTrimmingTokenNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 !
 
 visitUnknownNode: node
-	^ self visitNode: node
+    ^ self visitNode: node
 ! !
 
--- a/compiler/PPCNotCharSetPredicateNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCNotCharSetPredicateNode.st	Sun May 10 06:46:56 2015 +0100
@@ -13,14 +13,14 @@
 !PPCNotCharSetPredicateNode methodsFor:'analysis'!
 
 firstCharSet
-	^ firstCharSet := PPCharSetPredicate on: [:e | (predicate value:e)  not ] 
-	
+    ^ PPCharSetPredicate on: [:e | (predicate value:e)  not ] 
+    
 ! !
 
 !PPCNotCharSetPredicateNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitNotCharSetPredicateNode: self
+    ^ visitor visitNotCharSetPredicateNode: self
 ! !
 
 !PPCNotCharSetPredicateNode class methodsFor:'documentation'!
--- a/compiler/PPCNotLiteralNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCNotLiteralNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,16 +12,16 @@
 !PPCNotLiteralNode methodsFor:'accessing'!
 
 firstCharSet
-	^ PPCharSetPredicate on: [:e | true ]
+    ^ PPCharSetPredicate on: [:e | true ]
 !
 
 prefix
-	^ #notLit
+    ^ #notLit
 ! !
 
 !PPCNotLiteralNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitNotLiteralNode: self
+    ^ visitor visitNotLiteralNode: self
 ! !
 
--- a/compiler/PPCNotMessagePredicateNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCNotMessagePredicateNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,19 +12,19 @@
 !PPCNotMessagePredicateNode methodsFor:'accessing'!
 
 message
-	
-	^ message
+    
+    ^ message
 !
 
 message: anObject
-	
-	message := anObject
+    
+    message := anObject
 ! !
 
 !PPCNotMessagePredicateNode methodsFor:'analysis'!
 
 firstCharSet
-	^ PPCharSetPredicate on: [:e | (predicate value:e)  not ]
+    ^ PPCharSetPredicate on: [:e | (predicate value:e)  not ]
 
     "Modified: / 23-04-2015 / 22:11:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
@@ -32,17 +32,17 @@
 !PPCNotMessagePredicateNode methodsFor:'comparison'!
 
 = anotherNode
-	super = anotherNode ifFalse: [ ^ false ].
-	^ message = anotherNode message.
+    super = anotherNode ifFalse: [ ^ false ].
+    ^ message = anotherNode message.
 !
 
 hash
-	^ super hash bitXor: message hash
+    ^ super hash bitXor: message hash
 ! !
 
 !PPCNotMessagePredicateNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitNotMessagePredicateNode: self
+    ^ visitor visitNotMessagePredicateNode: self
 ! !
 
--- a/compiler/PPCNotNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCNotNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,22 +12,22 @@
 !PPCNotNode methodsFor:'accessing'!
 
 prefix
-	^ #not
+    ^ #not
 ! !
 
 !PPCNotNode methodsFor:'analysis'!
 
 firstCharSet
-	^ PPCharSetPredicate on: [:e | true ] 
+    ^ PPCharSetPredicate on: [:e | true ] 
 !
 
 isFirstSetTerminal
-	^ true
+    ^ true
 ! !
 
 !PPCNotNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitNotNode: self
+    ^ visitor visitNotNode: self
 ! !
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCOptimizeChoices.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,37 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCRewritingVisitor subclass:#PPCOptimizeChoices
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Visitors'
+!
+
+!PPCOptimizeChoices methodsFor:'as yet unclassified'!
+
+hasCommonPrefix: nodes
+    | firstSets |
+    firstSets := IdentityDictionary new.
+    
+    nodes do: [ :node |
+        firstSets at: node put: node firstSetWithProductions.
+    ].
+
+    firstSets values allPairsDo: [ :p1 :p2 | (p1 = p2) ifFalse: [ ^ false ] ].
+    ^ true
+!
+
+visitChoiceNode: node
+    | firstSets commonPrefix |
+    firstSets := IdentityDictionary new.
+    
+    node children do: [ :child |
+        firstSets at: child put: child firstProductions.
+    ].
+
+    commonPrefix := true.
+    firstSets values allPairsDo: [ :p1 :p2 | (p1 = p2) ifFalse: [ commonPrefix := false ] ].
+! !
+
--- a/compiler/PPCOptimizingVisitor.st	Tue May 05 16:25:23 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,189 +0,0 @@
-"{ Package: 'stx:goodies/petitparser/compiler' }"
-
-"{ NameSpace: Smalltalk }"
-
-PPCRewritingVisitor subclass:#PPCOptimizingVisitor
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'PetitCompiler-Visitors'
-!
-
-!PPCOptimizingVisitor methodsFor:'visiting'!
-
-visitActionNode: node
-"	^ super visitActionNode: node."
-	self visitChildren: node.
-
-	((node hasProperty: #trimmingToken) not and: [ node block isSymbol ]) ifTrue: [ 
-		self change.
-		^ PPCSymbolActionNode new
-			block: node block;
-			name: node name;
-			child: node child;
-			yourself
-	].
-
-	^ node
-!
-
-visitForwardNode: node
-
-	self visitChildren: node.
-
-	node child name ifNil: [  
-		self change.
-		node child name: node name.
-		^ node child
-	].
-
-	(node child name = node name) ifTrue: [ 
-		self change.
-		^ node child
-	].
-
-	^ node
-!
-
-visitNotNode: node
-	self visitChildren: node.
-
-	(node child isKindOf: PPCAbstractLiteralNode) ifTrue: [  
-		self change.
-		^ PPCNotLiteralNode new
-			name: node name;
-			literal: node child literal;
-			yourself
-	]. 
-
-	(node child isKindOf: PPCMessagePredicateNode) ifTrue: [  
-		self change.
-		^ PPCNotMessagePredicateNode new
-			name: node name;
-			message: node child message;
-			yourself
-	].
-
-	(node child isKindOf: PPCCharSetPredicateNode) ifTrue: [  
-		self change.
-		^ PPCNotCharSetPredicateNode new
-			name: node name;
-			predicate: node child predicate;
-			yourself
-	].
-
-	^ node
-
-    "Modified: / 23-04-2015 / 12:02:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-visitPredicateNode: node
-	| charSet |
-	
-	(node predicate class == PPCharSetPredicate) ifTrue: [ 
-		charSet := node predicate.
-	].
-	charSet := PPCharSetPredicate on: node predicate.
-
-
-	(charSet equals: (PPCharSetPredicate on: [ :char | char isLetter])) ifTrue: [ 
-		change := true.
-		^ PPCMessagePredicateNode new
-			name: node name;
-			message: #isLetter;
-			predicate: node predicate;
-			yourself
-	].
-
-
-	(charSet equals: (PPCharSetPredicate on: [ :char | char isDigit])) ifTrue: [ 
-		change := true.
-		^ PPCMessagePredicateNode new
-			name: node name;
-			message: #isDigit;
-			predicate: node predicate;
-			yourself
-	].
-
-	(charSet equals: (PPCharSetPredicate on: [ :char | char isAlphaNumeric])) ifTrue: [ 
-		change := true.
-		^ PPCMessagePredicateNode new
-			name: node name;
-			message: #isAlphaNumeric;
-			predicate: node predicate;
-			yourself
-	].
-
-	(charSet equals: (PPCharSetPredicate on: [ :char | char isSeparator])) ifTrue: [ 
-		change := true.
-		^ PPCMessagePredicateNode new
-			name: node name;
-			message: #isSeparator;
-			predicate: node predicate;
-			yourself
-	].
-
-	(charSet equals: (PPCharSetPredicate on: [ :char | true ])) ifTrue: [ 
-		change := true.
-		^ PPCAnyNode new
-			name: node name;
-			yourself
-	].
-
-
-	change := true.
-	^ PPCCharSetPredicateNode new
-		name: node name;
-		predicate: charSet;
-		yourself.
-!
-
-visitStarNode: node
-
-	self visitChildren: node.
-
-	(node child isKindOf: PPCMessagePredicateNode) ifTrue: [ 
-		self change.
-		^ PPCStarMessagePredicateNode new
-			name: node name;
-			child: node child;
-			message: node child message;
-			yourself
-	].
-
-	(node child isKindOf: PPCAnyNode) ifTrue: [ 
-		self change.
-		^ PPCStarAnyNode new
-			name: node name;
-			child: node child;
-			yourself
-	]. 
-
-	(node child isKindOf: PPCCharSetPredicateNode) ifTrue: [ 
-		self change.
-		^ PPCStarCharSetPredicateNode new
-			name: node name;
-			predicate: node child predicate;
-			child: node child;
-			yourself
-	].
-
-	^ node
-!
-
-visitTokenStarMessagePredicateNode: node
-
-	self visitChildren: node.
-
-	(node message = #isSeparator) ifTrue: [ 
-		self change.
-		^ PPCTokenStarSeparatorNode new
-			name: node name;
-			child: node child;
-			message: node message;
-			yourself.
-	].
-
-	^ node
-! !
-
--- a/compiler/PPCOptionalNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCOptionalNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,26 +12,26 @@
 !PPCOptionalNode methodsFor:'accessing'!
 
 prefix
-	^ #opt
+    ^ #opt
 ! !
 
 !PPCOptionalNode methodsFor:'analysis'!
 
 acceptsEpsilon
-	^ true
+    ^ true
 !
 
 acceptsEpsilonOpenSet: set
-	^ true
+    ^ true
 !
 
 isNullable
-	^ true
+    ^ true
 ! !
 
 !PPCOptionalNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitOptionalNode: self
+    ^ visitor visitOptionalNode: self
 ! !
 
--- a/compiler/PPCPluggableConfiguration.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCPluggableConfiguration.st	Sun May 10 06:46:56 2015 +0100
@@ -2,8 +2,8 @@
 
 "{ NameSpace: Smalltalk }"
 
-PPCConfiguration subclass:#PPCPluggableConfiguration
-	instanceVariableNames:'block'
+Object subclass:#PPCPluggableConfiguration
+	instanceVariableNames:'block base'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'PetitCompiler-Core'
@@ -12,18 +12,41 @@
 !PPCPluggableConfiguration class methodsFor:'as yet unclassified'!
 
 on: aBlock
-	^ self new
-		block: aBlock;
-		yourself
+    ^ self on: aBlock base: PPCConfiguration default
+!
+
+on: aBlock base: aPPCCOnfiguration
+    ^ self new
+        block: aBlock;
+        base: aPPCCOnfiguration;
+        yourself
 ! !
 
 !PPCPluggableConfiguration methodsFor:'as yet unclassified'!
 
+arguments: args
+    ^ base arguments: args
+!
+
+base: aPPCConfiguration
+    base := aPPCConfiguration
+!
+
 block: aBlock
-	block := aBlock
+    block := aBlock
+!
+
+compile: whatever
+    base input: whatever.
+    block value: base.
+    ^ base ir
+!
+
+input: whatever
+    ^ base input: whatever
 !
 
 invokePhases
-	^ block value: self
+    ^ block value: base
 ! !
 
--- a/compiler/PPCPluggableNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCPluggableNode.st	Sun May 10 06:46:56 2015 +0100
@@ -9,50 +9,58 @@
 	category:'PetitCompiler-Nodes'
 !
 
+
 !PPCPluggableNode methodsFor:'accessing'!
 
 block
-	
-	^ block
+    
+    ^ block
 !
 
 block: anObject
-	
-	block := anObject
+    
+    block := anObject
 !
 
 prefix
-	^ #plug
+    ^ #plug
 ! !
 
 !PPCPluggableNode methodsFor:'analysis'!
 
 acceptsEpsilon
-	^ true
+    ^ true
 !
 
 acceptsEpsilonOpenSet: set
-	^ true
+    ^ true
 !
 
 firstCharSet
-	^ PPCharSetPredicate on: [:char | (block asParser parse: char asString) isPetitFailure not ]
+    ^ PPCharSetPredicate on: [:char | (block asParser parse: char asString) isPetitFailure not ]
 ! !
 
 !PPCPluggableNode methodsFor:'comparing'!
 
 = anotherNode
-	super = anotherNode ifFalse: [ ^ false ].
-	^ block = anotherNode block.
+    super = anotherNode ifFalse: [ ^ false ].
+    ^ block = anotherNode block.
 !
 
 hash
-	^ super hash bitXor: block hash
+    ^ super hash bitXor: block hash
 ! !
 
 !PPCPluggableNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitPluggableNode: self
+    ^ visitor visitPluggableNode: self
 ! !
 
+!PPCPluggableNode class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/PPCPlusNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCPlusNode.st	Sun May 10 06:46:56 2015 +0100
@@ -10,24 +10,30 @@
 !
 
 
+!PPCPlusNode methodsFor:'analysis'!
+
+recognizedSentencesPrim
+    ^ 	#()
+! !
+
 !PPCPlusNode methodsFor:'as yet unclassified'!
 
 followSets: aFollowDictionary firstSets: aFirstDictionary into: aSet suchThat: aBlock
-	| first |
-	super followSets: aFollowDictionary firstSets:  aFirstDictionary into: aSet suchThat: aBlock.
-	
-	first := aFirstDictionary at: self.
-	(aFollowDictionary at: child) addAll: (first reject: [:each | each isNullable])
+    | first |
+    super followSets: aFollowDictionary firstSets:  aFirstDictionary into: aSet suchThat: aBlock.
+    
+    first := aFirstDictionary at: self.
+    (aFollowDictionary at: child) addAll: (first reject: [:each | each isNullable])
 !
 
 prefix
-	^ #plus
+    ^ #plus
 ! !
 
 !PPCPlusNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitPlusNode: self
+    ^ visitor visitPlusNode: self
 ! !
 
 !PPCPlusNode class methodsFor:'documentation'!
--- a/compiler/PPCPredicateNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCPredicateNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,6 +12,6 @@
 !PPCPredicateNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitPredicateNode: self
+    ^ visitor visitPredicateNode: self
 ! !
 
--- a/compiler/PPCProfilingContext.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCProfilingContext.st	Sun May 10 06:46:56 2015 +0100
@@ -13,131 +13,131 @@
 !PPCProfilingContext methodsFor:'gt'!
 
 gtReport: composite
-	<gtInspectorPresentationOrder: 40>
-	composite table 
-		title: 'Report';
-		column: 'Info' evaluated: [ :each | each key printString ];
-		column: 'Value' evaluated: [ :each | each value printString ];
-		display: [:context | context asReportTable ].
+    <gtInspectorPresentationOrder: 40>
+    composite table 
+        title: 'Report';
+        column: 'Info' evaluated: [ :each | each key printString ];
+        column: 'Value' evaluated: [ :each | each value printString ];
+        display: [:context | context asReportTable ].
 ! !
 
 !PPCProfilingContext methodsFor:'initialization'!
 
 initialize
-	super initialize.
-	self reset
+    super initialize.
+    self reset
 !
 
 reset
-	invocations := OrderedCollection new.
-	remembers := OrderedCollection new.
-	restores := OrderedCollection new.
-	
-	lwRemembers := OrderedCollection new.
-	lwRestores := OrderedCollection new.
-	
-	totalSize := 0.
+    invocations := OrderedCollection new.
+    remembers := OrderedCollection new.
+    restores := OrderedCollection new.
+    
+    lwRemembers := OrderedCollection new.
+    lwRestores := OrderedCollection new.
+    
+    totalSize := 0.
 ! !
 
 !PPCProfilingContext methodsFor:'profiling'!
 
 invocations
-	^ invocations 
+    ^ invocations 
 !
 
 lwRemember
-	| selector |
-	selector := thisContext sender selector.
-	lwRemembers add: selector.
+    | selector |
+    selector := thisContext sender selector.
+    lwRemembers add: selector.
 
-	^ super lwRemember
+    ^ super lwRemember
 !
 
 lwRestore: whatever
-	| selector |
-	selector := thisContext sender selector.
-	lwRestores add: selector.
+    | selector |
+    selector := thisContext sender selector.
+    lwRestores add: selector.
 
-	^ super lwRestore: whatever.
+    ^ super lwRestore: whatever.
 !
 
 methodFinished: selector
-	"Nothing to do for now"
+    "Nothing to do for now"
 !
 
 methodInvoked: selector
-	invocations add: selector
+    invocations add: selector
 !
 
 remember
-	| sender selector |
+    | sender selector |
 
-	sender := thisContext sender.
-	selector := (sender receiver isKindOf: PPCompiledParser) ifTrue: [ 
+    sender := thisContext sender.
+    selector := (sender receiver isKindOf: PPCompiledParser) ifTrue: [ 
  		sender selector.
-	] ifFalse: [ 
+    ] ifFalse: [ 
  		sender receiver class.	
-	].
-	remembers add: selector.
-	^ super remember
+    ].
+    remembers add: selector.
+    ^ super remember
 !
 
 restore: whatever
-	| selector sender |
-	
-	sender := thisContext sender.
-	selector := (sender receiver isKindOf: PPCompiledParser) ifTrue: [ 
+    | selector sender |
+    
+    sender := thisContext sender.
+    selector := (sender receiver isKindOf: PPCompiledParser) ifTrue: [ 
  		sender selector.
-	] ifFalse: [ 
+    ] ifFalse: [ 
  		sender receiver class.	
-	].
-	
-	
-	restores add: selector.
-	
-	^ super restore: whatever
+    ].
+    
+    
+    restores add: selector.
+    
+    ^ super restore: whatever
 !
 
 stream: aStream
-	totalSize := totalSize + aStream size.
-	^ super stream: aStream
+    totalSize := totalSize + aStream size.
+    ^ super stream: aStream
 ! !
 
 !PPCProfilingContext methodsFor:'reporting'!
 
 asReportTable
-	^{ 
-		#'invocations per character (NOT PRECISE YET)' -> (self invocationCount / (totalSize + 1.0)).
-		#'lwBacktrack per character' -> (self lwRestoreCount / (totalSize + 1.0)).
-		#'backtrack per character' -> (self restoreCount / (totalSize + 1.0)).
-		#'total stream size' -> totalSize .
-		#'invocation count' -> self invocationCount.
-		#'lwRemember count' -> self lwRememberCount.
-		#'lwRestore count' -> self lwRestoreCount.
-		#'remember count' -> self rememberCount.
-		#'restore count' -> self restoreCount.
-	
-	}
+    ^{ 
+        #'invocations per character (NOT PRECISE YET)' -> (self invocationCount / (totalSize + 1.0)).
+        #'lwBacktrack per character' -> (self lwRestoreCount / (totalSize + 1.0)).
+        #'backtrack per character' -> (self restoreCount / (totalSize + 1.0)).
+        #'total stream size' -> totalSize .
+        #'invocation count' -> self invocationCount.
+        #'lwRemember count' -> self lwRememberCount.
+        #'lwRestore count' -> self lwRestoreCount.
+        #'remember count' -> self rememberCount.
+        #'restore count' -> self restoreCount.
+    
+    }
 !
 
 invocationCount
-	^ invocations size
+    ^ invocations size
 !
 
 lwRememberCount
-	^ lwRemembers size
+    ^ lwRemembers size
 !
 
 lwRestoreCount
-	^ lwRestores size
+    ^ lwRestores size
 !
 
 rememberCount
-	^ remembers size
+    ^ remembers size
 !
 
 restoreCount
-	^ restores size
+    ^ restores size
 ! !
 
 !PPCProfilingContext class methodsFor:'documentation'!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCRecognizerComponentDetector.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,64 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCRewritingVisitor subclass:#PPCRecognizerComponentDetector
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Visitors'
+!
+
+!PPCRecognizerComponentDetector methodsFor:'visiting'!
+
+visitNotNode: node
+    "We don't need result of the not,..."
+    | child newChild |
+    self change.
+    child := node child.
+    newChild := self visitWithRecognizingComponentVisitor: child.
+    node replace: child with: newChild.
+    ^ node
+!
+
+visitTokenNode: node
+    | child newChild |
+    
+    self change.
+    child := node child.
+    newChild := self visitWithRecognizingComponentVisitor: child.
+    node replace: child with: newChild.
+    
+    ^ node
+!
+
+visitTrimmingTokenNode: node
+    | child newChild whitespace newWhitespace |
+    
+    self change.
+    child := node child.
+    newChild := self visitWithRecognizingComponentVisitor: child.
+    node replace: child with: newChild.
+
+    whitespace := node whitespace.
+    newWhitespace := self visitWithRecognizingComponentVisitor: whitespace.
+    node replace: whitespace with: newWhitespace.
+
+    
+    ^ node
+!
+
+visitWithRecognizingComponentVisitor: node
+    | retval forbiddenNodes copyVisitor tokenVisitor |
+    
+    copyVisitor := PPCCopyVisitor new.
+    tokenVisitor := PPCRecognizerComponentVisitor new.
+    
+    forbiddenNodes := openSet copy.
+    tokenVisitor forbiddenNodes: forbiddenNodes.
+
+    retval := copyVisitor visit: node.
+    retval := tokenVisitor visit: retval.
+    ^ retval
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCRecognizerComponentVisitor.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,83 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCRewritingVisitor subclass:#PPCRecognizerComponentVisitor
+	instanceVariableNames:'forbiddenNodes'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Visitors'
+!
+
+!PPCRecognizerComponentVisitor methodsFor:'accessing'!
+
+forbiddenNodes: nodeSet
+    forbiddenNodes := nodeSet.
+! !
+
+!PPCRecognizerComponentVisitor methodsFor:'initialization'!
+
+initialize
+    super initialize.
+    forbiddenNodes := IdentitySet new.
+! !
+
+!PPCRecognizerComponentVisitor methodsFor:'traversing'!
+
+beforeAccept: node
+    self assert: (forbiddenNodes includes: node) not description: 'Does not look like a token' 
+! !
+
+!PPCRecognizerComponentVisitor methodsFor:'visiting'!
+
+visitActionNode: node
+    self visitChildren: node.
+
+    self change.
+    ^ node child
+!
+
+visitSequenceNode: node
+    self visitChildren: node.
+
+    self change.
+    ^ PPCRecognizingSequenceNode new
+        children: node children;
+        name: node name;
+        properties: node properties;
+        yourself	
+!
+
+visitStarMessagePredicateNode: node
+    self visitChildren: node.
+    
+    (node message = #isSeparator) ifTrue: [ 
+        self change.
+        ^ PPCTokenStarSeparatorNode new
+            name: node name;
+            child: node child;
+            message: node message;
+            yourself.
+    ].
+    
+    self change.
+    ^ PPCTokenStarMessagePredicateNode new
+        name: node name;
+        message: node message;
+        child: node child;
+        yourself
+!
+
+visitSymbolActionNode: node
+    self visitChildren: node.
+    
+    self change.
+    ^ node child
+!
+
+visitTokenNode: node
+    self visitChildren: node.
+    self change.
+    ^ node child
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCRecognizingSequenceNode.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,23 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCSequenceNode subclass:#PPCRecognizingSequenceNode
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Nodes'
+!
+
+!PPCRecognizingSequenceNode methodsFor:'accessing'!
+
+suffix
+    ^ #'_fast'
+! !
+
+!PPCRecognizingSequenceNode methodsFor:'visiting'!
+
+accept: visitor
+    ^ visitor visitRecognizingSequenceNode: self
+! !
+
--- a/compiler/PPCRewritingVisitor.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCRewritingVisitor.st	Sun May 10 06:46:56 2015 +0100
@@ -12,35 +12,35 @@
 !PPCRewritingVisitor methodsFor:'as yet unclassified'!
 
 change
-	self flag: 'JK: Do we need this?'.
-	change := true.
+    self flag: 'JK: Do we need this?'.
+    change := true.
 !
 
 visitChild: child of: node
-	| newChild |
+    | newChild |
 
-	(self isOpen: child) ifTrue: [ 
-		"already processing..."
-		^ nil
-	].
+    (self isOpen: child) ifTrue: [ 
+        "already processing..."
+        ^ nil
+    ].
 
-	(self isCached: child) ifTrue: [ 
-		"Use Cached Value"
-		node replace: child with: (self cachedValue: child).
-		^ nil
-	]. 
+    (self isCached: child) ifTrue: [ 
+        "Use Cached Value"
+        node replace: child with: (self cachedValue: child).
+        ^ nil
+    ]. 
 
 
-	change := false.
-	newChild := self visit: child.
-	change ifTrue: [ 
-		node replace: child with: newChild.
-	].
+    change := false.
+    newChild := self visit: child.
+    change ifTrue: [ 
+        node replace: child with: newChild.
+    ].
 !
 
 visitChildren: node
-	node children do: [ :child | 
-		self visitChild: child of: node
-	]
+    node children do: [ :child | 
+        self visitChild: child of: node
+    ]
 ! !
 
--- a/compiler/PPCSentinelNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCSentinelNode.st	Sun May 10 06:46:56 2015 +0100
@@ -19,6 +19,6 @@
 !PPCSentinelNode class methodsFor:'as yet unclassified'!
 
 instance
-	^ Instance ifNil: [ Instance := self basicNew ]
+    ^ Instance ifNil: [ Instance := self basicNew ]
 ! !
 
--- a/compiler/PPCSequenceNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCSequenceNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,98 +12,118 @@
 !PPCSequenceNode methodsFor:'accessing'!
 
 prefix
-	^ #seq
+    ^ #seq
 ! !
 
 !PPCSequenceNode methodsFor:'analysis'!
 
 acceptsEpsilon
-	^ self acceptsEpsilonOpenSet: IdentitySet new.
+    ^ self acceptsEpsilonOpenSet: IdentitySet new.
 !
 
 acceptsEpsilonOpenSet: set
-	set add: self.
-	^ self children allSatisfy: [:e | e acceptsEpsilonOpenSet: set ]
+    set add: self.
+    ^ self children allSatisfy: [:e | e acceptsEpsilonOpenSet: set ]
 !
 
 firstSetSuchThat: block into: aCollection openSet: aSet
-	(aSet includes: self) ifTrue: [ ^ aCollection ].
-	aSet add: self.
-	
-	(block value: self) ifTrue: [ aCollection add: self. ^ aCollection ].
-	
-	self children do: [ :child | 
-		child firstSetSuchThat: block into: aCollection openSet: aSet.
-		child acceptsEpsilon ifFalse: [ ^ aCollection ]
-	].
-	^ aCollection
+    (aSet includes: self) ifTrue: [ ^ aCollection ].
+    aSet add: self.
+    
+    (block value: self) ifTrue: [ aCollection add: self. ^ aCollection ].
+    
+    self children do: [ :child | 
+        child firstSetSuchThat: block into: aCollection openSet: aSet.
+        child acceptsEpsilon ifFalse: [ ^ aCollection ]
+    ].
+    ^ aCollection
 !
 
 firstSets: aFirstDictionary into: aSet suchThat: aBlock
-	| nullable |
-	
-	"TODO JK: aBlock is ignored by now"
-	children do: [ :node |
-		nullable := false.
-		(aFirstDictionary at: node) do: [ :each |
-			each isNullable
-				ifTrue: [ nullable := true ]
-				ifFalse: [ aSet add: each ] ].
-		nullable
-			ifFalse: [ ^ self ] ].
-	aSet add: PPCSentinelNode instance
+    | nullable |
+    
+    "TODO JK: aBlock is ignored by now"
+    children do: [ :node |
+        nullable := false.
+        (aFirstDictionary at: node) do: [ :each |
+            each isNullable
+                ifTrue: [ nullable := true ]
+                ifFalse: [ aSet add: each ] ].
+        nullable
+            ifFalse: [ ^ self ] ].
+    aSet add: PPCSentinelNode instance
+!
+
+recognizedSentencesPrim
+    | retval |
+    (self children anySatisfy: [ :child | child hasFiniteLanguage not ]) ifTrue: [ ^ #() ].
+    
+    retval := Set with: ''.
+    
+    self children do: [ : child |
+        | set |
+        set := Set new.
+
+        child recognizedSentences do: [ :suffix |
+            retval do: [ :prefix |
+                set add: prefix, suffix.
+         	]
+        ].
+        retval := set.
+    ].
+    ^ retval asArray
 ! !
 
 !PPCSequenceNode methodsFor:'compiling'!
 
 addGuard: compiler id: id
-	|  guard firsts |
-	(compiler guards not or: [(guard := PPCGuard on: self) makesSense not]) ifTrue: [ ^ self].
+    |  guard firsts |
+    (compiler guards not or: [(guard := PPCGuard on: self) makesSense not]) ifTrue: [ ^ self].
 
-	firsts := (self firstSetSuchThat: [ :e | (e isKindOf: PPCTrimmingTokenNode) or: [ e isTerminal ] ]).
+    firsts := (self firstSetSuchThat: [ :e | (e isKindOf: PPCTrimmingTokenNode) or: [ e isTerminal ] ]).
 
-	
-	(firsts allSatisfy: [ :e | e isKindOf: PPCTrimmingTokenNode ]) ifTrue: [  
-		"If we start with trimming, we should invoke the whitespace parser"
-		firsts anyOne compileWhitespace: compiler.
-		
-		compiler add: 'context atEnd ifTrue: [ ^ self error ].'.
-		guard id: id, '_guard'.
-		guard compileGuard: compiler.
-		compiler addOnLine: 'ifFalse: [ ^ self error ].'
-	].
+    
+    (firsts allSatisfy: [ :e | e isKindOf: PPCTrimmingTokenNode ]) ifTrue: [  
+        "If we start with trimming, we should invoke the whitespace parser"
+        firsts anyOne compileWhitespace: compiler.
+        
+        compiler add: 'context atEnd ifTrue: [ ^ self error ].'.
+        guard id: id, '_guard'.
+        guard compileGuard: compiler.
+        compiler addOnLine: 'ifFalse: [ ^ self error ].'
+    ].
 
-	(firsts allSatisfy: [ :e | e isTerminal ]) ifTrue: [  
-		compiler add: 'context atEnd ifTrue: [ ^ self error ].'.
-		guard id: id, '_guard'.
-		guard compileGuard: compiler.
-		compiler addOnLine: 'ifFalse: [ ^ self error ].'
-	].
+    (firsts allSatisfy: [ :e | e isTerminal ]) ifTrue: [  
+        compiler add: 'context atEnd ifTrue: [ ^ self error ].'.
+        guard id: id, '_guard'.
+        guard compileGuard: compiler.
+        compiler addOnLine: 'ifFalse: [ ^ self error ].'
+    ].
 ! !
 
 !PPCSequenceNode methodsFor:'first follow next'!
 
 followSets: aFollowDictionary firstSets: aFirstDictionary into: aSet suchThat: aBlock
-	children keysAndValuesDo: [ :index :node |
-		| follow first |
-		follow := aFollowDictionary at: node.
-		index = children size
-			ifTrue: [ follow addAll: aSet ]
-			ifFalse: [
-				(self class withAll: (children 
-					copyFrom: index + 1 to: children size))
-						firstSets: aFirstDictionary
-						into: (first := IdentitySet new)
-						suchThat: aBlock.
-				(first anySatisfy: [ :each | each isNullable ])
-					ifTrue: [ follow addAll: aSet ].
-				follow addAll: (first 
-					reject: [ :each | each isNullable ]) ] ]
+    children keysAndValuesDo: [ :index :node |
+        | follow first |
+        follow := aFollowDictionary at: node.
+        index = children size
+            ifTrue: [ follow addAll: aSet ]
+            ifFalse: [
+                (self class withAll: (children 
+                    copyFrom: index + 1 to: children size))
+                        firstSets: aFirstDictionary
+                        into: (first := IdentitySet new)
+                        suchThat: aBlock.
+                (first anySatisfy: [ :each | each isNullable ])
+                    ifTrue: [ follow addAll: aSet ].
+                follow addAll: (first 
+                    reject: [ :each | each isNullable ]) ] ]
 ! !
 
 !PPCSequenceNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitSequenceNode: self
+    ^ visitor visitSequenceNode: self
 ! !
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCSpecializingVisitor.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,175 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCRewritingVisitor subclass:#PPCSpecializingVisitor
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Visitors'
+!
+
+!PPCSpecializingVisitor methodsFor:'visiting'!
+
+visitActionNode: node
+    ("(node hasProperty: #trimmingToken) not and: [" node block isSymbol "]") ifTrue: [ 
+        self change.
+        ^ PPCSymbolActionNode new
+            block: node block;
+            name: node name;
+            child: node child;
+            yourself
+    ].
+
+    ^ super visitActionNode: node
+!
+
+visitForwardNode: node
+
+    self visitChildren: node.
+
+    node name ifNil: [ 
+        self change.
+        ^ node child.
+    ].
+
+    node child name ifNil: [  
+        self change.
+        node child name: node name.
+        ^ node child
+    ].
+
+    (node child name = node name) ifTrue: [ 
+        self change.
+        ^ node child
+    ].
+
+    ^ node
+!
+
+visitNotNode: node
+    self visitChildren: node.
+
+    (node child isKindOf: PPCAbstractLiteralNode) ifTrue: [  
+        self change.
+        ^ PPCNotLiteralNode new
+            name: node name;
+            literal: node child literal;
+            yourself
+    ]. 
+
+    (node child isKindOf: PPCMessagePredicateNode) ifTrue: [  
+        self change.
+        ^ PPCNotMessagePredicateNode new
+            name: node name;
+            message: node child message;
+            yourself
+    ].
+
+    (node child isKindOf: PPCCharSetPredicateNode) ifTrue: [  
+        self change.
+        ^ PPCNotCharSetPredicateNode new
+            name: node name;
+            predicate: node child predicate;
+            yourself
+    ].
+
+    ^ node
+
+    "Modified: / 23-04-2015 / 12:02:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+visitPredicateNode: node
+    | charSet |
+    
+    (node predicate class == PPCharSetPredicate) ifTrue: [ 
+        charSet := node predicate.
+    ].
+    charSet := PPCharSetPredicate on: node predicate.
+
+
+    (charSet equals: (PPCharSetPredicate on: [ :char | char isLetter])) ifTrue: [ 
+        change := true.
+        ^ PPCMessagePredicateNode new
+            name: node name;
+            message: #isLetter;
+            predicate: node predicate;
+            yourself
+    ].
+
+
+    (charSet equals: (PPCharSetPredicate on: [ :char | char isDigit])) ifTrue: [ 
+        change := true.
+        ^ PPCMessagePredicateNode new
+            name: node name;
+            message: #isDigit;
+            predicate: node predicate;
+            yourself
+    ].
+
+    (charSet equals: (PPCharSetPredicate on: [ :char | char isAlphaNumeric])) ifTrue: [ 
+        change := true.
+        ^ PPCMessagePredicateNode new
+            name: node name;
+            message: #isAlphaNumeric;
+            predicate: node predicate;
+            yourself
+    ].
+
+    (charSet equals: (PPCharSetPredicate on: [ :char | char isSeparator])) ifTrue: [ 
+        change := true.
+        ^ PPCMessagePredicateNode new
+            name: node name;
+            message: #isSeparator;
+            predicate: node predicate;
+            yourself
+    ].
+
+    (charSet equals: (PPCharSetPredicate on: [ :char | true ])) ifTrue: [ 
+        change := true.
+        ^ PPCAnyNode new
+            name: node name;
+            yourself
+    ].
+
+
+    change := true.
+    ^ PPCCharSetPredicateNode new
+        name: node name;
+        predicate: charSet;
+        yourself.
+!
+
+visitStarNode: node
+
+    self visitChildren: node.
+
+    (node child isKindOf: PPCMessagePredicateNode) ifTrue: [ 
+        self change.
+        ^ PPCStarMessagePredicateNode new
+            name: node name;
+            child: node child;
+            message: node child message;
+            yourself
+    ].
+
+    (node child isKindOf: PPCAnyNode) ifTrue: [ 
+        self change.
+        ^ PPCStarAnyNode new
+            name: node name;
+            child: node child;
+            yourself
+    ]. 
+
+    (node child isKindOf: PPCCharSetPredicateNode) ifTrue: [ 
+        self change.
+        ^ PPCStarCharSetPredicateNode new
+            name: node name;
+            predicate: node child predicate;
+            child: node child;
+            yourself
+    ].
+
+    ^ node
+! !
+
--- a/compiler/PPCStarAnyNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCStarAnyNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,12 +12,30 @@
 !PPCStarAnyNode methodsFor:'as yet unclassified'!
 
 prefix
-	^ #starAny
+    ^ #starAny
+! !
+
+!PPCStarAnyNode methodsFor:'first follow next'!
+
+firstSets: aFirstDictionary into: aSet suchThat: aBlock
+    "
+        First and follow should be performed on the non-specialized tree, i.e. on a tree
+        with star -> messageNode. Not on myself.
+        
+        The reason for that is, that:
+        - I am terminal
+        - I am nullable
+        
+        This means, I look like epsilon node for the first follow analysis. And epsilons 
+        are ignored in sequences, thus sequence of StarMessagePredicate, Literal
+        leads to { Literal } as firstSet and not expected { MessagePredicate, Literal }
+    "
+    ^ self error: 'Cannot perform first/follow analysis on myself, sorry for that :('
 ! !
 
 !PPCStarAnyNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitStarAnyNode: self
+    ^ visitor visitStarAnyNode: self
 ! !
 
--- a/compiler/PPCStarCharSetPredicateNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCStarCharSetPredicateNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,41 +12,59 @@
 !PPCStarCharSetPredicateNode methodsFor:'accessing'!
 
 extendClassification: classification
-	^ (classification asOrderedCollection addLast: false; yourself) asArray
+    ^ (classification asOrderedCollection addLast: false; yourself) asArray
 !
 
 firstCharSet
-	^ PPCharSetPredicate on: predicate 	
+    ^ PPCharSetPredicate on: predicate 	
 !
 
 predicate
-	
-	^ predicate
+    
+    ^ predicate
 !
 
 predicate: anObject
-	
-	predicate := anObject
+    
+    predicate := anObject
 !
 
 prefix
-	^ #starPredicate
+    ^ #starPredicate
 ! !
 
 !PPCStarCharSetPredicateNode methodsFor:'comparing'!
 
 = anotherNode
-	super = anotherNode ifFalse: [ ^ false ].
-	^ predicate = anotherNode predicate.
+    super = anotherNode ifFalse: [ ^ false ].
+    ^ predicate = anotherNode predicate.
 !
 
 hash
-	^ super hash bitXor: predicate hash
+    ^ super hash bitXor: predicate hash
+! !
+
+!PPCStarCharSetPredicateNode methodsFor:'first follow next'!
+
+firstSets: aFirstDictionary into: aSet suchThat: aBlock
+    "
+        First and follow should be performed on the non-specialized tree, i.e. on a tree
+        with star -> messageNode. Not on myself.
+        
+        The reason for that is, that:
+        - I am terminal
+        - I am nullable
+        
+        This means, I look like epsilon node for the first follow analysis. And epsilons 
+        are ignored in sequences, thus sequence of StarMessagePredicate, Literal
+        leads to { Literal } as firstSet and not expected { MessagePredicate, Literal }
+    "
+    ^ self error: 'Cannot perform first/follow analysis on myself, sorry for that :('
 ! !
 
 !PPCStarCharSetPredicateNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitStarCharSetPredicateNode: self
+    ^ visitor visitStarCharSetPredicateNode: self
 ! !
 
--- a/compiler/PPCStarMessagePredicateNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCStarMessagePredicateNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,41 +12,59 @@
 !PPCStarMessagePredicateNode methodsFor:'accessing'!
 
 children
-	^ #()
+    ^ #()
 !
 
 firstCharSet
-	^ PPCharSetPredicate on: [:char | char perform: message ] 	
+    ^ PPCharSetPredicate on: [:char | char perform: message ] 	
 !
 
 message
-	
-	^ message
+    
+    ^ message
 !
 
 message: anObject
-	
-	message := anObject
+    
+    message := anObject
 !
 
 prefix
-	^ #starPredicate
+    ^ #starPredicate
+! !
+
+!PPCStarMessagePredicateNode methodsFor:'analysis'!
+
+firstSets: aFirstDictionary into: aSet suchThat: aBlock
+    "
+        First and follow should be performed on the non-specialized tree, i.e. on a tree
+        with star -> messageNode. Not on myself.
+        
+        The reason for that is, that:
+        - I am terminal
+        - I am nullable
+        
+        This means, I look like epsilon node for the first follow analysis. And epsilons 
+        are ignored in sequences, thus sequence of StarMessagePredicate, Literal
+        leads to { Literal } as firstSet and not expected { MessagePredicate, Literal }
+    "
+    ^ self error: 'Cannot perform first/follow analysis on myself, sorry for that :('
 ! !
 
 !PPCStarMessagePredicateNode methodsFor:'comparing'!
 
 = anotherNode
-	super = anotherNode ifFalse: [ ^ false ].
-	^ message = anotherNode message.
+    super = anotherNode ifFalse: [ ^ false ].
+    ^ message = anotherNode message.
 !
 
 hash
-	^ super hash bitXor: message hash
+    ^ super hash bitXor: message hash
 ! !
 
 !PPCStarMessagePredicateNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitStarMessagePredicateNode: self
+    ^ visitor visitStarMessagePredicateNode: self
 ! !
 
--- a/compiler/PPCStarNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCStarNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,39 +12,43 @@
 !PPCStarNode methodsFor:'accessing'!
 
 acceptsEpsilon
-	^ true
+    ^ true
 !
 
 acceptsEpsilonOpenSet: set
-	^ true
+    ^ true
 !
 
 prefix
-	^ #star
+    ^ #star
 ! !
 
-!PPCStarNode methodsFor:'analyzing'!
+!PPCStarNode methodsFor:'analysis'!
 
 isNullable
-	^ true
+    ^ true
+!
+
+recognizedSentencesPrim
+    ^ 	#()
 ! !
 
 !PPCStarNode methodsFor:'first follow next'!
 
 followSets: aFollowDictionary firstSets: aFirstDictionary into: aSet suchThat: aBlock
-	| first |
-	super followSets: aFollowDictionary firstSets:  aFirstDictionary into: aSet suchThat: aBlock.
-	
-	first := aFirstDictionary at: self.
+    | first |
+    super followSets: aFollowDictionary firstSets:  aFirstDictionary into: aSet suchThat: aBlock.
+    
+    first := aFirstDictionary at: self.
 
-	self children do: [ :el | 
-		(aFollowDictionary at: el) addAll: (first reject: [:each | each isNullable])
-	]
+    self children do: [ :el | 
+        (aFollowDictionary at: el) addAll: (first reject: [:each | each isNullable])
+    ]
 ! !
 
 !PPCStarNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitStarNode: self
+    ^ visitor visitStarNode: self
 ! !
 
--- a/compiler/PPCSymbolActionNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCSymbolActionNode.st	Sun May 10 06:46:56 2015 +0100
@@ -13,17 +13,17 @@
 !PPCSymbolActionNode methodsFor:'accessing'!
 
 symbol
-	^ self block
+    ^ self block
 !
 
 symbol: aSymbol
-	self block: aSymbol
+    self block: aSymbol
 ! !
 
 !PPCSymbolActionNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitSymbolActionNode: self
+    ^ visitor visitSymbolActionNode: self
 ! !
 
 !PPCSymbolActionNode class methodsFor:'documentation'!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCTokenChoiceNode.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,17 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCChoiceNode subclass:#PPCTokenChoiceNode
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Nodes'
+!
+
+!PPCTokenChoiceNode methodsFor:'as yet unclassified'!
+
+accept: visitor
+    visitor visitTokenChoiceNode: self.
+! !
+
--- a/compiler/PPCTokenConsumeNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCTokenConsumeNode.st	Sun May 10 06:46:56 2015 +0100
@@ -9,13 +9,23 @@
 	category:'PetitCompiler-Nodes'
 !
 
-!PPCTokenConsumeNode methodsFor:'as yet unclassified'!
+!PPCTokenConsumeNode methodsFor:'accessing'!
 
-accept: visitor
-	^ visitor visitTokenConsumeNode: self
+name: value
+    super name: value.
+    
+    self child name isNil ifTrue: [ 
+        self child name: self child prefix, '_', value.
+    ]
 !
 
 prefix
-	^ #consume
+    ^ #consume
 ! !
 
+!PPCTokenConsumeNode methodsFor:'visiting'!
+
+accept: visitor
+    ^ visitor visitTokenConsumeNode: self
+! !
+
--- a/compiler/PPCTokenDetector.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCTokenDetector.st	Sun May 10 06:46:56 2015 +0100
@@ -9,59 +9,76 @@
 	category:'PetitCompiler-Visitors'
 !
 
-!PPCTokenDetector methodsFor:'visiting'!
+!PPCTokenDetector methodsFor:'as yet unclassified'!
 
-visitActionNode: node
-	(node hasProperty: #trimmingToken) ifTrue: [ 
-		| newWs newChild  |
-		self change.
-
-		newChild := self visitWithTokenVisitor: node child children second child. "Oups, what a chain"
-		newWs := self visitWithTokenVisitor: node child children first.
+visitActionNode: node	
 
-		^ PPCTrimmingTokenNode new
-			name: node name;
-			child: newChild;
-			tokenClass: node child children second tokenClass;
-			whitespace: newWs;
-			yourself.
-	].
+    (node hasProperty: #trimmingToken) ifTrue: [ 
+        | child whitespace |
+        self change.
+        child := self visitWithTokenVisitor: node child secondChild.
+        whitespace := self visitWithTokenVisitor: node child firstChild.
+        
+        ^ PPCTrimmingTokenNode new
+            name: node name;
+            child: child;
+            whitespace: whitespace;
+            tokenClass: node child secondChild tokenClass;
+            properties: node properties copy;
+            yourself.
+    ].
 
-	^ super visitActionNode: node
+    ^ super visitActionNode: node
 !
 
-visitNotNode: node
-	"We don't need result of the not,..."
-	| child newChild |
-	self change.
-	child := node child.
-	newChild := self visitWithTokenVisitor: child.
-	node replace: child with: newChild.
-	^ node
+visitTokenNode: node	
+    | child newChild |
+    self change.
+    child := node child.
+    newChild := self visitWithTokenVisitor: node child.
+    node replace: child with: newChild.
+    
+    ^ node
 !
 
-visitTokenNode: node
-	| child newChild |
-	
-	self change.
-	child := node child.
-	newChild := self visitWithTokenVisitor: child.
-	node replace: child with: newChild.
-	
-	^ node
+visitTrimNode: node
+    self visitChildren: node.
+    
+    (node child isKindOf: PPCTokenNode) ifTrue: [  
+        self change.
+        ^ PPCTrimmingTokenNode new
+            name: node name;
+            child: node child child;
+            tokenClass: node child tokenClass;
+            whitespace: node trimmer;
+            yourself
+    ]. 
+
+    (node child isKindOf: PPCTokenConsumeNode) ifTrue: [  
+        self change.
+        ^ PPCTrimmingTokenNode new
+            name: node name;
+            child: node child;
+            tokenClass: node child child tokenClass;
+            whitespace: node trimmer;
+            yourself
+    ]. 
+
+
+    ^ node
 !
 
 visitWithTokenVisitor: node
-	| retval forbiddenNodes copyVisitor tokenVisitor |
-	
-	copyVisitor := PPCCopyVisitor new.
-	tokenVisitor := PPCTokenVisitor new.
-	
-	forbiddenNodes := openSet copy.
-	tokenVisitor forbiddenNodes: forbiddenNodes.
+    | retval forbiddenNodes copyVisitor tokenVisitor |
+    
+    copyVisitor := PPCCopyVisitor new.
+    tokenVisitor := PPCTokenVisitor new.
+    
+    forbiddenNodes := openSet copy.
+    tokenVisitor forbiddenNodes: forbiddenNodes.
 
-	retval := copyVisitor visit: node.
-	retval := tokenVisitor visit: retval.
-	^ retval
+    retval := copyVisitor visit: node.
+    retval := tokenVisitor visit: retval.
+    ^ retval
 ! !
 
--- a/compiler/PPCTokenNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCTokenNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,37 +12,43 @@
 !PPCTokenNode methodsFor:'accessing'!
 
 prefix
-	^ #token
+    ^ #token
 !
 
 tokenClass
-	
-	^ tokenClass
+    
+    ^ tokenClass
 !
 
 tokenClass: anObject
-	
-	tokenClass := anObject
+    
+    tokenClass := anObject
 !
 
 tokenType
-	^ self identityHash printString
+    ^ self identityHash printString
 ! !
 
 !PPCTokenNode methodsFor:'comparing'!
 
 = anotherNode
-	super = anotherNode ifFalse: [ ^ false ].
-	^ tokenClass = anotherNode tokenClass.
+    super = anotherNode ifFalse: [ ^ false ].
+    ^ tokenClass = anotherNode tokenClass.
 !
 
 hash
-	^ super hash bitXor: tokenClass hash
+    ^ super hash bitXor: tokenClass hash
+! !
+
+!PPCTokenNode methodsFor:'testing'!
+
+isTokenNode
+    ^ true
 ! !
 
 !PPCTokenNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitTokenNode: self
+    ^ visitor visitTokenNode: self
 ! !
 
--- a/compiler/PPCTokenSequenceNode.st	Tue May 05 16:25:23 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-"{ Package: 'stx:goodies/petitparser/compiler' }"
-
-"{ NameSpace: Smalltalk }"
-
-PPCSequenceNode subclass:#PPCTokenSequenceNode
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'PetitCompiler-Nodes'
-!
-
-
-!PPCTokenSequenceNode methodsFor:'accessing'!
-
-suffix
-	^ #'_fast'
-! !
-
-!PPCTokenSequenceNode methodsFor:'visiting'!
-
-accept: visitor
-	^ visitor visitTokenSequenceNode: self
-! !
-
-!PPCTokenSequenceNode class methodsFor:'documentation'!
-
-version_HG
-
-    ^ '$Changeset: <not expanded> $'
-! !
-
--- a/compiler/PPCTokenStarMessagePredicateNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCTokenStarMessagePredicateNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,6 +12,6 @@
 !PPCTokenStarMessagePredicateNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitTokenStarMessagePredicateNode: self
+    ^ visitor visitTokenStarMessagePredicateNode: self
 ! !
 
--- a/compiler/PPCTokenStarSeparatorNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCTokenStarSeparatorNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,6 +12,6 @@
 !PPCTokenStarSeparatorNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitTokenStarSeparatorNode: self
+    ^ visitor visitTokenStarSeparatorNode: self
 ! !
 
--- a/compiler/PPCTokenVisitor.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCTokenVisitor.st	Sun May 10 06:46:56 2015 +0100
@@ -9,86 +9,66 @@
 	category:'PetitCompiler-Visitors'
 !
 
-!PPCTokenVisitor methodsFor:'accessing'!
+!PPCTokenVisitor methodsFor:'as yet unclassified'!
 
-forbiddenNodes: nodeSet
-	forbiddenNodes := nodeSet.
-! !
+visitActionNode: node	
 
-!PPCTokenVisitor methodsFor:'initialization'!
+    (node hasProperty: #trimmingToken) ifTrue: [ 
+        | child newChild | 
+        "trimming token in token, remove it"
+        self change.
+        
+        child := node child secondChild.
+        newChild := self visit: child.
+        
+        child name isNil ifTrue: [ 
+            newChild name: node name.
+            ^ newChild.
+        ].
+        ^ PPCForwardNode new
+            child: newChild;
+            name: node name;
+            yourself
+    ].
 
-initialize
-	super initialize.
-	forbiddenNodes := IdentitySet new.
+    ^ super visitActionNode: node
+!
+
+visitTokenNode: node
+    "token in token, remove the token"
+    self visitChildren: node.
+    
+    node child name isNil ifTrue: [ 
+        self change.
+        node child name: node name.
+        ^ node child
+    ].
+
+ 	self change.
+    ^ PPCForwardNode new
+        child: node child;
+        name: node name;
+        yourself	
 ! !
 
 !PPCTokenVisitor methodsFor:'traversing'!
 
-beforeAccept: node
-	self assert: (forbiddenNodes includes: node) not description: 'Does not look like a token' 
-! !
-
-!PPCTokenVisitor methodsFor:'visiting'!
-
-visitActionNode: node
-	self visitChildren: node.
+afterAccept: node retval: retval
 
-	(node hasProperty: #trimmingToken) ifTrue: [ 
-		| child |
-		"token in token..."
-		child := node child children second.
-		child name ifNil: [ 
-			self change.
-			child name: node name.
-			^ child
-		]
-	].
-
-	self change.
-	^ node child
+    (retval name isNil not and: [ (retval name endsWith: '_ws') ]) ifTrue: [ 
+        self change.
+        ^ PPCTokenWhitespaceNode new
+            child: retval;
+            yourself
+    ].
+    ^ super afterAccept: node retval: retval
 !
 
-visitSequenceNode: node
-	self visitChildren: node.
-
-	self change.
-	^ PPCTokenSequenceNode new
-		children: node children;
-		name: node name;
-		properties: node properties;
-		yourself	
-!
-
-visitStarMessagePredicateNode: node
-	self visitChildren: node.
-	
-	self change.
-	^ PPCTokenStarMessagePredicateNode new
-		name: node name;
-		message: node message;
-		child: node child;
-		yourself
+beforeAccept: node
+    self assert: (forbiddenNodes includes: node) not description: 'Does not look like a token' 
 !
 
-visitSymbolActionNode: node
-	self visitChildren: node.
-	
-	self change.
-	^ node child
-!
-
-visitTokenNode: node
-	self visitChildren: node.
-	self change.
-	^ node child
-!
-
-visitTrimmingTokenNode: node
-	self visitChildren: node.
-        
-	self change.
-	^ node child
-
-    "Modified: / 23-04-2015 / 12:11:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+forbiddenNodes: nodeSet
+    forbiddenNodes := nodeSet.
 ! !
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCTokenWhitespaceNode.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,17 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCDelegateNode subclass:#PPCTokenWhitespaceNode
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Nodes'
+!
+
+!PPCTokenWhitespaceNode methodsFor:'as yet unclassified'!
+
+accept: visitor
+    visitor visitTokenWhitespaceNode: self.
+! !
+
--- a/compiler/PPCTokenizingCodeGenerator.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCTokenizingCodeGenerator.st	Sun May 10 06:46:56 2015 +0100
@@ -11,52 +11,160 @@
 
 !PPCTokenizingCodeGenerator methodsFor:'visiting'!
 
-visitLLChoiceNode: node
-	| dictionary currentTokenVar |
-	dictionary := IdentityDictionary new.
-	
-	node children do: [ :child |
-		| firstSet |
-		firstSet := child firstSetSuchThat: [ :e | e isKindOf: PPCTokenNode ].
-		self assert: firstSet size = 1.
-		dictionary at: child 
-			put: firstSet anyOne.
-			
-	].
-	"Tokens are unique"
-	self assert: dictionary values asSet size = node children size.
-	
-	compiler addConstant: (dictionary values collect: [ :e | compiler idFor: e ])
-				as: #tokenMethods.
-	
-	currentTokenVar := compiler allocateTemporaryVariableNamed: 'currentToken'.
-	compiler codeAssign: 'self currentTokenType.' to: currentTokenVar.
-	node children do: [ :child |
-		| tokenMethodName |
-		tokenMethodName := compiler idFor: (dictionary at: child).
-		compiler add: currentTokenVar , ' = ',  tokenMethodName storeString.
-		compiler add: 'ifTrue: ['.
-		compiler codeStoreValueOf: [ self visit: child ] intoVariable: self retvalVar.
-		compiler codeReturn: self retvalVar.
-		compiler add: '].'
-	].
+visitChoiceNode: node
+"	true ifTrue: [ ^ super visitChoiceNode: node ]."
+    "HACK alert: We are inside token..."
+    node firstSetWithTokens detect: [ :e | e isTokenNode not ] ifFound: [ ^ super visitChoiceNode: node ].
+         
+    node children do: [ :child |
+        | tokenMethodName |
+        
+        child firstSetWithTokens do: [ :first |
+            "For each child, for each first compile this:"
+            tokenMethodName := compiler idFor: first.
+            compiler add: '(self currentTokenTypeIs: ', tokenMethodName storeString, ')'.
+            compiler addOnLine: ' ifTrue: ['.
+            compiler indent.
+            compiler codeStoreValueOf: [ self visit: child ] intoVariable: self retvalVar.
+            compiler add: 'error ifFalse: ['.
+            compiler indent.
+            compiler codeReturn: self retvalVar.
+            compiler dedent.
+            compiler add: '] ifTrue: ['.
+            compiler indent.
+            compiler codeClearError.
+            compiler codeAssign: 'nil.' to: 'currentTokenType'.
+            compiler add: 'context position: currentTokenValue start - 1.'.
+            compiler dedent.
+            compiler add: ']'.
+            compiler dedent.
+            compiler add: '].'
+        ]
+    ].
+
+    compiler codeError: 'no choice found'.
+!
 
-	compiler codeError: 'no choice found'.
+visitDeterministicChoiceNode: node
+    | dictionary |
+    dictionary := IdentityDictionary new.
+    
+    node children do: [ :child |
+        | firstSet |
+        firstSet := child firstSetWithTokens.
+        self assert: firstSet size = 1.
+        dictionary at: child 
+            put: firstSet anyOne.
+            
+    ].
+    "Tokens are unique"
+    self assert: dictionary values asSet size = node children size.
+    
+"	currentTokenVar := compiler allocateTemporaryVariableNamed: 'currentToken'.
+    compiler codeAssign: 'self currentTokenType.' to: currentTokenVar.
+"	node children do: [ :child |
+        | tokenMethodName |
+        tokenMethodName := compiler idFor: (dictionary at: child).
+        compiler add: '(self currentTokenTypeIs: ', tokenMethodName storeString, ')'.
+        compiler addOnLine: ' ifTrue: ['.
+        compiler indent.
+        compiler codeStoreValueOf: [ self visit: child ] intoVariable: self retvalVar.
+        compiler codeReturn: self retvalVar.
+        compiler dedent.
+        compiler add: '].'
+    ].
+
+    compiler codeError: 'no choice found'.
+!
+
+visitTokenChoiceNode: node
+    | trimmingToken |
+    self assert: (node children allSatisfy: [ :e | e isMarkedForInline not ]).
+    
+    
+    trimmingToken := node children detect: [ :e | e isTrimmingTokenNode ] ifNone: [ nil ].
+    trimmingToken isNil ifFalse: [ 
+        compiler codeStoreValueOf: [ self visit: trimmingToken whitespace ] intoVariable: #whatever.
+    ].
+    super visitChoiceNode: node.
 !
 
 visitTokenConsumeNode: node
-	compiler codeReturn: 'self consume: ', (compiler idFor: node child) storeString, '.'
+    compiler codeReturn: 'self consume: ', (compiler idFor: node child) storeString, '.'
 !
 
 visitTokenNode: node
-	| tokenType |
-	self assert: node isMarkedForInline.
+    | id startVar endVar |
+    startVar := compiler allocateTemporaryVariableNamed: 'start'.
+    endVar := compiler allocateTemporaryVariableNamed: 'end'.
+
+    id := compiler idFor: node.
+    compiler toTokenRememberStrategy.	
+    
+    compiler codeAssign: 'context position + 1.' to: startVar.
+    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: #whatever.
+    compiler add: 'error ifFalse: [ '.
+    compiler indent.	
+        compiler codeAssign: 'context position.' to: endVar.
+    
+        compiler codeTranscriptShow: 'current token type: ', id storeString.
+        compiler codeAssign: id storeString, '.' to: 'currentTokenType'.
+        compiler codeAssign: node tokenClass asString, ' on: (context collection) 
+                                                                    start: ', startVar, '  
+                                                                    stop: ', endVar, '
+                                                                    value: nil.'
+                    to: 'currentTokenValue := ', self retvalVar.
+        compiler codeReturn.
+    compiler dedent.
+    compiler add: '].'.		
+    compiler toNormalRememberStrategy.
+!
+
+visitTokenizingParserNode: node
+    self visit: node tokenizer.
+    
+"	compiler codeNextToken."
+    compiler codeHaltIfShiftPressed.
+    compiler codeStoreValueOf: [ self visit: node parser ] intoVariable: self retvalVar.
+    compiler codeReturn.
+!
 
-	super visitTokenNode: node.
-	
-	tokenType := compiler idFor: node.
+visitTrimmingTokenNode: node
+    |  id  startVar endVar |
+    
+    startVar := compiler allocateTemporaryVariableNamed: 'start'.
+    endVar := compiler allocateTemporaryVariableNamed:  'end'.
+    
+    id := compiler idFor: node.
+    compiler toTokenRememberStrategy.
+    
+    
+    compiler addComment: 'Consume Whitespace:'.
+    compiler codeStoreValueOf: [ self visit: node whitespace ] intoVariable: #whatever.
+    compiler nl.
+
+    compiler codeAssign: 'context position + 1.' to: startVar.
+    compiler codeStoreValueOf: [ self visit: node child ] intoVariable: #whatever.
 
-	compiler codeAssign: tokenType storeString, '.' to: 'currentTokenType'.
-	compiler codeAssign: self retvalVar, '.' to: 'currentTokenValue'.
+    compiler add: 'error ifFalse: [ '.
+    compiler indent.	
+        compiler codeAssign: 'context position.' to: endVar.
+    
+        compiler addComment: 'Consume Whitespace:'.
+        compiler codeStoreValueOf: [ self visit: node whitespace ] intoVariable: #whatever.
+        compiler nl.
+    
+    
+        compiler codeTranscriptShow: 'current token type: ', id storeString.
+        compiler codeAssign: id storeString, '.' to: 'currentTokenType'.
+        compiler codeAssign: node tokenClass asString, ' on: (context collection) 
+                                                                start: ', startVar, ' 
+                                                                stop: ', endVar, '
+                                                                value: nil.'
+                   to: 'currentTokenValue := ', self retvalVar.
+        compiler codeReturn.
+    compiler dedent.																
+    compiler add: '].'	.
+    compiler toNormalRememberStrategy.
 ! !
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCTokenizingCompiler.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,52 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCCompiler subclass:#PPCTokenizingCompiler
+	instanceVariableNames:'rememberStrategy'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Core'
+!
+
+!PPCTokenizingCompiler methodsFor:'accessing'!
+
+compiledParserSuperclass
+    ^ compiledParserSuperclass ifNil: [ PPTokenizingCompiledParser ]
+! !
+
+!PPCTokenizingCompiler methodsFor:'code generation'!
+
+smartRemember: parser to: variableName 
+    rememberStrategy smartRemember: parser to: variableName
+!
+
+smartRestore: parser from: mementoName
+    rememberStrategy smartRestore: parser from: mementoName
+! !
+
+!PPCTokenizingCompiler methodsFor:'initialization'!
+
+initialize
+    super initialize.
+    rememberStrategy := PPCCompilerTokenizingRememberStrategy on: self
+! !
+
+!PPCTokenizingCompiler methodsFor:'remember strategy'!
+
+toNormalRememberStrategy
+    "
+        When backtracking, currentTokenValue and currentTokenType has
+        to be restored
+    "
+    rememberStrategy := PPCCompilerTokenizingRememberStrategy on: self
+!
+
+toTokenRememberStrategy
+    "
+        We dont have to remember currentTokenType and currentTokenValue,
+        while parsing token
+    "
+    rememberStrategy := PPCCompilerTokenRememberStrategy on: self
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCTokenizingParserNode.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,44 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCListNode subclass:#PPCTokenizingParserNode
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Nodes'
+!
+
+!PPCTokenizingParserNode methodsFor:'accessing'!
+
+initialize
+    super initialize.
+    children := Array new: 2
+!
+
+parser
+    ^ children at: 1
+!
+
+parser: node
+    children at: 1 put: node
+!
+
+prefix
+    ^ #tokenizingParser
+!
+
+tokenizer
+    ^ children at: 2
+!
+
+tokenizer: node
+    ^ children at: 2 put: node
+! !
+
+!PPCTokenizingParserNode methodsFor:'visiting'!
+
+accept: visitor
+    ^ visitor visitTokenizingParserNode: self
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCTokenizingVisitor.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,105 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCRewritingVisitor subclass:#PPCTokenizingVisitor
+	instanceVariableNames:'tokens'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Visitors'
+!
+
+!PPCTokenizingVisitor methodsFor:'hooks'!
+
+afterAccept: node retval: retval
+    Halt if: [ node name = 'start' ].
+    self isRoot ifTrue: [ 
+        | tokenizerNode |
+        self change.
+        tokens addLast: self eofToken.
+        tokens do: [ :token | token unmarkForInline  ].
+        
+        tokenizerNode := PPCTokenChoiceNode new
+            children: tokens asArray;
+            name: 'nextToken';
+            yourself.
+    
+        ^ PPCTokenizingParserNode new
+            parser: retval;
+            tokenizer: tokenizerNode;
+            name: #'mainParser';
+            yourself
+    ].
+    ^ retval
+    
+!
+
+eofToken
+    | ws  |
+    ws := PPCStarNode new
+        child: (PPCMessagePredicateNode new
+            message: #isSeparator;
+            yourself);
+        yourself.
+    
+    ^ PPCTrimmingTokenNode new
+        child: PPCEndOfFileNode new;
+        whitespace: ws;
+        tokenClass: PPToken;
+        yourself.
+! !
+
+!PPCTokenizingVisitor methodsFor:'initialization'!
+
+initialize
+    super initialize.
+    tokens := OrderedCollection new.
+! !
+
+!PPCTokenizingVisitor methodsFor:'testing'!
+
+isRoot
+    ^ openSet size = 1
+! !
+
+!PPCTokenizingVisitor methodsFor:'tokens'!
+
+addToken: token
+    (tokens contains: [:e | e == token] ) ifFalse: [ 
+        tokens addLast: token
+    ]
+! !
+
+!PPCTokenizingVisitor methodsFor:'visiting'!
+
+visitActionNode: node
+    (node hasProperty: #trimmingToken) ifTrue: [ 
+        self change.
+        self addToken: node.
+        
+        ^ PPCTokenConsumeNode new
+            child: node;
+            yourself	
+    ].
+
+    ^ super visitActionNode: node
+!
+
+visitTokenNode: node
+    self change.
+    self addToken: node.
+    
+    ^ PPCTokenConsumeNode new
+        child: node;
+        yourself.
+!
+
+visitTrimmingTokenNode: node
+    self change.
+    self addToken: node.
+    
+    ^ PPCTokenConsumeNode new
+        child: node;
+        yourself.
+! !
+
--- a/compiler/PPCTrimNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCTrimNode.st	Sun May 10 06:46:56 2015 +0100
@@ -2,7 +2,7 @@
 
 "{ NameSpace: Smalltalk }"
 
-PPCDelegateNode subclass:#PPCTrimNode
+PPCSequenceNode subclass:#PPCTrimNode
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
@@ -11,13 +11,63 @@
 
 !PPCTrimNode methodsFor:'accessing'!
 
+child
+    
+    ^ children at: 2
+!
+
+child: anObject
+    
+    children at: 2 put: anObject
+!
+
 prefix
-	^ #trim
+    ^ #trim
+!
+
+trimmer
+    ^ children at: 1
+!
+
+trimmer: anObject
+    children at: 1 put: anObject
+! !
+
+!PPCTrimNode methodsFor:'analysis'!
+
+acceptsEpsilon
+    ^ self child acceptsEpsilonOpenSet: (IdentitySet with: self).
+!
+
+acceptsEpsilonOpenSet: set
+    (set includes: self child) ifFalse: [ 
+        set add: self child.
+        ^ self child acceptsEpsilonOpenSet: set 
+    ].
+    ^ false
+! !
+
+!PPCTrimNode methodsFor:'initialization'!
+
+defaultTrimmer
+    | message |
+    message := PPCMessagePredicateNode new 
+            message: #isSeparator;
+            yourself.
+    ^ PPCStarNode new
+        child: message;
+        yourself.
+!
+
+initialize
+    super initialize.
+    children := Array new: 2.
+    children at: 1 put: self defaultTrimmer.
 ! !
 
 !PPCTrimNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitTrimNode: self
+    ^ visitor visitTrimNode: self
 ! !
 
--- a/compiler/PPCTrimmingTokenNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCTrimmingTokenNode.st	Sun May 10 06:46:56 2015 +0100
@@ -12,93 +12,107 @@
 !PPCTrimmingTokenNode methodsFor:'accessing'!
 
 child
-	
-	^ children at: 2
+    
+    ^ children at: 2
 !
 
 child: anObject
-	
-	children at: 2 put: anObject
+    
+    children at: 2 put: anObject
 !
 
 prefix
-	^ #token
+    ^ #token
 !
 
 tokenClass
-	
-	^ tokenClass
+    
+    ^ tokenClass
 !
 
 tokenClass: anObject
-	
-	tokenClass := anObject
+    
+    tokenClass := anObject
 !
 
 whitespace
-	
-	^ children at: 1
+    
+    ^ children at: 1
 !
 
 whitespace: anObject
-	(anObject name isNil and: [ self child name isNotNil ]) ifTrue: [ 
-		anObject name: self child name, '_ws'.
-	].
-	children at: 1 put: anObject
+    (anObject name isNil and: [ self child name isNotNil ]) ifTrue: [ 
+        anObject name: self child name, '_ws'.
+    ].
+    children at: 1 put: anObject
 ! !
 
 !PPCTrimmingTokenNode methodsFor:'analyzing'!
 
 acceptsEpsilon
-	^ self child acceptsEpsilonOpenSet: (IdentitySet with: self).
+    ^ self child acceptsEpsilonOpenSet: (IdentitySet with: self).
 !
 
 acceptsEpsilonOpenSet: set
-	(set includes: self child) ifFalse: [ 
-		set add: self child.
-		^ self child acceptsEpsilonOpenSet: set 
-	].
-	^ false
+    (set includes: self child) ifFalse: [ 
+        set add: self child.
+        ^ self child acceptsEpsilonOpenSet: set 
+    ].
+    ^ false
 !
 
 firstSetSuchThat: block into: aCollection openSet: aSet
-	(aSet includes: self) ifTrue: [ ^ aCollection ].
-	aSet add: self.
-	
-	(block value: self) ifTrue: [ aCollection add: self. ^ aCollection ].
-	
-	^ self child firstSetSuchThat: block into: aCollection openSet: aSet.
+    (aSet includes: self) ifTrue: [ ^ aCollection ].
+    aSet add: self.
+    
+    (block value: self) ifTrue: [ aCollection add: self. ^ aCollection ].
+    
+    ^ self child firstSetSuchThat: block into: aCollection openSet: aSet.
 !
 
 firstSets: aFirstDictionary into: aSet suchThat: aBlock
-	"PRIVATE: Try to add additional elements to the first-set aSet of the receiver, use the incomplete aFirstDictionary."
+    "PRIVATE: Try to add additional elements to the first-set aSet of the receiver, use the incomplete aFirstDictionary."
 
-	(aBlock value: self) ifFalse: [ 
-		aSet addAll: (aFirstDictionary at: self child)
-	]
+    (aBlock value: self) ifFalse: [ 
+        aSet addAll: (aFirstDictionary at: self child)
+    ]
+!
+
+recognizedSentencesPrim
+    ^ self child recognizedSentencesPrim 
 ! !
 
 !PPCTrimmingTokenNode methodsFor:'comparing'!
 
 = anotherNode
-	super = anotherNode ifFalse: [ ^ false ].
-	^ tokenClass = anotherNode tokenClass.
+    super = anotherNode ifFalse: [ ^ false ].
+    ^ tokenClass = anotherNode tokenClass.
 !
 
 hash
-	^ super hash bitXor: tokenClass hash
+    ^ super hash bitXor: tokenClass hash
 ! !
 
 !PPCTrimmingTokenNode methodsFor:'initialization'!
 
 initialize
-	super initialize.
-	children := Array new: 2
+    super initialize.
+    children := Array new: 2
+! !
+
+!PPCTrimmingTokenNode methodsFor:'testing'!
+
+isTokenNode
+    ^ true
+!
+
+isTrimmingTokenNode
+    ^ true
 ! !
 
 !PPCTrimmingTokenNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitTrimmingTokenNode: self
+    ^ visitor visitTrimmingTokenNode: self
 ! !
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPCUniversalConfiguration.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,26 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCConfiguration subclass:#PPCUniversalConfiguration
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Core'
+!
+
+!PPCUniversalConfiguration methodsFor:'compiling'!
+
+invokePhases
+    self toPPCIr.
+    self createTokens.
+    self cacheFirstFollow.
+    self specialize.
+    self createRecognizingComponents.
+    self specialize.
+    self inline.
+    self merge.
+    self check.	
+    self generate.
+! !
+
--- a/compiler/PPCUnknownNode.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCUnknownNode.st	Sun May 10 06:46:56 2015 +0100
@@ -13,72 +13,79 @@
 !PPCUnknownNode class methodsFor:'as yet unclassified'!
 
 new
-	^ self basicNew initialize
+    ^ self basicNew initialize
 ! !
 
 !PPCUnknownNode methodsFor:'accessing'!
 
 acceptsEpsilon
-	^ parser acceptsEpsilon
+    ^ parser acceptsEpsilon
 !
 
 acceptsEpsilonOpenSet: aSet
-	^ parser acceptsEpsilonOpenSet: aSet
+    ^ parser acceptsEpsilonOpenSet: aSet
 !
 
 children
-	^ parser children
+    ^ parser children
 !
 
 isContextFreePrim
-	^ parser isContextFreePrim
+    ^ parser isContextFreePrim
 !
 
 isNullable
-	^ parser isNullable
+    ^ parser isNullable
 !
 
 parser
-	
-	^ parser
+    
+    ^ parser
 !
 
 parser: anObject
-	
-	parser := anObject
+    
+    parser := anObject
 !
 
 prefix
-	^ #parser
+    ^ #parser
 ! !
 
 !PPCUnknownNode methodsFor:'analysis'!
 
 firstCharSet
-	^ parser firstCharSet
+    ^ parser firstCharSet
 ! !
 
 !PPCUnknownNode methodsFor:'comparison'!
 
 = anotherNode
-	super = anotherNode ifFalse: [ ^ false ].
-	^ parser = anotherNode parser.
+    super = anotherNode ifFalse: [ ^ false ].
+    ^ parser = anotherNode parser.
 !
 
 hash
-	^ super hash bitXor: parser hash
+    ^ super hash bitXor: parser hash
+! !
+
+!PPCUnknownNode methodsFor:'copying'!
+
+postCopy
+    super postCopy.
+    parser := parser copy.
 ! !
 
 !PPCUnknownNode methodsFor:'transformation'!
 
 replace: node with: anotherNode
-	parser replace: node with: anotherNode
+    parser replace: node with: anotherNode
 ! !
 
 !PPCUnknownNode methodsFor:'visiting'!
 
 accept: visitor
-	^ visitor visitUnknownNode: self
+    ^ visitor visitUnknownNode: self
 ! !
 
 !PPCUnknownNode class methodsFor:'documentation'!
--- a/compiler/PPCompiledParser.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/PPCompiledParser.st	Sun May 10 06:46:56 2015 +0100
@@ -3,11 +3,10 @@
 "{ NameSpace: Smalltalk }"
 
 PPParser subclass:#PPCompiledParser
-	instanceVariableNames:'startSymbol context failure error currentTokenValue
-		currentTokenType'
+	instanceVariableNames:'startSymbol context failure error'
 	classVariableNames:''
 	poolDictionaries:''
-	category:'PetitCompiler-Core'
+	category:'PetitCompiler-Parsers'
 !
 
 PPCompiledParser class instanceVariableNames:'parsers constants referringParser startSymbol'
@@ -20,144 +19,117 @@
 !PPCompiledParser class methodsFor:'as yet unclassified'!
 
 addConstant: value as: id
-	self constants at: id ifPresent: [ 
-		((self constants at: id) = value) ifFalse: [self error: 'ooups']].	
-	
-	self constants at: id put: value.
+    self constants at: id ifPresent: [ 
+        ((self constants at: id) = value) ifFalse: [self error: 'ooups']].	
+    
+    self constants at: id put: value.
 !
 
 constants
-	constants ifNil: [ constants := IdentityDictionary new ].
-	^ constants
+    constants ifNil: [ constants := IdentityDictionary new ].
+    ^ constants
 !
 
 parse: input
-	^ self new parse: input
+    ^ self new parse: input
 !
 
 referringParser
-	^ referringParser ifNil: [ ^ PPSentinel new ]
+    ^ referringParser ifNil: [ ^ PPSentinel new ]
 !
 
 referringParser: aPPParser
-	referringParser := aPPParser
+    referringParser := aPPParser
 !
 
 startSymbol
-	^ startSymbol ifNil: [ ^ #start ]
+    ^ startSymbol ifNil: [ ^ #start ]
 !
 
 startSymbol: symbol
-	startSymbol := symbol
+    startSymbol := symbol
 ! !
 
 !PPCompiledParser methodsFor:'as yet unclassified'!
 
 callParser: id
-	| retval |
-	retval := (self class parsers at: id) parseOn: context.
-	retval isPetitFailure 	ifTrue: [ self error: retval message at: retval position ]
-									ifFalse: [ self clearError ].
-	^ retval
+    | retval |
+    retval := (self class parsers at: id) parseOn: context.
+    retval isPetitFailure 	ifTrue: [ self error: retval message at: retval position ]
+                                    ifFalse: [ self clearError ].
+    ^ retval
 !
 
 clearError
-	error := false.
+    error := false.
 !
 
 error
-	^ self error: '' at: context position
+    ^ self error: '' at: context position
 !
 
 error: message
-	^ self error: message at: context position
+    ^ self error: message at: context position
 !
 
 error: aMessage at: position
-	failure position < position ifTrue: [
-		failure message: aMessage.
-		failure position: position
-	].
-	error := true.
-	^ failure
+    failure position < position ifTrue: [
+        failure message: aMessage.
+        failure position: position
+    ].
+    error := true.
+    ^ failure
 !
 
 initialize
-	super initialize.
-	
-	self class constants keysAndValuesDo: [ :key :value |
-		self instVarNamed: key put: value.
-	].
+    super initialize.
+    
+    self class constants keysAndValuesDo: [ :key :value |
+        self instVarNamed: key put: value.
+    ].
 
-	startSymbol := self class startSymbol.
+    startSymbol := self class startSymbol.
 
-	
+    
 !
 
 isCompiled
-	^ true
+    ^ true
 !
 
 isError
-	^ error
+    ^ error
 !
 
 parse: input rule: symbol
-	startSymbol := symbol.
-	^ self parse: input.
+    startSymbol := symbol.
+    ^ self parse: input.
 !
 
 start
-	^ self subclassResponsibility
+    ^ self subclassResponsibility
 !
 
 startSymbol: aSymbol
-	startSymbol := aSymbol
+    startSymbol := aSymbol
 ! !
 
 !PPCompiledParser methodsFor:'parsing'!
 
 parseOn: aPPContext
-	| retval |
+    | retval |
 "	context := aPPContext asCompiledParserContext."
-	context := aPPContext.
-	context compiledParser: self.
-	failure := PPFailure new message: nil; context: context; position: -1.
-	context noteFailure: failure.
-	error := false.
+    context := aPPContext.
+    context compiledParser: self.
+    failure := PPFailure new message: nil; context: context; position: -1.
+    context noteFailure: failure.
+    error := false.
 
-	retval := self perform: startSymbol.
-	(retval isPetitFailure) ifTrue: [ aPPContext noteFailure: failure ].
-	error ifTrue: [ aPPContext noteFailure: failure. retval := failure ].
-	
+    retval := self perform: startSymbol.
+    (retval isPetitFailure) ifTrue: [ aPPContext noteFailure: failure ].
+    error ifTrue: [ aPPContext noteFailure: failure. retval := failure ].
+    
 "	aPPContext position: context position."
-	^ retval
+    ^ retval
 ! !
 
-!PPCompiledParser methodsFor:'tokenizing'!
-
-consume: tokenType
-	(currentTokenType = tokenType) ifTrue: [ 
-		| retval |
-		retval := currentTokenValue.
-		self nextToken.
-		^ retval
-	] ifFalse: [ 
-		self error: 'expected: ', tokenType storeString, ' got ', currentTokenType storeString.
-	]
-!
-
-currentTokenType
-	currentTokenType isNil ifTrue: [ self nextToken ].
-	^ currentTokenType
-!
-
-currentTokenValue
-	currentTokenType isNil ifTrue: [ self nextToken ].
-	^ currentTokenType
-!
-
-nextToken
-	self shouldBeImplemented
-! !
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/PPTokenizingCompiledParser.st	Sun May 10 06:46:56 2015 +0100
@@ -0,0 +1,56 @@
+"{ Package: 'stx:goodies/petitparser/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCompiledParser subclass:#PPTokenizingCompiledParser
+	instanceVariableNames:'currentTokenValue currentTokenType'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Parsers'
+!
+
+!PPTokenizingCompiledParser methodsFor:'tokenizing'!
+
+consume: tokenType
+    (self currentTokenTypeIs: tokenType) ifTrue: [ 
+        | retval |
+        retval := currentTokenValue.
+        currentTokenType := nil.
+        ^ retval
+    ] ifFalse: [ 
+        "self error: 'expected: ', tokenType storeString, ' got ', currentTokenType storeString."
+        self error.
+    ]
+!
+
+currentTokenType
+    currentTokenType isNil ifTrue: [ self nextToken ].
+    ^ currentTokenType
+!
+
+currentTokenTypeIs: tokenType
+    "if the type is read"
+    currentTokenType isNil ifFalse: [ ^ currentTokenType = tokenType ].
+    
+    "if not, try to read the token"
+    self perform: tokenType.
+    error ifTrue: [  
+        ^ error := false.
+    ].
+    ^ true
+!
+
+currentTokenValue
+    currentTokenType isNil ifTrue: [ self nextToken ].
+    ^ currentTokenType
+!
+
+nextToken
+    self shouldBeImplemented 
+!
+
+parseOn: input
+    currentTokenType := nil.
+    ^ super parseOn: input.
+! !
+
--- a/compiler/abbrev.stc	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/abbrev.stc	Sun May 10 06:46:56 2015 +0100
@@ -5,6 +5,8 @@
 PPCBridge PPCBridge stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
 PPCCompiledMethod PPCCompiledMethod stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
 PPCCompiler PPCCompiler stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
+PPCCompilerTokenRememberStrategy PPCCompilerTokenRememberStrategy stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
+PPCCompilerTokenizingRememberStrategy PPCCompilerTokenizingRememberStrategy stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
 PPCConfiguration PPCConfiguration stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
 PPCContext PPCContext stx:goodies/petitparser/compiler 'PetitCompiler-Context' 0
 PPCContextMemento PPCContextMemento stx:goodies/petitparser/compiler 'PetitCompiler-Context' 0
@@ -12,7 +14,8 @@
 PPCMethod PPCMethod stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
 PPCNode PPCNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCNodeVisitor PPCNodeVisitor stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
-PPCompiledParser PPCompiledParser stx:goodies/petitparser/compiler 'PetitCompiler-Core' 4
+PPCPluggableConfiguration PPCPluggableConfiguration stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
+PPCompiledParser PPCompiledParser stx:goodies/petitparser/compiler 'PetitCompiler-Parsers' 4
 stx_goodies_petitparser_compiler stx_goodies_petitparser_compiler stx:goodies/petitparser/compiler '* Projects & Packages *' 3
 PPCAbstractCharacterNode PPCAbstractCharacterNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCAbstractLiteralNode PPCAbstractLiteralNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
@@ -21,23 +24,27 @@
 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
-PPCFirstPrototype PPCFirstPrototype stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
 PPCInlinedMethod PPCInlinedMethod stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
 PPCInliningVisitor PPCInliningVisitor stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
+PPCLL1Configuration PPCLL1Configuration stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
 PPCListNode PPCListNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCNilNode PPCNilNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
-PPCPluggableConfiguration PPCPluggableConfiguration stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
 PPCPluggableNode PPCPluggableNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCProfilingContext PPCProfilingContext stx:goodies/petitparser/compiler 'PetitCompiler-Context' 0
 PPCRewritingVisitor PPCRewritingVisitor stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
+PPCTokenizingCompiler PPCTokenizingCompiler stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
+PPCUniversalConfiguration PPCUniversalConfiguration stx:goodies/petitparser/compiler 'PetitCompiler-Core' 0
 PPCUnknownNode PPCUnknownNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
+PPTokenizingCompiledParser PPTokenizingCompiledParser stx:goodies/petitparser/compiler 'PetitCompiler-Parsers' 4
 PPCAbstractActionNode PPCAbstractActionNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCAndNode PPCAndNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCCharSetPredicateNode PPCCharSetPredicateNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCCharacterNode PPCCharacterNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCChoiceNode PPCChoiceNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCCopyVisitor PPCCopyVisitor stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
+PPCEndOfInputNode PPCEndOfInputNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCForwardNode PPCForwardNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
+PPCLL1Visitor PPCLL1Visitor stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
 PPCLiteralNode PPCLiteralNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCMergingVisitor PPCMergingVisitor stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
 PPCMessagePredicateNode PPCMessagePredicateNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
@@ -46,26 +53,33 @@
 PPCNotLiteralNode PPCNotLiteralNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCNotMessagePredicateNode PPCNotMessagePredicateNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCNotNode PPCNotNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
-PPCOptimizingVisitor PPCOptimizingVisitor stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
+PPCOptimizeChoices PPCOptimizeChoices stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
 PPCOptionalNode PPCOptionalNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCPlusNode PPCPlusNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCPredicateNode PPCPredicateNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
+PPCRecognizerComponentDetector PPCRecognizerComponentDetector stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
+PPCRecognizerComponentVisitor PPCRecognizerComponentVisitor stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
 PPCSentinelNode PPCSentinelNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 1
 PPCSequenceNode PPCSequenceNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
+PPCSpecializingVisitor PPCSpecializingVisitor stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
 PPCStarNode PPCStarNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCTokenConsumeNode PPCTokenConsumeNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCTokenDetector PPCTokenDetector stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
 PPCTokenNode PPCTokenNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCTokenVisitor PPCTokenVisitor stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
+PPCTokenWhitespaceNode PPCTokenWhitespaceNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCTokenizingCodeGenerator PPCTokenizingCodeGenerator stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
-PPCTrimNode PPCTrimNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
+PPCTokenizingParserNode PPCTokenizingParserNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
+PPCTokenizingVisitor PPCTokenizingVisitor stx:goodies/petitparser/compiler 'PetitCompiler-Visitors' 0
 PPCTrimmingTokenNode PPCTrimmingTokenNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCActionNode PPCActionNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
-PPCLLChoiceNode PPCLLChoiceNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
+PPCDeterministicChoiceNode PPCDeterministicChoiceNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
+PPCRecognizingSequenceNode PPCRecognizingSequenceNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCStarAnyNode PPCStarAnyNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCStarCharSetPredicateNode PPCStarCharSetPredicateNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCStarMessagePredicateNode PPCStarMessagePredicateNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCSymbolActionNode PPCSymbolActionNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
-PPCTokenSequenceNode PPCTokenSequenceNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
+PPCTokenChoiceNode PPCTokenChoiceNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
+PPCTrimNode PPCTrimNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCTokenStarMessagePredicateNode PPCTokenStarMessagePredicateNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
 PPCTokenStarSeparatorNode PPCTokenStarSeparatorNode stx:goodies/petitparser/compiler 'PetitCompiler-Nodes' 0
--- a/compiler/bc.mak	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/bc.mak	Sun May 10 06:46:56 2015 +0100
@@ -82,6 +82,8 @@
 $(OUTDIR)PPCBridge.$(O) PPCBridge.$(H): PPCBridge.st $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCCompiledMethod.$(O) PPCCompiledMethod.$(H): PPCCompiledMethod.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCCompiler.$(O) PPCCompiler.$(H): PPCCompiler.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCCompilerTokenRememberStrategy.$(O) PPCCompilerTokenRememberStrategy.$(H): PPCCompilerTokenRememberStrategy.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCCompilerTokenizingRememberStrategy.$(O) PPCCompilerTokenizingRememberStrategy.$(H): PPCCompilerTokenizingRememberStrategy.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCConfiguration.$(O) PPCConfiguration.$(H): PPCConfiguration.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCContext.$(O) PPCContext.$(H): PPCContext.st $(INCLUDE_TOP)\stx\goodies\petitparser\PPStream.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\PeekableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\PositionableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\ReadStream.$(H) $(INCLUDE_TOP)\stx\libbasic\Stream.$(H) $(STCHDR)
 $(OUTDIR)PPCContextMemento.$(O) PPCContextMemento.$(H): PPCContextMemento.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
@@ -89,6 +91,7 @@
 $(OUTDIR)PPCMethod.$(O) PPCMethod.$(H): PPCMethod.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCNode.$(O) PPCNode.$(H): PPCNode.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCNodeVisitor.$(O) PPCNodeVisitor.$(H): PPCNodeVisitor.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCPluggableConfiguration.$(O) PPCPluggableConfiguration.$(H): PPCPluggableConfiguration.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCompiledParser.$(O) PPCompiledParser.$(H): PPCompiledParser.st $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)stx_goodies_petitparser_compiler.$(O) stx_goodies_petitparser_compiler.$(H): stx_goodies_petitparser_compiler.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
 $(OUTDIR)PPCAbstractCharacterNode.$(O) PPCAbstractCharacterNode.$(H): PPCAbstractCharacterNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
@@ -98,23 +101,27 @@
 $(OUTDIR)PPCCodeGenerator.$(O) PPCCodeGenerator.$(H): PPCCodeGenerator.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNodeVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCDelegateNode.$(O) PPCDelegateNode.$(H): PPCDelegateNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCEndOfFileNode.$(O) PPCEndOfFileNode.$(H): PPCEndOfFileNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)PPCFirstPrototype.$(O) PPCFirstPrototype.$(H): PPCFirstPrototype.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCConfiguration.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCInlinedMethod.$(O) PPCInlinedMethod.$(H): PPCInlinedMethod.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCMethod.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCInliningVisitor.$(O) PPCInliningVisitor.$(H): PPCInliningVisitor.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNodeVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCLL1Configuration.$(O) PPCLL1Configuration.$(H): PPCLL1Configuration.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCConfiguration.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCListNode.$(O) PPCListNode.$(H): PPCListNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCNilNode.$(O) PPCNilNode.$(H): PPCNilNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)PPCPluggableConfiguration.$(O) PPCPluggableConfiguration.$(H): PPCPluggableConfiguration.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCConfiguration.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCPluggableNode.$(O) PPCPluggableNode.$(H): PPCPluggableNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCProfilingContext.$(O) PPCProfilingContext.$(H): PPCProfilingContext.st $(INCLUDE_TOP)\stx\goodies\petitparser\PPStream.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCContext.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\PeekableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\PositionableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\ReadStream.$(H) $(INCLUDE_TOP)\stx\libbasic\Stream.$(H) $(STCHDR)
 $(OUTDIR)PPCRewritingVisitor.$(O) PPCRewritingVisitor.$(H): PPCRewritingVisitor.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNodeVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCTokenizingCompiler.$(O) PPCTokenizingCompiler.$(H): PPCTokenizingCompiler.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCCompiler.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCUniversalConfiguration.$(O) PPCUniversalConfiguration.$(H): PPCUniversalConfiguration.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCConfiguration.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCUnknownNode.$(O) PPCUnknownNode.$(H): PPCUnknownNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPTokenizingCompiledParser.$(O) PPTokenizingCompiledParser.$(H): PPTokenizingCompiledParser.st $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCompiledParser.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCAbstractActionNode.$(O) PPCAbstractActionNode.$(H): PPCAbstractActionNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCAndNode.$(O) PPCAndNode.$(H): PPCAndNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCCharSetPredicateNode.$(O) PPCCharSetPredicateNode.$(H): PPCCharSetPredicateNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCAbstractPredicateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCCharacterNode.$(O) PPCCharacterNode.$(H): PPCCharacterNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCAbstractCharacterNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCChoiceNode.$(O) PPCChoiceNode.$(H): PPCChoiceNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCListNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCCopyVisitor.$(O) PPCCopyVisitor.$(H): PPCCopyVisitor.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCRewritingVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCEndOfInputNode.$(O) PPCEndOfInputNode.$(H): PPCEndOfInputNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCForwardNode.$(O) PPCForwardNode.$(H): PPCForwardNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCLL1Visitor.$(O) PPCLL1Visitor.$(H): PPCLL1Visitor.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCRewritingVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCLiteralNode.$(O) PPCLiteralNode.$(H): PPCLiteralNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCAbstractLiteralNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCMergingVisitor.$(O) PPCMergingVisitor.$(H): PPCMergingVisitor.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCRewritingVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCMessagePredicateNode.$(O) PPCMessagePredicateNode.$(H): PPCMessagePredicateNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCAbstractPredicateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
@@ -123,30 +130,37 @@
 $(OUTDIR)PPCNotLiteralNode.$(O) PPCNotLiteralNode.$(H): PPCNotLiteralNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCAbstractLiteralNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCNotMessagePredicateNode.$(O) PPCNotMessagePredicateNode.$(H): PPCNotMessagePredicateNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCAbstractPredicateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCNotNode.$(O) PPCNotNode.$(H): PPCNotNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)PPCOptimizingVisitor.$(O) PPCOptimizingVisitor.$(H): PPCOptimizingVisitor.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCRewritingVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCOptimizeChoices.$(O) PPCOptimizeChoices.$(H): PPCOptimizeChoices.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCRewritingVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCOptionalNode.$(O) PPCOptionalNode.$(H): PPCOptionalNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCPlusNode.$(O) PPCPlusNode.$(H): PPCPlusNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCPredicateNode.$(O) PPCPredicateNode.$(H): PPCPredicateNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCAbstractPredicateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCRecognizerComponentDetector.$(O) PPCRecognizerComponentDetector.$(H): PPCRecognizerComponentDetector.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCRewritingVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCRecognizerComponentVisitor.$(O) PPCRecognizerComponentVisitor.$(H): PPCRecognizerComponentVisitor.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCRewritingVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCSentinelNode.$(O) PPCSentinelNode.$(H): PPCSentinelNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNilNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCSequenceNode.$(O) PPCSequenceNode.$(H): PPCSequenceNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCListNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCSpecializingVisitor.$(O) PPCSpecializingVisitor.$(H): PPCSpecializingVisitor.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCRewritingVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCStarNode.$(O) PPCStarNode.$(H): PPCStarNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTokenConsumeNode.$(O) PPCTokenConsumeNode.$(H): PPCTokenConsumeNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTokenDetector.$(O) PPCTokenDetector.$(H): PPCTokenDetector.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCRewritingVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTokenNode.$(O) PPCTokenNode.$(H): PPCTokenNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTokenVisitor.$(O) PPCTokenVisitor.$(H): PPCTokenVisitor.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCRewritingVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCTokenWhitespaceNode.$(O) PPCTokenWhitespaceNode.$(H): PPCTokenWhitespaceNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTokenizingCodeGenerator.$(O) PPCTokenizingCodeGenerator.$(H): PPCTokenizingCodeGenerator.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCCodeGenerator.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNodeVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)PPCTrimNode.$(O) PPCTrimNode.$(H): PPCTrimNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCTokenizingParserNode.$(O) PPCTokenizingParserNode.$(H): PPCTokenizingParserNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCListNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCTokenizingVisitor.$(O) PPCTokenizingVisitor.$(H): PPCTokenizingVisitor.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCRewritingVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTrimmingTokenNode.$(O) PPCTrimmingTokenNode.$(H): PPCTrimmingTokenNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCListNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCActionNode.$(O) PPCActionNode.$(H): PPCActionNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCAbstractActionNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)PPCLLChoiceNode.$(O) PPCLLChoiceNode.$(H): PPCLLChoiceNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCChoiceNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCListNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCDeterministicChoiceNode.$(O) PPCDeterministicChoiceNode.$(H): PPCDeterministicChoiceNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCChoiceNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCListNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCRecognizingSequenceNode.$(O) PPCRecognizingSequenceNode.$(H): PPCRecognizingSequenceNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCListNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCSequenceNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCStarAnyNode.$(O) PPCStarAnyNode.$(H): PPCStarAnyNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCStarNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCStarCharSetPredicateNode.$(O) PPCStarCharSetPredicateNode.$(H): PPCStarCharSetPredicateNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCStarNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCStarMessagePredicateNode.$(O) PPCStarMessagePredicateNode.$(H): PPCStarMessagePredicateNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCStarNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCSymbolActionNode.$(O) PPCSymbolActionNode.$(H): PPCSymbolActionNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCAbstractActionNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)PPCTokenSequenceNode.$(O) PPCTokenSequenceNode.$(H): PPCTokenSequenceNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCListNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCSequenceNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCTokenChoiceNode.$(O) PPCTokenChoiceNode.$(H): PPCTokenChoiceNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCChoiceNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCListNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)PPCTrimNode.$(O) PPCTrimNode.$(H): PPCTrimNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCListNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCSequenceNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTokenStarMessagePredicateNode.$(O) PPCTokenStarMessagePredicateNode.$(H): PPCTokenStarMessagePredicateNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCStarMessagePredicateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCStarNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PPCTokenStarSeparatorNode.$(O) PPCTokenStarSeparatorNode.$(H): PPCTokenStarSeparatorNode.st $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCDelegateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCStarMessagePredicateNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCStarNode.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\compiler\PPCTokenStarMessagePredicateNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\goodies\petitparser\PPActionParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPAndParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPCharSetPredicate.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPChoiceParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPCompositeParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPContext.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPDelegateParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPEpsilonParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPFailure.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPFlattenParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPListParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPLiteralObjectParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPLiteralParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPLiteralSequenceParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPNotParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPOptionalParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPPluggableParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPPossessiveRepeatingParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPPredicateObjectParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPPredicateParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPRepeatingParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPSequenceParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPStream.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPToken.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPTokenParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPTrimmingParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\parsers\java\PPJavaWhitespaceParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\parsers\smalltalk\PPSmalltalkGrammar.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\parsers\smalltalk\PPSmalltalkTokenParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\parsers\smalltalk\PPSmalltalkWhitespaceParser.$(H) $(INCLUDE_TOP)\stx\libbasic\Character.$(H) $(INCLUDE_TOP)\stx\libbasic\Magnitude.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\PeekableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\PositionableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\ReadStream.$(H) $(INCLUDE_TOP)\stx\libbasic\Stream.$(H) $(INCLUDE_TOP)\stx\libbasic\UndefinedObject.$(H) $(STCHDR)
+$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\goodies\petitparser\PPActionParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPAndParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPCharSetPredicate.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPChoiceParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPCompositeParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPContext.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPDelegateParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPEndOfInputParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPEpsilonParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPFailure.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPFlattenParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPListParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPLiteralObjectParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPLiteralParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPLiteralSequenceParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPNotParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPOptionalParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPPluggableParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPPossessiveRepeatingParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPPredicateObjectParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPPredicateParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPRepeatingParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPSequenceParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPStream.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPToken.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPTokenParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPTrimmingParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\parsers\java\PPJavaWhitespaceParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\parsers\smalltalk\PPSmalltalkGrammar.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\parsers\smalltalk\PPSmalltalkTokenParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\parsers\smalltalk\PPSmalltalkWhitespaceParser.$(H) $(INCLUDE_TOP)\stx\libbasic\Character.$(H) $(INCLUDE_TOP)\stx\libbasic\Magnitude.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\PeekableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\PositionableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\ReadStream.$(H) $(INCLUDE_TOP)\stx\libbasic\Stream.$(H) $(INCLUDE_TOP)\stx\libbasic\UndefinedObject.$(H) $(STCHDR)
 
 # ENDMAKEDEPEND --- do not remove this line
 
--- a/compiler/benchmarks/Make.proto	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/benchmarks/Make.proto	Sun May 10 06:46:56 2015 +0100
@@ -122,7 +122,6 @@
 
 # BEGINMAKEDEPEND --- do not remove this line; make depend needs it
 $(OUTDIR)PPCBenchmark.$(O) PPCBenchmark.$(H): PPCBenchmark.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)PPCBenchmarkResources.$(O) PPCBenchmarkResources.$(H): PPCBenchmarkResources.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)stx_goodies_petitparser_compiler_benchmarks.$(O) stx_goodies_petitparser_compiler_benchmarks.$(H): stx_goodies_petitparser_compiler_benchmarks.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
 
 # ENDMAKEDEPEND --- do not remove this line
--- a/compiler/benchmarks/Make.spec	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/benchmarks/Make.spec	Sun May 10 06:46:56 2015 +0100
@@ -52,7 +52,6 @@
 
 COMMON_CLASSES= \
 	PPCBenchmark \
-	PPCBenchmarkResources \
 	stx_goodies_petitparser_compiler_benchmarks \
 
 
@@ -60,7 +59,6 @@
 
 COMMON_OBJS= \
     $(OUTDIR_SLASH)PPCBenchmark.$(O) \
-    $(OUTDIR_SLASH)PPCBenchmarkResources.$(O) \
     $(OUTDIR_SLASH)stx_goodies_petitparser_compiler_benchmarks.$(O) \
 
 
--- a/compiler/benchmarks/PPCBenchmark.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/benchmarks/PPCBenchmark.st	Sun May 10 06:46:56 2015 +0100
@@ -3,7 +3,8 @@
 "{ NameSpace: Smalltalk }"
 
 Object subclass:#PPCBenchmark
-	instanceVariableNames:'sources report contextClass compile parser context input'
+	instanceVariableNames:'sources report contextClass compile parser context input
+		configuration'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'PetitCompiler-Benchmarks-Core'
@@ -21,399 +22,437 @@
 !PPCBenchmark class methodsFor:'benchmarking-CalipeL'!
 
 run
-	| benchmarkSuiteClass |
-	
-	benchmarkSuiteClass := Smalltalk at: #BenchmarkSuite.
-	benchmarkSuiteClass isNil ifTrue:[
-		self error: 'CalipeL is not loaded.'
-	].
-	^ (benchmarkSuiteClass  class:self) run
+    | benchmarkSuiteClass |
+    
+    benchmarkSuiteClass := Smalltalk at: #BenchmarkSuite.
+    benchmarkSuiteClass isNil ifTrue:[
+        self error: 'CalipeL is not loaded.'
+    ].
+    ^ (benchmarkSuiteClass  class:self) run
 
   	"
-	PPCBenchmark run.
-	"
+    PPCBenchmark run.
+    "
 !
 
 run: selector
-	| benchmarkSuiteClass |
-	
-	benchmarkSuiteClass := Smalltalk at: #BenchmarkSuite.
-	benchmarkSuiteClass isNil ifTrue:[
-		self error: 'CalipeL is not loaded.'
-	].
-	^ (benchmarkSuiteClass  class:self selector: selector ) run
-	
-	"
-	PPCBenchmark run: #benchmarkRBParserC
-	"
+    | benchmarkSuiteClass |
+    
+    benchmarkSuiteClass := Smalltalk at: #BenchmarkSuite.
+    benchmarkSuiteClass isNil ifTrue:[
+        self error: 'CalipeL is not loaded.'
+    ].
+    ^ (benchmarkSuiteClass  class:self selector: selector ) run
+    
+    "
+    PPCBenchmark run: #benchmarkRBParserC
+    "
 ! !
 
 !PPCBenchmark methodsFor:'benchmark support'!
 
 compile: value
-	compile := value
-!
-
-createContext
-	^ contextClass new
-!
-
-initialize
-	super initialize.
-	sources := PPCBenchmarkResources new.
-	contextClass := PPCContext.
-	compile := false.
+    compile := value
 !
 
 measure: aParser on: anInput name: aString
-	| time result p |
-	context := self createContext.
-	
-	p := compile ifTrue: [ 
-		aParser end compile
-	] ifFalse: [ 
-		aParser end
-	].
+    | time result p |
+    context := self createContext.
+    
+    p := compile ifTrue: [ 
+        aParser end compile
+    ] ifFalse: [ 
+        aParser end
+    ].
 
-	
-	time := Time millisecondsToRun: [ result := p parse: anInput withContext: context ].
+    
+    time := Time millisecondsToRun: [ result := p parse: anInput withContext: context ].
 
-	self assert: result isPetitFailure not.
-	self reportFor: aParser context: context input: anInput time: time name: aString.
+    self assert: result isPetitFailure not.
+    self reportFor: aParser context: context input: anInput time: time name: aString.
 !
 
 reportFor: aParser context: aContext input: anInput time: time name: name
-	Transcript crShow: (self getMetaInfo: name).
-	Transcript crShow: '	Compile: ', compile asString.	
-	
-	Transcript crShow: '	Total time: ', time asString, ' ms'.
-		
-	Transcript crShow: '	Time per character: ', 
-	(((time / anInput size) asFloat * 1000) asString truncateTo: 6), 
-	' microseconds'.
-	
+    Transcript crShow: (self getMetaInfo: name).
+    Transcript crShow: '	Compile: ', compile asString.	
+    
+    Transcript crShow: '	Total time: ', time asString, ' ms'.
+        
+    Transcript crShow: '	Time per character: ', 
+    (((time / anInput size) asFloat * 1000) asString truncateTo: 6), 
+    ' microseconds'.
+    
 "	Transcript crShow: '	Backtrack per character: ',
-	((aContext backtrackCount / anInput size) asFloat asString truncateTo: 6),
-	'.'.
-	
-	Transcript crShow: '	Remembers per character: ',
-	((aContext rememberCount / input size) asFloat asString truncateTo: 6),
-	'.'.
+    ((aContext backtrackCount / anInput size) asFloat asString truncateTo: 6),
+    '.'.
+    
+    Transcript crShow: '	Remembers per character: ',
+    ((aContext rememberCount / input size) asFloat asString truncateTo: 6),
+    '.'.
 "
 !
 
 reportInput: input time: time name: name
-	| size |
-	size := input inject: 0 into: [:r :e | r + e size  ].
-	Transcript crShow: 'Size: ', size asString.
-	Transcript crShow: name, ' time: ', time asString.
-	Transcript crShow: 'Time per character: ', (time / size * 1000.0) asString, ' microseconds'.
+    | size |
+    size := input inject: 0 into: [:r :e | r + e size  ].
+    Transcript crShow: 'Size: ', size asString.
+    Transcript crShow: name, ' time: ', time asString.
+    Transcript crShow: 'Time per character: ', (time / size * 1000.0) asString, ' microseconds'.
 ! !
 
 !PPCBenchmark methodsFor:'benchmarks'!
 
 benchmarkJavaSyntax
-	| time |
-	
-	self assert: '../java-src' asFileReference exists description: '../java-src directory with java sources expected'.
+    | time |
+    
+    self assert: '../java-src' asFileReference exists description: '../java-src directory with java sources expected'.
 
-	parser := PPJavaSyntax new.
-	context := PPCContext new.
-	context initializeFor: parser.
-	input := sources javaSourcesBig.
+    parser := PPJavaSyntax new.
+    context := PPCContext new.
+    context initializeFor: parser.
+    input := sources javaSourcesBig.
 
-	time := [ input do: [ :source | parser parse: source withContext: context ]] timeToRun asMilliSeconds.
-	
-	self reportInput: input time: time name: 'Java Syntax'.
+    time := [ input do: [ :source | parser parse: source withContext: context ]] timeToRun asMilliSeconds.
+    
+    self reportInput: input time: time name: 'Java Syntax'.
 !
 
 benchmarkJavaSyntaxCompiled
-	| time |
-	
-	self assert: '../java-src' asFileReference exists description: '../java-src directory with java sources expected'.
+    | time |
+    
+    self assert: '../java-src' asFileReference exists description: '../java-src directory with java sources expected'.
 
-	parser := PPJavaSyntax new compile.
-	context := PPCContext new.
-	context initializeFor: parser.
-	input := sources javaSourcesBig.
+    parser := PPJavaSyntax new compile.
+    context := PPCContext new.
+    context initializeFor: parser.
+    input := sources javaSourcesBig.
 
-	time := [ input do: [ :source | parser parse: source withContext: context ]] timeToRun asMilliSeconds.
-	
-	self reportInput: input time: time name: 'Java Syntax Compiled'.
+    time := [ input do: [ :source | parser parse: source withContext: context ]] timeToRun asMilliSeconds.
+    
+    self reportInput: input time: time name: 'Java Syntax Compiled'.
 !
 
 benchmarkOpalCompiler
-	| parser time input |
-	parser := OpalCompiler new.
-	input := sources smalltalkSourcesBig.
-	time := [ input do: [ :source | parser parse: source ]] timeToRun asMilliseconds.
-	
-	self reportInput: input time: time name: 'Opal'
+    | parser time input |
+    parser := OpalCompiler new.
+    input := sources smalltalkSourcesBig.
+    time := [ input do: [ :source | parser parse: source ]] timeToRun asMilliseconds.
+    
+    self reportInput: input time: time name: 'Opal'
 !
 
 benchmarkSmalltalkGrammar
-	| time |
+    | time |
+
+    self setupSmalltalkGrammar.
 
-	parser := PPSmalltalkGrammar new.
-	context := PPContext new.
-	context initializeFor: parser.
-	input := sources smalltalkSourcesBig.
-
-	time := [ input do: [ :source | parser parse: source withContext: context ]] timeToRun asMilliSeconds.
-	
-	self reportInput: input time: time name: 'Smalltalk Grammar'.
+    time := [ input do: [ :source | parser parse: source withContext: context ]] timeToRun asMilliSeconds.
+    
+    self reportInput: input time: time name: 'Smalltalk Grammar'.
 !
 
 benchmarkSmalltalkGrammarCompiled
-	| time  |
-	parser := PPSmalltalkGrammar new compile.
-	context := PPCContext new.
-	context initializeFor: parser.
-	input := sources smalltalkSourcesBig.
+    | time  |
+
+    self setupSmalltalkGrammarCompiled.
 
-	time := [ input do: [ :source | parser parse: source withContext: context ]] timeToRun asMilliSeconds.
-	
-	self reportInput: input time: time name: 'Compiled Grammar'.
+    time := [ input do: [ :source | parser parse: source withContext: context ]] timeToRun asMilliSeconds.
+    
+    self reportInput: input time: time name: 'Compiled Smalltalk Grammar'.
 
 "	
-	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'.
+    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'.
+"
+!
+
+benchmarkSmalltalkGrammarTokenized
+    | time   |
+
+    self setupSmalltalkGrammarTokenized.
+    
+    time := [ input do: [ :source | 
+            parser parse: source withContext: context ] 
+    ] timeToRun asMilliSeconds.
+    
+    self reportInput: input time: time name: 'Tokenized Smalltalk Grammar'.
+
+"	
+    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'.
 "
 !
 
 benchmarkSmalltalkParser
-	| time |
-	parser := PPSmalltalkParser new.
-	context := PPContext new.
-	context initializeFor: parser.
-	input := sources smalltalkSourcesBig.
+    | time |
+    parser := PPSmalltalkParser new.
+    context := PPContext new.
+    context initializeFor: parser.
+    input := sources smalltalkSourcesBig.
 
-	time := [ input do: [ :source | parser parse: source withContext: context ]] timeToRun asMilliSeconds.
-	
-	self reportInput: input time: time name: 'Smalltalk Parser'.
+    time := [ input do: [ :source | parser parse: source withContext: context ]] timeToRun asMilliSeconds.
+    
+    self reportInput: input time: time name: 'Smalltalk Parser'.
 !
 
 benchmarkSmalltalkParserCompiled
-	| time |
-	parser := PPSmalltalkParser new compile.
-	context := PPCContext new.
-	context initializeFor: parser.
-	input := sources smalltalkSourcesBig.
+    | time |
+    
+    configuration := PPCConfiguration default.
+    parser := PPSmalltalkParser new compileWithConfiguration: configuration.
+    context := PPCContext new.
+    context initializeFor: parser.
+    input := sources smalltalkSourcesBig.
 
-	time := [ input do: [ :source | parser parse: source withContext: context ]] timeToRun asMilliSeconds.
-	
-		self reportInput: input time: time name: 'Smalltalk Parser Compiled'.
+    time := [ input do: [ :source | parser parse: source withContext: context ]] timeToRun asMilliSeconds.
+    
+        self reportInput: input time: time name: 'Smalltalk Parser Compiled'.
 ! !
 
 !PPCBenchmark methodsFor:'benchmarks - micro'!
 
 benchmarkAnyStar
 "
-	self measure: self anyStar on: sources petitParserPackage.
+    self measure: self anyStar on: sources petitParserPackage.
 "	
-	self measure: self anyStar on: (sources changesSized: 1000*1000) name: #anyStar.
+    self measure: self anyStar on: (sources changesSized: 1000*1000) name: #anyStar.
 !
 
 benchmarkAnyStarBlock
 "
-	self measure: self anyStar on: sources petitParserPackage.
+    self measure: self anyStar on: sources petitParserPackage.
 "	
-	self measure: self anyStarBlock on: (sources changesSized: 1000*1000) name: #anyStarBlock.
+    self measure: self anyStarBlock on: (sources changesSized: 1000*1000) name: #anyStarBlock.
 !
 
 benchmarkToken
 "
-	self measure: self anyStar on: sources petitParserPackage.
+    self measure: self anyStar on: sources petitParserPackage.
 "	
-	parser := (self tokenParser / #any asParser) star.
-	self measure: parser on: (sources changesSized: 1000*1000) name: #token.
+    parser := (self tokenParser / #any asParser) star.
+    self measure: parser on: (sources changesSized: 1000*1000) name: #token.
 ! !
 
 !PPCBenchmark methodsFor:'benchmarks-CalipeL'!
 
 benchmarkJavaSyntaxC
-	<setup: #setupJavaSyntaxC>
-	<benchmark: 'Petit Java Parser - Standard'>
-	
-	input do: [ :source | parser parse: source withContext: context ]
+    <setup: #setupJavaSyntax>
+    <benchmark: 'Petit Java Parser - Standard'>
+    
+    input do: [ :source | parser parse: source withContext: context ]
 !
 
 benchmarkJavaSyntaxCompiledC
-	<setup: #setupJavaSyntaxCompiledC>
-	<teardown: #teardownJavaSyntaxCompiledC>
-	<benchmark: 'Petit Java Parser - Compiled'>
-	
-	input do: [ :source | parser parse: source withContext: context ]
-	
+    <setup: #setupJavaSyntaxCompiled>
+    <teardown: #teardownJavaSyntaxCompiled>
+    <benchmark: 'Petit Java Parser - Compiled'>
+    
+    input do: [ :source | parser parse: source withContext: context ]
+    
 !
 
 benchmarkRBParserC
-	<setup: #setupRBParserC>
-	<benchmark: 'RB Smalltalk Parser'>
-	
-	input do: [ :source | RBParser parseMethod: source ]
+    <setup: #setupRBParser>
+    <benchmark: 'RB Smalltalk Parser'>
+    
+    input do: [ :source | RBParser parseMethod: source ]
 !
 
 benchmarkSmalltalkGrammarC
-	<setup: #setupSmalltalkGrammarC>
-	<benchmark: 'Petit Smalltalk Grammar - Standard'>
-	
-	input do: [ :source | parser parse: source withContext: context ]
+    <setup: #setupSmalltalkGrammar>
+    <benchmark: 'Petit Smalltalk Grammar - Standard'>
+    
+    input do: [ :source | parser parse: source withContext: context ]
 !
 
 benchmarkSmalltalkGrammarCompiledC
-	<setup: #setupSmalltalkGrammarCompiledC>
-	<teardown: #teardownSmalltalkGrammarCompiledC>
-	<benchmark: 'Petit Smalltalk Grammar - Compiled'>
-	
-	
-	input do: [ :source | parser parse: source withContext: context ]
+    <setup: #setupSmalltalkGrammarCompiled>
+    <teardown: #teardownSmalltalkGrammarCompiled>
+    <benchmark: 'Petit Smalltalk Grammar - Compiled'>
+    
+    
+    input do: [ :source | parser parse: source withContext: context ]
+!
+
+benchmarkSmalltalkGrammarTokenizedC
+    <setup: #setupSmalltalkGrammarTokenized>
+    <teardown: #teardownSmalltalkGrammarTokenized>
+    <benchmark: 'Petit Smalltalk Grammar - Tokenized'>
+    
+    
+    input do: [ :source | parser parse: source withContext: context ]
 !
 
 benchmarkSmalltalkParserC
-	<setup: #setupSmalltalkParserC>
-	<benchmark: 'Petit Smalltalk Parser - Standard'>
-	
-	input do: [ :source | parser parse: source withContext: context ]
+    <setup: #setupSmalltalkParser>
+    <benchmark: 'Petit Smalltalk Parser - Standard'>
+    
+    input do: [ :source | parser parse: source withContext: context ]
 !
 
 benchmarkSmalltalkParserCompiledC
-	<setup: #setupSmalltalkParserCompiledC>
-	<teardown: #teardownSmalltalkParserCompiledC>
-	<benchmark: 'Petit Smalltalk Parser - Compiled'>
-	
-	input do: [ :source | parser parse: source withContext: context ]
-	
+    <setup: #setupSmalltalkParserCompiled>
+    <teardown: #teardownSmalltalkParserCompiled>
+    <benchmark: 'Petit Smalltalk Parser - Compiled'>
+    
+    input do: [ :source | parser parse: source withContext: context ]
+    
 ! !
 
-!PPCBenchmark methodsFor:'benchmarks-CalipeL- setup & teardown'!
-
-setupJavaSyntaxC
-	
-	parser := PPJavaSyntax new.
-	context := PPCContext new.
-	context initializeFor: parser.
-	input := sources javaSourcesBig.
-!
-
-setupJavaSyntaxCompiledC
-	parser := PPJavaSyntax new compile.
-	context := PPCContext new.
-	context initializeFor: parser.
-	input := sources javaSourcesBig.
+!PPCBenchmark methodsFor:'intitialization'!
 
-"	
-	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'.
-"
-!
-
-setupRBParserC
-	
-	input := sources smalltalkSourcesBig.
-!
-
-setupSmalltalkGrammarC
-	
-	parser := PPSmalltalkGrammar new.
-	context := PPCContext new.
-	context initializeFor: parser.
-	input := sources smalltalkSourcesBig.
+createContext
+    ^ contextClass new
 !
 
-setupSmalltalkGrammarCompiledC
-	parser := PPSmalltalkGrammar new compile.
-	context := PPCContext new.
-	context initializeFor: parser.
-	input := sources smalltalkSourcesBig.
-
-"	
-	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'.
-"
-!
-
-setupSmalltalkParserC
-	
-	parser := PPSmalltalkParser new.
-	context := PPCContext new.
-	context initializeFor: parser.
-	input := sources smalltalkSourcesBig.
-!
-
-setupSmalltalkParserCompiledC
-	parser := PPSmalltalkParser new compile.
-	context := PPCContext new.
-	context initializeFor: parser.
-	input := sources smalltalkSourcesBig.
-
-"	
-	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'.
-"
-!
-
-teardownJavaSyntaxCompiledC
-	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'.
-"
-!
-
-teardownSmalltalkGrammarCompiledC
-	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'.
-"
-!
-
-teardownSmalltalkParserCompiledC
-	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'.
-"
+initialize
+    super initialize.
+    sources := PPCResources current.
+    contextClass := PPCContext.
+    compile := false.
 ! !
 
 !PPCBenchmark methodsFor:'meta'!
 
 getMetaInfo: key
-	| info |
-	info := self metaInfo select: [ :each | each key = key ].
-	info isEmpty ifTrue: [ ^ 'unknown benchmark' ].
-	^ info anyOne value
+    | info |
+    info := self metaInfo select: [ :each | each key = key ].
+    info isEmpty ifTrue: [ ^ 'unknown benchmark' ].
+    ^ info anyOne value
 !
 
 metaInfo
-	^ { 
-		#anyStar -> '.* Parser'.
-		#token -> 'Token Parser'.
-		#tokenCompiled -> 'Token Parser Compiled'.
-		#anyStarBlock -> 'context next in loop'.
-	}
+    ^ { 
+        #anyStar -> '.* Parser'.
+        #token -> 'Token Parser'.
+        #tokenCompiled -> 'Token Parser Compiled'.
+        #anyStarBlock -> 'context next in loop'.
+    }
 ! !
 
 !PPCBenchmark methodsFor:'parsers'!
 
 anyStar
-	^ #any asParser star
+    ^ #any asParser star
 !
 
 anyStarBlock
-	^ [ :ctx | [ctx atEnd] whileFalse: [ ctx next ] ] asParser
+    ^ [ :ctx | [ctx atEnd] whileFalse: [ ctx next ] ] asParser
 !
 
 tokenParser
-	^ #letter asParser, (#letter asParser / #digit asParser) star trim
+    ^ #letter asParser, (#letter asParser / #digit asParser) star trim
+! !
+
+!PPCBenchmark methodsFor:'setup & teardown'!
+
+setupJavaSyntax
+    
+    parser := PPJavaSyntax new.
+    context := PPCContext new.
+    context initializeFor: parser.
+    input := sources javaSourcesBig.
+!
+
+setupJavaSyntaxCompiled
+    parser := PPJavaSyntax new compile.
+    context := PPCContext new.
+    context initializeFor: parser.
+    input := sources javaSourcesBig.
+
+"	
+    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'.
+"
+!
+
+setupRBParser
+    
+    input := sources smalltalkSourcesBig.
+!
+
+setupSmalltalkGrammar
+    
+    parser := PPSmalltalkGrammar new.
+    context := PPCContext new.
+    context initializeFor: parser.
+    input := sources smalltalkSourcesBig.
+!
+
+setupSmalltalkGrammarCompiled
+
+    configuration := PPCConfiguration universal.
+    configuration arguments name: #PPCompiledSmalltalkGrammar.
+    parser := PPSmalltalkGrammar new compileWithConfiguration: configuration.
+    context := PPCContext new.
+    context initializeFor: parser.
+    input := sources smalltalkSourcesBig.
+!
+
+setupSmalltalkGrammarTokenized
+
+    configuration := PPCConfiguration LL1.
+    configuration arguments name: #PPTokenizedSmalltalkGrammar.
+    parser := PPSmalltalkGrammar new compileWithConfiguration: configuration.
+    context := PPCContext new.
+    context initializeFor: parser.
+    input := sources smalltalkSourcesBig.
+!
+
+setupSmalltalkParser
+    
+    parser := PPSmalltalkParser new.
+    context := PPCContext new.
+    context initializeFor: parser.
+    input := sources smalltalkSourcesBig.
+!
+
+setupSmalltalkParserCompiled
+
+    configuration := PPCConfiguration universal.
+    parser := PPSmalltalkParser new compileWithConfiguration: configuration.
+    context := PPCContext new.
+    context initializeFor: parser.
+    input := sources smalltalkSourcesBig.
+!
+
+setupSmalltalkParserTokenized
+
+    configuration := PPCConfiguration LL1.
+    parser := PPSmalltalkParser new compileWithConfiguration: configuration.
+    context := PPCContext new.
+    context initializeFor: parser.
+    input := sources smalltalkSourcesBig.
+!
+
+teardownJavaSyntaxCompiled
+    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'.
+"
+!
+
+teardownSmalltalkGrammarCompiled
+    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'.
+"
+!
+
+teardownSmalltalkParserCompiled
+    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'.
+"
 ! !
 
 !PPCBenchmark class methodsFor:'documentation'!
--- a/compiler/benchmarks/PPCBenchmarkResources.st	Tue May 05 16:25:23 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-"{ Package: 'stx:goodies/petitparser/compiler/benchmarks' }"
-
-"{ NameSpace: Smalltalk }"
-
-Object subclass:#PPCBenchmarkResources
-	instanceVariableNames:''
-	classVariableNames:'javaCache'
-	poolDictionaries:''
-	category:'PetitCompiler-Benchmarks-Core'
-!
-
-
-!PPCBenchmarkResources methodsFor:'as yet unclassified'!
-
-changesSized: size
-	| string changes |
-	changes := PharoFilesOpener default changesFileOrNil contents.
-	string :=  changes copyFrom: 1 to: size.
-	^ string
-	
-!
-
-javaInDirectory: directory
-	| files |
-	files := self readDirectory: directory.
-	files := self files: files withExtension: 'java'.
-	
-	^ files collect: [ :f | (FileStream fileNamed: f) contents asString ]
-!
-
-javaLangMath
-	^ (FileStream fileNamed: '../java-src/java/lang/Math.java') contents asString
-!
-
-javaSourcesBig
-	^ self javaInDirectory: '../java-src/java/util'.
-	"^ self workingJavaInDirectory: '../java-src/java/util'"
-!
-
-smalltalkInDirectory: directory
-	| files |
-	files := self readDirectory: directory.
-	files := self files: files withExtension: 'st'.
-	
-	^ files collect: [ :f | (FileStream fileNamed: f) contents asString ]
-!
-
-smalltalkObjectMethods
-	^ Object allMethods collect: [ :m | m sourceCode ].
-!
-
-smalltalkSourcesBig
-	^ self smalltalkInDirectory: '../smalltalk-src/'
-!
-
-smalltalkSourcesBig_old
-	^ ((Smalltalk allClasses copyFrom: 1 to: 30) collect: [ :c |
-			c allMethods collect: [ :m | m sourceCode ]
-	  ]) gather: [:each | each ].
-!
-
-workingJavaInDirectory: directory
-	| sources parser |
-	"return only such a files, that can be parsed by PPJavaSyntax"
-
-	javaCache ifNil: [ javaCache := Dictionary new ].
-	
-	^ javaCache at: directory ifAbsentPut: [ 
-		sources := self javaInDirectory: directory.
-		parser := PPJavaSyntax new.
-	
-		sources select: [ :source | ([parser parse: source ] on: Error do: [ PPFailure new ]) isPetitFailure not ]	
-	]
-! !
-
-!PPCBenchmarkResources methodsFor:'private utilities'!
-
-files: files withExtension: extension
-    ( (Smalltalk respondsTo: #isSmalltalkX) and:[ Smalltalk isSmalltalkX ] ) ifTrue:[ 
-        ^ files select: [ :f | f suffix = extension ] 
-    ] ifFalse:[ 
-        "Assuming Pharo..."    
-        ^ files select: [ :f | f extension = extension ] 
-    ]
-
-    "Modified: / 20-04-2015 / 10:58:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-readDirectory: directory
-        | file |
-
-        ( (Smalltalk respondsTo: #isSmalltalkX) and:[ Smalltalk isSmalltalkX ] ) ifTrue:[ 
-            file := directory asFilename.
-            file exists ifFalse:[  
-                self error: 'Directory does not exist'.
-            ].
-            ^ file recursiveDirectoryContentsAsFilenames select:[:each | each isRegularFile ]
-        ] ifFalse:[ 
-            "Assuming Pharo..."
-
-            file := directory asFileReference.
-            file exists ifFalse: [ 
-                self error: 'Directory does not exist'.
-            ].
-            ^ file allFiles
-        ]
-
-    "Modified: / 20-04-2015 / 11:12:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!PPCBenchmarkResources class methodsFor:'documentation'!
-
-version_HG
-
-    ^ '$Changeset: <not expanded> $'
-! !
-
--- a/compiler/benchmarks/abbrev.stc	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/benchmarks/abbrev.stc	Sun May 10 06:46:56 2015 +0100
@@ -2,5 +2,4 @@
 # this file is needed for stc to be able to compile modules independently.
 # it provides information about a classes filename, category and especially namespace.
 PPCBenchmark PPCBenchmark stx:goodies/petitparser/compiler/benchmarks 'PetitCompiler-Benchmarks-Core' 0
-PPCBenchmarkResources PPCBenchmarkResources stx:goodies/petitparser/compiler/benchmarks 'PetitCompiler-Benchmarks-Core' 0
 stx_goodies_petitparser_compiler_benchmarks stx_goodies_petitparser_compiler_benchmarks stx:goodies/petitparser/compiler/benchmarks '* Projects & Packages *' 3
--- a/compiler/benchmarks/bc.mak	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/benchmarks/bc.mak	Sun May 10 06:46:56 2015 +0100
@@ -69,7 +69,6 @@
 
 # BEGINMAKEDEPEND --- do not remove this line; make depend needs it
 $(OUTDIR)PPCBenchmark.$(O) PPCBenchmark.$(H): PPCBenchmark.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)PPCBenchmarkResources.$(O) PPCBenchmarkResources.$(H): PPCBenchmarkResources.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)stx_goodies_petitparser_compiler_benchmarks.$(O) stx_goodies_petitparser_compiler_benchmarks.$(H): stx_goodies_petitparser_compiler_benchmarks.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
 
 # ENDMAKEDEPEND --- do not remove this line
--- a/compiler/benchmarks/libInit.cc	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/benchmarks/libInit.cc	Sun May 10 06:46:56 2015 +0100
@@ -28,7 +28,6 @@
 OBJ snd; struct __vmData__ *__pRT__; {
 __BEGIN_PACKAGE2__("libstx_goodies_petitparser_compiler_benchmarks", _libstx_goodies_petitparser_compiler_benchmarks_Init, "stx:goodies/petitparser/compiler/benchmarks");
 _PPCBenchmark_Init(pass,__pRT__,snd);
-_PPCBenchmarkResources_Init(pass,__pRT__,snd);
 _stx_137goodies_137petitparser_137compiler_137benchmarks_Init(pass,__pRT__,snd);
 
 
--- a/compiler/benchmarks/stx_goodies_petitparser_compiler_benchmarks.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/benchmarks/stx_goodies_petitparser_compiler_benchmarks.st	Sun May 10 06:46:56 2015 +0100
@@ -71,10 +71,10 @@
      by searching all classes (and their packages) which are referenced by my classes."
 
     ^ #(
-        #'stx:goodies/petitparser'    "PPContext - referenced by PPCBenchmark>>benchmarkSmalltalkGrammar"
-        #'stx:goodies/petitparser/compiler'    "PPCContext - referenced by PPCBenchmark>>benchmarkJavaSyntax"
+        #'stx:goodies/petitparser'    "PPContext - referenced by PPCBenchmark>>benchmarkSmalltalkParser"
+        #'stx:goodies/petitparser/compiler'    "PPCConfiguration - referenced by PPCBenchmark>>benchmarkSmalltalkParserCompiled"
         #'stx:goodies/petitparser/parsers/java'    "PPJavaSyntax - referenced by PPCBenchmark>>benchmarkJavaSyntax"
-        #'stx:goodies/petitparser/parsers/smalltalk'    "PPSmalltalkGrammar - referenced by PPCBenchmark>>benchmarkSmalltalkGrammar"
+        #'stx:goodies/petitparser/parsers/smalltalk'    "PPSmalltalkGrammar - referenced by PPCBenchmark>>setupSmalltalkGrammar"
         #'stx:goodies/refactoryBrowser/parser'    "RBParser - referenced by PPCBenchmark>>benchmarkRBParserC"
     )
 !
@@ -100,7 +100,6 @@
     ^ #(
         "<className> or (<className> attributes...) in load order"
         PPCBenchmark
-        PPCBenchmarkResources
         #'stx_goodies_petitparser_compiler_benchmarks'
     )
 !
--- a/compiler/extensions.st	Tue May 05 16:25:23 2015 +0200
+++ b/compiler/extensions.st	Sun May 10 06:46:56 2015 +0100
@@ -3,237 +3,255 @@
 !Character methodsFor:'*petitcompiler'!
 
 ppcPrintable
-	^ self asInteger > 31 and: [ self asInteger < 127 ]
+    ^ self asInteger > 31 and: [ self asInteger < 127 ]
 ! !
 
 !Object methodsFor:'*petitcompiler'!
 
 isInlinedMethod
-	^ false
+    ^ false
 ! !
 
 !PPActionParser methodsFor:'*petitcompiler'!
 
 asCompilerNode
-	^ PPCActionNode new
-		name: self name;
-		block: block;
-		child: parser;
-		properties: properties;
-		yourself
+    ^ PPCActionNode new
+        name: self name;
+        block: block;
+        child: parser;
+        properties: properties;
+        parser: self;
+        yourself
 ! !
 
 !PPActionParser methodsFor:'*petitcompiler'!
 
 compileWith: aPetitCompiler
-	block isSymbol ifTrue: [  
-		^ aPetitCompiler compileSymbolBlock: block for: self 
-	].
-	^ aPetitCompiler compileBlock: block for: self
+    block isSymbol ifTrue: [  
+        ^ aPetitCompiler compileSymbolBlock: block for: self 
+    ].
+    ^ aPetitCompiler compileBlock: block for: self
 ! !
 
 !PPAndParser methodsFor:'*petitcompiler'!
 
 asCompilerNode
-	^ PPCAndNode new
-		name: self name;
-		child: parser;
-		yourself
+    ^ PPCAndNode new
+        name: self name;
+        child: parser;
+        yourself
 ! !
 
 !PPCharSetPredicate methodsFor:'*petitcompiler'!
 
 = anObject
-	self == anObject ifTrue: [ ^ true ].
-	self class == anObject class ifFalse: [ ^ false ].
-	^ classification = anObject classification
+    self == anObject ifTrue: [ ^ true ].
+    self class == anObject class ifFalse: [ ^ false ].
+    ^ classification = anObject classification
 ! !
 
 !PPCharSetPredicate methodsFor:'*petitcompiler'!
 
 block
-	^ block
+    ^ block
 ! !
 
 !PPCharSetPredicate methodsFor:'*petitcompiler'!
 
 classification
-	^ classification
+    ^ classification
 ! !
 
 !PPCharSetPredicate methodsFor:'*petitcompiler'!
 
 equals: anotherPredicate
-	self == anotherPredicate ifTrue: [ ^ true ].
-	self class == anotherPredicate class ifFalse: [ ^ false ].
-	
-	^ classification  = anotherPredicate classification.
+    self == anotherPredicate ifTrue: [ ^ true ].
+    self class == anotherPredicate class ifFalse: [ ^ false ].
+    
+    ^ classification  = anotherPredicate classification.
 ! !
 
 !PPCharSetPredicate methodsFor:'*petitcompiler'!
 
 hash
-	^ classification hash
+    ^ classification hash
 ! !
 
 !PPChoiceParser methodsFor:'*petitcompiler'!
 
 asCompilerNode
-	^ PPCChoiceNode new
-		name: self name;
-		children: parsers;
-		yourself
+    ^ PPCChoiceNode new
+        name: self name;
+        children: parsers;
+        parser: self;
+        yourself
 ! !
 
 !PPChoiceParser methodsFor:'*petitcompiler'!
 
 compileWith: aPetitCompiler
-	^ aPetitCompiler compileChoice: self
+    ^ aPetitCompiler compileChoice: self
 ! !
 
 !PPContext methodsFor:'*petitcompiler'!
 
 asCompiledParserContext
-	^ PPCContext new
-		stream: stream;
-		yourself
-		
+    ^ PPCContext new
+        stream: stream;
+        yourself
+        
 ! !
 
 !PPContext methodsFor:'*petitcompiler'!
 
 atWs
-	^ false
+    ^ false
 ! !
 
 !PPContext methodsFor:'*petitcompiler'!
 
 comment
-	^ self globalAt: #comment ifAbsent: [ nil ].
+    ^ self globalAt: #comment ifAbsent: [ nil ].
 ! !
 
 !PPContext methodsFor:'*petitcompiler'!
 
 comment: value
-	^ self globalAt: #comment put: value
+    ^ self globalAt: #comment put: value
 ! !
 
 !PPContext methodsFor:'*petitcompiler'!
 
 compiledParser
-	^ self globalAt: #compiledParser
+    ^ self globalAt: #compiledParser
 ! !
 
 !PPContext methodsFor:'*petitcompiler'!
 
 compiledParser: aPPParser
-	^ self globalAt: #compiledParser put: aPPParser
+    ^ self globalAt: #compiledParser put: aPPParser
 ! !
 
 !PPContext methodsFor:'*petitcompiler'!
 
 lwRemember
-	^ self position
+    ^ self position
 ! !
 
 !PPContext methodsFor:'*petitcompiler'!
 
 lwRestore: position
-	^ self position: position
+    ^ self position: position
 ! !
 
 !PPContext methodsFor:'*petitcompiler'!
 
 methodInvoked: whatever
-	"nothing to do"
+    "nothing to do"
 ! !
 
 !PPContext methodsFor:'*petitcompiler'!
 
 peek: anInteger
-	^ stream peek: anInteger
+    ^ stream peek: anInteger
 ! !
 
 !PPContext methodsFor:'*petitcompiler'!
 
 setWs
-	"nothing to do"
+    "nothing to do"
+! !
+
+!PPContext methodsFor:'*petitcompiler'!
+
+skipSeparators
+    ^ stream skipSeparators
 ! !
 
 !PPContext methodsFor:'*petitcompiler'!
 
 whitespace
-	^ self globalAt: #whitespace ifAbsent: [ nil ].
+    ^ self globalAt: #whitespace ifAbsent: [ nil ].
 ! !
 
 !PPContext methodsFor:'*petitcompiler'!
 
 whitespace: value
-	^ self globalAt: #whitespace put: value
+    ^ self globalAt: #whitespace put: value
 ! !
 
 !PPDelegateParser methodsFor:'*petitcompiler'!
 
 asCompilerNode
-	self class == PPDelegateParser ifTrue: [ 
-		^ PPCForwardNode new
-			name: self name;
-			child: parser;
-			yourself
-	].
-	^ super asCompilerNode 
+    self class == PPDelegateParser ifTrue: [ 
+        ^ PPCForwardNode new
+            name: self name;
+            child: parser;
+            yourself
+    ].
+    ^ super asCompilerNode 
 ! !
 
 !PPDelegateParser methodsFor:'*petitcompiler'!
 
 compileWith: aPetitCompiler
-	(self class == PPDelegateParser) ifTrue: [ 
-		(self name notNil and: [ parser name isNil ]) ifTrue: [ 
-			parser name: self name.
-			^ parser compileWith: aPetitCompiler.
-		].
+    (self class == PPDelegateParser) ifTrue: [ 
+        (self name notNil and: [ parser name isNil ]) ifTrue: [ 
+            parser name: self name.
+            ^ parser compileWith: aPetitCompiler.
+        ].
 
-		(self name notNil and: [ parser name notNil ]) ifTrue: [ 
-			^ aPetitCompiler compileDelegate: self.
-		]
-	].
-	^ super compileWith: aPetitCompiler.
+        (self name notNil and: [ parser name notNil ]) ifTrue: [ 
+            ^ aPetitCompiler compileDelegate: self.
+        ]
+    ].
+    ^ super compileWith: aPetitCompiler.
+! !
+
+!PPEndOfInputParser methodsFor:'*petitcompiler'!
+
+asCompilerNode
+    
+    ^ PPCEndOfInputNode new
+        name: self name;
+        child: parser;
+        yourself	
 ! !
 
 !PPEpsilonParser methodsFor:'*petitcompiler'!
 
 asCompilerNode
-	^ PPCNilNode new
+    ^ PPCNilNode new
 ! !
 
 !PPEpsilonParser methodsFor:'*petitcompiler'!
 
 compileWith: aPetitCompiler
-	^ aPetitCompiler compileNil
+    ^ aPetitCompiler compileNil
 ! !
 
 !PPFailure methodsFor:'*petitcompiler'!
 
 context: aPPContext
-	context := aPPContext
+    context := aPPContext
 ! !
 
 !PPFailure methodsFor:'*petitcompiler'!
 
 message: text
-	message := text
+    message := text
 ! !
 
 !PPFailure methodsFor:'*petitcompiler'!
 
 position: anInteger
-	position := anInteger
+    position := anInteger
 ! !
 
 !PPJavaWhitespaceParser methodsFor:'*petitcompiler'!
 
 = anotherParser
-	anotherParser == self ifTrue: [ ^ true ].
+    anotherParser == self ifTrue: [ ^ true ].
    anotherParser class = self class ifFalse: [ ^ false ].
  ^ anotherParser name = self name
 ! !
@@ -241,67 +259,67 @@
 !PPJavaWhitespaceParser methodsFor:'*petitcompiler'!
 
 hash
-	^ self name hash
+    ^ self name hash
 ! !
 
 !PPLiteralObjectParser methodsFor:'*petitcompiler'!
 
 asCompilerNode
-	^ PPCCharacterNode new
-		character: literal;
-		name: self name;
-		yourself
+    ^ PPCCharacterNode new
+        character: literal;
+        name: self name;
+        yourself
 ! !
 
 !PPLiteralObjectParser methodsFor:'*petitcompiler'!
 
 compileWith: aPetitCompiler
-	^ aPetitCompiler compileCharacter: literal.
+    ^ aPetitCompiler compileCharacter: literal.
 ! !
 
 !PPLiteralParser methodsFor:'*petitcompiler'!
 
 id
-	^ literal printString
+    ^ literal printString
 ! !
 
 !PPLiteralSequenceParser methodsFor:'*petitcompiler'!
 
 asCompilerNode
-	^ PPCLiteralNode new
-		literal: literal;
-		name: self name;
-		yourself
+    ^ PPCLiteralNode new
+        literal: literal;
+        name: self name;
+        yourself
 ! !
 
 !PPLiteralSequenceParser methodsFor:'*petitcompiler'!
 
 compileWith: aPetitCompiler
-	^ aPetitCompiler compileLiteral: literal.
+    ^ aPetitCompiler compileLiteral: literal.
 ! !
 
 !PPNotParser methodsFor:'*petitcompiler'!
 
 asCompilerNode
-	^ PPCNotNode new 
-		child: parser;
-		name: self name;
-		yourself
+    ^ PPCNotNode new 
+        child: parser;
+        name: self name;
+        yourself
 ! !
 
 !PPNotParser methodsFor:'*petitcompiler'!
 
 compileWith: aPetitCompiler
-	^ aPetitCompiler compileNot: self
+    ^ aPetitCompiler compileNot: self
 ! !
 
 !PPOptionalParser methodsFor:'*petitcompiler'!
 
 asCompilerNode
-	^ PPCOptionalNode new
-		name: self name;
-		child: parser;
-		yourself
+    ^ PPCOptionalNode new
+        name: self name;
+        child: parser;
+        yourself
 
 "	^ super asCompilerNode "
 ! !
@@ -309,264 +327,281 @@
 !PPOptionalParser methodsFor:'*petitcompiler'!
 
 compileWith: aPetitCompiler
-	^ aPetitCompiler compileOptional: self
+    ^ aPetitCompiler compileOptional: self
+! !
+
+!PPParser methodsFor:'*petitcompiler'!
+
+allNodesDo: aBlock seen: aSet
+    "Iterate over all the parse nodes of the receiver, do not visit and follow the ones contained in aSet."
+
+    (aSet includes: self) ifTrue: [ ^ self ].
+    aSet add: self.
+    aBlock value: self.
+    
+    self children do: [ :each | 
+        each allNodesDo: aBlock seen: aSet 
+    ]
 ! !
 
 !PPParser methodsFor:'*petitcompiler'!
 
 asCompilerNode
-	^ PPCUnknownNode new
-		parser: self;
-		name: self name;
-		yourself
+    ^ PPCUnknownNode new
+        parser: self;
+        name: self name;
+        yourself
 ! !
 
 !PPParser methodsFor:'*petitcompiler'!
 
 asCompilerTree
-	^ self transform: [ :p | p asCompilerNode  ]
+    ^ self transform: [ :p | p asCompilerNode  ]
 ! !
 
 !PPParser methodsFor:'*petitcompiler'!
 
 bridge
-	^ self
+    ^ self
 ! !
 
 !PPParser methodsFor:'*petitcompiler'!
 
 compile
-	^ self compile: PPCArguments default
+    ^ self compile: PPCArguments default
 ! !
 
 !PPParser methodsFor:'*petitcompiler'!
 
 compile: arguments
-	self assert: (arguments isKindOf: PPCArguments).
-	
-	^ PPCConfiguration default
-		arguments: arguments;
-		compile: self
+    self assert: (arguments isKindOf: PPCArguments).
+    
+    ^ PPCConfiguration default
+        arguments: arguments;
+        compile: self
 ! !
 
 !PPParser methodsFor:'*petitcompiler'!
 
 compile: arguments andParse: input
-	^ (self compile: arguments) parse: input
+    ^ (self compile: arguments) parse: input
 ! !
 
 !PPParser methodsFor:'*petitcompiler'!
 
 compileAs: name
-	| arguments |
-	arguments := PPCArguments default.
-	arguments name: name.
-	
-	^ self compile: arguments
+    | arguments |
+    arguments := PPCArguments default.
+    arguments name: name.
+    
+    ^ self compile: arguments
 ! !
 
 !PPParser methodsFor:'*petitcompiler'!
 
 compileWithConfiguration: configuration
-	^ configuration compile: self
+    ^ configuration compile: self
 ! !
 
 !PPParser methodsFor:'*petitcompiler'!
 
 firstSetSuchThat: block
-	^ self firstSetSuchThat: block into: (OrderedCollection new) openSet: IdentitySet new.
+    self halt: 'deprecated?'.
+    ^ self firstSetSuchThat: block into: (OrderedCollection new) openSet: IdentitySet new.
 ! !
 
 !PPParser methodsFor:'*petitcompiler'!
 
 firstSetSuchThat: block into: aCollection openSet: aSet
-	(aSet includes: self) ifTrue: [ ^ aCollection ].
-	aSet add: self.
-	
-	(block value: self) ifTrue: [aCollection add: self. ^ aCollection ].
-	self children do: [ :child | 
-		child firstSetSuchThat: block into: aCollection openSet: aSet 
-	].
-	^ aCollection
+    (aSet includes: self) ifTrue: [ ^ aCollection ].
+    aSet add: self.
+    
+    (block value: self) ifTrue: [aCollection add: self. ^ aCollection ].
+    self children do: [ :child | 
+        child firstSetSuchThat: block into: aCollection openSet: aSet 
+    ].
+    ^ aCollection
 ! !
 
 !PPParser methodsFor:'*petitcompiler'!
 
 id
-	self name ifNotNil: [ ^ self name ].
-	^ self hash asString
+    self name ifNotNil: [ ^ self name ].
+    ^ self hash asString
 ! !
 
 !PPParser methodsFor:'*petitcompiler'!
 
 isCompiled
-	^ false
+    ^ false
 ! !
 
 !PPParser methodsFor:'*petitcompiler'!
 
 isContextFree
-	^ self propertyAt: #isContextFree ifAbsentPut: 
-		[ self allParsers allSatisfy: [ :p | p isContextFreePrim ] ].
-	
+    ^ self propertyAt: #isContextFree ifAbsentPut: 
+        [ self allParsers allSatisfy: [ :p | p isContextFreePrim ] ].
+    
 ! !
 
 !PPParser methodsFor:'*petitcompiler'!
 
 isContextFreePrim
-	^ true
+    ^ true
 ! !
 
 !PPParser methodsFor:'*petitcompiler'!
 
 isToken
-	^ false