ACT Library
Loading...
Searching...
No Matches
act_walk.extra.h
Go to the documentation of this file.
1/*************************************************************************
2 *
3 * This file is part of the ACT library
4 *
5 * Copyright (c) 2011, 2018-2019 Rajit Manohar
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 *
22 **************************************************************************
23 */
24#ifndef __ACT_EXTRA_H__
25#define __ACT_EXTRA_H__
26
27#include <stdio.h>
28#include <string.h>
29#include <common/list.h>
30#include <common/except.h>
31#include <common/qops.h>
32#include <common/misc.h>
33#include <common/config.h>
34#include <act/lang.h>
35#include <act/path.h>
36#include <act/namespaces.h>
37#include <act/types.h>
38#include <act/inst.h>
39#include <act/body.h>
40#include "treetypes.h"
41
42#define OPT_EXISTS(x) !list_isempty (x)
43#define OPT_EMPTY(x) list_isempty (x)
44#define LIST_VALUE(x) ((ActRet *)list_value (x))
45#define OPT_VALUE(x) LIST_VALUE (list_first (x))
46#define OPT_FREE(x) list_free(x)
47#define OPT_VALUE2(x) LIST_VALUE (list_next (list_first (x)))
48#define OPT_VALUE3(x) LIST_VALUE (list_next (list_next (list_first (x))))
49#define OPT_VALUE4(x) LIST_VALUE (list_next (list_next (list_next (list_first (x)))))
50
51Expr *const_expr (long val);
52Expr *act_walk_X_expr (ActTree *cookie, Expr *e);
53void print_ns_string (FILE *fp, list_t *l);
56
57#endif /* __ACT_EXTRA_H__ */
Expr * const_expr(long val)
void print_ns_string(FILE *fp, list_t *l)
int _act_id_is_enum_const(ActOpen *os, ActNamespace *ns, ActId *id)
int _act_id_is_true_false(ActId *id)
Expr * act_walk_X_expr(ActTree *cookie, Expr *e)
This class is used to store Act identifiers that correspond to instances. Identifiers have an optiona...
Definition: act_id.h:56
The ActNamespace class holds all the information about a namespace.
Definition: namespaces.h:469
Functions to manage namespace search paths.
Definition: namespaces.h:798
This contains the definition of InstType, the core data structure used to hold the type of any instan...
Contains the data structures for each ACT sub-language.
This contains the defintions of the ActNamespace class as well as the Scope classes....
Definition: expr.h:79