diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2009-06-24 06:13:29 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2009-06-24 06:13:29 +0200 |
| commit | d47657d07ab900604547efd0a4eb288775ad43b9 (patch) | |
| tree | 2c3587ac075c52ef3fce096081a505820f55f51a /sqlparse | |
| parent | af3c47a5a5410ac48284e118d7f1c0fd7cfbd18a (diff) | |
| download | sqlparse-d47657d07ab900604547efd0a4eb288775ad43b9.tar.gz | |
Fix incorrect detection of keyword fragments in names (fixes issue7, reported and initial patch by andyboyko).
Diffstat (limited to 'sqlparse')
| -rw-r--r-- | sqlparse/lexer.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sqlparse/lexer.py b/sqlparse/lexer.py index 8ccc7de..1cdb98c 100644 --- a/sqlparse/lexer.py +++ b/sqlparse/lexer.py @@ -176,9 +176,9 @@ class Lexer: # TODO: Backslash escapes? (r"'(''|[^'])*'", String.Single), (r'"(""|[^"])*"', String.Symbol), # not a real string literal in ANSI SQL - (r'(LEFT |RIGHT )?(INNER |OUTER )?JOIN', Keyword), - (r'END( IF| LOOP)?', Keyword), - (r'CREATE( OR REPLACE)?', Keyword.DDL), + (r'(LEFT |RIGHT )?(INNER |OUTER )?JOIN\b', Keyword), + (r'END( IF| LOOP)?\b', Keyword), + (r'CREATE( OR REPLACE)?\b', Keyword.DDL), (r'[a-zA-Z_][a-zA-Z0-9_]*', is_keyword), (r'\$([a-zA-Z_][a-zA-Z0-9_]*)?\$', Name.Builtin), (r'[;:()\[\],\.]', Punctuation), |
