-
Notifications
You must be signed in to change notification settings - Fork 14
/
IFortranParserAction.java
4569 lines (4099 loc) · 138 KB
/
IFortranParserAction.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/******************************************************************************
* Copyright (c) 2005, 2006 Los Alamos National Security, LLC. This
* material was produced under U.S. Government contract
* DE-AC52-06NA25396 for Los Alamos National Laboratory (LANL), which
* is operated by the Los Alamos National Security, LLC (LANS) for the
* U.S. Department of Energy. The U.S. Government has rights to use,
* reproduce, and distribute this software. NEITHER THE GOVERNMENT NOR
* LANS MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY
* LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to
* produce derivative works, such modified software should be clearly
* marked, so as not to confuse it with the version available from
* LANL.
*
* Additionally, this program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*****************************************************************************/
package fortran.ofp.parser.java;
import org.antlr.runtime.Token;
import fortran.ofp.parser.java.IActionEnums;
public abstract interface IFortranParserAction {
/** R102 list
* generic_name (xyz-name)
* generic_name_list (xyz-list R101)
* : T_IDENT ( T_COMMA T_IDENT )*
*
* @param count The number of items in the list.
* @param ident The name of the item placed in the list.
*/
public abstract void generic_name_list__begin();
public abstract void generic_name_list(int count);
public void generic_name_list_part(Token ident);
/** R204
* specification_part
* is [ use-stmt ] ...
* [ import-stmt ] ...
* [ implicit-part ]
* [ declaration-construct ] ...
*
* @param numUseStmts Number of use statements.
* @param numImportStmts Number of import statements.
* @param numImplStmts Number of implicit statements
* @param numDeclConstructs Number of declaration constructs.
*/
public abstract void
specification_part(int numUseStmts, int numImportStmts,
int numImplStmts, int numDeclConstructs);
/** R205, R206, R207
* declaration_construct
*/
public abstract void declaration_construct();
/** R208
* execution_part
*/
public abstract void execution_part();
/** R209
* execution_part_construct
*/
public abstract void execution_part_construct();
/** R210
* internal_subprogram_part
* : contains_stmt internal_subprogram (internal_subprogram)*
*
* @param count The number of internal subprograms
*/
public abstract void internal_subprogram_part(int count);
/** R211
* internal_subprogram
*/
public abstract void internal_subprogram();
/** R212
* specification_stmt
*/
public abstract void specification_stmt();
/** R213
* executable_construct
*/
public abstract void executable_construct();
/** R214
* action_stmt
*/
public abstract void action_stmt();
/** R215
* keyword
*/
public abstract void keyword();
/** R304
* name
*
* @param id T_IDENT token for the name.
*/
public abstract void name(Token id);
/** R305
* constant
* : literal_constant
* | T_IDENT
*
* ERR_CHK 305 named_constant replaced by T_IDENT
*
* @param id The identifier representing the named constant if
* present, otherwise is a literal-constant
*/
public abstract void constant(Token id);
/**
* scalar_constant
*
*/
public abstract void scalar_constant();
/**
* R306
* literal_constant
*
*/
public abstract void literal_constant();
/** R308
* int_constant
* : int_literal_constant
* | T_IDENT
*
* ERR_CHK 308 named_constant replaced by T_IDENT
* C302 R308 int_constant shall be of type integer
* inlined integer portion of constant
*
* @param id The identifier representing the named constant if
* present, otherwise is a literal-constant
*/
public abstract void int_constant(Token id);
/** R309
* char_constant
* : char_literal_constant
* | T_IDENT
*
* ERR_CHK 309 named_constant replaced by T_IDENT
* C303 R309 char_constant shall be of type character
* inlined character portion of constant
*
* @param id The identifier representing the named constant if
* present, otherwise is a literal-constant
*/
public abstract void char_constant(Token id);
/**
* R310
* intrinsic_operator
*
*/
public abstract void intrinsic_operator();
/** R311
* defined_operator
* : T_DEFINED_OP
* | extended_intrinsic_op
*
* @param definedOp The operator (either a defined-unary-op,
* defined-binary-op, or extended-intrinsic-op).
* @param isExtended True if the token is an extended-intrinsic-op,
* otherwise is a defined operator.
*/
public abstract void defined_operator(Token definedOp, boolean isExtended);
/**
* R312
* extended_intrinsic_op
*
*/
public abstract void extended_intrinsic_op();
/** R313
* label
* : T_DIGIT_STRING
*
* @param lbl The token containing the label
*/
public abstract void label(Token lbl);
/** R313 list
* label : T_DIGIT_STRING
* label_list
* : label ( T_COMMA label )*
*
* // ERR_CHK 313 five characters or less
*
* @param count The number of items in the list.
*/
public abstract void label_list__begin();
public abstract void label_list(int count);
/**
* R401
* type_spec
*
*/
public abstract void type_spec();
/** R402
* type-param-value
* : expr | T_ASTERISK | T_COLON
*
* @param hasExpr True if an expr is present
* @param hasAsterisk True if an '*' is present
* @param hasColon True if a ':' is present
*/
public abstract void
type_param_value(boolean hasExpr, boolean hasAsterisk, boolean hasColon);
/** R403
* intrinsic_type_spec
* : T_INTEGER ( kind_selector )?
* | T_REAL ( kind_selector )?
* | T_DOUBLE T_PRECISION | T_DOUBLEPRECISION
* | T_COMPLEX ( kind_selector )?
* | T_DOUBLE T_COMPLEX | T_DOUBLECOMPLEX
* | T_CHARACTER ( char_selector )?
* | T_LOGICAL ( kind_selector )?
*
* @param keyword1 The type keyword token.
* @param keyword2 The optional keyword token (i.e., T_PRECISION)
* @param type The type specified (i.e., INTEGER)
* @param hasKindSelector True if a kind_selector
* (scalar_int_initialization_expr) is present
*/
public abstract void
intrinsic_type_spec(Token keyword1, Token keyword2, int type, boolean hasKindSelector);
/** R404
* kind_selector
* : T_LPAREN (T_KIND T_EQUALS)? expr T_RPAREN
* | T_ASTERISK T_DIGIT_STRING
*
* @param token1 KIND keyword token (or *, nonstandard usage)
* @param token2 = token (or size of type, nonstandard usage)
* @param hasExpression True if an expr is present
* (standard-confirming option)
*/
public abstract void
kind_selector(Token token1, Token token2, boolean hasExpression);
/** R405
* signed_int_literal_constant
* : (T_PLUS|T_MINUS)? int_literal_constant
*
* @param sign The sign: positive, negative, or null.
*/
public abstract void signed_int_literal_constant(Token sign);
/** R406
* int_literal_constant
* : T_DIGIT_STRING (T_UNDERSCORE kind_param)?
*
* @param digitString The digit string representing the constant
* @param kindParam The kind parameter
*/
public abstract void
int_literal_constant(Token digitString, Token kindParam);
/**
* R407
* kind_param
*
* @param kind T_DIGIT_STRING or T_IDENT token which is the kind_param.
*/
public abstract void kind_param(Token kind);
/**
* R411
* boz_literal_constant
*
*/
public abstract void boz_literal_constant(Token constant);
/** R416
* signed_real_literal_constant
* : (T_PLUS|T_MINUS)? real_literal_constant
*
* @param sign The sign: positive, negative, or null.
*/
public abstract void signed_real_literal_constant(Token sign);
/** R417
* real_literal_constant
* : REAL_CONSTANT ( T_UNDERSCORE kind_param )?
* | DOUBLE_CONSTANT ( T_UNDERSCORE kind_param )?
*
* Replaced by
* : T_DIGIT_STRING T_PERIOD_EXPONENT (T_UNDERSCORE kind_param)?
* | T_DIGIT_STRING T_PERIOD (T_UNDERSCORE kind_param)?
* | T_PERIOD_EXPONENT (T_UNDERSCORE kind_param)?
*
* @param digits The integral part
* @param fractionExp The fractional part and exponent
* @param kindParam The kind parameter
*/
public abstract void real_literal_constant(Token realConstant, Token kindParam);
/**
* R421
* complex_literal_constant
*
*/
public abstract void complex_literal_constant();
/** R422
* real_part
*
* ERR_CHK 422 named_constant replaced by T_IDENT
*
* @param hasIntConstant True if signed-int-literal-constant is present
* @param hasRealConstant True if signed-real-literal-constant is present
* @param id The named-constant (optional)
*/
public abstract void
real_part(boolean hasIntConstant, boolean hasRealConstant, Token id);
/** R423
* imag_part
*
* ERR_CHK 423 named_constant replaced by T_IDENT
*
* @param hasIntConstant True if signed-int-literal-constant is present
* @param hasRealConstant True if signed-real-literal-constant is present
* @param id The named-constant (optional)
*/
public abstract void
imag_part(boolean hasIntConstant, boolean hasRealConstant, Token id);
/** R424
* char-selector
* : T_ASTERISK char_length (T_COMMA)?
* | T_LPAREN (T_KIND | T_LEN) T_EQUALS type_param_value
* ( T_COMMA (T_KIND | T_LEN) T_EQUALS type_param_value )?
* T_RPAREN
* | T_LPAREN type_param_value ( T_COMMA (T_KIND T_EQUALS)? expr )?
* T_RPAREN
*
* @param tk1 Either T_KIND or T_LEN if given; otherwise null.
* @param tk2 Either T_KIND or T_LEN if given; otherwise null.
* @param kindOrLen1 Specifies whether the first kind or len
* type-param-value is present
* @param kindOrLen2 Specifies whether the second kind or len
* type-param-value is present
* @param hasAsterisk True if a '*' char-selector is specified
*/
public abstract void
char_selector(Token tk1, Token tk2, int kindOrLen1, int kindOrLen2, boolean hasAsterisk);
/** R425
* length-selector
* : T_LPAREN ( T_LEN T_EQUALS )? type_param_value T_RPAREN
* | T_ASTERISK char_length (T_COMMA)?
*
* @param lenKeyword T_LEN token if given; null otherwise.
* @param kindOrLen Specifies whether a kind or len type-param-value is present
* @param hasAsterisk True if a '*' char-selector is specified
*/
public abstract void
length_selector(Token len, int kindOrLen, boolean hasAsterisk);
/** R426
* char_length
* : T_LPAREN type_param_value T_RPAREN
* | scalar_int_literal_constant
*
* @param hasTypeParamValue True if a type-param-value is
* specified, otherwise is a scalar-int-literal-constant
*/
public abstract void char_length(boolean hasTypeParamValue);
/**
* scalar_int_literal_constant
*
*/
public abstract void scalar_int_literal_constant();
/** R427
* char_literal_constant
* : T_DIGIT_STRING T_UNDERSCORE T_CHAR_CONSTANT
* // T_UNDERSCORE as one token (T_IDENT).
* | T_IDENT T_CHAR_CONSTANT
* | T_CHAR_CONSTANT
*
* @param digitString Optional digit-string representing the kind parameter
* @param id Optional identifier representing the kind parameter variable AND the '_'
* @param str The token containing the literal character constant
*/
public abstract void
char_literal_constant(Token digitString, Token id, Token str);
/** R428
* logical_literal_constant
* : T_TRUE | T_FALSE
*
* @param logicalValue T_TRUE or T_FALSE token.
* @param isTrue True if logical constant is true, false otherwise
* @param kindParam The kind parameter
*/
public abstract void
logical_literal_constant(Token logicalValue, boolean isTrue, Token kindParam);
/**
* Generated rule.
* hollerith_literal_constant
*
* Note: Hollerith constants were deleted in F77; Hollerith edit descriptors
* deleted in F95.
*
* @param hollerithConstant T_HOLLERITH token.
*/
public abstract void hollerith_literal_constant(Token hollerithConstant);
/**
* R429
* derived_type_def
*
*/
public abstract void derived_type_def();
/** R429
* type_param_or_comp_def_stmt
* : type_param_attr_spec T_COLON_COLON type_param_decl_list T_EOS
* | component_attr_spec_list T_COLON_COLON component_decl_list T_EOS
*
* @param eos Token for T_EOS.
* @param type typeParam if a typeParam. compDef if a compDef.
*/
public abstract void type_param_or_comp_def_stmt(Token eos, int type);
/**
* R429
*
* type_param_or_comp_def_stmt_list
*/
public abstract void type_param_or_comp_def_stmt_list();
/** R430
* derived_type_stmt
* : T_TYPE ( ( T_COMMA type_attr_spec_list )? T_COLON_COLON )? T_IDENT
* ( T_LPAREN generic_name_list T_RPAREN )? T_EOS
*
* @param label The label.
* @param keyword The TYPE keyword token.
* @param id The identifier.
* @param eos End of statement token
* @param hasTypeAttrSpecList True if a type-attr-spec-list is present.
* @param hasGenericNameList True if a generic-name-list is present.
*/
public abstract void
derived_type_stmt(Token label, Token keyword, Token id, Token eos,
boolean hasTypeAttrSpecList, boolean hasGenericNameList);
/** R431
* type_attr_spec
* : access_spec
* | T_EXTENDS T_LPAREN T_IDENT T_RPAREN
* | T_ABSTRACT
* | T_BIND T_LPAREN T_IDENT T_RPAREN
*
* @param keyword The type-attr-spec keyword token (null if an access_spec)
* @param id Identifier if extends or bind. Otherwise, null.
* @param specType "Enum" on type: access_spec, extnds, abstrct, or
* bind. (Weird spelling of extnds and abstrct avoids overrriding
* java keywords.)
*/
public abstract void type_attr_spec(Token keyword, Token id, int specType);
/** R431 list
* type_attr_spec
* type_attr_spec_list
* : type_attr_spec ( T_COMMA type_attr_spec )*
*
* @param count The number of items in the list.
*/
public abstract void type_attr_spec_list__begin();
public abstract void type_attr_spec_list(int count);
/**
* R432
* private_or_sequence
*
*/
public abstract void private_or_sequence();
/** R433
* end_type_stmt
* : (label)? T_END T_TYPE (T_IDENT)? T_EOS
* | (label)? T_ENDTYPE (T_IDENT)? T_EOS
*
* @param label The label.
* @param endKeyword Token for T_END or T_ENDTYPE.
* @param typeKeyword Token for T_TYPE, if given as a separate token. null
* if not provided.
* @param id The identifier.
* @param eos T_EOS token.
*/
public abstract void
end_type_stmt(Token label, Token endKeyword, Token typeKeyword, Token id, Token eos);
/** R434
* sequence_stmt
* : (label)? T_SEQUENCE T_EOS
*
* @param label The label.
* @param sequenceKeyword T_SEQUENCE token.
* @param eos T_EOS token.
*/
public abstract void
sequence_stmt(Token label, Token sequenceKeyword, Token eos);
/** R436
* type_param_decl
* : T_IDENT ( T_EQUALS expr )?
*
* @param id Identifier equal to the parameter.
* @param hasInit True if is initialized.
*/
public abstract void type_param_decl(Token id, boolean hasInit);
/** R436 list
* type_param_decl
* type_param_decl_list
* : type_param_decl ( T_COMMA type_param_decl )*
*
* @param count The number of items in the list.
*/
public abstract void type_param_decl_list__begin();
public abstract void type_param_decl_list(int count);
/** R437
* type_param_attr_spec
*
* @param kindOrLen T_IDENT token for T_KIND or T_LEN.
*/
public abstract void type_param_attr_spec(Token kindOrLen);
/** R439
* component_def_stmt
* : data_component_def_stmt
* | proc_component_def_stmt
*
* @param type Type of definition: data or procedure.
*/
public abstract void component_def_stmt(int type);
/** R440
* data_component_def_stmt
* : (label)? declaration_type_spec
* ( ( T_COMMA component_attr_spec_list {hasSpecList=true;})?
* T_COLON_COLON )? component_decl_list T_EOS
*
* @param label The label.
* @param eos T_EOS token.
* @param hasSpecList Boolean true if has a component_attr_spec(_list).
*/
public abstract void
data_component_def_stmt(Token label, Token eos, boolean hasSpec);
/** R441
* component_attr_spec
* : T_POINTER
* | T_DIMENSION T_LPAREN component_array_spec T_RPAREN
* | T_DIMENSION T_LBRACKET coarray_spec T_RBRACKET
* | T_ALLOCATABLE
* | access_spec
* | T_KIND
* | T_LEN
*
* @param attrKeyword T_POINTER, T_DIMENSION, T_ALLOCATABLE, T_KIND, or T_LEN if given; null otherwise.
* @param specType Type of spec in enum form: pointer, dimension_paren, dimension_bracket, allocable, access_spec, kind, or len.
*/
public abstract void component_attr_spec(Token attrKeyword, int specType);
/** R441 list
* component_attr_spec
* component_attr_spec_list
* : component_attr_spec ( T_COMMA component_attr_spec )*
*
* @param count The number of items in the list.
*/
public abstract void component_attr_spec_list__begin();
public abstract void component_attr_spec_list(int count);
/** R442
* component_decl
* : T_IDENT ( T_LPAREN component_array_spec T_RPAREN )?
* ( T_LBRACKET coarray_spec T_RBRACKET )?
* ( T_ASTERISK char_length )? ( component_initialization )?
*
* @param id Component identifier.
* @param hasComponentArraySpec True if has component array spec.
* @param hasCoarraySpec True if has coarray spec.
* @param hasCharLength True if has char length.
* @param hasComponentInitialization True if has component initialization.
*/
public abstract void
component_decl(Token id, boolean hasComponentArraySpec, boolean hasCoarraySpec,
boolean hasCharLength, boolean hasComponentInitialization);
/** R442 list
* component_decl
* component_decl_list
* : component_decl ( T_COMMA component_decl )*
*
* @param count The number of items in the list.
*/
public abstract void component_decl_list__begin();
public abstract void component_decl_list(int count);
/** R443
* component_array_spec
* : explicit_shape_spec_list
* | deferred_shape_spec_list
*
* @param isExplicit True if this is an explicit shape spec
* list. false if it is a deferred shape spec list.
*/
public abstract void component_array_spec(boolean isExplicit);
/** R443 list
* deferred_shape_spec_list
* : T_COLON {count++;} ( T_COMMA T_COLON {count++;} )*
*
* @param count The number of items in the list.
*/
public abstract void deferred_shape_spec_list__begin();
public abstract void deferred_shape_spec_list(int count);
/**
* R444
* component_initialization
*
*/
public abstract void component_initialization();
/** R445
* proc_component_def_stmt
* : (label)? T_PROCEDURE T_LPAREN (proc_interface)? T_RPAREN T_COMMA
* proc_component_attr_spec_list T_COLON_COLON proc_decl_list T_EOS
*
* @param label The label.
* @param procedureKeyword T_PROCEDURE token.
* @param eos T_EOS token.
* @param hasInterface Boolean true if has a nonempty interface.
*/
public abstract void
proc_component_def_stmt(Token label, Token procedureKeyword,
Token eos, boolean hasInterface);
/** R446
* proc_component_attr_spec
* : T_POINTER
* | T_PASS ( T_LPAREN T_IDENT T_RPAREN {id=$T_IDENT;} )?
* | T_NOPASS
* | access_spec
*
* @param attrSpecKeyword T_POINTER, T_PASS, or T_NOPASS token if given; null otherwise.
* @param id Identifier if present in pass.
* @param specType "Enum" to specify type of spec: pointer, pass, nopass, or access_spec
*/
public abstract void
proc_component_attr_spec(Token attrSpecKeyword, Token id, int specType);
/** R446 list
* proc_component_attr_spec_list
* proc_component_attr_spec ( T_COMMA proc_component_attr_spec )*
*
* @param count The number of items in the list.
*/
public abstract void proc_component_attr_spec_list__begin();
public abstract void proc_component_attr_spec_list(int count);
/** R447
* private_components_stmt
* : (label)? T_PRIVATE T_EOS
*
* @param label The label.
* @param privateKeyword T_PRIVATE token.
* @param eos T_EOS token.
*/
public abstract void
private_components_stmt(Token label, Token privateKeyword, Token eos);
/** R448
* type_bound_procedure_part
* : T_CONTAINS T_EOS ( binding_private_stmt )? proc_binding_stmt
* ( proc_binding_stmt )*
*
* @param containsKeyword T_CONTAINS token.
* @param eos T_EOS token.
* @param count Number of procedure binding statements.
* @param hasBindingPrivateStmt True if has a keyword "private".
*/
public abstract void
type_bound_procedure_part(int count, boolean hasBindingPrivateStmt);
/** R449
* binding_private_stmt
* : (label)? T_PRIVATE T_EOS
*
* @param label The label.
* @param privateKeyword T_PRIVATE token.
* @param eos T_EOS token.
*/
public abstract void
binding_private_stmt(Token label, Token privateKeyword, Token eos);
/** R450
* proc_binding_stmt
* : (label)? specific_binding T_EOS
* | (label)? generic_binding T_EOS
* | (label)? final_binding T_EOS
*
* @param label The label.
* @param type Binding statement type (either final or generic).
* @param eos T_EOS token.
*/
public abstract void proc_binding_stmt(Token label, int type, Token eos);
/** R451
* specific_binding
* : T_PROCEDURE ( T_LPAREN T_IDENT T_RPAREN )?
* ( ( T_COMMA binding_attr_list )? T_COLON_COLON )?
* T_IDENT ( T_EQ_GT T_IDENT )?
*
* @param procedureKeyword T_PROCEDURE token.
* @param interfaceName Optional interface name.
* @param bindingName Required binding name.
* @param procedureName Optional procedure name.
* @param hasBindingAttributeList True if has a binding-attr-list.
*/
public abstract void
specific_binding(Token procedureKeyword, Token interfaceName, Token bindingName,
Token procedureName, boolean hasBindingAttrList);
/** R452
* generic_binding
* : T_GENERIC ( T_COMMA access_spec )? T_COLON_COLON
* generic_spec T_EQ_GT generic_name_list
*
* @param genericKeyword T_GENERIC token.
* @param hasAccessSpec True if has public or private access spec.
*/
public abstract void generic_binding(Token genericKeyword, boolean hasAccessSpec);
/** R453
* binding_attr
* : T_PASS ( T_LPAREN T_IDENT T_RPAREN )?
* | T_NOPASS
* | T_NON_OVERRIDABLE
* | T_DEFERRED
* | access_spec
*
* @param bindingAttr T_PASS, T_NOPASS, T_NON_OVERRIDABLE, T_DEFERRED, or null.
* @param attr The binding attribute.
* @param id Optional identifier in pass attribute.
*/
public abstract void binding_attr(Token bindingAttr, int attr, Token id);
/** R453 list
* binding_attr_list
* : binding_attr ( T_COMMA binding_attr )*
*
* @param count The number of items in the list.
*/
public abstract void binding_attr_list__begin();
public abstract void binding_attr_list(int count);
/**
* R454
* final_binding
*
* @param finalKeyword T_FINAL token.
*/
public abstract void final_binding(Token finalKeyword);
/** R455
* derived_type_spec
* : T_IDENT ( T_LPAREN type_param_spec_list T_RPAREN )?
*
* @param typeName The name of the derived type or class.
* @param hasTypeParamSpecList True if type-param-spec-list is present.
*/
public abstract void
derived_type_spec(Token typeName, boolean hasTypeParamSpecList);
/** R456
* type_param_spec
* : (keyword T_EQUALS)? type_param_value
*
* @param keyword Keyword if of the form kw = foo. Null otherwise.
*/
public abstract void type_param_spec(Token keyword);
/** R456 list
* type_param_spec_list
* : type_param_spec ( T_COMMA type_param_spec )*
*
* @param count The number of items in the list.
*/
public abstract void type_param_spec_list__begin();
public abstract void type_param_spec_list(int count);
/**
* R457
* structure_constructor
*
* @param id T_IDENT token for strucure.
*/
public abstract void structure_constructor(Token id);
/**
* R458
* component_spec
*
* @param id T_IDENT token for "keyword=" part of component-spec.
*/
public abstract void component_spec(Token id);
/** R458 list
* component_spec_list
* : component_spec ( T_COMMA component_spec )*
*
* @param count The number of items in the list.
*/
public abstract void component_spec_list__begin();
public abstract void component_spec_list(int count);
/**
* R459
* component_data_source
*
*/
public abstract void component_data_source();
/** R460
* enum_def
* : enum_def_stmt enumerator_def_stmt (enumerator_def_stmt)*
* end_enum_stmt
*
* @param numEls Number of elements in the enum.
*/
public abstract void enum_def(int numEls);
/** R461
* enum_def_stmt
* : (label)? T_ENUM T_COMMA T_BIND T_LPAREN T_IDENT T_RPAREN T_EOS
*
* @param label The label.
* @param enumKeyword T_ENUM token.
* @param bindKeyword T_BIND token.
* @param id The identifier.
* @param eos T_EOS token.
*/
public abstract void
enum_def_stmt(Token label, Token enumKeyword, Token bindKeyword, Token id, Token eos);
/** R462
* enumerator_def_stmt
* : (label)? T_ENUMERATOR ( T_COLON_COLON )? enumerator_list T_EOS
* @param label The label.
* @param enumeratorKeyword T_ENUMERATOR token.
* @param eos T_EOS token.
*/
public abstract void
enumerator_def_stmt(Token label, Token enumeratorKeyword, Token eos);
/** R463
* enumerator
*
* @param id T_IDENT for enumerator.
* @param hasExpr Boolean specifying if the optional "= expr" was given.
*/
public abstract void enumerator(Token id, boolean hasExpr);
/** R463 list
* enumerator_list
* : enumerator ( T_COMMA enumerator )*
*
* @param count The number of items in the list.
*/
public abstract void enumerator_list__begin();
public abstract void enumerator_list(int count);
/** R464
* end_enum_stmt
* : (label)? T_END T_ENUM T_EOS
* | (label)? T_ENDENUM T_EOS
*
* @param label The label.
* @param endKeyword T_END or T_ENDENUM token.
* @param enumKeyword T_ENUM token or null if not given.
* @param eos T_EOS token.
*/
public abstract void
end_enum_stmt(Token label, Token endKeyword, Token enumKeyword, Token eos);
/** R465
* array_constructor
* : T_LPAREN T_SLASH ac_spec T_SLASH T_RPAREN
* | T_LBRACKET ac_spec T_RBRACKET
*/
public abstract void array_constructor();
/** R466
* ac_spec
*/
public abstract void ac_spec();
/** R469
* ac_value
*/
public abstract void ac_value();
/** R469 list
* ac_value_list
* : ac_value ( T_COMMA ac_value )*
*
* @param count The number of items in the list.
*/
public abstract void ac_value_list__begin();
public abstract void ac_value_list(int count);
/** R470
* ac_implied_do
* : T_LPAREN ac_value_list T_COMMA ac_implied_do_control T_RPAREN
*
*/
public abstract void ac_implied_do();
/** R471
* ac_implied_do_control
* : T_IDENT T_EQUALS expr T_COMMA expr (T_COMMA expr)?
*
* @param hasStride True if is of the form a = b,c,d where d is optional stride
*/
public abstract void ac_implied_do_control(boolean hasStride);
/** R472
* scalar_int_variable
*/
public abstract void scalar_int_variable();
/** R501
* type_declaration_stmt
* : (label)? declaration_type_spec ( (T_COMMA attr_spec)*
* T_COLON_COLON )?
* entity_decl_list T_EOS
*
* @param label Optional statement label
* @param numAttributes The number of attributes present
* @param eos Token for the end of the statement.
*/
public abstract void
type_declaration_stmt(Token label, int numAttributes, Token eos);
/** R502
* declaration_type_spec
* : intrinsic_type_spec
* | T_TYPE T_LPAREN derived_type_spec T_RPAREN
* | T_CLASS T_LPAREN derived_type_spec T_RPAREN
* | T_CLASS T_LPAREN T_ASTERISK T_RPAREN
*
* @param udtKeyword Token for the T_TYPE or T_CLASS and null for intrinsic_type_spec.
* @param type The type of declaration-type-spec {INTRINSIC,TYPE, CLASS,POLYMORPHIC}.
*/
public abstract void declaration_type_spec(Token udtKeyword, int type);
/** R503
* attr_spec
* : access_spec
* | T_ALLOCATABLE
* | T_ASYNCHRONOUS
* | T_DIMENSION T_LPAREN array_spec T_RPAREN
* | T_EXTERNAL
* | T_INTENT T_LPAREN intent_spec T_RPAREN
* | T_INTRINSIC
* | language_binding_spec
* | T_OPTIONAL
* | T_PARAMETER
* | T_POINTER