diff options
Diffstat (limited to 'macros/ASTManagement')
-rw-r--r-- | macros/ASTManagement/%funcall_string.bin | bin | 1748 -> 2588 bytes | |||
-rw-r--r-- | macros/ASTManagement/%funcall_string.sci | 9 | ||||
-rw-r--r-- | macros/ASTManagement/AST2Ccode.bin | bin | 36896 -> 37928 bytes | |||
-rw-r--r-- | macros/ASTManagement/AST2Ccode.sci | 18 | ||||
-rw-r--r-- | macros/ASTManagement/AST_HandleCC.bin | bin | 10520 -> 10716 bytes | |||
-rw-r--r-- | macros/ASTManagement/AST_HandleCC.sci | 2 | ||||
-rw-r--r-- | macros/ASTManagement/AST_HandleEndGenFun.bin | bin | 100596 -> 100904 bytes | |||
-rw-r--r-- | macros/ASTManagement/AST_HandleEndGenFun.sci | 9 | ||||
-rw-r--r-- | macros/ASTManagement/AST_HandleFunCC.bin | bin | 22244 -> 24100 bytes | |||
-rw-r--r-- | macros/ASTManagement/AST_HandleFunCC.sci | 14 | ||||
-rw-r--r-- | macros/ASTManagement/AST_HandleFunRC.bin | bin | 22288 -> 22484 bytes | |||
-rw-r--r-- | macros/ASTManagement/AST_HandleFunRC.sci | 14 | ||||
-rw-r--r-- | macros/ASTManagement/AST_HandleRC.bin | bin | 9896 -> 10092 bytes | |||
-rw-r--r-- | macros/ASTManagement/AST_HandleRC.sci | 2 | ||||
-rw-r--r-- | macros/ASTManagement/_funcall_string.bin | bin | 1748 -> 2588 bytes | |||
-rw-r--r-- | macros/ASTManagement/_funcall_string.sci | 9 |
16 files changed, 69 insertions, 8 deletions
diff --git a/macros/ASTManagement/%funcall_string.bin b/macros/ASTManagement/%funcall_string.bin Binary files differindex 8354586..258933b 100644 --- a/macros/ASTManagement/%funcall_string.bin +++ b/macros/ASTManagement/%funcall_string.bin diff --git a/macros/ASTManagement/%funcall_string.sci b/macros/ASTManagement/%funcall_string.sci index faeb81d..0ee9701 100644 --- a/macros/ASTManagement/%funcall_string.sci +++ b/macros/ASTManagement/%funcall_string.sci @@ -6,10 +6,19 @@ function txt=%funcall_string(F) // name : string, the name of the function // lhsnb: number, the number of function lhs +if F.name <> 'disp' txt=['Funcall : '+F.name ' #lhs : '+string(F.lhsnb) ' Rhs : ' ' '+objectlist2string(F.rhs) 'EndFuncall' ] +else +txt=['Funcall : '+F.name + ' #lhs : '+'0' + ' Rhs : ' + ' '+objectlist2string(F.rhs) + 'EndFuncall' + ] +end endfunction diff --git a/macros/ASTManagement/AST2Ccode.bin b/macros/ASTManagement/AST2Ccode.bin Binary files differindex c663519..337baa2 100644 --- a/macros/ASTManagement/AST2Ccode.bin +++ b/macros/ASTManagement/AST2Ccode.bin diff --git a/macros/ASTManagement/AST2Ccode.sci b/macros/ASTManagement/AST2Ccode.sci index f3c87ab..563f313 100644 --- a/macros/ASTManagement/AST2Ccode.sci +++ b/macros/ASTManagement/AST2Ccode.sci @@ -62,7 +62,8 @@ StackPosition = 1; global STACKDEDUG STACKDEDUG = 0; // 1 -> Every Pop and Push operation on the stack, the stack content will be printed on screen. - +global disp_isthere +disp_isthere = 0; // ------------------------------------- // --- End parameter Initialization. --- // ------------------------------------- @@ -141,9 +142,10 @@ while ~meof(fidAST) //NUT: qui puoi anche aggiunger piu' case per specificare meglio la struttura della funcall //NUT: i case aggiunti ovviamente faranno solo il push della treeline. case 'EndOperation' then - [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Operation'); + [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,'Operation'); case 'EndFuncall' then - [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Funcall'); + [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,'Funcall'); + disp(disp_isthere); // -------------- // --- Equal. --- @@ -161,13 +163,18 @@ while ~meof(fidAST) rc_count = 0; cc_count = 0; else - [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Equal'); + if disp_isthere == 0 + [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,'Equal'); SharedInfo = INIT_SharedInfoEqual(SharedInfo); + end end + disp_isthere = 0; + case 'Equal' then SharedInfo.Equal.Enabled = 1; // 1 means enabled -> we are inside an equal AST block. AST_PushASTStack(treeline); case 'Lhs :' then + disp(disp_isthere); if rc_count > 0 & cc_count == 0 SharedInfo.Equal.Lhs = 1; [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_HandleRC(FileInfo,SharedInfo); @@ -184,6 +191,7 @@ while ~meof(fidAST) else SharedInfo.Equal.Lhs = 1; // 1 means that we are inside the Lhs block of the Equal //if SharedInfo.Equal.NOutArg > 0 + if disp_isthere == 0 [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_ReadEqualRhsNames(FileInfo,SharedInfo); SharedInfo.Equal.NInArg = EqualNInArg; //end @@ -198,6 +206,7 @@ while ~meof(fidAST) SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt); end //end + end AST_PushASTStack(treeline); end @@ -233,6 +242,7 @@ while ~meof(fidAST) // ----------------- case 'EndProgram' SharedInfo = AST_HandleEndProgram(FileInfo,SharedInfo); + disp_isthere = 0; //NUT: per essere precisi si puo' pensare di mettere un check //NUT: alla fine dell'albero per accertarsi che c'e' end program li' dove ce lo aspettiamo diff --git a/macros/ASTManagement/AST_HandleCC.bin b/macros/ASTManagement/AST_HandleCC.bin Binary files differindex 0d302e4..b9cc964 100644 --- a/macros/ASTManagement/AST_HandleCC.bin +++ b/macros/ASTManagement/AST_HandleCC.bin diff --git a/macros/ASTManagement/AST_HandleCC.sci b/macros/ASTManagement/AST_HandleCC.sci index d0a2244..0b9e4d9 100644 --- a/macros/ASTManagement/AST_HandleCC.sci +++ b/macros/ASTManagement/AST_HandleCC.sci @@ -32,6 +32,8 @@ function [RhsNames,RhsScope,NRhs] = AST_HandleCC(FileInfo,SharedInfo) // Contact: raffaele.nutricato@tiscali.it // ----------------------------------------------------------------- +SCI2CNInArgCheck(argn(2),2,2) + ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; // ------------------------------ diff --git a/macros/ASTManagement/AST_HandleEndGenFun.bin b/macros/ASTManagement/AST_HandleEndGenFun.bin Binary files differindex dfbf15d..e1685ec 100644 --- a/macros/ASTManagement/AST_HandleEndGenFun.bin +++ b/macros/ASTManagement/AST_HandleEndGenFun.bin diff --git a/macros/ASTManagement/AST_HandleEndGenFun.sci b/macros/ASTManagement/AST_HandleEndGenFun.sci index 9fdfbb3..e948529 100644 --- a/macros/ASTManagement/AST_HandleEndGenFun.sci +++ b/macros/ASTManagement/AST_HandleEndGenFun.sci @@ -1,5 +1,5 @@ -function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType) +function [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,ASTFunType) // function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType) // ----------------------------------------------------------------- // #RNU_RES_B @@ -36,7 +36,7 @@ function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunT // ------------------------------ // --- Check input arguments. --- // ------------------------------ -//SCI2CNInArgCheck(argn(2),3,3); +SCI2CNInArgCheck(argn(2),4,4); // ----------------------- // --- Initialization. --- @@ -83,6 +83,11 @@ NOutArg_mod = NOutArg AST_PushASTStack('||'); return; end + + if ASTFunName == 'disp' + disp_isthere = 1; + end + if(mtlb_strcmp(part(ASTFunName,1:2),'CV') == %T) SharedInfo.OpenCVUsed = %T; end diff --git a/macros/ASTManagement/AST_HandleFunCC.bin b/macros/ASTManagement/AST_HandleFunCC.bin Binary files differindex 4689450..e36fa6c 100644 --- a/macros/ASTManagement/AST_HandleFunCC.bin +++ b/macros/ASTManagement/AST_HandleFunCC.bin diff --git a/macros/ASTManagement/AST_HandleFunCC.sci b/macros/ASTManagement/AST_HandleFunCC.sci index 12cb577..40155ba 100644 --- a/macros/ASTManagement/AST_HandleFunCC.sci +++ b/macros/ASTManagement/AST_HandleFunCC.sci @@ -32,6 +32,8 @@ function [FileInfo,SharedInfo] = AST_HandleFunCC(NCol,FileInfo,SharedInfo) // Contact: ukashanoor.iiitk@gmail.com // ----------------------------------------------------------------- +SCI2CNInArgCheck(argn(2),3,3) + // ------------------------------ // --- Check input arguments. --- // ------------------------------ @@ -156,6 +158,8 @@ com_type = 0; for i = 1:NInArg if InArg(i).Type == 'z' com_type = 1; + elseif InArg(i).Type == 'c' + com_type = 2; end end @@ -168,7 +172,7 @@ if com_type == 0 OutArg(1).Dimension = 2; OutArg(1).Value = InArg(1).Value; OutArg(1).FindLike = InArg(1).FindLike; -else +elseif com_type == 1 PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); OutArg(1).Type = 'z'; OutArg(1).Size(1) = string(NCol); @@ -176,6 +180,14 @@ else OutArg(1).Dimension = 2; OutArg(1).Value = InArg(1).Value; OutArg(1).FindLike = InArg(1).FindLike; +else + PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); + OutArg(1).Type = 'c'; + OutArg(1).Size(1) = string(NCol); + OutArg(1).Size(2) = string(NRow); + OutArg(1).Dimension = 2; + OutArg(1).Value = InArg(1).Value; + OutArg(1).FindLike = InArg(1).FindLike; end //--- Check for output Argument in symbol table ---// diff --git a/macros/ASTManagement/AST_HandleFunRC.bin b/macros/ASTManagement/AST_HandleFunRC.bin Binary files differindex b9fcd1f..70d8b56 100644 --- a/macros/ASTManagement/AST_HandleFunRC.bin +++ b/macros/ASTManagement/AST_HandleFunRC.bin diff --git a/macros/ASTManagement/AST_HandleFunRC.sci b/macros/ASTManagement/AST_HandleFunRC.sci index 10f5151..c08c17e 100644 --- a/macros/ASTManagement/AST_HandleFunRC.sci +++ b/macros/ASTManagement/AST_HandleFunRC.sci @@ -32,6 +32,8 @@ function [FileInfo,SharedInfo] = AST_HandleFunRC(FileInfo,SharedInfo) // Contact: ukashanoor.iiitk@gmail.com // ----------------------------------------------------------------- +SCI2CNInArgCheck(argn(2),2,2) + // ------------------------------ // --- Check input arguments. --- // ------------------------------ @@ -158,6 +160,8 @@ com_type = 0; for i = 1:NInArg if InArg(i).Type == 'z' com_type = 1; + elseif InArg(i).Type == 'c' + com_type = 2; end end @@ -170,7 +174,7 @@ if com_type == 0 OutArg(1).Dimension = 2; OutArg(1).Value = InArg(1).Value; OutArg(1).FindLike = InArg(1).FindLike; -else +elseif com_type == 1 PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); OutArg(1).Type = 'z'; OutArg(1).Size(1) = '1' @@ -178,6 +182,14 @@ else OutArg(1).Dimension = 2; OutArg(1).Value = InArg(1).Value; OutArg(1).FindLike = InArg(1).FindLike; +else + PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); + OutArg(1).Type = 'c'; + OutArg(1).Size(1) = '1' + OutArg(1).Size(2) = string(size_count); + OutArg(1).Dimension = 2; + OutArg(1).Value = InArg(1).Value; + OutArg(1).FindLike = InArg(1).FindLike; end //--- Check for output Argument in symbol table ---// diff --git a/macros/ASTManagement/AST_HandleRC.bin b/macros/ASTManagement/AST_HandleRC.bin Binary files differindex 829fd67..f5b8a1a 100644 --- a/macros/ASTManagement/AST_HandleRC.bin +++ b/macros/ASTManagement/AST_HandleRC.bin diff --git a/macros/ASTManagement/AST_HandleRC.sci b/macros/ASTManagement/AST_HandleRC.sci index 3952c8e..2a6cbc3 100644 --- a/macros/ASTManagement/AST_HandleRC.sci +++ b/macros/ASTManagement/AST_HandleRC.sci @@ -32,6 +32,8 @@ function [RhsNames,RhsScope,NRhs] = AST_HandleRC(FileInfo,SharedInfo) // Contact: raffaele.nutricato@tiscali.it // ----------------------------------------------------------------- +SCI2CNInArgCheck(argn(2),2,2) + ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; // ------------------------------ diff --git a/macros/ASTManagement/_funcall_string.bin b/macros/ASTManagement/_funcall_string.bin Binary files differindex 8354586..258933b 100644 --- a/macros/ASTManagement/_funcall_string.bin +++ b/macros/ASTManagement/_funcall_string.bin diff --git a/macros/ASTManagement/_funcall_string.sci b/macros/ASTManagement/_funcall_string.sci index faeb81d..0ee9701 100644 --- a/macros/ASTManagement/_funcall_string.sci +++ b/macros/ASTManagement/_funcall_string.sci @@ -6,10 +6,19 @@ function txt=%funcall_string(F) // name : string, the name of the function // lhsnb: number, the number of function lhs +if F.name <> 'disp' txt=['Funcall : '+F.name ' #lhs : '+string(F.lhsnb) ' Rhs : ' ' '+objectlist2string(F.rhs) 'EndFuncall' ] +else +txt=['Funcall : '+F.name + ' #lhs : '+'0' + ' Rhs : ' + ' '+objectlist2string(F.rhs) + 'EndFuncall' + ] +end endfunction |