summaryrefslogtreecommitdiff
path: root/macros/ASTManagement/AST_GetASTFile.sci
diff options
context:
space:
mode:
authorjofret2010-06-21 06:24:38 +0000
committerjofret2010-06-21 06:24:38 +0000
commit8b44229ef44f0558ce045e46ff833fb44df913c9 (patch)
tree4fdd89b2258c18c905d2f17ef4bea8ea9cf32893 /macros/ASTManagement/AST_GetASTFile.sci
parentaf0366230e14cc75d9e9a183375ee9cb69fb46b6 (diff)
downloadscilab2c-8b44229ef44f0558ce045e46ff833fb44df913c9.tar.gz
scilab2c-8b44229ef44f0558ce045e46ff833fb44df913c9.tar.bz2
scilab2c-8b44229ef44f0558ce045e46ff833fb44df913c9.zip
Tagging the 2.0 release of scilab2crelease-2.0
Diffstat (limited to 'macros/ASTManagement/AST_GetASTFile.sci')
-rw-r--r--macros/ASTManagement/AST_GetASTFile.sci59
1 files changed, 59 insertions, 0 deletions
diff --git a/macros/ASTManagement/AST_GetASTFile.sci b/macros/ASTManagement/AST_GetASTFile.sci
new file mode 100644
index 00000000..025aca74
--- /dev/null
+++ b/macros/ASTManagement/AST_GetASTFile.sci
@@ -0,0 +1,59 @@
+function AST_GetASTFile(FileInfoDatFile)
+// function AST_GetASTFile(FileInfoDatFile)
+// -----------------------------------------------------------------
+// Generates the AST file starting from the .sci file specified
+// in SharedInfo.NextSCIFileName.
+//
+// Input data:
+// FileInfoDatFile: name of the .dat file containing the FileInfo structure.
+//
+// Output data:
+// ---
+//
+// Status:
+// 11-Apr-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),1,1);
+
+// ---------------------------------
+// --- Load File Info Structure. ---
+// ---------------------------------
+clear FileInfo
+load(FileInfoDatFile,'FileInfo');
+
+// -----------------------------------
+// --- Load Shared Info Structure. ---
+// -----------------------------------
+clear SharedInfo
+load(FileInfo.SharedInfoDatFile,'SharedInfo');
+
+// ---------------------------------------------------
+// --- Extraction of the function name and number. ---
+// ---------------------------------------------------
+funname = SharedInfo.NextSCIFunName;
+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 section. ---
+// ---------------------
+// --- Save File Info Structure. ---
+// save(FileInfoDatFile,FileInfo);
+// -------------------------
+// --- End save section. ---
+// -------------------------
+
+endfunction