Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > pyparsing 1.3.2 released

Reply
Thread Tools

pyparsing 1.3.2 released

 
 
Paul McGuire
Guest
Posts: n/a
 
      07-25-2005
"The best laid plans o' mice an' men / Gang aft a-gley"

So said Robert Burns (who really should do something about that speech
impediment!). And so said I about 6 weeks ago, when I thought that I
would leave pyparsing alone for awhile, after the 1.3.1 release.

Well, here we are, and I'm announcing the 1.3.2 release, with some
changes that I'd like to get released quickly. Here is the excerpt
from the change log:


Version 1.3.2 - July 24, 2005
-----------------------------
- Added Each class as an enhanced version of And. 'Each' requires
that all given expressions be present, but may occur in any order.
Special handling is provided to group ZeroOrMore and OneOrMore
elements that occur out-of-order in the input string. You can also
construct 'Each' objects by joining expressions with the '&'
operator. When using the Each class, results names are strongly
recommended for accessing the matched tokens. (Suggested by Pradam
Amini - thanks, Pradam!)

- Stricter interpretation of 'max' qualifier on Word elements. If the
'max' attribute is specified, matching will fail if an input field
contains more than 'max' consecutive body characters. For example,
previously, Word(nums,max=3) would match the first three characters
of '0123456', returning '012' and continuing parsing at '3'. Now,
when constructed using the max attribute, Word will raise an
exception with this string.

- Cleaner handling of nested dictionaries returned by Dict. No
longer necessary to dereference sub-dictionaries as element [0] of
their parents.
=== NOTE: THIS CHANGE MAY BREAK SOME EXISTING CODE, BUT ONLY IF
PARSING NESTED DICTIONARIES USING THE LITTLE-USED DICT CLASS ===
(Prompted by discussion thread on the Python Tutor list, with
contributions from Danny Yoo, Kent Johnson, and original post by
Liam Clarke - thanks all!)

Download pyparsing at http://pyparsing.sourceforge.net.

-- Paul


========================================

Pyparsing is a pure-Python class library for quickly developing
recursive-descent parsers. Parser grammars are assembled directly in
the calling Python code, using classes such as Literal, Word,
OneOrMore, Optional, etc., combined with operators '+', '|', and '^'
for And, MatchFirst, and Or. No separate code-generation or external
files are required. Pyparsing can be used in many cases in place of
regular expressions, with shorter learning curve and greater
readability and maintainability. Pyparsing comes with a number of
parsing examples, including:
- "Hello, World!"
- chemical formulas
- configuration file parser
- web page URL extractor
- 5-function arithmetic expression parser
- subset of CORBA IDL
- chess portable game notation
- simple SQL parser
- Mozilla calendar file parser
- EBNF parser/compiler

 
Reply With Quote
 
 
 
 
John Machin
Guest
Posts: n/a
 
      07-25-2005
Paul McGuire wrote:
> "The best laid plans o' mice an' men / Gang aft a-gley"
>
> So said Robert Burns (who really should do something about that speech
> impediment!).


If "schemes" sounds like "plans", perhaps the impediment is in the
region of your ears
 
Reply With Quote
 
 
 
 
Paul McGuire
Guest
Posts: n/a
 
      07-25-2005
Garn! Twa' the de'ils wairk! I wad be laith to misquo' the Sco'ish
Bard!

I was trying to make sure I spelled "a-gley" - I lapsed into the
common, but incorrect, quotation.

(http://www.robertburns.org/works/75.shtml)

Thanks!
-- Paul

 
Reply With Quote
 
'Dang' Daniel Griffith
Guest
Posts: n/a
 
      07-26-2005
On 24 Jul 2005 17:27:07 -0700, "Paul McGuire" <(E-Mail Removed)>
wrote:

>Well, here we are, and I'm announcing the 1.3.2 release, with some
>changes that I'd like to get released quickly. Here is the excerpt
>from the change log:
>

....snip...

I did a quick check with my Delphi DFM parser, and they seem to work
fine. Keep up the good work!
--dang
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ANN: pyparsing-1.3.1 released Paul McGuire Python 2 06-14-2005 11:53 AM
ANN: pyparsing-1.3.1 released Paul McGuire Python 0 06-13-2005 03:55 AM
ANN: pyparsing-1.3 released Paul McGuire Python 0 03-26-2005 05:56 AM
[ANN] pyparsing 1.2 released Paul McGuire Python 0 06-21-2004 02:39 AM
ANN: pyparsing 1.0.4 released Paul McGuire Python 0 01-09-2004 03:43 AM



Advertisments