示例#1
0
static void
new_statement(void)
{
   char *id;
   int i;
   int handled = 0;

   id = stack_id();
   for (i = 0; i < statement_handler_num(); i++)
     {
	if (!strcmp(statement_handlers[i].type, id))
	  {
	     handled = 1;
	     if (statement_handlers[i].func)
	       {
		  statement_handlers[i].func();
	       }
	     break;
	  }
     }
   if (!handled)
     {
	ERR("%s: Error. %s:%i unhandled keyword %s",
	    progname, file_in, line - 1,
	    (char *)eina_list_data_get(eina_list_last(stack)));
	exit(-1);
     }
   free(id);
}
示例#2
0
static void
err_show_stack(void)
{
   const char *s;

   s = stack_id();
   if (s)
     ERR("PARSE STACK:\n%s", s);
   else
     ERR("NO PARSE STACK");
}