diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-13 09:03:48 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-13 09:03:48 +0000 |
commit | 1cb8dd63a9f58d7f106b2d90f39fe4170bc593ec (patch) | |
tree | ffcc18e7df150785b6195dbd7d97b32893c554f3 /gcc/ada/sinfo.ads | |
parent | d56d85256c52cec518357fe0e2eca62267b1d796 (diff) | |
download | gcc-1cb8dd63a9f58d7f106b2d90f39fe4170bc593ec.tar.gz |
2009-07-13 Robert Dewar <dewar@adacore.com>
* par-ch3.adb (P_Discrete_Choice_List): Choice can only be simple
expression if extensions permitted.
* par-ch4.adb (P_Membership_Test): New procedure (implement membership
set tests).
(P_Relation): Use P_Membership_Test
* par.adb (P_Membership_Test): New procedure (implement membership set
tests).
* sinfo.ads, sinfo.adb (N_In, N_Not_In) Add Alternatives field for sets.
* sprint.adb (Sprint_Node): Handle set form for membership tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149556 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sinfo.ads')
-rw-r--r-- | gcc/ada/sinfo.ads | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 4aafa5959d4..1e2cd0aff6a 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -3472,23 +3472,38 @@ package Sinfo is -- SIMPLE_EXPRESSION [not] in RANGE -- | SIMPLE_EXPRESSION [not] in SUBTYPE_MARK - -- Note: although the grammar above allows only a range or a - -- subtype mark, the parser in fact will accept any simple - -- expression in place of a subtype mark. This means that the - -- semantic analyzer must be prepared to deal with, and diagnose - -- a simple expression other than a name for the right operand. - -- This simplifies error recovery in the parser. + -- Note: although the grammar above allows only a range or a subtype + -- mark, the parser in fact will accept any simple expression in place + -- of a subtype mark. This means that the semantic analyzer must be able + -- to deal with, and diagnose a simple expression other than a name for + -- the right operand. This simplifies error recovery in the parser. + + -- If extensions are enabled, the grammar is as follows: + + -- RELATION ::= + -- SIMPLE_EXPRESSION [not] in SET_ALTERNATIVE {| SET_ALTERNATIVE} + + -- SET_ALTERNATIVE ::= RANGE | SUBTYPE_MARK + + -- The Alternatives field below is present only if there is more than + -- one Set_Alternative present, in which case Right_Opnd is set to + -- Empty, and Alternatives contains the list of alternatives. In the + -- tree passed to the back end, Alternatives is always No_List, and + -- Right_Opnd is set (i.e. the expansion circuitry expands out the + -- complex set membership case using simple membership operations). -- N_In -- Sloc points to IN -- Left_Opnd (Node2) -- Right_Opnd (Node3) + -- Alternatives (List4) (set to No_List if only one set alternative) -- plus fields for expression -- N_Not_In -- Sloc points to NOT of NOT IN -- Left_Opnd (Node2) -- Right_Opnd (Node3) + -- Alternatives (List4) (set to No_List if only one set alternative) -- plus fields for expression -------------------- @@ -9757,14 +9772,14 @@ package Sinfo is (1 => False, -- unused 2 => True, -- Left_Opnd (Node2) 3 => True, -- Right_Opnd (Node3) - 4 => False, -- unused + 4 => True, -- Alternatives (List4) 5 => False), -- Etype (Node5-Sem) N_Not_In => (1 => False, -- unused 2 => True, -- Left_Opnd (Node2) 3 => True, -- Right_Opnd (Node3) - 4 => False, -- unused + 4 => True, -- Alternatives (List4) 5 => False), -- Etype (Node5-Sem) N_Op_And => |