Exemple #1
0
int
cerror(int argc, char** argv)
{
  int res = 0; 
  XQC_Implementation* impl;

  void* store = create_store();

  if ( zorba_implementation(&impl, store) != XQC_NO_ERROR)
    return 1;

  printf("executing C example 1\n");
  res = cerror_example_1(impl);
  if (!res) { impl->free(impl); return 1; };
  printf("\n");

  printf("executing C example 2\n");
  res = cerror_example_2(impl);
  if (!res) { impl->free(impl); return 1; };
  printf("\n");

  printf("executing C example 3\n");
  res = cerror_example_3(impl);
  if (!res) { impl->free(impl); return 1; };
  printf("\n");

  impl->free(impl);
  shutdown_store(store);

  return 0;
}
Exemple #2
0
int
cparsing(int argc, char** argv)
{
  int res = 0; 
  XQC_Implementation* impl;

  void* store = create_store();

  for (res = 0; res < argc; res++) {
    printf("####%s\n", argv[res]);
  }

  if ( zorba_implementation(&impl, store) != XQC_NO_ERROR)
    return 1;

  printf("executing C parsing example 1\n");
  res = cparsing_example_1(impl);
  if (!res) { impl->free(impl); return 1; };
  printf("\n");

  printf("executing C parsing example 2\n");
  res = cparsing_example_2(impl);
  if (!res) { impl->free(impl); return 1; };
  printf("\n");

  printf("executing C parsing example 3\n");
  res = cparsing_example_3(impl);
  if (!res) { impl->free(impl); return 1; };
  printf("\n");

  impl->free(impl);
  shutdown_store(store);
  return 0;
}
Exemple #3
0
int
csequences(int argc, char** argv)
{
  int res = 0; 
  XQC_Implementation* impl;

  void* store = create_store();

  if ( zorba_implementation(&impl, store) != XQC_NO_ERROR)
    return 1;

  printf("executing C csequences 1\n");
  res = csequences_1(impl);
  if (!res) { impl->free(impl); return 1; };
  printf("\n");

  printf("executing C csequences 2\n");
  res = csequences_2(impl);
  if (!res) { impl->free(impl); return 1; };
  printf("\n");

  printf("executing C csequences 3\n");
  res = csequences_3(impl);
  if (!res) { impl->free(impl); return 1; };
  printf("\n");

  printf("executing C csequences 4\n");
  res = csequences_4(impl);
  if (!res) { impl->free(impl); return 1; };
  printf("\n");

  printf("executing C csequences 5\n");
  res = csequences_5(impl);
  if (!res) { impl->free(impl); return 1; };
  printf("\n");

  impl->free(impl);
  shutdown_store(store);
   
  return 0;
}