edu.ksu.cis.bnj.bbn.converter.dsl
Class DSLParser

java.lang.Object
  extended byedu.ksu.cis.bnj.bbn.converter.dsl.DSLParser
All Implemented Interfaces:
Converter, DSLParserConstants, DSLParserTreeConstants

public class DSLParser
extends java.lang.Object
implements DSLParserTreeConstants, Converter, DSLParserConstants


Field Summary
 Token jj_nt
           
protected  edu.ksu.cis.bnj.bbn.converter.dsl.JJTDSLParserState jjtree
           
protected static java.lang.String ln
           
 boolean lookingAhead
           
protected  java.util.Hashtable nodeCache
           
protected  java.util.Hashtable propertyCache
           
 Token token
           
 DSLParserTokenManager token_source
           
 
Fields inherited from interface edu.ksu.cis.bnj.bbn.converter.dsl.DSLParserTreeConstants
jjtNodeName, JJTVOID
 
Fields inherited from interface edu.ksu.cis.bnj.bbn.converter.dsl.DSLParserConstants
ANDASSIGN, ASG_OPR, ASSIGN, BANG, BIT_AND, BIT_OR, BIT_XOR, COLON, COMMA, DECIMAL_LITERAL, DECR, DEFAULT, DIGIT, DOT, 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, LBRACE, LBRACKET, LE, LETTER, LPAREN, LSHIFT, LSHIFTASSIGN, LT, MINUS, MINUSASSIGN, MULTI_LINE_COMMENT, NE, NET, NODE, OCTAL_LITERAL, ORASSIGN, PLUS, PLUSASSIGN, 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, XORASSIGN
 
Constructor Summary
DSLParser()
           
DSLParser(DSLParserTokenManager tm)
           
DSLParser(java.io.InputStream stream)
           
DSLParser(java.io.Reader stream)
           
 
Method Summary
 BBNGraph CompilationUnit()
          THE GENIE DSL LANGUAGE GRAMMAR STARTS HERE *
 void disable_tracing()
           
 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)
           
protected  java.util.Hashtable processTruthTable(java.util.LinkedList nodes, BBNNode curNode, java.util.LinkedList values, java.util.Hashtable curInst, java.util.Hashtable cpt)
           
 java.util.Hashtable Properties()
           
 void ReInit(DSLParserTokenManager 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.util.List StringList()
           
 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.dsl.JJTDSLParserState jjtree

nodeCache

protected java.util.Hashtable nodeCache

propertyCache

protected java.util.Hashtable propertyCache

ln

protected static java.lang.String ln

token_source

public DSLParserTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead
Constructor Detail

DSLParser

public DSLParser()

DSLParser

public DSLParser(java.io.InputStream stream)

DSLParser

public DSLParser(java.io.Reader stream)

DSLParser

public DSLParser(DSLParserTokenManager 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)

processTruthTable

protected java.util.Hashtable processTruthTable(java.util.LinkedList nodes,
                                                BBNNode curNode,
                                                java.util.LinkedList values,
                                                java.util.Hashtable curInst,
                                                java.util.Hashtable cpt)

resetCache

protected void resetCache()
This is to reset cache. Useful later if we decided to support OOBN.


help

public static void help()

main

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

CompilationUnit

public final BBNGraph CompilationUnit()
                               throws ParseException
THE GENIE DSL LANGUAGE GRAMMAR STARTS HERE *

Throws:
ParseException

Properties

public final java.util.Hashtable Properties()
                                     throws ParseException
Throws:
ParseException

Node

public final void Node()
                throws ParseException
Throws:
ParseException

StringLiteral

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

StringList

public final java.util.List StringList()
                                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(DSLParserTokenManager 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()