/* yymain.c   also needs to be compiled and linked with an  *.tab.c  file */
/* main routine and yyerror for use with yacc and bison */
#include <stdio.h>
extern int yyparse(void);    /* provided in  *.tab.c  file */

int main()
{
  int reject;

  while(!feof(stdin))
  {
    printf("enter a string to be parsed: \n");

    reject = yyparse();
    if(reject)
    {
      printf("rejected \n");
    }
    else
    {
      printf("accepted \n");
    }
  }
  return 0;
}

void yyerror(char *message)
{
  /* printf("\n yyerror reports %s \n", message); can be commented out */
}


