diff options
Diffstat (limited to 'macros')
24 files changed, 91 insertions, 5 deletions
diff --git a/macros/ASTManagement/%ifthenelse_string.sci b/macros/ASTManagement/%ifthenelse_string.sci new file mode 100644 index 00000000..ef588c56 --- /dev/null +++ b/macros/ASTManagement/%ifthenelse_string.sci @@ -0,0 +1,27 @@ +function txt=%ifthenelse_string(I) +//overloading function for "ifthenel" type tlist string function +//this is a node of the AST +//fields: +// expression : "expression" type tlist (the if expression) +// then : list of "equal" type tlist and list('EOL') (the +// then instructions list) +// elseifs : a list of tlists +// else : list of "equal" type tlist and list('EOL') (the +// else instructions list) + txt=['If ' + ' Expression:' + ' '+string(I.expression) + ' If Statements' + ' '+objectlist2string(I.then)] + for e=I.elseifs + txt=[txt; + ' Else If Expression' + ' '+string(e.expression) + ' Else If Statements' + ' '+objectlist2string(e.then)] + end + txt=[txt; + ' Else Statements' + ' '+objectlist2string(I.else) + 'EndIf'] +endfunction diff --git a/macros/ASTManagement/%operation_string.sci b/macros/ASTManagement/%operation_string.sci new file mode 100644 index 00000000..84f5ce3c --- /dev/null +++ b/macros/ASTManagement/%operation_string.sci @@ -0,0 +1,13 @@ +function txt=%operation_string(O) +//overloading function for "operation" type tlist string function +//this is a node of the AST +//fields: +// operands: a list +// operator: a string + txt=['Operation' + ' Operands:' + ' '+objectlist2string(O.operands) + ' Operator: '+O.operator + 'EndOperation' + ] +endfunction
\ No newline at end of file diff --git a/macros/ASTManagement/AST_HandleEOL.sci b/macros/ASTManagement/AST_HandleEOL.sci index 0f55457e..4b287283 100644 --- a/macros/ASTManagement/AST_HandleEOL.sci +++ b/macros/ASTManagement/AST_HandleEOL.sci @@ -46,15 +46,17 @@ sciline = mgetl(SciFileFid,1); PrintStringInfo(' ',ReportFileName,'file','y','n'); PrintStringInfo('##################'+'################'+'##################'+'##################'+'##################',ReportFileName,'file','y','n'); PrintStringInfo('##################'+'################'+'##################'+'##################'+'##################',ReportFileName,'file','y','n'); -PrintStringInfo('### Scilab code: '+sciline+' ###',ReportFileName,'file','y','n'); +//PrintStringInfo('### Scilab code: '+sciline+' ###',ReportFileName,'file','y','n'); PrintStringInfo('##################'+'################'+'##################'+'##################'+'##################',ReportFileName,'file','y','n'); PrintStringInfo('##################'+'################'+'##################'+'##################'+'##################',ReportFileName,'file','y','n'); // #RNU_RES_E PrintStringInfo(' ',CPass1FileName,'file','y'); // RNU BRUNO modeprintstringinfo MUST BE AN EXTERNAL PARAMETER! -modeprintstringinfo = 'both'; +//modeprintstringinfo = 'both'; if (SharedInfo.CopySciCodeIntoCCode == 1) - modeprintstringinfo = 'both'; + modeprintstringinfo = 'file'; +else + modeprintstringinfo = 'stdout'; end PrintStringInfo(C_IndentBlanks(IndentLevel)+'/*SCI2C: #############'+'############'+'##############'+'###############'+'############',CPass1FileName,modeprintstringinfo,'y','n'); PrintStringInfo(C_IndentBlanks(IndentLevel)+' SCI2C: '+sciline,CPass1FileName,modeprintstringinfo,'y','n'); diff --git a/macros/ASTManagement/_ifthenelse_string.sci b/macros/ASTManagement/_ifthenelse_string.sci new file mode 100644 index 00000000..ef588c56 --- /dev/null +++ b/macros/ASTManagement/_ifthenelse_string.sci @@ -0,0 +1,27 @@ +function txt=%ifthenelse_string(I) +//overloading function for "ifthenel" type tlist string function +//this is a node of the AST +//fields: +// expression : "expression" type tlist (the if expression) +// then : list of "equal" type tlist and list('EOL') (the +// then instructions list) +// elseifs : a list of tlists +// else : list of "equal" type tlist and list('EOL') (the +// else instructions list) + txt=['If ' + ' Expression:' + ' '+string(I.expression) + ' If Statements' + ' '+objectlist2string(I.then)] + for e=I.elseifs + txt=[txt; + ' Else If Expression' + ' '+string(e.expression) + ' Else If Statements' + ' '+objectlist2string(e.then)] + end + txt=[txt; + ' Else Statements' + ' '+objectlist2string(I.else) + 'EndIf'] +endfunction diff --git a/macros/ASTManagement/_operation_string.sci b/macros/ASTManagement/_operation_string.sci new file mode 100644 index 00000000..84f5ce3c --- /dev/null +++ b/macros/ASTManagement/_operation_string.sci @@ -0,0 +1,13 @@ +function txt=%operation_string(O) +//overloading function for "operation" type tlist string function +//this is a node of the AST +//fields: +// operands: a list +// operator: a string + txt=['Operation' + ' Operands:' + ' '+objectlist2string(O.operands) + ' Operator: '+O.operator + 'EndOperation' + ] +endfunction
\ No newline at end of file diff --git a/macros/ASTManagement/lib b/macros/ASTManagement/lib Binary files differindex ae21cfc5..67ea09be 100644 --- a/macros/ASTManagement/lib +++ b/macros/ASTManagement/lib diff --git a/macros/ASTManagement/names b/macros/ASTManagement/names index 43522229..a1aafbc1 100644 --- a/macros/ASTManagement/names +++ b/macros/ASTManagement/names @@ -4,7 +4,9 @@ %for_string %funcall_string %ifthenel_string +%ifthenelse_string %operatio_string +%operation_string %program_p %program_string %variable_string @@ -47,7 +49,9 @@ _equal_string _for_string _funcall_string _ifthenel_string +_ifthenelse_string _operatio_string +_operation_string _program_p _program_string _variable_string diff --git a/macros/CCodeGeneration/lib b/macros/CCodeGeneration/lib Binary files differindex ef0ea492..2db4b8c8 100644 --- a/macros/CCodeGeneration/lib +++ b/macros/CCodeGeneration/lib diff --git a/macros/ErrorMessages/lib b/macros/ErrorMessages/lib Binary files differindex 5b1667c2..0a9f8913 100644 --- a/macros/ErrorMessages/lib +++ b/macros/ErrorMessages/lib diff --git a/macros/FunctionAnnotation/lib b/macros/FunctionAnnotation/lib Binary files differindex d9cc4762..f02997b0 100644 --- a/macros/FunctionAnnotation/lib +++ b/macros/FunctionAnnotation/lib diff --git a/macros/FunctionList/lib b/macros/FunctionList/lib Binary files differindex fc8038c9..2bbf0cbe 100644 --- a/macros/FunctionList/lib +++ b/macros/FunctionList/lib diff --git a/macros/GeneralFunctions/filenamefprintf.sci b/macros/GeneralFunctions/filenamefprintf.sci index 99ddcea4..f25e603e 100644 --- a/macros/GeneralFunctions/filenamefprintf.sci +++ b/macros/GeneralFunctions/filenamefprintf.sci @@ -23,7 +23,7 @@ function filenamefprintf(filename,ennewline,str,formattedstring) // Copyright 2006 Raffaele Nutricato.
// Contact: raffaele.nutricato@tiscali.it
// -----------------------------------------------------------------
- +
// ------------------------------
// --- Check input arguments. ---
// ------------------------------
diff --git a/macros/GeneralFunctions/lib b/macros/GeneralFunctions/lib Binary files differindex 1c78f72c..e1d6f0fb 100644 --- a/macros/GeneralFunctions/lib +++ b/macros/GeneralFunctions/lib diff --git a/macros/Hardware/AVR/lib b/macros/Hardware/AVR/lib Binary files differindex 16d9e3ea..5c8f0da2 100644 --- a/macros/Hardware/AVR/lib +++ b/macros/Hardware/AVR/lib diff --git a/macros/Hardware/RasberryPi/lib b/macros/Hardware/RasberryPi/lib Binary files differindex b92a6ea7..9afd77da 100644 --- a/macros/Hardware/RasberryPi/lib +++ b/macros/Hardware/RasberryPi/lib diff --git a/macros/ImageProcessing/core/lib b/macros/ImageProcessing/core/lib Binary files differindex 87c0f305..56053510 100644 --- a/macros/ImageProcessing/core/lib +++ b/macros/ImageProcessing/core/lib diff --git a/macros/ImageProcessing/highgui/lib b/macros/ImageProcessing/highgui/lib Binary files differindex 8f5561e0..a46d5d87 100644 --- a/macros/ImageProcessing/highgui/lib +++ b/macros/ImageProcessing/highgui/lib diff --git a/macros/ImageProcessing/imgproc/lib b/macros/ImageProcessing/imgproc/lib Binary files differindex c8b45d34..4863059b 100644 --- a/macros/ImageProcessing/imgproc/lib +++ b/macros/ImageProcessing/imgproc/lib diff --git a/macros/Scilab-Arduino/lib b/macros/Scilab-Arduino/lib Binary files differindex da395a36..0304cade 100644 --- a/macros/Scilab-Arduino/lib +++ b/macros/Scilab-Arduino/lib diff --git a/macros/SymbolTable/lib b/macros/SymbolTable/lib Binary files differindex f10d8ee9..dbc603e2 100644 --- a/macros/SymbolTable/lib +++ b/macros/SymbolTable/lib diff --git a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci index 8c5aee70..f0a83604 100644 --- a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci +++ b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci @@ -5189,7 +5189,7 @@ ClassName = 'RPI_DigitalSetup'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
PrintStringInfo('NIN= 2',ClassFileName,'file','y');
-PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y');
PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
diff --git a/macros/ToolInitialization/lib b/macros/ToolInitialization/lib Binary files differindex 439f3abf..4d03bdc5 100644 --- a/macros/ToolInitialization/lib +++ b/macros/ToolInitialization/lib diff --git a/macros/findDeps/lib b/macros/findDeps/lib Binary files differBinary files differindex 25edeed7..a49dc793 100644 --- a/macros/findDeps/lib +++ b/macros/findDeps/lib |