net.sf.antcontrib.cpptasks.parser
Class FortranParser

java.lang.Object
  extended by net.sf.antcontrib.cpptasks.parser.AbstractParser
      extended by net.sf.antcontrib.cpptasks.parser.FortranParser
All Implemented Interfaces:
Parser

public final class FortranParser
extends AbstractParser
implements Parser

A parser that extracts INCLUDE statements from a Reader.

Author:
Curt Arnold

Constructor Summary
FortranParser()
          Default constructor.
 
Method Summary
 void addFilename(java.lang.String include)
          Called by FilenameState at completion of file name production.
 java.lang.String[] getIncludes()
          Gets collection of include file names encountered in parse.
 AbstractParserState getNewLineState()
          Get the state for the beginning of a new line.
 void parse(java.io.Reader reader)
          Collects all included files from the content of the reader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FortranParser

public FortranParser()
Default constructor.

Method Detail

addFilename

public void addFilename(java.lang.String include)
Called by FilenameState at completion of file name production.

Specified by:
addFilename in class AbstractParser
Parameters:
include - include file name

getIncludes

public java.lang.String[] getIncludes()
Gets collection of include file names encountered in parse.

Specified by:
getIncludes in interface Parser
Returns:
include file names

getNewLineState

public AbstractParserState getNewLineState()
Get the state for the beginning of a new line.

Specified by:
getNewLineState in class AbstractParser
Returns:
start of line state

parse

public void parse(java.io.Reader reader)
           throws java.io.IOException
Collects all included files from the content of the reader.

Specified by:
parse in interface Parser
Overrides:
parse in class AbstractParser
Parameters:
reader - character reader containing a FORTRAN source module
Throws:
java.io.IOException - throw if I/O error during parse


Copyright 2001-2008 Ant-Contrib Project. All Rights Reserved.