base¶
Classes
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
andparser_rules_object
.For most parsers these properties should simply return
self
.Attributes Summary
Parse
string
and return result.Is true when parser runs in debugging mode.
Gets parser's PLY Lexer instance.
Gets parser's logger.
Gets parser's logfile output path.
Gets output path for files associated with the parser.
Gets parser's PLY LRParser instance.
Gets output path for the parser's pickled parsing tables.
Tokenize
string
and print results.Special methods
Methods
Read-only properties
- 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.