com.voytechs.jnetstream.npl
Class HeaderStatement

java.lang.Object
  extended by com.voytechs.jnetstream.npl.Node
      extended by com.voytechs.jnetstream.npl.StatementNode
          extended by com.voytechs.jnetstream.npl.StatementContainer
              extended by com.voytechs.jnetstream.npl.HeaderStatement
All Implemented Interfaces:
Visitable

public class HeaderStatement
extends StatementContainer
implements Visitable


Field Summary
protected  ArrayDimensionNode arrayDimension
           
protected  boolean defaultCandidate
           
protected  java.util.List linkAssertionListCondition
           
protected  java.util.List linkAssertionListSource
           
protected  java.util.Map linkAssertionTable
           
protected  ReferenceNode linkVariable
           
protected  boolean optional
           
 
Fields inherited from class com.voytechs.jnetstream.npl.StatementContainer
linkAssertion, size, skip
 
Fields inherited from class com.voytechs.jnetstream.npl.StatementNode
code, modifiers, perm, statement, sym, token, type, typePrimitive, value
 
Fields inherited from class com.voytechs.jnetstream.npl.Node
parent
 
Constructor Summary
HeaderStatement()
          Initializer the statement node.
 
Method Summary
protected  boolean acceptModifier(Token token)
           
 ArrayDimensionNode getArrayDimension()
           
 int getArrayScalarSize()
           
 boolean hasArray()
           
 boolean isDefaultCandidate()
           
 boolean isOptional()
          Returns weather this header is optional.
static void main(java.lang.String[] args)
          Test function for StatementNode
protected  void parseLValue(ExpTokenizer tokens)
           
protected  void parsePostModifiers(ExpTokenizer tokens)
           
 java.lang.String toString()
           
 boolean visit(Visitor visitor, java.lang.Object user1, java.lang.Object user2)
           
 
Methods inherited from class com.voytechs.jnetstream.npl.StatementContainer
addLinkAssertion, addLinkVariable, getLinkAssertion, getLinkAssertion, getLinkAssertionCondition, getLinkAssertionSize, getLinkAssertionSource, getLinkVariable, removeLinkAssertion, setDefaultCandidate, setLinkAssertion
 
Methods inherited from class com.voytechs.jnetstream.npl.StatementNode
acceptCode, acceptLValue, acceptStatement, canOptimize, getCode, getLineNumber, getName, getPermTable, getStatement, getSymTable, getType, getTypePrimitive, optimize, parse, parseCode, parseModifiers, setSymTable, setTypePrimitive
 
Methods inherited from class com.voytechs.jnetstream.npl.Node
getParent, getToken, setParent, setToken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

linkAssertionListCondition

protected java.util.List linkAssertionListCondition

linkAssertionListSource

protected java.util.List linkAssertionListSource

linkAssertionTable

protected java.util.Map linkAssertionTable

linkVariable

protected ReferenceNode linkVariable

optional

protected boolean optional

defaultCandidate

protected boolean defaultCandidate

arrayDimension

protected ArrayDimensionNode arrayDimension
Constructor Detail

HeaderStatement

public HeaderStatement()
Initializer the statement node.

Method Detail

visit

public boolean visit(Visitor visitor,
                     java.lang.Object user1,
                     java.lang.Object user2)
              throws NodeException
Specified by:
visit in interface Visitable
Throws:
NodeException

parseLValue

protected void parseLValue(ExpTokenizer tokens)
                    throws SyntaxError
Overrides:
parseLValue in class StatementNode
Throws:
SyntaxError

acceptModifier

protected boolean acceptModifier(Token token)
Overrides:
acceptModifier in class StatementNode

parsePostModifiers

protected void parsePostModifiers(ExpTokenizer tokens)
                           throws SyntaxError
Overrides:
parsePostModifiers in class StatementNode
Throws:
SyntaxError

isOptional

public boolean isOptional()
Returns weather this header is optional. This flag really indicates how far the AssertFailure exceptions should go. If the header is marked optional then the AssertFailure stops there. Otherwise its passed on to the parent header and so on.


hasArray

public boolean hasArray()

getArrayDimension

public ArrayDimensionNode getArrayDimension()

getArrayScalarSize

public int getArrayScalarSize()
                       throws NodeException
Throws:
NodeException

isDefaultCandidate

public boolean isDefaultCandidate()

toString

public java.lang.String toString()
Overrides:
toString in class StatementNode

main

public static void main(java.lang.String[] args)
Test function for StatementNode

Parameters:
args - command line arguments