diff options
author | ukashanoor | 2017-06-21 11:54:14 +0530 |
---|---|---|
committer | ukashanoor | 2017-06-21 11:54:14 +0530 |
commit | f25acc874a1b46a46e9f026b0f110f2df63015f8 (patch) | |
tree | f2640d9f0c8616f8cb49af322d1c6af0d873b709 /2.3-1/macros/ASTManagement | |
parent | 5975188ba7090de2d9f646102ab006e1127fd6f8 (diff) | |
download | Scilab2C-f25acc874a1b46a46e9f026b0f110f2df63015f8.tar.gz Scilab2C-f25acc874a1b46a46e9f026b0f110f2df63015f8.tar.bz2 Scilab2C-f25acc874a1b46a46e9f026b0f110f2df63015f8.zip |
inter commit
Diffstat (limited to '2.3-1/macros/ASTManagement')
67 files changed, 302 insertions, 21 deletions
diff --git a/2.3-1/macros/ASTManagement/%comment_string.bin b/2.3-1/macros/ASTManagement/%comment_string.bin Binary files differdeleted file mode 100644 index fb894945..00000000 --- a/2.3-1/macros/ASTManagement/%comment_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/%cste_string.bin b/2.3-1/macros/ASTManagement/%cste_string.bin Binary files differdeleted file mode 100644 index ba643c47..00000000 --- a/2.3-1/macros/ASTManagement/%cste_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/%equal_string.bin b/2.3-1/macros/ASTManagement/%equal_string.bin Binary files differdeleted file mode 100644 index 7f88fee6..00000000 --- a/2.3-1/macros/ASTManagement/%equal_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/%equal_string.sci b/2.3-1/macros/ASTManagement/%equal_string.sci index 9678f0e0..041fb84a 100644 --- a/2.3-1/macros/ASTManagement/%equal_string.sci +++ b/2.3-1/macros/ASTManagement/%equal_string.sci @@ -13,4 +13,4 @@ function txt=%equal_string(e) ' '+objectlist2string(e.lhs) 'EndEqual' ] -endfunction
\ No newline at end of file +endfunction diff --git a/2.3-1/macros/ASTManagement/%for_string.bin b/2.3-1/macros/ASTManagement/%for_string.bin Binary files differdeleted file mode 100644 index c3fda16b..00000000 --- a/2.3-1/macros/ASTManagement/%for_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/%funcall_string.bin b/2.3-1/macros/ASTManagement/%funcall_string.bin Binary files differdeleted file mode 100644 index 8354586d..00000000 --- a/2.3-1/macros/ASTManagement/%funcall_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/%ifthenel_string.bin b/2.3-1/macros/ASTManagement/%ifthenel_string.bin Binary files differdeleted file mode 100644 index 1c6fa73d..00000000 --- a/2.3-1/macros/ASTManagement/%ifthenel_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/%ifthenelse_string.bin b/2.3-1/macros/ASTManagement/%ifthenelse_string.bin Binary files differdeleted file mode 100644 index 456ffadc..00000000 --- a/2.3-1/macros/ASTManagement/%ifthenelse_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/%operatio_string.bin b/2.3-1/macros/ASTManagement/%operatio_string.bin Binary files differdeleted file mode 100644 index 40abf6b2..00000000 --- a/2.3-1/macros/ASTManagement/%operatio_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/%operatio_string.sci b/2.3-1/macros/ASTManagement/%operatio_string.sci index 8421a3f4..c0ecb478 100644 --- a/2.3-1/macros/ASTManagement/%operatio_string.sci +++ b/2.3-1/macros/ASTManagement/%operatio_string.sci @@ -4,10 +4,17 @@ function txt=%operatio_string(O) //fields: // operands: a list // operator: a string +if O.operator <> 'rc' txt=['Operation' ' Operands:' ' '+objectlist2string(O.operands) ' Operator: '+O.operator 'EndOperation' ] -endfunction
\ No newline at end of file +else + txt=[' Operands:' + ' '+objectlist2string(O.operands) + 'Endrc' + ] +end +endfunction diff --git a/2.3-1/macros/ASTManagement/%operation_string.bin b/2.3-1/macros/ASTManagement/%operation_string.bin Binary files differdeleted file mode 100644 index dfbeec96..00000000 --- a/2.3-1/macros/ASTManagement/%operation_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/%program_p.bin b/2.3-1/macros/ASTManagement/%program_p.bin Binary files differdeleted file mode 100644 index 216a38b2..00000000 --- a/2.3-1/macros/ASTManagement/%program_p.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/%program_string.bin b/2.3-1/macros/ASTManagement/%program_string.bin Binary files differdeleted file mode 100644 index 3a8fc95b..00000000 --- a/2.3-1/macros/ASTManagement/%program_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/%variable_string.bin b/2.3-1/macros/ASTManagement/%variable_string.bin Binary files differdeleted file mode 100644 index f81fd6e0..00000000 --- a/2.3-1/macros/ASTManagement/%variable_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/%while_string.bin b/2.3-1/macros/ASTManagement/%while_string.bin Binary files differdeleted file mode 100644 index 142189c6..00000000 --- a/2.3-1/macros/ASTManagement/%while_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST2Ccode.bin b/2.3-1/macros/ASTManagement/AST2Ccode.bin Binary files differdeleted file mode 100644 index 9daefb83..00000000 --- a/2.3-1/macros/ASTManagement/AST2Ccode.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST2Ccode.sci b/2.3-1/macros/ASTManagement/AST2Ccode.sci index 73183f79..19cf00c4 100644 --- a/2.3-1/macros/ASTManagement/AST2Ccode.sci +++ b/2.3-1/macros/ASTManagement/AST2Ccode.sci @@ -46,6 +46,9 @@ ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; // --------------------------------- // --- Parameter Initialization. --- // --------------------------------- +global rc_count +rc_count = 0; + global SCI2CSTACK SCI2CSTACK = ['EMPTYSTACK']; @@ -144,29 +147,45 @@ 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. - [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Equal'); - SharedInfo = INIT_SharedInfoEqual(SharedInfo); + if rc_count > 0 + [FileInfo,SharedInfo] = AST_HandleFunRC(FileInfo,SharedInfo); + else + [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Equal'); + SharedInfo = INIT_SharedInfoEqual(SharedInfo); + end case 'Equal' then SharedInfo.Equal.Enabled = 1; // 1 means enabled -> we are inside an equal AST block. AST_PushASTStack(treeline); case 'Lhs :' then - SharedInfo.Equal.Lhs = 1; // 1 means that we are inside the Lhs block of the Equal - //if SharedInfo.Equal.NOutArg > 0 - [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_ReadEqualRhsNames(FileInfo,SharedInfo); - SharedInfo.Equal.NInArg = EqualNInArg; - //end + disp(rc_count); + if rc_count > 0 + SharedInfo.Equal.Lhs = 1; + [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_HandleRC(FileInfo,SharedInfo); + SharedInfo.Equal.NInArg = EqualNInArg; + AST_PushASTStack(treeline); + for tmpcnt = 1:SharedInfo.Equal.NInArg + SharedInfo.Equal.InArg(tmpcnt).Name = EqualInArgName(tmpcnt); + SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt); + end + else + SharedInfo.Equal.Lhs = 1; // 1 means that we are inside the Lhs block of the Equal + //if SharedInfo.Equal.NOutArg > 0 + [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_ReadEqualRhsNames(FileInfo,SharedInfo); + SharedInfo.Equal.NInArg = EqualNInArg; + //end - // lengthNumber = length('Number_'); - // if (part(EqualInArgScope,1:lengthNumber) == 'Number_') - // SharedInfo.SkipNextEqual = 1 - // end - - for tmpcnt = 1:SharedInfo.Equal.NInArg - SharedInfo.Equal.InArg(tmpcnt).Name = EqualInArgName(tmpcnt); - SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt); - end - //end - AST_PushASTStack(treeline); + // lengthNumber = length('Number_'); + // if (part(EqualInArgScope,1:lengthNumber) == 'Number_') + // SharedInfo.SkipNextEqual = 1 + // end + + for tmpcnt = 1:SharedInfo.Equal.NInArg + SharedInfo.Equal.InArg(tmpcnt).Name = EqualInArgName(tmpcnt); + SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt); + end + //end + AST_PushASTStack(treeline); + end // ---------------- // --- If/Else. --- @@ -233,6 +252,11 @@ while ~meof(fidAST) SharedInfo = AST_HandleEndWhile(FileInfo,SharedInfo); SharedInfo.While.Level = SharedInfo.While.Level - 1; + + case 'Endrc' then + rc_count = rc_count + 1; + //[FileInfo,SharedInfo] = AST_HandleRC(FileInfo,SharedInfo); + // ---------------- // --- Default. --- // ---------------- diff --git a/2.3-1/macros/ASTManagement/AST_CheckCommonInOutArgs.bin b/2.3-1/macros/ASTManagement/AST_CheckCommonInOutArgs.bin Binary files differdeleted file mode 100644 index 5c190ba3..00000000 --- a/2.3-1/macros/ASTManagement/AST_CheckCommonInOutArgs.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_CheckLastFunc.bin b/2.3-1/macros/ASTManagement/AST_CheckLastFunc.bin Binary files differdeleted file mode 100644 index 9cac2273..00000000 --- a/2.3-1/macros/ASTManagement/AST_CheckLastFunc.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_CheckLineLength.bin b/2.3-1/macros/ASTManagement/AST_CheckLineLength.bin Binary files differdeleted file mode 100644 index db486797..00000000 --- a/2.3-1/macros/ASTManagement/AST_CheckLineLength.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_CheckPrecSpecifier.bin b/2.3-1/macros/ASTManagement/AST_CheckPrecSpecifier.bin Binary files differdeleted file mode 100644 index 8e50397f..00000000 --- a/2.3-1/macros/ASTManagement/AST_CheckPrecSpecifier.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_DisplayStack.bin b/2.3-1/macros/ASTManagement/AST_DisplayStack.bin Binary files differdeleted file mode 100644 index 90cbcc74..00000000 --- a/2.3-1/macros/ASTManagement/AST_DisplayStack.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.bin b/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.bin Binary files differdeleted file mode 100644 index 1944d88b..00000000 --- a/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_GetASTFile.bin b/2.3-1/macros/ASTManagement/AST_GetASTFile.bin Binary files differdeleted file mode 100644 index 261430e5..00000000 --- a/2.3-1/macros/ASTManagement/AST_GetASTFile.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_GetFuncallPrm.bin b/2.3-1/macros/ASTManagement/AST_GetFuncallPrm.bin Binary files differdeleted file mode 100644 index 37dbe771..00000000 --- a/2.3-1/macros/ASTManagement/AST_GetFuncallPrm.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_GetPrecAndLhsArg.bin b/2.3-1/macros/ASTManagement/AST_GetPrecAndLhsArg.bin Binary files differdeleted file mode 100644 index 71e44cb1..00000000 --- a/2.3-1/macros/ASTManagement/AST_GetPrecAndLhsArg.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_HandleEOL.bin b/2.3-1/macros/ASTManagement/AST_HandleEOL.bin Binary files differdeleted file mode 100644 index 3b6b3bd1..00000000 --- a/2.3-1/macros/ASTManagement/AST_HandleEOL.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndFor.bin b/2.3-1/macros/ASTManagement/AST_HandleEndFor.bin Binary files differdeleted file mode 100644 index a6031b43..00000000 --- a/2.3-1/macros/ASTManagement/AST_HandleEndFor.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin Binary files differdeleted file mode 100644 index 6aab0b75..00000000 --- a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndProgram.bin b/2.3-1/macros/ASTManagement/AST_HandleEndProgram.bin Binary files differdeleted file mode 100644 index 5e02fdcd..00000000 --- a/2.3-1/macros/ASTManagement/AST_HandleEndProgram.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndWhile.bin b/2.3-1/macros/ASTManagement/AST_HandleEndWhile.bin Binary files differdeleted file mode 100644 index bafccbc2..00000000 --- a/2.3-1/macros/ASTManagement/AST_HandleEndWhile.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_HandleFor.bin b/2.3-1/macros/ASTManagement/AST_HandleFor.bin Binary files differdeleted file mode 100644 index 27d44a12..00000000 --- a/2.3-1/macros/ASTManagement/AST_HandleFor.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_HandleForStatem.bin b/2.3-1/macros/ASTManagement/AST_HandleForStatem.bin Binary files differdeleted file mode 100644 index 4839b049..00000000 --- a/2.3-1/macros/ASTManagement/AST_HandleForStatem.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci b/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci new file mode 100644 index 00000000..a70155a7 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci @@ -0,0 +1,165 @@ +function [FileInfo,SharedInfo] = AST_HandleEndGenFun(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 +// ----------------------------------------------------------------- + +// ------------------------------ +// --- 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(); +NInArg = 0; +InArg = []; +while (RhsField ~= 'Expression:') + NInArg = NInArg + 1; + InArg(NInArg) = RhsField; + RhsField = AST_PopASTStack(); +end +InputArgumentNames = SCI2Cflipud(InputArgumentNames); +InputArgumentScope = SCI2Cflipud(InputArgumentScope); + + +// ------------------------------------- +// --- Generate the InArg structure. --- +// ------------------------------------- +//#RNU_RES_E +InArg = []; +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 + +// ------------------------ +// --- 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'); + +size_count = 0; +for i = 1:NInArg + size_count = size_count + InArg(i).Size(2); +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).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(OutArg,NOutArg,FileInfo,SharedInfo,'all'); + + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleHeader.bin b/2.3-1/macros/ASTManagement/AST_HandleHeader.bin Binary files differdeleted file mode 100644 index 87ef763a..00000000 --- a/2.3-1/macros/ASTManagement/AST_HandleHeader.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_HandleIfElse.bin b/2.3-1/macros/ASTManagement/AST_HandleIfElse.bin Binary files differdeleted file mode 100644 index d30e47b4..00000000 --- a/2.3-1/macros/ASTManagement/AST_HandleIfElse.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_HandleRC.sci b/2.3-1/macros/ASTManagement/AST_HandleRC.sci new file mode 100644 index 00000000..b1a1003f --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleRC.sci @@ -0,0 +1,81 @@ +function [RhsNames,RhsScope,NRhs] = AST_ReadEqualRhsNames(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) ~= 'Operands:') + NRhs = NRhs + 1; + [RhsNames(NRhs),RhsScope(NRhs)] = AST_ExtractNameAndScope(RhsField(cntpop)); + cntpop = cntpop + 1; + RhsField(cntpop) = AST_PopASTStack(); +end +RhsNames = SCI2Cflipud(RhsNames); +RhsScope = SCI2Cflipud(RhsScope); + +// --- Repush everything into the stack. --- +for cntpush = cntpop:-1:1 + AST_PushASTStack(RhsField(cntpush)); +end + + +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'); + //#RNU_RES_E +end + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleWhileExpr.bin b/2.3-1/macros/ASTManagement/AST_HandleWhileExpr.bin Binary files differdeleted file mode 100644 index 5f3da2de..00000000 --- a/2.3-1/macros/ASTManagement/AST_HandleWhileExpr.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_HandleWhileStatem.bin b/2.3-1/macros/ASTManagement/AST_HandleWhileStatem.bin Binary files differdeleted file mode 100644 index 4f7704ea..00000000 --- a/2.3-1/macros/ASTManagement/AST_HandleWhileStatem.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.bin b/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.bin Binary files differdeleted file mode 100644 index 459c62e8..00000000 --- a/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.sci b/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.sci index fa76a01d..68bc3da7 100644 --- a/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.sci +++ b/2.3-1/macros/ASTManagement/AST_ParseEqualStruct.sci @@ -123,7 +123,7 @@ end // ------------------------ //#RNU_RES_B PrintStringInfo('Function Name: '+FunctionName,ReportFileName,'file','y','n'); -PrintStringInfo('N Intput Arguments: '+string(NInArg),ReportFileName,'file','y','n'); +PrintStringInfo('N Input Arguments: '+string(NInArg),ReportFileName,'file','y','n'); //#RNU_RES_E if (SharedInfo.Equal.Nins > 0) //#RNU_RES_B diff --git a/2.3-1/macros/ASTManagement/AST_ParseFuncallStruct.bin b/2.3-1/macros/ASTManagement/AST_ParseFuncallStruct.bin Binary files differdeleted file mode 100644 index 1cbeb5c0..00000000 --- a/2.3-1/macros/ASTManagement/AST_ParseFuncallStruct.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.bin b/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.bin Binary files differdeleted file mode 100644 index 19ea5fe9..00000000 --- a/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_ParseOperStruct.bin b/2.3-1/macros/ASTManagement/AST_ParseOperStruct.bin Binary files differdeleted file mode 100644 index e189cbc9..00000000 --- a/2.3-1/macros/ASTManagement/AST_ParseOperStruct.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_PopASTStack.bin b/2.3-1/macros/ASTManagement/AST_PopASTStack.bin Binary files differdeleted file mode 100644 index f9b85d34..00000000 --- a/2.3-1/macros/ASTManagement/AST_PopASTStack.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_PushASTStack.bin b/2.3-1/macros/ASTManagement/AST_PushASTStack.bin Binary files differdeleted file mode 100644 index 8fcd563c..00000000 --- a/2.3-1/macros/ASTManagement/AST_PushASTStack.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_ReadASTHeader.bin b/2.3-1/macros/ASTManagement/AST_ReadASTHeader.bin Binary files differdeleted file mode 100644 index 614231c4..00000000 --- a/2.3-1/macros/ASTManagement/AST_ReadASTHeader.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/AST_ReadEqualRhsNames.bin b/2.3-1/macros/ASTManagement/AST_ReadEqualRhsNames.bin Binary files differdeleted file mode 100644 index a131c498..00000000 --- a/2.3-1/macros/ASTManagement/AST_ReadEqualRhsNames.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/GenOutArgNames.bin b/2.3-1/macros/ASTManagement/GenOutArgNames.bin Binary files differdeleted file mode 100644 index 2ebce86c..00000000 --- a/2.3-1/macros/ASTManagement/GenOutArgNames.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/Operator2FunName.bin b/2.3-1/macros/ASTManagement/Operator2FunName.bin Binary files differdeleted file mode 100644 index 884c99bc..00000000 --- a/2.3-1/macros/ASTManagement/Operator2FunName.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/SciFile2ASTFile.bin b/2.3-1/macros/ASTManagement/SciFile2ASTFile.bin Binary files differdeleted file mode 100644 index be8bc0d5..00000000 --- a/2.3-1/macros/ASTManagement/SciFile2ASTFile.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/_comment_string.bin b/2.3-1/macros/ASTManagement/_comment_string.bin Binary files differdeleted file mode 100644 index fb894945..00000000 --- a/2.3-1/macros/ASTManagement/_comment_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/_cste_string.bin b/2.3-1/macros/ASTManagement/_cste_string.bin Binary files differdeleted file mode 100644 index ba643c47..00000000 --- a/2.3-1/macros/ASTManagement/_cste_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/_equal_string.bin b/2.3-1/macros/ASTManagement/_equal_string.bin Binary files differdeleted file mode 100644 index 7f88fee6..00000000 --- a/2.3-1/macros/ASTManagement/_equal_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/_for_string.bin b/2.3-1/macros/ASTManagement/_for_string.bin Binary files differdeleted file mode 100644 index c3fda16b..00000000 --- a/2.3-1/macros/ASTManagement/_for_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/_funcall_string.bin b/2.3-1/macros/ASTManagement/_funcall_string.bin Binary files differdeleted file mode 100644 index 8354586d..00000000 --- a/2.3-1/macros/ASTManagement/_funcall_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/_ifthenel_string.bin b/2.3-1/macros/ASTManagement/_ifthenel_string.bin Binary files differdeleted file mode 100644 index 1c6fa73d..00000000 --- a/2.3-1/macros/ASTManagement/_ifthenel_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/_ifthenelse_string.bin b/2.3-1/macros/ASTManagement/_ifthenelse_string.bin Binary files differdeleted file mode 100644 index 456ffadc..00000000 --- a/2.3-1/macros/ASTManagement/_ifthenelse_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/_operatio_string.bin b/2.3-1/macros/ASTManagement/_operatio_string.bin Binary files differdeleted file mode 100644 index 40abf6b2..00000000 --- a/2.3-1/macros/ASTManagement/_operatio_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/_operation_string.bin b/2.3-1/macros/ASTManagement/_operation_string.bin Binary files differdeleted file mode 100644 index dfbeec96..00000000 --- a/2.3-1/macros/ASTManagement/_operation_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/_program_p.bin b/2.3-1/macros/ASTManagement/_program_p.bin Binary files differdeleted file mode 100644 index 216a38b2..00000000 --- a/2.3-1/macros/ASTManagement/_program_p.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/_program_string.bin b/2.3-1/macros/ASTManagement/_program_string.bin Binary files differdeleted file mode 100644 index 3a8fc95b..00000000 --- a/2.3-1/macros/ASTManagement/_program_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/_variable_string.bin b/2.3-1/macros/ASTManagement/_variable_string.bin Binary files differdeleted file mode 100644 index f81fd6e0..00000000 --- a/2.3-1/macros/ASTManagement/_variable_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/_while_string.bin b/2.3-1/macros/ASTManagement/_while_string.bin Binary files differdeleted file mode 100644 index 142189c6..00000000 --- a/2.3-1/macros/ASTManagement/_while_string.bin +++ /dev/null diff --git a/2.3-1/macros/ASTManagement/lib b/2.3-1/macros/ASTManagement/lib Binary files differindex 42ffc2a7..c73eb6b2 100644 --- a/2.3-1/macros/ASTManagement/lib +++ b/2.3-1/macros/ASTManagement/lib diff --git a/2.3-1/macros/ASTManagement/names b/2.3-1/macros/ASTManagement/names index a1aafbc1..26edaf7c 100644 --- a/2.3-1/macros/ASTManagement/names +++ b/2.3-1/macros/ASTManagement/names @@ -28,8 +28,10 @@ AST_HandleEndProgram AST_HandleEndWhile AST_HandleFor AST_HandleForStatem +AST_HandleFunRC AST_HandleHeader AST_HandleIfElse +AST_HandleRC AST_HandleWhileExpr AST_HandleWhileStatem AST_ParseEqualStruct @@ -57,3 +59,5 @@ _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 Binary files differdeleted file mode 100644 index 96159f22..00000000 --- a/2.3-1/macros/ASTManagement/objectlist2string.bin +++ /dev/null |