Examples of CodeAnalyser


Examples of org.openquark.cal.compiler.CodeAnalyser

     */
    public GemGraphGenerator (BasicCALServices calServices, MonitorJobDescription jobDescription) {
        this.calServices = calServices;
        this.jobDescription = jobDescription;
       
        codeAnalyser =new CodeAnalyser(
            calServices.getTypeChecker(),
            calServices.getCALWorkspace().getMetaModule(MonitorApp.TARGET_MODULE).getTypeInfo(),
            true,
            false);
    }
View Full Code Here

Examples of org.openquark.cal.compiler.CodeAnalyser

        synchronized (this.workspaceManager) {
           
            // Qualify unqualified symbols in code, if unambiguous
            CompilerMessageLogger logger = new MessageLogger();
            CodeAnalyser analyser = new CodeAnalyser(getTypeChecker(), getWorkspaceManager().getModuleTypeInfo(targetModule), false, false);
            CodeAnalyser.QualificationResults qualificationResults = analyser.qualifyExpression(expressionText, null, null, logger, true);
            if (qualificationResults == null){
                iceLogger.log(Level.INFO, "Attempt to qualify expression has failed because of errors: ");
                dumpCompilerMessages(logger);
                return;
            }
View Full Code Here

Examples of org.openquark.cal.compiler.CodeAnalyser

    }
   
    private QualifiedName qualifyExpression(String nameAsText) {
        // Qualify unqualified symbols in code, if unambiguous
        CompilerMessageLogger logger = new MessageLogger();
        CodeAnalyser analyser = new CodeAnalyser(getTypeChecker(), getWorkspaceManager().getModuleTypeInfo(targetModule), false, false);
        CodeAnalyser.QualificationResults qualificationResults = analyser.qualifyExpression(nameAsText, null, null, logger, true);
        if (qualificationResults == null){
            iceLogger.log(Level.INFO, "Attempt to qualify expression has failed because of errors: ");
            dumpCompilerMessages(logger);
            return null;
        }
View Full Code Here

Examples of org.openquark.cal.compiler.CodeAnalyser

    }
   
    private QualifiedName qualifyType(String typeAsText) {
        // Qualify unqualified symbols in code, if unambiguous
        CompilerMessageLogger logger = new MessageLogger();
        CodeAnalyser analyser = new CodeAnalyser(getTypeChecker(), getWorkspaceManager().getModuleTypeInfo(targetModule), false, false);
        CodeAnalyser.QualificationResults qualificationResults = analyser.qualifyExpression(CAL_Prelude.Functions.undefined.getQualifiedName() + "::" + typeAsText, null, null, logger, true);
        if (qualificationResults == null){
            iceLogger.log(Level.INFO, "Attempt to qualify expression has failed because of errors: ");
            dumpCompilerMessages(logger);
            return null;
        }
View Full Code Here

Examples of org.openquark.cal.compiler.CodeAnalyser

    }
   
    protected String qualifyCodeExpression (String expressionText) {
        // Qualify unqualified symbols in code, if unambiguous
        CompilerMessageLogger logger = new MessageLogger();
        CodeAnalyser analyser = new CodeAnalyser(getTypeChecker(), getWorkspaceManager().getModuleTypeInfo(targetModule), false, false);
        CodeAnalyser.QualificationResults qualificationResults = analyser.qualifyExpression(expressionText, null, null, logger, true);
        if (qualificationResults == null){
            outputStream.println("Attempt to qualify expression has failed because of errors: ");
            dumpCompilerMessages(logger);
            return null;
        }
View Full Code Here

Examples of org.openquark.cal.compiler.CodeAnalyser

     * @return the qualified code expression, if qualification was performed successfully.  Null if qualification failed.
     */
    public String qualifyCodeExpression(ModuleName moduleName, String expressionText) {
        // Qualify unqualified symbols in code, if unambiguous
        CompilerMessageLogger logger = new MessageLogger();
        CodeAnalyser analyser = new CodeAnalyser(getProgramModelManager().getTypeChecker(), getProgramModelManager().getModuleTypeInfo(moduleName), false, false);
        CodeAnalyser.QualificationResults qualificationResults = analyser.qualifyExpression(expressionText, null, null, logger, true);
       
        if (qualificationResults == null) {
            calLogger.severe("Attempt to qualify expression has failed because of errors: ");
            for (final CompilerMessage message : logger.getCompilerMessages()) {
                calLogger.info("  " + message.toString());
View Full Code Here

Examples of org.openquark.cal.compiler.CodeAnalyser

     * @param code
     *            the source code for the gem.
     * @return the code gem.
     */
    private static CodeGem createCodeGem(String code) {
        CodeAnalyser codeAnalyser = new CodeAnalyser(
            calServices.getTypeChecker(),
            calServices.getCALWorkspace().getMetaModule(testModule).getTypeInfo(),
            true,
            false);

View Full Code Here

Examples of org.openquark.cal.compiler.CodeAnalyser

   
    /**
     * Tests getAutoburnInfo() with a two-argument gem where both of the arguments are unburnt.
     */
    public void testAutoburnDualArgGemBothArgsUnburnt() {
        CodeAnalyser codeAnalyser = new CodeAnalyser(calServices.getTypeChecker(),
                                                     calServices.getCALWorkspace().getMetaModule(testModule).getTypeInfo(),
                                                     true,
                                                     false);
       
        // Create the source gem       
View Full Code Here

Examples of org.openquark.cal.compiler.CodeAnalyser

    /**
     * Tests getAutoburnInfo() with a two-argument gem where the first argument is pre-burnt.
     */
    public void testAutoburnDualArgGemFirstArgBurnt() {
        CodeAnalyser codeAnalyser = new CodeAnalyser(calServices.getTypeChecker(),
                                                     calServices.getCALWorkspace().getMetaModule(testModule).getTypeInfo(),
                                                     true,
                                                     false);
       
        GemGraph gemGraph = new GemGraph();
View Full Code Here

Examples of org.openquark.cal.compiler.CodeAnalyser

    /**
     * Tests getAutoburnInfo() with a two-argument gem where the second argument is pre-burnt.
     */
    public void testAutoburnDualArgGemSecondArgBurnt() {
        CodeAnalyser codeAnalyser = new CodeAnalyser(calServices.getTypeChecker(),
                                                     calServices.getCALWorkspace().getMetaModule(testModule).getTypeInfo(),
                                                     true,
                                                     false);
       
        GemGraph gemGraph = new GemGraph();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.