public SrndQuery SimpleTerm()
{
Token term;
switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk)
{
case RegexpToken.TERM:
term = Jj_consume_token(RegexpToken.TERM);
{ if (true) return GetTermQuery(term.image, false /* not quoted */); }
//break; // unreachable
case RegexpToken.QUOTED:
term = Jj_consume_token(RegexpToken.QUOTED);
{ if (true) return GetTermQuery(term.image.Substring(1, (term.image.Length - 1) - 1), true /* quoted */); }
//break; // unreachable
case RegexpToken.SUFFIXTERM:
term = Jj_consume_token(RegexpToken.SUFFIXTERM);
/* ending in * */
if (!AllowedSuffix(term.image))
{
{ if (true) throw new ParseException(truncationErrorMessage + term.image); }
}
{ if (true) return GetPrefixQuery(term.image.Substring(0, term.image.Length - 1), false /* not quoted */); }
//break; // unreachable
case RegexpToken.TRUNCTERM:
term = Jj_consume_token(RegexpToken.TRUNCTERM);
/* with at least one * or ? */
if (!AllowedTruncation(term.image))
{
{ if (true) throw new ParseException(truncationErrorMessage + term.image); }
}
{ if (true) return GetTruncQuery(term.image); }
//break; // unreachable
case RegexpToken.TRUNCQUOTED:
term = Jj_consume_token(RegexpToken.TRUNCQUOTED);
/* eg. "9b-b,m"* */
if ((term.image.Length - 3) < minimumPrefixLength)
{
{ if (true) throw new ParseException(truncationErrorMessage + term.image); }
}
{ if (true) return GetPrefixQuery(term.image.Substring(1, (term.image.Length - 2) - 1), true /* quoted */); }
//break; // unreachable
default:
jj_la1[8] = jj_gen;
Jj_consume_token(-1);
throw new ParseException();
}
throw new Exception("Missing return statement in function");
}