Latest News >> 2008-07-20 2008-06-25

I’ve been completely fed up with news/feed/rss/atom readers these days. I use Linux as my primary operating system, and I only have a few feeds that I want to rip through quick so I can get to reading the content. Yet, trying to find a reader that doesn’t suck donkey balls has been a chore.

2008-06-21

Wanna know what all the Ruby vulnerabilities are? Or at least have a fun look at how to search through code for clues? It’s a blast.

2008-06-13

I’m dropping a large blog post on everyone to just say that I haven’t died, I’ve just been busy working on my book for A/W about Mongrel. I had contracted with them to do a book about deploying Mongrel, but then decided it wouldn’t be a very good book since we’d already done one about that topic and there wasn’t too much more to say.

Forking With Permission

I started playing with python recently and decided to contact the author of a nice little parser generator I used once back in 2003 called Yapps2 that really saved my ass once.

Yapps2 is nice because it’s small and hackable. My motivation for forking it is to turn Yapps2 into a decent parser generator for processing protocols consistently, either binary, textual, or combined. Included in the source distribution is an example of this with the examples/stackish.g file that implements the Utu Stackish format.

After contacting the original author Amit Patel he recommended that I fork the project, and even gave me a decent name: Zapps. Zed’s Additional Python Parsing System. I like it so I’m going with it.

Version 0.2

Download 0.2…

Going with the latest Idiopidae release I’m also putting out a new Zapps that Idiopidae needs. This release adds a fairly important grammar production that wasn’t in the original Yapps: optionals.

This means you can take any part of a grammar and put a ’?’ (question mark) and it will be optionally followed in the parser if the first element is in the token stream. This is fairly primitive but implements the extent of an RDP parser’s capability in this area (more of an LL(1) than RDP).

I used this in Idiopidae to implement optional formatting and langauge specifications for the export and include statements:

rule Include: 
    INCLUDE WS File WS Section Format? {{ self.doc.include(File, Section, Format) }}
rule Export: EXPORT WS Section Language?  {{ self.doc.export(Section, Language) }}

It should also work for productions that are just parenthetical, but I’ve only used it with named productions.

Install with the usual mechanism of sudo python setup.py install and you can also get at the latest source with Bazaar by doing:

bzr pull http://www.zedshaw.com/repository/zapps

If you have patches feel free to email them to me until I move to a Launchpad account or something similar.

Version 0.1

This release is nothing more than a simple code reorganization to fit into the python distutils way of doing things. The original yapps2 was done as just some source files, so I wanted to modernize it for easier contribution and use by Python folks.

You can grab that release here

Note that the Python Pack production is there, but not implemented yet, that’ll be done most likely during PyCon so watch out.