@SuppressWarnings("fallthrough") void parseSection() throws IOException {
  while (true) {
switch (ch) {
case ']':
      return;
case '<':
switch (ch=in.read()) {
case '!':
switch (ch=in.read()) {
case '[':
        parseMarkedSectionDeclaration();
      break;
case '-':
    skipParameterSpace();
  expect('>');
break;
default :
if (parseIdentifier(true)) {
String str=getString(0);
if (str.equals("element")) {
  parseElementDeclaration();
}
 else if (str.equals("entity")) {
  parseEntityDeclaration();
}
 else if (str.equals("attlist")) {
  parseAttlistDeclaration();
}
 else if (str.equals("doctype")) {
  parseDocumentTypeDeclaration();
}
 else if (str.equals("usemap")) {
  error("ignoring","usemap");
  while ((ch != -1) && (ch != '>')) {
    ch=in.read();
  }
  expect('>');
}
 else if (str.equals("shortref")) {
  error("ignoring","shortref");
  while ((ch != -1) && (ch != '>')) {
    ch=in.read();
  }
  expect('>');
}
 else if (str.equals("notation")) {
  error("ignoring","notation");
  while ((ch != -1) && (ch != '>')) {
    ch=in.read();
  }
  expect('>');
}
 else {
  error("markup");
}
}
 else {
error("markup");
while ((ch != -1) && (ch != '>')) {
  ch=in.read();
}
expect('>');
}
}
}
break;
case -1:
return;
default :
char str[]={(char)ch};
error("invalid.arg","character","'" + new String(str) + "' / "+ ch);
case ' ':
case '\t':
case '\n':
ch=in.read();
break;
}
}
}

@ SuppressWarnings ( "fallthrough" ) void parseSection ( ) throws IOException { while ( true ) { switch ( ch ) { case ']' : return ; case '<' : switch ( ch = in . read ( ) ) { case '!' : switch ( ch = in . read ( ) ) { case '[' : parseMarkedSectionDeclaration ( ) ; break ; case '-' : skipParameterSpace ( ) ; expect ( '>' ) ; break ; default : if ( parseIdentifier ( true ) ) { String str = getString ( 0 ) ; if ( str . equals ( "element" ) ) { parseElementDeclaration ( ) ; } else if ( str . equals ( "entity" ) ) { parseEntityDeclaration ( ) ; } else if ( str . equals ( "attlist" ) ) { parseAttlistDeclaration ( ) ; } else if ( str . equals ( "doctype" ) ) { parseDocumentTypeDeclaration ( ) ; } else if ( str . equals ( "usemap" ) ) { error ( "ignoring" , "usemap" ) ; while ( ( ch != - 1 ) && ( ch != '>' ) ) { ch = in . read ( ) ; } expect ( '>' ) ; } else if ( str . equals ( "shortref" ) ) { error ( "ignoring" , "shortref" ) ; while ( ( ch != - 1 ) && ( ch != '>' ) ) { ch = in . read ( ) ; } expect ( '>' ) ; } else if ( str . equals ( "notation" ) ) { error ( "ignoring" , "notation" ) ; while ( ( ch != - 1 ) && ( ch != '>' ) ) { ch = in . read ( ) ; } expect ( '>' ) ; } else { error ( "markup" ) ; } } else { error ( "markup" ) ; while ( ( ch != - 1 ) && ( ch != '>' ) ) { ch = in . read ( ) ; } expect ( '>' ) ; } } } break ; case - 1 : return ; default : char str [ ] = { ( char ) ch } ; error ( "invalid.arg" , "character" , "'" + new String ( str ) + "' / " + ch ) ; case ' ' : case '\t' : case '\n' : ch = in . read ( ) ; break ; } } }
parse a section of the input upto eof or ' ] ' .
