ThirdParty/Pygments/pygments/lexers/prolog.py

changeset 6651
e8f3b5568b21
parent 5713
6762afd9f963
equal deleted inserted replaced
6650:1dd52aa8897c 6651:e8f3b5568b21
55 Operator), 55 Operator),
56 (r'(mod|div|not)\b', Operator), 56 (r'(mod|div|not)\b', Operator),
57 (r'_', Keyword), # The don't-care variable 57 (r'_', Keyword), # The don't-care variable
58 (r'([a-z]+)(:)', bygroups(Name.Namespace, Punctuation)), 58 (r'([a-z]+)(:)', bygroups(Name.Namespace, Punctuation)),
59 (u'([a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]' 59 (u'([a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]'
60 u'[\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*)' 60 u'[\\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*)'
61 u'(\\s*)(:-|-->)', 61 u'(\\s*)(:-|-->)',
62 bygroups(Name.Function, Text, Operator)), # function defn 62 bygroups(Name.Function, Text, Operator)), # function defn
63 (u'([a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]' 63 (u'([a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]'
64 u'[\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*)' 64 u'[\\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*)'
65 u'(\\s*)(\\()', 65 u'(\\s*)(\\()',
66 bygroups(Name.Function, Text, Punctuation)), 66 bygroups(Name.Function, Text, Punctuation)),
67 (u'[a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]' 67 (u'[a-z\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]'
68 u'[\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*', 68 u'[\\w$\u00c0-\u1fff\u3040-\ud7ff\ue000-\uffef]*',
69 String.Atom), # atom, characters 69 String.Atom), # atom, characters
70 # This one includes ! 70 # This one includes !
71 (u'[#&*+\\-./:<=>?@\\\\^~\u00a1-\u00bf\u2010-\u303f]+', 71 (u'[#&*+\\-./:<=>?@\\\\^~\u00a1-\u00bf\u2010-\u303f]+',
72 String.Atom), # atom, graphics 72 String.Atom), # atom, graphics
73 (r'[A-Z_]\w*', Name.Variable), 73 (r'[A-Z_]\w*', Name.Variable),
298 return 1.0 298 return 1.0
299 elif ':- protocol(' in text: 299 elif ':- protocol(' in text:
300 return 1.0 300 return 1.0
301 elif ':- category(' in text: 301 elif ':- category(' in text:
302 return 1.0 302 return 1.0
303 elif re.search('^:-\s[a-z]', text, re.M): 303 elif re.search(r'^:-\s[a-z]', text, re.M):
304 return 0.9 304 return 0.9
305 else: 305 else:
306 return 0.0 306 return 0.0

eric ide

mercurial