Ejemplo n.º 1
0
 // Read from stream a valid PMML token
 public String token() {
   int b = get();
   if (!Character.isJavaIdentifierStart(b))
     throw new ParseException("Expected token start but found '" + (char) b + "'");
   StringBuilder sb = new StringBuilder();
   sb.append((char) b);
   b = get();
   while (Character.isJavaIdentifierPart(b) || b == ':') {
     sb.append((char) b);
     b = get();
   }
   push(b);
   return sb.toString();
 }
Ejemplo n.º 2
0
 // Read from stream, skipping whitespace
 public PMMLParser skipWS() {
   int c;
   while (Character.isWhitespace(c = get())) ;
   push(c);
   return this;
 }