edu.ksu.cis.bnj.bbn.converter.ent
Class EntParser

java.lang.Object
  extended byedu.ksu.cis.bnj.bbn.converter.ent.EntParser
All Implemented Interfaces:
Converter, EntParserConstants, EntParserTreeConstants

public class EntParser
extends java.lang.Object
implements EntParserTreeConstants, Converter, EntParserConstants


Field Summary
protected  int arityCount
           
protected  int counter
           
protected  TableList edgeCache
           
 Token jj_nt
           
protected  edu.ksu.cis.bnj.bbn.converter.ent.JJTEntParserState jjtree
           
protected static java.lang.String ln
           
 boolean lookingAhead
           
protected  java.util.Hashtable nodeCache
           
protected  java.util.Hashtable probCache
           
 Token token
           
 EntParserTokenManager token_source
           
 
Fields inherited from interface edu.ksu.cis.bnj.bbn.converter.ent.EntParserTreeConstants
jjtNodeName, JJTVOID
 
Fields inherited from interface edu.ksu.cis.bnj.bbn.converter.ent.EntParserConstants
ANDASSIGN, ASG_OPR, ASSIGN, BANG, BIT_AND, BIT_OR, BIT_XOR, CENTER, CHILD, COLON, COMMA, DECIMAL_LITERAL, DECISION, DECR, DEFAULT, DIGIT, DOT, EDGE, EOF, EQ, EXPONENT, FLOATING_POINT_LITERAL, FORMAL_COMMENT, GE, GT, HEX_LITERAL, HOOK, IDENTIFIER, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, INCR, INTEGER_LITERAL, LABELS, LBRACE, LBRACKET, LE, LETTER, LPAREN, LSHIFT, LSHIFTASSIGN, LT, MINUS, MINUSASSIGN, MULTI_LINE_COMMENT, NAME, NE, NET, NODE, NSTATES, OCTAL_LITERAL, ORASSIGN, PARENT, PLUS, PLUSASSIGN, PROBABILITIES, RBRACE, RBRACKET, REMASSIGN, RPAREN, RSIGNEDSHIFT, RSIGNEDSHIFTASSIGN, RUNSIGNEDSHIFT, RUNSIGNEDSHIFTASSIGN, SC_AND, SC_OR, SC_XOR, SEMICOLON, SINGLE_LINE_COMMENT, SLASH, SLASHASSIGN, STAR, STARASSIGN, STRING_LITERAL, TILDE, tokenImage, TOWARD, UTILITY, XORASSIGN
 
Constructor Summary
EntParser()
           
EntParser(EntParserTokenManager tm)
           
EntParser(java.io.InputStream stream)
           
EntParser(java.io.Reader stream)
           
 
Method Summary
 BBNGraph CompilationUnit()
          THE ERGO ENT LANGUAGE GRAMMAR STARTS HERE *
 void disable_tracing()
           
 void Edge()
           
 void enable_tracing()
           
 ParseException generateParseException()
           
protected  java.lang.String getFiller(int n)
           
 Token getNextToken()
           
 Token getToken(int index)
           
static void help()
           
 void initialize()
           
 BBNGraph load(java.io.InputStream r)
           
static void main(java.lang.String[] args)
           
 void Node()
           
 java.util.List NumberList()
           
 java.lang.Double NumberLiteral()
           
protected  java.util.Hashtable processCPT(java.util.LinkedList nodes, java.util.LinkedList values, java.util.Hashtable curInst, java.util.Hashtable cpt)
           
protected  BBNGraph processGraph(BBNGraph g)
           
 void ReInit(EntParserTokenManager tm)
           
 void ReInit(java.io.InputStream stream)
           
 void ReInit(java.io.Reader stream)
           
protected  void resetCache()
          This is to reset cache.
 void save(java.io.OutputStream os, BBNGraph graph)
           
protected  java.lang.String saveCPT(java.util.LinkedList nodes, BBNNode curNode, java.util.Hashtable curInst, java.lang.StringBuffer buffer)
           
 java.lang.String StringLiteral()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jjtree

protected edu.ksu.cis.bnj.bbn.converter.ent.JJTEntParserState jjtree

nodeCache

protected java.util.Hashtable nodeCache

edgeCache

protected TableList edgeCache

probCache

protected java.util.Hashtable probCache

ln

protected static java.lang.String ln

counter

protected int counter

arityCount

protected int arityCount

token_source

public EntParserTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead
Constructor Detail

EntParser

public EntParser()

EntParser

public EntParser(java.io.InputStream stream)

EntParser

public EntParser(java.io.Reader stream)

EntParser

public EntParser(EntParserTokenManager tm)
Method Detail

load

public BBNGraph load(java.io.InputStream r)
              throws ParseException
Specified by:
load in interface Converter
Throws:
ParseException

save

public void save(java.io.OutputStream os,
                 BBNGraph graph)
Specified by:
save in interface Converter

saveCPT

protected java.lang.String saveCPT(java.util.LinkedList nodes,
                                   BBNNode curNode,
                                   java.util.Hashtable curInst,
                                   java.lang.StringBuffer buffer)

getFiller

protected java.lang.String getFiller(int n)

initialize

public void initialize()
Specified by:
initialize in interface Converter

processGraph

protected BBNGraph processGraph(BBNGraph g)

processCPT

protected java.util.Hashtable processCPT(java.util.LinkedList nodes,
                                         java.util.LinkedList values,
                                         java.util.Hashtable curInst,
                                         java.util.Hashtable cpt)

resetCache

protected void resetCache()
This is to reset cache.


help

public static void help()

main

public static void main(java.lang.String[] args)

CompilationUnit

public final BBNGraph CompilationUnit()
                               throws ParseException
THE ERGO ENT LANGUAGE GRAMMAR STARTS HERE *

Throws:
ParseException

Node

public final void Node()
                throws ParseException
Throws:
ParseException

Edge

public final void Edge()
                throws ParseException
Throws:
ParseException

StringLiteral

public final java.lang.String StringLiteral()
                                     throws ParseException
Throws:
ParseException

NumberLiteral

public final java.lang.Double NumberLiteral()
                                     throws ParseException
Throws:
ParseException

NumberList

public final java.util.List NumberList()
                                throws ParseException
Throws:
ParseException

ReInit

public void ReInit(java.io.InputStream stream)

ReInit

public void ReInit(java.io.Reader stream)

ReInit

public void ReInit(EntParserTokenManager tm)

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

generateParseException

public final ParseException generateParseException()

enable_tracing

public final void enable_tracing()

disable_tracing

public final void disable_tracing()