summaryrefslogtreecommitdiff
path: root/pygments/lexers/compiled.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-01-10 10:27:56 +0100
committerGeorg Brandl <georg@python.org>2014-01-10 10:27:56 +0100
commit78a68fd6a9610a91ea21ededef1eaac3499edbb1 (patch)
tree54de9b8b9ab858682314b4437218367f0be8e45b /pygments/lexers/compiled.py
parentf60dfb674795e7ae28172862d3be80a74415d525 (diff)
downloadpygments-78a68fd6a9610a91ea21ededef1eaac3499edbb1.tar.gz
eiffel: add to changelog, minor cleanup
Diffstat (limited to 'pygments/lexers/compiled.py')
-rw-r--r--pygments/lexers/compiled.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py
index a4b88d3c..9103d07c 100644
--- a/pygments/lexers/compiled.py
+++ b/pygments/lexers/compiled.py
@@ -3856,20 +3856,24 @@ class ChapelLexer(RegexLexer):
],
}
+
class EiffelLexer(RegexLexer):
"""
For `Eiffel <http://www.eiffel.com>`_ source code.
+
+ *New in Pygments 1.7.*
"""
name = 'Eiffel'
aliases = ['eiffel']
filenames = ['*.e']
mimetypes = ['text/x-eiffel']
+
tokens = {
'root': [
(r'[^\S\n]+', Text),
(r'--.*?\n', Comment.Single),
(r'[^\S\n]+', Text),
- # Please note thant keyword and operator are case insensitive.
+ # Please note that keyword and operator are case insensitive.
(r'(?i)(true|false|void|current|result|precursor)\b', Keyword.Constant),
(r'(?i)(and(\s+then)?|not|xor|implies|or(\s+else)?)\b', Operator.Word),
(r'(?i)\b(across|agent|alias|all|as|assign|attached|attribute|check|'
@@ -3879,7 +3883,7 @@ class EiffelLexer(RegexLexer):
r'old|once|only|redefine|rename|require|rescue|retry|select|'
r'separate|then|undefine|until|variant|when)\b',Keyword.Reserved),
(r'"\[(([^\]%]|\n)|%(.|\n)|\][^"])*?\]"', String),
- (r'"([^"%\n]|%.)*?"', String),
+ (r'"([^"%\n]|%.)*?"', String),
include('numbers'),
(r"'([^'%]|%'|%%)'", String.Char),
(r"(//|\\\\|>=|<=|:=|/=|~|/~|[\\\?!#%&@|+/\-=\>\*$<|^\[\]])", Operator),
@@ -3887,12 +3891,12 @@ class EiffelLexer(RegexLexer):
(r'([a-z][a-zA-Z0-9_]*)|([A-Z][A-Z0-9_]*[a-z][a-zA-Z0-9_]*)', Name),
(r'([A-Z][A-Z0-9_]*)', Name.Class),
(r'\n+', Text),
- ],
- 'numbers' : [
+ ],
+ 'numbers': [
(r'0[xX][a-fA-F0-9]+', Number.Hex),
(r'0[bB][0-1]+', Number.Bin),
(r'0[cC][0-7]+', Number.Oct),
(r'([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)', Number.Float),
(r'[0-9]+', Number.Integer),
- ],
- }
+ ],
+ }