parselglossy.grammars.atoms module#
Atoms.
- parselglossy.grammars.atoms.FALSEY = ['FALSE', 'OFF', 'NO', 'N']#
List of false-like values.
- Type
List[str]
- parselglossy.grammars.atoms.TRUTHY = ['TRUE', 'ON', 'YES', 'Y']#
List of true-like values.
- Type
List[str]
- parselglossy.grammars.atoms.make_list_t(scalars: Union[Any, List[Any]], *, start: str = '[', end: str = ']', delimiter: str = ',', throw_if_empty: bool = True, multiline: bool = True) ParserElement [source]#
Atom for lists.
- Parameters
scalars (Union[Any, List[Any]]) – Scalar parser elements, already combined or as a list. The list will be combined using the ^ operator.
start (str) – Left delimiter for the list. Defaults to ‘[‘.
end (str) – Right delimiter for the list. Defaults to ‘]’.
delimiter (str) – List delimiter. Defaults to ‘,’.
multiline (bool) – Whether the list can span multiple lines. Defaults to True.
Notes
The order of the scalar tokens in the scalars list is important.
- Returns
list
- Return type
Any
- parselglossy.grammars.atoms.unquoted_str_t = W:(A-Z_a-z, 0-9A-Z_a-z)#
An unquoted string starts with alphabetic characters and underscores, followed by alphanumeric characters and underscores.