summaryrefslogtreecommitdiff
path: root/2.3-1/macros/ASTManagement/AST_GetASTFile.sci
blob: 16fbbbac6487c74f59ffe01fc215e8a40834937d (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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.', 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