summaryrefslogtreecommitdiff
path: root/pygments/lexers/sql.py
diff options
context:
space:
mode:
authorGaurav Jain <gaurav@gauravjain.org>2014-05-15 23:52:25 -0400
committerGaurav Jain <gaurav@gauravjain.org>2014-05-15 23:52:25 -0400
commit414c88e054f41981ec406971403a250f31270dfd (patch)
tree187dac55de5eb5fc2eb6cf8b404f89d288fd5514 /pygments/lexers/sql.py
parentcf473924c5aa0268cb9e78cff6809a509a94169a (diff)
downloadpygments-414c88e054f41981ec406971403a250f31270dfd.tar.gz
Replace a-z0-9_ with \w when IGNORECASE is set
Diffstat (limited to 'pygments/lexers/sql.py')
-rw-r--r--pygments/lexers/sql.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pygments/lexers/sql.py b/pygments/lexers/sql.py
index d20c15fd..7540f079 100644
--- a/pygments/lexers/sql.py
+++ b/pygments/lexers/sql.py
@@ -192,10 +192,10 @@ class PlPgsqlLexer(PostgresBase, RegexLexer):
# Add specific PL/pgSQL rules (before the SQL ones)
tokens['root'][:0] = [
- (r'\%[a-z][a-z0-9_]*\b', Name.Builtin), # actually, a datatype
+ (r'\%[a-z]\w*\b', Name.Builtin), # actually, a datatype
(r':=', Operator),
- (r'\<\<[a-z][a-z0-9_]*\>\>', Name.Label),
- (r'\#[a-z][a-z0-9_]*\b', Keyword.Pseudo), # #variable_conflict
+ (r'\<\<[a-z]\w*\>\>', Name.Label),
+ (r'\#[a-z]\w*\b', Keyword.Pseudo), # #variable_conflict
]
@@ -219,7 +219,7 @@ class PsqlRegexLexer(PostgresBase, RegexLexer):
(r'\n', Text, 'root'),
(r'\s+', Text),
(r'\\[^\s]+', Keyword.Pseudo),
- (r""":(['"]?)[a-z][a-z0-9_]*\b\1""", Name.Variable),
+ (r""":(['"]?)[a-z]\w*\b\1""", Name.Variable),
(r"'(''|[^'])*'", String.Single),
(r"`([^`])*`", String.Backtick),
(r"[^\s]+", String.Symbol),
@@ -584,7 +584,7 @@ class RqlLexer(RegexLexer):
(r'[+*/<>=%-]', Operator),
(r'(Any|is|instance_of|CWEType|CWRelation)\b', Name.Builtin),
(r'[0-9]+', Number.Integer),
- (r'[A-Z_][A-Z0-9_]*\??', Name),
+ (r'[A-Z_]\w*\??', Name),
(r"'(''|[^'])*'", String.Single),
(r'"(""|[^"])*"', String.Single),
(r'[;:()\[\],\.]', Punctuation)