Package com.olabini.jescov.es3

Examples of com.olabini.jescov.es3.ES3InstrumentParser


    Integer fileId = mapper.map(code.getFilePath());
    String mappedName = String.valueOf(fileId);
    stream.name = mappedName;
    ES3InstrumentLexer lexer = new ES3InstrumentLexer(stream);
    TokenRewriteStream tokens = new TokenRewriteStream(lexer);
    ES3InstrumentParser parser = new ES3InstrumentParser(tokens);
    parser.setTemplateLib(templates);
    try {
      parser.program();
    } catch (Exception e) {
      throw new InstrumentationException(code.getFilePath(), e);
    }
    List<Integer> executableLines = parser.linesMap.get(mappedName);
    return new InstrumentedCode(fileId,
View Full Code Here


    public String instrument(String file, String source) {
        StringTemplateGroup templates = new StringTemplateGroup(new CharArrayReader(TEMPLATE));
        ANTLRStringStream stream = new ANTLRStringStream(source);
        stream.name = String.valueOf(mapper.map(file));
        ES3InstrumentLexer lexer = new ES3InstrumentLexer(stream);
        TokenRewriteStream tokens = new TokenRewriteStream(lexer);
        ES3InstrumentParser parser = new ES3InstrumentParser(tokens);
        parser.setTemplateLib(templates);

        try {
View Full Code Here

        StringTemplateGroup templates = new StringTemplateGroup(new CharArrayReader(TEMPLATE));
        ANTLRStringStream stream = new ANTLRStringStream(source);
        stream.name = String.valueOf(mapper.map(file));
        ES3InstrumentLexer lexer = new ES3InstrumentLexer(stream);
        TokenRewriteStream tokens = new TokenRewriteStream(lexer);
        ES3InstrumentParser parser = new ES3InstrumentParser(tokens);
        parser.setTemplateLib(templates);

        try {
            parser.program();
        } catch (RecognitionException e) {
            throw new RuntimeException(e);
        }

        return tokens.toString();
View Full Code Here

TOP

Related Classes of com.olabini.jescov.es3.ES3InstrumentParser

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.