Lines Matching refs:construct
28 construct<FunctionStmt>(many(prefixSpec), "FUNCTION" >> name,
31 construct<FunctionStmt>(many(prefixSpec), "FUNCTION" >> name / atEndOfStmt,
43 construct<FunctionStmt>(many(prefixSpec), "FUNCTION" >> name,
63 construct<ProgramUnit>(indirect(Parser<Module>{})) ||
64 construct<ProgramUnit>(indirect(subroutineSubprogram)) ||
65 construct<ProgramUnit>(indirect(Parser<Submodule>{})) ||
66 construct<ProgramUnit>(indirect(Parser<BlockData>{})) ||
68 construct<ProgramUnit>(indirect(functionSubprogram)) ||
69 construct<ProgramUnit>(indirect(Parser<MainProgram>{}))};
73 construct<ProgramUnit>(indirect(compilerDirective))};
76 construct<ProgramUnit>(indirect(skipStuffBeforeStatement >>
87 construct<Program>(extension<LanguageFeature::EmptySourceFile>(
95 // R507 declaration-construct ->
96 // specification-construct | data-stmt | format-stmt |
103 // are allowed, and so we have a variant production for declaration-construct
125 TYPE_CONTEXT_PARSER("declaration construct"_en_US,
126 first(construct<DeclarationConstruct>(specificationConstruct),
127 construct<DeclarationConstruct>(statement(indirect(dataStmt))),
128 construct<DeclarationConstruct>(statement(indirect(formatStmt))),
129 construct<DeclarationConstruct>(statement(indirect(entryStmt))),
130 construct<DeclarationConstruct>(
135 recovery(withMessage("expected declaration construct"_err_en_US,
137 construct<DeclarationConstruct>(declErrorRecovery))};
141 // [declaration-construct]...
143 construct<SpecificationPart>(many(openaccDeclarativeConstruct),
149 // R507 variant of declaration-construct for use in limitedSpecificationPart.
158 withMessage("expected declaration construct"_err_en_US,
159 inContext("declaration construct"_en_US,
160 first(construct<DeclarationConstruct>(specificationConstruct),
161 construct<DeclarationConstruct>(statement(indirect(dataStmt))),
163 construct<DeclarationConstruct>(
172 construct<SpecificationPart>(many(openaccDeclarativeConstruct),
178 // R508 specification-construct ->
182 TYPE_CONTEXT_PARSER("specification construct"_en_US,
183 first(construct<SpecificationConstruct>(indirect(Parser<DerivedTypeDef>{})),
184 construct<SpecificationConstruct>(indirect(Parser<EnumDef>{})),
185 construct<SpecificationConstruct>(
187 construct<SpecificationConstruct>(indirect(interfaceBlock)),
188 construct<SpecificationConstruct>(statement(indirect(parameterStmt))),
189 construct<SpecificationConstruct>(
191 construct<SpecificationConstruct>(
193 construct<SpecificationConstruct>(
195 construct<SpecificationConstruct>(
197 construct<SpecificationConstruct>(indirect(Parser<StructureDef>{})),
198 construct<SpecificationConstruct>(
200 construct<SpecificationConstruct>(indirect(openmpDeclarativeConstruct)),
201 construct<SpecificationConstruct>(indirect(compilerDirective))))
211 construct<OtherSpecificationStmt>(indirect(Parser<AccessStmt>{})),
212 construct<OtherSpecificationStmt>(indirect(Parser<AllocatableStmt>{})),
213 construct<OtherSpecificationStmt>(indirect(Parser<AsynchronousStmt>{})),
214 construct<OtherSpecificationStmt>(indirect(Parser<BindStmt>{})),
215 construct<OtherSpecificationStmt>(indirect(Parser<CodimensionStmt>{})),
216 construct<OtherSpecificationStmt>(indirect(Parser<ContiguousStmt>{})),
217 construct<OtherSpecificationStmt>(indirect(Parser<DimensionStmt>{})),
218 construct<OtherSpecificationStmt>(indirect(Parser<ExternalStmt>{})),
219 construct<OtherSpecificationStmt>(indirect(Parser<IntentStmt>{})),
220 construct<OtherSpecificationStmt>(indirect(Parser<IntrinsicStmt>{})),
221 construct<OtherSpecificationStmt>(indirect(Parser<NamelistStmt>{})),
222 construct<OtherSpecificationStmt>(indirect(Parser<OptionalStmt>{})),
223 construct<OtherSpecificationStmt>(indirect(Parser<PointerStmt>{})),
224 construct<OtherSpecificationStmt>(indirect(Parser<ProtectedStmt>{})),
225 construct<OtherSpecificationStmt>(indirect(Parser<SaveStmt>{})),
226 construct<OtherSpecificationStmt>(indirect(Parser<TargetStmt>{})),
227 construct<OtherSpecificationStmt>(indirect(Parser<ValueStmt>{})),
228 construct<OtherSpecificationStmt>(indirect(Parser<VolatileStmt>{})),
229 construct<OtherSpecificationStmt>(indirect(Parser<CommonStmt>{})),
230 construct<OtherSpecificationStmt>(indirect(Parser<EquivalenceStmt>{})),
231 construct<OtherSpecificationStmt>(indirect(Parser<BasedPointerStmt>{})),
232 construct<OtherSpecificationStmt>(indirect(Parser<CUDAAttributesStmt>{}))))
238 construct<MainProgram>(maybe(statement(Parser<ProgramStmt>{})),
245 construct<ProgramStmt>("PROGRAM" >> name /
252 construct<EndProgramStmt>(
260 construct<Module>(statement(Parser<ModuleStmt>{}), limitedSpecificationPart,
266 "MODULE statement"_en_US, construct<ModuleStmt>("MODULE" >> name))
270 construct<EndModuleStmt>(
276 construct<ModuleSubprogramPart>(statement(containsStmt),
282 TYPE_PARSER(construct<ModuleSubprogram>(indirect(functionSubprogram)) ||
283 construct<ModuleSubprogram>(indirect(subroutineSubprogram)) ||
284 construct<ModuleSubprogram>(indirect(Parser<SeparateModuleSubprogram>{})) ||
285 construct<ModuleSubprogram>(indirect(compilerDirective)))
298 TYPE_PARSER(construct<UseStmt>("USE" >> optionalBeforeColons(moduleNature),
300 construct<UseStmt>("USE" >> optionalBeforeColons(moduleNature), name,
309 TYPE_PARSER(construct<Rename>("OPERATOR (" >>
310 construct<Rename::Operators>(
312 construct<Rename>(construct<Rename::Names>(name, "=>" >> name)))
317 TYPE_PARSER(construct<Only>(Parser<Rename>{}) ||
318 construct<Only>(indirect(genericSpec)) || construct<Only>(name))
324 construct<Submodule>(statement(Parser<SubmoduleStmt>{}),
330 construct<SubmoduleStmt>(
334 TYPE_PARSER(construct<ParentIdentifier>(name, maybe(":" >> name)))
338 construct<EndSubmoduleStmt>(
344 construct<BlockData>(statement(Parser<BlockDataStmt>{}),
350 construct<BlockDataStmt>("BLOCK DATA" >> maybe(name)))
354 construct<EndBlockDataStmt>(
360 TYPE_PARSER(construct<InterfaceBlock>(statement(Parser<InterfaceStmt>{}),
365 TYPE_PARSER(construct<InterfaceSpecification>(Parser<InterfaceBody>{}) ||
366 construct<InterfaceSpecification>(statement(Parser<ProcedureStmt>{})))
369 TYPE_PARSER(construct<InterfaceStmt>("INTERFACE" >> maybe(genericSpec)) ||
370 construct<InterfaceStmt>(construct<Abstract>("ABSTRACT INTERFACE"_sptok)))
374 construct<EndInterfaceStmt>(recovery("END INTERFACE" >> maybe(genericSpec),
381 construct<InterfaceBody>(
382 construct<InterfaceBody::Function>(statement(functionStmt),
384 construct<InterfaceBody>(construct<InterfaceBody::Subroutine>(
393 TYPE_PARSER(construct<ProcedureStmt>("MODULE PROCEDURE"_sptok >>
396 construct<ProcedureStmt>(
406 TYPE_PARSER(sourced(first(construct<GenericSpec>("OPERATOR" >>
408 construct<GenericSpec>(
409 construct<GenericSpec::Assignment>("ASSIGNMENT ( = )"_tok)),
410 construct<GenericSpec>(
411 construct<GenericSpec::ReadFormatted>("READ ( FORMATTED )"_tok)),
412 construct<GenericSpec>(
413 construct<GenericSpec::ReadUnformatted>("READ ( UNFORMATTED )"_tok)),
414 construct<GenericSpec>(
415 construct<GenericSpec::WriteFormatted>("WRITE ( FORMATTED )"_tok)),
416 construct<GenericSpec>(
417 construct<GenericSpec::WriteUnformatted>("WRITE ( UNFORMATTED )"_tok)),
418 construct<GenericSpec>(name))))
422 TYPE_PARSER(construct<GenericStmt>("GENERIC" >> maybe("," >> accessSpec),
427 "EXTERNAL" >> maybe("::"_tok) >> construct<ExternalStmt>(listOfNames))
433 construct<ProcedureDeclarationStmt>(parenthesized(maybe(procInterface)),
443 construct<ProcInterface>(declarationTypeSpec / lookAhead(")"_tok)) ||
444 construct<ProcInterface>(name))
449 TYPE_PARSER(construct<ProcAttrSpec>(accessSpec) ||
450 construct<ProcAttrSpec>(languageBindingSpec) ||
451 construct<ProcAttrSpec>("INTENT" >> parenthesized(intentSpec)) ||
452 construct<ProcAttrSpec>(optional) || construct<ProcAttrSpec>(pointer) ||
453 construct<ProcAttrSpec>(protectedAttr) || construct<ProcAttrSpec>(save))
456 TYPE_PARSER(construct<ProcDecl>(name, maybe("=>" >> Parser<ProcPointerInit>{})))
461 construct<ProcPointerInit>(nullInit) || construct<ProcPointerInit>(name))
465 "INTRINSIC" >> maybe("::"_tok) >> construct<IntrinsicStmt>(listOfNames))
470 sourced(construct<FunctionReference>(
471 construct<Call>(Parser<ProcedureDesignator>{},
480 construct<CallStmt::StarOrExpr>("*" >> pure<std::optional<ScalarExpr>>() ||
483 "<<<" >> construct<CallStmt::Chevrons>(starOrExpr, ", " >> scalarExpr,
488 construct<CallStmt>(
489 sourced(construct<CallStmt>("CALL" >> Parser<ProcedureDesignator>{},
496 TYPE_PARSER(construct<ProcedureDesignator>(Parser<ProcComponentRef>{}) ||
497 construct<ProcedureDesignator>(name))
500 TYPE_PARSER(construct<ActualArgSpec>(
511 TYPE_PARSER(construct<ActualArg>(expr) ||
512 construct<ActualArg>(Parser<AltReturnSpec>{}) ||
515 construct<ActualArg>(
516 construct<ActualArg::PercentRef>("%REF" >> parenthesized(expr)))) ||
519 construct<ActualArg>(
520 construct<ActualArg::PercentVal>("%VAL" >> parenthesized(expr)))))
523 TYPE_PARSER(construct<AltReturnSpec>(star >> label))
534 TYPE_PARSER(first(construct<PrefixSpec>(declarationTypeSpec),
535 construct<PrefixSpec>(construct<PrefixSpec::Elemental>("ELEMENTAL"_tok)),
536 construct<PrefixSpec>(construct<PrefixSpec::Impure>("IMPURE"_tok)),
537 construct<PrefixSpec>(construct<PrefixSpec::Module>("MODULE"_tok)),
538 construct<PrefixSpec>(
539 construct<PrefixSpec::Non_Recursive>("NON_RECURSIVE"_tok)),
540 construct<PrefixSpec>(construct<PrefixSpec::Pure>("PURE"_tok)),
541 construct<PrefixSpec>(construct<PrefixSpec::Recursive>("RECURSIVE"_tok)),
543 construct<PrefixSpec>(construct<PrefixSpec::Attributes>("ATTRIBUTES" >>
546 extension<LanguageFeature::CUDA>(construct<PrefixSpec>(
547 construct<PrefixSpec::Launch_Bounds>("LAUNCH_BOUNDS" >>
550 extension<LanguageFeature::CUDA>(construct<PrefixSpec>(
551 construct<PrefixSpec::Cluster_Dims>("CLUSTER_DIMS" >>
559 construct<FunctionSubprogram>(statement(functionStmt), specificationPart,
566 TYPE_PARSER(construct<Suffix>(
568 construct<Suffix>(
572 TYPE_PARSER(construct<EndFunctionStmt>(
580 construct<SubroutineSubprogram>(statement(subroutineStmt),
588 (construct<SubroutineStmt>(many(prefixSpec), "SUBROUTINE" >> name,
591 construct<SubroutineStmt>(many(prefixSpec), "SUBROUTINE" >> name,
597 TYPE_PARSER(construct<DummyArg>(name) || construct<DummyArg>(star))
600 TYPE_PARSER(construct<EndSubroutineStmt>(
608 construct<SeparateModuleSubprogram>(statement(Parser<MpSubprogramStmt>{}),
614 construct<MpSubprogramStmt>("MODULE PROCEDURE"_sptok >> name))
618 construct<EndMpSubprogramStmt>(
624 "ENTRY" >> (construct<EntryStmt>(name,
626 construct<EntryStmt>(name, construct<std::list<DummyArg>>(),
627 construct<std::optional<Suffix>>())))
631 construct<ReturnStmt>("RETURN" >> maybe(scalarIntExpr)))
634 TYPE_PARSER(construct<ContainsStmt>("CONTAINS"_tok))
639 construct<StmtFunctionStmt>(