chomsky 1.0.2

Another language grammar parser
chomsky is yet another language grammar parser, inspired by modgrammar and pyparsing.

Developer comments

I needed a language grammar parser for the plywood_ project, and modgrammar_ looked like it would be perfect, except I couldn't get the simplest of grammars to work. pyparsing_ is excellent, but doesn't give me objects back, only lists and strings - I need more than that. I would recommend pyparsing_ for *your* project. Unless you really want objects, or if you are doing a language (chomsky_ has lots of built-in stuff for making programming language grammars).

Besides, I like writing parsers, and I know how I want this one to work, so screw it, I'll do it myself!

INSTALLATION

 pip install chomsky

USAGE

Matchers

``Matcher`` objects are the most basic building blocks.  They are not smart,
they return only strings and lists, and they make no assumptions about what you
might be trying to build.  For instance, the ``Word`` Matcher does not assume
that you want to consume whitespace.

``Matcher`` objects are great for building a small parsing language for
consistent data, where ``Grammar`` objects are not needed.  But for building a
language parser, you will probably use the more heavy-duty Grammar building
blocks.

last updated on:
August 22nd, 2012, 17:06 GMT
price:
FREE!
developed by:
Colin Thomas-Arnold
homepage:
github.com
license type:
BSD License 
category:
ROOT \ Text Editing&Processing \ Others

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Add your review!

SUBMIT