gov.llnl.babel.parsers.sidl2

Class SIDLTouchUpVisitor

Implemented Interfaces:
SIDLParserVisitor

public class SIDLTouchUpVisitor
extends java.lang.Object
implements SIDLParserVisitor

This class does some final touch up on the parse tree after generation. Its main job is to ensure the appropriate ParseTreeNode instances have their name and doc fields set.

Field Summary

protected PrintStream
out

Constructor Summary

SIDLTouchUpVisitor(PrintStream o)

Method Summary

protected String
resolveDoc(ParseTreeNode node)
Resolve the doc string from the special tokens preceding the node
protected String
resolveName(ParseTreeNode node, boolean listall)
Resolve the string-name of the ParseTreeNode instance
Object
visit(ParseTreeNode node, Object data)

Field Details

out

protected PrintStream out

Constructor Details

SIDLTouchUpVisitor

public SIDLTouchUpVisitor(PrintStream o)

Method Details

resolveDoc

protected String resolveDoc(ParseTreeNode node)
Resolve the doc string from the special tokens preceding the node
Parameters:
node -
Returns:

resolveName

protected String resolveName(ParseTreeNode node,
                             boolean listall)
Resolve the string-name of the ParseTreeNode instance
Parameters:
node - the node whos name needs to be determined
listall - flag signifying special case where name may be spread across tokens
Returns:
string name to set node.name to

visit

public Object visit(ParseTreeNode node,
                    Object data)
Specified by:
visit in interface SIDLParserVisitor