libsapling  0.8.0
lr0_item.h
Go to the documentation of this file.
1 #ifndef _LIBSAPLING_PARSER_LR0_ITEM_H_
2 #define _LIBSAPLING_PARSER_LR0_ITEM_H_
3 
10 
11 
12 typedef struct lr0_item *lr0_item_t;
13 
19 lr0_item_t new_lr0_item(production_t production, int cursor);
20 
25 void delete_lr0_item(lr0_item_t item);
26 
31 production_t lr0_item__production(lr0_item_t item);
32 
37 int lr0_item__cursor(lr0_item_t item);
38 
39 int lr0_item__equals(const void *a, const void *b);
40 
41 void lr0_item__print(FILE *stream, const void *data);
42 
43 #endif
void delete_lr0_item(lr0_item_t item)
Frees the memory previously allocated on the heap for an LR(0) item with new_lr0_item.
int lr0_item__cursor(lr0_item_t item)
Returns the LR(0) item's cursor position.
lr0_item_t new_lr0_item(production_t production, int cursor)
Allocates a new LR(0) item on the heap.
production_t lr0_item__production(lr0_item_t item)
Returns the LR(0) item's production.
Production implementation.