public class DBPCD extends java.lang.Object implements DBPCDConstants
Modifier and Type | Field and Description |
---|---|
static boolean |
debug
Whether to operate in debug mode
|
Token |
jj_nt
Next token.
|
Token |
token
Current token.
|
DBPCDTokenManager |
token_source
Generated Token Manager.
|
COEL, COMMENT, DATA, DECIMAL, DEFAULT, DIGITS, DOUBLEQ, EOF, EOL, ID, NL, NUMBER, SIGN, SP, T_BOOL, T_BTN, T_DEC, T_EXEC, T_FALSE, T_INT, T_KEY, T_LABEL, T_MAX, T_MIN, T_NAME, T_NAMECOL, T_REF, T_SCHEMA, T_TABLE, T_TEXT, T_TRUE, TAB, TEXT, tokenImage, WSP
Constructor and Description |
---|
DBPCD(DBPCDTokenManager tm)
Constructor with generated Token Manager.
|
DBPCD(java.io.InputStream stream)
Constructor with InputStream.
|
DBPCD(java.io.InputStream stream,
java.lang.String encoding)
Constructor with InputStream and supplied encoding
|
DBPCD(java.io.Reader stream)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
assertIndent(int scope)
Asserts indentation level (calls token_source.testIndent)
|
boolean |
Bool()
Parses a boolean token into a java boolean
|
double |
Decimal()
Parses a decimal number from a PCD file into a Java double
|
void |
disable_tracing()
Disable tracing.
|
void |
enable_tracing()
Enable tracing.
|
ParseException |
generateParseException()
Generate ParseException.
|
Token |
getNextToken()
Get the next Token.
|
Token |
getToken(int index)
Get the specific Token.
|
java.lang.String |
Ident()
Parses an identifier token from a PCD file into a Java String
|
static void |
main(java.lang.String[] args) |
void |
nl()
Matches new line characters including preceding whitespace
|
int |
Number()
Parses a non-decimal number from a PCD file into a Java integer
|
DBField |
parseField(java.lang.String table,
KeyableField key,
java.io.File parent,
boolean norecurse)
Parses a single PCD database field.
|
KeyableField |
parseKeyableField()
Parses a single Keyable (i.e.
|
DBSchema |
parseSchema(java.io.File parent,
boolean norecurse)
Parses a PCD database schema.
|
void |
ReInit(DBPCDTokenManager tm)
Reinitialise.
|
void |
ReInit(java.io.InputStream stream)
Reinitialise.
|
void |
ReInit(java.io.InputStream stream,
java.lang.String encoding)
Reinitialise.
|
void |
ReInit(java.io.Reader stream)
Reinitialise.
|
boolean |
testIndent(int scope)
Tests indentation (NOTE: this calls the token manager)
|
java.lang.String |
Text()
Parses a text token from a PCD file into a Java String
|
public static boolean debug
public DBPCDTokenManager token_source
public Token token
public Token jj_nt
public DBPCD(java.io.InputStream stream)
public DBPCD(java.io.InputStream stream, java.lang.String encoding)
public DBPCD(java.io.Reader stream)
public DBPCD(DBPCDTokenManager tm)
public static void main(java.lang.String[] args)
public final DBSchema parseSchema(java.io.File parent, boolean norecurse) throws ParseException
parent
- the parent path of the PCD database file - this is used for DB referencingnorecurse
- if true, recursion through reference fields and the like will be skipped (this prevents infinite recursion when parsing reference fields)ParseException
public final DBField parseField(java.lang.String table, KeyableField key, java.io.File parent, boolean norecurse) throws ParseException
table
- the name of the table that the field belongs tokey
- the name of the primary key withing table that the field belongs toparent
- the parent path of the PCD database file - this is used for DB referencingnorecurse
- if true, recursion through reference fields and the like will be skipped (this prevents infinite recursion when parsing reference fields)ParseException
public final KeyableField parseKeyableField() throws ParseException
ParseException
public final java.lang.String Ident() throws ParseException
ParseException
public final java.lang.String Text() throws ParseException
ParseException
public final double Decimal() throws ParseException
ParseException
public final int Number() throws ParseException
ParseException
public final boolean Bool() throws ParseException
ParseException
public final void assertIndent(int scope) throws ParseException
scope
- the number of indents requiredParseException
public final boolean testIndent(int scope) throws ParseException
scope
- the number of indents requiredParseException
public final void nl() throws ParseException
ParseException
public void ReInit(java.io.InputStream stream)
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
public void ReInit(java.io.Reader stream)
public void ReInit(DBPCDTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
Copyright © 2008-2014 University of Manitoba.