mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
"Compiling" version
This commit is contained in:
parent
226d79eb4a
commit
3f5da24ea3
72 changed files with 3363 additions and 2061 deletions
|
|
@ -1,13 +1,31 @@
|
|||
/* List a node on a file */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "PROTO.h"
|
||||
#include "pgenheaders.h"
|
||||
#include "token.h"
|
||||
#include "node.h"
|
||||
|
||||
/* Forward */
|
||||
static void list1node PROTO((FILE *, node *));
|
||||
|
||||
void
|
||||
listtree(n)
|
||||
node *n;
|
||||
{
|
||||
listnode(stdout, n);
|
||||
}
|
||||
|
||||
static int level, atbol;
|
||||
|
||||
void
|
||||
listnode(fp, n)
|
||||
FILE *fp;
|
||||
node *n;
|
||||
{
|
||||
level = 0;
|
||||
atbol = 1;
|
||||
list1node(fp, n);
|
||||
}
|
||||
|
||||
static void
|
||||
list1node(fp, n)
|
||||
FILE *fp;
|
||||
|
|
@ -49,20 +67,3 @@ list1node(fp, n)
|
|||
else
|
||||
fprintf(fp, "? ");
|
||||
}
|
||||
|
||||
void
|
||||
listnode(fp, n)
|
||||
FILE *fp;
|
||||
node *n;
|
||||
{
|
||||
level = 0;
|
||||
atbol = 1;
|
||||
list1node(fp, n);
|
||||
}
|
||||
|
||||
void
|
||||
listtree(n)
|
||||
node *n;
|
||||
{
|
||||
listnode(stdout, n);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue