Package com.github.maven_nar.cpptasks.parser

Examples of com.github.maven_nar.cpptasks.parser.FortranParser


            Environment env) {
        super(command, identifierArg, sourceExtensions, headerExtensions,
                outputSuffix, libtool, libtoolCompiler, newEnvironment, env);
    }
    protected Parser createParser(File source) {
        return new FortranParser();
    }
View Full Code Here


   * Create dependency parser.
   * @param source File source file
   * @return Parser parser
   */
  public Parser createParser(final File source) {
    return new FortranParser();
  }
View Full Code Here

   * @throws IOException test fails on IOException
   */
  public void testINCLUDE() throws IOException {
    CharArrayReader reader = new CharArrayReader(
        "INCLUDE 'foo.inc' nowhatever  ".toCharArray());
    FortranParser parser = new FortranParser();
    parser.parse(reader);
    String[] includes = parser.getIncludes();
    assertEquals(includes.length, 1);
    assertEquals("foo.inc", includes[0]);
  }
View Full Code Here

   * @throws IOException test fails on IOException
   */
  public void testInClUdE() throws IOException {
    CharArrayReader reader = new CharArrayReader("InClUdE 'foo.inc'  "
                                                 .toCharArray());
    FortranParser parser = new FortranParser();
    parser.parse(reader);
    String[] includes = parser.getIncludes();
    assertEquals(includes.length, 1);
    assertEquals("foo.inc", includes[0]);
  }
View Full Code Here

   */
  public void testMultipleInClUdE() throws IOException {
    CharArrayReader reader = new CharArrayReader(
        "InClUdE 'foo.inc'\ninclude 'bar.inc'  "
        .toCharArray());
    FortranParser parser = new FortranParser();
    parser.parse(reader);
    String[] includes = parser.getIncludes();
    assertEquals(includes.length, 2);
    assertEquals("foo.inc", includes[0]);
    assertEquals("bar.inc", includes[1]);
  }
View Full Code Here

            String sourceName = source.getName();
            int lastDot = sourceName.lastIndexOf('.');
            if (lastDot >= 0 && lastDot + 1 < sourceName.length()) {
                char afterDot = sourceName.charAt(lastDot + 1);
                if (afterDot == 'f' || afterDot == 'F') {
                    return new FortranParser();
                }
            }
        }
        return new CParser();
    }
View Full Code Here

            String sourceName = source.getName();
            int lastDot = sourceName.lastIndexOf('.');
            if (lastDot >= 0 && lastDot + 1 < sourceName.length()) {
                char afterDot = sourceName.charAt(lastDot + 1);
                if (afterDot == 'f' || afterDot == 'F') {
                    return new FortranParser();
                }
            }
        }
        return new CParser();
    }
View Full Code Here

            String sourceName = source.getName();
            int lastDot = sourceName.lastIndexOf('.');
            if (lastDot >= 0 && lastDot + 1 < sourceName.length()) {
                char afterDot = sourceName.charAt(lastDot + 1);
                if (afterDot == 'f' || afterDot == 'F') {
                    return new FortranParser();
                }
            }
        }
        return new CParser();
    }
View Full Code Here

   * @throws IOException test fails on IOException
   */
  public void testINCLUDE() throws IOException {
    CharArrayReader reader = new CharArrayReader(
        "INCLUDE 'foo.inc' nowhatever  ".toCharArray());
    FortranParser parser = new FortranParser();
    parser.parse(reader);
    String[] includes = parser.getIncludes();
    assertEquals(includes.length, 1);
    assertEquals("foo.inc", includes[0]);
  }
View Full Code Here

   * @throws IOException test fails on IOException
   */
  public void testInClUdE() throws IOException {
    CharArrayReader reader = new CharArrayReader("InClUdE 'foo.inc'  "
                                                 .toCharArray());
    FortranParser parser = new FortranParser();
    parser.parse(reader);
    String[] includes = parser.getIncludes();
    assertEquals(includes.length, 1);
    assertEquals("foo.inc", includes[0]);
  }
View Full Code Here

TOP

Related Classes of com.github.maven_nar.cpptasks.parser.FortranParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.