1 //===-- runtime/namelist.h --------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // Defines the data structure used for NAMELIST I/O
11 #ifndef FORTRAN_RUNTIME_NAMELIST_H_
12 #define FORTRAN_RUNTIME_NAMELIST_H_
16 namespace Fortran::runtime
{
18 class IoStatementState
;
19 } // namespace Fortran::runtime
21 namespace Fortran::runtime::io
{
23 // A NAMELIST group is a named ordered collection of distinct variable names.
24 // It is packaged by lowering into an instance of this class.
25 // If all the items are variables with fixed addresses, the NAMELIST group
26 // description can be in a read-only section.
30 const char *name
; // NUL-terminated lower-case
31 const Descriptor
&descriptor
;
33 const char *groupName
; // NUL-terminated lower-case
35 const Item
*item
; // in original declaration order
38 // Look ahead on input for an identifier followed by a '=', '(', or '%'
39 // character; for use in disambiguating a name-like value (e.g. F or T) from a
40 // NAMELIST group item name. Always false when not reading a NAMELIST.
41 bool IsNamelistName(IoStatementState
&);
43 } // namespace Fortran::runtime::io
44 #endif // FORTRAN_RUNTIME_NAMELIST_H_