OverflowError: regular expression code size limit exceeded

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gdetre@princeton.edu

    OverflowError: regular expression code size limit exceeded

    Dear all,

    I'm trying to get a large, machine-generated regular expression (many
    thousands of characters) to work in Python on a Mac (running Leopard),
    and I keep banging my head against this brick wall:
    >>update_implic it_link_regexp_ temp()
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/Users/greg/elisp/freex/freex_sqlalchem y.py", line 715, in
    update_implicit _link_regexp_te mp
    impLinkRegexp = re.compile(alia sRegexpStr,re.I GNORECASE|
    re.MULTILINE)
    File "/System/Library/Frameworks/Python.framewor k/Versions/2.5/lib/
    python2.5/re.py", line 180, in compile
    return _compile(patter n, flags)
    File "/System/Library/Frameworks/Python.framewor k/Versions/2.5/lib/
    python2.5/re.py", line 231, in _compile
    p = sre_compile.com pile(pattern, flags)
    File "/System/Library/Frameworks/Python.framewor k/Versions/2.5/lib/
    python2.5/sre_compile.py" , line 530, in compile
    groupindex, indexgroup
    OverflowError: regular expression code size limit exceeded

    I have successfully run this regular expression many times under
    linux. I tried it first with the default python iinstallation on
    Leopard, 2.5.1, but I've also tried it with tthe latest .dmg i could
    find on the python.org site:

    Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53)
    [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin

    I'm really lost about how to proceed. Any ideas?

    Thank you,
    Greg
Working...