summaryrefslogtreecommitdiff
path: root/ply/lex.py
diff options
context:
space:
mode:
authorDavid Beazley <dave@dabeaz.com>2009-08-27 01:28:42 +0000
committerDavid Beazley <dave@dabeaz.com>2009-08-27 01:28:42 +0000
commitb01e189ad2c4f6e6017b17985c5608099b1fb27f (patch)
tree290d494ed0dfd8f8c9c8c0208e9854bf113df3c1 /ply/lex.py
parent2eac1759d1df351e4c40b4212dd3b354f32a0776 (diff)
downloadply-b01e189ad2c4f6e6017b17985c5608099b1fb27f.tar.gz
A few minor bug fixes
Diffstat (limited to 'ply/lex.py')
-rw-r--r--ply/lex.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ply/lex.py b/ply/lex.py
index 4759d1b..267ec10 100644
--- a/ply/lex.py
+++ b/ply/lex.py
@@ -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