private ModuleNode eatModule() {
		Token label = null;
		Token name = nextToken();
		if (!name.isKind(TokenKind.IDENTIFIER)) {
			raiseException(name.startpos, XDDSLMessages.EXPECTED_MODULENAME, name.data != null ? name.data
					: new String(name.getKind().tokenChars));
		}
		if (peekToken(TokenKind.COLON)) {
			if (!isNextTokenAdjacent()) {
				raiseException(peekToken().startpos, XDDSLMessages.NO_WHITESPACE_BETWEEN_LABEL_NAME_AND_COLON);
			}
			nextToken(); // swallow colon
			label = name;
			name = eatToken(TokenKind.IDENTIFIER);
		}
		Token moduleName = name;
		checkpoint();
		ArgumentNode[] args = maybeEatModuleArgs();
		int startpos = label != null ? label.startpos : moduleName.startpos;
		return new ModuleNode(toLabelNode(label), moduleName.data, startpos, moduleName.endpos, args);
	}
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