Token t2 = scanner.readToken(); if (t2.type != Token.RCURLY) throw new RTFParseException("expected right curly braces");
Token t2 = scanner.peekToken(); if (t2.type == Token.RCURLY) {  scanner.readToken(); } else {  System.err.println("RTF warning: expected right curly braces"); }
  private void parseFile()    throws IOException, BadLocationException  {    Token t1 = scanner.readToken();    if (t1.type != Token.LCURLY)      throw new RTFParseException("expected left curly braces");    parseHeader();    parseDocument();      Token t2 = scanner.readToken();    if (t2.type != Token.RCURLY)      throw new RTFParseException("expected right curly braces");  }