private void expect(char expectedSymbol) throws ParseException {
  if (!accept(expectedSymbol))   throw new ParseException("Expected '" + expectedSymbol + "' but found '"+ (char)data[index]+ "'",index);
}

private void expect ( char expectedSymbol ) throws ParseException { if ( ! accept ( expectedSymbol ) ) throw new ParseException ( "Expected '" + expectedSymbol + "' but found '" + ( char ) data [ index ] + "'" , index ) ; }
expects the input to have the given symbol at the current parsing position .
