pt.tumba.ngram.bayes
Class XMLInterchangeFormat

java.lang.Object
  extended by pt.tumba.ngram.bayes.InterchangeFormat
      extended by pt.tumba.ngram.bayes.XMLInterchangeFormat

public class XMLInterchangeFormat
extends InterchangeFormat


Field Summary
(package private)  int ATTRIBUTE_STRING
           
(package private)  int BIF
           
(package private)  int CT
           
protected  char curChar
           
(package private)  int curLexState
           
(package private)  int DECISION
           
(package private) static int DECISION_DEFINE
           
(package private)  int DEFAULT
           
(package private)  int defaultLexState
           
(package private)  int DEFINITION
           
(package private)  int DIGIT
           
(package private)  int EOF
           
(package private)  int EOT
           
(package private)  int EQUAL
           
(package private)  int EXPONENT
           
(package private)  int FOR
           
(package private)  int GIVEN
           
(package private)  int IDENTIFIER
           
(package private)  IFBayesNet ifbn
           
private  ASCII_UCodeESC_CharStream input_stream
           
private  JJXMLBIFv03Calls[] jj_2_rtns
           
private  int jj_endpos
           
private  java.util.Vector jj_expentries
           
private  int[] jj_expentry
           
private  int jj_gc
           
private  int jj_gen
           
(package private)  ASCII_UCodeESC_CharStream jj_input_stream
           
private  int jj_kind
           
private  int jj_la
           
private  int[] jj_la1
           
private  int[] jj_la1_0
           
private  Token jj_lastpos
           
private  int[] jj_lasttokens
           
 Token jj_nt
           
private  int jj_ntk
           
private  boolean jj_rescan
           
private  Token jj_scanpos
           
private  boolean jj_semLA
           
(package private) static long[] jjbitVec0
           
(package private) static long[] jjbitVec2
           
(package private) static long[] jjbitVec3
           
(package private) static long[] jjbitVec4
           
(package private) static long[] jjbitVec5
           
(package private) static long[] jjbitVec6
           
(package private) static long[] jjbitVec7
           
(package private) static long[] jjbitVec8
           
(package private)  int jjmatchedKind
           
(package private)  int jjmatchedPos
           
(package private)  int jjnewStateCnt
           
(package private) static int[] jjnextStates
           
(package private)  int jjround
           
private  int[] jjrounds
           
private  int[] jjstateSet
           
static java.lang.String[] jjstrLiteralImages
           
(package private) static long[] jjtoSkip
           
(package private) static long[] jjtoSpecial
           
(package private) static long[] jjtoToken
           
(package private)  int LETTER
           
static java.lang.String[] lexStateNames
           
 boolean lookingAhead
           
(package private)  int NAME
           
(package private)  int NATURE
           
(package private) static int NATURE_DEFINE
           
(package private)  int NETWORK
           
(package private)  int NON_NEGATIVE_NUMBER
           
(package private)  int OPENTAG
           
(package private)  int OUTCOME
           
(package private)  int PCDATA_CHARACTER
           
(package private)  int PROPERTY
           
(package private)  int SOT
           
(package private)  int TABLE
           
 Token token
           
(package private)  java.lang.String[] tokenImage
           
(package private)  int TYPE
           
(package private)  int UTILITY
           
(package private) static int UTILITY_DEFINE
           
(package private)  int VARIABLE
           
(package private)  int VERSION
           
 
Fields inherited from class pt.tumba.ngram.bayes.InterchangeFormat
bif015, istream, xml_bif03
 
Constructor Summary
XMLInterchangeFormat(java.io.InputStream stream)
           
 
Method Summary
 void CompilationUnit()
           
 void disable_tracing()
           
 void enable_tracing()
           
 double[] FloatingPointList()
           
 java.lang.Double FloatingPointNumber()
           
 ParseException generateParseException()
           
 IFBayesNet get_ifbn()
           
 java.lang.String getIdentifier()
           
 Token getNextToken()
           
 java.lang.String getString()
           
 Token getToken(int index)
           
(package private)  void glob_heading()
           
 void invert_probability_tables()
           
private  boolean jj_2_1(int xla)
           
private  boolean jj_2_2(int xla)
           
private  boolean jj_3_1()
           
private  boolean jj_3_2()
           
private  boolean jj_3R_6()
           
private  void jj_add_error_token(int kind, int pos)
           
private  Token jj_consume_token(int kind)
           
private  int jj_ntk()
           
private  void jj_rescan_token()
           
private  void jj_save(int index, int xla)
           
private  boolean jj_scan_token(int kind)
           
private  void jjAddStates(int start, int end)
           
private static boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
           
private static boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
           
private  void jjCheckNAdd(int state)
           
private  void jjCheckNAddStates(int start)
           
private  void jjCheckNAddStates(int start, int end)
           
private  void jjCheckNAddTwoStates(int state1, int state2)
           
private  Token jjFillToken()
           
private  int jjMoveNfa_0(int startState, int curPos)
           
private  int jjMoveStringLiteralDfa0_0()
           
private  int jjMoveStringLiteralDfa1_0(long active0)
           
private  int jjMoveStringLiteralDfa2_0(long old0, long active0)
           
private  int jjMoveStringLiteralDfa3_0(long old0, long active0)
           
private  int jjMoveStringLiteralDfa4_0(long old0, long active0)
           
private  int jjMoveStringLiteralDfa5_0(long old0, long active0)
           
private  int jjMoveStringLiteralDfa6_0(long old0, long active0)
           
private  int jjMoveStringLiteralDfa7_0(long old0, long active0)
           
private  int jjMoveStringLiteralDfa8_0(long old0, long active0)
           
private  int jjMoveStringLiteralDfa9_0(long old0, long active0)
           
private  int jjStopAtPos(int pos, int kind)
           
 void NetworkDeclaration()
           
 Token nextToken()
           
 void OpenTag()
           
(package private)  java.lang.String pcdata()
           
 void ProbabilityContent(IFProbabilityFunction upf)
           
 IFProbabilityFunction ProbabilityDeclaration()
           
 java.lang.String ProbabilityFor()
           
 java.lang.String ProbabilityGiven()
           
 double[] ProbabilityTable()
           
 java.lang.String ProbabilityVariableName()
           
 int ProbabilityVariableType()
           
 java.lang.String Property()
           
 void ReInit(ASCII_UCodeESC_CharStream stream)
           
 void ReInit(ASCII_UCodeESC_CharStream stream, int lexState)
           
private  void ReInitRounds()
           
 void SwitchTo(int lexState)
           
 int TypeDeclaration()
           
 IFProbabilityVariable VariableContent(java.lang.String name)
           
 IFProbabilityVariable VariableDeclaration()
           
 java.lang.String VariableOutcome()
           
 double VersionDeclaration()
           
 
Methods inherited from class pt.tumba.ngram.bayes.InterchangeFormat
set_stream, set_stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EOF

final int EOF
See Also:
Constant Field Values

SOT

final int SOT
See Also:
Constant Field Values

EOT

final int EOT
See Also:
Constant Field Values

CT

final int CT
See Also:
Constant Field Values

OPENTAG

final int OPENTAG
See Also:
Constant Field Values

EQUAL

final int EQUAL
See Also:
Constant Field Values

BIF

final int BIF
See Also:
Constant Field Values

VERSION

final int VERSION
See Also:
Constant Field Values

FOR

final int FOR
See Also:
Constant Field Values

GIVEN

final int GIVEN
See Also:
Constant Field Values

NAME

final int NAME
See Also:
Constant Field Values

NETWORK

final int NETWORK
See Also:
Constant Field Values

DEFINITION

final int DEFINITION
See Also:
Constant Field Values

PROPERTY

final int PROPERTY
See Also:
Constant Field Values

TABLE

final int TABLE
See Also:
Constant Field Values

TYPE

final int TYPE
See Also:
Constant Field Values

OUTCOME

final int OUTCOME
See Also:
Constant Field Values

VARIABLE

final int VARIABLE
See Also:
Constant Field Values

NATURE

final int NATURE
See Also:
Constant Field Values

DECISION

final int DECISION
See Also:
Constant Field Values

UTILITY

final int UTILITY
See Also:
Constant Field Values

NON_NEGATIVE_NUMBER

final int NON_NEGATIVE_NUMBER
See Also:
Constant Field Values

EXPONENT

final int EXPONENT
See Also:
Constant Field Values

IDENTIFIER

final int IDENTIFIER
See Also:
Constant Field Values

LETTER

final int LETTER
See Also:
Constant Field Values

DIGIT

final int DIGIT
See Also:
Constant Field Values

PCDATA_CHARACTER

final int PCDATA_CHARACTER
See Also:
Constant Field Values

ATTRIBUTE_STRING

final int ATTRIBUTE_STRING
See Also:
Constant Field Values

DEFAULT

final int DEFAULT
See Also:
Constant Field Values

tokenImage

java.lang.String[] tokenImage

jjbitVec0

static final long[] jjbitVec0

jjbitVec2

static final long[] jjbitVec2

jjbitVec3

static final long[] jjbitVec3

jjbitVec4

static final long[] jjbitVec4

jjbitVec5

static final long[] jjbitVec5

jjbitVec6

static final long[] jjbitVec6

jjbitVec7

static final long[] jjbitVec7

jjbitVec8

static final long[] jjbitVec8

jjnextStates

static final int[] jjnextStates

jjstrLiteralImages

public static final java.lang.String[] jjstrLiteralImages

lexStateNames

public static final java.lang.String[] lexStateNames

jjtoToken

static final long[] jjtoToken

jjtoSkip

static final long[] jjtoSkip

jjtoSpecial

static final long[] jjtoSpecial

input_stream

private ASCII_UCodeESC_CharStream input_stream

jjrounds

private final int[] jjrounds

jjstateSet

private final int[] jjstateSet

curChar

protected char curChar

curLexState

int curLexState

defaultLexState

int defaultLexState

jjnewStateCnt

int jjnewStateCnt

jjround

int jjround

jjmatchedPos

int jjmatchedPos

jjmatchedKind

int jjmatchedKind

ifbn

IFBayesNet ifbn

NATURE_DEFINE

static final int NATURE_DEFINE
See Also:
Constant Field Values

DECISION_DEFINE

static final int DECISION_DEFINE
See Also:
Constant Field Values

UTILITY_DEFINE

static final int UTILITY_DEFINE
See Also:
Constant Field Values

jj_input_stream

ASCII_UCodeESC_CharStream jj_input_stream

token

public Token token

jj_nt

public Token jj_nt

jj_ntk

private int jj_ntk

jj_scanpos

private Token jj_scanpos

jj_lastpos

private Token jj_lastpos

jj_la

private int jj_la

lookingAhead

public boolean lookingAhead

jj_semLA

private boolean jj_semLA

jj_gen

private int jj_gen

jj_la1

private final int[] jj_la1

jj_la1_0

private final int[] jj_la1_0

jj_2_rtns

private final JJXMLBIFv03Calls[] jj_2_rtns

jj_rescan

private boolean jj_rescan

jj_gc

private int jj_gc

jj_expentries

private java.util.Vector jj_expentries

jj_expentry

private int[] jj_expentry

jj_kind

private int jj_kind

jj_lasttokens

private int[] jj_lasttokens

jj_endpos

private int jj_endpos
Constructor Detail

XMLInterchangeFormat

public XMLInterchangeFormat(java.io.InputStream stream)
Method Detail

jjStopAtPos

private final int jjStopAtPos(int pos,
                              int kind)

jjMoveStringLiteralDfa0_0

private final int jjMoveStringLiteralDfa0_0()

jjMoveStringLiteralDfa1_0

private final int jjMoveStringLiteralDfa1_0(long active0)

jjMoveStringLiteralDfa2_0

private final int jjMoveStringLiteralDfa2_0(long old0,
                                            long active0)

jjMoveStringLiteralDfa3_0

private final int jjMoveStringLiteralDfa3_0(long old0,
                                            long active0)

jjMoveStringLiteralDfa4_0

private final int jjMoveStringLiteralDfa4_0(long old0,
                                            long active0)

jjMoveStringLiteralDfa5_0

private final int jjMoveStringLiteralDfa5_0(long old0,
                                            long active0)

jjMoveStringLiteralDfa6_0

private final int jjMoveStringLiteralDfa6_0(long old0,
                                            long active0)

jjMoveStringLiteralDfa7_0

private final int jjMoveStringLiteralDfa7_0(long old0,
                                            long active0)

jjMoveStringLiteralDfa8_0

private final int jjMoveStringLiteralDfa8_0(long old0,
                                            long active0)

jjMoveStringLiteralDfa9_0

private final int jjMoveStringLiteralDfa9_0(long old0,
                                            long active0)

jjCheckNAdd

private final void jjCheckNAdd(int state)

jjAddStates

private final void jjAddStates(int start,
                               int end)

jjCheckNAddTwoStates

private final void jjCheckNAddTwoStates(int state1,
                                        int state2)

jjCheckNAddStates

private final void jjCheckNAddStates(int start,
                                     int end)

jjCheckNAddStates

private final void jjCheckNAddStates(int start)

jjMoveNfa_0

private final int jjMoveNfa_0(int startState,
                              int curPos)

jjCanMove_0

private static final boolean jjCanMove_0(int hiByte,
                                         int i1,
                                         int i2,
                                         long l1,
                                         long l2)

jjCanMove_1

private static final boolean jjCanMove_1(int hiByte,
                                         int i1,
                                         int i2,
                                         long l1,
                                         long l2)

ReInit

public void ReInit(ASCII_UCodeESC_CharStream stream)

ReInitRounds

private final void ReInitRounds()

ReInit

public void ReInit(ASCII_UCodeESC_CharStream stream,
                   int lexState)

SwitchTo

public void SwitchTo(int lexState)

jjFillToken

private final Token jjFillToken()

nextToken

public final Token nextToken()

get_ifbn

public IFBayesNet get_ifbn()
Overrides:
get_ifbn in class InterchangeFormat

invert_probability_tables

public void invert_probability_tables()

pcdata

java.lang.String pcdata()
                  throws ParseException
Throws:
ParseException

glob_heading

void glob_heading()
            throws ParseException
Throws:
ParseException

CompilationUnit

public final void CompilationUnit()
                           throws ParseException
Overrides:
CompilationUnit in class InterchangeFormat
Throws:
ParseException

OpenTag

public final void OpenTag()
                   throws ParseException
Throws:
ParseException

NetworkDeclaration

public final void NetworkDeclaration()
                              throws ParseException
Throws:
ParseException

VersionDeclaration

public final double VersionDeclaration()
                                throws ParseException
Throws:
ParseException

VariableDeclaration

public final IFProbabilityVariable VariableDeclaration()
                                                throws ParseException
Throws:
ParseException

ProbabilityVariableName

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

TypeDeclaration

public final int TypeDeclaration()
                          throws ParseException
Throws:
ParseException

ProbabilityVariableType

public final int ProbabilityVariableType()
                                  throws ParseException
Throws:
ParseException

VariableContent

public final IFProbabilityVariable VariableContent(java.lang.String name)
                                            throws ParseException
Throws:
ParseException

VariableOutcome

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

ProbabilityDeclaration

public final IFProbabilityFunction ProbabilityDeclaration()
                                                   throws ParseException
Throws:
ParseException

ProbabilityContent

public final void ProbabilityContent(IFProbabilityFunction upf)
                              throws ParseException
Throws:
ParseException

ProbabilityFor

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

ProbabilityGiven

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

ProbabilityTable

public final double[] ProbabilityTable()
                                throws ParseException
Throws:
ParseException

FloatingPointList

public final double[] FloatingPointList()
                                 throws ParseException
Throws:
ParseException

FloatingPointNumber

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

Property

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

getIdentifier

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

getString

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

jj_2_1

private final boolean jj_2_1(int xla)

jj_2_2

private final boolean jj_2_2(int xla)

jj_3R_6

private final boolean jj_3R_6()

jj_3_1

private final boolean jj_3_1()

jj_3_2

private final boolean jj_3_2()

jj_consume_token

private final Token jj_consume_token(int kind)
                              throws ParseException
Throws:
ParseException

jj_scan_token

private final boolean jj_scan_token(int kind)

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

jj_ntk

private final int jj_ntk()

jj_add_error_token

private void jj_add_error_token(int kind,
                                int pos)

generateParseException

public final ParseException generateParseException()

enable_tracing

public final void enable_tracing()

disable_tracing

public final void disable_tracing()

jj_rescan_token

private final void jj_rescan_token()

jj_save

private final void jj_save(int index,
                           int xla)