diff -r 666372dbe307 -r a949c4fe44df compiler/PPCUniversalConfiguration.st --- a/compiler/PPCUniversalConfiguration.st Wed Aug 26 23:34:48 2015 +0100 +++ b/compiler/PPCUniversalConfiguration.st Sat Aug 29 07:56:14 2015 +0100 @@ -10,59 +10,45 @@ ! -!PPCUniversalConfiguration methodsFor:'compiling'! - -initialize - super initialize. - - "Modified: / 25-08-2015 / 00:03:53 / Jan Vrany " -! +!PPCUniversalConfiguration methodsFor:'accessing - defaults'! -invokePhases - self toPPCIr. - self createTokens. - self cacheFirstFollow. - self specialize. - self createRecognizingComponents. - self specialize. - self inline. - self merge. - self check. - self generate. +defaultParserSuperclass + ^ PPCompiledParser + + "Modified: / 01-09-2015 / 08:47:59 / Jan Vrany " ! ! -!PPCUniversalConfiguration methodsFor:'error handling'! +!PPCUniversalConfiguration methodsFor:'compiling'! -buildClass - | builder | +invokePhases + + self runPass: PPCTokenDetector. - self assert:(context parserClass isKindOf:PPCClass). - builder := PPCClassBuilder new. - builder compiledClassName:context options parserName. - builder compiledSuperclass:PPCompiledParser. - builder methodDictionary:context parserClass methodDictionary. - builder constants:context parserClass constants. - ^ builder compileClass. + context options cacheFirstFollow ifTrue:[ + self runPass: PPCCacheFirstFollowPass + ]. + context options specialize ifTrue:[ + self runPass: PPCSpecializingVisitor + ]. + + self runPass: PPCRecognizerComponentDetector . - "Modified: / 25-08-2015 / 00:04:08 / Jan Vrany " -! - -generate - | compiledParser | - - context options generate ifFalse:[ - ^ self + context options specialize ifTrue:[ + self runPass: PPCSpecializingVisitor + ]. + context options inline ifTrue:[ + self runPass: PPCInliningVisitor ]. - self runPass: PPCUniversalCodeGenerator. + + self runPass: PPCMergingVisitor. + + self runPass: PPCCheckingVisitor. - compiledParser := self buildClass. - compiledParser startSymbol:(context parserClass propertyAt:#rootMethod) methodName. - compiledParser := compiledParser new. - ir := compiledParser. + self runPass: PPCUniversalCodeGenerator. - "Modified: / 25-08-2015 / 00:03:46 / Jan Vrany " + self generateParser. + + "Modified: / 04-09-2015 / 10:25:07 / Jan Vrany " ! ! !PPCUniversalConfiguration class methodsFor:'documentation'!