Hi,
I want learn pyparsing and got stuck with this:
I'm getting error :
ParseException: Expected "end story" (at char 36), (line:1, col:37)
I don't get it why? end story is there isn't it?
thanks
I want learn pyparsing and got stuck with this:
Code:
from pyparsing import *
body = ZeroOrMore(word)
begin = Keyword('begin story').suppress()
end = Keyword('end story').suppress()
sentence = begin + body + end
print sentence.parseString("begin story once upon a time end story")
ParseException: Expected "end story" (at char 36), (line:1, col:37)
I don't get it why? end story is there isn't it?
thanks
Comment