abjad.base

abjad.parsers.base.Parser([debug])

Abstract base class for Abjad parsers.

class abjad.parsers.base.Parser(debug=False)[source]

Abstract base class for Abjad parsers.

Rules objects for lexing and parsing must be defined by overriding the abstract properties lexer_rules_object and parser_rules_object.

For most parsers these properties should simply return self.

debug()

Is true when parser runs in debugging mode.

lexer()

Gets parser's PLY Lexer instance.

logger()

Gets parser's logger.

logger_path()

Gets parser's logfile output path.

output_path()

Gets output path for files associated with the parser.

parser()

Gets parser's PLY LRParser instance.

pickle_path()

Gets output path for the parser's pickled parsing tables.

tokenize(string)

Tokenizes string and print results.

debug()[source]

Is true when parser runs in debugging mode.

lexer()[source]

Gets parser’s PLY Lexer instance.

logger()[source]

Gets parser’s logger.

logger_path()[source]

Gets parser’s logfile output path.

output_path()[source]

Gets output path for files associated with the parser.

parser()[source]

Gets parser’s PLY LRParser instance.

pickle_path()[source]

Gets output path for the parser’s pickled parsing tables.

tokenize(string)[source]

Tokenizes string and print results.