protected String readJavaIdentifier() { readWhiteSpace(); StringBuilder sb = new StringBuilder(); char ch = read(); if (Character.isJavaIdentifierStart(ch) && !isEOF) { sb.append(ch); ch = read(); while (Character.isJavaIdentifierPart(ch) && !isEOF) { sb.append(ch); ch = read(); } } unread(); // log.info("Read text: ["+sb+"]"); return sb.toString().intern(); }
/** * Reads characters until {@link #isWhiteSpace(char) isWhiteSpace(ch)}or * {@link #isPunct(char) isPunct(ch)} or {@link #isEOF()}. You may need * to override the definition of {@link #isPunct(char) isPunct(ch)} to * get this to work right. */ protected String readName() { readWhiteSpace(); StringBuilder sb = new StringBuilder(); char ch = read(); while (!isWhiteSpace(ch) && !isPunct(ch) && !isEOF) { sb.append(ch); ch = read(); } unread(); // log.info("Read text: ["+sb+"]"); return sb.toString().intern(); }
protected void readLeftParen() { // System.out.println("Read left."); readWhiteSpace(); char ch = read(); if (!isLeftParen(ch)) throw new ParserException("Expected left paren!"); }
protected void readRightParen() { // System.out.println("Read right."); readWhiteSpace(); char ch = read(); if (!isRightParen(ch)) throw new ParserException("Expected right paren!"); }
protected void readDot() { readWhiteSpace(); if (isDot(peek())) read(); }
protected String readJavaIdentifier() { readWhiteSpace(); StringBuilder sb = new StringBuilder(); char ch = read(); if (Character.isJavaIdentifierStart(ch) && !isEOF) { sb.append(ch); ch = read(); while (Character.isJavaIdentifierPart(ch) && !isEOF) { sb.append(ch); ch = read(); } } unread(); // log.info("Read text: ["+sb+"]"); return sb.toString().intern(); }
protected String readJavaIdentifier() { readWhiteSpace(); StringBuilder sb = new StringBuilder(); char ch = read(); if (Character.isJavaIdentifierStart(ch) && !isEOF) { sb.append(ch); ch = read(); while (Character.isJavaIdentifierPart(ch) && !isEOF) { sb.append(ch); ch = read(); } } unread(); // System.err.println("Read text: ["+sb+"]"); return sb.toString().intern(); }
protected String readJavaIdentifier() { readWhiteSpace(); StringBuilder sb = new StringBuilder(); char ch = read(); if (Character.isJavaIdentifierStart(ch) && !isEOF) { sb.append(ch); ch = read(); while (Character.isJavaIdentifierPart(ch) && !isEOF) { sb.append(ch); ch = read(); } } unread(); // log.info("Read text: ["+sb+"]"); return sb.toString().intern(); }
protected void readLeftParen() { // System.out.println("Read left."); readWhiteSpace(); char ch = read(); if (!isLeftParen(ch)) throw new ParserException("Expected left paren!"); }
protected void readLeftParen() { // System.out.println("Read left."); readWhiteSpace(); char ch = read(); if (!isLeftParen(ch)) throw new ParserException("Expected left paren!"); }
protected void readDot() { readWhiteSpace(); if (isDot(peek())) read(); }
protected void readRightParen() { // System.out.println("Read right."); readWhiteSpace(); char ch = read(); if (!isRightParen(ch)) throw new ParserException("Expected right paren!"); }
protected void readRightParen() { // System.out.println("Read right."); readWhiteSpace(); char ch = read(); if (!isRightParen(ch)) throw new ParserException("Expected right paren!"); }
protected void readRightParen() { // System.out.println("Read right."); readWhiteSpace(); char ch = read(); if (!isRightParen(ch)) throw new ParserException("Expected right paren!"); }
protected void readLeftParen() { // System.out.println("Read left."); readWhiteSpace(); char ch = read(); if (!isLeftParen(ch)) throw new ParserException("Expected left paren!"); }
protected void readLeftParen() { // System.out.println("Read left."); readWhiteSpace(); char ch = read(); if (!isLeftParen(ch)) throw new ParserException("Expected left paren!"); }
protected void readRightParen() { // System.out.println("Read right."); readWhiteSpace(); char ch = read(); if (!isRightParen(ch)) throw new ParserException("Expected right paren!"); }
protected void readDot() { readWhiteSpace(); if (isDot(peek())) read(); }
protected void readDot() { readWhiteSpace(); if (isDot(peek())) read(); }
protected void readDot() { readWhiteSpace(); if (isDot(peek())) read(); }