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

changeset 7983
54c5cfbb1e29
parent 7701
25f42e208e08
equal deleted inserted replaced
7982:48d210e41c65 7983:54c5cfbb1e29
3 pygments.lexers.ecl 3 pygments.lexers.ecl
4 ~~~~~~~~~~~~~~~~~~~ 4 ~~~~~~~~~~~~~~~~~~~
5 5
6 Lexers for the ECL language. 6 Lexers for the ECL language.
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
19 19
20 20
21 class ECLLexer(RegexLexer): 21 class ECLLexer(RegexLexer):
22 """ 22 """
23 Lexer for the declarative big-data `ECL 23 Lexer for the declarative big-data `ECL
24 <http://hpccsystems.com/community/docs/ecl-language-reference/html>`_ 24 <https://hpccsystems.com/training/documentation/ecl-language-reference/html>`_
25 language. 25 language.
26 26
27 .. versionadded:: 1.5 27 .. versionadded:: 1.5
28 """ 28 """
29 29
121 (r'"', String, '#pop'), 121 (r'"', String, '#pop'),
122 (r'\'', String, '#pop'), 122 (r'\'', String, '#pop'),
123 (r'[^"\']+', String), 123 (r'[^"\']+', String),
124 ], 124 ],
125 } 125 }
126
127 def analyse_text(text):
128 """This is very difficult to guess relative to other business languages.
129 <- in conjuction with BEGIN/END seems relatively rare though."""
130 result = 0
131
132 if '<-' in text:
133 result += 0.01
134 if 'BEGIN' in text:
135 result += 0.01
136 if 'END' in text:
137 result += 0.01
138
139 return result

eric ide

mercurial