Пример #1
0
/* drange destructor */
void
drange_free(drange* dr)
{
  drange_node_free_list(dr->range_list);
  g_free(dr);
}
Пример #2
0
/* The following function deletes the value associated with a
** symbol.  The symbol can be either a terminal or nonterminal.
** "yymajor" is the symbol code, and "yypminor" is a pointer to
** the value.
*/
static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor) {
    switch( yymajor ) {
    /* Here is inserted the actions which take place when a
    ** terminal or non-terminal is destroyed.  This can happen
    ** when the symbol is popped from the stack during a
    ** reduce or during error processing or when a parser is
    ** being destroyed before it is finished parsing.
    **
    ** Note: during a reduce, the only symbols destroyed are those
    ** which appear on the RHS of the rule, but which are not used
    ** inside the C code.
    */
    /* TERMINAL Destructor */
    case 1: /* TEST_AND */
    case 2: /* TEST_OR */
    case 3: /* TEST_EQ */
    case 4: /* TEST_NE */
    case 5: /* TEST_LT */
    case 6: /* TEST_LE */
    case 7: /* TEST_GT */
    case 8: /* TEST_GE */
    case 9: /* TEST_CONTAINS */
    case 10: /* TEST_MATCHES */
    case 11: /* TEST_BITWISE_AND */
    case 12: /* TEST_NOT */
    case 13: /* FIELD */
    case 14: /* STRING */
    case 15: /* UNPARSED */
    case 16: /* LBRACKET */
    case 17: /* RBRACKET */
    case 18: /* COMMA */
    case 19: /* INTEGER */
    case 20: /* COLON */
    case 21: /* HYPHEN */
    case 22: /* FUNCTION */
    case 23: /* LPAREN */
    case 24: /* RPAREN */
    {
#line 31 "./grammar.lemon"
        stnode_free((yypminor->yy0));
#line 469 "grammar.c"
    }
    break;
    case 27: /* expr */
    case 28: /* entity */
    case 29: /* relation_test */
    case 30: /* logical_test */
    case 32: /* range */
    {
#line 37 "grammar.c"
        stnode_free((yypminor->yy0));
#line 480 "grammar.c"
    }
    break;
    case 33: /* drnode */
    {
#line 54 "grammar.c"
        drange_node_free((yypminor->yy5));
#line 487 "grammar.c"
    }
    break;
    case 34: /* drnode_list */
    {
#line 57 "grammar.c"
        drange_node_free_list((yypminor->yy33));
#line 494 "grammar.c"
    }
    break;
    case 35: /* funcparams */
    {
#line 60 "grammar.c"
        st_funcparams_free((yypminor->yy33));
#line 501 "grammar.c"
    }
    break;
    default:
        break;   /* If no destructor action specified: do nothing */
    }
}