buildingmotif.label_parsing.tokens#
Functions
|
Ensure a value is a token or constructs one from a given value. |
Classes
|
A constant token. |
|
A delimiter token. |
|
An identifier token. |
|
A null token. |
|
|
|
A token result. |
- ensure_token(token_or_constructor: Union[Token, Type[Token]], value)[source]#
Ensure a value is a token or constructs one from a given value.
- class Constant(value: URIRef)[source]#
A constant token. Contains a URI, probably some sort of Class
- value: URIRef#
- class TokenResult(value: Optional[str], token: Token, length: int, error: Optional[str] = None, id: Optional[str] = None)[source]#
A token result. Contains a token, the type of the token, the length of the token, and a possible error.
- value: Optional[str]#
- length: int#
- error: Optional[str] = None#
- id: Optional[str] = None#