Parsing Individual Values¶
In a config file there are several places where individual values are parsed.
To convert values from the input strings to an appropriate Python type and to restrict the allowed values, the ValueParser class is used.
- class yosys_mau.config_parser.IntValue(min=None, max=None)¶
Bases:
ValueParser[int]A parser for an integer value.
- class yosys_mau.config_parser.StrValue(allow_empty=False)¶
Bases:
ValueParser[str]A parser for a string value.
- Parameters:
allow_empty (bool)
- class yosys_mau.config_parser.BoolValue¶
Bases:
ValueParser[bool]A parser for a boolean value using
"on"and"off"forTrueandFalse.
- class yosys_mau.config_parser.EnumValue(*values)¶
Bases:
ValueParser[str]A parser for a fixed set of values.
- Parameters:
values (str) – The allowed values.