Made ability for -g dependant on compile-time flag

This commit is contained in:
ceriel
1991-02-18 17:18:36 +00:00
parent b4f4a87846
commit c40ca6ebbd
11 changed files with 99 additions and 6 deletions

View File

@@ -19,6 +19,7 @@
#include <stb.h>
#include "strict3rd.h"
#include "dbsymtab.h"
#include "main.h"
#include "idf.h"
#include "LLlex.h"
@@ -63,10 +64,16 @@ ModuleDeclaration
';'
import(1)*
export(&qualified, &exportlist)
{ if (options['g']) stb_string(df, D_MODULE); }
{
#ifdef DBSYMTAB
if (options['g']) stb_string(df, D_MODULE);
#endif /* DBSYMTAB */
}
block(&(df->mod_body))
IDENT { EnterExportList(exportlist, qualified);
#ifdef DBSYMTAB
if (options['g']) stb_string(df, D_END);
#endif /* DBSYMTAB */
close_scope(SC_CHKFORW|SC_CHKPROC|SC_REVERSE);
match_id(df->df_idf, dot.TOK_IDF);
}
@@ -159,7 +166,9 @@ DefinitionModule
DefinitionModule++;
if (!Defined) {
Defined = df;
#ifdef DBSYMTAB
if (options['g']) stb_string(df, D_MODULE);
#endif /* DBSYMTAB */
}
}
';'
@@ -211,7 +220,11 @@ definition
}
]
';'
{ if (options['g']) stb_string(df, D_TYPE); }
{
#ifdef DBSYMTAB
if (options['g']) stb_string(df, D_TYPE);
#endif /* DBSYMTAB */
}
]*
|
VAR [ %persistent VariableDeclaration ';' ]*
@@ -234,13 +247,17 @@ ProgramModule
df->mod_vis = CurrVis;
CurrentScope->sc_name = "__M2M_";
CurrentScope->sc_definedby = df;
#ifdef DBSYMTAB
if (options['g']) stb_string(df, D_MODULE);
#endif /* DBSYMTAB */
}
}
priority(&(df->mod_priority))
';' import(0)*
block(&(df->mod_body)) IDENT
{ if (options['g']) {
{
#ifdef DBSYMTAB
if (options['g']) {
if (state == PROGRAM) {
C_ms_stb_cst(df->df_idf->id_text,
N_MAIN,
@@ -249,6 +266,7 @@ ProgramModule
}
stb_string(df, D_END);
}
#endif /* DBSYMTAB */
close_scope(SC_CHKFORW|SC_CHKPROC|SC_REVERSE);
match_id(df->df_idf, dot.TOK_IDF);
}