compiler/PPCStarAnyNode.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sat, 29 Aug 2015 07:56:14 +0100
changeset 534 a949c4fe44df
parent 515 b5316ef15274
permissions -rw-r--r--
PPCConfiguration refactoring: [6/10]: use #runPass: instead of self-sends. ...in PPCConfiguration>>invokePhases. This is a preparation for removing #invokePhases completely and configuring the compilation via list of phases.

"{ Package: 'stx:goodies/petitparser/compiler' }"

"{ NameSpace: Smalltalk }"

PPCStarNode subclass:#PPCStarAnyNode
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'PetitCompiler-Nodes'
!


!PPCStarAnyNode methodsFor:'as yet unclassified'!

defaultName
    ^ #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
! !

!PPCStarAnyNode class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !