[Bf-python] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13152] branches/animsys-aligorith/source/ blender: == AnimSys Branch - Tagging Some Vars ==
Toni Alatalo
antont at kyperjokki.fi
Mon Jan 7 22:07:07 CET 2008
On Jan 7, 2008, at 1:09 PM, Joshua Leung wrote:
> * Fixed a bug with sdna2kt.py -> enum-links to other files was not
> acutally searching for enums in the foreign
has anyone used pyparsing? http://pyparsing.wikispaces.com/
it has seemed interesting - i was reminded of that by the comment of
yours there:
"This current version doesn't use any fancy regular-expressions, as
they are quite mucky and will not cope with syntax errors / funky
constructions that well. "
i probably agree with you there, and very rarely use regexps, but think
that pyparsing might be good. a whole lot of the code in that tool
seems to be parsing - even so much that is not too easy (at least when
being a bit tired :) to see what it actually does otherwise (but this
was just my lazy reading, too)
this example is on the pyparsing page:
"""
Here is a program to parse "Hello, World!" (or any greeting of the form
"<salutation>, <addressee>!"):
from pyparsing import Word, alphas
greet = Word( alphas ) + "," + Word( alphas ) + "!" # <-- grammar
defined here
hello = "Hello, World!"
print hello, "->", greet.parseString( hello )
The program outputs the following:
Hello, World! -> ['Hello', ',', 'World', '!']
"""
~Toni
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1701 bytes
Desc: not available
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20080107/c40222f1/attachment.bin>
More information about the Bf-python
mailing list