Class 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 Detail

      • FortranParser

        public FortranParser()
        Default constructor.
    • Method Detail

      • addFilename

        public void addFilename​(String include)
        Called by FilenameState at completion of file name production.
        Specified by:
        addFilename in class AbstractParser
        Parameters:
        include - include file name
      • getIncludes

        public String[] getIncludes()
        Gets collection of include file names encountered in parse.
        Specified by:
        getIncludes in interface Parser
        Returns:
        include file names
      • parse

        public void parse​(Reader reader)
                   throws 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:
        IOException - throw if I/O error during parse