Re: [Pyparsing] Parsing object structure
Brought to you by:
ptmcg
From: Claus R. <cla...@ro...> - 2012-09-25 10:00:46
|
Ok, i solved it, some chars were missing. Now i try to handle german umlauts, text = Word( alphas8bit + alphanums + " -,/.|:_()+;&" ) does not work, error message says /usr/lib/python2.7/dist-packages/pyparsing.py:1698: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal i try to mix it up with unicode as well text = Word( alphas8bit + alphanums + " -,/.|:_()+;&" + u"ü") but it does not work either. Is there any alphanums to use with unicode? Claus Am 20.09.2012 12:30:14, schrieb Claus Rosenberger: > Ok, i changed it to the minimal set i need at the moment. > text = Word( alphanums + "," + " ") > > > But i have another problem with that line it seems. > NETSET = "NetSet" + LBRACE + ZeroOrMore(Group(v_text | v_num | NETSET_PLIST | NETSET_NLIST)) + RBRACE > > > It's referencing to NETSET_PLIST which is defined as follows: > NETSET_PLIST = ( "list" + EQ + LBRACE + ZeroOrMore(NETENTRY) + RBRACE ) > > > Which means it should match "list={" and a few child options gut i get following message while parsing: > pyparsing.ParseException: Expected "}" (at char 302), (line:8, col:25) > > > Claus |