Package com.github.maven_nar.cpptasks.parser

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


            baseDirPath = baseDir.toString();
        }
        String relativeSource = CUtil.getRelativePath(baseDirPath, source);
        String[] includes = emptyIncludeArray;
        if (canParse(source)) {
            Parser parser = createParser(source);
            try {
                Reader reader = new BufferedReader(new FileReader(source));
                parser.parse(reader);
                includes = parser.getIncludes();
            } catch (IOException ex) {
                task.log("Error parsing " + source.toString() + ":"
                        + ex.toString());
                includes = new String[0];
            }
View Full Code Here


        GccCCompiler compiler = GccCCompiler.getInstance();
        assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
                .bid("foo.ii"));
    }
    public void testCreateCParser1() {
        Parser parser = GccCCompiler.getInstance().createParser(
                new File("foo.c"));
        assertTrue(parser instanceof CParser);
    }
View Full Code Here

        Parser parser = GccCCompiler.getInstance().createParser(
                new File("foo.c"));
        assertTrue(parser instanceof CParser);
    }
    public void testCreateCParser2() {
        Parser parser = GccCCompiler.getInstance().createParser(
                new File("foo."));
        assertTrue(parser instanceof CParser);
    }
View Full Code Here

        Parser parser = GccCCompiler.getInstance().createParser(
                new File("foo."));
        assertTrue(parser instanceof CParser);
    }
    public void testCreateCParser3() {
        Parser parser = GccCCompiler.getInstance()
                .createParser(new File("foo"));
        assertTrue(parser instanceof CParser);
    }
View Full Code Here

        Parser parser = GccCCompiler.getInstance()
                .createParser(new File("foo"));
        assertTrue(parser instanceof CParser);
    }
    public void testCreateFortranParser1() {
        Parser parser = GccCCompiler.getInstance().createParser(
                new File("foo.f"));
        assertTrue(parser instanceof FortranParser);
    }
View Full Code Here

        Parser parser = GccCCompiler.getInstance().createParser(
                new File("foo.f"));
        assertTrue(parser instanceof FortranParser);
    }
    public void testCreateFortranParser2() {
        Parser parser = GccCCompiler.getInstance().createParser(
                new File("foo.FoR"));
        assertTrue(parser instanceof FortranParser);
    }
View Full Code Here

        Parser parser = GccCCompiler.getInstance().createParser(
                new File("foo.FoR"));
        assertTrue(parser instanceof FortranParser);
    }
    public void testCreateFortranParser3() {
        Parser parser = GccCCompiler.getInstance().createParser(
                new File("foo.f90"));
        assertTrue(parser instanceof FortranParser);
    }
View Full Code Here

        //
        CommandLineCompilerConfiguration cmdLineConfig = (CommandLineCompilerConfiguration) config;
        //
        //   parse prototype file to determine last header
        //
        Parser parser = createParser(prototype);
        String[] includes;
        try {
            Reader reader = new BufferedReader(new FileReader(prototype));
            parser.parse(reader);
            includes = parser.getIncludes();
        } catch (IOException ex) {
            throw new BuildException(
                    "Error parsing precompiled header protoype: "
                            + prototype.toString() + ":" + ex.toString());
        }
View Full Code Here

        GccCCompiler compiler = GccCCompiler.getInstance();
        assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
                .bid("foo.ii"));
    }
    public void testCreateCParser1() {
        Parser parser = GccCCompiler.getInstance().createParser(
                new File("foo.c"));
        assertTrue(parser instanceof CParser);
    }
View Full Code Here

        //
        CommandLineCompilerConfiguration cmdLineConfig = (CommandLineCompilerConfiguration) config;
        //
        //   parse prototype file to determine last header
        //
        Parser parser = createParser(prototype);
        String[] includes;
        try {
            Reader reader = new BufferedReader(new FileReader(prototype));
            parser.parse(reader);
            includes = parser.getIncludes();
        } catch (IOException ex) {
            throw new BuildException(
                    "Error parsing precompiled header protoype: "
                            + prototype.toString() + ":" + ex.toString());
        }
View Full Code Here

TOP

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

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.