public abstract class SAXSymbol extends Object
| Modifier and Type | Field and Description |
|---|---|
SAXSymbol |
n |
protected static int |
numTerminals
Apparently, this limits the possible number of terminals, ids of non-terminals start after this
num.
|
protected int |
originalPosition
The symbol original position.
|
SAXSymbol |
p
Sort of pointers for previous and the next symbols.
|
protected static Hashtable<SAXSymbol,SAXSymbol> |
theDigrams
Hashtable to keep track of all digrams.
|
static Hashtable<String,Hashtable<String,Integer>> |
theSubstituteTable |
protected String |
value
The symbol value.
|
| Constructor and Description |
|---|
SAXSymbol() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
check()
"Checks in" a new digram and enforce the digram uniqueness constraint.
|
abstract void |
cleanUp()
Cleans up template.
|
void |
deleteDigram()
Removes the digram from the hash table.
|
boolean |
equals(Object obj)
Test if two digrams are equal.
|
protected static String |
getPayload(SAXSymbol symbol)
This routine is used for the debugging.
|
int |
hashCode()
Custom hashcode implementation.
|
void |
insertAfter(SAXSymbol toInsert)
Inserts a symbol after this one.
|
boolean |
isGuard()
Returns true if this is the guard symbol.
|
boolean |
isNonTerminal()
Returns true if this is a non-terminal.
|
static void |
join(SAXSymbol left,
SAXSymbol right)
Links left and right symbols together, i.e.
|
void |
match(SAXSymbol theDigram,
SAXSymbol matchingDigram)
Deals with a matching digram.
|
void |
substitute(SAXRule r)
Replace a digram with a non-terminal.
|
String |
toString() |
protected static final int numTerminals
protected static final Hashtable<SAXSymbol,SAXSymbol> theDigrams
protected String value
protected int originalPosition
public SAXSymbol p
public SAXSymbol n
public static void join(SAXSymbol left, SAXSymbol right)
left - the left symbol.right - the right symbol.public abstract void cleanUp()
public void insertAfter(SAXSymbol toInsert)
toInsert - the new symbol to be inserted.public void deleteDigram()
public boolean isGuard()
public boolean isNonTerminal()
public boolean check()
public void substitute(SAXRule r)
r - a rule to use.public void match(SAXSymbol theDigram, SAXSymbol matchingDigram)
theDigram - the first matching digram.matchingDigram - the second matching digram.public int hashCode()
public boolean equals(Object obj)
Copyright © 2021 JMotif. All rights reserved.