Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

100 lines
2.8 KiB

/*****************************************************************************/
/** Microsoft LAN Manager **/
/** Copyright(c) Microsoft Corp., 1987-1999 **/
/*****************************************************************************/
/*****************************************************************************
File : pass3.cxx
Title : pass3 controller
History :
24-Sep-1993 GregJen Created
*****************************************************************************/
#if 0
Notes
-----
This file provides the interface for the semantic analysis pass. It also
initializes the pass3 controller object.
#endif // 0
#pragma warning ( disable : 4514 )
/****************************************************************************
includes
****************************************************************************/
#include "nulldefs.h"
extern "C" {
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
extern int yyacfparse();
}
#include "allnodes.hxx"
#include "control.hxx"
#include "cmdana.hxx"
#include "filehndl.hxx"
#include "idict.hxx"
#include "semantic.hxx"
/****************************************************************************
local definitions
****************************************************************************/
/****************************************************************************
extern procedures
****************************************************************************/
/****************************************************************************
extern data
****************************************************************************/
extern class ccontrol * pCompiler;
extern node_source * pSourceNode;
extern CMD_ARG * pCommand;
/****************************************************************************
local data
****************************************************************************/
/****************************************************************************/
_pass3::_pass3()
{
pCompiler->SetPassNumber( SEMANTIC_PASS );
}
STATUS_T
_pass3::Go()
{
MEM_ITER MemIter( pSourceNode );
node_file * pFNode;
// turn off line number additions
FileIndex = 0;
/**
** for each idl file, check semantics of all interfaces.
**/
while ( ( pFNode = (node_file *) MemIter.GetNext() ) != 0 )
{
SEM_ANALYSIS_CTXT FileSemAnalysis(pSourceNode);
pFNode->SemanticAnalysis( &FileSemAnalysis );
}
// last check if we have incorrect target combination
if (pCompiler->GetErrorCount() == 0 )
pCommand->VerifyTargetSwitch();
// terminate compilation if we found errors
return (pCompiler->GetErrorCount()) ? ERRORS_PASS1_NO_PASS2 : STATUS_OK;
}