diff options
author | yash1112 | 2017-07-10 17:08:48 +0530 |
---|---|---|
committer | yash1112 | 2017-07-10 17:08:48 +0530 |
commit | 09d11751736a5812ebfc22cd488f51de02e5375a (patch) | |
tree | 603cb29022e575db10ab26fbb75a5cc5bdf01ad8 /2.3-1/macros/ASTManagement | |
parent | 26ab8620e89571314bc1a828bd9aca3d288eaede (diff) | |
download | Scilab2C-09d11751736a5812ebfc22cd488f51de02e5375a.tar.gz Scilab2C-09d11751736a5812ebfc22cd488f51de02e5375a.tar.bz2 Scilab2C-09d11751736a5812ebfc22cd488f51de02e5375a.zip |
Arduino toolbox error Resolved
Diffstat (limited to '2.3-1/macros/ASTManagement')
-rw-r--r-- | 2.3-1/macros/ASTManagement/AST2Ccode.sci | 18 | ||||
-rw-r--r-- | 2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci | 4 |
2 files changed, 22 insertions, 0 deletions
diff --git a/2.3-1/macros/ASTManagement/AST2Ccode.sci b/2.3-1/macros/ASTManagement/AST2Ccode.sci index 516291a8..20aa999e 100644 --- a/2.3-1/macros/ASTManagement/AST2Ccode.sci +++ b/2.3-1/macros/ASTManagement/AST2Ccode.sci @@ -43,6 +43,8 @@ load(FileInfo.SharedInfoDatFile,'SharedInfo'); nxtscifunname = SharedInfo.NextSCIFunName; nxtscifunnumber = SharedInfo.NextSCIFunNumber; ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +SharedInfo.Function_list = []; +SharedInfo.Function_list_index = 1; // --------------------------------- // --- Parameter Initialization. --- @@ -299,6 +301,22 @@ while ~meof(fidAST) AST_PushASTStack(treeline); end end +// ------------------------------------ +// -----List of functions Used-------- +// ------------------------------------- + +SharedInfo.Function_list_index = SharedInfo.Function_list_index - 2; +SharedInfo.Function_list = SharedInfo.Function_list(1:SharedInfo.Function_list_index); +//To remove function repeatedly used---------- +x = size(unique(SharedInfo.Function_list)); +SharedInfo.Function_list_index = x(1); +SharedInfo.Function_list = unique(SharedInfo.Function_list); + +SharedInfo.Function_list = SharedInfo.Function_list(1:SharedInfo.Function_list_index); + + + + // -------------------------------------- // --- End main loop to read the AST. --- // -------------------------------------- diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci index e191f106..79ec976c 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci +++ b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci @@ -75,6 +75,10 @@ disp_isthere = 0; //NUT: verifica se ASTFunType e' veramente importante // #RNU_RES_E [ASTFunName,InArg,NInArg,OutArg,NOutArg] = AST_GetFuncallPrm(FileInfo,SharedInfo,ASTFunType); +if (ASTFunType=='Funcall') +SharedInfo.Function_list(SharedInfo.Function_list_index) = ASTFunName; +SharedInfo.Function_list_index = SharedInfo.Function_list_index + 1; +end NOutArg_mod = NOutArg if ASTFunName == 'OpLogAnd' AST_PushASTStack('&&'); |