private boolean lookAhead(int distance, TokenKind desiredTokenKind) {
		if ((tokenStreamPointer + distance) >= tokenStream.size()) {
			return false;
		}
		Token t = tokenStream.get(tokenStreamPointer + distance);
		if (t.kind == desiredTokenKind) {
			return true;
		}
		return false;
	}
Parse a stream definition.

@return the AST for the parsed stream
@throws StreamDefinitionException
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/stream/dsl/StreamConfigParser.java