From 0aaa69ac8c8cfc262305a0c93219c72971dc78cd Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Mon, 22 May 2017 16:51:37 +0530 Subject: Test commit --- macros/ASTManagement/AST2Ccode.sci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'macros/ASTManagement/AST2Ccode.sci') diff --git a/macros/ASTManagement/AST2Ccode.sci b/macros/ASTManagement/AST2Ccode.sci index 8076d7e2..e3177be8 100644 --- a/macros/ASTManagement/AST2Ccode.sci +++ b/macros/ASTManagement/AST2Ccode.sci @@ -1,5 +1,5 @@ function AST2Ccode(FileInfoDatFile) -// function AST2Ccode(FileInfoDatFile) +// function AST2Ccode(FileInfoDatFi // ----------------------------------------------------------------- // Read the AST and call the corresponding handlers. // -- cgit From 277d1edfa17bf3719d90ddbac8e31f6181e952c3 Mon Sep 17 00:00:00 2001 From: Sandeep Gupta Date: Sun, 18 Jun 2017 23:55:40 +0530 Subject: First commit --- macros/ASTManagement/AST2Ccode.sci | 252 +++++++++++++++++++++++++++++++++++++ 1 file changed, 252 insertions(+) create mode 100644 macros/ASTManagement/AST2Ccode.sci (limited to 'macros/ASTManagement/AST2Ccode.sci') diff --git a/macros/ASTManagement/AST2Ccode.sci b/macros/ASTManagement/AST2Ccode.sci new file mode 100644 index 00000000..8076d7e2 --- /dev/null +++ b/macros/ASTManagement/AST2Ccode.sci @@ -0,0 +1,252 @@ +function AST2Ccode(FileInfoDatFile) +// function AST2Ccode(FileInfoDatFile) +// ----------------------------------------------------------------- +// Read the AST and call the corresponding handlers. +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 11-May-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),1,1); + + +//NUT: questa funzione e' da sistemare meglio + +// --------------------- +// --- Load section. --- +// --------------------- +// --- Load File Info Structure. --- +load(FileInfoDatFile,'FileInfo'); + +// --- Load Shared Info Structure. --- +load(FileInfo.SharedInfoDatFile,'SharedInfo'); +// ------------------------- +// --- End load section. --- +// ------------------------- + +// --------------------------------------------------- +// --- Extraction of the function name and number. --- +// --------------------------------------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; + +// --------------------------------- +// --- Parameter Initialization. --- +// --------------------------------- +global SCI2CSTACK +SCI2CSTACK = ['EMPTYSTACK']; + +global StackPosition; +StackPosition = 1; + +global STACKDEDUG +STACKDEDUG = 0; // 1 -> Every Pop and Push operation on the stack, the stack content will be printed on screen. +// ------------------------------------- +// --- End parameter Initialization. --- +// ------------------------------------- + +ASTFileName = FileInfo.Funct(nxtscifunnumber).ASTFileName; + + +// ----------------------- +// --- Initialization. --- +// ----------------------- +// --- Open AST file. --- +SharedInfo.ASTReader.fidAST = SCI2COpenFileRead(ASTFileName); +fidAST = SharedInfo.ASTReader.fidAST; + +OrigWorkAreaUsedBytes = SharedInfo.WorkAreaUsedBytes; +OrigUsedTempScalarVars = SharedInfo.UsedTempScalarVars; + +PrintStepInfo('Generate C code in '+FileInfo.Funct(nxtscifunnumber).FinalCFileName,... + FileInfo.GeneralReport,'both'); +// --------------------------- +// --- End initialization. --- +// --------------------------- + +// ------------------------ +// --- Parse AST header. --- +// ------------------------ +ASTHeader = AST_ReadASTHeader(fidAST,ReportFileName); +SharedInfo = AST_HandleHeader(ASTHeader,FileInfo,SharedInfo); +//NUT: le metto per ora perche' quando provo a cercare lo specifier di precisione al termine +//NUT: del programma non ho piu' nulla da poppare se lo specifier e' assente. Al limite posso mettere la program e i nomi +//NUT: al posto di dummy. +AST_PushASTStack('Dummy'); +AST_PushASTStack('Dummy'); +AST_PushASTStack('Dummy'); +AST_PushASTStack('Dummy'); +AST_PushASTStack('Dummy'); +AST_PushASTStack('Dummy'); +AST_PushASTStack('Dummy'); +AST_PushASTStack('Dummy'); +//NUT: Se ne tolgo qualcuno ottengo errori +// ---------------------------- +// --- End Parse AST header. --- +// ---------------------------- + //NUT: better to have a function. + + // --- Reset TempVars Structure. --- + TempVars = []; + // Reset info related to temp variables used in the C code. + SharedInfo.WorkAreaUsedBytes = OrigWorkAreaUsedBytes; + SharedInfo.UsedTempScalarVars = OrigUsedTempScalarVars; + //NUT: put here a manageeol so that you can have all the save and load you want. + SharedInfo.ASTReader.UsedTempVars = 0; + +// ---------------------------------- +// --- Main loop to read the AST. --- +// ---------------------------------- +//NUT: file ottenuto con m2sci se hai tempo prova a vedere se ci sono inesattezze. +//NUT: inoltre per maggiore eleganza si puo' pensare di introdurre piu' funzioni + +while ~meof(fidAST) + // Read a line from the AST + tline = mgetl(fidAST,1); + AST_CheckLineLength(tline); + treeline = stripblanks(tline); + + if STACKDEDUG == 1 + disp('Read AST Line: '+treeline); + end + + // Analyze line. + select treeline + + // ------------------ + // --- Functions. --- + // ------------------ + //NUT: qui puoi anche aggiunger piu' case per specificare meglio la struttura della funcall + //NUT: i case aggiunti ovviamente faranno solo il push della treeline. + case 'EndOperation' then + [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Operation'); + case 'EndFuncall' then + [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Funcall'); + + // -------------- + // --- Equal. --- + // -------------- + case 'EndEqual' then + //NUT: prima di lanciare l'analisi della equal puoi mettere degli argomenti dummy + //NUT: per fare in modo di coprire le ins, anche se ci puo' essere qualche rischio quando + //NUT: ho miste ins e variabili, per esempio [c(1,1), a] = twooutfun(); + //NUT: in questo caso solo una delle due equal va scartata. + [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Equal'); + SharedInfo = INIT_SharedInfoEqual(SharedInfo); + case 'Equal' then + SharedInfo.Equal.Enabled = 1; // 1 means enabled -> we are inside an equal AST block. + AST_PushASTStack(treeline); + case 'Lhs :' then + SharedInfo.Equal.Lhs = 1; // 1 means that we are inside the Lhs block of the Equal + [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_ReadEqualRhsNames(FileInfo,SharedInfo); + + // lengthNumber = length('Number_'); + // if (part(EqualInArgScope,1:lengthNumber) == 'Number_') + // SharedInfo.SkipNextEqual = 1 + // end + SharedInfo.Equal.NInArg = EqualNInArg; + for tmpcnt = 1:SharedInfo.Equal.NInArg + SharedInfo.Equal.InArg(tmpcnt).Name = EqualInArgName(tmpcnt); + SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt); + end + AST_PushASTStack(treeline); + + // ---------------- + // --- If/Else. --- + // ---------------- + //NUT: da verificare la gestione dello stack + case 'If Statements' then + [FileInfo,SharedInfo] = AST_HandleIfElse(FileInfo,SharedInfo,'if'); + case 'Else If Expression' then + AST_PushASTStack(treeline); + [FileInfo,SharedInfo] = AST_HandleIfElse(FileInfo,SharedInfo,'else'); + case 'Else If Statements' then + [FileInfo,SharedInfo] = AST_HandleIfElse(FileInfo,SharedInfo,'elseif'); + case 'Else Statements' then + [FileInfo,SharedInfo] = AST_HandleIfElse(FileInfo,SharedInfo,'else'); + case 'EndIf' then + for counter=1:SharedInfo.CountNestedIf+1 + SharedInfo = C_IfElseBlocks(FileInfo,SharedInfo,'out'); + end + SharedInfo.CountNestedIf = 0; + + // -------------- + // --- Dummy. --- + // -------------- + case 'Comment :' then + AST_HandleEOL(FileInfo,SharedInfo); //NUT: si potrebbe differenziare comment da EOL + case '' then + AST_HandleEOL(FileInfo,SharedInfo); + + // ----------------- + // --- Epilogue. --- + // ----------------- + case 'EndProgram' + SharedInfo = AST_HandleEndProgram(FileInfo,SharedInfo); + //NUT: per essere precisi si puo' pensare di mettere un check + //NUT: alla fine dell'albero per accertarsi che c'e' end program li' dove ce lo aspettiamo + + // ------------ + // --- For. --- + // ------------ + case 'For' then + SharedInfo.For.Level = SharedInfo.For.Level + 1; + FileInfo = AST_HandleFor(FileInfo,SharedInfo); + case 'ForExpression:' + AST_PushASTStack(treeline); + SharedInfo.ForExpr.OnExec = SharedInfo.ForExpr.OnExec + 1; + case 'ForStatements:' + [FileInfo,SharedInfo] = AST_HandleForStatem(FileInfo,SharedInfo); + case 'EndFor' then + SharedInfo = AST_HandleEndFor(FileInfo,SharedInfo); + SharedInfo.For.Level = SharedInfo.For.Level - 1; + + // -------------- + // --- While. --- + // -------------- + case 'While' then + AST_PushASTStack(treeline); + SharedInfo.While.Level = SharedInfo.While.Level + 1; + case 'WhileExpression:' + AST_PushASTStack(treeline); + [FileInfo,SharedInfo] = AST_HandleWhileExpr(FileInfo,SharedInfo); + case 'WhileStatements:' + [FileInfo,SharedInfo] = AST_HandleWhileStatem(FileInfo,SharedInfo); + case 'EndWhile' then + SharedInfo = AST_HandleEndWhile(FileInfo,SharedInfo); + SharedInfo.While.Level = SharedInfo.While.Level - 1; + + // ---------------- + // --- Default. --- + // ---------------- + else + AST_PushASTStack(treeline); + end +end +// -------------------------------------- +// --- End main loop to read the AST. --- +// -------------------------------------- + +mclose(fidAST); +// --------------------- +// --- Save section. --- +// --------------------- +// --- Save Shared Info Structure. --- +save(SharedInfoDatFile, "SharedInfo"); +// ------------------------- +// --- End save section. --- +// ------------------------- +endfunction -- cgit From 8e235230a4c16a042d2620fa7b58a9b0f4ba1914 Mon Sep 17 00:00:00 2001 From: ukashanoor Date: Mon, 19 Jun 2017 10:42:03 +0530 Subject: after if and for --- macros/ASTManagement/AST2Ccode.sci | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'macros/ASTManagement/AST2Ccode.sci') diff --git a/macros/ASTManagement/AST2Ccode.sci b/macros/ASTManagement/AST2Ccode.sci index 8076d7e2..73183f79 100644 --- a/macros/ASTManagement/AST2Ccode.sci +++ b/macros/ASTManagement/AST2Ccode.sci @@ -151,17 +151,21 @@ while ~meof(fidAST) AST_PushASTStack(treeline); case 'Lhs :' then SharedInfo.Equal.Lhs = 1; // 1 means that we are inside the Lhs block of the Equal + //if SharedInfo.Equal.NOutArg > 0 [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_ReadEqualRhsNames(FileInfo,SharedInfo); - + SharedInfo.Equal.NInArg = EqualNInArg; + //end + // lengthNumber = length('Number_'); // if (part(EqualInArgScope,1:lengthNumber) == 'Number_') // SharedInfo.SkipNextEqual = 1 // end - SharedInfo.Equal.NInArg = EqualNInArg; + for tmpcnt = 1:SharedInfo.Equal.NInArg SharedInfo.Equal.InArg(tmpcnt).Name = EqualInArgName(tmpcnt); SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt); end + //end AST_PushASTStack(treeline); // ---------------- -- cgit From 785e19f097f7ca1964edaf159c9adfe2eda733b5 Mon Sep 17 00:00:00 2001 From: ukashanoor Date: Wed, 21 Jun 2017 11:54:14 +0530 Subject: inter commit --- macros/ASTManagement/AST2Ccode.sci | 60 ++++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 18 deletions(-) (limited to 'macros/ASTManagement/AST2Ccode.sci') diff --git a/macros/ASTManagement/AST2Ccode.sci b/macros/ASTManagement/AST2Ccode.sci index 73183f79..19cf00c4 100644 --- a/macros/ASTManagement/AST2Ccode.sci +++ b/macros/ASTManagement/AST2Ccode.sci @@ -46,6 +46,9 @@ ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; // --------------------------------- // --- Parameter Initialization. --- // --------------------------------- +global rc_count +rc_count = 0; + global SCI2CSTACK SCI2CSTACK = ['EMPTYSTACK']; @@ -144,29 +147,45 @@ while ~meof(fidAST) //NUT: per fare in modo di coprire le ins, anche se ci puo' essere qualche rischio quando //NUT: ho miste ins e variabili, per esempio [c(1,1), a] = twooutfun(); //NUT: in questo caso solo una delle due equal va scartata. - [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Equal'); - SharedInfo = INIT_SharedInfoEqual(SharedInfo); + if rc_count > 0 + [FileInfo,SharedInfo] = AST_HandleFunRC(FileInfo,SharedInfo); + else + [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Equal'); + SharedInfo = INIT_SharedInfoEqual(SharedInfo); + end case 'Equal' then SharedInfo.Equal.Enabled = 1; // 1 means enabled -> we are inside an equal AST block. AST_PushASTStack(treeline); case 'Lhs :' then - SharedInfo.Equal.Lhs = 1; // 1 means that we are inside the Lhs block of the Equal - //if SharedInfo.Equal.NOutArg > 0 - [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_ReadEqualRhsNames(FileInfo,SharedInfo); - SharedInfo.Equal.NInArg = EqualNInArg; - //end + disp(rc_count); + if rc_count > 0 + SharedInfo.Equal.Lhs = 1; + [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_HandleRC(FileInfo,SharedInfo); + SharedInfo.Equal.NInArg = EqualNInArg; + AST_PushASTStack(treeline); + for tmpcnt = 1:SharedInfo.Equal.NInArg + SharedInfo.Equal.InArg(tmpcnt).Name = EqualInArgName(tmpcnt); + SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt); + end + else + SharedInfo.Equal.Lhs = 1; // 1 means that we are inside the Lhs block of the Equal + //if SharedInfo.Equal.NOutArg > 0 + [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_ReadEqualRhsNames(FileInfo,SharedInfo); + SharedInfo.Equal.NInArg = EqualNInArg; + //end - // lengthNumber = length('Number_'); - // if (part(EqualInArgScope,1:lengthNumber) == 'Number_') - // SharedInfo.SkipNextEqual = 1 - // end - - for tmpcnt = 1:SharedInfo.Equal.NInArg - SharedInfo.Equal.InArg(tmpcnt).Name = EqualInArgName(tmpcnt); - SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt); - end - //end - AST_PushASTStack(treeline); + // lengthNumber = length('Number_'); + // if (part(EqualInArgScope,1:lengthNumber) == 'Number_') + // SharedInfo.SkipNextEqual = 1 + // end + + for tmpcnt = 1:SharedInfo.Equal.NInArg + SharedInfo.Equal.InArg(tmpcnt).Name = EqualInArgName(tmpcnt); + SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt); + end + //end + AST_PushASTStack(treeline); + end // ---------------- // --- If/Else. --- @@ -233,6 +252,11 @@ while ~meof(fidAST) SharedInfo = AST_HandleEndWhile(FileInfo,SharedInfo); SharedInfo.While.Level = SharedInfo.While.Level - 1; + + case 'Endrc' then + rc_count = rc_count + 1; + //[FileInfo,SharedInfo] = AST_HandleRC(FileInfo,SharedInfo); + // ---------------- // --- Default. --- // ---------------- -- cgit From 956aa2b9bcf6171234bc9749acbfabf8660beade Mon Sep 17 00:00:00 2001 From: ukashanoor Date: Tue, 27 Jun 2017 12:40:50 +0530 Subject: matrix complete --- macros/ASTManagement/AST2Ccode.sci | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'macros/ASTManagement/AST2Ccode.sci') diff --git a/macros/ASTManagement/AST2Ccode.sci b/macros/ASTManagement/AST2Ccode.sci index 19cf00c4..f3c87aba 100644 --- a/macros/ASTManagement/AST2Ccode.sci +++ b/macros/ASTManagement/AST2Ccode.sci @@ -46,6 +46,10 @@ ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; // --------------------------------- // --- Parameter Initialization. --- // --------------------------------- + +global cc_count +cc_count = 0; + global rc_count rc_count = 0; @@ -57,6 +61,8 @@ StackPosition = 1; global STACKDEDUG STACKDEDUG = 0; // 1 -> Every Pop and Push operation on the stack, the stack content will be printed on screen. + + // ------------------------------------- // --- End parameter Initialization. --- // ------------------------------------- @@ -147,8 +153,13 @@ while ~meof(fidAST) //NUT: per fare in modo di coprire le ins, anche se ci puo' essere qualche rischio quando //NUT: ho miste ins e variabili, per esempio [c(1,1), a] = twooutfun(); //NUT: in questo caso solo una delle due equal va scartata. - if rc_count > 0 + if rc_count > 0 & cc_count == 0 [FileInfo,SharedInfo] = AST_HandleFunRC(FileInfo,SharedInfo); + rc_count = 0; + elseif cc_count > 0 + [FileInfo,SharedInfo] = AST_HandleFunCC(cc_count,FileInfo,SharedInfo); + rc_count = 0; + cc_count = 0; else [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Equal'); SharedInfo = INIT_SharedInfoEqual(SharedInfo); @@ -157,16 +168,19 @@ while ~meof(fidAST) SharedInfo.Equal.Enabled = 1; // 1 means enabled -> we are inside an equal AST block. AST_PushASTStack(treeline); case 'Lhs :' then - disp(rc_count); - if rc_count > 0 + if rc_count > 0 & cc_count == 0 SharedInfo.Equal.Lhs = 1; [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_HandleRC(FileInfo,SharedInfo); - SharedInfo.Equal.NInArg = EqualNInArg; + SharedInfo.Equal.NInArg = EqualNInArg - rc_count -1; AST_PushASTStack(treeline); for tmpcnt = 1:SharedInfo.Equal.NInArg SharedInfo.Equal.InArg(tmpcnt).Name = EqualInArgName(tmpcnt); SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt); - end + end + elseif cc_count > 0 + SharedInfo.Equal.Lhs = 1; + [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_HandleCC(FileInfo,SharedInfo); + AST_PushASTStack(treeline); else SharedInfo.Equal.Lhs = 1; // 1 means that we are inside the Lhs block of the Equal //if SharedInfo.Equal.NOutArg > 0 @@ -254,7 +268,11 @@ while ~meof(fidAST) case 'Endrc' then - rc_count = rc_count + 1; + rc_count = rc_count + 1; + + case 'Endcc' then + cc_count = cc_count + 1; + //[FileInfo,SharedInfo] = AST_HandleRC(FileInfo,SharedInfo); // ---------------- -- cgit From 43592401ec4efefec61c236cd90b063a90a981b8 Mon Sep 17 00:00:00 2001 From: ukashanoor Date: Wed, 28 Jun 2017 16:30:53 +0530 Subject: float matrix done and func disp --- macros/ASTManagement/AST2Ccode.sci | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'macros/ASTManagement/AST2Ccode.sci') diff --git a/macros/ASTManagement/AST2Ccode.sci b/macros/ASTManagement/AST2Ccode.sci index f3c87aba..563f3133 100644 --- a/macros/ASTManagement/AST2Ccode.sci +++ b/macros/ASTManagement/AST2Ccode.sci @@ -62,7 +62,8 @@ StackPosition = 1; global STACKDEDUG STACKDEDUG = 0; // 1 -> Every Pop and Push operation on the stack, the stack content will be printed on screen. - +global disp_isthere +disp_isthere = 0; // ------------------------------------- // --- End parameter Initialization. --- // ------------------------------------- @@ -141,9 +142,10 @@ while ~meof(fidAST) //NUT: qui puoi anche aggiunger piu' case per specificare meglio la struttura della funcall //NUT: i case aggiunti ovviamente faranno solo il push della treeline. case 'EndOperation' then - [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Operation'); + [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,'Operation'); case 'EndFuncall' then - [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Funcall'); + [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,'Funcall'); + disp(disp_isthere); // -------------- // --- Equal. --- @@ -161,13 +163,18 @@ while ~meof(fidAST) rc_count = 0; cc_count = 0; else - [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Equal'); + if disp_isthere == 0 + [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,'Equal'); SharedInfo = INIT_SharedInfoEqual(SharedInfo); + end end + disp_isthere = 0; + case 'Equal' then SharedInfo.Equal.Enabled = 1; // 1 means enabled -> we are inside an equal AST block. AST_PushASTStack(treeline); case 'Lhs :' then + disp(disp_isthere); if rc_count > 0 & cc_count == 0 SharedInfo.Equal.Lhs = 1; [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_HandleRC(FileInfo,SharedInfo); @@ -184,6 +191,7 @@ while ~meof(fidAST) else SharedInfo.Equal.Lhs = 1; // 1 means that we are inside the Lhs block of the Equal //if SharedInfo.Equal.NOutArg > 0 + if disp_isthere == 0 [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_ReadEqualRhsNames(FileInfo,SharedInfo); SharedInfo.Equal.NInArg = EqualNInArg; //end @@ -198,6 +206,7 @@ while ~meof(fidAST) SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt); end //end + end AST_PushASTStack(treeline); end @@ -233,6 +242,7 @@ while ~meof(fidAST) // ----------------- case 'EndProgram' SharedInfo = AST_HandleEndProgram(FileInfo,SharedInfo); + disp_isthere = 0; //NUT: per essere precisi si puo' pensare di mettere un check //NUT: alla fine dell'albero per accertarsi che c'e' end program li' dove ce lo aspettiamo -- cgit