org.codehaus.mojo.jflex

Class JFlexMojo

public class JFlexMojo extends AbstractMojo

Generates lexical scanners from one or more JFlex grammer files.

Author: Régis Décamps (decamps@users.sf.net)

UNKNOWN: generate generate-sources

Field Summary
static StringSRC_MAIN_JFLEX
Name of the directory where to look for jflex files by default.
Method Summary
voidexecute()
Generate java parsers from lexer definition files.
protected FilegetAbsolutePath(File path)
Converts the specified path argument into an absolute path.

Field Detail

SRC_MAIN_JFLEX

public static final String SRC_MAIN_JFLEX
Name of the directory where to look for jflex files by default.

Method Detail

execute

public void execute()
Generate java parsers from lexer definition files. This methods is checks parameters, sets options and calls JFlex.Main.generate()

getAbsolutePath

protected File getAbsolutePath(File path)
Converts the specified path argument into an absolute path. If the path is relative like "src/main/jflex", it is resolved against the base directory of the project (in constrast, File.getAbsoluteFile() would resolve against the current directory which may be different, especially during a reactor build).

Parameters: path The path argument to convert, may be {@code null}.

Returns: The absolute path corresponding to the input argument.

Copyright © 2007-2010. All Rights Reserved.