Changeset 13260


Ignore:
Timestamp:
Jul 29, 2019 9:57:48 AM (5 months ago)
Author:
joqvist
Message:

#5811 Upgrade JastAdd to version 2.3.4

Location:
trunk
Files:
1 deleted
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/Compiler/ModelicaFlatTree/src/jastadd/Sizes.jrag

    r12903 r13260  
    265265
    266266aspect FunctionCallSizes {
    267    
     267
    268268    public abstract Size FType.getSize();
    269     public abstract void FType.setSize(Size size);
    270    
     269    public abstract FType FType.setSize(Size size);
     270
    271271    @Override
    272272    public Size FArrayType.getSize() {
     
    278278    }
    279279    @Override
    280     public void FArrayType.setSize(Size size) {throw new InternalCompilerError("FArrayType does not support setSize()");}
    281    
     280    public FArrayType FArrayType.setSize(Size size) {throw new InternalCompilerError("FArrayType does not support setSize()");}
     281
    282282    syn Size FAbstractFunctionCall.sizeOfOutput(int i) = (i == 0) ? size() : Size.SCALAR;
    283283    eq CommonFunctionCall.sizeOfOutput(int i)          = typeOfOutput(i).size();
     
    683683        }
    684684    }
    685    
     685
    686686}
  • trunk/Compiler/ModelicaFrontEnd/src/jastadd/util/Annotations.jrag

    r13009 r13260  
    18331833
    18341834    public class FAttributeListAnnotationNode extends AnnotationNode {
    1835        
     1835
    18361836        public interface FAttributeList {
    1837             public void addFAttribute(FAttribute attribute);
     1837            public FAttributeList addFAttribute(FAttribute attribute);
    18381838            public List<FAttribute> getFAttributeList();
    18391839            public int getNumFAttribute();
  • trunk/Compiler/ModelicaFrontEnd/src/jastadd/util/SrcAnnotations.jrag

    r13009 r13260  
    444444        public SrcAnnotation getSrcAnnotation();
    445445        public boolean hasSrcAnnotation();
    446         public void setSrcAnnotation(SrcAnnotation annotation);
     446        public ASTNodeWithAnnotation setSrcAnnotation(SrcAnnotation annotation);
    447447    }
    448448
  • trunk/Compiler/ModelicaFrontEnd/src/java/org/jmodelica/util/GeneratedFilePatcher.java

    r12940 r13260  
    2929    private Patch[] patches = new Patch[] {
    3030        new Patch("ASTNode.java", new Change[] {
    31             new AddLine("    SymbolValueFixer.fix(node);", true, "\\s*public [^ ]* clone().*", "\\s*return .*;")
     31            new AddLine("    SymbolValueFixer.fix(node);", true, "\\s*public [^ ]* clone().*", "\\s*return .*;"),
     32            new AddLine("import org.jmodelica.util.SymbolValueFixer;", false, "package .*;")
    3233        })
    3334    };
  • trunk/Compiler/ModelicaMiddleEnd/src/jastadd/transformations/GenerateEventIndicators.jrag

    r13252 r13260  
    468468    public interface EventGeneratingExp {
    469469        boolean hasIndicator();
    470         void addIndicator(FAccessExp indicator);
     470        EventGeneratingExp addIndicator(FAccessExp indicator);
    471471    }
    472472    FRelExp implements EventGeneratingExp;
     
    791791    }
    792792
    793     public void FRelExp.addIndicator(FAccessExp indicator) {
     793    public FRelExp FRelExp.addIndicator(FAccessExp indicator) {
    794794        setIndicator(indicator);
    795     }
    796 
    797     public void FSpatialDistExp.addIndicator(FAccessExp indicator) {
     795        return this;
     796    }
     797
     798    public FSpatialDistExp FSpatialDistExp.addIndicator(FAccessExp indicator) {
    798799        setIndicator(indicator);
     800        return this;
    799801    }
    800802
  • trunk/Compiler/build-base.xml

    r13223 r13260  
    5959    <property name="jar_output" value="${target}/bin" />
    6060
    61     <property name="jastadd_dir" value="${base.dir}/../ThirdParty/JastAdd" />
     61    <property name="jastadd_jar" value="${base.dir}/../ThirdParty/JastAdd/jastadd-2.3.4.jar" />
     62    <property name="jastaddparser_jar" value="${base.dir}/../ThirdParty/JastAdd/JastAddParser.jar" />
    6263    <property name="junit_dir" value="${base.dir}/../ThirdParty/Junit" />
    6364    <property name="junit_jar" value="${junit_dir}/junit-4.10.jar" />
     
    686687                <mkdir dir="${java_output_intermediate}" />
    687688                <!-- run jastadd to generate AST files -->
    688                 <java classname="org.jastadd.JastAdd" classpath="${jastadd_dir}/jastadd2.jar" failonerror="true">
     689                <java classname="org.jastadd.JastAdd" classpath="${jastadd_jar}" failonerror="true">
    689690                    <arg value="--package=${ast_package}" />
    690691                    <arg value="--o=${java_output_intermediate}" />
     
    697698                    <arg value="--indent=4space" />
    698699                    <arg value="--inhEqCheck=false" />
     700                    <arg value="--optimize-imports" />
    699701                    <arg line="${jastadd_files}" />
    700702                </java>
     
    929931                                        </replace>
    930932                                        <!-- translate to beaver syntax -->
    931                                         <java classpath="${jastadd_dir}/JastAddParser.jar:${beaver-rt_jar}" classname="Main">
     933                                        <java classpath="${jastaddparser_jar}:${beaver-rt_jar}" classname="Main">
    932934                                            <arg value="${parsers.builddir}/@{parser}.parser"/>
    933935                                            <arg value="${parsers.builddir}/@{parser}.raw.beaver"/>
Note: See TracChangeset for help on using the changeset viewer.