Skip to content

Commit

Permalink
Add Expression.compare for sorting expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund authored and OpenModelica-Hudson committed Jul 19, 2016
1 parent 295b0a4 commit 4877c8d
Show file tree
Hide file tree
Showing 3 changed files with 312 additions and 294 deletions.
8 changes: 8 additions & 0 deletions Compiler/FrontEnd/ComponentReference.mo
Expand Up @@ -785,6 +785,14 @@ algorithm
greaterThan := CompareWithGenericSubscript.compare(cr1,cr2) > 0;
end crefSortFunc;

public function crefCompareGeneric "A sorting function for crefs"
input DAE.ComponentRef cr1;
input DAE.ComponentRef cr2;
output Integer comp;
algorithm
comp := CompareWithGenericSubscript.compare(cr1,cr2);
end crefCompareGeneric;

public function crefLexicalGreaterSubsAtEnd
"mahge:
Compares two crefs lexically. Subscripts are treated as if they are
Expand Down

0 comments on commit 4877c8d

Please sign in to comment.