diff options
author | David Beazley <dave@dabeaz.com> | 2009-08-27 01:28:42 +0000 |
---|---|---|
committer | David Beazley <dave@dabeaz.com> | 2009-08-27 01:28:42 +0000 |
commit | b01e189ad2c4f6e6017b17985c5608099b1fb27f (patch) | |
tree | 290d494ed0dfd8f8c9c8c0208e9854bf113df3c1 /ply/lex.py | |
parent | 2eac1759d1df351e4c40b4212dd3b354f32a0776 (diff) | |
download | ply-b01e189ad2c4f6e6017b17985c5608099b1fb27f.tar.gz |
A few minor bug fixes
Diffstat (limited to 'ply/lex.py')
-rw-r--r-- | ply/lex.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -31,7 +31,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ----------------------------------------------------------------------------- -__version__ = "3.2" +__version__ = "3.3" __tabversion__ = "3.2" # Version of table file used import re, sys, types, copy, os @@ -236,7 +236,7 @@ class Lexer: titem = [] txtitem = [] for i in range(len(lre)): - titem.append((re.compile(lre[i][0],lextab._lexreflags),_names_to_funcs(lre[i][1],fdict))) + titem.append((re.compile(lre[i][0],lextab._lexreflags | re.VERBOSE),_names_to_funcs(lre[i][1],fdict))) txtitem.append(lre[i][0]) self.lexstatere[key] = titem self.lexstateretext[key] = txtitem @@ -969,6 +969,7 @@ def lex(module=None,object=None,debug=0,optimize=0,lextab="lextab",reflags=0,now lexobj.lexstateinfo = stateinfo lexobj.lexre = lexobj.lexstatere["INITIAL"] lexobj.lexretext = lexobj.lexstateretext["INITIAL"] + lexobj.lexreflags = reflags # Set up ignore variables lexobj.lexstateignore = linfo.ignore |