Package org.codehaus.mojo.natives.parser
Class FortranParser
java.lang.Object
org.codehaus.mojo.natives.parser.AbstractParser
org.codehaus.mojo.natives.parser.FortranParser
- All Implemented Interfaces:
Parser
A parser that extracts INCLUDE statements from a Reader.
-
Field Summary
FieldsModifier and TypeFieldDescriptionList of included filenames.private final AbstractParserState
State that starts consuming content at the beginning of a line. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFilename
(String include) Called by FilenameState at completion of file name production.String[]
Gets collection of include file names encountered in parse.Get the state for the beginning of a new line.void
Collects all included files from the content of the reader.
-
Field Details
-
includes
List of included filenames. -
newLineState
State that starts consuming content at the beginning of a line.
-
-
Constructor Details
-
FortranParser
public FortranParser()Default constructor.
-
-
Method Details
-
addFilename
Called by FilenameState at completion of file name production.- Specified by:
addFilename
in classAbstractParser
- Parameters:
include
- include file name
-
getIncludes
Gets collection of include file names encountered in parse.- Specified by:
getIncludes
in interfaceParser
- Returns:
- include file names
-
getNewLineState
Get the state for the beginning of a new line.- Specified by:
getNewLineState
in classAbstractParser
- Returns:
- start of line state
-
parse
Collects all included files from the content of the reader.- Specified by:
parse
in interfaceParser
- Overrides:
parse
in classAbstractParser
- Parameters:
reader
- character reader containing a FORTRAN source module- Throws:
IOException
- throw if I/O error during parse
-