public JobSpecification parse(String jobSpecification) {
		jobSpecification = jobSpecification.trim();
		if (jobSpecification.length() == 0) {
			return new JobSpecification(jobSpecification, null, null);
		}
		tokens = new Tokens(jobSpecification);
		JobNode jobNode = parseJobNode();
		ArgumentNode[] globalOptions = maybeEatModuleArgs();
		JobSpecification js = new JobSpecification(jobSpecification, jobNode, globalOptions);
		if (tokens.hasNext()) {
			throw new JobSpecificationException(tokens.getExpression(), tokens.peek().startpos,
					JobDSLMessage.UNEXPECTED_DATA_AFTER_JOBSPEC,
					toString(tokens.next()));
		}
		return js;
	}
Parse a job flow definition into an abstract syntax tree (AST).

@param jobSpecification the textual job specification
@return the AST for the parsed job
@throws JobSpecificationException if any problems occur during parsing
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/job/dsl/JobParser.java