ACT Library
Loading...
Searching...
No Matches
expr_extra.h
Go to the documentation of this file.
1/*************************************************************************
2 *
3 * Copyright (c) 2023 Rajit Manohar
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 *
20 **************************************************************************
21 */
22#ifndef __ACT_EXPR_EXTRA_H__
23#define __ACT_EXPR_EXTRA_H__
24
36/*-- more options for expanded expressions --*/
37
38#define E_TYPE (E_END + 10)
39
40#define E_ARRAY (E_END + 11)
43
44#define E_SUBRANGE (E_END + 12)
49
50#define E_SELF (E_END + 20)
51#define E_SELF_ACK (E_END + 19)
52
53/*
54 For loops:
55 e->l->l = id, e->r->l = lo, e->r->r->l = hi, e->r->r->r = expr
56 WARNING: replicated in expr_extra.c
57*/
58#define E_ANDLOOP (E_END + 21)
61
62#define E_ORLOOP (E_END + 22)
65
66#define E_BUILTIN_BOOL (E_END + 23)
67#define E_BUILTIN_INT (E_END + 24)
68
69/*
70 ENUM_CONST during parsing only used for
71 ::foo::bar::baz.N
72 u.fn.s field == string to enum
73 u.fn.r field = string for N
74
75 After the "walk" re-writing, this is used as:
76 u.fn.s = enum type pointer (Data *)
77 u.fn.r field = string corresponding to enum element
78
79 After type-checking, this is eliminated and replaced with an
80 int const.
81*/
82#define E_ENUM_CONST (E_END + 25)
83
84
85#define E_NEWEND E_END + 26
86
87#ifdef __cplusplus
88extern "C" {
89#endif
90
91/*
92 * Parsing functions for external function extras
93 */
99
100#ifdef __cplusplus
101}
102#endif
103
104#endif /* __ACT_EXPR_EXTRA_H__ */
int act_expr_parse_newtokens(LFILE *l)
Expr * act_parse_expr_syn_loop_bool(LFILE *l)
int act_expr_free_default(Expr *)
Expr * act_parse_expr_intexpr_base(LFILE *l)
Expr * act_expr_any_basecase(LFILE *l)
Definition: expr.h:79