aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-09-05 15:01:17 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-09-05 15:01:17 +0200
commitec09f2616d9ef9cc0f30adb43c00fa02e928a51d (patch)
tree722b72d2c0b3b7a1539911871f9c6d663acb878b /gcc/ada/par.adb
parent7109f4f52da4ea189b04aeb29a077d140855cb52 (diff)
[multiple changes]
2011-09-05 Johannes Kanig <kanig@adacore.com> * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect information. 2011-09-05 Ed Schonberg <schonberg@adacore.com> * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram appears within a package specification and the token after "IS" is not a parenthesis, assume that this is an unparenthesized expression function, even if the token appears in a line by itself. * par.adb: Clarify use of Labl field of scope stack in error recovery. From-SVN: r178532
Diffstat (limited to 'gcc/ada/par.adb')
-rw-r--r--gcc/ada/par.adb21
1 files changed, 14 insertions, 7 deletions
diff --git a/gcc/ada/par.adb b/gcc/ada/par.adb
index 0dbb7d988a7..4abc5b24195 100644
--- a/gcc/ada/par.adb
+++ b/gcc/ada/par.adb
@@ -466,15 +466,22 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is
-- control heuristic error recovery actions.
Labl : Node_Id;
- -- This field is used only for the LOOP and BEGIN cases, and is the
- -- Node_Id value of the label name. For all cases except child units,
- -- this value is an entity whose Chars field contains the name pointer
- -- that identifies the label uniquely. For the child unit case the Labl
- -- field references an N_Defining_Program_Unit_Name node for the name.
- -- For cases other than LOOP or BEGIN, the Label field is set to Error,
- -- indicating that it is an error to have a label on the end line.
+ -- This field is used to provide the name of the construct being parsed
+ -- and indirectly its kind. For loops and blocks, the field contains the
+ -- source name or the generated one. For package specifications, bodies,
+ -- subprogram specifications and bodies the field holds the correponding
+ -- program unit name. For task declarations and bodies, protected types
+ -- and bodies, and accept statements the field hold the name of the type
+ -- or operation. For if-statements, case-statements, and selects, the
+ -- field is initialized to Error, indicating that it is an error to have
+ -- a label on the end line.
-- (this is really a misuse of Error since there is no Error ???)
+ -- Whenever the field is a name, it is attached to the parent node of
+ -- the construct being parsed. Thus the parent node indicates the kind
+ -- of construct whose parse tree is being built. This is used in error
+ -- recovery.
+
Decl : List_Id;
-- Points to the list of declarations (i.e. the declarative part)
-- associated with this construct. It is set only in the END [name]