summaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/lexers/verification.py
diff options
context:
space:
mode:
authororivej <[email protected]>2022-02-10 16:44:49 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:44:49 +0300
commit718c552901d703c502ccbefdfc3c9028d608b947 (patch)
tree46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/python/Pygments/py3/pygments/lexers/verification.py
parente9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/verification.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/lexers/verification.py200
1 files changed, 100 insertions, 100 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/verification.py b/contrib/python/Pygments/py3/pygments/lexers/verification.py
index 2d473ae8128..5a502efb47c 100644
--- a/contrib/python/Pygments/py3/pygments/lexers/verification.py
+++ b/contrib/python/Pygments/py3/pygments/lexers/verification.py
@@ -1,113 +1,113 @@
-"""
- pygments.lexers.verification
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- Lexer for Intermediate Verification Languages (IVLs).
-
+"""
+ pygments.lexers.verification
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Lexer for Intermediate Verification Languages (IVLs).
+
:copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer, include, words
-from pygments.token import Comment, Operator, Keyword, Name, Number, \
+ :license: BSD, see LICENSE for details.
+"""
+
+from pygments.lexer import RegexLexer, include, words
+from pygments.token import Comment, Operator, Keyword, Name, Number, \
Punctuation, Text, Generic
-
-__all__ = ['BoogieLexer', 'SilverLexer']
-
-
-class BoogieLexer(RegexLexer):
- """
- For `Boogie <https://boogie.codeplex.com/>`_ source code.
-
- .. versionadded:: 2.1
- """
- name = 'Boogie'
- aliases = ['boogie']
- filenames = ['*.bpl']
-
- tokens = {
- 'root': [
- # Whitespace and Comments
+
+__all__ = ['BoogieLexer', 'SilverLexer']
+
+
+class BoogieLexer(RegexLexer):
+ """
+ For `Boogie <https://boogie.codeplex.com/>`_ source code.
+
+ .. versionadded:: 2.1
+ """
+ name = 'Boogie'
+ aliases = ['boogie']
+ filenames = ['*.bpl']
+
+ tokens = {
+ 'root': [
+ # Whitespace and Comments
(r'\n', Text),
(r'\s+', Text),
(r'\\\n', Text), # line continuation
- (r'//[/!](.*?)\n', Comment.Doc),
- (r'//(.*?)\n', Comment.Single),
- (r'/\*', Comment.Multiline, 'comment'),
-
- (words((
- 'axiom', 'break', 'call', 'ensures', 'else', 'exists', 'function',
- 'forall', 'if', 'invariant', 'modifies', 'procedure', 'requires',
- 'then', 'var', 'while'),
- suffix=r'\b'), Keyword),
- (words(('const',), suffix=r'\b'), Keyword.Reserved),
-
- (words(('bool', 'int', 'ref'), suffix=r'\b'), Keyword.Type),
- include('numbers'),
- (r"(>=|<=|:=|!=|==>|&&|\|\||[+/\-=>*<\[\]])", Operator),
+ (r'//[/!](.*?)\n', Comment.Doc),
+ (r'//(.*?)\n', Comment.Single),
+ (r'/\*', Comment.Multiline, 'comment'),
+
+ (words((
+ 'axiom', 'break', 'call', 'ensures', 'else', 'exists', 'function',
+ 'forall', 'if', 'invariant', 'modifies', 'procedure', 'requires',
+ 'then', 'var', 'while'),
+ suffix=r'\b'), Keyword),
+ (words(('const',), suffix=r'\b'), Keyword.Reserved),
+
+ (words(('bool', 'int', 'ref'), suffix=r'\b'), Keyword.Type),
+ include('numbers'),
+ (r"(>=|<=|:=|!=|==>|&&|\|\||[+/\-=>*<\[\]])", Operator),
(r'\{.*?\}', Generic.Emph), #triggers
- (r"([{}():;,.])", Punctuation),
- # Identifier
- (r'[a-zA-Z_]\w*', Name),
- ],
- 'comment': [
- (r'[^*/]+', Comment.Multiline),
- (r'/\*', Comment.Multiline, '#push'),
- (r'\*/', Comment.Multiline, '#pop'),
- (r'[*/]', Comment.Multiline),
- ],
- 'numbers': [
- (r'[0-9]+', Number.Integer),
- ],
- }
-
-
-class SilverLexer(RegexLexer):
- """
- For `Silver <https://bitbucket.org/viperproject/silver>`_ source code.
-
- .. versionadded:: 2.2
- """
- name = 'Silver'
- aliases = ['silver']
- filenames = ['*.sil', '*.vpr']
-
- tokens = {
- 'root': [
- # Whitespace and Comments
+ (r"([{}():;,.])", Punctuation),
+ # Identifier
+ (r'[a-zA-Z_]\w*', Name),
+ ],
+ 'comment': [
+ (r'[^*/]+', Comment.Multiline),
+ (r'/\*', Comment.Multiline, '#push'),
+ (r'\*/', Comment.Multiline, '#pop'),
+ (r'[*/]', Comment.Multiline),
+ ],
+ 'numbers': [
+ (r'[0-9]+', Number.Integer),
+ ],
+ }
+
+
+class SilverLexer(RegexLexer):
+ """
+ For `Silver <https://bitbucket.org/viperproject/silver>`_ source code.
+
+ .. versionadded:: 2.2
+ """
+ name = 'Silver'
+ aliases = ['silver']
+ filenames = ['*.sil', '*.vpr']
+
+ tokens = {
+ 'root': [
+ # Whitespace and Comments
(r'\n', Text),
(r'\s+', Text),
(r'\\\n', Text), # line continuation
- (r'//[/!](.*?)\n', Comment.Doc),
- (r'//(.*?)\n', Comment.Single),
- (r'/\*', Comment.Multiline, 'comment'),
-
- (words((
- 'result', 'true', 'false', 'null', 'method', 'function',
- 'predicate', 'program', 'domain', 'axiom', 'var', 'returns',
+ (r'//[/!](.*?)\n', Comment.Doc),
+ (r'//(.*?)\n', Comment.Single),
+ (r'/\*', Comment.Multiline, 'comment'),
+
+ (words((
+ 'result', 'true', 'false', 'null', 'method', 'function',
+ 'predicate', 'program', 'domain', 'axiom', 'var', 'returns',
'field', 'define', 'fold', 'unfold', 'inhale', 'exhale', 'new', 'assert',
- 'assume', 'goto', 'while', 'if', 'elseif', 'else', 'fresh',
- 'constraining', 'Seq', 'Set', 'Multiset', 'union', 'intersection',
- 'setminus', 'subset', 'unfolding', 'in', 'old', 'forall', 'exists',
- 'acc', 'wildcard', 'write', 'none', 'epsilon', 'perm', 'unique',
- 'apply', 'package', 'folding', 'label', 'forperm'),
- suffix=r'\b'), Keyword),
+ 'assume', 'goto', 'while', 'if', 'elseif', 'else', 'fresh',
+ 'constraining', 'Seq', 'Set', 'Multiset', 'union', 'intersection',
+ 'setminus', 'subset', 'unfolding', 'in', 'old', 'forall', 'exists',
+ 'acc', 'wildcard', 'write', 'none', 'epsilon', 'perm', 'unique',
+ 'apply', 'package', 'folding', 'label', 'forperm'),
+ suffix=r'\b'), Keyword),
(words(('requires', 'ensures', 'invariant'), suffix=r'\b'), Name.Decorator),
(words(('Int', 'Perm', 'Bool', 'Ref', 'Rational'), suffix=r'\b'), Keyword.Type),
- include('numbers'),
- (r'[!%&*+=|?:<>/\-\[\]]', Operator),
+ include('numbers'),
+ (r'[!%&*+=|?:<>/\-\[\]]', Operator),
(r'\{.*?\}', Generic.Emph), #triggers
- (r'([{}():;,.])', Punctuation),
- # Identifier
- (r'[\w$]\w*', Name),
- ],
- 'comment': [
- (r'[^*/]+', Comment.Multiline),
- (r'/\*', Comment.Multiline, '#push'),
- (r'\*/', Comment.Multiline, '#pop'),
- (r'[*/]', Comment.Multiline),
- ],
- 'numbers': [
- (r'[0-9]+', Number.Integer),
- ],
- }
+ (r'([{}():;,.])', Punctuation),
+ # Identifier
+ (r'[\w$]\w*', Name),
+ ],
+ 'comment': [
+ (r'[^*/]+', Comment.Multiline),
+ (r'/\*', Comment.Multiline, '#push'),
+ (r'\*/', Comment.Multiline, '#pop'),
+ (r'[*/]', Comment.Multiline),
+ ],
+ 'numbers': [
+ (r'[0-9]+', Number.Integer),
+ ],
+ }