#include #include #include "../grammar.h" int main(U_ATTR int argc, U_ATTR char **argv) { /* check new_tnt and print it */ TNT *tnt = new_tnt(1, 12); printf("Print a TNT value of type NT: "); print_tnt(tnt); printf("\n"); free(tnt); /* check new_tnt_string */ List *tnt_string = new_tnt_string("tntnt", 5, (T) 1, (NT) 2, (T) 3, (NT) 4, (T) 15); if (!tnt_string) { eprintf("error!\n"); return 1; } /* check new_rule, print_rule, and destroy_rule. */ Rule *rule = new_rule(1, tnt_string); print_rule(rule); destroy_rule(rule); return 0; }