Command line and input file parsing and grammars for all executables.
This directory contains parsing-related functionality for all executables. It has multiple grammar definitions for
- command line parsers for all executables, in subdirectories
- input file parsers for those executables that take an input file, in subdirectories
Grammar definitions are defined using the Parsing Expression Grammar Template Library (PEGTL) according to Parsing Expression Grammar (PEG). As the PEGTL documentation describes
Grammars are written as regular C++ code, created with template programming (not template meta programming), i.e. nested template instantiations that naturally correspond to the inductive definition of PEGs (and other parser-combinator approaches).
Grammars are thus written purely in C++ and the compiler generates the parsers using PEGTL.
CommonGrammar.h defines the smallest building blocks of all grammars. It contains generic functions that are reused among multiple command line and input file grammars.
The state (or stack) of the grammar is a tagged tuple (tk::
src/Control/<executable>/Types.h declare the types of the components of a grammar's state. The components are usually also tuples to nest multiple levels of hierarchies, to group related information together.
Tags.h defines empty structs that are used as labels during compile time. These labels are used to index into tagged tuples.
Keywords.h defines all keywords accepted by all parsers together with their documentation.
Toggle.h defines a generic switch with multiple states, from which specialized switches derive. Directories
<executable>/Options define specific switches, specializing a tk::
<executable>, e.g., UnitTest.
- directory FileConv/
- Types, command line parsing, and grammar for FileConv
- directory Inciter/
- Types, options, command line parsing, and grammar for Inciter
- directory MeshConv/
- Types, command line parsing, and grammar for MeshConv
- directory Options/
- Options for multiple executables.
- directory RNGTest/
- Types, options, command line parsing, and grammar for RNGTest
- directory UnitTest/
- Types, command line parsing, and grammar for UnitTest
- directory Walker/
- Types, options, command line parsing, and grammar for Walker
- file CommonGrammar.h
- Generic, low-level grammar, re-used by specific grammars.
- file Control.h
- Control base contains generic accessors to tagged tuple elements.
- file FileParser.C
- File parser base class definition.
- file FileParser.h
- File parser base class declaration.
- file HelpFactory.h
- Command-line and input deck help factory.
- file Keyword.h
- Generic definition of a keyword.
- file Keywords.h
- Definition of all keywords.
- file MKLGrammar.h
- Intel MKL-related grammar.
- file Random123Grammar.h
- Random123-related grammar.
- file RNGParam.h
- Types for storing parameters of random number generators.
- file RNGSSEGrammar.h
- RNGSSE-related grammar.
- file StatCtr.h
- Types and associated functions to deal with moments and PDFs.
- file StringParser.C
- String parser base class definition.
- file StringParser.h
- String parser base class declaration.
- file SystemComponents.h
- Operations on numbers of scalar components of systems of equations.
- file Tags.h
- file Toggle.h
- Toggle is the base for an Option, doing generic searches.