|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Parser for LHA / FLHA-style files into LhaBlock structures and DBNode trees. More...
#include <string>#include <map>#include <memory>#include <filesystem>#include <climits>#include <regex>#include <fstream>#include <sstream>#include <vector>#include <algorithm>#include <unordered_set>#include <iomanip>#include "Include.h"#include "LhaBlockPrototype.h"#include "IParser.h"#include "lha_blocks.h"#include "lha_elements.h"#include "Logger.h"#include "DBNode.h"

Go to the source code of this file.
Classes | |
| struct | Token |
| Single lexical token produced from an LHA file. More... | |
| class | LhaParser |
| Parser for LHA/FLHA files, producing blocks and a DBNode representation. More... | |
Enumerations | |
| enum class | TokenType { FLOAT , INTEGER , BLOCK , DECAY , NEWLINE , SKIP , COMMENT , WORD , OTHER } |
| Token categories used during LHA lexical analysis. More... | |
Functions | |
| const std::regex | analyzer_rx (R"x(((?:[+-])?(?:\d+\.\d*|\.\d+)(?:[eEdD][+-]\d+)?|(\d+(?:[eEdD][+-]\d+)?))|(?:[+-]?\d+(?!\.))|(block)|(decay)|(\n)|([ \t]+)|(#.*)|([\w\=\.]+)|([^#]*))x", std::regex_constants::icase) |
Parser for LHA / FLHA-style files into LhaBlock structures and DBNode trees.
LhaParser decodes a textual LHA (or FLHA) file into:
It uses:
Definition in file LhaParser.h.
|
strong |
Token categories used during LHA lexical analysis.
The order of the enum values is tightly coupled to the capturing groups of the regular expression analyzer_rx. Changing one requires updating the other accordingly.
| Enumerator | |
|---|---|
| FLOAT | Floating point number. |
| INTEGER | Integer number. |
| BLOCK | Block keyword. |
| DECAY | Decay keyword. |
| NEWLINE | Newline character. |
| SKIP | Whitespace character. |
| COMMENT | Comment line. |
| WORD | Word token. |
| OTHER | Other types of tokens. |
Definition at line 47 of file LhaParser.h.
| const std::regex analyzer_rx | ( | R"x(((?:[+-])?(?:\d+\.\d*|\.\d+)(?:[eEdD][+-]\d+)?|(\d+(?:[eEdD][+-]\d+)?))|(?:[+-]?\d+(?!\.))|(block)|(decay)|(\n)|([ \t]+)|(#.*)|([\w\=\.]+)|([^#]*))x" | , |
| std::regex_constants::icase | |||
| ) |