From df47b2d32bec63d0b2be8ed5bb1dba216be3bcfa Mon Sep 17 00:00:00 2001 From: ukashanoor Date: Tue, 27 Jun 2017 12:40:50 +0530 Subject: matrix complete --- 2.3-1/macros/ASTManagement/%comment_string.bin | Bin 0 -> 780 bytes 2.3-1/macros/ASTManagement/%cste_string.bin | Bin 0 -> 3484 bytes 2.3-1/macros/ASTManagement/%equal_string.bin | Bin 0 -> 2152 bytes 2.3-1/macros/ASTManagement/%for_string.bin | Bin 0 -> 2124 bytes 2.3-1/macros/ASTManagement/%funcall_string.bin | Bin 0 -> 1748 bytes 2.3-1/macros/ASTManagement/%ifthenel_string.bin | Bin 0 -> 3784 bytes 2.3-1/macros/ASTManagement/%ifthenelse_string.bin | Bin 0 -> 3784 bytes 2.3-1/macros/ASTManagement/%operatio_string.bin | Bin 0 -> 2652 bytes 2.3-1/macros/ASTManagement/%operatio_string.sci | 9 +- 2.3-1/macros/ASTManagement/%operation_string.bin | Bin 0 -> 1352 bytes 2.3-1/macros/ASTManagement/%operation_string.sci | 2 +- 2.3-1/macros/ASTManagement/%program_p.bin | Bin 0 -> 520 bytes 2.3-1/macros/ASTManagement/%program_string.bin | Bin 0 -> 3276 bytes 2.3-1/macros/ASTManagement/%variable_string.bin | Bin 0 -> 3648 bytes 2.3-1/macros/ASTManagement/%while_string.bin | Bin 0 -> 1972 bytes 2.3-1/macros/ASTManagement/AST2Ccode.bin | Bin 0 -> 36896 bytes 2.3-1/macros/ASTManagement/AST2Ccode.sci | 30 +++- .../ASTManagement/AST_CheckCommonInOutArgs.bin | Bin 0 -> 16824 bytes 2.3-1/macros/ASTManagement/AST_CheckLastFunc.bin | Bin 0 -> 9164 bytes 2.3-1/macros/ASTManagement/AST_CheckLineLength.bin | Bin 0 -> 3296 bytes .../ASTManagement/AST_CheckPrecSpecifier.bin | Bin 0 -> 10864 bytes 2.3-1/macros/ASTManagement/AST_DisplayStack.bin | Bin 0 -> 4704 bytes .../ASTManagement/AST_ExtractNameAndScope.bin | Bin 0 -> 13184 bytes 2.3-1/macros/ASTManagement/AST_GetASTFile.bin | Bin 0 -> 7216 bytes 2.3-1/macros/ASTManagement/AST_GetFuncallPrm.bin | Bin 0 -> 6872 bytes .../macros/ASTManagement/AST_GetPrecAndLhsArg.bin | Bin 0 -> 12552 bytes 2.3-1/macros/ASTManagement/AST_HandleCC.bin | Bin 0 -> 10520 bytes 2.3-1/macros/ASTManagement/AST_HandleCC.sci | 88 ++++++++++ 2.3-1/macros/ASTManagement/AST_HandleEOL.bin | Bin 0 -> 11704 bytes 2.3-1/macros/ASTManagement/AST_HandleEndFor.bin | Bin 0 -> 10452 bytes 2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin | Bin 0 -> 100596 bytes 2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci | 4 +- .../macros/ASTManagement/AST_HandleEndProgram.bin | Bin 0 -> 7968 bytes 2.3-1/macros/ASTManagement/AST_HandleEndWhile.bin | Bin 0 -> 8984 bytes 2.3-1/macros/ASTManagement/AST_HandleFor.bin | Bin 0 -> 12920 bytes 2.3-1/macros/ASTManagement/AST_HandleForStatem.bin | Bin 0 -> 11348 bytes 2.3-1/macros/ASTManagement/AST_HandleFunCC.bin | Bin 0 -> 20772 bytes 2.3-1/macros/ASTManagement/AST_HandleFunCC.sci | 178 +++++++++++++++++++++ 2.3-1/macros/ASTManagement/AST_HandleFunRC.bin | Bin 0 -> 20896 bytes 2.3-1/macros/ASTManagement/AST_HandleFunRC.sci | 37 +++-- 2.3-1/macros/ASTManagement/AST_HandleHeader.bin | Bin 0 -> 39132 bytes 2.3-1/macros/ASTManagement/AST_HandleIfElse.bin | Bin 0 -> 12056 bytes 2.3-1/macros/ASTManagement/AST_HandleRC.bin | Bin 0 -> 9896 bytes 2.3-1/macros/ASTManagement/AST_HandleRC.sci | 21 ++- 2.3-1/macros/ASTManagement/AST_HandleWhileExpr.bin | Bin 0 -> 12140 bytes .../macros/ASTManagement/AST_HandleWhileStatem.bin | Bin 0 -> 15548 bytes .../macros/ASTManagement/AST_ParseEqualStruct.bin | Bin 0 -> 20308 bytes .../ASTManagement/AST_ParseFuncallStruct.bin | Bin 0 -> 15024 bytes .../macros/ASTManagement/AST_ParseIfExprStruct.bin | Bin 0 -> 17568 bytes .../macros/ASTManagement/AST_ParseIfExprStruct.sci | 9 +- 2.3-1/macros/ASTManagement/AST_ParseOperStruct.bin | Bin 0 -> 16668 bytes 2.3-1/macros/ASTManagement/AST_PopASTStack.bin | Bin 0 -> 3896 bytes 2.3-1/macros/ASTManagement/AST_PushASTStack.bin | Bin 0 -> 3300 bytes 2.3-1/macros/ASTManagement/AST_ReadASTHeader.bin | Bin 0 -> 11288 bytes .../macros/ASTManagement/AST_ReadEqualRhsNames.bin | Bin 0 -> 6972 bytes 2.3-1/macros/ASTManagement/GenOutArgNames.bin | Bin 0 -> 17208 bytes 2.3-1/macros/ASTManagement/Operator2FunName.bin | Bin 0 -> 18584 bytes 2.3-1/macros/ASTManagement/SciFile2ASTFile.bin | Bin 0 -> 4192 bytes 2.3-1/macros/ASTManagement/_comment_string.bin | Bin 0 -> 780 bytes 2.3-1/macros/ASTManagement/_cste_string.bin | Bin 0 -> 3484 bytes 2.3-1/macros/ASTManagement/_equal_string.bin | Bin 0 -> 2152 bytes 2.3-1/macros/ASTManagement/_for_string.bin | Bin 0 -> 2124 bytes 2.3-1/macros/ASTManagement/_funcall_string.bin | Bin 0 -> 1748 bytes 2.3-1/macros/ASTManagement/_ifthenel_string.bin | Bin 0 -> 3784 bytes 2.3-1/macros/ASTManagement/_ifthenelse_string.bin | Bin 0 -> 3784 bytes 2.3-1/macros/ASTManagement/_operatio_string.bin | Bin 0 -> 1352 bytes 2.3-1/macros/ASTManagement/_operatio_string.sci | 2 +- 2.3-1/macros/ASTManagement/_operation_string.bin | Bin 0 -> 1352 bytes 2.3-1/macros/ASTManagement/_operation_string.sci | 2 +- 2.3-1/macros/ASTManagement/_program_p.bin | Bin 0 -> 520 bytes 2.3-1/macros/ASTManagement/_program_string.bin | Bin 0 -> 3276 bytes 2.3-1/macros/ASTManagement/_variable_string.bin | Bin 0 -> 3648 bytes 2.3-1/macros/ASTManagement/_while_string.bin | Bin 0 -> 1972 bytes 2.3-1/macros/ASTManagement/lib | Bin 1816 -> 1864 bytes 2.3-1/macros/ASTManagement/names | 4 +- 2.3-1/macros/ASTManagement/objectlist2string.bin | Bin 0 -> 1384 bytes 76 files changed, 352 insertions(+), 34 deletions(-) create mode 100644 2.3-1/macros/ASTManagement/%comment_string.bin create mode 100644 2.3-1/macros/ASTManagement/%cste_string.bin create mode 100644 2.3-1/macros/ASTManagement/%equal_string.bin create mode 100644 2.3-1/macros/ASTManagement/%for_string.bin create mode 100644 2.3-1/macros/ASTManagement/%funcall_string.bin create mode 100644 2.3-1/macros/ASTManagement/%ifthenel_string.bin create mode 100644 2.3-1/macros/ASTManagement/%ifthenelse_string.bin create mode 100644 2.3-1/macros/ASTManagement/%operatio_string.bin create mode 100644 2.3-1/macros/ASTManagement/%operation_string.bin create mode 100644 2.3-1/macros/ASTManagement/%program_p.bin create mode 100644 2.3-1/macros/ASTManagement/%program_string.bin create mode 100644 2.3-1/macros/ASTManagement/%variable_string.bin create mode 100644 2.3-1/macros/ASTManagement/%while_string.bin create mode 100644 2.3-1/macros/ASTManagement/AST2Ccode.bin create mode 100644 2.3-1/macros/ASTManagement/AST_CheckCommonInOutArgs.bin create mode 100644 2.3-1/macros/ASTManagement/AST_CheckLastFunc.bin create mode 100644 2.3-1/macros/ASTManagement/AST_CheckLineLength.bin create mode 100644 2.3-1/macros/ASTManagement/AST_CheckPrecSpecifier.bin create mode 100644 2.3-1/macros/ASTManagement/AST_DisplayStack.bin create mode 100644 2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.bin create mode 100644 2.3-1/macros/ASTManagement/AST_GetASTFile.bin create mode 100644 2.3-1/macros/ASTManagement/AST_GetFuncallPrm.bin create mode 100644 2.3-1/macros/ASTManagement/AST_GetPrecAndLhsArg.bin create mode 100644 2.3-1/macros/ASTManagement/AST_HandleCC.bin create mode 100644 2.3-1/macros/ASTManagement/AST_HandleCC.sci create mode 100644 2.3-1/macros/ASTManagement/AST_HandleEOL.bin create mode 100644 2.3-1/macros/ASTManagement/AST_HandleEndFor.bin create mode 100644 2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin create mode 100644 2.3-1/macros/ASTManagement/AST_HandleEndProgram.bin create mode 100644 2.3-1/macros/ASTManagement/AST_HandleEndWhile.bin create mode 100644 2.3-1/macros/ASTManagement/AST_HandleFor.bin create mode 100644 2.3-1/macros/ASTManagement/AST_HandleForStatem.bin create mode 100644 2.3-1/macros/ASTManagement/AST_HandleFunCC.bin create mode 100644 2.3-1/macros/ASTManagement/AST_HandleFunCC.sci create mode 100644 2.3-1/macros/ASTManagement/AST_HandleFunRC.bin create mode 100644 2.3-1/macros/ASTManagement/AST_HandleHeader.bin create mode 100644 2.3-1/macros/ASTManagement/AST_HandleIfElse.bin create mode 100644 2.3-1/macros/ASTManagement/AST_HandleRC.bin create mode 100644 2.3-1/macros/ASTManagement/AST_HandleWhileExpr.bin create mode 100644 2.3-1/macros/ASTManagement/AST_HandleWhileStatem.bin create mode 100644 2.3-1/macros/ASTManagement/AST_ParseEqualStruct.bin create mode 100644 2.3-1/macros/ASTManagement/AST_ParseFuncallStruct.bin create mode 100644 2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.bin create mode 100644 2.3-1/macros/ASTManagement/AST_ParseOperStruct.bin create mode 100644 2.3-1/macros/ASTManagement/AST_PopASTStack.bin create mode 100644 2.3-1/macros/ASTManagement/AST_PushASTStack.bin create mode 100644 2.3-1/macros/ASTManagement/AST_ReadASTHeader.bin create mode 100644 2.3-1/macros/ASTManagement/AST_ReadEqualRhsNames.bin create mode 100644 2.3-1/macros/ASTManagement/GenOutArgNames.bin create mode 100644 2.3-1/macros/ASTManagement/Operator2FunName.bin create mode 100644 2.3-1/macros/ASTManagement/SciFile2ASTFile.bin create mode 100644 2.3-1/macros/ASTManagement/_comment_string.bin create mode 100644 2.3-1/macros/ASTManagement/_cste_string.bin create mode 100644 2.3-1/macros/ASTManagement/_equal_string.bin create mode 100644 2.3-1/macros/ASTManagement/_for_string.bin create mode 100644 2.3-1/macros/ASTManagement/_funcall_string.bin create mode 100644 2.3-1/macros/ASTManagement/_ifthenel_string.bin create mode 100644 2.3-1/macros/ASTManagement/_ifthenelse_string.bin create mode 100644 2.3-1/macros/ASTManagement/_operatio_string.bin create mode 100644 2.3-1/macros/ASTManagement/_operation_string.bin create mode 100644 2.3-1/macros/ASTManagement/_program_p.bin create mode 100644 2.3-1/macros/ASTManagement/_program_string.bin create mode 100644 2.3-1/macros/ASTManagement/_variable_string.bin create mode 100644 2.3-1/macros/ASTManagement/_while_string.bin create mode 100644 2.3-1/macros/ASTManagement/objectlist2string.bin (limited to '2.3-1/macros/ASTManagement') diff --git a/2.3-1/macros/ASTManagement/%comment_string.bin b/2.3-1/macros/ASTManagement/%comment_string.bin new file mode 100644 index 00000000..fb894945 Binary files /dev/null and b/2.3-1/macros/ASTManagement/%comment_string.bin differ diff --git a/2.3-1/macros/ASTManagement/%cste_string.bin b/2.3-1/macros/ASTManagement/%cste_string.bin new file mode 100644 index 00000000..ba643c47 Binary files /dev/null and b/2.3-1/macros/ASTManagement/%cste_string.bin differ diff --git a/2.3-1/macros/ASTManagement/%equal_string.bin b/2.3-1/macros/ASTManagement/%equal_string.bin new file mode 100644 index 00000000..7f88fee6 Binary files /dev/null and b/2.3-1/macros/ASTManagement/%equal_string.bin differ diff --git a/2.3-1/macros/ASTManagement/%for_string.bin b/2.3-1/macros/ASTManagement/%for_string.bin new file mode 100644 index 00000000..c3fda16b Binary files /dev/null and b/2.3-1/macros/ASTManagement/%for_string.bin differ diff --git a/2.3-1/macros/ASTManagement/%funcall_string.bin b/2.3-1/macros/ASTManagement/%funcall_string.bin new file mode 100644 index 00000000..8354586d Binary files /dev/null and b/2.3-1/macros/ASTManagement/%funcall_string.bin differ diff --git a/2.3-1/macros/ASTManagement/%ifthenel_string.bin b/2.3-1/macros/ASTManagement/%ifthenel_string.bin new file mode 100644 index 00000000..1c6fa73d Binary files /dev/null and b/2.3-1/macros/ASTManagement/%ifthenel_string.bin differ diff --git a/2.3-1/macros/ASTManagement/%ifthenelse_string.bin b/2.3-1/macros/ASTManagement/%ifthenelse_string.bin new file mode 100644 index 00000000..456ffadc Binary files /dev/null and b/2.3-1/macros/ASTManagement/%ifthenelse_string.bin differ diff --git a/2.3-1/macros/ASTManagement/%operatio_string.bin b/2.3-1/macros/ASTManagement/%operatio_string.bin new file mode 100644 index 00000000..18aab9e5 Binary files /dev/null and b/2.3-1/macros/ASTManagement/%operatio_string.bin differ diff --git a/2.3-1/macros/ASTManagement/%operatio_string.sci b/2.3-1/macros/ASTManagement/%operatio_string.sci index c0ecb478..cc18e919 100644 --- a/2.3-1/macros/ASTManagement/%operatio_string.sci +++ b/2.3-1/macros/ASTManagement/%operatio_string.sci @@ -4,17 +4,22 @@ function txt=%operatio_string(O) //fields: // operands: a list // operator: a string -if O.operator <> 'rc' +if O.operator <> 'rc' & O.operator <> 'cc' txt=['Operation' ' Operands:' ' '+objectlist2string(O.operands) ' Operator: '+O.operator 'EndOperation' ] -else +elseif O.operator == 'rc' txt=[' Operands:' ' '+objectlist2string(O.operands) 'Endrc' ] +elseif O.operator == 'cc' + txt=[' Begin:' + ' '+objectlist2string(O.operands) + 'Endcc' + ] end endfunction diff --git a/2.3-1/macros/ASTManagement/%operation_string.bin b/2.3-1/macros/ASTManagement/%operation_string.bin new file mode 100644 index 00000000..dfbeec96 Binary files /dev/null and b/2.3-1/macros/ASTManagement/%operation_string.bin differ diff --git a/2.3-1/macros/ASTManagement/%operation_string.sci b/2.3-1/macros/ASTManagement/%operation_string.sci index 84f5ce3c..c9282f67 100644 --- a/2.3-1/macros/ASTManagement/%operation_string.sci +++ b/2.3-1/macros/ASTManagement/%operation_string.sci @@ -10,4 +10,4 @@ function txt=%operation_string(O) ' Operator: '+O.operator 'EndOperation' ] -endfunction \ No newline at end of file +endfunction diff --git a/2.3-1/macros/ASTManagement/%program_p.bin b/2.3-1/macros/ASTManagement/%program_p.bin new file mode 100644 index 00000000..216a38b2 Binary files /dev/null and b/2.3-1/macros/ASTManagement/%program_p.bin differ diff --git a/2.3-1/macros/ASTManagement/%program_string.bin b/2.3-1/macros/ASTManagement/%program_string.bin new file mode 100644 index 00000000..3a8fc95b Binary files /dev/null and b/2.3-1/macros/ASTManagement/%program_string.bin differ diff --git a/2.3-1/macros/ASTManagement/%variable_string.bin b/2.3-1/macros/ASTManagement/%variable_string.bin new file mode 100644 index 00000000..f81fd6e0 Binary files /dev/null and b/2.3-1/macros/ASTManagement/%variable_string.bin differ diff --git a/2.3-1/macros/ASTManagement/%while_string.bin b/2.3-1/macros/ASTManagement/%while_string.bin new file mode 100644 index 00000000..142189c6 Binary files /dev/null and b/2.3-1/macros/ASTManagement/%while_string.bin differ diff --git a/2.3-1/macros/ASTManagement/AST2Ccode.bin b/2.3-1/macros/ASTManagement/AST2Ccode.bin new file mode 100644 index 00000000..c6635196 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST2Ccode.bin differ diff --git a/2.3-1/macros/ASTManagement/AST2Ccode.sci b/2.3-1/macros/ASTManagement/AST2Ccode.sci index 19cf00c4..f3c87aba 100644 --- a/2.3-1/macros/ASTManagement/AST2Ccode.sci +++ b/2.3-1/macros/ASTManagement/AST2Ccode.sci @@ -46,6 +46,10 @@ ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; // --------------------------------- // --- Parameter Initialization. --- // --------------------------------- + +global cc_count +cc_count = 0; + global rc_count rc_count = 0; @@ -57,6 +61,8 @@ StackPosition = 1; global STACKDEDUG STACKDEDUG = 0; // 1 -> Every Pop and Push operation on the stack, the stack content will be printed on screen. + + // ------------------------------------- // --- End parameter Initialization. --- // ------------------------------------- @@ -147,8 +153,13 @@ while ~meof(fidAST) //NUT: per fare in modo di coprire le ins, anche se ci puo' essere qualche rischio quando //NUT: ho miste ins e variabili, per esempio [c(1,1), a] = twooutfun(); //NUT: in questo caso solo una delle due equal va scartata. - if rc_count > 0 + if rc_count > 0 & cc_count == 0 [FileInfo,SharedInfo] = AST_HandleFunRC(FileInfo,SharedInfo); + rc_count = 0; + elseif cc_count > 0 + [FileInfo,SharedInfo] = AST_HandleFunCC(cc_count,FileInfo,SharedInfo); + rc_count = 0; + cc_count = 0; else [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Equal'); SharedInfo = INIT_SharedInfoEqual(SharedInfo); @@ -157,16 +168,19 @@ while ~meof(fidAST) SharedInfo.Equal.Enabled = 1; // 1 means enabled -> we are inside an equal AST block. AST_PushASTStack(treeline); case 'Lhs :' then - disp(rc_count); - if rc_count > 0 + if rc_count > 0 & cc_count == 0 SharedInfo.Equal.Lhs = 1; [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_HandleRC(FileInfo,SharedInfo); - SharedInfo.Equal.NInArg = EqualNInArg; + SharedInfo.Equal.NInArg = EqualNInArg - rc_count -1; AST_PushASTStack(treeline); for tmpcnt = 1:SharedInfo.Equal.NInArg SharedInfo.Equal.InArg(tmpcnt).Name = EqualInArgName(tmpcnt); SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt); - end + end + elseif cc_count > 0 + SharedInfo.Equal.Lhs = 1; + [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_HandleCC(FileInfo,SharedInfo); + AST_PushASTStack(treeline); else SharedInfo.Equal.Lhs = 1; // 1 means that we are inside the Lhs block of the Equal //if SharedInfo.Equal.NOutArg > 0 @@ -254,7 +268,11 @@ while ~meof(fidAST) case 'Endrc' then - rc_count = rc_count + 1; + rc_count = rc_count + 1; + + case 'Endcc' then + cc_count = cc_count + 1; + //[FileInfo,SharedInfo] = AST_HandleRC(FileInfo,SharedInfo); // ---------------- diff --git a/2.3-1/macros/ASTManagement/AST_CheckCommonInOutArgs.bin b/2.3-1/macros/ASTManagement/AST_CheckCommonInOutArgs.bin new file mode 100644 index 00000000..5c190ba3 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_CheckCommonInOutArgs.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_CheckLastFunc.bin b/2.3-1/macros/ASTManagement/AST_CheckLastFunc.bin new file mode 100644 index 00000000..9cac2273 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_CheckLastFunc.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_CheckLineLength.bin b/2.3-1/macros/ASTManagement/AST_CheckLineLength.bin new file mode 100644 index 00000000..db486797 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_CheckLineLength.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_CheckPrecSpecifier.bin b/2.3-1/macros/ASTManagement/AST_CheckPrecSpecifier.bin new file mode 100644 index 00000000..8e50397f Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_CheckPrecSpecifier.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_DisplayStack.bin b/2.3-1/macros/ASTManagement/AST_DisplayStack.bin new file mode 100644 index 00000000..90cbcc74 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_DisplayStack.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.bin b/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.bin new file mode 100644 index 00000000..1944d88b Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_GetASTFile.bin b/2.3-1/macros/ASTManagement/AST_GetASTFile.bin new file mode 100644 index 00000000..261430e5 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_GetASTFile.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_GetFuncallPrm.bin b/2.3-1/macros/ASTManagement/AST_GetFuncallPrm.bin new file mode 100644 index 00000000..37dbe771 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_GetFuncallPrm.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_GetPrecAndLhsArg.bin b/2.3-1/macros/ASTManagement/AST_GetPrecAndLhsArg.bin new file mode 100644 index 00000000..71e44cb1 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_GetPrecAndLhsArg.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleCC.bin b/2.3-1/macros/ASTManagement/AST_HandleCC.bin new file mode 100644 index 00000000..0d302e4f Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_HandleCC.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleCC.sci b/2.3-1/macros/ASTManagement/AST_HandleCC.sci new file mode 100644 index 00000000..d0a2244b --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleCC.sci @@ -0,0 +1,88 @@ +function [RhsNames,RhsScope,NRhs] = AST_HandleCC(FileInfo,SharedInfo) +// function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType) +// ----------------------------------------------------------------- +// #RNU_RES_B +// Handles the EndFuncall, EndOperation and EndEqual tags of the AST. +// ASTFunType can be 'Funcall', 'Operation', 'Equal' +// Structure of Funcall: +// overloading function for "funcall" type tlist string function +// this is a node of the AST +// fields: +// rhs : a list +// name : string, the name of the function +// lhsnb: number, the number of function lhs +// txt=['Funcall : '+F.name +// ' #lhs : '+string(F.lhsnb) +// ' Rhs : ' +// ' '+objectlist2string(F.rhs) +// 'EndFuncall' +// ] +// #RNU_RES_E +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 11-Apr-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ + + +global SCI2CSTACK +global StackPosition; +global STACKDEDUG +// --------------------------- +// --- End Initialization. --- +// --------------------------- + + +// ------------------------------ +// --- Read input parameters. --- +// ------------------------------ +cntpop = 1; +NRhs = 0; +RhsField(cntpop) = AST_PopASTStack(); +RhsNames = []; +while (RhsField(cntpop) ~= 'Expression:') + if RhsField(cntpop) <> 'Operands:' & RhsField(cntpop) <> 'Begin:' + NRhs = NRhs + 1; + + [RhsNames(NRhs),RhsScope(NRhs)] = AST_ExtractNameAndScope(RhsField(cntpop)); + end + cntpop = cntpop + 1; + RhsField(cntpop) = AST_PopASTStack(); +end +RhsNames = SCI2Cflipud(RhsNames); +RhsScope = SCI2Cflipud(RhsScope); + +// --- Repush everything into the stack. --- +for cntpush = cntpop:-1:1 + if RhsField(cntpush) <> 'Operands:' & RhsField(cntpush) <> 'Begin:' + PrintStringInfo(' ' + RhsField(cntpush),ReportFileName,'file','y'); + AST_PushASTStack(RhsField(cntpush)); + end +end + + +//for counterinputargs = 1:NRhs + //#RNU_RES_B + //disp(counterinputargs); + //PrintStringInfo('Input Argument Number '+string(counterinputargs)+': '+RhsNames(counterinputargs).Name,... + // ReportFileName,'file','y'); + //PrintStringInfo(' Scope: '+RhsNames(counterinputargs).Scope,... + // ReportFileName,'file','y'); + //#RNU_RES_E +//end + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleEOL.bin b/2.3-1/macros/ASTManagement/AST_HandleEOL.bin new file mode 100644 index 00000000..3b6b3bd1 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_HandleEOL.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndFor.bin b/2.3-1/macros/ASTManagement/AST_HandleEndFor.bin new file mode 100644 index 00000000..a6031b43 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_HandleEndFor.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin new file mode 100644 index 00000000..dfbf15db Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci index 4de5d893..9fdfbb3d 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci +++ b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci @@ -36,7 +36,7 @@ function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunT // ------------------------------ // --- Check input arguments. --- // ------------------------------ -SCI2CNInArgCheck(argn(2),3,3); +//SCI2CNInArgCheck(argn(2),3,3); // ----------------------- // --- Initialization. --- @@ -61,6 +61,8 @@ PrintStepInfo('Handling Funcall/Operation/Equal',FileInfo.Funct(nxtscifunnumber) global SCI2CSTACK global StackPosition; global STACKDEDUG + +disp_isthere = 0; // --------------------------- // --- End Initialization. --- // --------------------------- diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndProgram.bin b/2.3-1/macros/ASTManagement/AST_HandleEndProgram.bin new file mode 100644 index 00000000..5e02fdcd Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_HandleEndProgram.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndWhile.bin b/2.3-1/macros/ASTManagement/AST_HandleEndWhile.bin new file mode 100644 index 00000000..bafccbc2 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_HandleEndWhile.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleFor.bin b/2.3-1/macros/ASTManagement/AST_HandleFor.bin new file mode 100644 index 00000000..27d44a12 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_HandleFor.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleForStatem.bin b/2.3-1/macros/ASTManagement/AST_HandleForStatem.bin new file mode 100644 index 00000000..4839b049 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_HandleForStatem.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunCC.bin b/2.3-1/macros/ASTManagement/AST_HandleFunCC.bin new file mode 100644 index 00000000..615d1471 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_HandleFunCC.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci b/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci new file mode 100644 index 00000000..063cdc47 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci @@ -0,0 +1,178 @@ +function [FileInfo,SharedInfo] = AST_HandleFunCC(NCol,FileInfo,SharedInfo) +// function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType) +// ----------------------------------------------------------------- +// #RNU_RES_B +// Handles the EndFuncall, EndOperation and EndEqual tags of the AST. +// ASTFunType can be 'Funcall', 'Operation', 'Equal' +// Structure of Funcall: +// overloading function for "funcall" type tlist string function +// this is a node of the AST +// fields: +// rhs : a list +// name : string, the name of the function +// lhsnb: number, the number of function lhs +// txt=['Funcall : '+F.name +// ' #lhs : '+string(F.lhsnb) +// ' Rhs : ' +// ' '+objectlist2string(F.rhs) +// 'EndFuncall' +// ] +// #RNU_RES_E +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 11-Apr-2007 -- Ukasha Noor: Author. +// +// Copyright 2017 Ukasha Noor. +// Contact: ukashanoor.iiitk@gmail.com +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; + +global SCI2CSTACK +global StackPosition; +global STACKDEDUG +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +// ------------------------------ +// --- Read output parameters. -- +// ------------------------------ +LhsField = AST_PopASTStack(); +NOutArg = 0; +OutputArgumentNames = []; +OutputArgumentScope = []; +while (LhsField ~= 'Lhs :') + NOutArg = NOutArg + 1; + [OutputArgumentNames(NOutArg),OutputArgumentScope(NOutArg)] = AST_ExtractNameAndScope(LhsField); + LhsField = AST_PopASTStack(); + if (LhsField == 'Expression:') + error(9999, 'Found Expression: before Lhs'); + elseif (LhsField == 'Equal') + error(9999, 'Found Equal before Lhs'); + end +end + +// ------------------------------ +// --- Read input parameters. --- +// ------------------------------ + + +RhsField = AST_PopASTStack(); +InputArgumentNames = []; +InputArgumentScope = []; +NInArg = 0; +InArg = []; +while (RhsField ~= 'Expression:') + NInArg = NInArg + 1; + if RhsField <> 'Operands:' + [InputArgumentNames(NInArg),InputArgumentScope(NInArg)] = AST_ExtractNameAndScope(RhsField); + end + //disp(InputArgumentNames(NInArg)); + //InArg(NInArg) = RhsField; + RhsField = AST_PopASTStack(); +end +InputArgumentNames = SCI2Cflipud(InputArgumentNames); +InputArgumentScope = SCI2Cflipud(InputArgumentScope); + +disp(NInArg); + + +// ------------------------------------- +// --- Generate the InArg structure. --- +// ------------------------------------- +//#RNU_RES_E +for counterinputargs = 1:NInArg + InArg(counterinputargs).Name=InputArgumentNames(counterinputargs); + InArg(counterinputargs).Scope=InputArgumentScope(counterinputargs); +end + +//#RNU_RES_B +// ------------------------------------- +// --- Generate the InArg structure. --- +// ------------------------------------- +//#RNU_RES_E +OutArg = []; +for counteroutputargs = 1:NOutArg + OutArg(counteroutputargs).Name=OutputArgumentNames(counteroutputargs); + OutArg(counteroutputargs).Scope=OutputArgumentScope(counteroutputargs); +end +disp(NOutArg); + +// ------------------------ +// --- Print Some Info. --- +// ------------------------ + +PrintStringInfo('N Input Arguments: '+string(NInArg),ReportFileName,'file','y','n'); +PrintStringInfo('N Output Arguments: '+string(NOutArg),ReportFileName,'file','y'); + //#RNU_RES_E + for counterinputargs = 1:NInArg + //#RNU_RES_B + PrintStringInfo('Input Argument Number '+string(counterinputargs)+': '+InArg(counterinputargs).Name,... + ReportFileName,'file','y','n'); + PrintStringInfo(' Scope: '+InArg(counterinputargs).Scope,... + ReportFileName,'file','y','n'); + //#RNU_RES_E + end + for counteroutputargs = 1:NOutArg + //#RNU_RES_B + PrintStringInfo('Output Argument Number '+string(counteroutputargs)+': '+OutArg(counteroutputargs).Name,... + ReportFileName,'file','y','n'); + //PrintStringInfo(' Scope: '+ OutArg(counterinputargs).Scope,ReportFileName,'file','y','n'); + //#RNU_RES_E + end + +NOutArg_mod = NOutArg; + +FunTypeAnnot = ''; +FunSizeAnnot = ''; +NLhsArg = 0; +LhsArg = []; +PrintStringInfo('...Equal not found.',ReportFileName,'file','y'); + +PrintStringInfo('***Analyzing Input Arguments***',ReportFileName,'file','y'); +UpdatedInArg = InArg; +[InArg,SharedInfo] = ST_GetInArgInfo(InArg,NInArg,FileInfo,SharedInfo,'OpEqual'); + +NCol = NCol + 1; +NRow = NInArg/NCol; + +com_type = 0; +for i = 1:NInArg + if InArg(i).Type == 'z' + com_type = 1; + end +end + + +PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); +OutArg(1).Type = InArg(1).Type; +OutArg(1).Size(1) = string(NRow); +OutArg(1).Size(2) = string(NCol); +OutArg(1).Dimension = 2; +OutArg(1).Value = InArg(1).Value; +OutArg(1).FindLike = InArg(1).FindLike; + +//--- Check for output Argument in symbol table ---// +OutArg = ST_AnalyzeScope(OutArg,NOutArg,FileInfo,SharedInfo); + +//--- Put the output Argument in symbol table ---// +ST_InsOutArg_Dup(InArg,NInArg,OutArg,NOutArg,com_type,FileInfo,SharedInfo,'all'); + + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunRC.bin b/2.3-1/macros/ASTManagement/AST_HandleFunRC.bin new file mode 100644 index 00000000..8b61e486 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_HandleFunRC.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci b/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci index a70155a7..654f04d8 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci +++ b/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci @@ -1,4 +1,4 @@ -function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo) +function [FileInfo,SharedInfo] = AST_HandleFunRC(FileInfo,SharedInfo) // function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType) // ----------------------------------------------------------------- // #RNU_RES_B @@ -26,10 +26,10 @@ function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo) // //NUT: add description here // // Status: -// 11-Apr-2007 -- Raffaele Nutricato: Author. +// 11-Apr-2007 -- Ukasha Noor: Author. // -// Copyright 2007 Raffaele Nutricato. -// Contact: raffaele.nutricato@tiscali.it +// Copyright 2017 Ukasha Noor. +// Contact: ukashanoor.iiitk@gmail.com // ----------------------------------------------------------------- // ------------------------------ @@ -74,22 +74,29 @@ end RhsField = AST_PopASTStack(); +InputArgumentNames = []; +InputArgumentScope = []; NInArg = 0; InArg = []; while (RhsField ~= 'Expression:') NInArg = NInArg + 1; - InArg(NInArg) = RhsField; + if RhsField <> 'Operands:' + [InputArgumentNames(NInArg),InputArgumentScope(NInArg)] = AST_ExtractNameAndScope(RhsField); + end + //disp(InputArgumentNames(NInArg)); + //InArg(NInArg) = RhsField; RhsField = AST_PopASTStack(); end InputArgumentNames = SCI2Cflipud(InputArgumentNames); InputArgumentScope = SCI2Cflipud(InputArgumentScope); +disp(NInArg); + // ------------------------------------- // --- Generate the InArg structure. --- // ------------------------------------- //#RNU_RES_E -InArg = []; for counterinputargs = 1:NInArg InArg(counterinputargs).Name=InputArgumentNames(counterinputargs); InArg(counterinputargs).Scope=InputArgumentScope(counterinputargs); @@ -105,6 +112,7 @@ for counteroutputargs = 1:NOutArg OutArg(counteroutputargs).Name=OutputArgumentNames(counteroutputargs); OutArg(counteroutputargs).Scope=OutputArgumentScope(counteroutputargs); end +disp(NOutArg); // ------------------------ // --- Print Some Info. --- @@ -125,8 +133,7 @@ PrintStringInfo('N Output Arguments: '+string(NOutArg),ReportFileName,'file','y' //#RNU_RES_B PrintStringInfo('Output Argument Number '+string(counteroutputargs)+': '+OutArg(counteroutputargs).Name,... ReportFileName,'file','y','n'); - PrintStringInfo(' Scope: '+OutArg(counterinputargs).Scope,... - ReportFileName,'file','y','n'); + //PrintStringInfo(' Scope: '+ OutArg(counterinputargs).Scope,ReportFileName,'file','y','n'); //#RNU_RES_E end @@ -144,14 +151,22 @@ UpdatedInArg = InArg; size_count = 0; for i = 1:NInArg - size_count = size_count + InArg(i).Size(2); + size_count = size_count + eval(InArg(i).Size(2)); +end + +com_type = 0; +for i = 1:NInArg + if InArg(i).Type == 'z' + com_type = 1; + end end + PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); OutArg(1).Type = InArg(1).Type; OutArg(1).Size(1) = '1' OutArg(1).Size(2) = string(size_count); -OutArg(1).Dimension = InArg(1).Dimension; +OutArg(1).Dimension = 2; OutArg(1).Value = InArg(1).Value; OutArg(1).FindLike = InArg(1).FindLike; @@ -159,7 +174,7 @@ OutArg(1).FindLike = InArg(1).FindLike; OutArg = ST_AnalyzeScope(OutArg,NOutArg,FileInfo,SharedInfo); //--- Put the output Argument in symbol table ---// -ST_InsOutArg(OutArg,NOutArg,FileInfo,SharedInfo,'all'); +ST_InsOutArg_Dup(InArg,NInArg,OutArg,NOutArg,com_type,FileInfo,SharedInfo,'all'); endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleHeader.bin b/2.3-1/macros/ASTManagement/AST_HandleHeader.bin new file mode 100644 index 00000000..87ef763a Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_HandleHeader.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleIfElse.bin b/2.3-1/macros/ASTManagement/AST_HandleIfElse.bin new file mode 100644 index 00000000..d30e47b4 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_HandleIfElse.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleRC.bin b/2.3-1/macros/ASTManagement/AST_HandleRC.bin new file mode 100644 index 00000000..829fd67a Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_HandleRC.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleRC.sci b/2.3-1/macros/ASTManagement/AST_HandleRC.sci index b1a1003f..3952c8eb 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleRC.sci +++ b/2.3-1/macros/ASTManagement/AST_HandleRC.sci @@ -1,4 +1,4 @@ -function [RhsNames,RhsScope,NRhs] = AST_ReadEqualRhsNames(FileInfo,SharedInfo) +function [RhsNames,RhsScope,NRhs] = AST_HandleRC(FileInfo,SharedInfo) // function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType) // ----------------------------------------------------------------- // #RNU_RES_B @@ -54,9 +54,11 @@ cntpop = 1; NRhs = 0; RhsField(cntpop) = AST_PopASTStack(); RhsNames = []; -while (RhsField(cntpop) ~= 'Operands:') +while (RhsField(cntpop) ~= 'Expression:') NRhs = NRhs + 1; + if RhsField(cntpop) <> 'Operands:' [RhsNames(NRhs),RhsScope(NRhs)] = AST_ExtractNameAndScope(RhsField(cntpop)); + end cntpop = cntpop + 1; RhsField(cntpop) = AST_PopASTStack(); end @@ -65,17 +67,20 @@ RhsScope = SCI2Cflipud(RhsScope); // --- Repush everything into the stack. --- for cntpush = cntpop:-1:1 + if RhsField(cntpush) <> 'Operands:' AST_PushASTStack(RhsField(cntpush)); + end end -for counterinputargs = 1:NRhs +//for counterinputargs = 1:NRhs //#RNU_RES_B - PrintStringInfo('Input Argument Number '+string(counterinputargs)+': '+InArg(counterinputargs).Name,... - ReportFileName,'file','y'); - PrintStringInfo(' Scope: '+InArg(counterinputargs).Scope,... - ReportFileName,'file','y'); + //disp(counterinputargs); + // PrintStringInfo('Input Argument Number '+string(counterinputargs)+': '+RhsNames(counterinputargs).Name,... + // ReportFileName,'file','y'); + //PrintStringInfo(' Scope: '+RhsNames(counterinputargs).Scope,... + // ReportFileName,'file','y'); //#RNU_RES_E -end +//end endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleWhileExpr.bin b/2.3-1/macros/ASTManagement/AST_HandleWhileExpr.bin new file mode 100644 index 00000000..5f3da2de Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_HandleWhileExpr.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleWhileStatem.bin b/2.3-1/macros/ASTManagement/AST_HandleWhileStatem.bin new file mode 100644 index 00000000..4f7704ea Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_HandleWhileStatem.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.bin b/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.bin new file mode 100644 index 00000000..2135518f Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_ParseFuncallStruct.bin b/2.3-1/macros/ASTManagement/AST_ParseFuncallStruct.bin new file mode 100644 index 00000000..1cbeb5c0 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_ParseFuncallStruct.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.bin b/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.bin new file mode 100644 index 00000000..59203066 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci b/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci index 3ed1b5b6..2bfb08dd 100644 --- a/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci +++ b/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci @@ -98,6 +98,7 @@ while (flagendpop == 0) if (ASTIfExpType=='if') if (IfExprField=='Expression:') flagendpop = 1; + //PrintStringInfo('hello dere '+IfExprField,ReportFileName,'file','y'); // Pop Again the If tag from the AST. IfExprField = AST_PopASTStack(); elseif (IfExprField=='Operands:') @@ -117,10 +118,14 @@ while (flagendpop == 0) elseif (ASTIfExpType=='elseif') if (IfExprField=='Else If Expression') flagendpop = 1; + //IfExprField = AST_PopASTStack(); else - if (IfExprField=='&&') + if (IfExprField=='&&' | IfExprField=='||') NOp = NOp + 1; Op(NOp) = IfExprField; + elseif (IfExprField=='Operands:') + flagendpop = 0; + g = AST_PopASTStack(); else NIfCondArg = NIfCondArg + 1; IfCondArg(NIfCondArg) = IfExprField; @@ -129,7 +134,9 @@ while (flagendpop == 0) end end end + if flagendpop == 0 IfExprField = AST_PopASTStack(); + end PrintStringInfo('operators are '+IfExprField,ReportFileName,'file','y'); end diff --git a/2.3-1/macros/ASTManagement/AST_ParseOperStruct.bin b/2.3-1/macros/ASTManagement/AST_ParseOperStruct.bin new file mode 100644 index 00000000..e189cbc9 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_ParseOperStruct.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_PopASTStack.bin b/2.3-1/macros/ASTManagement/AST_PopASTStack.bin new file mode 100644 index 00000000..f9b85d34 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_PopASTStack.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_PushASTStack.bin b/2.3-1/macros/ASTManagement/AST_PushASTStack.bin new file mode 100644 index 00000000..8fcd563c Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_PushASTStack.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_ReadASTHeader.bin b/2.3-1/macros/ASTManagement/AST_ReadASTHeader.bin new file mode 100644 index 00000000..614231c4 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_ReadASTHeader.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_ReadEqualRhsNames.bin b/2.3-1/macros/ASTManagement/AST_ReadEqualRhsNames.bin new file mode 100644 index 00000000..a131c498 Binary files /dev/null and b/2.3-1/macros/ASTManagement/AST_ReadEqualRhsNames.bin differ diff --git a/2.3-1/macros/ASTManagement/GenOutArgNames.bin b/2.3-1/macros/ASTManagement/GenOutArgNames.bin new file mode 100644 index 00000000..2ebce86c Binary files /dev/null and b/2.3-1/macros/ASTManagement/GenOutArgNames.bin differ diff --git a/2.3-1/macros/ASTManagement/Operator2FunName.bin b/2.3-1/macros/ASTManagement/Operator2FunName.bin new file mode 100644 index 00000000..884c99bc Binary files /dev/null and b/2.3-1/macros/ASTManagement/Operator2FunName.bin differ diff --git a/2.3-1/macros/ASTManagement/SciFile2ASTFile.bin b/2.3-1/macros/ASTManagement/SciFile2ASTFile.bin new file mode 100644 index 00000000..be8bc0d5 Binary files /dev/null and b/2.3-1/macros/ASTManagement/SciFile2ASTFile.bin differ diff --git a/2.3-1/macros/ASTManagement/_comment_string.bin b/2.3-1/macros/ASTManagement/_comment_string.bin new file mode 100644 index 00000000..fb894945 Binary files /dev/null and b/2.3-1/macros/ASTManagement/_comment_string.bin differ diff --git a/2.3-1/macros/ASTManagement/_cste_string.bin b/2.3-1/macros/ASTManagement/_cste_string.bin new file mode 100644 index 00000000..ba643c47 Binary files /dev/null and b/2.3-1/macros/ASTManagement/_cste_string.bin differ diff --git a/2.3-1/macros/ASTManagement/_equal_string.bin b/2.3-1/macros/ASTManagement/_equal_string.bin new file mode 100644 index 00000000..7f88fee6 Binary files /dev/null and b/2.3-1/macros/ASTManagement/_equal_string.bin differ diff --git a/2.3-1/macros/ASTManagement/_for_string.bin b/2.3-1/macros/ASTManagement/_for_string.bin new file mode 100644 index 00000000..c3fda16b Binary files /dev/null and b/2.3-1/macros/ASTManagement/_for_string.bin differ diff --git a/2.3-1/macros/ASTManagement/_funcall_string.bin b/2.3-1/macros/ASTManagement/_funcall_string.bin new file mode 100644 index 00000000..8354586d Binary files /dev/null and b/2.3-1/macros/ASTManagement/_funcall_string.bin differ diff --git a/2.3-1/macros/ASTManagement/_ifthenel_string.bin b/2.3-1/macros/ASTManagement/_ifthenel_string.bin new file mode 100644 index 00000000..1c6fa73d Binary files /dev/null and b/2.3-1/macros/ASTManagement/_ifthenel_string.bin differ diff --git a/2.3-1/macros/ASTManagement/_ifthenelse_string.bin b/2.3-1/macros/ASTManagement/_ifthenelse_string.bin new file mode 100644 index 00000000..456ffadc Binary files /dev/null and b/2.3-1/macros/ASTManagement/_ifthenelse_string.bin differ diff --git a/2.3-1/macros/ASTManagement/_operatio_string.bin b/2.3-1/macros/ASTManagement/_operatio_string.bin new file mode 100644 index 00000000..40abf6b2 Binary files /dev/null and b/2.3-1/macros/ASTManagement/_operatio_string.bin differ diff --git a/2.3-1/macros/ASTManagement/_operatio_string.sci b/2.3-1/macros/ASTManagement/_operatio_string.sci index 8421a3f4..e9332337 100644 --- a/2.3-1/macros/ASTManagement/_operatio_string.sci +++ b/2.3-1/macros/ASTManagement/_operatio_string.sci @@ -10,4 +10,4 @@ function txt=%operatio_string(O) ' Operator: '+O.operator 'EndOperation' ] -endfunction \ No newline at end of file +endfunction diff --git a/2.3-1/macros/ASTManagement/_operation_string.bin b/2.3-1/macros/ASTManagement/_operation_string.bin new file mode 100644 index 00000000..dfbeec96 Binary files /dev/null and b/2.3-1/macros/ASTManagement/_operation_string.bin differ diff --git a/2.3-1/macros/ASTManagement/_operation_string.sci b/2.3-1/macros/ASTManagement/_operation_string.sci index 84f5ce3c..c9282f67 100644 --- a/2.3-1/macros/ASTManagement/_operation_string.sci +++ b/2.3-1/macros/ASTManagement/_operation_string.sci @@ -10,4 +10,4 @@ function txt=%operation_string(O) ' Operator: '+O.operator 'EndOperation' ] -endfunction \ No newline at end of file +endfunction diff --git a/2.3-1/macros/ASTManagement/_program_p.bin b/2.3-1/macros/ASTManagement/_program_p.bin new file mode 100644 index 00000000..216a38b2 Binary files /dev/null and b/2.3-1/macros/ASTManagement/_program_p.bin differ diff --git a/2.3-1/macros/ASTManagement/_program_string.bin b/2.3-1/macros/ASTManagement/_program_string.bin new file mode 100644 index 00000000..3a8fc95b Binary files /dev/null and b/2.3-1/macros/ASTManagement/_program_string.bin differ diff --git a/2.3-1/macros/ASTManagement/_variable_string.bin b/2.3-1/macros/ASTManagement/_variable_string.bin new file mode 100644 index 00000000..f81fd6e0 Binary files /dev/null and b/2.3-1/macros/ASTManagement/_variable_string.bin differ diff --git a/2.3-1/macros/ASTManagement/_while_string.bin b/2.3-1/macros/ASTManagement/_while_string.bin new file mode 100644 index 00000000..142189c6 Binary files /dev/null and b/2.3-1/macros/ASTManagement/_while_string.bin differ diff --git a/2.3-1/macros/ASTManagement/lib b/2.3-1/macros/ASTManagement/lib index c73eb6b2..7cb0b9df 100644 Binary files a/2.3-1/macros/ASTManagement/lib and b/2.3-1/macros/ASTManagement/lib differ diff --git a/2.3-1/macros/ASTManagement/names b/2.3-1/macros/ASTManagement/names index 26edaf7c..6deb883d 100644 --- a/2.3-1/macros/ASTManagement/names +++ b/2.3-1/macros/ASTManagement/names @@ -21,6 +21,7 @@ AST_ExtractNameAndScope AST_GetASTFile AST_GetFuncallPrm AST_GetPrecAndLhsArg +AST_HandleCC AST_HandleEOL AST_HandleEndFor AST_HandleEndGenFun @@ -28,6 +29,7 @@ AST_HandleEndProgram AST_HandleEndWhile AST_HandleFor AST_HandleForStatem +AST_HandleFunCC AST_HandleFunRC AST_HandleHeader AST_HandleIfElse @@ -59,5 +61,3 @@ _program_string _variable_string _while_string objectlist2string -AST_HandleRC -AST_HandleFunRC diff --git a/2.3-1/macros/ASTManagement/objectlist2string.bin b/2.3-1/macros/ASTManagement/objectlist2string.bin new file mode 100644 index 00000000..96159f22 Binary files /dev/null and b/2.3-1/macros/ASTManagement/objectlist2string.bin differ -- cgit From 07340fdb9cf47753da9a30dd691d105757eaefd5 Mon Sep 17 00:00:00 2001 From: ukashanoor Date: Tue, 27 Jun 2017 16:51:16 +0530 Subject: matrix complete1 --- 2.3-1/macros/ASTManagement/AST_HandleFunCC.bin | Bin 20772 -> 22244 bytes 2.3-1/macros/ASTManagement/AST_HandleFunCC.sci | 24 +++++++++++++++++------- 2.3-1/macros/ASTManagement/AST_HandleFunRC.bin | Bin 20896 -> 22288 bytes 2.3-1/macros/ASTManagement/AST_HandleFunRC.sci | 24 +++++++++++++++++------- 4 files changed, 34 insertions(+), 14 deletions(-) (limited to '2.3-1/macros/ASTManagement') diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunCC.bin b/2.3-1/macros/ASTManagement/AST_HandleFunCC.bin index 615d1471..4689450d 100644 Binary files a/2.3-1/macros/ASTManagement/AST_HandleFunCC.bin and b/2.3-1/macros/ASTManagement/AST_HandleFunCC.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci b/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci index 063cdc47..12cb577a 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci +++ b/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci @@ -160,13 +160,23 @@ for i = 1:NInArg end -PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); -OutArg(1).Type = InArg(1).Type; -OutArg(1).Size(1) = string(NRow); -OutArg(1).Size(2) = string(NCol); -OutArg(1).Dimension = 2; -OutArg(1).Value = InArg(1).Value; -OutArg(1).FindLike = InArg(1).FindLike; +if com_type == 0 + PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); + OutArg(1).Type = InArg(1).Type; + 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; +else + PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); + OutArg(1).Type = 'z'; + 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 ---// OutArg = ST_AnalyzeScope(OutArg,NOutArg,FileInfo,SharedInfo); diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunRC.bin b/2.3-1/macros/ASTManagement/AST_HandleFunRC.bin index 8b61e486..b9fcd1ff 100644 Binary files a/2.3-1/macros/ASTManagement/AST_HandleFunRC.bin and b/2.3-1/macros/ASTManagement/AST_HandleFunRC.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci b/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci index 654f04d8..10f51519 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci +++ b/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci @@ -162,13 +162,23 @@ for i = 1:NInArg end -PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); -OutArg(1).Type = InArg(1).Type; -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; +if com_type == 0 + PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); + OutArg(1).Type = InArg(1).Type; + 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; +else + PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); + OutArg(1).Type = 'z'; + 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 ---// OutArg = ST_AnalyzeScope(OutArg,NOutArg,FileInfo,SharedInfo); -- cgit From d1c244c6ad028c25544cb341967e13cbc01b7090 Mon Sep 17 00:00:00 2001 From: ukashanoor Date: Wed, 28 Jun 2017 16:30:53 +0530 Subject: float matrix done and func disp --- 2.3-1/macros/ASTManagement/%funcall_string.bin | Bin 1748 -> 2588 bytes 2.3-1/macros/ASTManagement/%funcall_string.sci | 9 +++++++++ 2.3-1/macros/ASTManagement/AST2Ccode.bin | Bin 36896 -> 37928 bytes 2.3-1/macros/ASTManagement/AST2Ccode.sci | 18 ++++++++++++++---- 2.3-1/macros/ASTManagement/AST_HandleCC.bin | Bin 10520 -> 10716 bytes 2.3-1/macros/ASTManagement/AST_HandleCC.sci | 2 ++ 2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin | Bin 100596 -> 100904 bytes 2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci | 9 +++++++-- 2.3-1/macros/ASTManagement/AST_HandleFunCC.bin | Bin 22244 -> 24100 bytes 2.3-1/macros/ASTManagement/AST_HandleFunCC.sci | 14 +++++++++++++- 2.3-1/macros/ASTManagement/AST_HandleFunRC.bin | Bin 22288 -> 22484 bytes 2.3-1/macros/ASTManagement/AST_HandleFunRC.sci | 14 +++++++++++++- 2.3-1/macros/ASTManagement/AST_HandleRC.bin | Bin 9896 -> 10092 bytes 2.3-1/macros/ASTManagement/AST_HandleRC.sci | 2 ++ 2.3-1/macros/ASTManagement/_funcall_string.bin | Bin 1748 -> 2588 bytes 2.3-1/macros/ASTManagement/_funcall_string.sci | 9 +++++++++ 16 files changed, 69 insertions(+), 8 deletions(-) (limited to '2.3-1/macros/ASTManagement') diff --git a/2.3-1/macros/ASTManagement/%funcall_string.bin b/2.3-1/macros/ASTManagement/%funcall_string.bin index 8354586d..258933b9 100644 Binary files a/2.3-1/macros/ASTManagement/%funcall_string.bin and b/2.3-1/macros/ASTManagement/%funcall_string.bin differ diff --git a/2.3-1/macros/ASTManagement/%funcall_string.sci b/2.3-1/macros/ASTManagement/%funcall_string.sci index faeb81d9..0ee97016 100644 --- a/2.3-1/macros/ASTManagement/%funcall_string.sci +++ b/2.3-1/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/2.3-1/macros/ASTManagement/AST2Ccode.bin b/2.3-1/macros/ASTManagement/AST2Ccode.bin index c6635196..337baa22 100644 Binary files a/2.3-1/macros/ASTManagement/AST2Ccode.bin and b/2.3-1/macros/ASTManagement/AST2Ccode.bin differ diff --git a/2.3-1/macros/ASTManagement/AST2Ccode.sci b/2.3-1/macros/ASTManagement/AST2Ccode.sci index f3c87aba..563f3133 100644 --- a/2.3-1/macros/ASTManagement/AST2Ccode.sci +++ b/2.3-1/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/2.3-1/macros/ASTManagement/AST_HandleCC.bin b/2.3-1/macros/ASTManagement/AST_HandleCC.bin index 0d302e4f..b9cc964a 100644 Binary files a/2.3-1/macros/ASTManagement/AST_HandleCC.bin and b/2.3-1/macros/ASTManagement/AST_HandleCC.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleCC.sci b/2.3-1/macros/ASTManagement/AST_HandleCC.sci index d0a2244b..0b9e4d9c 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleCC.sci +++ b/2.3-1/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/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin index dfbf15db..e1685ec7 100644 Binary files a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin and b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci index 9fdfbb3d..e948529b 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci +++ b/2.3-1/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/2.3-1/macros/ASTManagement/AST_HandleFunCC.bin b/2.3-1/macros/ASTManagement/AST_HandleFunCC.bin index 4689450d..e36fa6c6 100644 Binary files a/2.3-1/macros/ASTManagement/AST_HandleFunCC.bin and b/2.3-1/macros/ASTManagement/AST_HandleFunCC.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci b/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci index 12cb577a..40155bac 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci +++ b/2.3-1/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/2.3-1/macros/ASTManagement/AST_HandleFunRC.bin b/2.3-1/macros/ASTManagement/AST_HandleFunRC.bin index b9fcd1ff..70d8b561 100644 Binary files a/2.3-1/macros/ASTManagement/AST_HandleFunRC.bin and b/2.3-1/macros/ASTManagement/AST_HandleFunRC.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci b/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci index 10f51519..c08c17e7 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci +++ b/2.3-1/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/2.3-1/macros/ASTManagement/AST_HandleRC.bin b/2.3-1/macros/ASTManagement/AST_HandleRC.bin index 829fd67a..f5b8a1af 100644 Binary files a/2.3-1/macros/ASTManagement/AST_HandleRC.bin and b/2.3-1/macros/ASTManagement/AST_HandleRC.bin differ diff --git a/2.3-1/macros/ASTManagement/AST_HandleRC.sci b/2.3-1/macros/ASTManagement/AST_HandleRC.sci index 3952c8eb..2a6cbc3f 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleRC.sci +++ b/2.3-1/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/2.3-1/macros/ASTManagement/_funcall_string.bin b/2.3-1/macros/ASTManagement/_funcall_string.bin index 8354586d..258933b9 100644 Binary files a/2.3-1/macros/ASTManagement/_funcall_string.bin and b/2.3-1/macros/ASTManagement/_funcall_string.bin differ diff --git a/2.3-1/macros/ASTManagement/_funcall_string.sci b/2.3-1/macros/ASTManagement/_funcall_string.sci index faeb81d9..0ee97016 100644 --- a/2.3-1/macros/ASTManagement/_funcall_string.sci +++ b/2.3-1/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 -- cgit From 2d8050d5bd74adc66b9a45f55078791a36434be8 Mon Sep 17 00:00:00 2001 From: ukashanoor Date: Thu, 29 Jun 2017 20:26:08 +0530 Subject: till disp complete --- 2.3-1/macros/ASTManagement/AST_HandleFunRC.bin | Bin 22484 -> 24064 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to '2.3-1/macros/ASTManagement') diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunRC.bin b/2.3-1/macros/ASTManagement/AST_HandleFunRC.bin index 70d8b561..c1a8062e 100644 Binary files a/2.3-1/macros/ASTManagement/AST_HandleFunRC.bin and b/2.3-1/macros/ASTManagement/AST_HandleFunRC.bin differ -- cgit