com.voytechs.jnetstream.npl
Class PrintStatement
java.lang.Object
com.voytechs.jnetstream.npl.Node
com.voytechs.jnetstream.npl.StatementNode
com.voytechs.jnetstream.npl.PrintStatement
- All Implemented Interfaces:
- Visitable
public class PrintStatement
- extends StatementNode
- implements Visitable
| Fields inherited from class com.voytechs.jnetstream.npl.Node |
parent |
| Methods inherited from class com.voytechs.jnetstream.npl.StatementNode |
acceptCode, acceptLValue, acceptStatement, canOptimize, getCode, getLineNumber, getName, getPermTable, getStatement, getSymTable, getType, getTypePrimitive, optimize, parseCode, parseLValue, parseModifiers, parsePostModifiers, setSymTable, setTypePrimitive, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PACKET
public static final int PACKET
- See Also:
- Constant Field Values
STDOUT
public static final int STDOUT
- See Also:
- Constant Field Values
stringExpression
protected StringNode stringExpression
whereToPrint
protected int whereToPrint
PrintStatement
public PrintStatement()
- Parameters:
-
- Throws:
parse
public Node parse(ExpTokenizer tokens)
throws SyntaxError
- Overrides:
parse in class StatementNode
- Throws:
SyntaxError
visit
public boolean visit(Visitor visitor,
java.lang.Object user1,
java.lang.Object user2)
throws NodeException
- Specified by:
visit in interface Visitable
- Throws:
NodeException
parseStringExpression
protected void parseStringExpression(ExpTokenizer tokens)
throws SyntaxError
- Throws:
SyntaxError
getStringExpression
public StringNode getStringExpression()
acceptModifier
protected boolean acceptModifier(Token token)
- Overrides:
acceptModifier in class StatementNode
getNewlineFlag
public boolean getNewlineFlag()
- Returns the state of the newline flag. If true print the newline
at end of the string, or if false do not.
- Returns:
- true print newline, false do not.
getPrefixFlag
public boolean getPrefixFlag()
- Returns the state of the display prefix flag.
If true a prefix should be displayed, if false
then not. Prefix is displayer specific but usually
is the name of the protocol with appropriate amount of
spaces for alignment.
- Returns:
- Display prefix if true, otherwise not.
getWhereToPrint
public int getWhereToPrint()
- Returns where to print.
main
public static void main(java.lang.String[] args)
- Test function for PrintStatement
- Parameters:
args - command line arguments