added my own from ps3

This commit is contained in:
2022-03-12 19:21:38 +01:00
parent 6856407f38
commit a5f6aaf1fa
5 changed files with 298 additions and 161 deletions

View File

@@ -10,8 +10,16 @@ typedef struct n {
struct n **children;
} node_t;
// Export the initializer function, it is needed by the parser
void node_init (
/**Export the initializer function, it is needed by the parser
* @param *nd node to initialize
* @param type type of node (see nodetype.h)
* @param *data associated data. Declared void to allow any type
* @param n_children number of children
* @param ... variable argument list of child nodes (node_t *)
*
* @return Pointer to the initialized node
* */
node_t* node_init (
node_t *nd, node_index_t type, void *data, uint64_t n_children, ...
);

View File

@@ -25,6 +25,7 @@ int yyerror ( const char *error );
/* These are defined in the parser generated by bison */
extern int yylineno;
extern int yylex ( void );
extern int yylex_destroy( void );
extern char yytext[];
/* Global state */