byucc.edif.libraries.xilinx
Class SimpleNode

java.lang.Object
  extended by byucc.edif.libraries.xilinx.SimpleNode
All Implemented Interfaces:
Node, VhdlParserConstants, VhdlParserTreeConstants
Direct Known Subclasses:
ASTabstract_literal, ASTarchitecture_body, ASTbound_expr, ASTcomp_decl, ASTdesign_file, ASTdirection, ASTentity_declaration, ASTfactor, ASTidentifier, ASTidentifier_list, ASTmode, ASTport_clause, ASTprocess_statement, ASTrange, ASTrelation, ASTshift_expression, ASTsignal_interface_decl, ASTsimple_expression, ASTsubtype, ASTterm

public class SimpleNode
extends java.lang.Object
implements Node, VhdlParserConstants, VhdlParserTreeConstants

Represents a Node with a parent, children and an ID and is used by the parser.

Version:
$Id: SimpleNode.java,v 1.2 2004/05/06 00:47:34 tsa6 Exp $

Field Summary
protected  Node[] children
           
(package private)  Token first_token
           
static ErrorHandler handler
          An error handler that stores all error messages and warnings and decides which ones have to be displayed depending on the waring level set in command line.
protected  int id
           
(package private)  Token last_token
           
(package private)  java.lang.String name
           
protected  Node parent
           
static VhdlParser parser
          A static reference to the parser.
static SymbolTable symtab
          A static reference to the symbol table
 
Fields inherited from interface byucc.edif.libraries.xilinx.VhdlParserConstants
ABS, ACCESS, ACROSS, ADD, AFTER, ALIAS, ALL, AND, ARCHITECTURE, ARRAY, ASSERT, ATTRIBUTE, base, base_specifier, based_integer, based_literal, basic_character, basic_graphic_character, basic_identifier, BEGIN, bit_string_literal, bit_value, BLOCK, BODY, BREAK, BUFFER, BUS, CASE, character_literal, COMMENT, COMPONENT, CONCAT, CONFIGURATION, CONSTANT, decimal_literal, DEFAULT, digit, DISCONNECT, DIV, DOWNTO, ELSE, ELSIF, END, ENTITY, EOF, EQ, EXIT, EXP, exponent, extended_digit, extended_identifier, FILE, FOR, format_effector, FUNCTION, GE, GENERATE, GENERIC, graphic_character, GROUP, GT, GUARDED, IF, IMPURE, IN, INERTIAL, INOUT, integer, IS, LABEL, LE, letter, letter_or_digit, LIBRARY, LINKAGE, LITERAL, LO, LOOP, lower_case_letter, MAP, MOD, MUL, NAND, NATURE, NEQ, NEW, NEXT, NOISE, NOR, NOT, NULL, OF, ON, OPEN, OR, other_special_character, OTHERS, OUT, PACKAGE, PORT, POSTPONED, PROCEDURAL, PROCEDURE, PROCESS, PURE, QUANTITY, RANGE, RECORD, REGISTER, REJECT, REM, REPORT, RETURN, ROL, ROR, SELECT, SEMICOLON, SEVERITY, SHARED, SIGNAL, SLA, SLL, special_character, SPECTRUM, SRA, SRL, string_literal, SUB, SUBNATURE, SUBTYPE, TERMINAL, THEN, THROUGH, TO, tokenImage, TOLERANCE, TRANSPORT, TYPE, UNAFFECTED, underline, UNITS, UNTIL, upper_case_letter, USE, VARIABLE, WAIT, WHEN, WHILE, WITH, XNOR, XOR
 
Fields inherited from interface byucc.edif.libraries.xilinx.VhdlParserTreeConstants
JJTABSTRACT_LITERAL, JJTARCHITECTURE_BODY, JJTBOUND_EXPR, JJTCOMP_DECL, JJTDESIGN_FILE, JJTDIRECTION, JJTENTITY_DECLARATION, JJTFACTOR, JJTIDENTIFIER, JJTIDENTIFIER_LIST, JJTMODE, jjtNodeName, JJTPORT_CLAUSE, JJTPROCESS_STATEMENT, JJTRANGE, JJTRELATION, JJTSHIFT_EXPRESSION, JJTSIGNAL_INTERFACE_DECL, JJTSIMPLE_EXPRESSION, JJTSUBTYPE, JJTTERM, JJTVOID
 
Constructor Summary
SimpleNode(int i)
           
SimpleNode(VhdlParser p, int i)
           
 
Method Summary
 void Check()
          Perform all semantic actions and checks, which are necessary
 void CheckSIWGLevel1()
          Report warnings, when SIWG Level 1 is violated
 java.lang.Object childrenAccept(VhdlParserVisitor visitor, java.lang.Object data)
          Accept the visitor.
 void dump(java.lang.String prefix)
           
 void endBlock()
          End a block: the current symbol table becomes the upper symbol table.
 int getId()
           
 java.lang.Object jjtAccept(VhdlParserVisitor visitor, java.lang.Object data)
          Accept the visitor.
 void jjtAddChild(Node n, int i)
          This method tells the node to add its argument to the node's list of children.
 void jjtClose()
          This method is called after all the child nodes have been added.
 Node jjtGetChild(int i)
          This method returns a child node.
 int jjtGetNumChildren()
          Return the number of children the node has.
 Node jjtGetParent()
           
 void jjtOpen()
          This method is called after the node has been made the current node.
 void jjtSetParent(Node n)
          This pair of methods are used to inform the node of its parent.
 void newBlock()
          Start a new block with a new symbol table.
 void newBlock(java.lang.String type, java.lang.String id)
          Start a new block wit a new symbol table.
 java.lang.String toString()
           
 java.lang.String toString(java.lang.String prefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parent

protected Node parent

children

protected Node[] children

id

protected int id

handler

public static ErrorHandler handler
An error handler that stores all error messages and warnings and decides which ones have to be displayed depending on the waring level set in command line.


parser

public static VhdlParser parser
A static reference to the parser.


symtab

public static SymbolTable symtab
A static reference to the symbol table


first_token

Token first_token

last_token

Token last_token

name

java.lang.String name
Constructor Detail

SimpleNode

public SimpleNode(int i)

SimpleNode

public SimpleNode(VhdlParser p,
                  int i)
Method Detail

jjtOpen

public void jjtOpen()
Description copied from interface: Node
This method is called after the node has been made the current node. It indicates that child nodes can now be added to it.

Specified by:
jjtOpen in interface Node

jjtClose

public void jjtClose()
Description copied from interface: Node
This method is called after all the child nodes have been added.

Specified by:
jjtClose in interface Node

jjtSetParent

public void jjtSetParent(Node n)
Description copied from interface: Node
This pair of methods are used to inform the node of its parent.

Specified by:
jjtSetParent in interface Node

jjtGetParent

public Node jjtGetParent()
Specified by:
jjtGetParent in interface Node

jjtAddChild

public void jjtAddChild(Node n,
                        int i)
Description copied from interface: Node
This method tells the node to add its argument to the node's list of children.

Specified by:
jjtAddChild in interface Node

jjtGetChild

public Node jjtGetChild(int i)
Description copied from interface: Node
This method returns a child node. The children are numbered from zero, left to right.

Specified by:
jjtGetChild in interface Node

jjtGetNumChildren

public int jjtGetNumChildren()
Description copied from interface: Node
Return the number of children the node has.

Specified by:
jjtGetNumChildren in interface Node

jjtAccept

public java.lang.Object jjtAccept(VhdlParserVisitor visitor,
                                  java.lang.Object data)
Accept the visitor.

Specified by:
jjtAccept in interface Node

childrenAccept

public java.lang.Object childrenAccept(VhdlParserVisitor visitor,
                                       java.lang.Object data)
Accept the visitor.


toString

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

toString

public java.lang.String toString(java.lang.String prefix)

dump

public void dump(java.lang.String prefix)

newBlock

public void newBlock()
Start a new block with a new symbol table. The current table is saved in the variable upper_symtab.


newBlock

public void newBlock(java.lang.String type,
                     java.lang.String id)
Start a new block wit a new symbol table. The current table is saved in the variable upper_symtab. Furthermore, a first symbol of type type and id id is added.


endBlock

public void endBlock()
End a block: the current symbol table becomes the upper symbol table.


Check

public void Check()
Perform all semantic actions and checks, which are necessary


CheckSIWGLevel1

public void CheckSIWGLevel1()
Report warnings, when SIWG Level 1 is violated


getId

public int getId()