//File compiler.cpp #include #include #include #include #include "compiler.h" #include "pmglobs.h" #include "scanner.h" #include "parser.h' #include "codegen.h" void compiler::prologue() { clrscr(); cout<<"\n The Proem Compiler, Version 2.3, March 1995"; cout<<"\n Copyright (c) 1986, 1989, 1990, 1992, 1995"; cout<<" by Stuart B. Greenfield\n\n"; } char* compiler::getprogramname() { cout<< "\nEnter the Proem program to be compiled,"; cout<< "\n[\":\"]\".PM\","; cout << "\n (e.g., A:\\SUBDIR\\SAMPLE.PM): "; cin >> progname; char* ext=strpbrk(progname,"."); if (strcmpi(ext,".pm")!=NULL) { cout<<"ILLEGAL SOURCE CODE FILE EXTENSION! MUST BE \".PM\""; exit(1); } return progname; } boolean compiler::seefilesquery() { cout<<"\nSee all compiler generated files, (y/n): char ch=getch(); cout<