concepts.dsl.parsers.parser_base.ParserBase#

class ParserBase[source]#

Bases: object

The baseclass for all parsers of domain-specific languages.

Methods

parse_domain_file(path)

Parse a domain from a file.

parse_domain_string(string)

Parse a domain from a string.

parse_expression(string, **kwargs)

Parse an expression from a string.

__init__()#
__new__(**kwargs)#
parse_domain_file(path)[source]#

Parse a domain from a file.

Parameters:

path (str) – the path to the file.

Returns:

the parsed domain.

Return type:

DSLDomainBase

parse_domain_string(string)[source]#

Parse a domain from a string.

Parameters:

string (str) – the string to parse.

Returns:

the parsed domain.

Return type:

DSLDomainBase

parse_expression(string, **kwargs)[source]#

Parse an expression from a string.

Parameters:

string (str) – the string to parse.

Returns:

the parsed expression.

Return type:

Expression