HSD-Fortran

User Documentation

  • Installation
    • Requirements
    • Building with CMake
      • Basic Build
      • Debug Build with Coverage
      • CMake Options
      • Using as a CMake Subproject
    • Building with fpm
      • Using as an fpm Dependency
    • Verifying Installation
    • Running the Example
  • Build Systems
    • CMake
    • fpm
  • User Guide
    • Basic Usage
      • Loading HSD Files
      • Accessing Values
      • Default Values
    • Working with Arrays
      • Working with Matrices
    • Type Introspection
    • Working with Attributes (Units)
    • Modifying Trees
    • Saving HSD Files
    • Tree Operations
      • Cloning Trees
      • Merging Trees
    • Iterating Children
      • Validation Helpers
    • Best Practices
    • Example: Complete Configuration Parser
  • HSD Format Reference
    • Basic Syntax
      • Structure
      • Comments
    • Data Types
      • Strings
      • Integers
      • Real Numbers
      • Booleans
      • Arrays
      • Complex Numbers
      • Matrices (Multi-line Data)
    • Advanced Syntax
      • Typed Blocks (Short Form)
      • Attributes (Units)
      • File Includes
        • Include Path Resolution
    • Escaping and Special Characters
      • Quoted Strings
      • Identifier Rules
      • Duplicate Keys
    • Grammar Summary
    • Error Messages
    • Compatibility Notes
      • DFTB+ Compatibility
      • Differences from JSON/YAML
  • From HSD Text to Tree: A Visual Guide
    • Core Concepts at a Glance
    • A Sample Configuration
    • The Resulting Tree
    • How Each Syntax Feature Maps to the Tree
      • Simple assignment (Tag = value)
      • Typed blocks (Tag = Type { ... })
      • Plain blocks (Tag { ... })
      • Attributes (Tag [attr] = value)
      • Multi-line / inline data (#text nodes)
      • Arrays (space or comma separated)
      • Case-insensitive tag names
      • Duplicate keys
      • Semicolons as statement separators
      • File includes
      • Amendments (+Tag { ... })
      • Comments
    • Putting It All Together
    • Accessing the Tree from Fortran
    • Summary Table
  • Error Message Quick Reference
    • Error Type Structure
    • Creating Errors with Context
      • Basic Error
      • Error with Full Context
      • Syntax Error Helper
      • Type Error Helper
    • Error Codes
    • Usage Examples
      • Handling Errors
      • Error Output Format
    • Common Error Scenarios
      • Unclosed Bracket
      • Include Cycle
      • File Not Found
      • Type Mismatch
    • Best Practices
    • Coding Conventions for stat Parameters
      • The Pattern
      • Recommended Approaches
      • Common Mistakes to Avoid
      • Using Local Status Variables
  • Internal HSD Tree Storage
    • Overview
    • The Unified Type: hsd_node_t
    • Table Nodes (node_type = NODE_TYPE_TABLE)
      • Internal storage
      • Growth strategy
      • Child lookup
    • Value Nodes (node_type = NODE_TYPE_VALUE)
      • Type enumeration
      • Scalar vs array storage
      • Parse-on-Demand Behavior
    • The processed Flag
    • Memory Ownership
    • The hsd_node_ptr_t Wrapper

Reference

  • API Reference
    • Module: hsd
    • Types
      • Core Types
        • hsd_node_t
        • hsd_error_t
        • hsd_iterator_t
        • hsd_access_t
      • Precision Constants
      • Node Type Constants
      • Value Type Constants
      • Error Codes
    • I/O Procedures
      • hsd_load
      • hsd_load_string
      • hsd_dump
      • hsd_dump_to_string
    • Accessor Procedures
      • hsd_access_t (Access Object)
      • Legacy Free Functions (hsd_api)
      • hsd_get_inline_text
    • Query Procedures
      • hsd_has_child
      • hsd_is_table
      • hsd_is_value
      • hsd_is_array
      • hsd_child_count
      • hsd_get_keys
      • hsd_get_type
      • hsd_get_attrib
      • hsd_has_attrib
      • hsd_get_child
      • hsd_get_table
      • hsd_get_children
      • hsd_get_child_tables
      • hsd_has_value_children
      • hsd_get_name
    • Mutation Procedures
      • hsd_remove_child
    • Tree Operations
      • hsd_clone
      • hsd_merge
    • Validation Procedures
      • hsd_require
      • hsd_validate_range
      • hsd_validate_one_of
      • hsd_get_with_unit
    • Constructor Functions
      • new_table
      • new_value
HSD-Fortran
  • Search


© Copyright 2026, DFTB+ developers group.

Built with Sphinx using a theme provided by Read the Docs.