FLANG

dump-parse-tree.h
1 //===-- include/flang/Parser/dump-parse-tree.h ------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef FORTRAN_PARSER_DUMP_PARSE_TREE_H_
10 #define FORTRAN_PARSER_DUMP_PARSE_TREE_H_
11
12 #include "format-specification.h"
13 #include "parse-tree-visitor.h"
14 #include "parse-tree.h"
15 #include "tools.h"
16 #include "unparse.h"
17 #include "flang/Common/idioms.h"
18 #include "flang/Common/indirection.h"
19 #include "llvm/Support/raw_ostream.h"
20 #include <string>
21 #include <type_traits>
22
23 namespace Fortran::parser {
24
25 //
26 // Dump the Parse Tree hierarchy of any node 'x' of the parse tree.
27 //
28
29 class ParseTreeDumper {
30 public:
31 explicit ParseTreeDumper(llvm::raw_ostream &out,
32 const AnalyzedObjectsAsFortran *asFortran = nullptr)
33 : out_(out), asFortran_{asFortran} {}
34
35 static constexpr const char *GetNodeName(const char *) { return "char *"; }
36 #define NODE_NAME(T, N) \
37 static constexpr const char *GetNodeName(const T &) { return N; }
38 #define NODE_ENUM(T, E) \
39 static std::string GetNodeName(const T::E &x) { \
40 return #E " = "s + T::EnumToString(x); \
41 }
42 #define NODE(T1, T2) NODE_NAME(T1::T2, #T2)
43 NODE_NAME(bool, "bool")
44 NODE_NAME(int, "int")
45 NODE(std, string)
46 NODE(std, int64_t)
47 NODE(std, uint64_t)
48 NODE(format, ControlEditDesc)
49 NODE(format::ControlEditDesc, Kind)
50 NODE(format, DerivedTypeDataEditDesc)
51 NODE(format, FormatItem)
52 NODE(format, FormatSpecification)
53 NODE(format, IntrinsicTypeDataEditDesc)
54 NODE(format::IntrinsicTypeDataEditDesc, Kind)
55 NODE(parser, Abstract)
56 NODE(parser, AccAtomicCapture)
57 NODE(AccAtomicCapture, Stmt1)
58 NODE(AccAtomicCapture, Stmt2)
59 NODE(parser, AccAtomicRead)
60 NODE(parser, AccAtomicUpdate)
61 NODE(parser, AccAtomicWrite)
62 NODE(parser, AccBeginBlockDirective)
63 NODE(parser, AccBeginCombinedDirective)
64 NODE(parser, AccBeginLoopDirective)
65 NODE(parser, AccBlockDirective)
66 NODE(parser, AccClause)
67 NODE(AccClause, Auto)
68 NODE(AccClause, Async)
69 NODE(AccClause, Attach)
70 NODE(AccClause, Bind)
71 NODE(AccClause, Capture)
72 NODE(AccClause, Collapse)
73 NODE(AccClause, Copy)
74 NODE(AccClause, Copyin)
75 NODE(AccClause, Copyout)
76 NODE(AccClause, Create)
77 NODE(AccClause, Default)
78 NODE(AccClause, DefaultAsync)
79 NODE(AccClause, Delete)
80 NODE(AccClause, Detach)
81 NODE(AccClause, Device)
82 NODE(AccClause, DeviceNum)
83 NODE(AccClause, DevicePtr)
84 NODE(AccClause, DeviceResident)
85 NODE(AccClause, DeviceType)
86 NODE(AccClause, Finalize)
87 NODE(AccClause, FirstPrivate)
88 NODE(AccClause, Gang)
89 NODE(AccClause, Host)
90 NODE(AccClause, If)
91 NODE(AccClause, IfPresent)
92 NODE(AccClause, Independent)
93 NODE(AccClause, Link)
94 NODE(AccClause, NoCreate)
95 NODE(AccClause, NoHost)
96 NODE(AccClause, NumGangs)
97 NODE(AccClause, NumWorkers)
98 NODE(AccClause, Present)
99 NODE(AccClause, Private)
100 NODE(AccClause, Tile)
101 NODE(AccClause, UseDevice)
102 NODE(AccClause, Read)
103 NODE(AccClause, Reduction)
104 NODE(AccClause, Self)
105 NODE(AccClause, Seq)
106 NODE(AccClause, Vector)
107 NODE(AccClause, VectorLength)
108 NODE(AccClause, Wait)
109 NODE(AccClause, Worker)
110 NODE(AccClause, Write)
111 NODE(AccClause, Unknown)
112 NODE(parser, AccDefaultClause)
113 NODE_ENUM(parser::AccDefaultClause, Arg)
114 NODE(parser, AccClauseList)
115 NODE(parser, AccCombinedDirective)
116 NODE(parser, AccDataModifier)
117 NODE_ENUM(parser::AccDataModifier, Modifier)
118 NODE(parser, AccDeclarativeDirective)
119 NODE(parser, AccEndAtomic)
120 NODE(parser, AccEndBlockDirective)
121 NODE(parser, AccEndCombinedDirective)
122 NODE(parser, AccGangArgument)
123 NODE(parser, AccObject)
124 NODE(parser, AccObjectList)
125 NODE(parser, AccObjectListWithModifier)
126 NODE(parser, AccObjectListWithReduction)
127 NODE(parser, AccReductionOperator)
128 NODE(parser, AccSizeExpr)
129 NODE(parser, AccSizeExprList)
130 NODE(parser, AccStandaloneDirective)
131 NODE(parser, AccLoopDirective)
132 NODE(parser, AccWaitArgument)
133 static std::string GetNodeName(const llvm::acc::Directive &x) {
134 return llvm::Twine(
135 "llvm::acc::Directive = ", llvm::acc::getOpenACCDirectiveName(x))
136 .str();
137 }
138 NODE(parser, AcImpliedDo)
139 NODE(parser, AcImpliedDoControl)
140 NODE(parser, AcValue)
141 NODE(parser, AccessStmt)
142 NODE(parser, AccessId)
143 NODE(parser, AccessSpec)
144 NODE_ENUM(AccessSpec, Kind)
145 NODE(parser, AcSpec)
146 NODE(parser, ActionStmt)
147 NODE(parser, ActualArg)
148 NODE(ActualArg, PercentRef)
149 NODE(ActualArg, PercentVal)
150 NODE(parser, ActualArgSpec)
151 NODE(AcValue, Triplet)
152 NODE(parser, AllocOpt)
153 NODE(AllocOpt, Mold)
154 NODE(AllocOpt, Source)
155 NODE(parser, Allocatable)
156 NODE(parser, AllocatableStmt)
157 NODE(parser, AllocateCoarraySpec)
158 NODE(parser, AllocateObject)
159 NODE(parser, AllocateShapeSpec)
160 NODE(parser, AllocateStmt)
161 NODE(parser, Allocation)
162 NODE(parser, AltReturnSpec)
163 NODE(parser, ArithmeticIfStmt)
164 NODE(parser, ArrayConstructor)
165 NODE(parser, ArrayElement)
166 NODE(parser, ArraySpec)
167 NODE(parser, AssignStmt)
168 NODE(parser, AssignedGotoStmt)
169 NODE(parser, AssignmentStmt)
170 NODE(parser, AssociateConstruct)
171 NODE(parser, AssociateStmt)
172 NODE(parser, Association)
173 NODE(parser, AssumedImpliedSpec)
174 NODE(parser, AssumedRankSpec)
175 NODE(parser, AssumedShapeSpec)
176 NODE(parser, AssumedSizeSpec)
177 NODE(parser, Asynchronous)
178 NODE(parser, AsynchronousStmt)
179 NODE(parser, AttrSpec)
180 NODE(parser, BOZLiteralConstant)
181 NODE(parser, BackspaceStmt)
182 NODE(parser, BasedPointer)
183 NODE(parser, BasedPointerStmt)
184 NODE(parser, BindAttr)
185 NODE(BindAttr, Deferred)
186 NODE(BindAttr, Non_Overridable)
187 NODE(parser, BindEntity)
188 NODE_ENUM(BindEntity, Kind)
189 NODE(parser, BindStmt)
190 NODE(parser, Block)
191 NODE(parser, BlockConstruct)
192 NODE(parser, BlockData)
193 NODE(parser, BlockDataStmt)
194 NODE(parser, BlockSpecificationPart)
195 NODE(parser, BlockStmt)
196 NODE(parser, BoundsRemapping)
197 NODE(parser, BoundsSpec)
198 NODE(parser, Call)
199 NODE(parser, CallStmt)
200 NODE(parser, CaseConstruct)
201 NODE(CaseConstruct, Case)
202 NODE(parser, CaseSelector)
203 NODE(parser, CaseStmt)
204 NODE(parser, CaseValueRange)
205 NODE(CaseValueRange, Range)
206 NODE(parser, ChangeTeamConstruct)
207 NODE(parser, ChangeTeamStmt)
208 NODE(parser, CharLength)
209 NODE(parser, CharLiteralConstant)
210 NODE(parser, CharLiteralConstantSubstring)
211 NODE(parser, CharSelector)
212 NODE(CharSelector, LengthAndKind)
213 NODE(parser, CloseStmt)
214 NODE(CloseStmt, CloseSpec)
215 NODE(parser, CoarrayAssociation)
216 NODE(parser, CoarraySpec)
217 NODE(parser, CodimensionDecl)
218 NODE(parser, CodimensionStmt)
219 NODE(parser, CoindexedNamedObject)
220 NODE(parser, CommonBlockObject)
221 NODE(parser, CommonStmt)
222 NODE(CommonStmt, Block)
223 NODE(parser, CompilerDirective)
224 NODE(CompilerDirective, IgnoreTKR)
225 NODE(parser, ComplexLiteralConstant)
226 NODE(parser, ComplexPart)
227 NODE(parser, ComponentArraySpec)
228 NODE(parser, ComponentAttrSpec)
229 NODE(parser, ComponentDataSource)
230 NODE(parser, ComponentDecl)
231 NODE(parser, ComponentDefStmt)
232 NODE(parser, ComponentSpec)
233 NODE(parser, ComputedGotoStmt)
234 NODE(parser, ConcurrentControl)
235 NODE(parser, ConcurrentHeader)
236 NODE(parser, ConnectSpec)
237 NODE(ConnectSpec, CharExpr)
238 NODE_ENUM(ConnectSpec::CharExpr, Kind)
239 NODE(ConnectSpec, Newunit)
240 NODE(ConnectSpec, Recl)
241 NODE(parser, ConstantValue)
242 NODE(parser, ContainsStmt)
243 NODE(parser, Contiguous)
244 NODE(parser, ContiguousStmt)
245 NODE(parser, ContinueStmt)
246 NODE(parser, CriticalConstruct)
247 NODE(parser, CriticalStmt)
248 NODE(parser, CycleStmt)
249 NODE(parser, DataComponentDefStmt)
250 NODE(parser, DataIDoObject)
251 NODE(parser, DataImpliedDo)
252 NODE(parser, DataRef)
253 NODE(parser, DataStmt)
254 NODE(parser, DataStmtConstant)
255 NODE(parser, DataStmtObject)
256 NODE(parser, DataStmtRepeat)
257 NODE(parser, DataStmtSet)
258 NODE(parser, DataStmtValue)
259 NODE(parser, DeallocateStmt)
260 NODE(parser, DeclarationConstruct)
261 NODE(parser, DeclarationTypeSpec)
262 NODE(DeclarationTypeSpec, Class)
263 NODE(DeclarationTypeSpec, ClassStar)
264 NODE(DeclarationTypeSpec, Record)
265 NODE(DeclarationTypeSpec, Type)
266 NODE(DeclarationTypeSpec, TypeStar)
267 NODE(parser, Default)
268 NODE(parser, DeferredCoshapeSpecList)
269 NODE(parser, DeferredShapeSpecList)
270 NODE(parser, DefinedOpName)
271 NODE(parser, DefinedOperator)
272 NODE_ENUM(DefinedOperator, IntrinsicOperator)
273 NODE(parser, DerivedTypeDef)
274 NODE(parser, DerivedTypeSpec)
275 NODE(parser, DerivedTypeStmt)
276 NODE(parser, Designator)
277 NODE(parser, DimensionStmt)
278 NODE(DimensionStmt, Declaration)
279 NODE(parser, DoConstruct)
280 NODE(parser, DummyArg)
281 NODE(parser, ElseIfStmt)
282 NODE(parser, ElseStmt)
283 NODE(parser, ElsewhereStmt)
284 NODE(parser, EndAssociateStmt)
285 NODE(parser, EndBlockDataStmt)
286 NODE(parser, EndBlockStmt)
287 NODE(parser, EndChangeTeamStmt)
288 NODE(parser, EndCriticalStmt)
289 NODE(parser, EndDoStmt)
290 NODE(parser, EndEnumStmt)
291 NODE(parser, EndForallStmt)
292 NODE(parser, EndFunctionStmt)
293 NODE(parser, EndIfStmt)
294 NODE(parser, EndInterfaceStmt)
295 NODE(parser, EndLabel)
296 NODE(parser, EndModuleStmt)
297 NODE(parser, EndMpSubprogramStmt)
298 NODE(parser, EndProgramStmt)
299 NODE(parser, EndSelectStmt)
300 NODE(parser, EndSubmoduleStmt)
301 NODE(parser, EndSubroutineStmt)
302 NODE(parser, EndTypeStmt)
303 NODE(parser, EndWhereStmt)
304 NODE(parser, EndfileStmt)
305 NODE(parser, EntityDecl)
306 NODE(parser, EntryStmt)
307 NODE(parser, EnumDef)
308 NODE(parser, EnumDefStmt)
309 NODE(parser, Enumerator)
310 NODE(parser, EnumeratorDefStmt)
311 NODE(parser, EorLabel)
312 NODE(parser, EquivalenceObject)
313 NODE(parser, EquivalenceStmt)
314 NODE(parser, ErrLabel)
315 NODE(parser, ErrorRecovery)
316 NODE(parser, EventPostStmt)
317 NODE(parser, EventWaitStmt)
318 NODE(EventWaitStmt, EventWaitSpec)
319 NODE(parser, ExecutableConstruct)
320 NODE(parser, ExecutionPart)
321 NODE(parser, ExecutionPartConstruct)
322 NODE(parser, ExitStmt)
323 NODE(parser, ExplicitCoshapeSpec)
324 NODE(parser, ExplicitShapeSpec)
325 NODE(parser, Expr)
326 NODE(Expr, Parentheses)
327 NODE(Expr, UnaryPlus)
328 NODE(Expr, Negate)
329 NODE(Expr, NOT)
330 NODE(Expr, PercentLoc)
331 NODE(Expr, DefinedUnary)
332 NODE(Expr, Power)
333 NODE(Expr, Multiply)
334 NODE(Expr, Divide)
335 NODE(Expr, Add)
336 NODE(Expr, Subtract)
337 NODE(Expr, Concat)
338 NODE(Expr, LT)
339 NODE(Expr, LE)
340 NODE(Expr, EQ)
341 NODE(Expr, NE)
342 NODE(Expr, GE)
343 NODE(Expr, GT)
344 NODE(Expr, AND)
345 NODE(Expr, OR)
346 NODE(Expr, EQV)
347 NODE(Expr, NEQV)
348 NODE(Expr, DefinedBinary)
349 NODE(Expr, ComplexConstructor)
350 NODE(parser, External)
351 NODE(parser, ExternalStmt)
352 NODE(parser, FailImageStmt)
353 NODE(parser, FileUnitNumber)
354 NODE(parser, FinalProcedureStmt)
355 NODE(parser, FlushStmt)
356 NODE(parser, ForallAssignmentStmt)
357 NODE(parser, ForallBodyConstruct)
358 NODE(parser, ForallConstruct)
359 NODE(parser, ForallConstructStmt)
360 NODE(parser, ForallStmt)
361 NODE(parser, FormTeamStmt)
362 NODE(FormTeamStmt, FormTeamSpec)
363 NODE(parser, Format)
364 NODE(parser, FormatStmt)
365 NODE(parser, FunctionReference)
366 NODE(parser, FunctionStmt)
367 NODE(parser, FunctionSubprogram)
368 NODE(parser, GenericSpec)
369 NODE(GenericSpec, Assignment)
370 NODE(GenericSpec, ReadFormatted)
371 NODE(GenericSpec, ReadUnformatted)
372 NODE(GenericSpec, WriteFormatted)
373 NODE(GenericSpec, WriteUnformatted)
374 NODE(parser, GenericStmt)
375 NODE(parser, GotoStmt)
376 NODE(parser, HollerithLiteralConstant)
377 NODE(parser, IdExpr)
378 NODE(parser, IdVariable)
379 NODE(parser, IfConstruct)
380 NODE(IfConstruct, ElseBlock)
381 NODE(IfConstruct, ElseIfBlock)
382 NODE(parser, IfStmt)
383 NODE(parser, IfThenStmt)
384 NODE(parser, TeamValue)
385 NODE(parser, ImageSelector)
386 NODE(parser, ImageSelectorSpec)
387 NODE(ImageSelectorSpec, Stat)
388 NODE(ImageSelectorSpec, Team_Number)
389 NODE(parser, ImplicitPart)
390 NODE(parser, ImplicitPartStmt)
391 NODE(parser, ImplicitSpec)
392 NODE(parser, ImplicitStmt)
393 NODE_ENUM(ImplicitStmt, ImplicitNoneNameSpec)
394 NODE(parser, ImpliedShapeSpec)
395 NODE(parser, ImportStmt)
396 NODE(parser, Initialization)
397 NODE(parser, InputImpliedDo)
398 NODE(parser, InputItem)
399 NODE(parser, InquireSpec)
400 NODE(InquireSpec, CharVar)
401 NODE_ENUM(InquireSpec::CharVar, Kind)
402 NODE(InquireSpec, IntVar)
403 NODE_ENUM(InquireSpec::IntVar, Kind)
404 NODE(InquireSpec, LogVar)
405 NODE_ENUM(InquireSpec::LogVar, Kind)
406 NODE(parser, InquireStmt)
407 NODE(InquireStmt, Iolength)
408 NODE(parser, IntegerTypeSpec)
409 NODE(parser, IntentSpec)
410 NODE_ENUM(IntentSpec, Intent)
411 NODE(parser, IntentStmt)
412 NODE(parser, InterfaceBlock)
413 NODE(parser, InterfaceBody)
414 NODE(InterfaceBody, Function)
415 NODE(InterfaceBody, Subroutine)
416 NODE(parser, InterfaceSpecification)
417 NODE(parser, InterfaceStmt)
418 NODE(parser, InternalSubprogram)
419 NODE(parser, InternalSubprogramPart)
420 NODE(parser, Intrinsic)
421 NODE(parser, IntrinsicStmt)
422 NODE(parser, IntrinsicTypeSpec)
423 NODE(IntrinsicTypeSpec, Character)
424 NODE(IntrinsicTypeSpec, Complex)
425 NODE(IntrinsicTypeSpec, DoubleComplex)
426 NODE(IntrinsicTypeSpec, DoublePrecision)
427 NODE(IntrinsicTypeSpec, Logical)
428 NODE(IntrinsicTypeSpec, Real)
429 NODE(parser, IoControlSpec)
430 NODE(IoControlSpec, Asynchronous)
431 NODE(IoControlSpec, CharExpr)
432 NODE_ENUM(IoControlSpec::CharExpr, Kind)
433 NODE(IoControlSpec, Pos)
434 NODE(IoControlSpec, Rec)
435 NODE(IoControlSpec, Size)
436 NODE(parser, IoUnit)
437 NODE(parser, Keyword)
438 NODE(parser, KindParam)
439 NODE(parser, KindSelector)
440 NODE(KindSelector, StarSize)
441 NODE(parser, LabelDoStmt)
442 NODE(parser, LanguageBindingSpec)
443 NODE(parser, LengthSelector)
444 NODE(parser, LetterSpec)
445 NODE(parser, LiteralConstant)
446 NODE(parser, IntLiteralConstant)
447 NODE(parser, LocalitySpec)
448 NODE(LocalitySpec, DefaultNone)
449 NODE(LocalitySpec, Local)
450 NODE(LocalitySpec, LocalInit)
451 NODE(LocalitySpec, Shared)
452 NODE(parser, LockStmt)
453 NODE(LockStmt, LockStat)
454 NODE(parser, LogicalLiteralConstant)
455 NODE_NAME(LoopControl::Bounds, "LoopBounds")
456 NODE_NAME(AcImpliedDoControl::Bounds, "LoopBounds")
457 NODE_NAME(DataImpliedDo::Bounds, "LoopBounds")
458 NODE(parser, LoopControl)
459 NODE(LoopControl, Concurrent)
460 NODE(parser, MainProgram)
461 NODE(parser, Map)
462 NODE(Map, EndMapStmt)
463 NODE(Map, MapStmt)
464 NODE(parser, MaskedElsewhereStmt)
465 NODE(parser, Module)
466 NODE(parser, ModuleStmt)
467 NODE(parser, ModuleSubprogram)
468 NODE(parser, ModuleSubprogramPart)
469 NODE(parser, MpSubprogramStmt)
470 NODE(parser, MsgVariable)
471 NODE(parser, Name)
472 NODE(parser, NamedConstant)
473 NODE(parser, NamedConstantDef)
474 NODE(parser, NamelistStmt)
475 NODE(NamelistStmt, Group)
476 NODE(parser, NonLabelDoStmt)
477 NODE(parser, NoPass)
478 NODE(parser, NullifyStmt)
479 NODE(parser, NullInit)
480 NODE(parser, ObjectDecl)
481 NODE(parser, OldParameterStmt)
482 NODE(parser, OmpAlignedClause)
483 NODE(parser, OmpAtomic)
484 NODE(parser, OmpAtomicCapture)
485 NODE(OmpAtomicCapture, Stmt1)
486 NODE(OmpAtomicCapture, Stmt2)
487 NODE(parser, OmpAtomicRead)
488 NODE(parser, OmpAtomicUpdate)
489 NODE(parser, OmpAtomicWrite)
490 NODE(parser, OmpBeginBlockDirective)
491 NODE(parser, OmpBeginLoopDirective)
492 NODE(parser, OmpBeginSectionsDirective)
493 NODE(parser, OmpBlockDirective)
494 static std::string GetNodeName(const llvm::omp::Directive &x) {
495 return llvm::Twine(
496 "llvm::omp::Directive = ", llvm::omp::getOpenMPDirectiveName(x))
497 .str();
498 }
499 NODE(parser, OmpCancelType)
500 NODE_ENUM(OmpCancelType, Type)
501 NODE(parser, OmpClause)
502 NODE(parser, OmpClauseList)
503 NODE(OmpClause, Collapse)
504 NODE(OmpClause, Copyin)
505 NODE(OmpClause, Copyprivate)
506 NODE(OmpClause, Device)
507 NODE(OmpClause, DistSchedule)
508 NODE(OmpClause, Final)
509 NODE(OmpClause, Firstprivate)
510 NODE(OmpClause, From)
511 NODE(OmpClause, Grainsize)
512 NODE(OmpClause, Inbranch)
513 NODE(OmpClause, Lastprivate)
514 NODE(OmpClause, Mergeable)
515 NODE(OmpClause, Nogroup)
516 NODE(OmpClause, Notinbranch)
517 NODE(OmpClause, Threads)
518 NODE(OmpClause, Simd)
519 NODE(OmpClause, NumTasks)
520 NODE(OmpClause, NumTeams)
521 NODE(OmpClause, NumThreads)
522 NODE(OmpClause, Ordered)
523 NODE(OmpClause, Priority)
524 NODE(OmpClause, Private)
525 NODE(OmpClause, Safelen)
526 NODE(OmpClause, Shared)
527 NODE(OmpClause, Simdlen)
528 NODE(OmpClause, ThreadLimit)
529 NODE(OmpClause, To)
530 NODE(OmpClause, Link)
531 NODE(OmpClause, Uniform)
532 NODE(OmpClause, Untied)
533 NODE(OmpClause, UseDevicePtr)
534 NODE(OmpClause, IsDevicePtr)
535 NODE(parser, OmpCriticalDirective)
536 NODE(OmpCriticalDirective, Hint)
537 NODE(parser, OmpDeclareTargetSpecifier)
538 NODE(parser, OmpDeclareTargetWithClause)
539 NODE(parser, OmpDeclareTargetWithList)
540 NODE(parser, OmpDefaultClause)
541 NODE_ENUM(OmpDefaultClause, Type)
542 NODE(parser, OmpDefaultmapClause)
543 NODE_ENUM(OmpDefaultmapClause, ImplicitBehavior)
544 NODE_ENUM(OmpDefaultmapClause, VariableCategory)
545 NODE(parser, OmpDependClause)
546 NODE(OmpDependClause, InOut)
547 NODE(OmpDependClause, Sink)
548 NODE(OmpDependClause, Source)
549 NODE(parser, OmpDependenceType)
550 NODE_ENUM(OmpDependenceType, Type)
551 NODE(parser, OmpDependSinkVec)
552 NODE(parser, OmpDependSinkVecLength)
553 NODE(parser, OmpEndAtomic)
554 NODE(parser, OmpEndBlockDirective)
555 NODE(parser, OmpEndCriticalDirective)
556 NODE(parser, OmpEndLoopDirective)
557 NODE(parser, OmpEndSectionsDirective)
558 NODE(parser, OmpIfClause)
559 NODE_ENUM(OmpIfClause, DirectiveNameModifier)
560 NODE(parser, OmpLinearClause)
561 NODE(OmpLinearClause, WithModifier)
562 NODE(OmpLinearClause, WithoutModifier)
563 NODE(parser, OmpLinearModifier)
564 NODE_ENUM(OmpLinearModifier, Type)
565 NODE(parser, OmpLoopDirective)
566 NODE(parser, OmpMapClause)
567 NODE(parser, OmpMapType)
568 NODE(OmpMapType, Always)
569 NODE_ENUM(OmpMapType, Type)
570 NODE(parser, OmpMemoryClause)
571 NODE_ENUM(OmpMemoryClause, MemoryOrder)
572 NODE(parser, OmpMemoryClauseList)
573 NODE(parser, OmpMemoryClausePostList)
574 NODE(parser, OmpNowait)
575 NODE(parser, OmpObject)
576 NODE(parser, OmpObjectList)
577 NODE(parser, OmpProcBindClause)
578 NODE_ENUM(OmpProcBindClause, Type)
579 NODE(parser, OmpReductionClause)
580 NODE(parser, OmpReductionCombiner)
581 NODE(OmpReductionCombiner, FunctionCombiner)
582 NODE(parser, OmpReductionInitializerClause)
583 NODE(parser, OmpReductionOperator)
584 NODE(parser, OmpScheduleClause)
585 NODE_ENUM(OmpScheduleClause, ScheduleType)
586 NODE(parser, OmpScheduleModifier)
587 NODE(OmpScheduleModifier, Modifier1)
588 NODE(OmpScheduleModifier, Modifier2)
589 NODE(parser, OmpScheduleModifierType)
590 NODE_ENUM(OmpScheduleModifierType, ModType)
591 NODE(parser, OmpSectionBlocks)
592 NODE(parser, OmpSectionsDirective)
593 NODE(parser, OmpSimpleStandaloneDirective)
594 NODE(parser, Only)
595 NODE(parser, OpenACCAtomicConstruct)
596 NODE(parser, OpenACCBlockConstruct)
597 NODE(parser, OpenACCCacheConstruct)
598 NODE(parser, OpenACCCombinedConstruct)
599 NODE(parser, OpenACCConstruct)
600 NODE(parser, OpenACCDeclarativeConstruct)
601 NODE(parser, OpenACCLoopConstruct)
602 NODE(parser, OpenACCRoutineConstruct)
603 NODE(parser, OpenACCStandaloneDeclarativeConstruct)
604 NODE(parser, OpenACCStandaloneConstruct)
605 NODE(parser, OpenACCWaitConstruct)
606 NODE(parser, OpenMPAtomicConstruct)
607 NODE(parser, OpenMPBlockConstruct)
608 NODE(parser, OpenMPCancelConstruct)
609 NODE(OpenMPCancelConstruct, If)
610 NODE(parser, OpenMPCancellationPointConstruct)
611 NODE(parser, OpenMPConstruct)
612 NODE(parser, OpenMPCriticalConstruct)
613 NODE(parser, OpenMPDeclarativeConstruct)
614 NODE(parser, OpenMPDeclareReductionConstruct)
615 NODE(parser, OpenMPDeclareSimdConstruct)
616 NODE(parser, OpenMPDeclareTargetConstruct)
617 NODE(parser, OmpFlushMemoryClause)
618 NODE_ENUM(OmpFlushMemoryClause, FlushMemoryOrder)
619 NODE(parser, OpenMPFlushConstruct)
620 NODE(parser, OpenMPLoopConstruct)
621 NODE(parser, OpenMPSimpleStandaloneConstruct)
622 NODE(parser, OpenMPStandaloneConstruct)
623 NODE(parser, OpenMPSectionsConstruct)
624 NODE(parser, OpenMPThreadprivate)
625 NODE(parser, OpenStmt)
626 NODE(parser, Optional)
627 NODE(parser, OptionalStmt)
628 NODE(parser, OtherSpecificationStmt)
629 NODE(parser, OutputImpliedDo)
630 NODE(parser, OutputItem)
631 NODE(parser, Parameter)
632 NODE(parser, ParameterStmt)
633 NODE(parser, ParentIdentifier)
634 NODE(parser, Pass)
635 NODE(parser, PauseStmt)
636 NODE(parser, Pointer)
637 NODE(parser, PointerAssignmentStmt)
638 NODE(PointerAssignmentStmt, Bounds)
639 NODE(parser, PointerDecl)
640 NODE(parser, PointerObject)
641 NODE(parser, PointerStmt)
642 NODE(parser, PositionOrFlushSpec)
643 NODE(parser, PrefixSpec)
644 NODE(PrefixSpec, Elemental)
645 NODE(PrefixSpec, Impure)
646 NODE(PrefixSpec, Module)
647 NODE(PrefixSpec, Non_Recursive)
648 NODE(PrefixSpec, Pure)
649 NODE(PrefixSpec, Recursive)
650 NODE(parser, PrintStmt)
651 NODE(parser, PrivateStmt)
652 NODE(parser, PrivateOrSequence)
653 NODE(parser, ProcAttrSpec)
654 NODE(parser, ProcComponentAttrSpec)
655 NODE(parser, ProcComponentDefStmt)
656 NODE(parser, ProcComponentRef)
657 NODE(parser, ProcDecl)
658 NODE(parser, ProcInterface)
659 NODE(parser, ProcPointerInit)
660 NODE(parser, ProcedureDeclarationStmt)
661 NODE(parser, ProcedureDesignator)
662 NODE(parser, ProcedureStmt)
663 NODE_ENUM(ProcedureStmt, Kind)
664 NODE(parser, Program)
665 NODE(parser, ProgramStmt)
666 NODE(parser, ProgramUnit)
667 NODE(parser, Protected)
668 NODE(parser, ProtectedStmt)
669 NODE(parser, ReadStmt)
670 NODE(parser, RealLiteralConstant)
671 NODE(RealLiteralConstant, Real)
672 NODE(parser, Rename)
673 NODE(Rename, Names)
674 NODE(Rename, Operators)
675 NODE(parser, ReturnStmt)
676 NODE(parser, RewindStmt)
677 NODE(parser, Save)
678 NODE(parser, SaveStmt)
679 NODE(parser, SavedEntity)
680 NODE_ENUM(SavedEntity, Kind)
681 NODE(parser, SectionSubscript)
682 NODE(parser, SelectCaseStmt)
683 NODE(parser, SelectRankCaseStmt)
684 NODE(SelectRankCaseStmt, Rank)
685 NODE(parser, SelectRankConstruct)
686 NODE(SelectRankConstruct, RankCase)
687 NODE(parser, SelectRankStmt)
688 NODE(parser, SelectTypeConstruct)
689 NODE(SelectTypeConstruct, TypeCase)
690 NODE(parser, SelectTypeStmt)
691 NODE(parser, Selector)
692 NODE(parser, SeparateModuleSubprogram)
693 NODE(parser, SequenceStmt)
694 NODE(parser, Sign)
695 NODE(parser, SignedComplexLiteralConstant)
696 NODE(parser, SignedIntLiteralConstant)
697 NODE(parser, SignedRealLiteralConstant)
698 NODE(parser, SpecificationConstruct)
699 NODE(parser, SpecificationExpr)
700 NODE(parser, SpecificationPart)
701 NODE(parser, Star)
702 NODE(parser, StatOrErrmsg)
703 NODE(parser, StatVariable)
704 NODE(parser, StatusExpr)
705 NODE(parser, StmtFunctionStmt)
706 NODE(parser, StopCode)
707 NODE(parser, StopStmt)
708 NODE_ENUM(StopStmt, Kind)
709 NODE(parser, StructureComponent)
710 NODE(parser, StructureConstructor)
711 NODE(parser, StructureDef)
712 NODE(StructureDef, EndStructureStmt)
713 NODE(parser, StructureField)
714 NODE(parser, StructureStmt)
715 NODE(parser, Submodule)
716 NODE(parser, SubmoduleStmt)
717 NODE(parser, SubroutineStmt)
718 NODE(parser, SubroutineSubprogram)
719 NODE(parser, SubscriptTriplet)
720 NODE(parser, Substring)
721 NODE(parser, SubstringRange)
722 NODE(parser, Suffix)
723 NODE(parser, SyncAllStmt)
724 NODE(parser, SyncImagesStmt)
725 NODE(SyncImagesStmt, ImageSet)
726 NODE(parser, SyncMemoryStmt)
727 NODE(parser, SyncTeamStmt)
728 NODE(parser, Target)
729 NODE(parser, TargetStmt)
730 NODE(parser, TypeAttrSpec)
731 NODE(TypeAttrSpec, BindC)
732 NODE(TypeAttrSpec, Extends)
733 NODE(parser, TypeBoundGenericStmt)
734 NODE(parser, TypeBoundProcBinding)
735 NODE(parser, TypeBoundProcDecl)
736 NODE(parser, TypeBoundProcedurePart)
737 NODE(parser, TypeBoundProcedureStmt)
738 NODE(TypeBoundProcedureStmt, WithInterface)
739 NODE(TypeBoundProcedureStmt, WithoutInterface)
740 NODE(parser, TypeDeclarationStmt)
741 NODE(parser, TypeGuardStmt)
742 NODE(TypeGuardStmt, Guard)
743 NODE(parser, TypeParamDecl)
744 NODE(parser, TypeParamDefStmt)
745 NODE(common, TypeParamAttr)
746 NODE(parser, TypeParamSpec)
747 NODE(parser, TypeParamValue)
748 NODE(TypeParamValue, Deferred)
749 NODE(parser, TypeSpec)
750 NODE(parser, Union)
751 NODE(Union, EndUnionStmt)
752 NODE(Union, UnionStmt)
753 NODE(parser, UnlockStmt)
754 NODE(parser, UseStmt)
755 NODE_ENUM(UseStmt, ModuleNature)
756 NODE(parser, Value)
757 NODE(parser, ValueStmt)
758 NODE(parser, Variable)
759 NODE(parser, Verbatim)
760 NODE(parser, Volatile)
761 NODE(parser, VolatileStmt)
762 NODE(parser, WaitSpec)
763 NODE(parser, WaitStmt)
764 NODE(parser, WhereBodyConstruct)
765 NODE(parser, WhereConstruct)
766 NODE(WhereConstruct, Elsewhere)
767 NODE(WhereConstruct, MaskedElsewhere)
768 NODE(parser, WhereConstructStmt)
769 NODE(parser, WhereStmt)
770 NODE(parser, WriteStmt)
771 #undef NODE
772 #undef NODE_NAME
773
774 template <typename T> bool Pre(const T &x) {
775 std::string fortran{AsFortran<T>(x)};
776 if (fortran.empty() && (UnionTrait<T> || WrapperTrait<T>)) {
777 Prefix(GetNodeName(x));
778 } else {
779 IndentEmptyLine();
780 out_ << GetNodeName(x);
781 if (!fortran.empty()) {
782 out_ << " = '" << fortran << '\'';
783 }
784 EndLine();
785 ++indent_;
786 }
787 return true;
788 }
789
790 template <typename T> void Post(const T &x) {
791 if (AsFortran<T>(x).empty() && (UnionTrait<T> || WrapperTrait<T>)) {
792 EndLineIfNonempty();
793 } else {
794 --indent_;
795 }
796 }
797
798 // A few types we want to ignore
799
800 bool Pre(const CharBlock &) { return true; }
801 void Post(const CharBlock &) {}
802
803 template <typename T> bool Pre(const Statement<T> &) { return true; }
804 template <typename T> void Post(const Statement<T> &) {}
805 template <typename T> bool Pre(const UnlabeledStatement<T> &) { return true; }
806 template <typename T> void Post(const UnlabeledStatement<T> &) {}
807
808 template <typename T> bool Pre(const common::Indirection<T> &) {
809 return true;
810 }
811 template <typename T> void Post(const common::Indirection<T> &) {}
812
813 template <typename A> bool Pre(const Scalar<A> &) {
814 Prefix("Scalar");
815 return true;
816 }
817 template <typename A> void Post(const Scalar<A> &) { EndLineIfNonempty(); }
818
819 template <typename A> bool Pre(const Constant<A> &) {
820 Prefix("Constant");
821 return true;
822 }
823 template <typename A> void Post(const Constant<A> &) { EndLineIfNonempty(); }
824
825 template <typename A> bool Pre(const Integer<A> &) {
826 Prefix("Integer");
827 return true;
828 }
829 template <typename A> void Post(const Integer<A> &) { EndLineIfNonempty(); }
830
831 template <typename A> bool Pre(const Logical<A> &) {
832 Prefix("Logical");
833 return true;
834 }
835 template <typename A> void Post(const Logical<A> &) { EndLineIfNonempty(); }
836
837 template <typename A> bool Pre(const DefaultChar<A> &) {
838 Prefix("DefaultChar");
839 return true;
840 }
841 template <typename A> void Post(const DefaultChar<A> &) {
842 EndLineIfNonempty();
843 }
844
845 template <typename... A> bool Pre(const std::tuple<A...> &) { return true; }
846 template <typename... A> void Post(const std::tuple<A...> &) {}
847
848 template <typename... A> bool Pre(const std::variant<A...> &) { return true; }
849 template <typename... A> void Post(const std::variant<A...> &) {}
850
851 protected:
852 // Return a Fortran representation of this node to include in the dump
853 template <typename T> std::string AsFortran(const T &x) {
854 std::string buf;
855 llvm::raw_string_ostream ss{buf};
856 if constexpr (std::is_same_v<T, Expr>) {
857 if (asFortran_ && x.typedExpr) {
858 asFortran_->expr(ss, *x.typedExpr);
859 }
860 } else if constexpr (std::is_same_v<T, AssignmentStmt> ||
861 std::is_same_v<T, PointerAssignmentStmt>) {
862 if (asFortran_ && x.typedAssignment) {
863 asFortran_->assignment(ss, *x.typedAssignment);
864 }
865 } else if constexpr (std::is_same_v<T, CallStmt>) {
866 if (asFortran_ && x.typedCall) {
867 asFortran_->call(ss, *x.typedCall);
868 }
869 } else if constexpr (std::is_same_v<T, IntLiteralConstant> ||
870 std::is_same_v<T, SignedIntLiteralConstant>) {
871 ss << std::get<CharBlock>(x.t);
872 } else if constexpr (std::is_same_v<T, RealLiteralConstant::Real>) {
873 ss << x.source;
874 } else if constexpr (std::is_same_v<T, std::string> ||
875 std::is_same_v<T, std::int64_t> || std::is_same_v<T, std::uint64_t>) {
876 ss << x;
877 }
878 if (ss.tell()) {
879 return ss.str();
880 }
881 if constexpr (std::is_same_v<T, Name>) {
882 return x.source.ToString();
883 #ifdef SHOW_ALL_SOURCE_MEMBERS
884 } else if constexpr (HasSource<T>::value) {
885 return x.source.ToString();
886 #endif
887 } else if constexpr (std::is_same_v<T, std::string>) {
888 return x;
889 } else {
890 return "";
891 }
892 }
893
894 void IndentEmptyLine() {
895 if (emptyline_ && indent_ > 0) {
896 for (int i{0}; i < indent_; ++i) {
897 out_ << "| ";
898 }
899 emptyline_ = false;
900 }
901 }
902
903 void Prefix(const char *str) {
904 IndentEmptyLine();
905 out_ << str << " -> ";
906 emptyline_ = false;
907 }
908
909 void Prefix(const std::string &str) {
910 IndentEmptyLine();
911 out_ << str << " -> ";
912 emptyline_ = false;
913 }
914
915 void EndLine() {
916 out_ << '\n';
917 emptyline_ = true;
918 }
919
920 void EndLineIfNonempty() {
921 if (!emptyline_) {
922 EndLine();
923 }
924 }
925
926 private:
927 int indent_{0};
928 llvm::raw_ostream &out_;
929 const AnalyzedObjectsAsFortran *const asFortran_;
930 bool emptyline_{false};
931 };
932
933 template <typename T>
934 llvm::raw_ostream &DumpTree(llvm::raw_ostream &out, const T &x,
935 const AnalyzedObjectsAsFortran *asFortran = nullptr) {
936 ParseTreeDumper dumper{out, asFortran};
937 Walk(x, dumper);
938 return out;
939 }
940
941 } // namespace Fortran::parser
942 #endif // FORTRAN_PARSER_DUMP_PARSE_TREE_H_
Fortran::parser::Suffix
Definition: parse-tree.h:3009
Fortran::parser::InterfaceBlock
Definition: parse-tree.h:3090
Fortran::parser::AcValue
Definition: parse-tree.h:1193
Fortran::parser::ExecutableConstruct
Definition: parse-tree.h:504
Fortran::parser::DoConstruct
Definition: parse-tree.h:2228
Fortran::parser::ComplexPart
Definition: parse-tree.h:797
Fortran::parser::BlockConstruct
Definition: parse-tree.h:2107
Fortran::parser::AllocateObject
Definition: parse-tree.h:1838
Fortran::parser::UseStmt
Definition: parse-tree.h:2959
Fortran::parser::OmpEndSectionsDirective
Definition: parse-tree.h:3512
Fortran::parser::IntrinsicTypeSpec
Definition: parse-tree.h:673
Fortran::parser::PrivateOrSequence
Definition: parse-tree.h:897
Fortran::parser::CriticalStmt
Definition: parse-tree.h:2145
Fortran::parser::Association
Definition: parse-tree.h:2069
Fortran::parser::CoarrayAssociation
Definition: parse-tree.h:2115
Fortran::parser::OmpAtomicRead
Definition: parse-tree.h:3638
Fortran::parser::Statement
Definition: parse-tree.h:344
Fortran::parser::InquireSpec::CharVar
Definition: parse-tree.h:2769
Fortran::parser::InquireSpec::IntVar
Definition: parse-tree.h:2777
Fortran::parser::ConcurrentControl
Definition: parse-tree.h:2163
Fortran::parser::OmpFlushMemoryClause
Definition: parse-tree.h:3718
Fortran::parser::ActionStmt
Definition: parse-tree.h:472
Fortran::parser::OmpBeginLoopDirective
Definition: parse-tree.h:3752
Fortran::parser::EndChangeTeamStmt
Definition: parse-tree.h:2132
Fortran::parser::OmpSectionsDirective
Definition: parse-tree.h:3502
Fortran::parser::OmpDefaultmapClause
Definition: parse-tree.h:3326
Fortran::parser::BindAttr
Definition: parse-tree.h:1063
Fortran::parser::OpenACCStandaloneConstruct
Definition: parse-tree.h:4066
Fortran::parser::OpenMPStandaloneConstruct
Definition: parse-tree.h:3744
Fortran::parser::OmpMapClause
Definition: parse-tree.h:3320
Fortran::parser::AcImpliedDoControl
Definition: parse-tree.h:1239
Fortran::parser::AccCombinedDirective
Definition: parse-tree.h:3825
Fortran::parser::CharSelector
Definition: parse-tree.h:652
Fortran::parser::StructureStmt
Definition: parse-tree.h:3251
Fortran::parser::TypeSpec
Definition: parse-tree.h:716
Fortran::parser::ForallBodyConstruct
Definition: parse-tree.h:2039
Fortran::parser::OpenACCRoutineConstruct
Definition: parse-tree.h:3949
Fortran::parser::InputItem
Definition: parse-tree.h:2627
Fortran::parser::SubmoduleStmt
Definition: parse-tree.h:2881
Fortran::parser::DataStmtRepeat
Definition: parse-tree.h:1426
Fortran::parser::ProcPointerInit
Definition: parse-tree.h:1024
Fortran::parser::OpenACCWaitConstruct
Definition: parse-tree.h:3961
Fortran::parser::StructureDef
Definition: parse-tree.h:3256
Fortran::parser::OpenMPBlockConstruct
Definition: parse-tree.h:3776
Fortran::parser::HollerithLiteralConstant
Definition: parse-tree.h:826
Fortran::parser::AccDeclarativeDirective
Definition: parse-tree.h:3830
Fortran::parser::ConnectSpec
Definition: parse-tree.h:2552
Fortran::parser::ImportStmt
Definition: parse-tree.h:593
Fortran::parser::DataStmtValue
Definition: parse-tree.h:1432
Fortran::parser::LoopBounds
Definition: parse-tree.h:1220
Fortran::parser::ProcComponentDefStmt
Definition: parse-tree.h:1045
Fortran::parser::FunctionReference
Definition: parse-tree.h:3138
Fortran::parser::AllocateCoarraySpec
Definition: parse-tree.h:1858
Fortran::parser::IfStmt
Definition: parse-tree.h:2278
Fortran::parser::DerivedTypeStmt
Definition: parse-tree.h:884
Fortran::parser::OmpDependClause
Definition: parse-tree.h:3434
Fortran::parser::ProcComponentAttrSpec
Definition: parse-tree.h:1017
Fortran::parser::StructureConstructor
Definition: parse-tree.h:1162
Fortran::parser::Integer
Definition: parse-tree.h:297
Fortran::parser::DeclarationTypeSpec
Definition: parse-tree.h:727
Fortran::parser::ConstantValue
Definition: parse-tree.h:861
Fortran::parser::OpenMPThreadprivate
Definition: parse-tree.h:3589
Fortran::parser::OmpAtomic
Definition: parse-tree.h:3672
Fortran::parser::BasedPointer
Definition: parse-tree.h:3219
Fortran::parser::AccAtomicWrite
Definition: parse-tree.h:3995
Fortran::parser::KindSelector
Definition: parse-tree.h:626
Fortran::parser::OpenACCCacheConstruct
Definition: parse-tree.h:3955
Fortran::parser::HasSource
Definition: tools.h:106
Fortran::parser::Initialization
Definition: parse-tree.h:984
Fortran::parser::TypeBoundProcDecl
Definition: parse-tree.h:1071
Fortran::parser::Allocation
Definition: parse-tree.h:1866
Fortran::parser::OmpReductionOperator
Definition: parse-tree.h:3402
Fortran::format::IntrinsicTypeDataEditDesc
Definition: format-specification.h:37
Fortran::parser::BlockData
Definition: parse-tree.h:2906
Fortran::parser::DataIDoObject
Definition: parse-tree.h:1440
Fortran::parser::ComponentArraySpec
Definition: parse-tree.h:953
Fortran::parser::InquireSpec
Definition: parse-tree.h:2767
Fortran::parser::AccLoopDirective
Definition: parse-tree.h:3814
Fortran::parser::Verbatim
Definition: parse-tree.h:270
Fortran::parser::OmpScheduleModifier
Definition: parse-tree.h:3339
Fortran::parser::EntryStmt
Definition: parse-tree.h:3189
Fortran::parser::ArrayElement
Definition: parse-tree.h:1826
Fortran::parser::IntentStmt
Definition: parse-tree.h:1486
Fortran::parser::AccBeginCombinedDirective
Definition: parse-tree.h:4034
Fortran::parser::WhereBodyConstruct
Definition: parse-tree.h:1975
Fortran::parser::AccWaitArgument
Definition: parse-tree.h:3864
Fortran::parser::OpenMPCriticalConstruct
Definition: parse-tree.h:3615
Fortran::parser::AccEndBlockDirective
Definition: parse-tree.h:3979
Fortran::parser::CriticalConstruct
Definition: parse-tree.h:2154
Fortran::parser::OutputItem
Definition: parse-tree.h:2651
Fortran::parser::OpenACCDeclarativeConstruct
Definition: parse-tree.h:4052
Fortran::parser::OpenMPSimpleStandaloneConstruct
Definition: parse-tree.h:3738
Fortran::parser::OpenMPDeclareTargetConstruct
Definition: parse-tree.h:3556
Fortran::parser::ImplicitSpec
Definition: parse-tree.h:1534
Fortran::parser::GenericStmt
Definition: parse-tree.h:2934
Fortran::parser::PrefixSpec
Definition: parse-tree.h:2993
Fortran::parser::DimensionStmt
Definition: parse-tree.h:1477
Fortran::parser::OmpScheduleModifierType
Definition: parse-tree.h:3334
Fortran::parser::OmpReductionClause
Definition: parse-tree.h:3409
Fortran::parser::WhereStmt
Definition: parse-tree.h:1962
Fortran::parser::ForallConstructStmt
Definition: parse-tree.h:2017
Fortran::parser::OmpEndCriticalDirective
Definition: parse-tree.h:3610
Fortran::parser::OmpDeclareTargetWithList
Definition: parse-tree.h:3541
Fortran::parser::IoUnit
Definition: parse-tree.h:2525
Fortran::parser::FormTeamStmt
Definition: parse-tree.h:2486
Fortran::parser::InternalSubprogram
Definition: parse-tree.h:440
Fortran::parser::OpenACCAtomicConstruct
Definition: parse-tree.h:4017
Fortran::parser::SubscriptTriplet
Definition: parse-tree.h:1586
Fortran::parser::InternalSubprogramPart
Definition: parse-tree.h:451
Fortran::parser::SubroutineSubprogram
Definition: parse-tree.h:3165
Fortran::parser::Logical
Definition: parse-tree.h:305
Fortran::parser::OmpCriticalDirective
Definition: parse-tree.h:3604
Fortran::parser::OpenMPLoopConstruct
Definition: parse-tree.h:3782
Fortran::parser::DeallocateStmt
Definition: parse-tree.h:1919
Fortran::parser::OmpDeclareTargetWithClause
Definition: parse-tree.h:3546
Fortran::parser::AccObject
Definition: parse-tree.h:3801
Fortran::parser::OmpDeclareTargetSpecifier
Definition: parse-tree.h:3551
Fortran::parser::GenericSpec
Definition: parse-tree.h:2919
Fortran::parser::OmpCancelType
Definition: parse-tree.h:3693
Fortran::parser::EventWaitStmt
Definition: parse-tree.h:2470
Fortran::parser::InquireSpec::LogVar
Definition: parse-tree.h:2782
Fortran::parser::SelectRankStmt
Definition: parse-tree.h:2341
Fortran::parser::AccClauseList
Definition: parse-tree.h:3944
Fortran::parser::IfThenStmt
Definition: parse-tree.h:2241
Fortran::parser::DerivedTypeSpec
Definition: parse-tree.h:709
Fortran::parser::OmpEndBlockDirective
Definition: parse-tree.h:3770
Fortran::parser::IoControlSpec
Definition: parse-tree.h:2610
Fortran::parser::OpenMPCancelConstruct
Definition: parse-tree.h:3707
Fortran::parser::SyncImagesStmt
Definition: parse-tree.h:2439
Fortran::parser::OmpMapType
Definition: parse-tree.h:3312
Fortran::parser::OmpAtomicCapture
Definition: parse-tree.h:3662
Fortran::parser::CaseValueRange
Definition: parse-tree.h:2295
Fortran::parser::BindEntity
Definition: parse-tree.h:1375
Fortran::parser::BindStmt
Definition: parse-tree.h:1382
Fortran::parser::CaseStmt
Definition: parse-tree.h:2315
Fortran::parser::Substring
Definition: parse-tree.h:1759
Fortran::parser::AccGangArgument
Definition: parse-tree.h:3879
Fortran::parser::OmpClauseList
Definition: parse-tree.h:3495
Fortran::parser::OmpDependSinkVecLength
Definition: parse-tree.h:3415
Fortran::parser::LetterSpec
Definition: parse-tree.h:1528
Fortran::parser::FunctionSubprogram
Definition: parse-tree.h:3155
Fortran::parser::CoindexedNamedObject
Definition: parse-tree.h:1817
Fortran::parser::ImplicitPartStmt
Definition: parse-tree.h:400
Fortran::parser::OmpObject
Definition: parse-tree.h:3304
Fortran::parser::AccReductionOperator
Definition: parse-tree.h:3854
Fortran::parser::AssignStmt
Definition: parse-tree.h:3274
Fortran::parser::IfConstruct
Definition: parse-tree.h:2262
Fortran::parser::ComponentDefStmt
Definition: parse-tree.h:1053
Fortran::parser::OmpLinearClause
Definition: parse-tree.h:3378
Fortran::parser::Variable
Definition: parse-tree.h:1780
Fortran::parser::WaitSpec
Definition: parse-tree.h:2698
Fortran::parser::ComponentDecl
Definition: parse-tree.h:995
Fortran::parser::AcImpliedDo
Definition: parse-tree.h:1246
Fortran::parser::ProcedureStmt
Definition: parse-tree.h:3073
Fortran::parser::NamedConstantDef
Definition: parse-tree.h:1258
Fortran::parser::DefinedOperator
Definition: parse-tree.h:580
Fortran::parser::SubstringRange
Definition: parse-tree.h:1577
Fortran::parser::TypeParamSpec
Definition: parse-tree.h:703
Fortran::parser::Scalar
Definition: parse-tree.h:281
Fortran::parser::AssignedGotoStmt
Definition: parse-tree.h:3279
Fortran::parser::IntentSpec
Definition: parse-tree.h:1299
Fortran::parser::CommonStmt
Definition: parse-tree.h:1558
Fortran::parser::ComputedGotoStmt
Definition: parse-tree.h:2414
Fortran::parser::WhereConstruct
Definition: parse-tree.h:1999
Fortran::parser::KindParam
Definition: parse-tree.h:746
Fortran::parser::OmpAlignedClause
Definition: parse-tree.h:3365
Fortran::parser::OpenMPDeclareReductionConstruct
Definition: parse-tree.h:3572
Fortran::parser::Name
Definition: parse-tree.h:555
Fortran::parser::Selector
Definition: parse-tree.h:2063
Fortran::parser::OmpScheduleClause
Definition: parse-tree.h:3348
Fortran::parser::TypeParamDefStmt
Definition: parse-tree.h:911
Fortran::parser::DummyArg
Definition: parse-tree.h:3034
Fortran::parser::OpenMPConstruct
Definition: parse-tree.h:3791
Fortran::parser::Only
Definition: parse-tree.h:2950
Fortran::parser::OpenACCCombinedConstruct
Definition: parse-tree.h:4044
Fortran::parser::WriteStmt
Definition: parse-tree.h:2657
Fortran::parser::EntityDecl
Definition: parse-tree.h:1332
Fortran::parser::SubroutineStmt
Definition: parse-tree.h:3042
Fortran::parser::AttrSpec
Definition: parse-tree.h:1320
Fortran::parser::TypeAttrSpec
Definition: parse-tree.h:875
Fortran::parser::InputImpliedDo
Definition: parse-tree.h:2683
Fortran::parser::SelectRankConstruct
Definition: parse-tree.h:2362
Fortran::parser::OmpDependenceType
Definition: parse-tree.h:3427
Fortran::parser::IoControlSpec::CharExpr
Definition: parse-tree.h:2612
Fortran::parser::ProgramUnit
Definition: parse-tree.h:541
Fortran::parser::OmpProcBindClause
Definition: parse-tree.h:3289
Fortran::parser::OmpBeginBlockDirective
Definition: parse-tree.h:3764
Fortran::parser::OpenMPDeclarativeConstruct
Definition: parse-tree.h:3595
Fortran::parser::ParseTreeDumper
Definition: dump-parse-tree.h:29
Fortran::parser::StopStmt
Definition: parse-tree.h:2428
Fortran::parser::TypeBoundProcBinding
Definition: parse-tree.h:1118
Fortran::parser::BoundsRemapping
Definition: parse-tree.h:1937
Fortran::parser::LocalitySpec
Definition: parse-tree.h:2182
Fortran::parser::SyncTeamStmt
Definition: parse-tree.h:2452
Fortran::parser::AssumedSizeSpec
Definition: parse-tree.h:1273
Fortran::parser::SignedIntLiteralConstant
Definition: parse-tree.h:752
Fortran::parser::OmpMemoryClause
Definition: parse-tree.h:3628
Fortran::parser::ExplicitShapeSpec
Definition: parse-tree.h:923
Fortran::parser::NamelistStmt
Definition: parse-tree.h:606
Fortran::common::Indirection
Definition: indirection.h:31
Fortran::parser::OmpAtomicWrite
Definition: parse-tree.h:3646
Fortran::parser::SpecificationPart
Definition: parse-tree.h:429
Fortran::parser::OmpBlockDirective
Definition: parse-tree.h:3533
Fortran::parser::OmpClause
Definition: parse-tree.h:3449
Fortran::parser::DataStmtConstant
Definition: parse-tree.h:1411
Fortran::parser::ProcedureDesignator
Definition: parse-tree.h:3105
Fortran::parser::LoopControl
Definition: parse-tree.h:2197
Fortran::parser::PrintStmt
Definition: parse-tree.h:2672
Fortran::parser::OmpAtomicUpdate
Definition: parse-tree.h:3654
Fortran::parser::OmpDefaultClause
Definition: parse-tree.h:3295
Fortran::parser::SelectCaseStmt
Definition: parse-tree.h:2285
Fortran::parser::ArithmeticIfStmt
Definition: parse-tree.h:3269
Fortran::parser::ObjectDecl
Definition: parse-tree.h:1362
Fortran::parser::Module
Definition: parse-tree.h:2850
Fortran::parser::ForallConstruct
Definition: parse-tree.h:2052
Fortran::parser::LiteralConstant
Definition: parse-tree.h:851
Fortran::parser::ChangeTeamConstruct
Definition: parse-tree.h:2138
Fortran::parser::AccBeginBlockDirective
Definition: parse-tree.h:3973
Fortran::parser::EnumDef
Definition: parse-tree.h:1185
Fortran::parser::CompilerDirective
Definition: parse-tree.h:3208
Fortran::parser::Union
Definition: parse-tree.h:3244
Fortran::parser::FunctionStmt
Definition: parse-tree.h:3023
Fortran::parser::OtherSpecificationStmt
Definition: parse-tree.h:360
Fortran::parser::IntLiteralConstant
Definition: parse-tree.h:759
Fortran::parser::MaskedElsewhereStmt
Definition: parse-tree.h:1984
Fortran::parser::Map
Definition: parse-tree.h:3235
Fortran::parser::SeparateModuleSubprogram
Definition: parse-tree.h:3181
Fortran::parser::Constant
Definition: parse-tree.h:289
Fortran::parser::OpenMPCancellationPointConstruct
Definition: parse-tree.h:3700
Fortran::parser::ProcAttrSpec
Definition: parse-tree.h:2973
Fortran::parser::NonLabelDoStmt
Definition: parse-tree.h:2214
Fortran::parser::CaseSelector
Definition: parse-tree.h:2309
Fortran::parser::SelectRankCaseStmt
Definition: parse-tree.h:2350
Fortran::parser::PositionOrFlushSpec
Definition: parse-tree.h:2714
Fortran::parser::Format
Definition: parse-tree.h:2588
Fortran::parser::EventPostStmt
Definition: parse-tree.h:2461
Fortran::parser::SectionSubscript
Definition: parse-tree.h:1595
Fortran::parser::OmpLoopDirective
Definition: parse-tree.h:3687
Fortran::parser::StmtFunctionStmt
Definition: parse-tree.h:3199
Fortran::parser::CharBlock
Definition: char-block.h:28
Fortran::parser::ImageSelectorSpec
Definition: parse-tree.h:1609
Fortran::parser::AssociateStmt
Definition: parse-tree.h:2076
Fortran::parser::DataComponentDefStmt
Definition: parse-tree.h:1006
Fortran::parser::OpenACCConstruct
Definition: parse-tree.h:4072
Fortran::parser::ProcInterface
Definition: parse-tree.h:1031
Fortran::parser::ActualArgSpec
Definition: parse-tree.h:3126
Fortran::parser::LockStmt
Definition: parse-tree.h:2500
Fortran::parser::AccSizeExprList
Definition: parse-tree.h:3875
Fortran::parser::StatOrErrmsg
Definition: parse-tree.h:1882
Fortran::parser::TypeGuardStmt
Definition: parse-tree.h:2385
Fortran::parser::AccessStmt
Definition: parse-tree.h:1353
Fortran::parser::ExplicitCoshapeSpec
Definition: parse-tree.h:936
Fortran::parser::OutputImpliedDo
Definition: parse-tree.h:2688
Fortran::parser::RealLiteralConstant
Definition: parse-tree.h:772
Fortran::parser::OpenACCBlockConstruct
Definition: parse-tree.h:4023
Fortran::parser::ComplexLiteralConstant
Definition: parse-tree.h:805
Fortran::parser::ImplicitStmt
Definition: parse-tree.h:1543
Fortran::parser::ActualArg
Definition: parse-tree.h:3116
Fortran::parser::AccClause
Definition: parse-tree.h:3884
Fortran::parser::AccAtomicCapture
Definition: parse-tree.h:4010
Fortran::parser::AccObjectListWithModifier
Definition: parse-tree.h:3848
Fortran::parser::TypeParamValue
Definition: parse-tree.h:617
Fortran::parser::OmpIfClause
Definition: parse-tree.h:3357
Fortran::parser::DataStmtObject
Definition: parse-tree.h:1460
Fortran::parser::AnalyzedObjectsAsFortran
Definition: unparse.h:37
Fortran::parser::ElseIfStmt
Definition: parse-tree.h:2248
Fortran::parser::SignedRealLiteralConstant
Definition: parse-tree.h:786
Fortran::parser::AllocateShapeSpec
Definition: parse-tree.h:1849
Fortran::parser::LogicalLiteralConstant
Definition: parse-tree.h:833
Fortran::parser::AccDefaultClause
Definition: parse-tree.h:3836
Fortran::parser::ImageSelector
Definition: parse-tree.h:1618
Fortran::parser::ReadStmt
Definition: parse-tree.h:2635
Fortran::parser::Call
Definition: parse-tree.h:3132
Fortran::parser::DataStmtSet
Definition: parse-tree.h:1466
Fortran::parser::ArraySpec
Definition: parse-tree.h:1291
Fortran::parser::AccessId
Definition: parse-tree.h:1347
Fortran::parser::OpenMPSectionsConstruct
Definition: parse-tree.h:3525
Fortran::parser::OmpEndLoopDirective
Definition: parse-tree.h:3758
Fortran::parser::CallStmt
Definition: parse-tree.h:3146
Fortran::parser::CaseConstruct
Definition: parse-tree.h:2327
Fortran::parser::OmpLinearModifier
Definition: parse-tree.h:3371
Fortran::parser::AcSpec
Definition: parse-tree.h:1205
Fortran::parser::MainProgram
Definition: parse-tree.h:2816
Fortran::parser::Submodule
Definition: parse-tree.h:2892
Fortran::parser::TypeParamDecl
Definition: parse-tree.h:903
Fortran::parser::Rename
Definition: parse-tree.h:2861
Fortran::parser::CharLiteralConstant
Definition: parse-tree.h:819
Fortran::parser::ForallAssignmentStmt
Definition: parse-tree.h:2023
Fortran::parser::AllocateStmt
Definition: parse-tree.h:1900
Fortran::parser::CharLength
Definition: parse-tree.h:636
Fortran::parser::ProcDecl
Definition: parse-tree.h:1037
Fortran::parser::CoarraySpec
Definition: parse-tree.h:942
Fortran::parser::AccStandaloneDirective
Definition: parse-tree.h:3819
Fortran::parser::DataRef
Definition: parse-tree.h:1742
Fortran::parser::ComponentAttrSpec
Definition: parse-tree.h:965
Fortran::parser::UnlabeledStatement
Definition: parse-tree.h:339
Fortran::parser::TypeBoundProcedureStmt
Definition: parse-tree.h:1081
Fortran::parser::AccSizeExpr
Definition: parse-tree.h:3869
Fortran::parser::InterfaceStmt
Definition: parse-tree.h:2940
Fortran::parser::LabelDoStmt
Definition: parse-tree.h:2208
Fortran::parser::AccAtomicUpdate
Definition: parse-tree.h:4002
Fortran::parser::InterfaceBody
Definition: parse-tree.h:3055
Fortran::parser::OmpReductionCombiner
Definition: parse-tree.h:3564
Fortran::parser::Expr
Definition: parse-tree.h:1624
Fortran::parser::AccAtomicRead
Definition: parse-tree.h:3988
Fortran::parser::OpenMPFlushConstruct
Definition: parse-tree.h:3725
Fortran::parser::SelectTypeStmt
Definition: parse-tree.h:2376
Fortran::parser::ConcurrentHeader
Definition: parse-tree.h:2172
Fortran::parser::TypeBoundGenericStmt
Definition: parse-tree.h:1105
Fortran::parser::StructureField
Definition: parse-tree.h:3228
Fortran::parser
Definition: check-expression.h:19
Fortran::parser::AssociateConstruct
Definition: parse-tree.h:2085
Fortran::parser::AccBeginLoopDirective
Definition: parse-tree.h:3967
Fortran::parser::WhereConstructStmt
Definition: parse-tree.h:1968
Fortran::parser::OpenMPAtomicConstruct
Definition: parse-tree.h:3679
Fortran::parser::LengthSelector
Definition: parse-tree.h:642
Fortran::parser::CloseStmt
Definition: parse-tree.h:2576
Fortran::parser::CharLiteralConstantSubstring
Definition: parse-tree.h:1764
Fortran::parser::CodimensionDecl
Definition: parse-tree.h:1388
Fortran::parser::SignedComplexLiteralConstant
Definition: parse-tree.h:811
Fortran::parser::OmpSimpleStandaloneDirective
Definition: parse-tree.h:3733
Fortran::format::ControlEditDesc
Definition: format-specification.h:75
Fortran::parser::ExecutionPartConstruct
Definition: parse-tree.h:526
Fortran::parser::ProcComponentRef
Definition: parse-tree.h:1812
Fortran::parser::ModuleSubprogram
Definition: parse-tree.h:2830
Fortran::parser::SelectTypeConstruct
Definition: parse-tree.h:2396
Fortran::parser::ProcedureDeclarationStmt
Definition: parse-tree.h:2983
Fortran::parser::DataImpliedDo
Definition: parse-tree.h:1452
Fortran::parser::UnlockStmt
Definition: parse-tree.h:2510
Fortran::parser::StructureComponent
Definition: parse-tree.h:1802
Fortran::parser::InterfaceSpecification
Definition: parse-tree.h:3080
Fortran::parser::TypeBoundProcedurePart
Definition: parse-tree.h:1127
Fortran::parser::DefaultChar
Definition: parse-tree.h:313
Fortran::parser::OpenMPDeclareSimdConstruct
Definition: parse-tree.h:3582
Fortran::parser::SpecificationConstruct
Definition: parse-tree.h:381
Fortran::parser::Enumerator
Definition: parse-tree.h:1171
Fortran::parser::PointerDecl
Definition: parse-tree.h:1496
Fortran::parser::TypeDeclarationStmt
Definition: parse-tree.h:1341
Fortran::parser::ConnectSpec::CharExpr
Definition: parse-tree.h:2554
Fortran::parser::ComponentSpec
Definition: parse-tree.h:1156
Fortran::parser::AccDataModifier
Definition: parse-tree.h:3842
Fortran::parser::DerivedTypeDef
Definition: parse-tree.h:1141
Fortran::parser::AssignmentStmt
Definition: parse-tree.h:1925
Fortran::parser::PointerObject
Definition: parse-tree.h:1909
Fortran::parser::AccessSpec
Definition: parse-tree.h:867
Fortran::parser::AccEndCombinedDirective
Definition: parse-tree.h:4039
Fortran::parser::OpenACCLoopConstruct
Definition: parse-tree.h:4059
Fortran::parser::ParentIdentifier
Definition: parse-tree.h:2875
Fortran::parser::OmpBeginSectionsDirective
Definition: parse-tree.h:3507
Fortran::parser::ModuleSubprogramPart
Definition: parse-tree.h:2839
Fortran::parser::CommonBlockObject
Definition: parse-tree.h:1550
Fortran::parser::DeclarationConstruct
Definition: parse-tree.h:416
Fortran::parser::ForallStmt
Definition: parse-tree.h:2029
Fortran::parser::SavedEntity
Definition: parse-tree.h:1509
Fortran::parser::AllocOpt
Definition: parse-tree.h:1891
Fortran::parser::OpenACCStandaloneDeclarativeConstruct
Definition: parse-tree.h:4028
Fortran::parser::OmpDependSinkVec
Definition: parse-tree.h:3421
Fortran::parser::ChangeTeamStmt
Definition: parse-tree.h:2123
Fortran::parser::PointerAssignmentStmt
Definition: parse-tree.h:1949
Fortran::parser::InquireStmt
Definition: parse-tree.h:2795
Fortran::parser::Designator
Definition: parse-tree.h:1772
Fortran::parser::AccBlockDirective
Definition: parse-tree.h:3809
Fortran::parser::AccObjectListWithReduction
Definition: parse-tree.h:3859