From 8edd2833270a0a531440b0d3407ec36f61ea2ee7 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 28 Oct 2015 11:24:36 +0100 Subject: Sort token list for Prolog parser Ensures the cached version of parsetab.py is used. --- prolog/lexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prolog/lexer.py') 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', -- cgit v1.2.1