@SuppressWarnings("fallthrough") private void bqstr(char flag) throws Exception {
  Input inp=mInp;
  mBuffIdx=-1;
  bappend((char)0);
  char ch;
  for (short st=0; st >= 0; ) {
    ch=(mChIdx < mChLen) ? mChars[mChIdx++] : getch();
switch (st) {
case 0:
switch (ch) {
case ' ':
case '\n':
case '\r':
case '\t':
        break;
case '\'':
      st=2;
    break;
case '\"':
  st=3;
break;
default :
panic(FAULT);
break;
}
break;
case 2:
case 3:
switch (ch) {
case '\'':
if ((st == 2) && (mInp == inp)) {
st=-1;
}
 else {
bappend(ch);
}
break;
case '\"':
if ((st == 3) && (mInp == inp)) {
st=-1;
}
 else {
bappend(ch);
}
break;
case '&':
if (flag != 'd') {
ent(flag);
}
 else {
bappend(ch);
}
break;
case '%':
if (flag == 'd') {
pent('-');
}
 else {
bappend(ch);
}
break;
case '<':
if ((flag == '-') || (flag == 'd')) {
bappend(ch);
}
 else {
panic(FAULT);
}
break;
case EOS:
panic(FAULT);
case '\r':
if (flag != ' ' && mInp.next == null) {
if (getch() != '\n') {
bkch();
}
ch='\n';
}
default :
bappend(ch,flag);
break;
}
break;
default :
panic(FAULT);
}
}
if ((flag == 'i') && (mBuff[mBuffIdx] == ' ')) {
mBuffIdx-=1;
}
}

@ SuppressWarnings ( "fallthrough" ) private void bqstr ( char flag ) throws Exception { Input inp = mInp ; mBuffIdx = - 1 ; bappend ( ( char ) 0 ) ; char ch ; for ( short st = 0 ; st >= 0 ; ) { ch = ( mChIdx < mChLen ) ? mChars [ mChIdx ++ ] : getch ( ) ; switch ( st ) { case 0 : switch ( ch ) { case ' ' : case '\n' : case '\r' : case '\t' : break ; case '\'' : st = 2 ; break ; case '\"' : st = 3 ; break ; default : panic ( FAULT ) ; break ; } break ; case 2 : case 3 : switch ( ch ) { case '\'' : if ( ( st == 2 ) && ( mInp == inp ) ) { st = - 1 ; } else { bappend ( ch ) ; } break ; case '\"' : if ( ( st == 3 ) && ( mInp == inp ) ) { st = - 1 ; } else { bappend ( ch ) ; } break ; case '&' : if ( flag != 'd' ) { ent ( flag ) ; } else { bappend ( ch ) ; } break ; case '%' : if ( flag == 'd' ) { pent ( '-' ) ; } else { bappend ( ch ) ; } break ; case '<' : if ( ( flag == '-' ) || ( flag == 'd' ) ) { bappend ( ch ) ; } else { panic ( FAULT ) ; } break ; case EOS : panic ( FAULT ) ; case '\r' : if ( flag != ' ' && mInp . next == null ) { if ( getch ( ) != '\n' ) { bkch ( ) ; } ch = '\n' ; } default : bappend ( ch , flag ) ; break ; } break ; default : panic ( FAULT ) ; } } if ( ( flag == 'i' ) && ( mBuff [ mBuffIdx ] == ' ' ) ) { mBuffIdx -= 1 ; } }
reads a single or double quotted string in to the buffer . this method resolves entities inside a string unless the parser parses dtd .
