raster@15779
|
1 |
/*
|
raster@15779
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
raster@15779
|
3 |
*
|
raster@15779
|
4 |
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
raster@15779
|
5 |
*
|
raster@15779
|
6 |
* The contents of this file are subject to the terms of either the GNU
|
raster@15779
|
7 |
* General Public License Version 2 only ("GPL") or the Common
|
raster@15779
|
8 |
* Development and Distribution License("CDDL") (collectively, the
|
raster@15779
|
9 |
* "License"). You may not use this file except in compliance with the
|
raster@15779
|
10 |
* License. You can obtain a copy of the License at
|
raster@15779
|
11 |
* http://www.netbeans.org/cddl-gplv2.html
|
raster@15779
|
12 |
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
|
raster@15779
|
13 |
* specific language governing permissions and limitations under the
|
raster@15779
|
14 |
* License. When distributing the software, include this License Header
|
raster@15779
|
15 |
* Notice in each file and include the License file at
|
raster@15779
|
16 |
* nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
|
raster@15779
|
17 |
* particular file as subject to the "Classpath" exception as provided
|
raster@15779
|
18 |
* by Sun in the GPL Version 2 section of the License file that
|
raster@15779
|
19 |
* accompanied this code. If applicable, add the following below the
|
raster@15779
|
20 |
* License Header, with the fields enclosed by brackets [] replaced by
|
raster@15779
|
21 |
* your own identifying information:
|
raster@15779
|
22 |
* "Portions Copyrighted [year] [name of copyright owner]"
|
raster@15779
|
23 |
*
|
raster@15779
|
24 |
* If you wish your version of this file to be governed by only the CDDL
|
raster@15779
|
25 |
* or only the GPL Version 2, indicate your decision by adding
|
raster@15779
|
26 |
* "[Contributor] elects to include this software in this distribution
|
raster@15779
|
27 |
* under the [CDDL or GPL Version 2] license." If you do not indicate a
|
raster@15779
|
28 |
* single choice of license, a recipient has the option to distribute
|
raster@15779
|
29 |
* your version of this file under either the CDDL, the GPL Version 2 or
|
raster@15779
|
30 |
* to extend the choice of license to its licensees as provided above.
|
raster@15779
|
31 |
* However, if you add GPL Version 2 code and therefore, elected the GPL
|
raster@15779
|
32 |
* Version 2 license, then the option applies only if the new code is
|
raster@15779
|
33 |
* made subject to such option by the copyright holder.
|
raster@15779
|
34 |
*
|
raster@15779
|
35 |
* Contributor(s):
|
raster@15779
|
36 |
*
|
raster@15779
|
37 |
* Portions Copyrighted 2008 Sun Microsystems, Inc.
|
raster@15779
|
38 |
*/
|
raster@15779
|
39 |
package org.netbeans.modules.ada.editor.parser;
|
raster@15779
|
40 |
|
raster@15779
|
41 |
import org.netbeans.modules.ada.editor.lexer.Ada95ASTLexer;
|
raster@15779
|
42 |
|
raster@15779
|
43 |
parser code {:
|
raster@15779
|
44 |
|
raster@15779
|
45 |
private ErrorStrategy defaultStrategy = new DefaultErrorStrategy();;
|
raster@15779
|
46 |
private ErrorStrategy errorStrategy = defaultStrategy;
|
raster@15779
|
47 |
|
raster@15779
|
48 |
private ParserErrorHandler errorHandler = null;
|
raster@15779
|
49 |
|
raster@15779
|
50 |
public void setErrorHandler (ParserErrorHandler handler) {
|
raster@15779
|
51 |
this.errorHandler = handler;
|
raster@15779
|
52 |
}
|
raster@15779
|
53 |
|
raster@15779
|
54 |
public ParserErrorHandler getErrorHandler () {
|
raster@15779
|
55 |
return this.errorHandler;
|
raster@15779
|
56 |
}
|
raster@15779
|
57 |
|
raster@15779
|
58 |
interface ErrorStrategy {
|
raster@15779
|
59 |
public boolean errorRecovery(boolean debug) throws Exception;
|
raster@15779
|
60 |
}
|
raster@15779
|
61 |
|
raster@15779
|
62 |
class DefaultErrorStrategy implements ErrorStrategy {
|
raster@15779
|
63 |
|
raster@15779
|
64 |
public boolean errorRecovery(boolean debug) throws Exception {
|
raster@15779
|
65 |
return Ada95ASTParser.super.error_recovery(debug);
|
raster@15779
|
66 |
}
|
raster@15779
|
67 |
}
|
raster@15779
|
68 |
|
raster@15779
|
69 |
/**
|
raster@15779
|
70 |
* Attempt to recover from a syntax error. This returns false if recovery fails,
|
raster@15779
|
71 |
* true if it succeeds.
|
raster@15779
|
72 |
* @param debug should we produce debugging messages as we parse.
|
raster@15779
|
73 |
*/
|
raster@15779
|
74 |
@Override
|
raster@15779
|
75 |
protected boolean error_recovery(boolean debug) throws java.lang.Exception {
|
raster@15779
|
76 |
return errorStrategy.errorRecovery(debug);
|
raster@15779
|
77 |
}
|
raster@15779
|
78 |
|
raster@15779
|
79 |
/**
|
raster@15779
|
80 |
* Report a non fatal error (or warning). This method takes a message
|
raster@15779
|
81 |
* string and an additional object (to be used by specializations implemented in subclasses).
|
raster@15779
|
82 |
* The super class prints the message to System.err.
|
raster@15779
|
83 |
* @param message an error message.
|
raster@15779
|
84 |
* @param info an extra object reserved for use by specialized subclasses.
|
raster@15779
|
85 |
*/
|
raster@15779
|
86 |
@Override
|
raster@15779
|
87 |
public void report_error(String message, Object info) {
|
raster@15779
|
88 |
System.out.print("report_eror" + message);
|
raster@15779
|
89 |
}
|
raster@15779
|
90 |
|
raster@15779
|
91 |
/**
|
raster@15779
|
92 |
* This method is called when a syntax error has been detected and recovery is about to be invoked.
|
raster@15779
|
93 |
* The super class just emit a "Syntax error" error message.
|
raster@15779
|
94 |
* @param cur_token the current lookahead Symbol.
|
raster@15779
|
95 |
*/
|
raster@15779
|
96 |
@Override
|
raster@15779
|
97 |
public void syntax_error(java_cup.runtime.Symbol cur_token) {
|
raster@15779
|
98 |
java_cup.runtime.Symbol symbol = (java_cup.runtime.Symbol)stack.peek();
|
raster@15779
|
99 |
int state = symbol.parse_state;
|
raster@15779
|
100 |
short[] rowOfProbe = action_tab[state];
|
raster@15779
|
101 |
if (errorHandler != null) {
|
raster@15779
|
102 |
errorHandler.handleError(ParserErrorHandler.Type.SYNTAX_ERROR, rowOfProbe, cur_token, symbol);
|
raster@15779
|
103 |
}
|
raster@15779
|
104 |
}
|
raster@15779
|
105 |
|
raster@15779
|
106 |
/**
|
raster@15779
|
107 |
* This method is called when a syntax error has been detected during action.
|
raster@15779
|
108 |
* @param message an error message.
|
raster@15779
|
109 |
*/
|
raster@15779
|
110 |
public void message_error(String message) {
|
raster@15779
|
111 |
java_cup.runtime.Symbol symbol = (java_cup.runtime.Symbol)stack.peek();
|
raster@15779
|
112 |
if (errorHandler != null) {
|
raster@15779
|
113 |
errorHandler.handleError(ParserErrorHandler.Type.SYNTAX_ERROR, symbol, message);
|
raster@15779
|
114 |
}
|
raster@15779
|
115 |
}
|
raster@15779
|
116 |
|
raster@15779
|
117 |
/**
|
raster@15779
|
118 |
* Report a fatal error. This method takes a message string and an additional object
|
raster@15779
|
119 |
* (to be used by specializations implemented in subclasses).
|
raster@15779
|
120 |
* The super class reports the error then throws an exception.
|
raster@15779
|
121 |
* @param message an error message.
|
raster@15779
|
122 |
* @param info an extra object reserved for use by specialized subclasses.
|
raster@15779
|
123 |
*/
|
raster@15779
|
124 |
@Override
|
raster@15779
|
125 |
public void report_fatal_error(String message, Object info) throws Exception {
|
raster@15779
|
126 |
if (errorHandler != null) {
|
raster@15779
|
127 |
errorHandler.handleError(ParserErrorHandler.Type.FATAL_PARSER_ERROR, null, cur_token, null);
|
raster@15779
|
128 |
}
|
raster@15779
|
129 |
}
|
raster@15779
|
130 |
|
raster@15779
|
131 |
@Override
|
raster@15779
|
132 |
protected int error_sync_size() {
|
raster@15779
|
133 |
return 1;
|
raster@15779
|
134 |
}
|
raster@15779
|
135 |
|
raster@15779
|
136 |
:}
|
raster@15779
|
137 |
|
raster@15779
|
138 |
|
raster@15779
|
139 |
/*********************************************************
|
raster@15779
|
140 |
* *
|
raster@15779
|
141 |
* Ada 95 (LALR) Parser (no AST), based on: *
|
raster@15779
|
142 |
* *
|
raster@15779
|
143 |
* 1. Ada Reference Manual *
|
raster@15779
|
144 |
* ISO/IEC 8652:1995(E) *
|
raster@15779
|
145 |
* with Technical Corrigendum 1 *
|
raster@15779
|
146 |
* Language and Standard Libraries *
|
raster@16367
|
147 |
* Copyright © 1992,1993,1994,1995 Intermetrics, Inc. *
|
raster@16367
|
148 |
* Copyright © 2000 The MITRE Corporation, Inc. *
|
raster@15779
|
149 |
* 2. http://www.adaic.com/standards/95lrm/grammar9x.y *
|
raster@15779
|
150 |
* *
|
raster@15779
|
151 |
* Author: Andrea Lucarelli *
|
raster@15779
|
152 |
* Parser Generator: JavCup *
|
raster@15779
|
153 |
* *
|
raster@15779
|
154 |
*********************************************************/
|
raster@15779
|
155 |
|
raster@15779
|
156 |
/*************************
|
raster@15779
|
157 |
* JavaCup Terminals *
|
raster@15779
|
158 |
*************************/
|
raster@15779
|
159 |
|
raster@15779
|
160 |
//
|
raster@15779
|
161 |
// Ada 95 keywords
|
raster@15779
|
162 |
//
|
raster@15779
|
163 |
terminal ABORT;
|
raster@15779
|
164 |
terminal ABS;
|
raster@15779
|
165 |
terminal ABSTRACT;
|
raster@15779
|
166 |
terminal ACCEPT;
|
raster@15779
|
167 |
terminal ACCESS;
|
raster@15779
|
168 |
terminal ALIASED;
|
raster@15779
|
169 |
terminal ALL;
|
raster@15779
|
170 |
terminal AND;
|
raster@15779
|
171 |
terminal ARRAY;
|
raster@15779
|
172 |
terminal AT;
|
raster@15779
|
173 |
terminal BEGIN;
|
raster@15779
|
174 |
terminal BODY;
|
raster@15779
|
175 |
terminal CASE;
|
raster@15779
|
176 |
terminal CONSTANT;
|
raster@15779
|
177 |
terminal DECLARE;
|
raster@15779
|
178 |
terminal DELAY;
|
raster@15779
|
179 |
terminal DELTA;
|
raster@15779
|
180 |
terminal DIGITS;
|
raster@15779
|
181 |
terminal DO;
|
raster@15779
|
182 |
terminal ELSE;
|
raster@15779
|
183 |
terminal ELSIF;
|
raster@15779
|
184 |
terminal END;
|
raster@15779
|
185 |
terminal ENTRY;
|
raster@15779
|
186 |
terminal EXCEPTION;
|
raster@15779
|
187 |
terminal EXIT;
|
raster@15779
|
188 |
terminal FOR;
|
raster@15779
|
189 |
terminal FUNCTION;
|
raster@15779
|
190 |
terminal GENERIC;
|
raster@15779
|
191 |
terminal GOTO;
|
raster@15779
|
192 |
terminal IF;
|
raster@15779
|
193 |
terminal IN;
|
raster@15779
|
194 |
terminal IS;
|
raster@15779
|
195 |
terminal LIMITED;
|
raster@15779
|
196 |
terminal LOOP;
|
raster@15779
|
197 |
terminal MOD;
|
raster@15779
|
198 |
terminal NEW;
|
raster@15779
|
199 |
terminal NOT;
|
raster@15779
|
200 |
terminal NULL;
|
raster@15779
|
201 |
terminal OF;
|
raster@15779
|
202 |
terminal OR;
|
raster@15779
|
203 |
terminal OTHERS;
|
raster@15779
|
204 |
terminal OUT;
|
raster@15779
|
205 |
terminal PACKAGE;
|
raster@15779
|
206 |
terminal PRAGMA;
|
raster@15779
|
207 |
terminal PRIVATE;
|
raster@15779
|
208 |
terminal PROCEDURE;
|
raster@15779
|
209 |
terminal PROTECTED;
|
raster@15779
|
210 |
terminal RAISE;
|
raster@15779
|
211 |
terminal RANGE;
|
raster@15779
|
212 |
terminal RECORD;
|
raster@15779
|
213 |
terminal REM;
|
raster@15779
|
214 |
terminal RENAMES;
|
raster@15779
|
215 |
terminal REQUEUE;
|
raster@15779
|
216 |
terminal RETURN;
|
raster@15779
|
217 |
terminal REVERSE;
|
raster@15779
|
218 |
terminal SELECT;
|
raster@15779
|
219 |
terminal SEPARATE;
|
raster@15779
|
220 |
terminal SUBTYPE;
|
raster@15779
|
221 |
terminal TAGGED;
|
raster@15779
|
222 |
terminal TASK;
|
raster@15779
|
223 |
terminal TERMINATE;
|
raster@15779
|
224 |
terminal THEN;
|
raster@15779
|
225 |
terminal TYPE;
|
raster@15779
|
226 |
terminal UNTIL;
|
raster@15779
|
227 |
terminal USE;
|
raster@15779
|
228 |
terminal WHEN;
|
raster@15779
|
229 |
terminal WHILE;
|
raster@15779
|
230 |
terminal WITH;
|
raster@15779
|
231 |
terminal XOR;
|
raster@15779
|
232 |
|
raster@15779
|
233 |
//
|
raster@15779
|
234 |
// delimiters
|
raster@15779
|
235 |
//
|
raster@15779
|
236 |
terminal AMP;
|
raster@15779
|
237 |
terminal TICK;
|
raster@15779
|
238 |
terminal LPAREN;
|
raster@15779
|
239 |
terminal RPAREN;
|
raster@15779
|
240 |
terminal STAR;
|
raster@15779
|
241 |
terminal PLUS;
|
raster@15779
|
242 |
terminal COMMA;
|
raster@15779
|
243 |
terminal MINUS;
|
raster@15779
|
244 |
terminal DOT;
|
raster@15779
|
245 |
terminal SLASH;
|
raster@15779
|
246 |
terminal COLON;
|
raster@15779
|
247 |
terminal SEMICOLON;
|
raster@15779
|
248 |
terminal GT;
|
raster@15779
|
249 |
terminal EQ;
|
raster@15779
|
250 |
terminal LT;
|
raster@15779
|
251 |
terminal BAR;
|
raster@15779
|
252 |
|
raster@15779
|
253 |
//
|
raster@15779
|
254 |
// compound delimiters
|
raster@15779
|
255 |
//
|
raster@15779
|
256 |
terminal ARROW;
|
raster@15779
|
257 |
terminal DOT_DOT;
|
raster@15779
|
258 |
terminal EXPON;
|
raster@15779
|
259 |
terminal ASSIGNMENT;
|
raster@15779
|
260 |
terminal INEQ;
|
raster@15779
|
261 |
terminal GTEQ;
|
raster@15779
|
262 |
terminal LTEQ;
|
raster@15779
|
263 |
terminal LTLT;
|
raster@15779
|
264 |
terminal GTGT;
|
raster@15779
|
265 |
terminal BOX;
|
raster@15779
|
266 |
|
raster@15779
|
267 |
terminal BASED_LITERAL;
|
raster@15779
|
268 |
terminal DECIMAL_LITERAL;
|
raster@15779
|
269 |
terminal CHAR_LITERAL;
|
raster@15779
|
270 |
terminal STRING_LITERAL;
|
raster@15779
|
271 |
terminal IDENTIFIER;
|
raster@15779
|
272 |
|
raster@15779
|
273 |
non terminal compilation;
|
raster@15779
|
274 |
non terminal pragma;
|
raster@15779
|
275 |
non terminal simple_name;
|
raster@15779
|
276 |
non terminal pragma_arg_s;
|
raster@15779
|
277 |
non terminal pragma_arg;
|
raster@15779
|
278 |
non terminal pragma_s;
|
raster@15779
|
279 |
non terminal decl;
|
raster@15779
|
280 |
non terminal object_decl;
|
raster@15779
|
281 |
non terminal def_id_s;
|
raster@15779
|
282 |
non terminal def_id;
|
raster@15779
|
283 |
non terminal object_qualifier_opt;
|
raster@15779
|
284 |
non terminal object_subtype_def;
|
raster@15779
|
285 |
non terminal init_opt;
|
raster@15779
|
286 |
non terminal number_decl;
|
raster@15779
|
287 |
non terminal type_decl;
|
raster@15779
|
288 |
non terminal discrim_part_opt;
|
raster@15779
|
289 |
non terminal type_completion;
|
raster@15779
|
290 |
non terminal type_def;
|
raster@15779
|
291 |
non terminal subtype_decl;
|
raster@15779
|
292 |
non terminal subtype_ind;
|
raster@15779
|
293 |
non terminal constraint;
|
raster@15779
|
294 |
non terminal decimal_digits_constraint;
|
raster@15779
|
295 |
non terminal derived_type;
|
raster@15779
|
296 |
non terminal range_constraint;
|
raster@15779
|
297 |
non terminal range;
|
raster@15779
|
298 |
non terminal enumeration_type;
|
raster@15779
|
299 |
non terminal enum_id_s;
|
raster@15779
|
300 |
non terminal enum_id;
|
raster@15779
|
301 |
non terminal integer_type;
|
raster@15779
|
302 |
non terminal range_spec;
|
raster@15779
|
303 |
non terminal range_spec_opt;
|
raster@15779
|
304 |
non terminal real_type;
|
raster@15779
|
305 |
non terminal float_type;
|
raster@15779
|
306 |
non terminal fixed_type;
|
raster@15779
|
307 |
non terminal array_type;
|
raster@15779
|
308 |
non terminal unconstr_array_type;
|
raster@15779
|
309 |
non terminal constr_array_type;
|
raster@15779
|
310 |
non terminal component_subtype_def;
|
raster@15779
|
311 |
non terminal aliased_opt;
|
raster@15779
|
312 |
non terminal index_s;
|
raster@15779
|
313 |
non terminal index;
|
raster@15779
|
314 |
non terminal iter_index_constraint;
|
raster@15779
|
315 |
non terminal iter_discrete_range_s;
|
raster@15779
|
316 |
non terminal discrete_range;
|
raster@15779
|
317 |
non terminal range_constr_opt;
|
raster@15779
|
318 |
non terminal record_type;
|
raster@15779
|
319 |
non terminal record_def;
|
raster@15779
|
320 |
non terminal tagged_opt;
|
raster@15779
|
321 |
non terminal comp_list;
|
raster@15779
|
322 |
non terminal comp_decl_s;
|
raster@15779
|
323 |
non terminal variant_part_opt;
|
raster@15779
|
324 |
non terminal comp_decl;
|
raster@15779
|
325 |
non terminal discrim_part;
|
raster@15779
|
326 |
non terminal discrim_spec_s;
|
raster@15779
|
327 |
non terminal discrim_spec;
|
raster@15779
|
328 |
non terminal access_opt;
|
raster@15779
|
329 |
non terminal variant_part;
|
raster@15779
|
330 |
non terminal variant_s;
|
raster@15779
|
331 |
non terminal variant;
|
raster@15779
|
332 |
non terminal choice_s;
|
raster@15779
|
333 |
non terminal choice;
|
raster@15779
|
334 |
non terminal discrete_with_range;
|
raster@15779
|
335 |
non terminal access_type;
|
raster@15779
|
336 |
non terminal prot_opt;
|
raster@15779
|
337 |
non terminal decl_part;
|
raster@15779
|
338 |
non terminal decl_item_s;
|
raster@15779
|
339 |
non terminal decl_item_s1;
|
raster@15779
|
340 |
non terminal decl_item;
|
raster@15779
|
341 |
non terminal decl_item_or_body_s1;
|
raster@15779
|
342 |
non terminal decl_item_or_body;
|
raster@15779
|
343 |
non terminal body;
|
raster@15779
|
344 |
non terminal name;
|
raster@15779
|
345 |
non terminal mark;
|
raster@15779
|
346 |
non terminal compound_name;
|
raster@15779
|
347 |
non terminal c_name_list;
|
raster@15779
|
348 |
non terminal used_char;
|
raster@15779
|
349 |
non terminal operator_symbol;
|
raster@15779
|
350 |
non terminal indexed_comp;
|
raster@15779
|
351 |
non terminal value_s;
|
raster@15779
|
352 |
non terminal value;
|
raster@15779
|
353 |
non terminal selected_comp;
|
raster@15779
|
354 |
non terminal attribute;
|
raster@15779
|
355 |
non terminal attribute_id;
|
raster@15779
|
356 |
non terminal literal;
|
raster@15779
|
357 |
non terminal aggregate;
|
raster@15779
|
358 |
non terminal value_s_2;
|
raster@15779
|
359 |
non terminal comp_assoc;
|
raster@15779
|
360 |
non terminal expression;
|
raster@15779
|
361 |
non terminal logical;
|
raster@15779
|
362 |
non terminal short_circuit;
|
raster@15779
|
363 |
non terminal relation;
|
raster@15779
|
364 |
non terminal relational;
|
raster@15779
|
365 |
non terminal membership;
|
raster@15779
|
366 |
non terminal simple_expression;
|
raster@15779
|
367 |
non terminal unary;
|
raster@15779
|
368 |
non terminal adding;
|
raster@15779
|
369 |
non terminal term;
|
raster@15779
|
370 |
non terminal multiplying;
|
raster@15779
|
371 |
non terminal factor;
|
raster@15779
|
372 |
non terminal primary;
|
raster@15779
|
373 |
non terminal parenthesized_primary;
|
raster@15779
|
374 |
non terminal qualified;
|
raster@15779
|
375 |
non terminal allocator;
|
raster@15779
|
376 |
non terminal statement_s;
|
raster@15779
|
377 |
non terminal statement;
|
raster@15779
|
378 |
non terminal unlabeled;
|
raster@15779
|
379 |
non terminal simple_stmt;
|
raster@15779
|
380 |
non terminal compound_stmt;
|
raster@15779
|
381 |
non terminal label;
|
raster@15779
|
382 |
non terminal NULL_stmt;
|
raster@15779
|
383 |
non terminal assign_stmt;
|
raster@15779
|
384 |
non terminal if_stmt;
|
raster@15779
|
385 |
non terminal cond_clause_s;
|
raster@15779
|
386 |
non terminal cond_clause;
|
raster@15779
|
387 |
non terminal cond_part;
|
raster@15779
|
388 |
non terminal condition;
|
raster@15779
|
389 |
non terminal else_opt;
|
raster@15779
|
390 |
non terminal case_stmt;
|
raster@15779
|
391 |
non terminal case_hdr;
|
raster@15779
|
392 |
non terminal alternative_s;
|
raster@15779
|
393 |
non terminal alternative;
|
raster@15779
|
394 |
non terminal loop_stmt;
|
raster@15779
|
395 |
non terminal label_opt;
|
raster@15779
|
396 |
non terminal iteration;
|
raster@15779
|
397 |
non terminal iter_part;
|
raster@15779
|
398 |
non terminal reverse_opt;
|
raster@15779
|
399 |
non terminal basic_loop;
|
raster@15779
|
400 |
non terminal id_opt;
|
raster@15779
|
401 |
non terminal block;
|
raster@15779
|
402 |
non terminal block_decl;
|
raster@15779
|
403 |
non terminal block_body;
|
raster@15779
|
404 |
non terminal handled_stmt_s;
|
raster@15779
|
405 |
non terminal except_handler_part_opt;
|
raster@15779
|
406 |
non terminal exit_stmt;
|
raster@15779
|
407 |
non terminal name_opt;
|
raster@15779
|
408 |
non terminal when_opt;
|
raster@15779
|
409 |
non terminal return_stmt;
|
raster@15779
|
410 |
non terminal goto_stmt;
|
raster@15779
|
411 |
non terminal subprog_decl;
|
raster@15779
|
412 |
non terminal subprog_spec;
|
raster@15779
|
413 |
non terminal designator;
|
raster@15779
|
414 |
non terminal formal_part_opt;
|
raster@15779
|
415 |
non terminal formal_part;
|
raster@15779
|
416 |
non terminal param_s;
|
raster@15779
|
417 |
non terminal param;
|
raster@15779
|
418 |
non terminal mode;
|
raster@15779
|
419 |
non terminal subprog_spec_is_push;
|
raster@15779
|
420 |
non terminal subprog_body;
|
raster@15779
|
421 |
non terminal procedure_call;
|
raster@15779
|
422 |
non terminal pkg_decl;
|
raster@15779
|
423 |
non terminal pkg_spec;
|
raster@15779
|
424 |
non terminal private_part;
|
raster@15779
|
425 |
non terminal c_id_opt;
|
raster@15779
|
426 |
non terminal pkg_body;
|
raster@15779
|
427 |
non terminal body_opt;
|
raster@15779
|
428 |
non terminal private_type;
|
raster@15779
|
429 |
non terminal limited_opt;
|
raster@15779
|
430 |
non terminal use_clause;
|
raster@15779
|
431 |
non terminal name_s;
|
raster@15779
|
432 |
non terminal rename_decl;
|
raster@15779
|
433 |
non terminal rename_unit;
|
raster@15779
|
434 |
non terminal renames;
|
raster@15779
|
435 |
non terminal task_decl;
|
raster@15779
|
436 |
non terminal task_spec;
|
raster@15779
|
437 |
non terminal task_def;
|
raster@15779
|
438 |
non terminal task_private_opt;
|
raster@15779
|
439 |
non terminal task_body;
|
raster@15779
|
440 |
non terminal prot_decl;
|
raster@15779
|
441 |
non terminal prot_spec;
|
raster@15779
|
442 |
non terminal prot_def;
|
raster@15779
|
443 |
non terminal prot_private_opt;
|
raster@15779
|
444 |
non terminal prot_op_decl_s;
|
raster@15779
|
445 |
non terminal prot_op_decl;
|
raster@15779
|
446 |
non terminal prot_elem_decl_s;
|
raster@15779
|
447 |
non terminal prot_elem_decl;
|
raster@15779
|
448 |
non terminal prot_body;
|
raster@15779
|
449 |
non terminal prot_op_body_s;
|
raster@15779
|
450 |
non terminal prot_op_body;
|
raster@15779
|
451 |
non terminal entry_decl_s;
|
raster@15779
|
452 |
non terminal entry_decl;
|
raster@15779
|
453 |
non terminal entry_body;
|
raster@15779
|
454 |
non terminal entry_body_part;
|
raster@15779
|
455 |
non terminal rep_spec_s;
|
raster@15779
|
456 |
non terminal entry_call;
|
raster@15779
|
457 |
non terminal accept_stmt;
|
raster@15779
|
458 |
non terminal accept_hdr;
|
raster@15779
|
459 |
non terminal entry_name;
|
raster@15779
|
460 |
non terminal delay_stmt;
|
raster@15779
|
461 |
non terminal select_stmt;
|
raster@15779
|
462 |
non terminal select_wait;
|
raster@15779
|
463 |
non terminal guarded_select_alt;
|
raster@15779
|
464 |
non terminal or_select;
|
raster@15779
|
465 |
non terminal select_alt;
|
raster@15779
|
466 |
non terminal delay_or_entry_alt;
|
raster@15779
|
467 |
non terminal async_select;
|
raster@15779
|
468 |
non terminal timed_entry_call;
|
raster@15779
|
469 |
non terminal cond_entry_call;
|
raster@15779
|
470 |
non terminal stmts_opt;
|
raster@15779
|
471 |
non terminal abort_stmt;
|
raster@15779
|
472 |
non terminal comp_unit;
|
raster@15779
|
473 |
non terminal private_opt;
|
raster@15779
|
474 |
non terminal context_spec;
|
raster@15779
|
475 |
non terminal with_clause;
|
raster@15779
|
476 |
non terminal use_clause_opt;
|
raster@15779
|
477 |
non terminal unit;
|
raster@15779
|
478 |
non terminal subunit;
|
raster@15779
|
479 |
non terminal subunit_body;
|
raster@15779
|
480 |
non terminal body_stub;
|
raster@15779
|
481 |
non terminal exception_decl;
|
raster@15779
|
482 |
non terminal except_handler_part;
|
raster@15779
|
483 |
non terminal exception_handler;
|
raster@15779
|
484 |
non terminal except_choice_s;
|
raster@15779
|
485 |
non terminal except_choice;
|
raster@15779
|
486 |
non terminal raise_stmt;
|
raster@15779
|
487 |
non terminal requeue_stmt;
|
raster@15779
|
488 |
non terminal generic_decl;
|
raster@15779
|
489 |
non terminal generic_formal_part;
|
raster@15779
|
490 |
non terminal generic_formal;
|
raster@15779
|
491 |
non terminal generic_discrim_part_opt;
|
raster@15779
|
492 |
non terminal subp_default;
|
raster@15779
|
493 |
non terminal generic_type_def;
|
raster@15779
|
494 |
non terminal generic_derived_type;
|
raster@15779
|
495 |
non terminal generic_subp_inst;
|
raster@15779
|
496 |
non terminal generic_pkg_inst;
|
raster@15779
|
497 |
non terminal generic_inst;
|
raster@15779
|
498 |
non terminal rep_spec;
|
raster@15779
|
499 |
non terminal attrib_def;
|
raster@15779
|
500 |
non terminal record_type_spec;
|
raster@15779
|
501 |
non terminal align_opt;
|
raster@15779
|
502 |
non terminal comp_loc_s;
|
raster@15779
|
503 |
non terminal address_spec;
|
raster@15779
|
504 |
non terminal code_stmt;
|
raster@15779
|
505 |
|
raster@15779
|
506 |
// root symbol
|
raster@15779
|
507 |
start with compilation;
|
raster@15779
|
508 |
|
raster@15779
|
509 |
pragma ::= PRAGMA IDENTIFIER SEMICOLON
|
raster@15779
|
510 |
| PRAGMA simple_name LPAREN pragma_arg_s RPAREN SEMICOLON
|
raster@15779
|
511 |
;
|
raster@15779
|
512 |
|
raster@15779
|
513 |
pragma_arg_s ::= pragma_arg
|
raster@15779
|
514 |
| pragma_arg_s COMMA pragma_arg
|
raster@15779
|
515 |
;
|
raster@15779
|
516 |
|
raster@15779
|
517 |
pragma_arg ::= expression
|
raster@15779
|
518 |
| simple_name ARROW expression
|
raster@15779
|
519 |
;
|
raster@15779
|
520 |
|
raster@15779
|
521 |
pragma_s ::=
|
raster@15779
|
522 |
| pragma_s pragma
|
raster@15779
|
523 |
;
|
raster@15779
|
524 |
|
raster@15779
|
525 |
decl ::= object_decl
|
raster@15779
|
526 |
| number_decl
|
raster@15779
|
527 |
| type_decl
|
raster@15779
|
528 |
| subtype_decl
|
raster@15779
|
529 |
| subprog_decl
|
raster@15779
|
530 |
| pkg_decl
|
raster@15779
|
531 |
| task_decl
|
raster@15779
|
532 |
| prot_decl
|
raster@15779
|
533 |
| exception_decl
|
raster@15779
|
534 |
| rename_decl
|
raster@15779
|
535 |
| generic_decl
|
raster@15779
|
536 |
| body_stub
|
raster@15779
|
537 |
| error SEMICOLON
|
raster@15779
|
538 |
;
|
raster@15779
|
539 |
|
raster@15779
|
540 |
object_decl ::= def_id_s COLON object_qualifier_opt object_subtype_def init_opt SEMICOLON
|
raster@15779
|
541 |
;
|
raster@15779
|
542 |
|
raster@15779
|
543 |
def_id_s ::= def_id
|
raster@15779
|
544 |
| def_id_s COMMA def_id
|
raster@15779
|
545 |
;
|
raster@15779
|
546 |
|
raster@15779
|
547 |
def_id ::= IDENTIFIER
|
raster@15779
|
548 |
;
|
raster@15779
|
549 |
|
raster@15779
|
550 |
object_qualifier_opt ::=
|
raster@15779
|
551 |
| ALIASED
|
raster@15779
|
552 |
| CONSTANT
|
raster@15779
|
553 |
| ALIASED CONSTANT
|
raster@15779
|
554 |
;
|
raster@15779
|
555 |
|
raster@15779
|
556 |
object_subtype_def ::= subtype_ind
|
raster@15779
|
557 |
| array_type
|
raster@15779
|
558 |
;
|
raster@15779
|
559 |
|
raster@15779
|
560 |
init_opt ::=
|
raster@15779
|
561 |
| ASSIGNMENT expression
|
raster@15779
|
562 |
;
|
raster@15779
|
563 |
|
raster@15779
|
564 |
number_decl ::= def_id_s COLON CONSTANT ASSIGNMENT expression SEMICOLON
|
raster@15779
|
565 |
;
|
raster@15779
|
566 |
|
raster@15779
|
567 |
type_decl ::= TYPE IDENTIFIER discrim_part_opt type_completion SEMICOLON
|
raster@15779
|
568 |
;
|
raster@15779
|
569 |
|
raster@15779
|
570 |
discrim_part_opt ::=
|
raster@15779
|
571 |
| discrim_part
|
raster@15779
|
572 |
| LPAREN BOX RPAREN
|
raster@15779
|
573 |
;
|
raster@15779
|
574 |
|
raster@15779
|
575 |
type_completion ::=
|
raster@15779
|
576 |
| IS type_def
|
raster@15779
|
577 |
;
|
raster@15779
|
578 |
|
raster@15779
|
579 |
type_def ::= enumeration_type
|
raster@15779
|
580 |
| integer_type
|
raster@15779
|
581 |
| real_type
|
raster@15779
|
582 |
| array_type
|
raster@15779
|
583 |
| record_type
|
raster@15779
|
584 |
| access_type
|
raster@15779
|
585 |
| derived_type
|
raster@15779
|
586 |
| private_type
|
raster@15779
|
587 |
;
|
raster@15779
|
588 |
|
raster@15779
|
589 |
subtype_decl ::= SUBTYPE IDENTIFIER IS subtype_ind SEMICOLON
|
raster@15779
|
590 |
;
|
raster@15779
|
591 |
|
raster@15779
|
592 |
subtype_ind ::= name constraint
|
raster@15779
|
593 |
| name
|
raster@15779
|
594 |
;
|
raster@15779
|
595 |
|
raster@15779
|
596 |
constraint ::= range_constraint
|
raster@15779
|
597 |
| decimal_digits_constraint
|
raster@15779
|
598 |
;
|
raster@15779
|
599 |
|
raster@15779
|
600 |
decimal_digits_constraint ::= DIGITS expression range_constr_opt
|
raster@15779
|
601 |
;
|
raster@15779
|
602 |
|
raster@15779
|
603 |
derived_type ::= NEW subtype_ind
|
raster@15779
|
604 |
| NEW subtype_ind WITH PRIVATE
|
raster@15779
|
605 |
| NEW subtype_ind WITH record_def
|
raster@15779
|
606 |
| ABSTRACT NEW subtype_ind WITH PRIVATE
|
raster@15779
|
607 |
| ABSTRACT NEW subtype_ind WITH record_def
|
raster@15779
|
608 |
;
|
raster@15779
|
609 |
|
raster@15779
|
610 |
range_constraint ::= RANGE range
|
raster@15779
|
611 |
;
|
raster@15779
|
612 |
|
raster@15779
|
613 |
range ::= simple_expression DOT_DOT simple_expression
|
raster@15779
|
614 |
| name TICK RANGE
|
raster@15779
|
615 |
| name TICK RANGE LPAREN expression RPAREN
|
raster@15779
|
616 |
;
|
raster@15779
|
617 |
|
raster@15779
|
618 |
enumeration_type ::= LPAREN enum_id_s RPAREN
|
raster@15779
|
619 |
;
|
raster@15779
|
620 |
|
raster@15779
|
621 |
enum_id_s ::= enum_id
|
raster@15779
|
622 |
| enum_id_s COMMA enum_id
|
raster@15779
|
623 |
;
|
raster@15779
|
624 |
|
raster@15779
|
625 |
enum_id ::= IDENTIFIER
|
raster@15779
|
626 |
| CHAR_LITERAL
|
raster@15779
|
627 |
;
|
raster@15779
|
628 |
|
raster@15779
|
629 |
integer_type ::= range_spec
|
raster@15779
|
630 |
| MOD expression
|
raster@15779
|
631 |
;
|
raster@15779
|
632 |
|
raster@15779
|
633 |
|
raster@15779
|
634 |
range_spec ::= range_constraint
|
raster@15779
|
635 |
;
|
raster@15779
|
636 |
|
raster@15779
|
637 |
range_spec_opt ::=
|
raster@15779
|
638 |
| range_spec
|
raster@15779
|
639 |
;
|
raster@15779
|
640 |
|
raster@15779
|
641 |
real_type ::= float_type
|
raster@15779
|
642 |
| fixed_type
|
raster@15779
|
643 |
;
|
raster@15779
|
644 |
|
raster@15779
|
645 |
float_type ::= DIGITS expression range_spec_opt
|
raster@15779
|
646 |
;
|
raster@15779
|
647 |
|
raster@15779
|
648 |
fixed_type ::= DELTA expression range_spec
|
raster@15779
|
649 |
| DELTA expression DIGITS expression range_spec_opt
|
raster@15779
|
650 |
;
|
raster@15779
|
651 |
|
raster@15779
|
652 |
array_type ::= unconstr_array_type
|
raster@15779
|
653 |
| constr_array_type
|
raster@15779
|
654 |
;
|
raster@15779
|
655 |
|
raster@15779
|
656 |
unconstr_array_type ::= ARRAY LPAREN index_s RPAREN OF component_subtype_def
|
raster@15779
|
657 |
;
|
raster@15779
|
658 |
|
raster@15779
|
659 |
constr_array_type ::= ARRAY iter_index_constraint OF component_subtype_def
|
raster@15779
|
660 |
;
|
raster@15779
|
661 |
|
raster@15779
|
662 |
component_subtype_def ::= aliased_opt subtype_ind
|
raster@15779
|
663 |
;
|
raster@15779
|
664 |
|
raster@15779
|
665 |
aliased_opt ::=
|
raster@15779
|
666 |
| ALIASED
|
raster@15779
|
667 |
;
|
raster@15779
|
668 |
|
raster@15779
|
669 |
index_s ::= index
|
raster@15779
|
670 |
| index_s COMMA index
|
raster@15779
|
671 |
;
|
raster@15779
|
672 |
|
raster@15779
|
673 |
index ::= name RANGE BOX
|
raster@15779
|
674 |
;
|
raster@15779
|
675 |
|
raster@15779
|
676 |
iter_index_constraint ::= LPAREN iter_discrete_range_s RPAREN
|
raster@15779
|
677 |
;
|
raster@15779
|
678 |
|
raster@15779
|
679 |
iter_discrete_range_s ::= discrete_range
|
raster@15779
|
680 |
| iter_discrete_range_s COMMA discrete_range
|
raster@15779
|
681 |
;
|
raster@15779
|
682 |
|
raster@15779
|
683 |
discrete_range ::= name range_constr_opt
|
raster@15779
|
684 |
| range
|
raster@15779
|
685 |
;
|
raster@15779
|
686 |
|
raster@15779
|
687 |
range_constr_opt ::=
|
raster@15779
|
688 |
| range_constraint
|
raster@15779
|
689 |
;
|
raster@15779
|
690 |
|
raster@15779
|
691 |
record_type ::= tagged_opt limited_opt record_def
|
raster@15779
|
692 |
;
|
raster@15779
|
693 |
|
raster@15779
|
694 |
record_def ::= RECORD pragma_s comp_list END RECORD
|
raster@15779
|
695 |
| NULL RECORD
|
raster@15779
|
696 |
;
|
raster@15779
|
697 |
|
raster@15779
|
698 |
tagged_opt ::=
|
raster@15779
|
699 |
| TAGGED
|
raster@15779
|
700 |
| ABSTRACT TAGGED
|
raster@15779
|
701 |
;
|
raster@15779
|
702 |
|
raster@15779
|
703 |
comp_list ::= comp_decl_s variant_part_opt
|
raster@15779
|
704 |
| variant_part pragma_s
|
raster@15779
|
705 |
| NULL SEMICOLON pragma_s
|
raster@15779
|
706 |
;
|
raster@15779
|
707 |
|
raster@15779
|
708 |
comp_decl_s ::= comp_decl
|
raster@15779
|
709 |
| comp_decl_s pragma_s comp_decl
|
raster@15779
|
710 |
;
|
raster@15779
|
711 |
|
raster@15779
|
712 |
variant_part_opt ::= pragma_s
|
raster@15779
|
713 |
| pragma_s variant_part pragma_s
|
raster@15779
|
714 |
;
|
raster@15779
|
715 |
|
raster@15779
|
716 |
comp_decl ::= def_id_s COLON component_subtype_def init_opt SEMICOLON
|
raster@15779
|
717 |
| error SEMICOLON
|
raster@15779
|
718 |
;
|
raster@15779
|
719 |
|
raster@15779
|
720 |
discrim_part ::= LPAREN discrim_spec_s RPAREN
|
raster@15779
|
721 |
;
|
raster@15779
|
722 |
|
raster@15779
|
723 |
discrim_spec_s ::= discrim_spec
|
raster@15779
|
724 |
| discrim_spec_s SEMICOLON discrim_spec
|
raster@15779
|
725 |
;
|
raster@15779
|
726 |
|
raster@15779
|
727 |
discrim_spec ::= def_id_s COLON access_opt mark init_opt
|
raster@15779
|
728 |
| error
|
raster@15779
|
729 |
;
|
raster@15779
|
730 |
|
raster@15779
|
731 |
access_opt ::=
|
raster@15779
|
732 |
| ACCESS
|
raster@15779
|
733 |
;
|
raster@15779
|
734 |
|
raster@15779
|
735 |
variant_part ::= CASE simple_name IS pragma_s variant_s END CASE SEMICOLON
|
raster@15779
|
736 |
;
|
raster@15779
|
737 |
|
raster@15779
|
738 |
variant_s ::= variant
|
raster@15779
|
739 |
| variant_s variant
|
raster@15779
|
740 |
;
|
raster@15779
|
741 |
|
raster@15779
|
742 |
variant ::= WHEN choice_s ARROW pragma_s comp_list
|
raster@15779
|
743 |
;
|
raster@15779
|
744 |
|
raster@15779
|
745 |
choice_s ::= choice
|
raster@15779
|
746 |
| choice_s BAR choice
|
raster@15779
|
747 |
;
|
raster@15779
|
748 |
|
raster@15779
|
749 |
choice ::= expression
|
raster@15779
|
750 |
| discrete_with_range
|
raster@15779
|
751 |
| OTHERS
|
raster@15779
|
752 |
;
|
raster@15779
|
753 |
|
raster@15779
|
754 |
discrete_with_range ::= name range_constraint
|
raster@15779
|
755 |
| range
|
raster@15779
|
756 |
;
|
raster@15779
|
757 |
|
raster@15779
|
758 |
access_type ::= ACCESS subtype_ind
|
raster@15779
|
759 |
| ACCESS CONSTANT subtype_ind
|
raster@15779
|
760 |
| ACCESS ALL subtype_ind
|
raster@15779
|
761 |
| ACCESS prot_opt PROCEDURE formal_part_opt
|
raster@15779
|
762 |
| ACCESS prot_opt FUNCTION formal_part_opt RETURN mark
|
raster@15779
|
763 |
;
|
raster@15779
|
764 |
|
raster@15779
|
765 |
prot_opt ::=
|
raster@15779
|
766 |
| PROTECTED
|
raster@15779
|
767 |
;
|
raster@15779
|
768 |
|
raster@15779
|
769 |
decl_part ::=
|
raster@15779
|
770 |
| decl_item_or_body_s1
|
raster@15779
|
771 |
;
|
raster@15779
|
772 |
|
raster@15779
|
773 |
decl_item_s ::=
|
raster@15779
|
774 |
| decl_item_s1
|
raster@15779
|
775 |
;
|
raster@15779
|
776 |
|
raster@15779
|
777 |
decl_item_s1 ::= decl_item
|
raster@15779
|
778 |
| decl_item_s1 decl_item
|
raster@15779
|
779 |
;
|
raster@15779
|
780 |
|
raster@15779
|
781 |
decl_item ::= decl
|
raster@15779
|
782 |
| use_clause
|
raster@15779
|
783 |
| rep_spec
|
raster@15779
|
784 |
| pragma
|
raster@15779
|
785 |
;
|
raster@15779
|
786 |
|
raster@15779
|
787 |
decl_item_or_body_s1 ::= decl_item_or_body
|
raster@15779
|
788 |
| decl_item_or_body_s1 decl_item_or_body
|
raster@15779
|
789 |
;
|
raster@15779
|
790 |
|
raster@15779
|
791 |
decl_item_or_body ::= body
|
raster@15779
|
792 |
| decl_item
|
raster@15779
|
793 |
;
|
raster@15779
|
794 |
|
raster@15779
|
795 |
body ::= subprog_body
|
raster@15779
|
796 |
| pkg_body
|
raster@15779
|
797 |
| task_body
|
raster@15779
|
798 |
| prot_body
|
raster@15779
|
799 |
;
|
raster@15779
|
800 |
|
raster@15779
|
801 |
name ::= simple_name
|
raster@15779
|
802 |
| indexed_comp
|
raster@15779
|
803 |
| selected_comp
|
raster@15779
|
804 |
| attribute
|
raster@15779
|
805 |
| operator_symbol
|
raster@15779
|
806 |
;
|
raster@15779
|
807 |
|
raster@15779
|
808 |
mark ::= simple_name
|
raster@15779
|
809 |
| mark TICK attribute_id
|
raster@15779
|
810 |
| mark DOT simple_name
|
raster@15779
|
811 |
;
|
raster@15779
|
812 |
|
raster@15779
|
813 |
simple_name ::=
|
raster@15779
|
814 |
IDENTIFIER:identifier
|
raster@15779
|
815 |
{:
|
raster@15779
|
816 |
RESULT = identifier;
|
raster@15779
|
817 |
:}
|
raster@15779
|
818 |
;
|
raster@15779
|
819 |
|
raster@15779
|
820 |
compound_name ::=
|
raster@15779
|
821 |
simple_name:simpleName
|
raster@15779
|
822 |
{:
|
raster@15779
|
823 |
RESULT = simpleName;
|
raster@15779
|
824 |
:}
|
raster@15779
|
825 |
| compound_name:compoundName DOT simple_name:simpleName
|
raster@15779
|
826 |
{:
|
raster@15779
|
827 |
RESULT = compoundName + "." + simpleName;
|
raster@15779
|
828 |
:}
|
raster@15779
|
829 |
;
|
raster@15779
|
830 |
|
raster@15779
|
831 |
c_name_list ::= compound_name
|
raster@15779
|
832 |
| c_name_list COMMA compound_name
|
raster@15779
|
833 |
;
|
raster@15779
|
834 |
|
raster@15779
|
835 |
used_char ::= CHAR_LITERAL
|
raster@15779
|
836 |
;
|
raster@15779
|
837 |
|
raster@15779
|
838 |
operator_symbol ::= STRING_LITERAL
|
raster@15779
|
839 |
;
|
raster@15779
|
840 |
|
raster@15779
|
841 |
indexed_comp ::= name LPAREN value_s RPAREN
|
raster@15779
|
842 |
;
|
raster@15779
|
843 |
|
raster@15779
|
844 |
value_s ::= value
|
raster@15779
|
845 |
| value_s COMMA value
|
raster@15779
|
846 |
;
|
raster@15779
|
847 |
|
raster@15779
|
848 |
value ::= expression
|
raster@15779
|
849 |
| comp_assoc
|
raster@15779
|
850 |
| discrete_with_range
|
raster@15779
|
851 |
| error
|
raster@15779
|
852 |
;
|
raster@15779
|
853 |
|
raster@15779
|
854 |
selected_comp ::= name DOT simple_name
|
raster@15779
|
855 |
| name DOT used_char
|
raster@15779
|
856 |
| name DOT operator_symbol
|
raster@15779
|
857 |
| name DOT ALL
|
raster@15779
|
858 |
;
|
raster@15779
|
859 |
|
raster@15779
|
860 |
attribute ::= name TICK attribute_id
|
raster@15779
|
861 |
;
|
raster@15779
|
862 |
|
raster@15779
|
863 |
attribute_id ::= IDENTIFIER
|
raster@15779
|
864 |
| DIGITS
|
raster@15779
|
865 |
| DELTA
|
raster@15779
|
866 |
| ACCESS
|
raster@15779
|
867 |
;
|
raster@15779
|
868 |
|
raster@15779
|
869 |
literal ::= DECIMAL_LITERAL
|
raster@15779
|
870 |
| BASED_LITERAL
|
raster@15779
|
871 |
| used_char
|
raster@15779
|
872 |
| NULL
|
raster@15779
|
873 |
;
|
raster@15779
|
874 |
|
raster@15779
|
875 |
aggregate ::= LPAREN comp_assoc RPAREN
|
raster@15779
|
876 |
| LPAREN value_s_2 RPAREN
|
raster@15779
|
877 |
| LPAREN expression WITH value_s RPAREN
|
raster@15779
|
878 |
| LPAREN expression WITH NULL RECORD RPAREN
|
raster@15779
|
879 |
| LPAREN NULL RECORD RPAREN
|
raster@15779
|
880 |
;
|
raster@15779
|
881 |
|
raster@15779
|
882 |
value_s_2 ::= value COMMA value
|
raster@15779
|
883 |
| value_s_2 COMMA value
|
raster@15779
|
884 |
;
|
raster@15779
|
885 |
|
raster@15779
|
886 |
comp_assoc ::= choice_s ARROW expression
|
raster@15779
|
887 |
;
|
raster@15779
|
888 |
|
raster@15779
|
889 |
expression ::= relation
|
raster@15779
|
890 |
| expression logical relation
|
raster@15779
|
891 |
| expression short_circuit relation
|
raster@15779
|
892 |
;
|
raster@15779
|
893 |
|
raster@15779
|
894 |
logical ::= AND
|
raster@15779
|
895 |
| OR
|
raster@15779
|
896 |
| XOR
|
raster@15779
|
897 |
;
|
raster@15779
|
898 |
|
raster@15779
|
899 |
short_circuit ::= AND THEN
|
raster@15779
|
900 |
| OR ELSE
|
raster@15779
|
901 |
;
|
raster@15779
|
902 |
|
raster@15779
|
903 |
relation ::= simple_expression
|
raster@15779
|
904 |
| simple_expression relational simple_expression
|
raster@15779
|
905 |
| simple_expression membership range
|
raster@15779
|
906 |
| simple_expression membership name
|
raster@15779
|
907 |
;
|
raster@15779
|
908 |
|
raster@15779
|
909 |
relational ::= EQ
|
raster@15779
|
910 |
| INEQ
|
raster@15779
|
911 |
| GT
|
raster@15779
|
912 |
| LTEQ
|
raster@15779
|
913 |
| LT
|
raster@15779
|
914 |
| GTEQ
|
raster@15779
|
915 |
;
|
raster@15779
|
916 |
|
raster@15779
|
917 |
membership ::= IN
|
raster@15779
|
918 |
| NOT IN
|
raster@15779
|
919 |
;
|
raster@15779
|
920 |
|
raster@15779
|
921 |
simple_expression ::= unary term
|
raster@15779
|
922 |
| term
|
raster@15779
|
923 |
| simple_expression adding term
|
raster@15779
|
924 |
;
|
raster@15779
|
925 |
|
raster@15779
|
926 |
unary ::= PLUS
|
raster@15779
|
927 |
| MINUS
|
raster@15779
|
928 |
;
|
raster@15779
|
929 |
|
raster@15779
|
930 |
adding ::= PLUS
|
raster@15779
|
931 |
| MINUS
|
raster@15779
|
932 |
| AMP
|
raster@15779
|
933 |
;
|
raster@15779
|
934 |
|
raster@15779
|
935 |
term ::= factor
|
raster@15779
|
936 |
| term multiplying factor
|
raster@15779
|
937 |
;
|
raster@15779
|
938 |
|
raster@15779
|
939 |
multiplying ::= STAR
|
raster@15779
|
940 |
| SLASH
|
raster@15779
|
941 |
| MOD
|
raster@15779
|
942 |
| REM
|
raster@15779
|
943 |
;
|
raster@15779
|
944 |
|
raster@15779
|
945 |
factor ::= primary
|
raster@15779
|
946 |
| NOT primary
|
raster@15779
|
947 |
| ABS primary
|
raster@15779
|
948 |
| primary EXPON primary
|
raster@15779
|
949 |
;
|
raster@15779
|
950 |
|
raster@15779
|
951 |
primary ::= literal
|
raster@15779
|
952 |
| name
|
raster@15779
|
953 |
| allocator
|
raster@15779
|
954 |
| qualified
|
raster@15779
|
955 |
| parenthesized_primary
|
raster@15779
|
956 |
;
|
raster@15779
|
957 |
|
raster@15779
|
958 |
parenthesized_primary ::= aggregate
|
raster@15779
|
959 |
| LPAREN expression RPAREN
|
raster@15779
|
960 |
;
|
raster@15779
|
961 |
|
raster@15779
|
962 |
qualified ::= name TICK parenthesized_primary
|
raster@15779
|
963 |
;
|
raster@15779
|
964 |
|
raster@15779
|
965 |
allocator ::= NEW name
|
raster@15779
|
966 |
| NEW qualified
|
raster@15779
|
967 |
;
|
raster@15779
|
968 |
|
raster@15779
|
969 |
statement_s ::= statement
|
raster@15779
|
970 |
| statement_s statement
|
raster@15779
|
971 |
;
|
raster@15779
|
972 |
|
raster@15779
|
973 |
statement ::= unlabeled
|
raster@15779
|
974 |
| label statement
|
raster@15779
|
975 |
;
|
raster@15779
|
976 |
|
raster@15779
|
977 |
unlabeled ::= simple_stmt
|
raster@15779
|
978 |
| compound_stmt
|
raster@15779
|
979 |
| pragma
|
raster@15779
|
980 |
;
|
raster@15779
|
981 |
|
raster@15779
|
982 |
simple_stmt ::= NULL_stmt
|
raster@15779
|
983 |
| assign_stmt
|
raster@15779
|
984 |
| exit_stmt
|
raster@15779
|
985 |
| return_stmt
|
raster@15779
|
986 |
| goto_stmt
|
raster@15779
|
987 |
| procedure_call
|
raster@15779
|
988 |
| delay_stmt
|
raster@15779
|
989 |
| abort_stmt
|
raster@15779
|
990 |
| raise_stmt
|
raster@15779
|
991 |
| code_stmt
|
raster@15779
|
992 |
| requeue_stmt
|
raster@15779
|
993 |
| error SEMICOLON
|
raster@15779
|
994 |
;
|
raster@15779
|
995 |
|
raster@15779
|
996 |
compound_stmt ::= if_stmt
|
raster@15779
|
997 |
| case_stmt
|
raster@15779
|
998 |
| loop_stmt
|
raster@15779
|
999 |
| block
|
raster@15779
|
1000 |
| accept_stmt
|
raster@15779
|
1001 |
| select_stmt
|
raster@15779
|
1002 |
;
|
raster@15779
|
1003 |
|
raster@15779
|
1004 |
label ::= LTLT IDENTIFIER GTGT
|
raster@15779
|
1005 |
;
|
raster@15779
|
1006 |
|
raster@15779
|
1007 |
NULL_stmt ::= NULL SEMICOLON
|
raster@15779
|
1008 |
;
|
raster@15779
|
1009 |
|
raster@15779
|
1010 |
assign_stmt ::= name ASSIGNMENT expression SEMICOLON
|
raster@15779
|
1011 |
;
|
raster@15779
|
1012 |
|
raster@15779
|
1013 |
if_stmt ::= IF cond_clause_s else_opt END IF SEMICOLON
|
raster@15779
|
1014 |
;
|
raster@15779
|
1015 |
|
raster@15779
|
1016 |
cond_clause_s ::= cond_clause
|
raster@15779
|
1017 |
| cond_clause_s ELSIF cond_clause
|
raster@15779
|
1018 |
;
|
raster@15779
|
1019 |
|
raster@15779
|
1020 |
cond_clause ::= cond_part statement_s
|
raster@15779
|
1021 |
;
|
raster@15779
|
1022 |
|
raster@15779
|
1023 |
cond_part ::= condition THEN
|
raster@15779
|
1024 |
;
|
raster@15779
|
1025 |
|
raster@15779
|
1026 |
condition ::= expression
|
raster@15779
|
1027 |
;
|
raster@15779
|
1028 |
|
raster@15779
|
1029 |
else_opt ::=
|
raster@15779
|
1030 |
| ELSE statement_s
|
raster@15779
|
1031 |
;
|
raster@15779
|
1032 |
|
raster@15779
|
1033 |
case_stmt ::= case_hdr pragma_s alternative_s END CASE SEMICOLON
|
raster@15779
|
1034 |
;
|
raster@15779
|
1035 |
|
raster@15779
|
1036 |
case_hdr ::= CASE expression IS
|
raster@15779
|
1037 |
;
|
raster@15779
|
1038 |
|
raster@15779
|
1039 |
alternative_s ::=
|
raster@15779
|
1040 |
| alternative_s alternative
|
raster@15779
|
1041 |
;
|
raster@15779
|
1042 |
|
raster@15779
|
1043 |
alternative ::= WHEN choice_s ARROW statement_s
|
raster@15779
|
1044 |
;
|
raster@15779
|
1045 |
|
raster@15779
|
1046 |
loop_stmt ::= label_opt iteration basic_loop id_opt SEMICOLON
|
raster@15779
|
1047 |
;
|
raster@15779
|
1048 |
|
raster@15779
|
1049 |
label_opt ::=
|
raster@15779
|
1050 |
| IDENTIFIER COLON
|
raster@15779
|
1051 |
;
|
raster@15779
|
1052 |
|
raster@15779
|
1053 |
iteration ::=
|
raster@15779
|
1054 |
| WHILE condition
|
raster@15779
|
1055 |
| iter_part reverse_opt discrete_range
|
raster@15779
|
1056 |
;
|
raster@15779
|
1057 |
|
raster@15779
|
1058 |
iter_part ::= FOR IDENTIFIER IN
|
raster@15779
|
1059 |
;
|
raster@15779
|
1060 |
|
raster@15779
|
1061 |
reverse_opt ::=
|
raster@15779
|
1062 |
| REVERSE
|
raster@15779
|
1063 |
;
|
raster@15779
|
1064 |
|
raster@15779
|
1065 |
basic_loop ::= LOOP statement_s END LOOP
|
raster@15779
|
1066 |
;
|
raster@15779
|
1067 |
|
raster@15779
|
1068 |
id_opt ::=
|
raster@15779
|
1069 |
| designator
|
raster@15779
|
1070 |
;
|
raster@15779
|
1071 |
|
raster@15779
|
1072 |
block ::= label_opt block_decl block_body END id_opt SEMICOLON
|
raster@15779
|
1073 |
;
|
raster@15779
|
1074 |
|
raster@15779
|
1075 |
block_decl ::=
|
raster@15779
|
1076 |
| DECLARE decl_part
|
raster@15779
|
1077 |
;
|
raster@15779
|
1078 |
|
raster@15779
|
1079 |
block_body ::= BEGIN handled_stmt_s
|
raster@15779
|
1080 |
;
|
raster@15779
|
1081 |
|
raster@15779
|
1082 |
handled_stmt_s ::= statement_s except_handler_part_opt
|
raster@15779
|
1083 |
;
|
raster@15779
|
1084 |
|
raster@15779
|
1085 |
except_handler_part_opt ::=
|
raster@15779
|
1086 |
| except_handler_part
|
raster@15779
|
1087 |
;
|
raster@15779
|
1088 |
|
raster@15779
|
1089 |
exit_stmt ::= EXIT name_opt when_opt SEMICOLON
|
raster@15779
|
1090 |
;
|
raster@15779
|
1091 |
|
raster@15779
|
1092 |
name_opt ::=
|
raster@15779
|
1093 |
| name
|
raster@15779
|
1094 |
;
|
raster@15779
|
1095 |
|
raster@15779
|
1096 |
when_opt ::=
|
raster@15779
|
1097 |
| WHEN condition
|
raster@15779
|
1098 |
;
|
raster@15779
|
1099 |
|
raster@15779
|
1100 |
return_stmt ::= RETURN SEMICOLON
|
raster@15779
|
1101 |
| RETURN expression SEMICOLON
|
raster@15779
|
1102 |
;
|
raster@15779
|
1103 |
|
raster@15779
|
1104 |
goto_stmt ::= GOTO name SEMICOLON
|
raster@15779
|
1105 |
;
|
raster@15779
|
1106 |
|
raster@15779
|
1107 |
subprog_decl ::= subprog_spec SEMICOLON
|
raster@15779
|
1108 |
| generic_subp_inst SEMICOLON
|
raster@15779
|
1109 |
| subprog_spec_is_push ABSTRACT SEMICOLON
|
raster@15779
|
1110 |
;
|
raster@15779
|
1111 |
|
raster@15779
|
1112 |
subprog_spec ::= PROCEDURE compound_name formal_part_opt
|
raster@15779
|
1113 |
| FUNCTION designator formal_part_opt RETURN name
|
raster@15779
|
1114 |
| FUNCTION designator /* for generic inst and generic rename */
|
raster@15779
|
1115 |
;
|
raster@15779
|
1116 |
|
raster@15779
|
1117 |
designator ::= compound_name
|
raster@15779
|
1118 |
| STRING_LITERAL
|
raster@15779
|
1119 |
;
|
raster@15779
|
1120 |
|
raster@15779
|
1121 |
formal_part_opt ::=
|
raster@15779
|
1122 |
| formal_part
|
raster@15779
|
1123 |
;
|
raster@15779
|
1124 |
|
raster@15779
|
1125 |
formal_part ::= LPAREN param_s RPAREN
|
raster@15779
|
1126 |
;
|
raster@15779
|
1127 |
|
raster@15779
|
1128 |
param_s ::= param
|
raster@15779
|
1129 |
| param_s SEMICOLON param
|
raster@15779
|
1130 |
;
|
raster@15779
|
1131 |
|
raster@15779
|
1132 |
param ::= def_id_s COLON mode mark init_opt
|
raster@15779
|
1133 |
| error
|
raster@15779
|
1134 |
;
|
raster@15779
|
1135 |
|
raster@15779
|
1136 |
mode ::=
|
raster@15779
|
1137 |
| IN
|
raster@15779
|
1138 |
| OUT
|
raster@15779
|
1139 |
| IN OUT
|
raster@15779
|
1140 |
| ACCESS
|
raster@15779
|
1141 |
;
|
raster@15779
|
1142 |
|
raster@15779
|
1143 |
subprog_spec_is_push ::= subprog_spec IS
|
raster@15779
|
1144 |
;
|
raster@15779
|
1145 |
|
raster@15779
|
1146 |
subprog_body ::= subprog_spec_is_push
|
raster@15779
|
1147 |
decl_part block_body END id_opt SEMICOLON
|
raster@15779
|
1148 |
;
|
raster@15779
|
1149 |
|
raster@15779
|
1150 |
procedure_call ::= name SEMICOLON
|
raster@15779
|
1151 |
;
|
raster@15779
|
1152 |
|
raster@15779
|
1153 |
pkg_decl ::= pkg_spec SEMICOLON
|
raster@15779
|
1154 |
| generic_pkg_inst SEMICOLON
|
raster@15779
|
1155 |
;
|
raster@15779
|
1156 |
|
raster@15779
|
1157 |
pkg_spec ::= PACKAGE compound_name IS
|
raster@15779
|
1158 |
decl_item_s private_part END c_id_opt
|
raster@15779
|
1159 |
;
|
raster@15779
|
1160 |
|
raster@15779
|
1161 |
private_part ::=
|
raster@15779
|
1162 |
| PRIVATE decl_item_s
|
raster@15779
|
1163 |
;
|
raster@15779
|
1164 |
|
raster@15779
|
1165 |
c_id_opt ::=
|
raster@15779
|
1166 |
| compound_name
|
raster@15779
|
1167 |
;
|
raster@15779
|
1168 |
|
raster@15779
|
1169 |
pkg_body ::= PACKAGE BODY compound_name IS
|
raster@15779
|
1170 |
decl_part body_opt END c_id_opt SEMICOLON
|
raster@15779
|
1171 |
;
|
raster@15779
|
1172 |
|
raster@15779
|
1173 |
body_opt ::=
|
raster@15779
|
1174 |
| block_body
|
raster@15779
|
1175 |
;
|
raster@15779
|
1176 |
|
raster@15779
|
1177 |
private_type ::= tagged_opt limited_opt PRIVATE
|
raster@15779
|
1178 |
;
|
raster@15779
|
1179 |
|
raster@15779
|
1180 |
limited_opt ::=
|
raster@15779
|
1181 |
| LIMITED
|
raster@15779
|
1182 |
;
|
raster@15779
|
1183 |
|
raster@15779
|
1184 |
use_clause ::= USE name_s SEMICOLON
|
raster@15779
|
1185 |
| USE TYPE name_s SEMICOLON
|
raster@15779
|
1186 |
;
|
raster@15779
|
1187 |
|
raster@15779
|
1188 |
name_s ::= name
|
raster@15779
|
1189 |
| name_s COMMA name
|
raster@15779
|
1190 |
;
|
raster@15779
|
1191 |
|
raster@15779
|
1192 |
rename_decl ::= def_id_s COLON object_qualifier_opt subtype_ind renames SEMICOLON
|
raster@15779
|
1193 |
| def_id_s COLON EXCEPTION renames SEMICOLON
|
raster@15779
|
1194 |
| rename_unit
|
raster@15779
|
1195 |
;
|
raster@15779
|
1196 |
|
raster@15779
|
1197 |
rename_unit ::= PACKAGE compound_name renames SEMICOLON
|
raster@15779
|
1198 |
| subprog_spec renames SEMICOLON
|
raster@15779
|
1199 |
| generic_formal_part PACKAGE compound_name renames SEMICOLON
|
raster@15779
|
1200 |
| generic_formal_part subprog_spec renames SEMICOLON
|
raster@15779
|
1201 |
;
|
raster@15779
|
1202 |
|
raster@15779
|
1203 |
renames ::= RENAMES name
|
raster@15779
|
1204 |
;
|
raster@15779
|
1205 |
|
raster@15779
|
1206 |
task_decl ::= task_spec SEMICOLON
|
raster@15779
|
1207 |
;
|
raster@15779
|
1208 |
|
raster@15779
|
1209 |
task_spec ::= TASK simple_name task_def
|
raster@15779
|
1210 |
| TASK TYPE simple_name discrim_part_opt task_def
|
raster@15779
|
1211 |
;
|
raster@15779
|
1212 |
|
raster@15779
|
1213 |
task_def ::=
|
raster@15779
|
1214 |
| IS entry_decl_s rep_spec_s task_private_opt END id_opt
|
raster@15779
|
1215 |
;
|
raster@15779
|
1216 |
|
raster@15779
|
1217 |
task_private_opt ::=
|
raster@15779
|
1218 |
| PRIVATE entry_decl_s rep_spec_s
|
raster@15779
|
1219 |
;
|
raster@15779
|
1220 |
|
raster@15779
|
1221 |
task_body ::= TASK BODY simple_name IS
|
raster@15779
|
1222 |
decl_part block_body END id_opt SEMICOLON
|
raster@15779
|
1223 |
;
|
raster@15779
|
1224 |
|
raster@15779
|
1225 |
prot_decl ::= prot_spec SEMICOLON
|
raster@15779
|
1226 |
;
|
raster@15779
|
1227 |
|
raster@15779
|
1228 |
prot_spec ::= PROTECTED IDENTIFIER prot_def
|
raster@15779
|
1229 |
| PROTECTED TYPE simple_name discrim_part_opt prot_def
|
raster@15779
|
1230 |
;
|
raster@15779
|
1231 |
|
raster@15779
|
1232 |
prot_def ::= IS prot_op_decl_s prot_private_opt END id_opt
|
raster@15779
|
1233 |
;
|
raster@15779
|
1234 |
|
raster@15779
|
1235 |
prot_private_opt ::=
|
raster@15779
|
1236 |
| PRIVATE prot_elem_decl_s
|
raster@15779
|
1237 |
;
|
raster@15779
|
1238 |
|
raster@15779
|
1239 |
prot_op_decl_s ::=
|
raster@15779
|
1240 |
| prot_op_decl_s prot_op_decl
|
raster@15779
|
1241 |
;
|
raster@15779
|
1242 |
|
raster@15779
|
1243 |
prot_op_decl ::= entry_decl
|
raster@15779
|
1244 |
| subprog_spec SEMICOLON
|
raster@15779
|
1245 |
| rep_spec
|
raster@15779
|
1246 |
| pragma
|
raster@15779
|
1247 |
;
|
raster@15779
|
1248 |
|
raster@15779
|
1249 |
prot_elem_decl_s ::=
|
raster@15779
|
1250 |
| prot_elem_decl_s prot_elem_decl
|
raster@15779
|
1251 |
;
|
raster@15779
|
1252 |
|
raster@15779
|
1253 |
prot_elem_decl ::= prot_op_decl | comp_decl ;
|
raster@15779
|
1254 |
|
raster@15779
|
1255 |
prot_body ::= PROTECTED BODY simple_name IS
|
raster@15779
|
1256 |
prot_op_body_s END id_opt SEMICOLON
|
raster@15779
|
1257 |
;
|
raster@15779
|
1258 |
|
raster@15779
|
1259 |
prot_op_body_s ::= pragma_s
|
raster@15779
|
1260 |
| prot_op_body_s prot_op_body pragma_s
|
raster@15779
|
1261 |
;
|
raster@15779
|
1262 |
|
raster@15779
|
1263 |
prot_op_body ::= entry_body
|
raster@15779
|
1264 |
| subprog_body
|
raster@15779
|
1265 |
| subprog_spec SEMICOLON
|
raster@15779
|
1266 |
;
|
raster@15779
|
1267 |
|
raster@15779
|
1268 |
entry_decl_s ::= pragma_s
|
raster@15779
|
1269 |
| entry_decl_s entry_decl pragma_s
|
raster@15779
|
1270 |
;
|
raster@15779
|
1271 |
|
raster@15779
|
1272 |
entry_decl ::= ENTRY IDENTIFIER formal_part_opt SEMICOLON
|
raster@15779
|
1273 |
| ENTRY IDENTIFIER LPAREN discrete_range RPAREN formal_part_opt SEMICOLON
|
raster@15779
|
1274 |
;
|
raster@15779
|
1275 |
|
raster@15779
|
1276 |
entry_body ::= ENTRY IDENTIFIER formal_part_opt WHEN condition entry_body_part
|
raster@15779
|
1277 |
| ENTRY IDENTIFIER LPAREN iter_part discrete_range RPAREN
|
raster@15779
|
1278 |
formal_part_opt WHEN condition entry_body_part
|
raster@15779
|
1279 |
;
|
raster@15779
|
1280 |
|
raster@15779
|
1281 |
entry_body_part ::= SEMICOLON
|
raster@15779
|
1282 |
| IS decl_part block_body END id_opt SEMICOLON
|
raster@15779
|
1283 |
;
|
raster@15779
|
1284 |
|
raster@15779
|
1285 |
rep_spec_s ::=
|
raster@15779
|
1286 |
| rep_spec_s rep_spec pragma_s
|
raster@15779
|
1287 |
;
|
raster@15779
|
1288 |
|
raster@15779
|
1289 |
entry_call ::= procedure_call
|
raster@15779
|
1290 |
;
|
raster@15779
|
1291 |
|
raster@15779
|
1292 |
accept_stmt ::= accept_hdr SEMICOLON
|
raster@15779
|
1293 |
| accept_hdr DO handled_stmt_s END id_opt SEMICOLON
|
raster@15779
|
1294 |
;
|
raster@15779
|
1295 |
|
raster@15779
|
1296 |
accept_hdr ::= ACCEPT entry_name formal_part_opt
|
raster@15779
|
1297 |
;
|
raster@15779
|
1298 |
|
raster@15779
|
1299 |
entry_name ::= simple_name
|
raster@15779
|
1300 |
| entry_name LPAREN expression RPAREN
|
raster@15779
|
1301 |
;
|
raster@15779
|
1302 |
|
raster@15779
|
1303 |
delay_stmt ::= DELAY expression SEMICOLON
|
raster@15779
|
1304 |
| DELAY UNTIL expression SEMICOLON
|
raster@15779
|
1305 |
;
|
raster@15779
|
1306 |
|
raster@15779
|
1307 |
select_stmt ::= select_wait
|
raster@15779
|
1308 |
| async_select
|
raster@15779
|
1309 |
| timed_entry_call
|
raster@15779
|
1310 |
| cond_entry_call
|
raster@15779
|
1311 |
;
|
raster@15779
|
1312 |
|
raster@15779
|
1313 |
select_wait ::= SELECT guarded_select_alt or_select else_opt
|
raster@15779
|
1314 |
END SELECT SEMICOLON
|
raster@15779
|
1315 |
;
|
raster@15779
|
1316 |
|
raster@15779
|
1317 |
guarded_select_alt ::= select_alt
|
raster@15779
|
1318 |
| WHEN condition ARROW select_alt
|
raster@15779
|
1319 |
;
|
raster@15779
|
1320 |
|
raster@15779
|
1321 |
or_select ::=
|
raster@15779
|
1322 |
| or_select OR guarded_select_alt
|
raster@15779
|
1323 |
;
|
raster@15779
|
1324 |
|
raster@15779
|
1325 |
select_alt ::= accept_stmt stmts_opt
|
raster@15779
|
1326 |
| delay_stmt stmts_opt
|
raster@15779
|
1327 |
| TERMINATE SEMICOLON
|
raster@15779
|
1328 |
;
|
raster@15779
|
1329 |
|
raster@15779
|
1330 |
delay_or_entry_alt ::= delay_stmt stmts_opt
|
raster@15779
|
1331 |
| entry_call stmts_opt
|
raster@15779
|
1332 |
;
|
raster@15779
|
1333 |
|
raster@15779
|
1334 |
async_select ::= SELECT delay_or_entry_alt
|
raster@15779
|
1335 |
THEN ABORT statement_s
|
raster@15779
|
1336 |
END SELECT SEMICOLON
|
raster@15779
|
1337 |
;
|
raster@15779
|
1338 |
|
raster@15779
|
1339 |
timed_entry_call ::= SELECT entry_call stmts_opt
|
raster@15779
|
1340 |
OR delay_stmt stmts_opt
|
raster@15779
|
1341 |
END SELECT SEMICOLON
|
raster@15779
|
1342 |
;
|
raster@15779
|
1343 |
|
raster@15779
|
1344 |
cond_entry_call ::= SELECT entry_call stmts_opt
|
raster@15779
|
1345 |
ELSE statement_s
|
raster@15779
|
1346 |
END SELECT SEMICOLON
|
raster@15779
|
1347 |
;
|
raster@15779
|
1348 |
|
raster@15779
|
1349 |
stmts_opt ::=
|
raster@15779
|
1350 |
| statement_s
|
raster@15779
|
1351 |
;
|
raster@15779
|
1352 |
|
raster@15779
|
1353 |
abort_stmt ::= ABORT name_s SEMICOLON
|
raster@15779
|
1354 |
;
|
raster@15779
|
1355 |
|
raster@15779
|
1356 |
compilation ::=
|
raster@15779
|
1357 |
| compilation comp_unit
|
raster@15779
|
1358 |
| pragma pragma_s
|
raster@15779
|
1359 |
;
|
raster@15779
|
1360 |
|
raster@15779
|
1361 |
comp_unit ::= context_spec private_opt unit pragma_s
|
raster@15779
|
1362 |
| private_opt unit pragma_s
|
raster@15779
|
1363 |
;
|
raster@15779
|
1364 |
|
raster@15779
|
1365 |
private_opt ::=
|
raster@15779
|
1366 |
| PRIVATE
|
raster@15779
|
1367 |
;
|
raster@15779
|
1368 |
|
raster@15779
|
1369 |
context_spec ::= with_clause use_clause_opt
|
raster@15779
|
1370 |
| context_spec with_clause use_clause_opt
|
raster@15779
|
1371 |
| context_spec pragma
|
raster@15779
|
1372 |
;
|
raster@15779
|
1373 |
|
raster@15779
|
1374 |
with_clause ::= WITH c_name_list SEMICOLON
|
raster@15779
|
1375 |
;
|
raster@15779
|
1376 |
|
raster@15779
|
1377 |
use_clause_opt ::=
|
raster@15779
|
1378 |
| use_clause_opt use_clause
|
raster@15779
|
1379 |
;
|
raster@15779
|
1380 |
|
raster@15779
|
1381 |
unit ::= pkg_decl
|
raster@15779
|
1382 |
| pkg_body
|
raster@15779
|
1383 |
| subprog_decl
|
raster@15779
|
1384 |
| subprog_body
|
raster@15779
|
1385 |
| subunit
|
raster@15779
|
1386 |
| generic_decl
|
raster@15779
|
1387 |
| rename_unit
|
raster@15779
|
1388 |
;
|
raster@15779
|
1389 |
|
raster@15779
|
1390 |
subunit ::= SEPARATE LPAREN compound_name RPAREN
|
raster@15779
|
1391 |
subunit_body
|
raster@15779
|
1392 |
;
|
raster@15779
|
1393 |
|
raster@15779
|
1394 |
subunit_body ::= subprog_body
|
raster@15779
|
1395 |
| pkg_body
|
raster@15779
|
1396 |
| task_body
|
raster@15779
|
1397 |
| prot_body
|
raster@15779
|
1398 |
;
|
raster@15779
|
1399 |
|
raster@15779
|
1400 |
body_stub ::= TASK BODY simple_name IS SEPARATE SEMICOLON
|
raster@15779
|
1401 |
| PACKAGE BODY compound_name IS SEPARATE SEMICOLON
|
raster@15779
|
1402 |
| subprog_spec IS SEPARATE SEMICOLON
|
raster@15779
|
1403 |
| PROTECTED BODY simple_name IS SEPARATE SEMICOLON
|
raster@15779
|
1404 |
;
|
raster@15779
|
1405 |
|
raster@15779
|
1406 |
exception_decl ::= def_id_s COLON EXCEPTION SEMICOLON
|
raster@15779
|
1407 |
;
|
raster@15779
|
1408 |
|
raster@15779
|
1409 |
except_handler_part ::= EXCEPTION exception_handler
|
raster@15779
|
1410 |
| except_handler_part exception_handler
|
raster@15779
|
1411 |
;
|
raster@15779
|
1412 |
|
raster@15779
|
1413 |
exception_handler ::= WHEN except_choice_s ARROW statement_s
|
raster@15779
|
1414 |
| WHEN IDENTIFIER COLON except_choice_s ARROW statement_s
|
raster@15779
|
1415 |
;
|
raster@15779
|
1416 |
|
raster@15779
|
1417 |
except_choice_s ::= except_choice
|
raster@15779
|
1418 |
| except_choice_s BAR except_choice
|
raster@15779
|
1419 |
;
|
raster@15779
|
1420 |
|
raster@15779
|
1421 |
except_choice ::= name
|
raster@15779
|
1422 |
| OTHERS
|
raster@15779
|
1423 |
;
|
raster@15779
|
1424 |
|
raster@15779
|
1425 |
raise_stmt ::= RAISE name_opt SEMICOLON
|
raster@15779
|
1426 |
;
|
raster@15779
|
1427 |
|
raster@15779
|
1428 |
requeue_stmt ::= REQUEUE name SEMICOLON
|
raster@15779
|
1429 |
| REQUEUE name WITH ABORT SEMICOLON
|
raster@15779
|
1430 |
;
|
raster@15779
|
1431 |
|
raster@15779
|
1432 |
generic_decl ::= generic_formal_part subprog_spec SEMICOLON
|
raster@15779
|
1433 |
| generic_formal_part pkg_spec SEMICOLON
|
raster@15779
|
1434 |
;
|
raster@15779
|
1435 |
|
raster@15779
|
1436 |
generic_formal_part ::= GENERIC
|
raster@15779
|
1437 |
| generic_formal_part generic_formal
|
raster@15779
|
1438 |
;
|
raster@15779
|
1439 |
|
raster@15779
|
1440 |
generic_formal ::= param SEMICOLON
|
raster@15779
|
1441 |
| TYPE simple_name generic_discrim_part_opt IS generic_type_def SEMICOLON
|
raster@15779
|
1442 |
| WITH PROCEDURE simple_name
|
raster@15779
|
1443 |
formal_part_opt subp_default SEMICOLON
|
raster@15779
|
1444 |
| WITH FUNCTION designator
|
raster@15779
|
1445 |
formal_part_opt RETURN name subp_default SEMICOLON
|
raster@15779
|
1446 |
| WITH PACKAGE simple_name IS NEW name LPAREN BOX RPAREN SEMICOLON
|
raster@15779
|
1447 |
| WITH PACKAGE simple_name IS NEW name SEMICOLON
|
raster@15779
|
1448 |
| use_clause
|
raster@15779
|
1449 |
;
|
raster@15779
|
1450 |
|
raster@15779
|
1451 |
generic_discrim_part_opt ::=
|
raster@15779
|
1452 |
| discrim_part
|
raster@15779
|
1453 |
| LPAREN BOX RPAREN
|
raster@15779
|
1454 |
;
|
raster@15779
|
1455 |
|
raster@15779
|
1456 |
subp_default ::=
|
raster@15779
|
1457 |
| IS name
|
raster@15779
|
1458 |
| IS BOX
|
raster@15779
|
1459 |
;
|
raster@15779
|
1460 |
|
raster@15779
|
1461 |
generic_type_def ::= LPAREN BOX RPAREN
|
raster@15779
|
1462 |
| RANGE BOX
|
raster@15779
|
1463 |
| MOD BOX
|
raster@15779
|
1464 |
| DELTA BOX
|
raster@15779
|
1465 |
| DELTA BOX DIGITS BOX
|
raster@15779
|
1466 |
| DIGITS BOX
|
raster@15779
|
1467 |
| array_type
|
raster@15779
|
1468 |
| access_type
|
raster@15779
|
1469 |
| private_type
|
raster@15779
|
1470 |
| generic_derived_type
|
raster@15779
|
1471 |
;
|
raster@15779
|
1472 |
|
raster@15779
|
1473 |
generic_derived_type ::= NEW subtype_ind
|
raster@15779
|
1474 |
| NEW subtype_ind WITH PRIVATE
|
raster@15779
|
1475 |
| ABSTRACT NEW subtype_ind WITH PRIVATE
|
raster@15779
|
1476 |
;
|
raster@15779
|
1477 |
|
raster@15779
|
1478 |
generic_subp_inst ::= subprog_spec IS generic_inst
|
raster@15779
|
1479 |
;
|
raster@15779
|
1480 |
|
raster@15779
|
1481 |
generic_pkg_inst ::= PACKAGE compound_name IS generic_inst
|
raster@15779
|
1482 |
;
|
raster@15779
|
1483 |
|
raster@15779
|
1484 |
generic_inst ::= NEW name
|
raster@15779
|
1485 |
;
|
raster@15779
|
1486 |
|
raster@15779
|
1487 |
rep_spec ::= attrib_def
|
raster@15779
|
1488 |
| record_type_spec
|
raster@15779
|
1489 |
| address_spec
|
raster@15779
|
1490 |
;
|
raster@15779
|
1491 |
|
raster@15779
|
1492 |
attrib_def ::= FOR mark USE expression SEMICOLON
|
raster@15779
|
1493 |
;
|
raster@15779
|
1494 |
|
raster@15779
|
1495 |
record_type_spec ::= FOR mark USE RECORD align_opt comp_loc_s END RECORD SEMICOLON
|
raster@15779
|
1496 |
;
|
raster@15779
|
1497 |
|
raster@15779
|
1498 |
align_opt ::=
|
raster@15779
|
1499 |
| AT MOD expression SEMICOLON
|
raster@15779
|
1500 |
;
|
raster@15779
|
1501 |
|
raster@15779
|
1502 |
comp_loc_s ::=
|
raster@15779
|
1503 |
| comp_loc_s mark AT expression RANGE range SEMICOLON
|
raster@15779
|
1504 |
;
|
raster@15779
|
1505 |
|
raster@15779
|
1506 |
address_spec ::= FOR mark USE AT expression SEMICOLON
|
raster@15779
|
1507 |
;
|
raster@15779
|
1508 |
|
raster@15779
|
1509 |
code_stmt ::= qualified SEMICOLON
|
raster@15779
|
1510 |
;
|