aboutsummaryrefslogtreecommitdiffstats
path: root/tests/other-systems/sablecc/src/ParserAspect.java
blob: cbb8334a505dd1398f938044e0df30985b99962e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import org.sablecc.sablecc.node.*;
import org.sablecc.sablecc.analysis.*;
import org.sablecc.sablecc.parser.*;

public aspect ParserAspect {

    pointcut pushes():      call(void push(int,Object)) && target(Parser);
    pointcut callstoSets(): call(void set*(Object))     && target(Node);

    before ()              : pushes() {}
    void around ()         : pushes() { proceed(); }

    before ()              : callstoSets() {}
    void around ()         : callstoSets() { proceed(); }

    after  ()              : callstoSets() {}
    after  ()              : pushes() {}
}