parser stack size limit
Francisco Borges
frandebo at latt.if.usp.br
Mon Apr 14 13:22:11 EDT 2003
I'm getting (both in Python2.2 and Python2.3):
"""
s_push: parser stack overflow
MemoryError
"""
When trying to run the following line:
a = eval("[('top_start_xp','start'),[[('max_xp(root)','max'),[[('non_wh_topicalization(np)','root'),[[('het_noun','np'),'Het'],[('optpunct(e)','optpunct'),[]],[('imp','sv1'),[[('verb(hebben,sg3,alsof_sbar_subj)','v'),'lijkt'],[('v2_vp_vproj','v2_vp'),[[('vpx_vproj','vpx'),[[('vp_v_komma_arg(sbar)','vproj'),[[('vproj_vc','vproj'),[[('vc_vb','vc'),[[('vb_v','vb'),[[('vgap','v'),[]]]]]]]],[('optpunct(e)','optpunct'),[]],[('sbar(vp)','sbar'),[[('alsof_complementizer','comp'),'alsof'],[('vp_vpx','vp'),[[('vpx_vproj','vpx'),[[('vp_arg_v(np)','vproj'),[[('np_pron_weak','np'),[[('wkpro_pronoun(nwh,thi,both,de,both,def)','pron'),'ze']]],[('vp_arg_v(np)','vproj'),[[('np_pron_weak','np'),[[('wkpro_pronoun(nwh,je,sg,de,both,def)','pron'),'je']]],[('vp_vp_colon','vproj'),[[('vproj_vc','vproj'),[[('v_v_v','vc'),[[('verb(hebben,pl,aux(inf))','v'),'willen'],[('vc_vb','vc'),[[('vb_v','vb'),[[('verb(hebben,inf,np_sbar)','v'),'zeggen']]]]]]]]],[('punct(dubb_punt)','punct'),':']]]]]]]]]]]]]]]]]]]]]]]]],[('optpunct(e)','optpunct'),[]]]]")
(the brackets *are* balanced...)
There are some bogus lists inside it I know, but as soon as I start
using this for more complicated sentences (linguistics being done here)
the number of nested lists will increase.
Any ideas on how to avoid this? Could it be as simple as a file to
modify and then recompile python?
--
Francisco.
__o
`\<,
_____(*)/(*)_____
More information about the Python-list
mailing list