summaryrefslogtreecommitdiff
path: root/2.3-1/macros/ASTManagement
diff options
context:
space:
mode:
authorsiddhu89902016-06-14 12:30:32 +0530
committersiddhu89902016-06-14 12:30:32 +0530
commit7e9419d65013fa1109dd67deaabf77aa34011a35 (patch)
tree22dd8ce9bb522e3c4b21320a22362d0015e2110e /2.3-1/macros/ASTManagement
parentf08e63e652a564b3f805b69c05948e497c7b28f6 (diff)
downloadScilab2C-7e9419d65013fa1109dd67deaabf77aa34011a35.tar.gz
Scilab2C-7e9419d65013fa1109dd67deaabf77aa34011a35.tar.bz2
Scilab2C-7e9419d65013fa1109dd67deaabf77aa34011a35.zip
Support added for diff, norm functions
Diffstat (limited to '2.3-1/macros/ASTManagement')
-rw-r--r--2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.binbin12332 -> 13180 bytes
-rw-r--r--2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.sci17
-rw-r--r--2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci1
3 files changed, 16 insertions, 2 deletions
diff --git a/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.bin b/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.bin
index cd93132b..260f69a5 100644
--- a/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.bin
+++ b/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.bin
Binary files differ
diff --git a/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.sci b/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.sci
index 53830cfc..fe5dc05a 100644
--- a/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.sci
+++ b/2.3-1/macros/ASTManagement/AST_ExtractNameAndScope.sci
@@ -57,6 +57,7 @@ taglength(cnttag) = length(tagname(cnttag));
fieldlength = length(ASTField);
+
//NUT: il seguente codice e' poco elegante.
if (SCI2Cstrncmps1size(tagname(1),ASTField))
// Here we can have:
@@ -65,24 +66,36 @@ if (SCI2Cstrncmps1size(tagname(1),ASTField))
// Number_d: it means double real type.
// Number_c: it means float complex type.
// Number_z: it means double complex type.
- ArgName = stripblanks(part(ASTField,taglength(1)+3:fieldlength));
- ArgScope = stripblanks(part(ASTField,1:taglength(1)+1));
+
+ // If ArgName is i, make it string
+ if(mtlb_strcmp(ASTField,"Number_x: i") == %T)
+ ArgName = stripblanks(part(ASTField,taglength(1)+3:fieldlength));
+ ArgScope = 'String';
+ else
+ ArgName = stripblanks(part(ASTField,taglength(1)+3:fieldlength));
+ ArgScope = stripblanks(part(ASTField,1:taglength(1)+1));
+ end
elseif (SCI2Cstrncmps1size(tagname(2),ASTField))
ArgName = stripblanks(part(ASTField,taglength(2)+1:fieldlength));
ArgName = part(ArgName,2:length(ArgName)-1); // I remove also the first and the last "
ArgScope = 'String';
+
elseif (SCI2Cstrncmps1size(tagname(3),ASTField))
ArgName = stripblanks(part(ASTField,taglength(3)+1:fieldlength));
ArgScope = 'Variable';
+
elseif (SCI2Cstrncmps1size(tagname(4),ASTField))
ArgName = stripblanks(part(ASTField,taglength(4)+1:fieldlength));
ArgScope = 'Global';
+
elseif (SCI2Cstrncmps1size(tagname(5),ASTField))
ArgName = stripblanks(part(ASTField,taglength(5)+1:fieldlength));
ArgScope = 'Local';
+
elseif (SCI2Cstrncmps1size(tagname(6),ASTField))
ArgName = stripblanks(part(ASTField,taglength(6)+1:fieldlength));
ArgScope = 'Temp';
+
elseif (SCI2Cstrncmps1size(tagname(7),ASTField))
ArgName = '<empty>';
ArgScope = 'None';
diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci
index 0bc12992..eb1d1f42 100644
--- a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci
+++ b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci
@@ -1,3 +1,4 @@
+
function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType)
// function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType)
// -----------------------------------------------------------------