summaryrefslogtreecommitdiff
path: root/macros/ASTManagement
diff options
context:
space:
mode:
Diffstat (limited to 'macros/ASTManagement')
-rw-r--r--macros/ASTManagement/AST2Ccode.sci2
-rw-r--r--macros/ASTManagement/AST_HandleEndGenFun.sci42
-rw-r--r--macros/ASTManagement/libbin1896 -> 0 bytes
3 files changed, 10 insertions, 34 deletions
diff --git a/macros/ASTManagement/AST2Ccode.sci b/macros/ASTManagement/AST2Ccode.sci
index b1646df..5cceaf1 100644
--- a/macros/ASTManagement/AST2Ccode.sci
+++ b/macros/ASTManagement/AST2Ccode.sci
@@ -157,7 +157,6 @@ while ~meof(fidAST)
[disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,'Operation');
case 'EndFuncall' then
[disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,'Funcall');
- disp(disp_isthere);
=======
[FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Operation');
case 'EndFuncall' then
@@ -197,7 +196,6 @@ while ~meof(fidAST)
AST_PushASTStack(treeline);
case 'Lhs :' then
<<<<<<< HEAD
- disp(disp_isthere);
if rc_count > 0 & cc_count == 0
SharedInfo.Equal.Lhs = 1;
[EqualInArgName,EqualInArgScope,EqualNInArg] = AST_HandleRC(FileInfo,SharedInfo);
diff --git a/macros/ASTManagement/AST_HandleEndGenFun.sci b/macros/ASTManagement/AST_HandleEndGenFun.sci
index 6c2abed..b5208e5 100644
--- a/macros/ASTManagement/AST_HandleEndGenFun.sci
+++ b/macros/ASTManagement/AST_HandleEndGenFun.sci
@@ -146,11 +146,10 @@ NOutArg_mod = NOutArg
PrintStringInfo(' ',ReportFileName,'both','y');
error(9999, 'SCI2CERROR: Unexpected number of output arguments for global function.');
end
-<<<<<<< HEAD
- elseif(ASTFunName == 'raspi' | ASTFunName == 'raspi_close')
- SharedInfo.SkipNextFun = 1;
-=======
->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0
+ //To skip the functions for Raspberry Pi connections
+ elseif(ASTFunName == 'raspi' | ASTFunName == 'raspi_close' | ASTFunName == 'i2cdetect')
+ disp_isthere=1; // Skips the corresponding Lhs argument declaration
+ return // Skips the function call
end
// #RNU_RES_B
@@ -158,17 +157,14 @@ NOutArg_mod = NOutArg
// --- Read the function annotations. ---
// --------------------------------------
// #RNU_RES_E
-<<<<<<< HEAD
if ASTFunName == '%k'
ASTFunName='modk';
end
if ASTFunName == '%sn'
ASTFunName='modsn';
- end
-=======
->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0
-
+ end
+
if (ASTFunName == 'OpEqual')
FunTypeAnnot = '';
FunSizeAnnot = '';
@@ -181,10 +177,7 @@ NOutArg_mod = NOutArg
// --- Search for Equal Lhs and precision specifier to be applied to the current function. ---
// -------------------------------------------------------------------------------------------
// #RNU_RES_E
-<<<<<<< HEAD
PrintStringInfo(' no of out arguments' + string(NOutArg),ReportFileName,'file','y');
-=======
->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0
[LhsArg,NLhsArg,FunPrecSpecifier,SharedInfo] = AST_GetPrecAndLhsArg(OutArg,NOutArg,ASTFunName,FunTypeAnnot,FunSizeAnnot,ASTFunType,FileInfo,SharedInfo);
//NUT: questa funzione contiene troppi parametri e mi sembra disordinata.
@@ -382,7 +375,6 @@ NOutArg_mod = NOutArg
OutArg(1).Name = string(OutArg(1).Value);
elseif ((ASTFunName == 'double') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number'))
OutArg(1).Name = string(OutArg(1).Value);
-<<<<<<< HEAD
//elseif ASTFunName == 'disp'
else
[OutArg,SharedInfo] = GenOutArgNames(ASTFunName,InArg,NInArg,OutArg,NOutArg,LhsArg,NLhsArg,FileInfo,SharedInfo);
@@ -390,10 +382,10 @@ NOutArg_mod = NOutArg
PrintStringInfo(' returning back due logical function',ReportFileName,'file','y');
return;
end
-=======
+
else
[OutArg,SharedInfo] = GenOutArgNames(ASTFunName,InArg,NInArg,OutArg,NOutArg,LhsArg,NLhsArg,FileInfo,SharedInfo);
->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0
+
end
if ((ASTFunName == 'uint8') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number'))
@@ -437,11 +429,8 @@ NOutArg_mod = NOutArg
// Scope already set above.
elseif (ASTFunName == 'double' & NInArg == 1 & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number'))
// Scope already set above.
-<<<<<<< HEAD
//elseif ASTFunName == 'disp'
//do nothing
-=======
->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0
else
OutArg = ST_AnalyzeScope(OutArg,NOutArg,FileInfo,SharedInfo);
end
@@ -460,11 +449,8 @@ NOutArg_mod = NOutArg
//#RNUREM_ME A number is not inserted in the symbol table.
elseif ((ASTFunName == 'double') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number'))
//#RNUREM_ME A number is not inserted in the symbol table.
-<<<<<<< HEAD
//elseif ASTFunName == 'disp'
//do nothing
-=======
->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0
else
ST_InsOutArg(OutArg,NOutArg,FileInfo,SharedInfo,'all');
end
@@ -497,7 +483,6 @@ NOutArg_mod = NOutArg
// --------------------------------------------
//#RNU_RES_E
//disp(OutArg,InArg,ASTFunName)
-<<<<<<< HEAD
CFunName = C_GenerateFunName(ASTFunName,InArg,NInArg,OutArg,NOutArg_mod);
@@ -505,14 +490,14 @@ NOutArg_mod = NOutArg
//#RNU_RES_B
PrintStringInfo(' C Function Name: '+CFunName,ReportFileName,'file','y');
if(IsArduinoFunction(ASTFunName))
-=======
+
CFunName = C_GenerateFunName(ASTFunName,InArg,NInArg,OutArg,NOutArg_mod);
//#RNU_RES_B
PrintStringInfo(' C Function Name: '+CFunName,ReportFileName,'file','y');
if(IsArduinoFunction(ASTFunName))
//disp(ASTFunName)
->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0
+
if(IsArduinoSetupFunction(ASTFunName))
//If current function is an arduino setup function (like 'dc_motor_setup'), it
//should not be converted and inserted here. It is inserted in a list now and
@@ -533,12 +518,8 @@ NOutArg_mod = NOutArg
else
LibTypeInfo = 'USER2C';
end
-<<<<<<< HEAD
-=======
-
->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0
//#RNU_RES_B
// ------------------------------------------------------------------------------------
// --- Check whether the function has been already called in the current .sci file. ---
@@ -585,11 +566,8 @@ NOutArg_mod = NOutArg
SharedInfo.SkipNextFun > 0 | ...
((sum(mtlb_strcmp(ASTFunName,SharedInfo.Annotations.DataPrec)) > 0) & (SharedInfo.SkipNextPrec == 1)))
// Do nothing
-<<<<<<< HEAD
//elseif ASTFunName == 'disp'
// Do nothing
-=======
->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0
else
AST_CheckCommonInOutArgs(InArg,NInArg,OutArg,NOutArg,ReportFileName);
end
diff --git a/macros/ASTManagement/lib b/macros/ASTManagement/lib
deleted file mode 100644
index 51b54f6..0000000
--- a/macros/ASTManagement/lib
+++ /dev/null
Binary files differ