Beispiel #1
0
Node *tl_parse(void)
{  
   Node *n = tl_formula();
   if (tl_verbose)
	{	printf("formula: ");
		put_uform();
		printf("\n");
	}
	return(n);
}
Beispiel #2
0
Node *tl_parse(int *cnt, size_t hasuform, char *uform, Miscellaneous *miscell, int *tl_yychar)
{  
	int tl_verbose_p = 0;
   Node *n = tl_formula(cnt, hasuform, uform, miscell, tl_yychar);
   if (tl_verbose_p)
	{	printf("formula: ");
		put_uform(uform, miscell);
		printf("\n");
	}
	return(n);
}
Beispiel #3
0
void
fsm_print(void)
{	State *b; int cnt1, cnt2=0;
	extern void put_uform(void);

	if (tl_clutter) clutter();

	b = findstate("T0_init");
	if (Max_Red == 0)
		b->accepting = 1;

	mergestates(0); 
	b = findstate("T0_init");

	fprintf(tl_out, "never {    /* ");
		put_uform();
	fprintf(tl_out, " */\n");

	do {
		clr_reach();
		Dfs(b);
		cnt1 = mergetrans();
		cnt2 = mergestates(1);
		if (tl_verbose)
			printf("/* >>%d,%d<< */\n", cnt1, cnt2);
	} while (cnt2 > 0);

#ifdef BUCKY
	buckyballs();
	clr_reach();
	Dfs(b);
#endif
	if (b && b->accepting)
		fprintf(tl_out, "accept_init:\n");

	if (!b && !never)
	{	fprintf(tl_out, "	0 /* false */;\n");
	} else
	{	printstate(b);	/* init state must be first */
		for (b = never; b; b = b->nxt)
			printstate(b);
	}
	if (hitsall)
	fprintf(tl_out, "accept_all:\n	skip\n");
	fprintf(tl_out, "}\n");
}