1 #ifndef _LIBSAPLING_PRODUCTION_H_
2 #define _LIBSAPLING_PRODUCTION_H_
12 typedef struct production *production_t;
int * production__get(production_t ref, int pos)
Returns the grammar symbol at the specified position in the production's body.
production_t new_production(int id, node_t *body)
Allocates a new production on the heap.
int production__len(production_t ref)
Returns the length of the production's body.
void delete_production(production_t ref)
Frees the memory previously allocated on the heap for a production with new_production.
void production__print(FILE *stream, const void *data)
Prints a production through the specified stream.
int production__id(production_t ref)
Returns the productions's grammar symbol identifier.