Skip to content

Commit

Permalink
- Susan parser with the new syntax, together with transformed SimCode…
Browse files Browse the repository at this point in the history
…C.tpl and SimCodeCSharp.tpl

- produced SimCodeC.mo and SimCodeCSharp.mo are the same as before
- the implementation is mostly on syntactical basis now, to be continued ...
- see susan_codegen/SusanGrammar.txt and all .tpl files for the details


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5536 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
pavolpr committed May 17, 2010
1 parent c72577a commit ebb2860
Show file tree
Hide file tree
Showing 9 changed files with 2,473 additions and 2,088 deletions.
12 changes: 7 additions & 5 deletions Compiler/TplAbsyn.mo
Expand Up @@ -1157,7 +1157,7 @@ algorithm
(fname, iargs, oargs, tyVars) = getFunSignature(fname, tplPackage);
//Debug.fprint("failtrace"," after fname = " +& pathIdentString(fname) +& "\n");

explst = addImplicitArgument(explst, iargs, oargs, tplPackage);
//explst = addImplicitArgument(explst, iargs, oargs, tplPackage);
(argvals, stmts, locals, scEnv, accMMDecls)
= statementsFromArgList(explst, stmts, locals, scEnv, tplPackage, accMMDecls);

Expand Down Expand Up @@ -1324,7 +1324,7 @@ algorithm
//Debug.fprint("failtrace"," after fname = " +& pathIdentString(fname) +& "\n");

{} = oargs;
explst = addImplicitArgument(explst, iargs, oargs, tplPackage);
//explst = addImplicitArgument(explst, iargs, oargs, tplPackage);
(argvals, stmts, locals, scEnv, accMMDecls)
= statementsFromArgList(explst, stmts, locals, scEnv, tplPackage, accMMDecls);

Expand Down Expand Up @@ -1607,7 +1607,7 @@ algorithm
end matchcontinue;
end pushPopBlock;


/*
public function addImplicitArgument
input list<Expression> inArgLst;
input TypedIdents inInArgs;
Expand Down Expand Up @@ -1659,7 +1659,7 @@ algorithm
fail();
end matchcontinue;
end addImplicitArgument;

*/

public function statementsFromArg
input Expression inExp;
Expand Down Expand Up @@ -1729,7 +1729,7 @@ algorithm
stmts, locals, scEnv, tplPackage, accMMDecls )
equation
(fname, iargs, oargs, tyVars) = getFunSignature(fname, tplPackage);
explst = addImplicitArgument(explst, iargs, oargs, tplPackage);
//explst = addImplicitArgument(explst, iargs, oargs, tplPackage);
(argvals, stmts, locals, scEnv, accMMDecls)
= statementsFromArgList(explst, stmts, locals, scEnv, tplPackage, accMMDecls);
outtxt = "txt_" +& intString(listLength(locals));
Expand Down Expand Up @@ -3335,6 +3335,7 @@ algorithm

//try if it is a record ident
//-> convert to RECORD_MATCH()
/*
case ( BIND_MATCH(bindIdent = bid), mtype, astDefs)
equation
NAMED_TYPE(typepath) = deAliasedType(mtype, astDefs);
Expand All @@ -3344,6 +3345,7 @@ algorithm
tagpath = makePathIdent(typepckg, bid);
then
(RECORD_MATCH(tagpath, {} ));
*/

//otherwise it is like REST_MATCH ... nothing to check
case ( mexp as BIND_MATCH(_), _, _)
Expand Down

0 comments on commit ebb2860

Please sign in to comment.