""" pygments.lexers.tal ~~~~~~~~~~~~~~~~~~~ Lexer for Uxntal .. versionadded:: 2.12 :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, words from pygments.token import Comment, Keyword, Name, String, Number, Punctuation, Whitespace, Literal __all__ = ['TalLexer'] class TalLexer(RegexLexer): """ For `Uxntal `_ source code. .. versionadded:: 2.12 """ name = 'Tal' aliases = ['tal', 'uxntal'] filenames = ['*.tal'] mimetypes = ['text/x-uxntal'] instructions = [ 'BRK', 'LIT', 'INC', 'POP', 'DUP', 'NIP', 'SWP', 'OVR', 'ROT', 'EQU', 'NEQ', 'GTH', 'LTH', 'JMP', 'JCN', 'JSR', 'STH', 'LDZ', 'STZ', 'LDR', 'STR', 'LDA', 'STA', 'DEI', 'DEO', 'ADD', 'SUB', 'MUL', 'DIV', 'AND', 'ORA', 'EOR', 'SFT' ] tokens = { # the comment delimiters must not be adjacent to non-space characters. # this means ( foo ) is a valid comment but (foo) is not. this also # applies to nested comments. 'comment': [ (r'(?