From 369c257b9ae0320621b43ca75b38ff66cc13f37b Mon Sep 17 00:00:00 2001 From: yash1112 Date: Mon, 19 Jun 2017 05:40:46 +0530 Subject: 1.3 new scilab-arduino functions added2. all functions have been tested on hardware 3. 5 i2c library functions added 4. Now generates code for 27 Boards(arduino and lilypad). 5. New GUI --- macros/SymbolTable/ST_AnalyzeScope.bin | Bin 0 -> 16792 bytes macros/SymbolTable/ST_Del.bin | Bin 0 -> 4552 bytes macros/SymbolTable/ST_FindPos.bin | Bin 0 -> 5104 bytes macros/SymbolTable/ST_Get.bin | Bin 0 -> 8108 bytes macros/SymbolTable/ST_GetInArgInfo.bin | Bin 0 -> 39244 bytes macros/SymbolTable/ST_GetInArgInfo.sci | 15 +++++++++++++-- macros/SymbolTable/ST_GetSymbolInfo.bin | Bin 0 -> 13320 bytes macros/SymbolTable/ST_InsForCntVars.bin | Bin 0 -> 25508 bytes macros/SymbolTable/ST_InsOutArg.bin | Bin 0 -> 33508 bytes macros/SymbolTable/ST_InsOutArg.sci | 2 -- macros/SymbolTable/ST_Load.bin | Bin 0 -> 4288 bytes macros/SymbolTable/ST_MatchSymbol.bin | Bin 0 -> 9112 bytes macros/SymbolTable/ST_Save.bin | Bin 0 -> 5440 bytes macros/SymbolTable/ST_Set.bin | Bin 0 -> 7048 bytes macros/SymbolTable/lib | Bin 1199 -> 752 bytes 15 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 macros/SymbolTable/ST_AnalyzeScope.bin create mode 100644 macros/SymbolTable/ST_Del.bin create mode 100644 macros/SymbolTable/ST_FindPos.bin create mode 100644 macros/SymbolTable/ST_Get.bin create mode 100644 macros/SymbolTable/ST_GetInArgInfo.bin create mode 100644 macros/SymbolTable/ST_GetSymbolInfo.bin create mode 100644 macros/SymbolTable/ST_InsForCntVars.bin create mode 100644 macros/SymbolTable/ST_InsOutArg.bin create mode 100644 macros/SymbolTable/ST_Load.bin create mode 100644 macros/SymbolTable/ST_MatchSymbol.bin create mode 100644 macros/SymbolTable/ST_Save.bin create mode 100644 macros/SymbolTable/ST_Set.bin (limited to 'macros/SymbolTable') diff --git a/macros/SymbolTable/ST_AnalyzeScope.bin b/macros/SymbolTable/ST_AnalyzeScope.bin new file mode 100644 index 00000000..7e727a04 Binary files /dev/null and b/macros/SymbolTable/ST_AnalyzeScope.bin differ diff --git a/macros/SymbolTable/ST_Del.bin b/macros/SymbolTable/ST_Del.bin new file mode 100644 index 00000000..c26e2e58 Binary files /dev/null and b/macros/SymbolTable/ST_Del.bin differ diff --git a/macros/SymbolTable/ST_FindPos.bin b/macros/SymbolTable/ST_FindPos.bin new file mode 100644 index 00000000..c7003f30 Binary files /dev/null and b/macros/SymbolTable/ST_FindPos.bin differ diff --git a/macros/SymbolTable/ST_Get.bin b/macros/SymbolTable/ST_Get.bin new file mode 100644 index 00000000..512e72b7 Binary files /dev/null and b/macros/SymbolTable/ST_Get.bin differ diff --git a/macros/SymbolTable/ST_GetInArgInfo.bin b/macros/SymbolTable/ST_GetInArgInfo.bin new file mode 100644 index 00000000..97512b3a Binary files /dev/null and b/macros/SymbolTable/ST_GetInArgInfo.bin differ diff --git a/macros/SymbolTable/ST_GetInArgInfo.sci b/macros/SymbolTable/ST_GetInArgInfo.sci index 9f5cbd4e..4c85408c 100644 --- a/macros/SymbolTable/ST_GetInArgInfo.sci +++ b/macros/SymbolTable/ST_GetInArgInfo.sci @@ -49,13 +49,13 @@ for cntinarg = 1:NInArg tmpname = InArg(cntinarg).Name; tmpscope = InArg(cntinarg).Scope; lengthNumber = length('Number_'); - if (part(tmpscope,1:lengthNumber) == 'Number_') + if (part(tmpscope,1:lengthNumber) == 'Number_') // #RNU_RES_B PrintStringInfo('Input Argument '+string(cntinarg)+' is a number: '+tmpname+'.',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file'); // #RNU_RES_E UpdatedInArg(cntinarg).Type = part(tmpscope,lengthNumber+1:lengthNumber+1); if (UpdatedInArg(cntinarg).Type == 'x') - UpdatedInArg(cntinarg).Type = SharedInfo.DefaultPrecision; // It is the default. + UpdatedInArg(cntinarg).Type = SharedInfo.DefaultPrecision; // It is the default elseif (UpdatedInArg(cntinarg).Type == 'X') if (SharedInfo.DefaultPrecision == 's') UpdatedInArg(cntinarg).Type = 'c'; // It is the default. @@ -101,6 +101,17 @@ for cntinarg = 1:NInArg UpdatedInArg(cntinarg).FindLike = 0; UpdatedInArg(cntinarg).Dimension = 0; UpdatedInArg(cntinarg).Scope = 'Number'; + if((ASTFunName == 'cmd_analog_in' | ASTFunName == 'cmd_analog_in_volt' ) & cntinarg == 2) + numvalue = eval(tmpname); + if (SharedInfo.Board_name == 'mega' | SharedInfo.Board_name == 'mega2560') then + tmpname = string(numvalue + 54) + UpdatedInArg(cntinarg).Value = 54 + numvalue; + else + tmpname = string(numvalue + 14) + UpdatedInArg(cntinarg).Value = 14 + numvalue; + end + UpdatedInArg(cntinarg).Name = tmpname; // Change the name. + end elseif (tmpscope == 'String') // #RNU_RES_B diff --git a/macros/SymbolTable/ST_GetSymbolInfo.bin b/macros/SymbolTable/ST_GetSymbolInfo.bin new file mode 100644 index 00000000..b8a7cf74 Binary files /dev/null and b/macros/SymbolTable/ST_GetSymbolInfo.bin differ diff --git a/macros/SymbolTable/ST_InsForCntVars.bin b/macros/SymbolTable/ST_InsForCntVars.bin new file mode 100644 index 00000000..12882fc7 Binary files /dev/null and b/macros/SymbolTable/ST_InsForCntVars.bin differ diff --git a/macros/SymbolTable/ST_InsOutArg.bin b/macros/SymbolTable/ST_InsOutArg.bin new file mode 100644 index 00000000..7571456a Binary files /dev/null and b/macros/SymbolTable/ST_InsOutArg.bin differ diff --git a/macros/SymbolTable/ST_InsOutArg.sci b/macros/SymbolTable/ST_InsOutArg.sci index f4958ff7..fd6b426c 100644 --- a/macros/SymbolTable/ST_InsOutArg.sci +++ b/macros/SymbolTable/ST_InsOutArg.sci @@ -47,8 +47,6 @@ PrintStringInfo('***Putting output arguments in the symbol table***',ReportFileN // --------------------------- // --- End Initialization. --- // --------------------------- - - for counteroutput = 1:NOutArg // #RNU_RES_B PrintStringInfo(' Symbol ""'+OutArg(counteroutput).Name+'""',ReportFileName,'file','y','n'); diff --git a/macros/SymbolTable/ST_Load.bin b/macros/SymbolTable/ST_Load.bin new file mode 100644 index 00000000..f158c2b6 Binary files /dev/null and b/macros/SymbolTable/ST_Load.bin differ diff --git a/macros/SymbolTable/ST_MatchSymbol.bin b/macros/SymbolTable/ST_MatchSymbol.bin new file mode 100644 index 00000000..278560d0 Binary files /dev/null and b/macros/SymbolTable/ST_MatchSymbol.bin differ diff --git a/macros/SymbolTable/ST_Save.bin b/macros/SymbolTable/ST_Save.bin new file mode 100644 index 00000000..4aa50a20 Binary files /dev/null and b/macros/SymbolTable/ST_Save.bin differ diff --git a/macros/SymbolTable/ST_Set.bin b/macros/SymbolTable/ST_Set.bin new file mode 100644 index 00000000..cbd26274 Binary files /dev/null and b/macros/SymbolTable/ST_Set.bin differ diff --git a/macros/SymbolTable/lib b/macros/SymbolTable/lib index dbc603e2..59ce4653 100644 Binary files a/macros/SymbolTable/lib and b/macros/SymbolTable/lib differ -- cgit From 8e235230a4c16a042d2620fa7b58a9b0f4ba1914 Mon Sep 17 00:00:00 2001 From: ukashanoor Date: Mon, 19 Jun 2017 10:42:03 +0530 Subject: after if and for --- macros/SymbolTable/ST_AnalyzeScope.bin | Bin 0 -> 16792 bytes macros/SymbolTable/ST_Del.bin | Bin 0 -> 4552 bytes macros/SymbolTable/ST_FindPos.bin | Bin 0 -> 5104 bytes macros/SymbolTable/ST_Get.bin | Bin 0 -> 8108 bytes macros/SymbolTable/ST_GetInArgInfo.bin | Bin 0 -> 37384 bytes macros/SymbolTable/ST_GetSymbolInfo.bin | Bin 0 -> 13320 bytes macros/SymbolTable/ST_InsForCntVars.bin | Bin 0 -> 25508 bytes macros/SymbolTable/ST_InsOutArg.bin | Bin 0 -> 33516 bytes macros/SymbolTable/ST_Load.bin | Bin 0 -> 4288 bytes macros/SymbolTable/ST_MatchSymbol.bin | Bin 0 -> 9112 bytes macros/SymbolTable/ST_Save.bin | Bin 0 -> 5440 bytes macros/SymbolTable/ST_Set.bin | Bin 0 -> 7048 bytes macros/SymbolTable/lib | Bin 1199 -> 632 bytes 13 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 macros/SymbolTable/ST_AnalyzeScope.bin create mode 100644 macros/SymbolTable/ST_Del.bin create mode 100644 macros/SymbolTable/ST_FindPos.bin create mode 100644 macros/SymbolTable/ST_Get.bin create mode 100644 macros/SymbolTable/ST_GetInArgInfo.bin create mode 100644 macros/SymbolTable/ST_GetSymbolInfo.bin create mode 100644 macros/SymbolTable/ST_InsForCntVars.bin create mode 100644 macros/SymbolTable/ST_InsOutArg.bin create mode 100644 macros/SymbolTable/ST_Load.bin create mode 100644 macros/SymbolTable/ST_MatchSymbol.bin create mode 100644 macros/SymbolTable/ST_Save.bin create mode 100644 macros/SymbolTable/ST_Set.bin (limited to 'macros/SymbolTable') diff --git a/macros/SymbolTable/ST_AnalyzeScope.bin b/macros/SymbolTable/ST_AnalyzeScope.bin new file mode 100644 index 00000000..7e727a04 Binary files /dev/null and b/macros/SymbolTable/ST_AnalyzeScope.bin differ diff --git a/macros/SymbolTable/ST_Del.bin b/macros/SymbolTable/ST_Del.bin new file mode 100644 index 00000000..c26e2e58 Binary files /dev/null and b/macros/SymbolTable/ST_Del.bin differ diff --git a/macros/SymbolTable/ST_FindPos.bin b/macros/SymbolTable/ST_FindPos.bin new file mode 100644 index 00000000..c7003f30 Binary files /dev/null and b/macros/SymbolTable/ST_FindPos.bin differ diff --git a/macros/SymbolTable/ST_Get.bin b/macros/SymbolTable/ST_Get.bin new file mode 100644 index 00000000..512e72b7 Binary files /dev/null and b/macros/SymbolTable/ST_Get.bin differ diff --git a/macros/SymbolTable/ST_GetInArgInfo.bin b/macros/SymbolTable/ST_GetInArgInfo.bin new file mode 100644 index 00000000..6eb16e37 Binary files /dev/null and b/macros/SymbolTable/ST_GetInArgInfo.bin differ diff --git a/macros/SymbolTable/ST_GetSymbolInfo.bin b/macros/SymbolTable/ST_GetSymbolInfo.bin new file mode 100644 index 00000000..b8a7cf74 Binary files /dev/null and b/macros/SymbolTable/ST_GetSymbolInfo.bin differ diff --git a/macros/SymbolTable/ST_InsForCntVars.bin b/macros/SymbolTable/ST_InsForCntVars.bin new file mode 100644 index 00000000..12882fc7 Binary files /dev/null and b/macros/SymbolTable/ST_InsForCntVars.bin differ diff --git a/macros/SymbolTable/ST_InsOutArg.bin b/macros/SymbolTable/ST_InsOutArg.bin new file mode 100644 index 00000000..ec9970cb Binary files /dev/null and b/macros/SymbolTable/ST_InsOutArg.bin differ diff --git a/macros/SymbolTable/ST_Load.bin b/macros/SymbolTable/ST_Load.bin new file mode 100644 index 00000000..f158c2b6 Binary files /dev/null and b/macros/SymbolTable/ST_Load.bin differ diff --git a/macros/SymbolTable/ST_MatchSymbol.bin b/macros/SymbolTable/ST_MatchSymbol.bin new file mode 100644 index 00000000..278560d0 Binary files /dev/null and b/macros/SymbolTable/ST_MatchSymbol.bin differ diff --git a/macros/SymbolTable/ST_Save.bin b/macros/SymbolTable/ST_Save.bin new file mode 100644 index 00000000..4aa50a20 Binary files /dev/null and b/macros/SymbolTable/ST_Save.bin differ diff --git a/macros/SymbolTable/ST_Set.bin b/macros/SymbolTable/ST_Set.bin new file mode 100644 index 00000000..cbd26274 Binary files /dev/null and b/macros/SymbolTable/ST_Set.bin differ diff --git a/macros/SymbolTable/lib b/macros/SymbolTable/lib index dbc603e2..4e2f0193 100644 Binary files a/macros/SymbolTable/lib and b/macros/SymbolTable/lib differ -- cgit From 785e19f097f7ca1964edaf159c9adfe2eda733b5 Mon Sep 17 00:00:00 2001 From: ukashanoor Date: Wed, 21 Jun 2017 11:54:14 +0530 Subject: inter commit --- macros/SymbolTable/ST_AnalyzeScope.bin | Bin 16792 -> 0 bytes macros/SymbolTable/ST_Del.bin | Bin 4552 -> 0 bytes macros/SymbolTable/ST_FindPos.bin | Bin 5104 -> 0 bytes macros/SymbolTable/ST_Get.bin | Bin 8108 -> 0 bytes macros/SymbolTable/ST_GetInArgInfo.bin | Bin 37384 -> 0 bytes macros/SymbolTable/ST_GetSymbolInfo.bin | Bin 13320 -> 0 bytes macros/SymbolTable/ST_InsForCntVars.bin | Bin 25508 -> 0 bytes macros/SymbolTable/ST_InsOutArg.bin | Bin 33516 -> 0 bytes macros/SymbolTable/ST_Load.bin | Bin 4288 -> 0 bytes macros/SymbolTable/ST_MatchSymbol.bin | Bin 9112 -> 0 bytes macros/SymbolTable/ST_Save.bin | Bin 5440 -> 0 bytes macros/SymbolTable/ST_Set.bin | Bin 7048 -> 0 bytes 12 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 macros/SymbolTable/ST_AnalyzeScope.bin delete mode 100644 macros/SymbolTable/ST_Del.bin delete mode 100644 macros/SymbolTable/ST_FindPos.bin delete mode 100644 macros/SymbolTable/ST_Get.bin delete mode 100644 macros/SymbolTable/ST_GetInArgInfo.bin delete mode 100644 macros/SymbolTable/ST_GetSymbolInfo.bin delete mode 100644 macros/SymbolTable/ST_InsForCntVars.bin delete mode 100644 macros/SymbolTable/ST_InsOutArg.bin delete mode 100644 macros/SymbolTable/ST_Load.bin delete mode 100644 macros/SymbolTable/ST_MatchSymbol.bin delete mode 100644 macros/SymbolTable/ST_Save.bin delete mode 100644 macros/SymbolTable/ST_Set.bin (limited to 'macros/SymbolTable') diff --git a/macros/SymbolTable/ST_AnalyzeScope.bin b/macros/SymbolTable/ST_AnalyzeScope.bin deleted file mode 100644 index 7e727a04..00000000 Binary files a/macros/SymbolTable/ST_AnalyzeScope.bin and /dev/null differ diff --git a/macros/SymbolTable/ST_Del.bin b/macros/SymbolTable/ST_Del.bin deleted file mode 100644 index c26e2e58..00000000 Binary files a/macros/SymbolTable/ST_Del.bin and /dev/null differ diff --git a/macros/SymbolTable/ST_FindPos.bin b/macros/SymbolTable/ST_FindPos.bin deleted file mode 100644 index c7003f30..00000000 Binary files a/macros/SymbolTable/ST_FindPos.bin and /dev/null differ diff --git a/macros/SymbolTable/ST_Get.bin b/macros/SymbolTable/ST_Get.bin deleted file mode 100644 index 512e72b7..00000000 Binary files a/macros/SymbolTable/ST_Get.bin and /dev/null differ diff --git a/macros/SymbolTable/ST_GetInArgInfo.bin b/macros/SymbolTable/ST_GetInArgInfo.bin deleted file mode 100644 index 6eb16e37..00000000 Binary files a/macros/SymbolTable/ST_GetInArgInfo.bin and /dev/null differ diff --git a/macros/SymbolTable/ST_GetSymbolInfo.bin b/macros/SymbolTable/ST_GetSymbolInfo.bin deleted file mode 100644 index b8a7cf74..00000000 Binary files a/macros/SymbolTable/ST_GetSymbolInfo.bin and /dev/null differ diff --git a/macros/SymbolTable/ST_InsForCntVars.bin b/macros/SymbolTable/ST_InsForCntVars.bin deleted file mode 100644 index 12882fc7..00000000 Binary files a/macros/SymbolTable/ST_InsForCntVars.bin and /dev/null differ diff --git a/macros/SymbolTable/ST_InsOutArg.bin b/macros/SymbolTable/ST_InsOutArg.bin deleted file mode 100644 index ec9970cb..00000000 Binary files a/macros/SymbolTable/ST_InsOutArg.bin and /dev/null differ diff --git a/macros/SymbolTable/ST_Load.bin b/macros/SymbolTable/ST_Load.bin deleted file mode 100644 index f158c2b6..00000000 Binary files a/macros/SymbolTable/ST_Load.bin and /dev/null differ diff --git a/macros/SymbolTable/ST_MatchSymbol.bin b/macros/SymbolTable/ST_MatchSymbol.bin deleted file mode 100644 index 278560d0..00000000 Binary files a/macros/SymbolTable/ST_MatchSymbol.bin and /dev/null differ diff --git a/macros/SymbolTable/ST_Save.bin b/macros/SymbolTable/ST_Save.bin deleted file mode 100644 index 4aa50a20..00000000 Binary files a/macros/SymbolTable/ST_Save.bin and /dev/null differ diff --git a/macros/SymbolTable/ST_Set.bin b/macros/SymbolTable/ST_Set.bin deleted file mode 100644 index cbd26274..00000000 Binary files a/macros/SymbolTable/ST_Set.bin and /dev/null differ -- cgit From 956aa2b9bcf6171234bc9749acbfabf8660beade Mon Sep 17 00:00:00 2001 From: ukashanoor Date: Tue, 27 Jun 2017 12:40:50 +0530 Subject: matrix complete --- macros/SymbolTable/ST_AnalyzeScope.bin | Bin 0 -> 16792 bytes macros/SymbolTable/ST_Del.bin | Bin 0 -> 4552 bytes macros/SymbolTable/ST_FindPos.bin | Bin 0 -> 5104 bytes macros/SymbolTable/ST_Get.bin | Bin 0 -> 8108 bytes macros/SymbolTable/ST_GetInArgInfo.bin | Bin 0 -> 37384 bytes macros/SymbolTable/ST_GetSymbolInfo.bin | Bin 0 -> 13320 bytes macros/SymbolTable/ST_InsForCntVars.bin | Bin 0 -> 25508 bytes macros/SymbolTable/ST_InsOutArg.bin | Bin 0 -> 33516 bytes macros/SymbolTable/ST_InsOutArg_Dup.bin | Bin 0 -> 33636 bytes macros/SymbolTable/ST_InsOutArg_Dup.sci | 194 ++++++++++++++++++++++++++++++++ macros/SymbolTable/ST_Load.bin | Bin 0 -> 4288 bytes macros/SymbolTable/ST_MatchSymbol.bin | Bin 0 -> 9112 bytes macros/SymbolTable/ST_Save.bin | Bin 0 -> 5440 bytes macros/SymbolTable/ST_Set.bin | Bin 0 -> 7048 bytes macros/SymbolTable/lib | Bin 632 -> 656 bytes macros/SymbolTable/names | 1 + 16 files changed, 195 insertions(+) create mode 100644 macros/SymbolTable/ST_AnalyzeScope.bin create mode 100644 macros/SymbolTable/ST_Del.bin create mode 100644 macros/SymbolTable/ST_FindPos.bin create mode 100644 macros/SymbolTable/ST_Get.bin create mode 100644 macros/SymbolTable/ST_GetInArgInfo.bin create mode 100644 macros/SymbolTable/ST_GetSymbolInfo.bin create mode 100644 macros/SymbolTable/ST_InsForCntVars.bin create mode 100644 macros/SymbolTable/ST_InsOutArg.bin create mode 100644 macros/SymbolTable/ST_InsOutArg_Dup.bin create mode 100644 macros/SymbolTable/ST_InsOutArg_Dup.sci create mode 100644 macros/SymbolTable/ST_Load.bin create mode 100644 macros/SymbolTable/ST_MatchSymbol.bin create mode 100644 macros/SymbolTable/ST_Save.bin create mode 100644 macros/SymbolTable/ST_Set.bin (limited to 'macros/SymbolTable') diff --git a/macros/SymbolTable/ST_AnalyzeScope.bin b/macros/SymbolTable/ST_AnalyzeScope.bin new file mode 100644 index 00000000..7e727a04 Binary files /dev/null and b/macros/SymbolTable/ST_AnalyzeScope.bin differ diff --git a/macros/SymbolTable/ST_Del.bin b/macros/SymbolTable/ST_Del.bin new file mode 100644 index 00000000..c26e2e58 Binary files /dev/null and b/macros/SymbolTable/ST_Del.bin differ diff --git a/macros/SymbolTable/ST_FindPos.bin b/macros/SymbolTable/ST_FindPos.bin new file mode 100644 index 00000000..c7003f30 Binary files /dev/null and b/macros/SymbolTable/ST_FindPos.bin differ diff --git a/macros/SymbolTable/ST_Get.bin b/macros/SymbolTable/ST_Get.bin new file mode 100644 index 00000000..512e72b7 Binary files /dev/null and b/macros/SymbolTable/ST_Get.bin differ diff --git a/macros/SymbolTable/ST_GetInArgInfo.bin b/macros/SymbolTable/ST_GetInArgInfo.bin new file mode 100644 index 00000000..6eb16e37 Binary files /dev/null and b/macros/SymbolTable/ST_GetInArgInfo.bin differ diff --git a/macros/SymbolTable/ST_GetSymbolInfo.bin b/macros/SymbolTable/ST_GetSymbolInfo.bin new file mode 100644 index 00000000..b8a7cf74 Binary files /dev/null and b/macros/SymbolTable/ST_GetSymbolInfo.bin differ diff --git a/macros/SymbolTable/ST_InsForCntVars.bin b/macros/SymbolTable/ST_InsForCntVars.bin new file mode 100644 index 00000000..12882fc7 Binary files /dev/null and b/macros/SymbolTable/ST_InsForCntVars.bin differ diff --git a/macros/SymbolTable/ST_InsOutArg.bin b/macros/SymbolTable/ST_InsOutArg.bin new file mode 100644 index 00000000..ec9970cb Binary files /dev/null and b/macros/SymbolTable/ST_InsOutArg.bin differ diff --git a/macros/SymbolTable/ST_InsOutArg_Dup.bin b/macros/SymbolTable/ST_InsOutArg_Dup.bin new file mode 100644 index 00000000..3c59d47c Binary files /dev/null and b/macros/SymbolTable/ST_InsOutArg_Dup.bin differ diff --git a/macros/SymbolTable/ST_InsOutArg_Dup.sci b/macros/SymbolTable/ST_InsOutArg_Dup.sci new file mode 100644 index 00000000..01d25528 --- /dev/null +++ b/macros/SymbolTable/ST_InsOutArg_Dup.sci @@ -0,0 +1,194 @@ +function ST_InsOutArg_Dup(InArg,NInArg,OutArg,NOutArg,com_type,FileInfo,SharedInfo,MatchRule) +// function ST_InsOutArg(OutArg,NOutArg,FileInfo,SharedInfo,MatchRule) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 26-Oct-2007 -- Raffaele Nutricato: Author. +// 26-Oct-2007 -- Alberto Morea: Test Ok. +// +// Copyright 2007 Raffaele Nutricato & Alberto Morea. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +//SCI2CNInArgCheck(argn(2),5,5); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +CDeclarationFileName = FileInfo.Funct(nxtscifunnumber).CDeclarationFileName; +CGblDeclarFileName = FileInfo.Funct(nxtscifunnumber).CGblDeclarFileName; + +GlobalVarsFileName = FileInfo.GlobalVarFileName; +LocalVarsFileName = FileInfo.Funct(nxtscifunnumber).LocalVarFileName; +TempVarsFileName = FileInfo.Funct(nxtscifunnumber).TempVarFileName; + +CPass1FileName = FileInfo.Funct(nxtscifunnumber).CPass1FileName; +CPass1FreeFileName = FileInfo.Funct(nxtscifunnumber).CPass1FreeFileName; + + +// #RNU_RES_B +PrintStringInfo(' ',ReportFileName,'file','y'); +PrintStringInfo('***Putting output arguments in the symbol table***',ReportFileName,'file','y','n'); +// #RNU_RES_E +// --------------------------- +// --- End Initialization. --- +// --------------------------- + + +for counteroutput = 1:NOutArg + // #RNU_RES_B + PrintStringInfo(' Symbol ""'+OutArg(counteroutput).Name+'""',ReportFileName,'file','y','n'); + PrintStringInfo(' Type: '+OutArg(counteroutput).Type,ReportFileName,'file','y','n'); + PrintStringInfo(' Size(1): '+string(OutArg(counteroutput).Size(1)),ReportFileName,'file','y','n'); + PrintStringInfo(' Size(2): '+string(OutArg(counteroutput).Size(2)),ReportFileName,'file','y','n'); + PrintStringInfo(' Value: '+string(OutArg(counteroutput).Value),ReportFileName,'file','y','n'); + PrintStringInfo(' FindLike: '+string(OutArg(counteroutput).FindLike),ReportFileName,'file','y','n'); + PrintStringInfo(' Dimension: '+string(OutArg(counteroutput).Dimension),ReportFileName,'file','y','n'); + PrintStringInfo(' Scope: '+string(OutArg(counteroutput).Scope),ReportFileName,'file','y','n'); + PrintStringInfo(' ',ReportFileName,'file','y','n'); + // #RNU_RES_E + if (OutArg(counteroutput).Scope == 'Temp') + SymbTableFileName = TempVarsFileName; + elseif (OutArg(counteroutput).Scope == 'Local') + SymbTableFileName = LocalVarsFileName; + elseif (OutArg(counteroutput).Scope == 'Global') + SymbTableFileName = GlobalVarsFileName; + else + error(9999, 'Unknown scope ""'+OutArg(counteroutput).Scope+'"" for symbol: '+OutArg(counteroutput).Name); + end + // #RNU_RES_B + PrintStringInfo(' Setting symbol ""'+OutArg(counteroutput).Name+'"" in '+SymbTableFileName+'.',ReportFileName,'file','y'); + // #RNU_RES_E + + // #RNU_RES_B + // Check existence and conflicts in the symbol table. + // Here we have four possibilities: + // 1. the symbol is a global variable not initialized yet -> we have to initialize it. + // 2. the symbol already exists with different settings -> we have to issue an error. + // 3. the symbol already exists with the same settings -> ok, we don't have to do nothing. + // 4. the symbol doesn't exist -> we have to insert it into the table. + // #RNU_RES_E + [TBFlagfound,TBFlagEqualSymbols] = ... + ST_MatchSymbol(OutArg(counteroutput).Name,... + OutArg(counteroutput).Type,... + OutArg(counteroutput).Size,... + OutArg(counteroutput).Value,... + OutArg(counteroutput).FindLike,... + OutArg(counteroutput).Dimension,... + SymbTableFileName,MatchRule); + + if (TBFlagfound == 1) + if (TBFlagEqualSymbols == 0) + PrintStringInfo(' ',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: Symbol Table Conflict. Trying to insert again symbol ""'+... + OutArg(counteroutput).Name+'"" with different settings',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: Please check that you are not using variable ""'+OutArg(counteroutput).Name+'""',ReportFileName,'both','y'); + PrintStringInfo('SCI2CERROR: with different sizes and/or types.',ReportFileName,'both','y'); + PrintStringInfo(' ',ReportFileName,'both','y'); + error(9999, 'SCI2CERROR: Symbol Table Conflict. Trying to insert again symbol ""'+... + OutArg(counteroutput).Name+'"" with different settings'); + else + // #RNU_RES_B + // It's ok symbols do match. + //NUT: forse occorre un altro check sulla size per capire se occore fare il malloc. + //NUT: qui entro anche quando ho una variabile global gia' dichiarata tale in un altro + //NUT: per cui devo dichiararala come external. + //RNU qui ci puoi mettere una warning quando stai riallocando uno stesso simbolo con size simbolica. + //RNU puoi anche aggiungere del codice in c o un semplice commento. per esempio una funzione c del tipo checksize che controlla il valore + //RNU prima dopo delle size di una data variabile. Cosa succede se cambio la size anche nel caso di array e approccio + //RNU di resize non attivo? L'unica cosa e' che molte size numeriche scompaiono e incomincio a creare numerose variabili + //RNU con size simbolica. + + // If the symbol is scalar we update its value if it is an array we update its size + // only in case we are using the 'REALLOC_ALL_RESIZE_ALL' resize approach + // #RNU_RES_E + if ((GetSymbolDimension(OutArg(counteroutput).Size)) == 0 | (SharedInfo.ResizeApproach=='REALLOC_ALL_RESIZE_ALL')) + ST_Set(OutArg(counteroutput).Name,... + OutArg(counteroutput).Type,... + OutArg(counteroutput).Size,... + OutArg(counteroutput).Value,... + OutArg(counteroutput).FindLike,... + OutArg(counteroutput).Dimension,... + SymbTableFileName); + end + + // IndentLevelDeclaration = 1; //NUT: per ora lo forzo sempre a 1 + // IndentLevelMalloc = SharedInfo.NIndent; + // FlagExt = 0; + // C_GenDeclarations(OutArg(counteroutput),CDeclarationFileName,IndentLevelDeclaration,ReportFileName,FlagExt,SharedInfo.ResizeApproach); + + + end + elseif (TBFlagfound == 2) + // #RNU_RES_B + // We have a non-initialized global variable. + // Set the non-initialized global variable. + PrintStringInfo(' Found a non-initialized global variable.',ReportFileName,'file','y'); + // #RNU_RES_E + ST_Set(OutArg(counteroutput).Name,... + OutArg(counteroutput).Type,... + OutArg(counteroutput).Size,... + OutArg(counteroutput).Value,... + OutArg(counteroutput).FindLike,... + OutArg(counteroutput).Dimension,... + SymbTableFileName); + IndentLevel = 0; //NUT: forced always to 1 + FlagExt = 0; + C_GenDeclarations(OutArg(counteroutput),CGblDeclarFileName,IndentLevel,ReportFileName,FlagExt,SharedInfo.ResizeApproach); + IndentLevelMalloc = SharedInfo.NIndent; + // #RNU_RES_B + //RNU da verificare bene qui. Cio' che si verifica e' che se la size della globale e' simbolica + //RNU allora si assume che essa sia da allocare come puntatore e poi realloc. + // #RNU_RES_E + C_MemAllocOutTempVars(OutArg(counteroutput),1,CPass1FileName,CPass1FreeFileName,IndentLevelMalloc,ReportFileName,SharedInfo.ResizeApproach); + else + if (OutArg(counteroutput).FindLike == 1) + // #RNU_RES_B + // In presence of find-like functions the size must be always symbolic. + // Don't change here the value of OutArg.Size because the first time + // I need them to declare the OutArg variable with the values assumed by OutArg.Size. + // #RNU_RES_E + TmpOutArgSize(1) = '__'+OutArg(counteroutput).Name+'Size[0]'; + TmpOutArgSize(2) = '__'+OutArg(counteroutput).Name+'Size[1]'; + else + TmpOutArgSize(1) = OutArg(counteroutput).Size(1); + TmpOutArgSize(2) = OutArg(counteroutput).Size(2); + end + // #RNU_RES_B + // Set a new symbol. + // #RNU_RES_E + ST_Set(OutArg(counteroutput).Name,... + OutArg(counteroutput).Type,... + TmpOutArgSize,... + OutArg(counteroutput).Value,... + OutArg(counteroutput).FindLike,... + OutArg(counteroutput).Dimension,... + SymbTableFileName); + IndentLevelDeclaration = 1; //NUT: per ora lo forzo sempre a 1 + IndentLevelMalloc = SharedInfo.NIndent; + FlagExt = 0; + C_GenDeclarations_Dup(InArg,NInArg,com_type,OutArg(counteroutput),CPass1FileName,IndentLevelDeclaration,ReportFileName,FlagExt,SharedInfo.ResizeApproach); + // #RNU_RES_B + //RNU aggiunta qui in modo che le malloc saranno fatte una sola volta: + //RNU verifica che tutto funzioni e chi altro usa la C_MemAlloc per capire se si puo' ottimizzare per questo stadio. + // #RNU_RES_E + C_MemAllocOutTempVars(OutArg(counteroutput),1,CPass1FileName,CPass1FreeFileName,IndentLevelMalloc,ReportFileName,SharedInfo.ResizeApproach); + end + +end + +endfunction diff --git a/macros/SymbolTable/ST_Load.bin b/macros/SymbolTable/ST_Load.bin new file mode 100644 index 00000000..f158c2b6 Binary files /dev/null and b/macros/SymbolTable/ST_Load.bin differ diff --git a/macros/SymbolTable/ST_MatchSymbol.bin b/macros/SymbolTable/ST_MatchSymbol.bin new file mode 100644 index 00000000..278560d0 Binary files /dev/null and b/macros/SymbolTable/ST_MatchSymbol.bin differ diff --git a/macros/SymbolTable/ST_Save.bin b/macros/SymbolTable/ST_Save.bin new file mode 100644 index 00000000..4aa50a20 Binary files /dev/null and b/macros/SymbolTable/ST_Save.bin differ diff --git a/macros/SymbolTable/ST_Set.bin b/macros/SymbolTable/ST_Set.bin new file mode 100644 index 00000000..cbd26274 Binary files /dev/null and b/macros/SymbolTable/ST_Set.bin differ diff --git a/macros/SymbolTable/lib b/macros/SymbolTable/lib index 4e2f0193..6c944886 100644 Binary files a/macros/SymbolTable/lib and b/macros/SymbolTable/lib differ diff --git a/macros/SymbolTable/names b/macros/SymbolTable/names index b5a7d65f..c2efc843 100644 --- a/macros/SymbolTable/names +++ b/macros/SymbolTable/names @@ -6,6 +6,7 @@ ST_GetInArgInfo ST_GetSymbolInfo ST_InsForCntVars ST_InsOutArg +ST_InsOutArg_Dup ST_Load ST_MatchSymbol ST_Save -- cgit From 43592401ec4efefec61c236cd90b063a90a981b8 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 --- macros/SymbolTable/ST_InsOutArg_Dup.bin | Bin 33636 -> 33828 bytes macros/SymbolTable/ST_InsOutArg_Dup.sci | 1 + 2 files changed, 1 insertion(+) (limited to 'macros/SymbolTable') diff --git a/macros/SymbolTable/ST_InsOutArg_Dup.bin b/macros/SymbolTable/ST_InsOutArg_Dup.bin index 3c59d47c..4c4da4db 100644 Binary files a/macros/SymbolTable/ST_InsOutArg_Dup.bin and b/macros/SymbolTable/ST_InsOutArg_Dup.bin differ diff --git a/macros/SymbolTable/ST_InsOutArg_Dup.sci b/macros/SymbolTable/ST_InsOutArg_Dup.sci index 01d25528..bca66235 100644 --- a/macros/SymbolTable/ST_InsOutArg_Dup.sci +++ b/macros/SymbolTable/ST_InsOutArg_Dup.sci @@ -16,6 +16,7 @@ function ST_InsOutArg_Dup(InArg,NInArg,OutArg,NOutArg,com_type,FileInfo,SharedIn // Copyright 2007 Raffaele Nutricato & Alberto Morea. // Contact: raffaele.nutricato@tiscali.it // ----------------------------------------------------------------- +SCI2CNInArgCheck(argn(2),8,8) // ------------------------------ -- cgit From 7325b038e06f1571402a63caef2d75db30bd13c1 Mon Sep 17 00:00:00 2001 From: ukashanoor Date: Thu, 29 Jun 2017 20:59:51 +0530 Subject: changes after changing branch to master2 --- macros/SymbolTable/lib.orig | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 macros/SymbolTable/lib.orig (limited to 'macros/SymbolTable') diff --git a/macros/SymbolTable/lib.orig b/macros/SymbolTable/lib.orig new file mode 100644 index 00000000..dbc603e2 --- /dev/null +++ b/macros/SymbolTable/lib.orig @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + -- cgit From aef4e8398f2b1848b0e4cdd9580dbbe93e4006f9 Mon Sep 17 00:00:00 2001 From: Jorawar Singh Date: Fri, 30 Jun 2017 11:28:58 +0530 Subject: Help files, modified Raspberry Pi code conversion --- macros/SymbolTable/ST_AnalyzeScope.sci | 1 - macros/SymbolTable/lib | Bin 1199 -> 728 bytes 2 files changed, 1 deletion(-) (limited to 'macros/SymbolTable') diff --git a/macros/SymbolTable/ST_AnalyzeScope.sci b/macros/SymbolTable/ST_AnalyzeScope.sci index 6ce94820..8389c09a 100644 --- a/macros/SymbolTable/ST_AnalyzeScope.sci +++ b/macros/SymbolTable/ST_AnalyzeScope.sci @@ -84,7 +84,6 @@ for cntout = 1:NOutArg // #RNU_RES_E OutArg(cntout).Scope = 'Local'; end - // #RNU_RES_B // --- Check in global symbol table. --- // #RNU_RES_E diff --git a/macros/SymbolTable/lib b/macros/SymbolTable/lib index dbc603e2..3b60d2d4 100644 Binary files a/macros/SymbolTable/lib and b/macros/SymbolTable/lib differ -- cgit From a3dfa2a4069740517ca6e83f99dd4e0dbb71c377 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Sat, 1 Jul 2017 06:52:51 +0530 Subject: Merged Jorawer's work, Help files, RPi-scilab2c --- macros/SymbolTable/lib | Bin 1199 -> 928 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'macros/SymbolTable') diff --git a/macros/SymbolTable/lib b/macros/SymbolTable/lib index dbc603e2..165b7070 100644 Binary files a/macros/SymbolTable/lib and b/macros/SymbolTable/lib differ -- cgit