示例#1
0
int main()
{
  printf("\nParser em execução...\n");
  abrirArq();
  if (yyparse()==0) printf("\nAnálise sintática OK\n");
  else printf("\nAnálise sintática apresenta ERRO\n");
  return 0;
}
示例#2
0
int main()
{
  extern int yydebug;
  yydebug = 1;

  printf("\nParser em execução...\n");
  abrirArq();
  return yyparse();
}
void importarEspecies(){
     int id;
     char nomeCientifico[100];
     char nomePopular[100];
     char descricao[1000];
     char arquivoImportacao[100];
     
     system("clear");
     printf("\n***Importação de Dados de Espécie***");
     
     FILE *arquivoImportado = abrirArq(especiesImportacao, "r+");
     FILE *arquivo = abrirArq(especies, "r+");
     
     while (fgets(linha,1001,arquivoImportacao)!=NULL){
            fprintf(arquivo,"%d\n%s\n%s\n%s\n#\n",id,nomeCientifico,nomePopular,descricao);
     }
     
     fclose(arquivoImportacao);
     fclose(arquivo);
     
     printf("Arquivos Importados. Precione ENTER para continuar");
     while (getchar()!='\n');
}