Source code of Windows XP (NT5)
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.

96 lines
2.5 KiB

  1. /*****************************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1987-1999 **/
  4. /*****************************************************************************/
  5. /*****************************************************************************
  6. File : pass3.cxx
  7. Title : pass3 controller
  8. History :
  9. 24-Sep-1993 GregJen Created
  10. *****************************************************************************/
  11. #if 0
  12. Notes
  13. -----
  14. This file provides the interface for the semantic analysis pass. It also
  15. initializes the pass3 controller object.
  16. #endif // 0
  17. #pragma warning ( disable : 4514 )
  18. /****************************************************************************
  19. includes
  20. ****************************************************************************/
  21. #include "nulldefs.h"
  22. extern "C" {
  23. #include <stdio.h>
  24. #include <stdlib.h>
  25. #include <malloc.h>
  26. extern int yyacfparse();
  27. }
  28. #include "allnodes.hxx"
  29. #include "control.hxx"
  30. #include "cmdana.hxx"
  31. #include "filehndl.hxx"
  32. #include "idict.hxx"
  33. #include "semantic.hxx"
  34. /****************************************************************************
  35. local definitions
  36. ****************************************************************************/
  37. /****************************************************************************
  38. extern procedures
  39. ****************************************************************************/
  40. /****************************************************************************
  41. extern data
  42. ****************************************************************************/
  43. extern class ccontrol * pCompiler;
  44. extern node_source * pSourceNode;
  45. extern CMD_ARG * pCommand;
  46. /****************************************************************************
  47. local data
  48. ****************************************************************************/
  49. /****************************************************************************/
  50. _pass3::_pass3()
  51. {
  52. pCompiler->SetPassNumber( SEMANTIC_PASS );
  53. }
  54. STATUS_T
  55. _pass3::Go()
  56. {
  57. MEM_ITER MemIter( pSourceNode );
  58. node_file * pFNode;
  59. // turn off line number additions
  60. FileIndex = 0;
  61. /**
  62. ** for each idl file, check semantics of all interfaces.
  63. **/
  64. while ( ( pFNode = (node_file *) MemIter.GetNext() ) != 0 )
  65. {
  66. SEM_ANALYSIS_CTXT FileSemAnalysis(pSourceNode);
  67. pFNode->SemanticAnalysis( &FileSemAnalysis );
  68. }
  69. // terminate compilation if we found errors
  70. return (pCompiler->GetErrorCount()) ? ERRORS_PASS1_NO_PASS2 : STATUS_OK;
  71. }