//Compiler Project#2
//Parser
//Author:Guangming Xing
//@1
//
#define EXTERN extern 
#include "symbtab.h"
#include "scanner.h"
#include "global.h"
void parser(char *);

int main(int argc, char *argv[])
{
Line_Num=1;
Token_Begin=0;
Proceed=0;
globallabel=1;
char filename[32];
char *nameb;
if ((argc==2)&& (strstr(argv[1],".p")) )
{
int i=0;
nameb=argv[1];
while(nameb[i]!='.')
{
filename[i]=nameb[i];
i++;
}
filename[i]='\0';
 parser(filename);
}
else if (argc!=2)
    cout<<" missing the file name"<<endl;
  else
    cout<<"the file should be a Pascal  source file "<<endl;

}
