You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CMSIS-DSP/Testing/TestScripts/desc.py

20 lines
703 B
Python

from pygments.lexer import RegexLexer, bygroups,words
from pygments.token import *
class CustomLexer(RegexLexer):
name = 'Example Lexer for test desc'
tokens = {
'root': [
(words(("group","suite","class","folder","ParamList")), Keyword),
(words(("Pattern","Output","Params","oldID")), Keyword.Type),
(words(("Summary","Names","Formula","Functions")), Name.Function),
(r'\"[^\"]*\"',String),
(r'[a-zA-Z_][a-zA-Z_0-9\.]*',Text),
(r'[-+]?[0-9]+',Number),
(r'([=:\[\]]|->)',Operator),
(r'[\s\t]+',Text),
(r'[,{}]',Text),
(r'//.*?$', Comment.Singleline),
]
}