net.thisptr.java.influxdb.metrics.agent.parser.ConfigurationParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-influxdb-metrics-agent Show documentation
Show all versions of java-influxdb-metrics-agent Show documentation
Java agent for collecting and reporting metrics to InfluxDB
/* ConfigurationParser.java */
/* Generated By:JavaCC: Do not edit this line. ConfigurationParser.java */
package net.thisptr.java.influxdb.metrics.agent.parser;
import java.io.StringReader;
import java.util.List;
import java.util.Map;
import java.util.Collections;
import java.util.HashMap;
import java.util.ArrayList;
public class ConfigurationParser implements ConfigurationParserConstants {
public static Configuration parse(final String args) {
try {
final ConfigurationParser parser = new ConfigurationParser(new StringReader(args));
return parser.Start();
} catch (Throwable th) {
throw new ConfigurationException(th);
}
}
final public Configuration Start() throws ParseException {List elements = Collections.emptyList();
label_1:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_H:
case SPACE_V:{
;
break;
}
default:
jj_la1[0] = jj_gen;
break label_1;
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_V:{
jj_consume_token(SPACE_V);
break;
}
case SPACE_H:{
jj_consume_token(SPACE_H);
break;
}
default:
jj_la1[1] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IMPORT:
case FREE_VISIBLE_CHAR:
case FREE_ESCAPE_CHAR:
case MBEAN_PATTERN_LPAR:{
elements = ElementList();
label_2:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_H:
case SPACE_V:{
;
break;
}
default:
jj_la1[2] = jj_gen;
break label_2;
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_V:{
jj_consume_token(SPACE_V);
break;
}
case SPACE_H:{
jj_consume_token(SPACE_H);
break;
}
default:
jj_la1[3] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
break;
}
default:
jj_la1[4] = jj_gen;
;
}
jj_consume_token(0);
{if ("" != null) return new Configuration(elements);}
throw new Error("Missing return statement in function");
}
final public List PropertyList() throws ParseException {Configuration.Property property;
final List properties = new ArrayList();
property = Property();
properties.add(property);
label_3:
while (true) {
if (jj_2_1(2147483647)) {
;
} else {
break label_3;
}
label_4:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_H:{
;
break;
}
default:
jj_la1[5] = jj_gen;
break label_4;
}
jj_consume_token(SPACE_H);
}
if (jj_2_2(2)) {
jj_consume_token(COMMA);
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_V:
case COMMA:{
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA:{
jj_consume_token(COMMA);
break;
}
default:
jj_la1[6] = jj_gen;
;
}
jj_consume_token(SPACE_V);
break;
}
default:
jj_la1[7] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
label_5:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_H:
case SPACE_V:{
;
break;
}
default:
jj_la1[8] = jj_gen;
break label_5;
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_H:{
jj_consume_token(SPACE_H);
break;
}
case SPACE_V:{
jj_consume_token(SPACE_V);
break;
}
default:
jj_la1[9] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
property = Property();
properties.add(property);
}
{if ("" != null) return properties;}
throw new Error("Missing return statement in function");
}
final public List ElementList() throws ParseException {Configuration.Element element;
final List elements = new ArrayList();
element = Element();
elements.add(element);
label_6:
while (true) {
if (jj_2_3(2147483647)) {
;
} else {
break label_6;
}
label_7:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_H:{
;
break;
}
default:
jj_la1[10] = jj_gen;
break label_7;
}
jj_consume_token(SPACE_H);
}
if (jj_2_4(2)) {
jj_consume_token(COMMA);
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_V:
case COMMA:{
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA:{
jj_consume_token(COMMA);
break;
}
default:
jj_la1[11] = jj_gen;
;
}
jj_consume_token(SPACE_V);
break;
}
default:
jj_la1[12] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
label_8:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_H:
case SPACE_V:{
;
break;
}
default:
jj_la1[13] = jj_gen;
break label_8;
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_H:{
jj_consume_token(SPACE_H);
break;
}
case SPACE_V:{
jj_consume_token(SPACE_V);
break;
}
default:
jj_la1[14] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
element = Element();
elements.add(element);
}
{if ("" != null) return elements;}
throw new Error("Missing return statement in function");
}
final public Configuration.Element Element() throws ParseException {Configuration.Element element;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FREE_VISIBLE_CHAR:
case FREE_ESCAPE_CHAR:{
element = Property();
break;
}
case MBEAN_PATTERN_LPAR:{
element = MatcherBlock();
break;
}
case IMPORT:{
element = Import();
break;
}
default:
jj_la1[15] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
{if ("" != null) return element;}
throw new Error("Missing return statement in function");
}
final public Configuration.Import Import() throws ParseException {String path;
jj_consume_token(IMPORT);
path = FreeString();
{if ("" != null) return new Configuration.Import(path);}
throw new Error("Missing return statement in function");
}
final public Configuration.Property Property() throws ParseException {String k, v = "";
k = FreeString();
label_9:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_H:{
;
break;
}
default:
jj_la1[16] = jj_gen;
break label_9;
}
jj_consume_token(SPACE_H);
}
jj_consume_token(EQUAL);
if (jj_2_5(2147483647)) {
label_10:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_H:{
;
break;
}
default:
jj_la1[17] = jj_gen;
break label_10;
}
jj_consume_token(SPACE_H);
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case DOUBLE_QUOTE:{
v = DoubleQuotedString();
break;
}
case FREE_VISIBLE_CHAR:
case FREE_ESCAPE_CHAR:{
v = FreeString();
break;
}
case SINGLE_QUOTE:{
v = SingleQuotedString();
break;
}
default:
jj_la1[18] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
} else {
;
}
{if ("" != null) return new Configuration.Property(k, v);}
throw new Error("Missing return statement in function");
}
final public Configuration.MatcherBlock MatcherBlock() throws ParseException {Configuration.MetricPattern pattern;
List properties = Collections.emptyList();
pattern = MetricPattern();
label_11:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_H:
case SPACE_V:{
;
break;
}
default:
jj_la1[19] = jj_gen;
break label_11;
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_V:{
jj_consume_token(SPACE_V);
break;
}
case SPACE_H:{
jj_consume_token(SPACE_H);
break;
}
default:
jj_la1[20] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
jj_consume_token(BRACE_L);
label_12:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_H:
case SPACE_V:{
;
break;
}
default:
jj_la1[21] = jj_gen;
break label_12;
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_V:{
jj_consume_token(SPACE_V);
break;
}
case SPACE_H:{
jj_consume_token(SPACE_H);
break;
}
default:
jj_la1[22] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FREE_VISIBLE_CHAR:
case FREE_ESCAPE_CHAR:{
properties = PropertyList();
label_13:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_H:
case SPACE_V:{
;
break;
}
default:
jj_la1[23] = jj_gen;
break label_13;
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SPACE_V:{
jj_consume_token(SPACE_V);
break;
}
case SPACE_H:{
jj_consume_token(SPACE_H);
break;
}
default:
jj_la1[24] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
break;
}
default:
jj_la1[25] = jj_gen;
;
}
jj_consume_token(BRACE_R);
{if ("" != null) return new Configuration.MatcherBlock(pattern, properties);}
throw new Error("Missing return statement in function");
}
final public Configuration.MetricPattern MetricPattern() throws ParseException {String domain = null;
Map keys = Collections.emptyMap();
String attribute = null;
jj_consume_token(MBEAN_PATTERN_LPAR);
domain = MetricPatternString();
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case MBEAN_PATTERN_COLON:{
jj_consume_token(MBEAN_PATTERN_COLON);
if (jj_2_6(2147483647)) {
keys = MetricPatternKeys();
jj_consume_token(MBEAN_PATTERN_COLON);
attribute = MetricPatternString();
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case MBEAN_PATTERN_VISIBLE_CHAR:
case MBEAN_PATTERN_ESCAPE_CHAR:{
keys = MetricPatternKeys();
break;
}
case MBEAN_PATTERN_COLON:{
jj_consume_token(MBEAN_PATTERN_COLON);
attribute = MetricPatternString();
break;
}
default:
jj_la1[26] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
break;
}
default:
jj_la1[27] = jj_gen;
;
}
jj_consume_token(MBEAN_PATTERN_RPAR);
{if ("" != null) return new Configuration.MetricPattern(domain, keys, attribute);}
throw new Error("Missing return statement in function");
}
final public Map MetricPatternKeys() throws ParseException {String k, v;
final Map keys = new HashMap();
k = MetricPatternString();
jj_consume_token(MBEAN_PATTERN_EQUAL);
v = MetricPatternString();
keys.put(k, v);
label_14:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case MBEAN_PATTERN_COMMA:{
;
break;
}
default:
jj_la1[28] = jj_gen;
break label_14;
}
jj_consume_token(MBEAN_PATTERN_COMMA);
k = MetricPatternString();
jj_consume_token(MBEAN_PATTERN_EQUAL);
v = MetricPatternString();
keys.put(k, v);
}
{if ("" != null) return keys;}
throw new Error("Missing return statement in function");
}
final public String MetricPatternString() throws ParseException {Token t;
final StringBuilder builder = new StringBuilder();
label_15:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case MBEAN_PATTERN_VISIBLE_CHAR:{
t = jj_consume_token(MBEAN_PATTERN_VISIBLE_CHAR);
builder.append(t.image);
break;
}
case MBEAN_PATTERN_ESCAPE_CHAR:{
t = jj_consume_token(MBEAN_PATTERN_ESCAPE_CHAR);
if (t.image.charAt(0) != '\\')
{if (true) throw new IllegalStateException("bug");}
final char c = t.image.charAt(1);
switch (c)
{
case '\\':
case ':':
case '=':
case ',':
case '[':
case ']':
builder.append(c);
break;
case 'b': builder.append((char) 0x08); break;
case 'f': builder.append((char) 0x0c); break;
case 'r': builder.append((char) 0x0d); break;
case 't': builder.append((char) 0x09); break;
case 'n': builder.append((char) 0x0a); break;
default:
{if (true) throw new IllegalStateException("bug: " + c);}
}
break;
}
default:
jj_la1[29] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case MBEAN_PATTERN_VISIBLE_CHAR:
case MBEAN_PATTERN_ESCAPE_CHAR:{
;
break;
}
default:
jj_la1[30] = jj_gen;
break label_15;
}
}
{if ("" != null) return builder.toString();}
throw new Error("Missing return statement in function");
}
final public String DoubleQuotedString() throws ParseException {Token t;
final StringBuilder builder = new StringBuilder();
jj_consume_token(DOUBLE_QUOTE);
label_16:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case DOUBLE_QUOTE_VISIBLE_CHAR:
case DOUBLE_QUOTE_ESCAPE_CHAR:{
;
break;
}
default:
jj_la1[31] = jj_gen;
break label_16;
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case DOUBLE_QUOTE_VISIBLE_CHAR:{
t = jj_consume_token(DOUBLE_QUOTE_VISIBLE_CHAR);
builder.append(t.image);
break;
}
case DOUBLE_QUOTE_ESCAPE_CHAR:{
t = jj_consume_token(DOUBLE_QUOTE_ESCAPE_CHAR);
if (t.image.charAt(0) != '\\')
{if (true) throw new IllegalStateException("bug");}
final char c = t.image.charAt(1);
switch (c)
{
case '\"':
case '\\':
builder.append(c);
break;
case 'b': builder.append((char) 0x08); break;
case 'f': builder.append((char) 0x0c); break;
case 'r': builder.append((char) 0x0d); break;
case 't': builder.append((char) 0x09); break;
case 'n': builder.append((char) 0x0a); break;
default:
{if (true) throw new IllegalStateException("bug: " + c);}
}
break;
}
default:
jj_la1[32] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
jj_consume_token(DOUBLE_QUOTE_END);
{if ("" != null) return builder.toString();}
throw new Error("Missing return statement in function");
}
final public String SingleQuotedString() throws ParseException {Token t;
final StringBuilder builder = new StringBuilder();
jj_consume_token(SINGLE_QUOTE);
label_17:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SINGLE_QUOTE_VISIBLE_CHAR:
case SINGLE_QUOTE_ESCAPE_CHAR:{
;
break;
}
default:
jj_la1[33] = jj_gen;
break label_17;
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SINGLE_QUOTE_VISIBLE_CHAR:{
t = jj_consume_token(SINGLE_QUOTE_VISIBLE_CHAR);
builder.append(t.image);
break;
}
case SINGLE_QUOTE_ESCAPE_CHAR:{
t = jj_consume_token(SINGLE_QUOTE_ESCAPE_CHAR);
if (t.image.charAt(0) != '\\')
{if (true) throw new IllegalStateException("bug");}
final char c = t.image.charAt(1);
switch (c)
{
case '\'':
case '\\':
builder.append(c);
break;
case 'b': builder.append((char) 0x08); break;
case 'f': builder.append((char) 0x0c); break;
case 'r': builder.append((char) 0x0d); break;
case 't': builder.append((char) 0x09); break;
case 'n': builder.append((char) 0x0a); break;
default:
{if (true) throw new IllegalStateException("bug: " + c);}
}
break;
}
default:
jj_la1[34] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
jj_consume_token(SINGLE_QUOTE_END);
{if ("" != null) return builder.toString();}
throw new Error("Missing return statement in function");
}
final public String FreeString() throws ParseException {Token t;
final StringBuilder builder = new StringBuilder();
label_18:
while (true) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FREE_VISIBLE_CHAR:{
t = jj_consume_token(FREE_VISIBLE_CHAR);
builder.append(t.image);
break;
}
case FREE_ESCAPE_CHAR:{
t = jj_consume_token(FREE_ESCAPE_CHAR);
if (t.image.charAt(0) != '\\')
{if (true) throw new IllegalStateException("bug");}
final char c = t.image.charAt(1);
switch (c)
{
case '\"':
case '\'':
case '\\':
case '=':
case ',':
case '[':
case ']':
case '{':
case '}':
case '@':
case ' ':
builder.append(c);
break;
case 'b': builder.append((char) 0x08); break;
case 'f': builder.append((char) 0x0c); break;
case 'r': builder.append((char) 0x0d); break;
case 't': builder.append((char) 0x09); break;
case 'n': builder.append((char) 0x0a); break;
default:
{if (true) throw new IllegalStateException("bug: " + c);}
}
break;
}
default:
jj_la1[35] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FREE_VISIBLE_CHAR:
case FREE_ESCAPE_CHAR:{
;
break;
}
default:
jj_la1[36] = jj_gen;
break label_18;
}
}
{if ("" != null) return builder.toString();}
throw new Error("Missing return statement in function");
}
private boolean jj_2_1(int xla)
{
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_1(); }
catch(LookaheadSuccess ls) { return true; }
finally { jj_save(0, xla); }
}
private boolean jj_2_2(int xla)
{
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_2(); }
catch(LookaheadSuccess ls) { return true; }
finally { jj_save(1, xla); }
}
private boolean jj_2_3(int xla)
{
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_3(); }
catch(LookaheadSuccess ls) { return true; }
finally { jj_save(2, xla); }
}
private boolean jj_2_4(int xla)
{
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_4(); }
catch(LookaheadSuccess ls) { return true; }
finally { jj_save(3, xla); }
}
private boolean jj_2_5(int xla)
{
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_5(); }
catch(LookaheadSuccess ls) { return true; }
finally { jj_save(4, xla); }
}
private boolean jj_2_6(int xla)
{
jj_la = xla; jj_lastpos = jj_scanpos = token;
try { return !jj_3_6(); }
catch(LookaheadSuccess ls) { return true; }
finally { jj_save(5, xla); }
}
private boolean jj_3R_50()
{
if (jj_scan_token(DOUBLE_QUOTE_ESCAPE_CHAR)) return true;
return false;
}
private boolean jj_3R_19()
{
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(5)) jj_scanpos = xsp;
if (jj_scan_token(SPACE_V)) return true;
return false;
}
private boolean jj_3R_49()
{
if (jj_scan_token(DOUBLE_QUOTE_VISIBLE_CHAR)) return true;
return false;
}
private boolean jj_3R_40()
{
Token xsp;
xsp = jj_scanpos;
if (jj_3R_49()) {
jj_scanpos = xsp;
if (jj_3R_50()) return true;
}
return false;
}
private boolean jj_3_2()
{
if (jj_scan_token(COMMA)) return true;
return false;
}
private boolean jj_3R_20()
{
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(1)) {
jj_scanpos = xsp;
if (jj_scan_token(2)) return true;
}
return false;
}
private boolean jj_3R_45()
{
if (jj_scan_token(MBEAN_PATTERN_LPAR)) return true;
if (jj_3R_35()) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_55()) jj_scanpos = xsp;
if (jj_scan_token(MBEAN_PATTERN_RPAR)) return true;
return false;
}
private boolean jj_3R_57()
{
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(2)) {
jj_scanpos = xsp;
if (jj_scan_token(1)) return true;
}
return false;
}
private boolean jj_3R_48()
{
if (jj_3R_56()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_57()) { jj_scanpos = xsp; break; }
}
return false;
}
private boolean jj_3R_33()
{
if (jj_scan_token(DOUBLE_QUOTE)) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_40()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(DOUBLE_QUOTE_END)) return true;
return false;
}
private boolean jj_3_1()
{
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_scan_token(1)) { jj_scanpos = xsp; break; }
}
xsp = jj_scanpos;
if (jj_3_2()) {
jj_scanpos = xsp;
if (jj_3R_19()) return true;
}
while (true) {
xsp = jj_scanpos;
if (jj_3R_20()) { jj_scanpos = xsp; break; }
}
if (jj_3R_21()) return true;
return false;
}
private boolean jj_3R_27()
{
if (jj_3R_34()) return true;
return false;
}
private boolean jj_3R_47()
{
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(2)) {
jj_scanpos = xsp;
if (jj_scan_token(1)) return true;
}
return false;
}
private boolean jj_3R_26()
{
if (jj_3R_29()) return true;
return false;
}
private boolean jj_3R_46()
{
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(2)) {
jj_scanpos = xsp;
if (jj_scan_token(1)) return true;
}
return false;
}
private boolean jj_3R_44()
{
if (jj_scan_token(FREE_ESCAPE_CHAR)) return true;
return false;
}
private boolean jj_3R_25()
{
if (jj_3R_33()) return true;
return false;
}
private boolean jj_3R_38()
{
if (jj_3R_45()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_46()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(BRACE_L)) return true;
while (true) {
xsp = jj_scanpos;
if (jj_3R_47()) { jj_scanpos = xsp; break; }
}
xsp = jj_scanpos;
if (jj_3R_48()) jj_scanpos = xsp;
if (jj_scan_token(BRACE_R)) return true;
return false;
}
private boolean jj_3R_56()
{
if (jj_3R_21()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3_1()) { jj_scanpos = xsp; break; }
}
return false;
}
private boolean jj_3R_37()
{
Token xsp;
xsp = jj_scanpos;
if (jj_3R_43()) {
jj_scanpos = xsp;
if (jj_3R_44()) return true;
}
return false;
}
private boolean jj_3R_43()
{
if (jj_scan_token(FREE_VISIBLE_CHAR)) return true;
return false;
}
private boolean jj_3_5()
{
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_scan_token(1)) { jj_scanpos = xsp; break; }
}
xsp = jj_scanpos;
if (jj_3R_25()) {
jj_scanpos = xsp;
if (jj_3R_26()) {
jj_scanpos = xsp;
if (jj_3R_27()) return true;
}
}
return false;
}
private boolean jj_3R_29()
{
Token xsp;
if (jj_3R_37()) return true;
while (true) {
xsp = jj_scanpos;
if (jj_3R_37()) { jj_scanpos = xsp; break; }
}
return false;
}
private boolean jj_3R_54()
{
if (jj_scan_token(MBEAN_PATTERN_ESCAPE_CHAR)) return true;
return false;
}
private boolean jj_3R_53()
{
if (jj_scan_token(MBEAN_PATTERN_VISIBLE_CHAR)) return true;
return false;
}
private boolean jj_3R_42()
{
Token xsp;
xsp = jj_scanpos;
if (jj_3R_53()) {
jj_scanpos = xsp;
if (jj_3R_54()) return true;
}
return false;
}
private boolean jj_3R_21()
{
if (jj_3R_29()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_scan_token(1)) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(EQUAL)) return true;
xsp = jj_scanpos;
if (jj_3_5()) jj_scanpos = xsp;
return false;
}
private boolean jj_3R_35()
{
Token xsp;
if (jj_3R_42()) return true;
while (true) {
xsp = jj_scanpos;
if (jj_3R_42()) { jj_scanpos = xsp; break; }
}
return false;
}
private boolean jj_3R_39()
{
if (jj_scan_token(IMPORT)) return true;
if (jj_3R_29()) return true;
return false;
}
private boolean jj_3R_52()
{
if (jj_scan_token(SINGLE_QUOTE_ESCAPE_CHAR)) return true;
return false;
}
private boolean jj_3R_32()
{
if (jj_3R_39()) return true;
return false;
}
private boolean jj_3R_36()
{
if (jj_scan_token(MBEAN_PATTERN_COMMA)) return true;
if (jj_3R_35()) return true;
if (jj_scan_token(MBEAN_PATTERN_EQUAL)) return true;
if (jj_3R_35()) return true;
return false;
}
private boolean jj_3R_51()
{
if (jj_scan_token(SINGLE_QUOTE_VISIBLE_CHAR)) return true;
return false;
}
private boolean jj_3R_31()
{
if (jj_3R_38()) return true;
return false;
}
private boolean jj_3R_41()
{
Token xsp;
xsp = jj_scanpos;
if (jj_3R_51()) {
jj_scanpos = xsp;
if (jj_3R_52()) return true;
}
return false;
}
private boolean jj_3R_30()
{
if (jj_3R_21()) return true;
return false;
}
private boolean jj_3_6()
{
if (jj_3R_28()) return true;
if (jj_scan_token(MBEAN_PATTERN_COLON)) return true;
return false;
}
private boolean jj_3R_22()
{
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(5)) jj_scanpos = xsp;
if (jj_scan_token(SPACE_V)) return true;
return false;
}
private boolean jj_3R_34()
{
if (jj_scan_token(SINGLE_QUOTE)) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_41()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(SINGLE_QUOTE_END)) return true;
return false;
}
private boolean jj_3R_60()
{
if (jj_scan_token(MBEAN_PATTERN_COLON)) return true;
if (jj_3R_35()) return true;
return false;
}
private boolean jj_3R_24()
{
Token xsp;
xsp = jj_scanpos;
if (jj_3R_30()) {
jj_scanpos = xsp;
if (jj_3R_31()) {
jj_scanpos = xsp;
if (jj_3R_32()) return true;
}
}
return false;
}
private boolean jj_3R_59()
{
if (jj_3R_28()) return true;
return false;
}
private boolean jj_3_4()
{
if (jj_scan_token(COMMA)) return true;
return false;
}
private boolean jj_3R_28()
{
if (jj_3R_35()) return true;
if (jj_scan_token(MBEAN_PATTERN_EQUAL)) return true;
if (jj_3R_35()) return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_36()) { jj_scanpos = xsp; break; }
}
return false;
}
private boolean jj_3R_23()
{
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(1)) {
jj_scanpos = xsp;
if (jj_scan_token(2)) return true;
}
return false;
}
private boolean jj_3R_58()
{
if (jj_3R_28()) return true;
if (jj_scan_token(MBEAN_PATTERN_COLON)) return true;
if (jj_3R_35()) return true;
return false;
}
private boolean jj_3_3()
{
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_scan_token(1)) { jj_scanpos = xsp; break; }
}
xsp = jj_scanpos;
if (jj_3_4()) {
jj_scanpos = xsp;
if (jj_3R_22()) return true;
}
while (true) {
xsp = jj_scanpos;
if (jj_3R_23()) { jj_scanpos = xsp; break; }
}
if (jj_3R_24()) return true;
return false;
}
private boolean jj_3R_55()
{
if (jj_scan_token(MBEAN_PATTERN_COLON)) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_58()) {
jj_scanpos = xsp;
if (jj_3R_59()) {
jj_scanpos = xsp;
if (jj_3R_60()) return true;
}
}
return false;
}
/** Generated Token Manager. */
public ConfigurationParserTokenManager token_source;
SimpleCharStream jj_input_stream;
/** Current token. */
public Token token;
/** Next token. */
public Token jj_nt;
private int jj_ntk;
private Token jj_scanpos, jj_lastpos;
private int jj_la;
private int jj_gen;
final private int[] jj_la1 = new int[37];
static private int[] jj_la1_0;
static {
jj_la1_init_0();
}
private static void jj_la1_init_0() {
jj_la1_0 = new int[] {0x6,0x6,0x6,0x6,0x1a40,0x2,0x20,0x24,0x6,0x6,0x2,0x20,0x24,0x6,0x6,0x1a40,0x2,0x2,0x2100a00,0x6,0x6,0x6,0x6,0x6,0x6,0xa00,0xa2000,0x2000,0x8000,0xa0000,0xa0000,0x1400000,0x1400000,0x28000000,0x28000000,0xa00,0xa00,};
}
final private JJCalls[] jj_2_rtns = new JJCalls[6];
private boolean jj_rescan = false;
private int jj_gc = 0;
/** Constructor with InputStream. */
public ConfigurationParser(java.io.InputStream stream) {
this(stream, null);
}
/** Constructor with InputStream and supplied encoding */
public ConfigurationParser(java.io.InputStream stream, String encoding) {
try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
token_source = new ConfigurationParserTokenManager(jj_input_stream);
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 37; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
/** Reinitialise. */
public void ReInit(java.io.InputStream stream) {
ReInit(stream, null);
}
/** Reinitialise. */
public void ReInit(java.io.InputStream stream, String encoding) {
try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
token_source.ReInit(jj_input_stream);
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 37; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
/** Constructor. */
public ConfigurationParser(java.io.Reader stream) {
jj_input_stream = new SimpleCharStream(stream, 1, 1);
token_source = new ConfigurationParserTokenManager(jj_input_stream);
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 37; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
/** Reinitialise. */
public void ReInit(java.io.Reader stream) {
if (jj_input_stream == null) {
jj_input_stream = new SimpleCharStream(stream, 1, 1);
} else {
jj_input_stream.ReInit(stream, 1, 1);
}
if (token_source == null) {
token_source = new ConfigurationParserTokenManager(jj_input_stream);
}
token_source.ReInit(jj_input_stream);
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 37; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
/** Constructor with generated Token Manager. */
public ConfigurationParser(ConfigurationParserTokenManager tm) {
token_source = tm;
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 37; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
/** Reinitialise. */
public void ReInit(ConfigurationParserTokenManager tm) {
token_source = tm;
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 37; i++) jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
}
private Token jj_consume_token(int kind) throws ParseException {
Token oldToken;
if ((oldToken = token).next != null) token = token.next;
else token = token.next = token_source.getNextToken();
jj_ntk = -1;
if (token.kind == kind) {
jj_gen++;
if (++jj_gc > 100) {
jj_gc = 0;
for (int i = 0; i < jj_2_rtns.length; i++) {
JJCalls c = jj_2_rtns[i];
while (c != null) {
if (c.gen < jj_gen) c.first = null;
c = c.next;
}
}
}
return token;
}
token = oldToken;
jj_kind = kind;
throw generateParseException();
}
@SuppressWarnings("serial")
static private final class LookaheadSuccess extends java.lang.Error { }
final private LookaheadSuccess jj_ls = new LookaheadSuccess();
private boolean jj_scan_token(int kind) {
if (jj_scanpos == jj_lastpos) {
jj_la--;
if (jj_scanpos.next == null) {
jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
} else {
jj_lastpos = jj_scanpos = jj_scanpos.next;
}
} else {
jj_scanpos = jj_scanpos.next;
}
if (jj_rescan) {
int i = 0; Token tok = token;
while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
if (tok != null) jj_add_error_token(kind, i);
}
if (jj_scanpos.kind != kind) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
return false;
}
/** Get the next Token. */
final public Token getNextToken() {
if (token.next != null) token = token.next;
else token = token.next = token_source.getNextToken();
jj_ntk = -1;
jj_gen++;
return token;
}
/** Get the specific Token. */
final public Token getToken(int index) {
Token t = token;
for (int i = 0; i < index; i++) {
if (t.next != null) t = t.next;
else t = t.next = token_source.getNextToken();
}
return t;
}
private int jj_ntk_f() {
if ((jj_nt=token.next) == null)
return (jj_ntk = (token.next=token_source.getNextToken()).kind);
else
return (jj_ntk = jj_nt.kind);
}
private java.util.List jj_expentries = new java.util.ArrayList();
private int[] jj_expentry;
private int jj_kind = -1;
private int[] jj_lasttokens = new int[100];
private int jj_endpos;
private void jj_add_error_token(int kind, int pos) {
if (pos >= 100) {
return;
}
if (pos == jj_endpos + 1) {
jj_lasttokens[jj_endpos++] = kind;
} else if (jj_endpos != 0) {
jj_expentry = new int[jj_endpos];
for (int i = 0; i < jj_endpos; i++) {
jj_expentry[i] = jj_lasttokens[i];
}
for (int[] oldentry : jj_expentries) {
if (oldentry.length == jj_expentry.length) {
boolean isMatched = true;
for (int i = 0; i < jj_expentry.length; i++) {
if (oldentry[i] != jj_expentry[i]) {
isMatched = false;
break;
}
}
if (isMatched) {
jj_expentries.add(jj_expentry);
break;
}
}
}
if (pos != 0) {
jj_lasttokens[(jj_endpos = pos) - 1] = kind;
}
}
}
/** Generate ParseException. */
public ParseException generateParseException() {
jj_expentries.clear();
boolean[] la1tokens = new boolean[30];
if (jj_kind >= 0) {
la1tokens[jj_kind] = true;
jj_kind = -1;
}
for (int i = 0; i < 37; i++) {
if (jj_la1[i] == jj_gen) {
for (int j = 0; j < 32; j++) {
if ((jj_la1_0[i] & (1< jj_gen) {
jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
switch (i) {
case 0: jj_3_1(); break;
case 1: jj_3_2(); break;
case 2: jj_3_3(); break;
case 3: jj_3_4(); break;
case 4: jj_3_5(); break;
case 5: jj_3_6(); break;
}
}
p = p.next;
} while (p != null);
} catch(LookaheadSuccess ls) { }
}
jj_rescan = false;
}
private void jj_save(int index, int xla) {
JJCalls p = jj_2_rtns[index];
while (p.gen > jj_gen) {
if (p.next == null) { p = p.next = new JJCalls(); break; }
p = p.next;
}
p.gen = jj_gen + xla - jj_la;
p.first = token;
p.arg = xla;
}
static final class JJCalls {
int gen;
Token first;
int arg;
JJCalls next;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy