gdb/gdbserver:
[deliverable/binutils-gdb.git] / gdb / ada-operator.def
CommitLineData
56c12414
JK
1/* Ada language operator definitions for GDB, the GNU debugger.
2
0b302171
JB
3 Copyright (C) 1992, 1997-2005, 2007-2012 Free Software Foundation,
4 Inc.
56c12414
JK
5
6 This file is part of GDB.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21/* X IN A'RANGE(N). N is an immediate operand, surrounded by
22 BINOP_IN_BOUNDS before and after. A is an array, X an index
23 value. Evaluates to true iff X is within range of the Nth
24 dimension (1-based) of A. (A multi-dimensional array
25 type is represented as array of array of ...) */
26OP (BINOP_IN_BOUNDS)
27
28/* X IN L .. U. True iff L <= X <= U. */
29OP (TERNOP_IN_RANGE)
30
31/* Ada attributes ('Foo). */
32OP (OP_ATR_FIRST)
33OP (OP_ATR_LAST)
34OP (OP_ATR_LENGTH)
35OP (OP_ATR_IMAGE)
36OP (OP_ATR_MAX)
37OP (OP_ATR_MIN)
38OP (OP_ATR_MODULUS)
39OP (OP_ATR_POS)
40OP (OP_ATR_SIZE)
41OP (OP_ATR_TAG)
42OP (OP_ATR_VAL)
43
44/* Ada type qualification. It is encoded as for UNOP_CAST, above,
45 and denotes the TYPE'(EXPR) construct. */
46OP (UNOP_QUAL)
47
48/* X IN TYPE. The `TYPE' argument is immediate, with
49 UNOP_IN_RANGE before and after it. True iff X is a member of
50 type TYPE (typically a subrange). */
51OP (UNOP_IN_RANGE)
52
53/* An aggregate. A single immediate operand, N>0, gives
54 the number of component specifications that follow. The
55 immediate operand is followed by a second OP_AGGREGATE.
56 Next come N component specifications. A component
57 specification is either an OP_OTHERS (others=>...), an
58 OP_CHOICES (for named associations), or other expression (for
59 positional aggregates only). Aggregates currently
60 occur only as the right sides of assignments. */
61OP (OP_AGGREGATE)
62
63/* An others clause. Followed by a single expression. */
64OP (OP_OTHERS)
65
66/* An aggregate component association. A single immediate operand, N,
67 gives the number of choices that follow. This is followed by a second
68 OP_CHOICES operator. Next come N operands, each of which is an
69 expression, an OP_DISCRETE_RANGE, or an OP_NAME---the latter
70 for a simple name that must be a record component name and does
71 not correspond to a single existing symbol. After the N choice
72 indicators comes an expression giving the value.
73
74 In an aggregate such as (X => E1, ...), where X is a simple
75 name, X could syntactically be either a component_selector_name
76 or an expression used as a discrete_choice, depending on the
77 aggregate's type context. Since this is not known at parsing
78 time, we don't attempt to disambiguate X if it has multiple
79 definitions, but instead supply an OP_NAME. If X has a single
80 definition, we represent it with an OP_VAR_VALUE, even though
81 it may turn out to be within a record aggregate. Aggregate
82 evaluation can use either OP_NAMEs or OP_VAR_VALUEs to get a
83 record field name, and can evaluate OP_VAR_VALUE normally to
84 get its value as an expression. Unfortunately, we lose out in
85 cases where X has multiple meanings and is part of an array
86 aggregate. I hope these are not common enough to annoy users,
87 who can work around the problem in any case by putting
88 parentheses around X. */
89OP (OP_CHOICES)
90
91/* A positional aggregate component association. The operator is
92 followed by a single integer indicating the position in the
93 aggregate (0-based), followed by a second OP_POSITIONAL. Next
94 follows a single expression giving the component value. */
95OP (OP_POSITIONAL)
96
97/* A range of values. Followed by two expressions giving the
98 upper and lower bounds of the range. */
99OP (OP_DISCRETE_RANGE)
This page took 0.146626 seconds and 4 git commands to generate.