/* ===================================================================== Source: template.rule ===================================================================== */ /* op_template : | template_m ; template_m : TEMPLATE template_list END_TEMPLATE {list_print_all();} ; template_list : template_item | template_list template_item ; template_item : identifier EQUAL template_value { list_copy($3,$1); } | identifier OPEN_SQUARE CLOSE_SQUARE EQUAL template_value { list_copy($3,$1); } | DATABASE EQUAL template_single_value {list_copy($3,"_database");} ; template_single_value : PROMPT CHAR_VALUE { char *a; a=(char *)new_id(); strcpy($$,a); list_prompt_single(a,$2);} | PROMPT_MANY CHAR_VALUE { char *a; a=(char *)new_id(); strcpy($$,a); list_prompt_many(a,$2);} | PROMPT INT_VALUE KW_COMMA CHAR_VALUE { char *a; a=(char *)new_id(); strcpy($$,a); list_prompt_many(a,$4);} | CHAR_VALUE { char *a; a=(char *)new_id(); strcpy($$,a); list_set_single(a,$1);} | INT_VALUE { char *a; a=(char *)new_id(); strcpy($$,a); list_set_single(a,$1);} ; template_value : COLUMNS identifier { char *a; a=(char *)new_id(); strcpy($$,a); list_columns(a,$2);} | identifier | template_single_value | template_value KW_PLUS template_value { char *a; a=(char *)new_id(); strcpy($$,a); list_set_plus(a,$1,$3);} | template_value KW_MINUS template_value { char *a; a=(char *)new_id(); strcpy($$,a); list_set_minus(a,$1,$3);} | template_value KW_IN template_value { char *a; a=(char *)new_id(); strcpy($$,a); list_in(); } | OPEN_BRACKET template_value CLOSE_BRACKET { strcpy($$,$2); } | APPEND template_single_value KW_TO template_value { char *a; a=(char *)new_id(); strcpy($$,a); list_append(a,$4,$2);} | PREPEND template_single_value KW_TO template_value { char *a; a=(char *)new_id(); strcpy($$,a); list_append(a,$4,$2);} | USE template_value WITH template_single_value KW_ON template_value { char *a; a=(char *)new_id(); strcpy($$,a); list_append($2,$6,$4); } ; */