@SuppressWarnings("checkstyle:npathcomplexity")
	protected AbstractMarkerLanguageParser createLanguageParser(File inputFile) throws MojoExecutionException, IOException {
		final AbstractMarkerLanguageParser parser;
		if (isFileExtension(inputFile, MarkdownParser.MARKDOWN_FILE_EXTENSIONS)) {
			parser = this.injector.getInstance(MarkdownParser.class);
		} else {
			throw new MojoExecutionException(MessageFormat.format(Messages.AbstractDocumentationMojo_3, inputFile));
		}
		parser.setGithubExtensionEnable(this.githubExtension);

		final SarlDocumentationParser internalParser = parser.getDocumentParser();

		if (this.isLineContinuationEnable) {
			internalParser.setLineContinuation(SarlDocumentationParser.DEFAULT_LINE_CONTINUATION);
		} else {
			internalParser.addLowPropertyProvider(createProjectProperties());
		}

		final ScriptExecutor scriptExecutor = internalParser.getScriptExecutor();
		final StringBuilder cp = new StringBuilder();
		for (final File cpElement : getClassPath()) {
			if (cp.length() > 0) {
				cp.append(":"); //$NON-NLS-1$
			}
			cp.append(cpElement.getAbsolutePath());
		}
		scriptExecutor.setClassPath(cp.toString());
		final String bootPath = getBootClassPath();
		if (!Strings.isEmpty(bootPath)) {
			scriptExecutor.setBootClassPath(bootPath);
		}
		JavaVersion version = null;
		if (!Strings.isEmpty(this.source)) {
			version = JavaVersion.fromQualifier(this.source);
		}
		if (version == null) {
			version = JavaVersion.JAVA8;
		}
		scriptExecutor.setJavaSourceVersion(version.getQualifier());
		scriptExecutor.setTempFolder(this.tempDirectory.getAbsoluteFile());

		internalParser.addLowPropertyProvider(createProjectProperties());
		internalParser.addLowPropertyProvider(this.session.getCurrentProject().getProperties());
		internalParser.addLowPropertyProvider(this.session.getUserProperties());
		internalParser.addLowPropertyProvider(this.session.getSystemProperties());
		internalParser.addLowPropertyProvider(createGeneratorProperties());
		final Properties defaultValues = createDefaultValueProperties();
		if (defaultValues != null) {
			internalParser.addLowPropertyProvider(defaultValues);
		}
		return parser;
	}
@ SuppressWarnings ( "checkstyle:npathcomplexity" ) protected AbstractMarkerLanguageParser createLanguageParser ( File inputFile ) throws MojoExecutionException , IOException { final AbstractMarkerLanguageParser parser ; if ( isFileExtension ( inputFile , MarkdownParser . MARKDOWN_FILE_EXTENSIONS ) ) { parser = this . injector . getInstance ( MarkdownParser . class ) ; } else { throw new MojoExecutionException ( MessageFormat . format ( Messages . AbstractDocumentationMojo_3 , inputFile ) ) ; } parser . setGithubExtensionEnable ( this . githubExtension ) ; final SarlDocumentationParser internalParser = parser . getDocumentParser ( ) ; if ( this . isLineContinuationEnable ) { internalParser . setLineContinuation ( SarlDocumentationParser . DEFAULT_LINE_CONTINUATION ) ; } else { internalParser . addLowPropertyProvider ( createProjectProperties ( ) ) ; } final ScriptExecutor scriptExecutor = internalParser . getScriptExecutor ( ) ; final StringBuilder cp = new StringBuilder ( ) ; for ( final File cpElement : getClassPath ( ) ) { if ( cp . length ( ) > 0 ) { cp . append ( ":" ) ; } cp . append ( cpElement . getAbsolutePath ( ) ) ; } scriptExecutor . setClassPath ( cp . toString ( ) ) ; final String bootPath = getBootClassPath ( ) ; if ( ! Strings . isEmpty ( bootPath ) ) { scriptExecutor . setBootClassPath ( bootPath ) ; } JavaVersion version = null ; if ( ! Strings . isEmpty ( this . source ) ) { version = JavaVersion . fromQualifier ( this . source ) ; } if ( version == null ) { version = JavaVersion . JAVA8 ; } scriptExecutor . setJavaSourceVersion ( version . getQualifier ( ) ) ; scriptExecutor . setTempFolder ( this . tempDirectory . getAbsoluteFile ( ) ) ; internalParser . addLowPropertyProvider ( createProjectProperties ( ) ) ; internalParser . addLowPropertyProvider ( this . session . getCurrentProject ( ) . getProperties ( ) ) ; internalParser . addLowPropertyProvider ( this . session . getUserProperties ( ) ) ; internalParser . addLowPropertyProvider ( this . session . getSystemProperties ( ) ) ; internalParser . addLowPropertyProvider ( createGeneratorProperties ( ) ) ; final Properties defaultValues = createDefaultValueProperties ( ) ; if ( defaultValues != null ) { internalParser . addLowPropertyProvider ( defaultValues ) ; } return parser ; }
Create a parser for the given file.

@param inputFile the file to be parsed.
@return the parser.
@throws MojoExecutionException if the parser cannot be created.
@throws IOException if a classpath entry cannot be found.