Small improvement in inlining: inline child of an action node.
"{ Package: 'stx:goodies/petitparser/compiler' }"
"{ NameSpace: Smalltalk }"
PPCConfiguration subclass:#PPCLL1Configuration
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'PetitCompiler-Core'
!
!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
! !