eric6/ThirdParty/Pygments/pygments/lexers/prolog.py

changeset 7983
54c5cfbb1e29
parent 7701
25f42e208e08
equal deleted inserted replaced
7982:48d210e41c65 7983:54c5cfbb1e29
3 pygments.lexers.prolog 3 pygments.lexers.prolog
4 ~~~~~~~~~~~~~~~~~~~~~~ 4 ~~~~~~~~~~~~~~~~~~~~~~
5 5
6 Lexers for Prolog and Prolog-like languages. 6 Lexers for Prolog and Prolog-like languages.
7 7
8 :copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS. 8 :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
9 :license: BSD, see LICENSE for details. 9 :license: BSD, see LICENSE for details.
10 """ 10 """
11 11
12 import re 12 import re
13 13
225 # Mode operators 225 # Mode operators
226 (r'[?@]', Operator), 226 (r'[?@]', Operator),
227 # Existential quantifier 227 # Existential quantifier
228 (r'\^', Operator), 228 (r'\^', Operator),
229 # Strings 229 # Strings
230 (r'"(\\\\|\\"|[^"])*"', String), 230 (r'"(\\\\|\\[^\\]|[^"\\])*"', String),
231 # Punctuation 231 # Punctuation
232 (r'[()\[\],.|]', Text), 232 (r'[()\[\],.|]', Text),
233 # Atoms 233 # Atoms
234 (r"[a-z][a-zA-Z0-9_]*", Text), 234 (r"[a-z][a-zA-Z0-9_]*", Text),
235 (r"'", String, 'quoted_atom'), 235 (r"'", String, 'quoted_atom'),
275 (r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable), 275 (r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable),
276 # Atoms 276 # Atoms
277 (r"[a-z][a-zA-Z0-9_]*", Text), 277 (r"[a-z][a-zA-Z0-9_]*", Text),
278 (r"'", String, 'quoted_atom'), 278 (r"'", String, 'quoted_atom'),
279 # Strings 279 # Strings
280 (r'"(\\\\|\\"|[^"])*"', String), 280 (r'"(\\\\|\\[^\\]|[^"\\])*"', String),
281 # End of entity-opening directive 281 # End of entity-opening directive
282 (r'([)]\.)', Text, 'root'), 282 (r'([)]\.)', Text, 'root'),
283 # Scope operator 283 # Scope operator
284 (r'(::)', Operator), 284 (r'(::)', Operator),
285 # Punctuation 285 # Punctuation

eric ide

mercurial