Package org.jakstab.ssl.parser

Examples of org.jakstab.ssl.parser.SSLPreprocessor


    File specFile = new File(Options.jakstabHome + "/ssl/simplifications.ssl");
    logger.info("Reading simplifications from " + specFile.getName() + ".");

    SSLLexer lex = new SSLLexer(new FileInputStream(specFile));
    SSLParser parser = new SSLParser(lex);
    SSLPreprocessor prep = new SSLPreprocessor();

    parser.start();
    prep.start(parser.getAST());

    Map<String,SSLFunction> instrPrototypes = prep.getInstructions();
    //registers = prep.getRegisters();
    //registers.removeAll(statusFlags);

    logger.debug("-- Got " + instrPrototypes.size() + " simplification groups.");
   
    Map<RTLExpression, RTLExpression> wholeMapping = new LinkedHashMap<RTLExpression, RTLExpression>();

    for (Map.Entry<String, SSLFunction> entry : instrPrototypes.entrySet()) {
      Map<RTLExpression, RTLExpression> mapping = prep.convertSimplificationTemplates(entry.getValue().getAST());
      wholeMapping.putAll(mapping);
    }
   
    patterns = wholeMapping.keySet().toArray(new RTLExpression[0]);
    results = wholeMapping.values().toArray(new RTLExpression[0]);
View Full Code Here

TOP

Related Classes of org.jakstab.ssl.parser.SSLPreprocessor

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.