net.sourceforge.sqlunit.parsers
Class SymbolParser
java.lang.Object
net.sourceforge.sqlunit.parsers.SymbolParser
- All Implemented Interfaces:
- SymbolParserConstants
public class SymbolParser
- extends java.lang.Object
- implements SymbolParserConstants
Contains specifications and grammar for parsing Strings and replacing
embedded ant-style variables with values from the SymbolTable.
- Version:
- $Revision: 1.1 $
- Author:
- Sujit Pal (sujit.pal@cnet.com)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
token_source
public SymbolParserTokenManager token_source
token
public Token token
jj_nt
public Token jj_nt
SymbolParser
public SymbolParser(java.io.InputStream stream)
SymbolParser
public SymbolParser(java.io.Reader stream)
SymbolParser
public SymbolParser(SymbolParserTokenManager tm)
parse
public static java.lang.String parse(java.lang.String str,
java.util.Map syms,
boolean partialOk)
throws ParseException
- This is the method that will be called from the client.
- Parameters:
str
- the String with embedded ant-style variables.syms
- a Map of symbols in the SymbolTable.partialOk
- if true, exception will not be thrown if
variable is not found, it is assumed that this will be passed
in later.
- Returns:
- a String with the variables replaced by their values.
- Throws:
ParseException
- if there was a problem parsing the String,
or if a variable could not be found in the SymbolTable.
Substitute
public final void Substitute()
throws ParseException
- Throws:
ParseException
ReInit
public void ReInit(java.io.InputStream stream)
ReInit
public void ReInit(java.io.Reader stream)
ReInit
public void ReInit(SymbolParserTokenManager tm)
getNextToken
public final Token getNextToken()
getToken
public final Token getToken(int index)
generateParseException
public ParseException generateParseException()
enable_tracing
public final void enable_tracing()
disable_tracing
public final void disable_tracing()