Open AntoineGautier opened 3 months ago
@JayHuLBL Can you look into that?
This issue is probably related to the parentheses that are used around logical expressions (not
, or
, and
, etc.).
See the attached expression.json that results from parsing the following declarations.
parameter Integer notexp = if not a < b then 1 else 2;
parameter Integer andnotexp = if a < b and not a < b then 1 else 2;
parameter Integer notexppar = if not (a < b) then 1 else 2;
parameter Integer andnotexppar = if (a < b) and not (a < b) then 1 else 2;
When translating Modelica to JSON using commit 648b390, some expressions are not properly parsed and the original expressions are lost. For example, translating
Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/Controller.mo
, we get:whereas the original declaration is:
Another example: with
Buildings/Controls/OBC/ASHRAE/G36/AHUs/SingleZone/VAV/Controller.mo
, we get:whereas the original declaration is: