Methods Summary |
---|
protected void | dbg_enter(java.lang.String rule)Beginning of debug operation.
StringBuffer stringBuffer = new StringBuffer();
for (int i = 0; i < nesting_level; i++)
stringBuffer.append(">");
if (debug) {
Logging.report(Logging.INFORMATION, LogChannels.LC_JSR180,
stringBuffer + rule +
"\nlexer buffer = \n" +
lexer.getRest());
}
nesting_level++;
|
protected void | dbg_leave(java.lang.String rule)Completion of diagnostic operation.
StringBuffer stringBuffer = new StringBuffer();
for (int i = 0; i < nesting_level; i++)
stringBuffer.append("<");
if (debug) {
Logging.report(Logging.INFORMATION, LogChannels.LC_JSR180,
stringBuffer +
rule +
"\nlexer buffer = \n" +
lexer.getRest());
}
nesting_level --;
|
protected NameValue | nameValue(char separator)Gets a name value pair with the specified separator.
if (debug)
dbg_enter("nameValue");
try {
lexer.match(LexerCore.ID);
Token name = lexer.getNextToken();
// eat white space.
lexer.SPorHT();
try {
boolean quoted = false;
char la = lexer.lookAhead(0);
if (la == separator) {
lexer.consume(1);
lexer.SPorHT();
String str = null;
if (lexer.lookAhead(0) == '\"") {
str = lexer.quotedString();
quoted = true;
} else {
lexer.match(LexerCore.ID);
Token value = lexer.getNextToken();
str = value.tokenValue;
}
NameValue nv =
new NameValue(name.tokenValue, str);
if (quoted) nv.setQuotedValue();
return nv;
} else {
// if the parameter has no value, an empty string is used
return new NameValue(name.tokenValue, "");
}
} catch (ParseException ex) {
return new NameValue(name.tokenValue, "");
}
} finally {
if (debug) dbg_leave("nameValue");
}
|
protected NameValue | nameValue()Gets name value token using '=' as a separator.
return nameValue('=");
|
protected void | peekLine(java.lang.String rule)Peeks at the next line.
if (ParserCore.debug) {
Logging.report(Logging.INFORMATION, LogChannels.LC_JSR180,
rule + " " + lexer.peekLine());
}
|