summaryrefslogtreecommitdiff
path: root/src/Scilab2C/ASTGenerator/GetASTFile.sci
blob: 3c9b4f48dd7cb82c8e36bdd61c938d976a8433b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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