Lines Matching refs:construct

23 // a do-construct that begins with an old-style label-do-stmt to be a
29 // R514 executable-construct ->
30 // action-stmt | associate-construct | block-construct |
31 // case-construct | change-team-construct | critical-construct |
32 // do-construct | if-construct | select-rank-construct |
33 // select-type-construct | where-construct | forall-construct |
34 // (CUDA) CUF-kernel-do-construct
36 construct<ExecutableConstruct>(CapturedLabelDoStmt{}),
37 construct<ExecutableConstruct>(EndDoStmtForCapturedLabelDoStmt{}),
38 construct<ExecutableConstruct>(indirect(Parser<DoConstruct>{})),
41 construct<ExecutableConstruct>(statement(actionStmt)),
42 construct<ExecutableConstruct>(indirect(Parser<AssociateConstruct>{})),
43 construct<ExecutableConstruct>(indirect(Parser<BlockConstruct>{})),
44 construct<ExecutableConstruct>(indirect(Parser<CaseConstruct>{})),
45 construct<ExecutableConstruct>(indirect(Parser<ChangeTeamConstruct>{})),
46 construct<ExecutableConstruct>(indirect(Parser<CriticalConstruct>{})),
47 construct<ExecutableConstruct>(indirect(Parser<IfConstruct>{})),
48 construct<ExecutableConstruct>(indirect(Parser<SelectRankConstruct>{})),
49 construct<ExecutableConstruct>(indirect(Parser<SelectTypeConstruct>{})),
50 construct<ExecutableConstruct>(indirect(whereConstruct)),
51 construct<ExecutableConstruct>(indirect(forallConstruct)),
52 construct<ExecutableConstruct>(indirect(ompEndLoopDirective)),
53 construct<ExecutableConstruct>(indirect(openmpConstruct)),
54 construct<ExecutableConstruct>(indirect(Parser<OpenACCConstruct>{})),
55 construct<ExecutableConstruct>(indirect(compilerDirective)),
56 construct<ExecutableConstruct>(indirect(Parser<CUFKernelDoConstruct>{})))};
58 // R510 execution-part-construct ->
59 // executable-construct | format-stmt | entry-stmt | data-stmt
64 construct<ExecutionPartConstruct>(construct<ErrorRecovery>(ok /
69 CONTEXT_PARSER("execution part construct"_en_US,
70 first(construct<ExecutionPartConstruct>(executableConstruct),
71 construct<ExecutionPartConstruct>(statement(indirect(formatStmt))),
72 construct<ExecutionPartConstruct>(statement(indirect(entryStmt))),
73 construct<ExecutionPartConstruct>(statement(indirect(dataStmt))),
76 construct<ExecutionPartConstruct>(
82 construct<ExecutionPartConstruct>(executionPartErrorRecovery)))
84 // R509 execution-part -> executable-construct [execution-part-construct]...
86 construct<ExecutionPart>(many(executionPartConstruct)))
100 TYPE_PARSER(first(construct<ActionStmt>(indirect(Parser<AllocateStmt>{})),
101 construct<ActionStmt>(indirect(assignmentStmt)),
102 construct<ActionStmt>(indirect(pointerAssignmentStmt)),
103 construct<ActionStmt>(indirect(Parser<BackspaceStmt>{})),
104 construct<ActionStmt>(indirect(Parser<CallStmt>{})),
105 construct<ActionStmt>(indirect(Parser<CloseStmt>{})),
106 construct<ActionStmt>(construct<ContinueStmt>("CONTINUE"_tok)),
107 construct<ActionStmt>(indirect(Parser<CycleStmt>{})),
108 construct<ActionStmt>(indirect(Parser<DeallocateStmt>{})),
109 construct<ActionStmt>(indirect(Parser<EndfileStmt>{})),
110 construct<ActionStmt>(indirect(Parser<EventPostStmt>{})),
111 construct<ActionStmt>(indirect(Parser<EventWaitStmt>{})),
112 construct<ActionStmt>(indirect(Parser<ExitStmt>{})),
113 construct<ActionStmt>(construct<FailImageStmt>("FAIL IMAGE"_sptok)),
114 construct<ActionStmt>(indirect(Parser<FlushStmt>{})),
115 construct<ActionStmt>(indirect(Parser<FormTeamStmt>{})),
116 construct<ActionStmt>(indirect(Parser<GotoStmt>{})),
117 construct<ActionStmt>(indirect(Parser<IfStmt>{})),
118 construct<ActionStmt>(indirect(Parser<InquireStmt>{})),
119 construct<ActionStmt>(indirect(Parser<LockStmt>{})),
120 construct<ActionStmt>(indirect(Parser<NotifyWaitStmt>{})),
121 construct<ActionStmt>(indirect(Parser<NullifyStmt>{})),
122 construct<ActionStmt>(indirect(Parser<OpenStmt>{})),
123 construct<ActionStmt>(indirect(Parser<PrintStmt>{})),
124 construct<ActionStmt>(indirect(Parser<ReadStmt>{})),
125 construct<ActionStmt>(indirect(Parser<ReturnStmt>{})),
126 construct<ActionStmt>(indirect(Parser<RewindStmt>{})),
127 construct<ActionStmt>(indirect(Parser<StopStmt>{})), // & error-stop-stmt
128 construct<ActionStmt>(indirect(Parser<SyncAllStmt>{})),
129 construct<ActionStmt>(indirect(Parser<SyncImagesStmt>{})),
130 construct<ActionStmt>(indirect(Parser<SyncMemoryStmt>{})),
131 construct<ActionStmt>(indirect(Parser<SyncTeamStmt>{})),
132 construct<ActionStmt>(indirect(Parser<UnlockStmt>{})),
133 construct<ActionStmt>(indirect(Parser<WaitStmt>{})),
134 construct<ActionStmt>(indirect(whereStmt)),
135 construct<ActionStmt>(indirect(Parser<WriteStmt>{})),
136 construct<ActionStmt>(indirect(Parser<ComputedGotoStmt>{})),
137 construct<ActionStmt>(indirect(forallStmt)),
138 construct<ActionStmt>(indirect(Parser<ArithmeticIfStmt>{})),
139 construct<ActionStmt>(indirect(Parser<AssignStmt>{})),
140 construct<ActionStmt>(indirect(Parser<AssignedGotoStmt>{})),
141 construct<ActionStmt>(indirect(Parser<PauseStmt>{}))))
143 // R1102 associate-construct -> associate-stmt block end-associate-stmt
144 TYPE_CONTEXT_PARSER("ASSOCIATE construct"_en_US,
145 construct<AssociateConstruct>(statement(Parser<AssociateStmt>{}), block,
149 // [associate-construct-name :] ASSOCIATE ( association-list )
151 construct<AssociateStmt>(maybe(name / ":"),
155 TYPE_PARSER(construct<Association>(name, "=>" >> selector))
158 TYPE_PARSER(construct<Selector>(variable) / lookAhead(","_tok || ")"_tok) ||
159 construct<Selector>(expr))
161 // R1106 end-associate-stmt -> END ASSOCIATE [associate-construct-name]
162 TYPE_PARSER(construct<EndAssociateStmt>(recovery(
165 // R1107 block-construct ->
167 TYPE_CONTEXT_PARSER("BLOCK construct"_en_US,
168 construct<BlockConstruct>(statement(Parser<BlockStmt>{}),
172 // R1108 block-stmt -> [block-construct-name :] BLOCK
173 TYPE_PARSER(construct<BlockStmt>(maybe(name / ":") / "BLOCK"))
177 // [[declaration-construct]... specification-construct]
182 // trailing FORMAT and DATA statements after the last specification-construct
183 // to be recognized as part of the block-construct's block part rather than
185 TYPE_PARSER(construct<BlockSpecificationPart>(specificationPart))
187 // R1110 end-block-stmt -> END BLOCK [block-construct-name]
188 TYPE_PARSER(construct<EndBlockStmt>(
191 // R1111 change-team-construct -> change-team-stmt block end-change-team-stmt
192 TYPE_CONTEXT_PARSER("CHANGE TEAM construct"_en_US,
193 construct<ChangeTeamConstruct>(statement(Parser<ChangeTeamStmt>{}), block,
197 // [team-construct-name :] CHANGE TEAM
200 construct<ChangeTeamStmt>(maybe(name / ":"),
208 construct<CoarrayAssociation>(Parser<CodimensionDecl>{}, "=>" >> selector))
211 // END TEAM [( [sync-stat-list] )] [team-construct-name]
213 construct<EndChangeTeamStmt>(
218 // [critical-construct-name :] CRITICAL [( [sync-stat-list] )]
220 construct<CriticalStmt>(maybe(name / ":"),
223 // R1116 critical-construct -> critical-stmt block end-critical-stmt
224 TYPE_CONTEXT_PARSER("CRITICAL construct"_en_US,
225 construct<CriticalConstruct>(statement(Parser<CriticalStmt>{}), block,
228 // R1118 end-critical-stmt -> END CRITICAL [critical-construct-name]
229 TYPE_PARSER(construct<EndCriticalStmt>(recovery(
232 // R1119 do-construct -> do-stmt block end-do
234 TYPE_CONTEXT_PARSER("DO construct"_en_US,
235 construct<DoConstruct>(
242 TYPE_PARSER(parenthesized(construct<ConcurrentHeader>(
250 TYPE_PARSER(construct<ConcurrentControl>(name / "=", scalarIntExpr / ":",
257 TYPE_PARSER(construct<LocalitySpec>(construct<LocalitySpec::Local>(
259 construct<LocalitySpec>(construct<LocalitySpec::LocalInit>(
261 construct<LocalitySpec>(construct<LocalitySpec::Reduce>(
264 construct<LocalitySpec>(construct<LocalitySpec::Shared>(
266 construct<LocalitySpec>(
267 construct<LocalitySpec::DefaultNone>("DEFAULT ( NONE )"_tok)))
277 (construct<LoopControl>(loopBounds(scalarExpr)) ||
278 construct<LoopControl>(
280 construct<LoopControl>(construct<LoopControl::Concurrent>(
289 construct<std::optional<LoopControl>>(Parser<LoopControl>{}) ||
290 lookAhead(";\n"_ch) >> construct<std::optional<LoopControl>>()};
292 // R1121 label-do-stmt -> [do-construct-name :] DO label [loop-control]
293 // A label-do-stmt with a do-construct-name is parsed as a nonlabel-do-stmt
296 construct<LabelDoStmt>("DO" >> label, loopControlOrEndOfStmt))
298 // R1122 nonlabel-do-stmt -> [do-construct-name :] DO [loop-control]
300 construct<NonLabelDoStmt>(
302 construct<NonLabelDoStmt>(construct<std::optional<Name>>(),
303 construct<std::optional<Label>>(), "DO" >> loopControlOrEndOfStmt))
305 // R1132 end-do-stmt -> END DO [do-construct-name]
307 construct<EndDoStmt>(
310 // R1133 cycle-stmt -> CYCLE [do-construct-name]
312 "CYCLE statement"_en_US, construct<CycleStmt>("CYCLE" >> maybe(name)))
314 // R1134 if-construct ->
317 // R1135 if-then-stmt -> [if-construct-name :] IF ( scalar-logical-expr )
319 // ELSE IF ( scalar-logical-expr ) THEN [if-construct-name]
320 // R1137 else-stmt -> ELSE [if-construct-name]
321 // R1138 end-if-stmt -> END IF [if-construct-name]
322 TYPE_CONTEXT_PARSER("IF construct"_en_US,
323 construct<IfConstruct>(
324 statement(construct<IfThenStmt>(maybe(name / ":"),
328 many(construct<IfConstruct::ElseIfBlock>(
329 unambiguousStatement(construct<ElseIfStmt>(
333 maybe(construct<IfConstruct::ElseBlock>(
334 statement(construct<ElseStmt>("ELSE" >> maybe(name))), block)),
335 statement(construct<EndIfStmt>(recovery(
340 construct<IfStmt>("IF" >> parenthesized(scalarLogicalExpr),
343 // R1140 case-construct ->
345 TYPE_CONTEXT_PARSER("SELECT CASE construct"_en_US,
346 construct<CaseConstruct>(statement(Parser<SelectCaseStmt>{}),
347 many(construct<CaseConstruct::Case>(
351 // R1141 select-case-stmt -> [case-construct-name :] SELECT CASE ( case-expr
354 construct<SelectCaseStmt>(
357 // R1142 case-stmt -> CASE case-selector [case-construct-name]
359 construct<CaseStmt>("CASE" >> Parser<CaseSelector>{}, maybe(name)))
361 // R1143 end-select-stmt -> END SELECT [case-construct-name]
362 // R1151 end-select-rank-stmt -> END SELECT [select-construct-name]
363 // R1155 end-select-type-stmt -> END SELECT [select-construct-name]
364 TYPE_PARSER(construct<EndSelectStmt>(
368 constexpr auto defaultKeyword{construct<Default>("DEFAULT"_tok)};
369 TYPE_PARSER(parenthesized(construct<CaseSelector>(
371 construct<CaseSelector>(defaultKeyword))
378 TYPE_PARSER(construct<CaseValueRange>(construct<CaseValueRange::Range>(
379 construct<std::optional<CaseValue>>(caseValue),
381 construct<CaseValueRange>(
382 construct<CaseValueRange::Range>(construct<std::optional<CaseValue>>(),
383 ":" >> construct<std::optional<CaseValue>>(caseValue))) ||
384 construct<CaseValueRange>(caseValue))
386 // R1148 select-rank-construct ->
389 TYPE_CONTEXT_PARSER("SELECT RANK construct"_en_US,
390 construct<SelectRankConstruct>(statement(Parser<SelectRankStmt>{}),
391 many(construct<SelectRankConstruct::RankCase>(
396 // [select-construct-name :] SELECT RANK
399 construct<SelectRankStmt>(maybe(name / ":"),
403 // RANK ( scalar-int-constant-expr ) [select-construct-name] |
404 // RANK ( * ) [select-construct-name] |
405 // RANK DEFAULT [select-construct-name]
407 "RANK" >> (construct<SelectRankCaseStmt>(
408 parenthesized(construct<SelectRankCaseStmt::Rank>(
410 construct<SelectRankCaseStmt::Rank>(star)) ||
411 construct<SelectRankCaseStmt::Rank>(defaultKeyword),
414 // R1152 select-type-construct ->
416 TYPE_CONTEXT_PARSER("SELECT TYPE construct"_en_US,
417 construct<SelectTypeConstruct>(statement(Parser<SelectTypeStmt>{}),
418 many(construct<SelectTypeConstruct::TypeCase>(
423 // [select-construct-name :] SELECT TYPE
426 construct<SelectTypeStmt>(maybe(name / ":"),
430 // TYPE IS ( type-spec ) [select-construct-name] |
431 // CLASS IS ( derived-type-spec ) [select-construct-name] |
432 // CLASS DEFAULT [select-construct-name]
434 construct<TypeGuardStmt>("TYPE IS"_sptok >>
435 parenthesized(construct<TypeGuardStmt::Guard>(typeSpec)) ||
436 "CLASS IS"_sptok >> parenthesized(construct<TypeGuardStmt::Guard>(
438 construct<TypeGuardStmt::Guard>("CLASS" >> defaultKeyword),
441 // R1156 exit-stmt -> EXIT [construct-name]
443 "EXIT statement"_en_US, construct<ExitStmt>("EXIT" >> maybe(name)))
447 "GOTO statement"_en_US, construct<GotoStmt>("GO TO" >> label))
451 construct<ComputedGotoStmt>("GO TO" >> parenthesized(nonemptyList(label)),
458 construct<StopStmt>("STOP" >> pure(StopStmt::Kind::Stop) ||
465 TYPE_PARSER(construct<StopCode>(scalar(expr)))
470 construct<NotifyWaitStmt>(
476 construct<SyncAllStmt>("SYNC ALL"_sptok >>
482 "SYNC IMAGES"_sptok >> parenthesized(construct<SyncImagesStmt>(
483 construct<SyncImagesStmt::ImageSet>(intExpr) ||
484 construct<SyncImagesStmt::ImageSet>(star),
489 construct<SyncMemoryStmt>("SYNC MEMORY"_sptok >>
494 construct<SyncTeamStmt>("SYNC TEAM"_sptok >> "("_tok >> teamValue,
500 construct<EventPostStmt>("EVENT POST"_sptok >> "("_tok >> scalar(variable),
506 construct<EventWaitStmt>("EVENT WAIT"_sptok >> "("_tok >> scalar(variable),
513 TYPE_PARSER(construct<EventWaitSpec>(untilSpec) ||
514 construct<EventWaitSpec>(statOrErrmsg))
523 construct<FormTeamStmt>("FORM TEAM"_sptok >> "("_tok >> scalarIntExpr,
530 construct<FormTeamStmt::FormTeamSpec>("NEW_INDEX =" >> scalarIntExpr) ||
531 construct<FormTeamStmt::FormTeamSpec>(statOrErrmsg))
538 construct<LockStmt>("LOCK (" >> lockVariable,
543 construct<LockStmt::LockStat>("ACQUIRED_LOCK =" >> scalarLogicalVariable) ||
544 construct<LockStmt::LockStat>(statOrErrmsg))
548 construct<UnlockStmt>("UNLOCK (" >> lockVariable,
551 // CUF-kernel-do-construct ->
555 // do-construct
563 constexpr auto starOrExpr{construct<CUFKernelDoConstruct::StarOrExpr>(
570 parenthesized(construct<CUFReduction>(Parser<CUFReduction::Operator>{},
574 construct<CUFKernelDoConstruct::LaunchConfiguration>(gridOrBlock,
579 construct<CUFKernelDoConstruct::Directive>(
583 TYPE_CONTEXT_PARSER("!$CUF KERNEL DO construct"_en_US,
584 extension<LanguageFeature::CUDA>(construct<CUFKernelDoConstruct>(