Skip to content

Commit

Permalink
reword
Browse files Browse the repository at this point in the history
  • Loading branch information
darius committed Dec 10, 2012
1 parent 8f4c230 commit 9f46816
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions README.rst
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,21 +13,25 @@ grammars. For example, to parse a tiny subset of HTML:
>>> a_little_html("Hello. <p><em>Nesting</em> for <i>the win</i>.</p>") >>> a_little_html("Hello. <p><em>Nesting</em> for <i>the win</i>.</p>")
('Hello. ', ('p', ('em', 'Nesting'), ' for ', ('i', 'the win'), '.')) ('Hello. ', ('p', ('em', 'Nesting'), ' for ', ('i', 'the win'), '.'))


I had three goals: The goal was to make a parsing library


1. A parsing library that's pleasant enough to use; 1. pleasant enough to use;


2. that's simple to adapt or rewrite from scratch if I'm faced with 2. simple to adapt or rewrite from scratch if I'm faced with some new
some new situation like a new programming language; situation like a new programming language;


3. with code easy enough to follow that it could introduce people to 3. with code easy enough to follow that it could introduce people to
parsing. parsing.


So I aimed for one page of clear code not using combinators. Some bits So it came down to one page of clear code not using combinators. (And
that couldn't fit the constraints overflowed into a combinator then ballooned to 200+ lines from documentation and a few extras.)
library, `parson <https://github.com/darius/parson>`_. Some bits that couldn't fit the latter two constraints went into a
combinator library, `parson <https://github.com/darius/parson>`_.


See the module doc and the examples/ directory for more. For more, see `the examples
<https://github.com/darius/peglet/tree/master/examples>`_ or the
module doc in `the code
<https://github.com/darius/peglet/blob/master/peglet.py>`_.




Installing it Installing it
Expand Down

0 comments on commit 9f46816

Please sign in to comment.