ThirdParty/Pygments/pygments/lexers/oberon.py

changeset 5713
6762afd9f963
parent 4697
c2e9bf425554
equal deleted inserted replaced
5712:f0d08bdeacf4 5713:6762afd9f963
3 pygments.lexers.oberon 3 pygments.lexers.oberon
4 ~~~~~~~~~~~~~~~~~~~~~~ 4 ~~~~~~~~~~~~~~~~~~~~~~
5 5
6 Lexers for Oberon family languages. 6 Lexers for Oberon family languages.
7 7
8 :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. 8 :copyright: Copyright 2006-2017 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
45 'whitespace': [ 45 'whitespace': [
46 (r'\n+', Text), # blank lines 46 (r'\n+', Text), # blank lines
47 (r'\s+', Text), # whitespace 47 (r'\s+', Text), # whitespace
48 ], 48 ],
49 'comments': [ 49 'comments': [
50 (r'\(\*([^\$].*?)\*\)', Comment.Multiline), 50 (r'\(\*([^$].*?)\*\)', Comment.Multiline),
51 # TODO: nested comments (* (* ... *) ... (* ... *) *) not supported! 51 # TODO: nested comments (* (* ... *) ... (* ... *) *) not supported!
52 ], 52 ],
53 'punctuation': [ 53 'punctuation': [
54 (r'[\(\)\[\]\{\},.:;\|]', Punctuation), 54 (r'[()\[\]{},.:;|]', Punctuation),
55 ], 55 ],
56 'numliterals': [ 56 'numliterals': [
57 (r'[0-9A-F]+X\b', Number.Hex), # char code 57 (r'[0-9A-F]+X\b', Number.Hex), # char code
58 (r'[0-9A-F]+[HL]\b', Number.Hex), # hexadecimal number 58 (r'[0-9A-F]+[HL]\b', Number.Hex), # hexadecimal number
59 (r'[0-9]+\.[0-9]+E[+-][0-9]+', Number.Float), # real number 59 (r'[0-9]+\.[0-9]+E[+-][0-9]+', Number.Float), # real number
81 # Range Constructor 81 # Range Constructor
82 (r'\.\.', Operator), 82 (r'\.\.', Operator),
83 (r'\$', Operator), 83 (r'\$', Operator),
84 ], 84 ],
85 'identifiers': [ 85 'identifiers': [
86 (r'([a-zA-Z_\$][\w\$]*)', Name), 86 (r'([a-zA-Z_$][\w$]*)', Name),
87 ], 87 ],
88 'builtins': [ 88 'builtins': [
89 (words(( 89 (words((
90 'ANYPTR', 'ANYREC', 'BOOLEAN', 'BYTE', 'CHAR', 'INTEGER', 'LONGINT', 90 'ANYPTR', 'ANYREC', 'BOOLEAN', 'BYTE', 'CHAR', 'INTEGER', 'LONGINT',
91 'REAL', 'SET', 'SHORTCHAR', 'SHORTINT', 'SHORTREAL' 91 'REAL', 'SET', 'SHORTCHAR', 'SHORTINT', 'SHORTREAL'

eric ide

mercurial