summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Rodriguez <boriel@gmail.com>2017-05-08 09:59:50 +0200
committerJose Rodriguez <josemanuel.rodriguez@nttcom.ms>2017-05-08 11:31:02 +0200
commiteb7e15ac78077f67f4904a86b426ba015f450ec1 (patch)
treedb67fe2e14702a4852c5c49f5b7c741611fac3dd
parentb791b089b7d368592838ebbb8172fecc74001816 (diff)
downloadply-eb7e15ac78077f67f4904a86b426ba015f450ec1.tar.gz
Fix issue #31 on python3
Under python 3.x the signature generation to check for changes was failing due to changes in hash functions. Ensures always the same signature by enforcing token order.
-rw-r--r--ply/yacc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ply/yacc.py b/ply/yacc.py
index 2fadace..4210239 100644
--- a/ply/yacc.py
+++ b/ply/yacc.py
@@ -3070,7 +3070,7 @@ class ParserReflect(object):
self.error = True
return
- self.tokens = tokens
+ self.tokens = sorted(tokens)
# Validate the tokens
def validate_tokens(self):