summaryrefslogtreecommitdiff
path: root/src/Scilab2C/ASTGenerator/GetASTFile.sci
diff options
context:
space:
mode:
authornutricato2007-07-13 10:05:05 +0000
committernutricato2007-07-13 10:05:05 +0000
commitc0723e47c05ef92516df10c86db892c8472bfa6b (patch)
tree08dd0ad734d8dd15dc9d93d6821cc4ffb0dd4b6b /src/Scilab2C/ASTGenerator/GetASTFile.sci
parentc25b43cf50da3a1e2bbbc459448e6b80806df51c (diff)
downloadscilab2c-c0723e47c05ef92516df10c86db892c8472bfa6b.tar.gz
scilab2c-c0723e47c05ef92516df10c86db892c8472bfa6b.tar.bz2
scilab2c-c0723e47c05ef92516df10c86db892c8472bfa6b.zip
Diffstat (limited to 'src/Scilab2C/ASTGenerator/GetASTFile.sci')
-rw-r--r--src/Scilab2C/ASTGenerator/GetASTFile.sci42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/Scilab2C/ASTGenerator/GetASTFile.sci b/src/Scilab2C/ASTGenerator/GetASTFile.sci
new file mode 100644
index 00000000..3c9b4f48
--- /dev/null
+++ b/src/Scilab2C/ASTGenerator/GetASTFile.sci
@@ -0,0 +1,42 @@
+function GetASTFile(FileInfoDatFile);
+// function GetASTFile(FileInfoDatFile);
+// -----------------------------------------------------------------
+// Generates the AST file starting from the .sci file specified
+// in SharedInfo.Next(1).SCIFileName.
+//
+// Input data:
+// FileInfoDatFile: name of the .dat file containing the FileInfo structure.
+// SharedInfoDatFile: it is a buffer containing parameters that are exchanged by the
+// functions of the SCI2C tool.
+//
+// Output data:
+//
+// Status:
+// 11-Apr-2007 -- Nutricato Raffaele: Author.
+// -----------------------------------------------------------------
+
+// ---------------------------------
+// --- Load File Info Structure. ---
+// ---------------------------------
+load(FileInfoDatFile,'FileInfo');
+
+// -----------------------------------
+// --- Load Shared Info Structure. ---
+// -----------------------------------
+load(FileInfo.SharedInfoDatFile,'SharedInfo');
+
+// Extraction of the function name and number.
+funname = SharedInfo.Next(1).SCIFunName;
+funnumber = SharedInfo.NextSCIFunNumber;
+
+PrintStepInfo('Generate the AST in '+FileInfo.Funct(funnumber).ASTFileName,...
+ FileInfo.GeneralReport,'both');
+
+// --- Generation of the AST file. ---
+SciFile2ASTFile(FileInfo.Funct(funnumber).SCIFileName,...
+ FileInfo.Funct(funnumber).ASTFileName);
+
+// --- Save File Info Structure. ---
+// save(FileInfoDatFile,FileInfo);
+
+endfunction