summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-10-28 11:24:36 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-12-10 14:10:04 +0100
commit8edd2833270a0a531440b0d3407ec36f61ea2ee7 (patch)
tree7eaa38e9040b91c7a2f0fc4f0808d47d0e83d753
parent61c5b7db71667c7801ef2be2c82aaad888ec8e78 (diff)
Sort token list for Prolog parser
Ensures the cached version of parsetab.py is used.
-rw-r--r--prolog/lexer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/prolog/lexer.py b/prolog/lexer.py
index 8f1a268..799ebb9 100644
--- a/prolog/lexer.py
+++ b/prolog/lexer.py
@@ -57,7 +57,7 @@ operators = {
r',': 'COMMA',
r';': 'SEMI'
}
-tokens = list(operators.values()) + [
+tokens = sorted(list(operators.values())) + [
'UINTEGER', 'UREAL',
'NAME', 'VARIABLE', 'STRING',
'LBRACKET', 'RBRACKET', 'LPAREN', 'RPAREN', 'PIPE', 'LBRACE', 'RBRACE',