Skip to content

Commit

Permalink
Documentation and renamed element, member and members to pattern(s).
Browse files Browse the repository at this point in the history
  • Loading branch information
eerimoq committed Jul 26, 2018
1 parent 5058281 commit f13ad92
Show file tree
Hide file tree
Showing 4 changed files with 191 additions and 105 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The script:
Script execution:

.. code-block::
.. code-block:: text
$ python3 examples/hello_world.py
Tree: ['Hello', ',', 'World', '!']
Expand Down
49 changes: 49 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,52 @@ Text parser

Functions and classes
=====================

.. autoclass:: textparser.Parser
:members:

.. autoclass:: textparser.Choice
:members:

.. autoclass:: textparser.ChoiceDict
:members:

.. autofunction:: textparser.choice

.. autoclass:: textparser.ZeroOrMore
:members:

.. autoclass:: textparser.ZeroOrMoreDict
:members:

.. autoclass:: textparser.OneOrMore
:members:

.. autoclass:: textparser.OneOrMoreDict
:members:

.. autoclass:: textparser.DelimitedList
:members:

.. autoclass:: textparser.Any
:members:

.. autoclass:: textparser.Optional
:members:

.. autoclass:: textparser.Inline
:members:

.. autoclass:: textparser.Tag
:members:

.. autoclass:: textparser.Forward
:members:

.. autoclass:: textparser.Pattern
:members:

.. autoclass:: textparser.Tokens
:members:

.. autofunction:: textparser.tokenize_init
4 changes: 2 additions & 2 deletions tests/test_textparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ def test_grammar_choice_dict_init(self):
),
(
(Sequence(Sequence('WORD')), ),
"First sequence member must be a string, not "
"First sequence pattern must be a string, not "
"<class 'textparser.Sequence'>."
),
(
(Choice('WORD'), ),
"Supported member types are Sequence and str, not "
"Supported pattern types are Sequence and str, not "
"<class 'textparser.Choice'>."
)
]
Expand Down

0 comments on commit f13ad92

Please sign in to comment.