(main): Make sure there's some value within each pair of braces.
From-SVN: r5417
This commit is contained in:
parent
7b95735e08
commit
904f3f5af8
|
@ -21,7 +21,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
#include "bi-defs.h"
|
#include "bi-defs.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
length(n)
|
length (n)
|
||||||
struct node *n;
|
struct node *n;
|
||||||
{
|
{
|
||||||
int k;
|
int k;
|
||||||
|
@ -32,23 +32,25 @@ length(n)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main()
|
main ()
|
||||||
{
|
{
|
||||||
struct def *d;
|
struct def *d;
|
||||||
struct variation *v;
|
struct variation *v;
|
||||||
struct node *n;
|
struct node *n;
|
||||||
|
|
||||||
yyparse();
|
yyparse ();
|
||||||
reverse();
|
reverse ();
|
||||||
|
|
||||||
for (d = defs; d; d = d->next)
|
for (d = defs; d; d = d->next)
|
||||||
for (v = d->variations; v; v = v->next)
|
for (v = d->variations; v; v = v->next)
|
||||||
{
|
{
|
||||||
printf("{ %d, %d, %d, {", length(v->inputs),
|
printf ("{ %d, %d, %d, {", length (v->inputs),
|
||||||
length(v->outputs), length(v->literals));
|
length (v->outputs), length (v->literals));
|
||||||
for (n = v->literals; n; n = n->next)
|
for (n = v->literals; n; n = n->next)
|
||||||
printf("%scode, ", n->text);
|
printf ("%scode, ", n->text);
|
||||||
printf("}},\n");
|
if (v->literals == 0)
|
||||||
|
printf ("0");
|
||||||
|
printf ("}},\n");
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue