Package com.github.maven_nar.cpptasks.parser

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


    /**
     * The include parser for C will work just fine, but we didn't want to
     * inherit from CommandLineCCompiler
     */
    protected Parser createParser(File source) {
        return new CParser();
    }
View Full Code Here


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

    /**
     * The include parser for C will work just fine, but we didn't want to
     * inherit from CommandLineCCompiler
     */
    protected Parser createParser(File source) {
        return new CParser();
    }
View Full Code Here

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

   * @throws IOException test fails on IOException
   */
  public void testImmediateImportBracket() throws IOException {
    CharArrayReader reader = new CharArrayReader(
        "#import <foo.h> nowhatever  ".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 testImmediateImportQuote() throws IOException {
    CharArrayReader reader = new CharArrayReader("#import \"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 testImmediateIncludeBracket() 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 testImmediateIncludeQuote() 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 testIncompleteImmediateImportBracket() throws IOException {
    CharArrayReader reader = new CharArrayReader("#import <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 testIncompleteImmediateImportQuote() throws IOException {
    CharArrayReader reader = new CharArrayReader("#import \"foo.h   "
                                                 .toCharArray());
    CParser parser = new CParser();
    parser.parse(reader);
    String[] includes = parser.getIncludes();
    assertEquals(includes.length, 0);
  }
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.