Paul, > frame = Literal("#") > tween = Word("-") # that is, it is a "word" composed of 1 or more -'s > copy = Literal("=") > blank = Literal("_") > > animation = OneOrMore((frame + Optional( > (tween + FollowedBy(frame)) | > OneOrMore(copy | blank) ) ) )
I found that this form insists on having a # in char 0. How could it be changed to take a bunch of blanks before the first frame? ____# ? I have tried: animation = OneOrMore( Optional ( blank | frame ) + Optional( (tween + FollowedBy(frame) ) | OneOrMore(copy | blank) ) ) And permutations thereof, but it goes into a black hole. \d -- http://mail.python.org/mailman/listinfo/python-list