-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete the manual and clean the code for v.1.0.7
- A first version of RtD manual done - Improved comments for create almost all the manual with autodoc - Remove abandoned internal helper functions
- Loading branch information
Showing
6 changed files
with
102 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,62 @@ | ||
Pratt's parser API | ||
================== | ||
|
||
The TDOP (Top Down Operator Precedence) parser implemented within this library is variant of the original | ||
Pratt's parser based on a class for the parser and metaclasses for tokens. | ||
The TDOP (Top Down Operator Precedence) parser implemented within this library is a variant of the | ||
original Pratt's parser based on a class for the parser and metaclasses for tokens. | ||
|
||
The parser base class includes helper functions for registering token classes, | ||
the Pratt's methods and a regexp-based tokenizer builder. There are also additional | ||
methods and attributes to help the developing of new parsers. Parsers can be defined | ||
by class derivation and following a tokens registration procedure. | ||
|
||
Token Base Class | ||
Token base class | ||
---------------- | ||
|
||
.. autoclass:: elementpath.Token | ||
|
||
.. autoattribute:: arity | ||
.. autoattribute:: tree | ||
.. autoattribute:: source | ||
|
||
Parser Base Class | ||
.. automethod:: nud | ||
.. automethod:: led | ||
.. automethod:: evaluate | ||
.. automethod:: iter | ||
|
||
Helper methods for checking symbols and for error raising: | ||
|
||
.. automethod:: expected | ||
.. automethod:: unexpected | ||
.. automethod:: wrong_syntax | ||
.. automethod:: wrong_name | ||
.. automethod:: wrong_value | ||
.. automethod:: wrong_type | ||
|
||
|
||
Parser base class | ||
----------------- | ||
|
||
.. autoclass:: elementpath.Parser | ||
|
||
Parsing methods: | ||
|
||
.. automethod:: build_tokenizer | ||
.. automethod:: parse | ||
.. automethod:: advance | ||
.. automethod:: raw_advance | ||
.. automethod:: expression | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
Helper methods for building effective parser classes: | ||
|
||
.. automethod:: begin | ||
.. automethod:: end | ||
.. automethod:: register | ||
.. automethod:: unregister | ||
.. automethod:: unregistered | ||
.. automethod:: literal | ||
.. automethod:: nullary | ||
.. automethod:: prefix | ||
.. automethod:: postfix | ||
.. automethod:: infix | ||
.. automethod:: infixr | ||
.. automethod:: method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.