lenaRB / crml-compiler

Implementation of the CRML to Modelica compiler supported by the ITEA3 EMBRACE project.
6 stars 7 forks source link

Use of keyword 'new' in CRML #14

Closed lenaRB closed 1 year ago

lenaRB commented 1 year ago

There is no keyword new in BooleanConstructors.crml It would make it more readable and easy to parse if conversions used "new", but we can discuss it of course.

audrey-jardin commented 1 year ago

You mean that a clearer syntax would be: ... Boolean b4 is undefined; Clock c1 is external; Boolean b5 is new Boolean c1; ... No problem for adding the "new" keyword (in fact, we had this option for the previous forml compiler). Another possibility would have been to choose keywords for the conversion operators that are different from the keywords used to define variable types. But I guess this would introduce too many keywords: is that correct?

audrey-jardin commented 1 year ago

Pull request #16 should fix the issue (addition of the "new" keyword in the CRML examples).