01: package javaparser;
02:
03: import javaparser.javacc_gen.Token;
04:
05: /** Taken from Schmortopf !
06: *
07: * This interface must be implemented by any class,
08: * which wants to create a parser and get all
09: * output strings the parser creates when running
10: * its compilationunit.
11: */
12:
13: public interface ParserOutputProcessor {
14:
15: /**
16: * Called by the parser when it encounters a new node.
17: */
18: public void addNode(String name);
19:
20: /**
21: * Called by the parser when it returns from a previously
22: * encountered node (for which it has called addNode)
23: */
24: public void returnFromNode(String name);
25:
26: /**
27: * Called by the parser when it has encountered a token
28: * at the current treeposition, which is defined by all
29: * already received calls of addNode() and returnFromNode().
30: */
31: public void addLeaf(final Token content);
32:
33: }
|