Package com.github.maven_nar.cpptasks.parser

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


   * @throws IOException test fails on IOException
   */
  public void testIncompleteImmediateIncludeBracket() throws IOException {
    CharArrayReader reader = new CharArrayReader("#include <foo.h   "
                                                 .toCharArray());
    CParser parser = new CParser();
    parser.parse(reader);
    String[] includes = parser.getIncludes();
    assertEquals(includes.length, 0);
  }
View Full Code Here


   * @throws IOException test fails on IOException
   */
  public void testIncompleteImmediateIncludeQuote() throws IOException {
    CharArrayReader reader = new CharArrayReader("#include     \"foo.h    "
                                                 .toCharArray());
    CParser parser = new CParser();
    parser.parse(reader);
    String[] includes = parser.getIncludes();
    assertEquals(includes.length, 0);
  }
View Full Code Here

   * @throws IOException test fails on IOException
   */
  public void testNoQuoteOrBracket() throws IOException {
    CharArrayReader reader = new CharArrayReader("#include foo.h  "
                                                 .toCharArray());
    CParser parser = new CParser();
    parser.parse(reader);
    String[] includes = parser.getIncludes();
    assertEquals(includes.length, 0);
  }
View Full Code Here

   * @throws IOException test fails on IOException
   */
  public void testNotFirstWhitespace() throws IOException {
    CharArrayReader reader = new CharArrayReader("//#include \"foo.h\""
                                                 .toCharArray());
    CParser parser = new CParser();
    parser.parse(reader);
    String[] includes = parser.getIncludes();
    assertEquals(includes.length, 0);
  }
View Full Code Here

   * @throws IOException test fails on IOException.
   */
  public void testLeadingSpace() throws IOException {
    CharArrayReader reader = new CharArrayReader(
        " #include     \"foo.h\"   ".toCharArray());
    CParser parser = new CParser();
    parser.parse(reader);
    String[] includes = parser.getIncludes();
    assertEquals(includes.length, 1);
    assertEquals("foo.h", includes[0]);
  }
View Full Code Here

   * @throws IOException test fails on IOException.
   */
  public void testLeadingTab() throws IOException {
    CharArrayReader reader = new CharArrayReader(
        "\t#include     \"foo.h\"   ".toCharArray());
    CParser parser = new CParser();
    parser.parse(reader);
    String[] includes = parser.getIncludes();
    assertEquals(includes.length, 1);
    assertEquals("foo.h", includes[0]);
  }
View Full Code Here

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

        com.github.maven_nar.cpptasks.TargetDef targetPlatform,
        VersionInfo versionInfo) {
            return null;
        }
        public Parser createParser(File file) {
            return new CParser();
        }
View Full Code Here

                if (afterDot == 'f' || afterDot == 'F') {
                    return new FortranParser();
                }
            }
        }
        return new CParser();
    }
View Full Code Here

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

TOP

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

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.