Skip to content

Commit

Permalink
Fix description and example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Okhrymenko committed Jun 22, 2016
1 parent 39be10a commit 4b9e746
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 4 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ Python version of SimplePEG

To use, simply do::

>>> import SPEG from simplepeg
>>> parser = s.SPEG()
>>> # will throw Exception if grammar is invalid
>>> from simplepeg import SPEG
>>> parser = SPEG()
>>> parser.parse_grammar('GRAMMAR test b -> "a";')
>>> # will throw Exception if text have invalid grammar
>>> ast = parser.parse_text('a')
>>> print ast.to_json()

or::

>>> import SPEG from simplepeg
>>> parser = s.SPEG()
>>> from simplepeg import SPEG
>>> parser = SPEG()
>>> ast = parser.parse('GRAMMAR test b -> "a";', 'a')
>>> print ast.to_json()
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ def readme():
with open('README.rst') as f:
return f.read()

with open('LICENSE') as f:
license = f.read()

setup(name='simplepeg',
version='1.0.0',
version='1.0.1',
description='Python version of SimplePEG',
long_description=readme(),
classifiers=[
Expand All @@ -18,7 +21,7 @@ def readme():
author='Oleksii Okhrymenko',
author_email='[email protected]',
keywords='peg parser grammar',
license='MIT',
license=license,
packages=['simplepeg'],
include_package_data=True,
zip_safe=False)

0 comments on commit 4b9e746

Please sign in to comment.