3
V'íc´ ã @ sf d Z ddlmZmZmZmZmZ ddlmZm Z m
Z
mZmZm
Z
mZmZmZ dgZG dd deZdS )zØ
pygments.lexers.devicetree
~~~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for Devicetree language.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
é )Ú
RegexLexerÚbygroupsÚincludeÚdefaultÚwords) ÚCommentÚKeywordÚNameÚNumberÚOperatorÚPunctuationÚStringÚTextÚ
WhitespaceÚDevicetreeLexerc @ sò e Zd ZdZdZdZddgZddgZdgZd Z d
e d e
ejej
ejfde d e
ejej
ejfd
e d e
ejej
ejfd
e d e
ejej
ejefgdefdefdefdejfdej
fdej
fgde
ejedfdejfdejfde
ejeedfed?d(d)ejfd*efd+efd,e d- efd.ejfg ed/ed0d1e d2 e
ej eejej
ed3fe!d4ged/ed5d6edfged/ed0d1e d2 e
ej eejej
ed7fed5d8edfd6efgd9edfd:ej"fd;efdefd<efgd=Z#d>S )@r z@
Lexer for Devicetree files.
.. versionadded:: 2.7
Z
Devicetreezhttps://www.devicetree.org/Z
devicetreeZdtsz*.dtsz*.dtsiztext/x-cz\s*(?:/[*][^*/]*?[*]/\s*)*z(#include)(z )([^\n]+)z
(#define)(z(/[^*/{]+/)(z)("[^\n{]+")z)([^\n;{]*)([;]?)z\nz\s+z\\\nz//(\n|[\w\W]*?[^\\]\n)z/(\\\n)?[*][\w\W]*?[*](\\\n)?/z/(\\\n)?[*][\w\W]*z(L?)(")Ústringz0x[0-9a-fA-F]+z\d+z([^\s{}/*]*)(\s*)(:)z#popÚ
compatibleÚmodelÚphandleÚstatusú#address-cellsú#size-cellsÚregúvirtual-regÚrangesú
dma-rangesÚdevice_typeÚnamez\b)Úsuffixz([~!%^&*+=|?:<>/#-])z[()\[\]{},.]z/[a-zA-Z_][\w-]*(?=(?:\s*,\s*[a-zA-Z_][\w-]*|(?:z))*\s*[=;])z[a-zA-Z_]\w*Ú
whitespaceÚmacroz)([^/*@\s&]+|/)(@?)((?:0x)?[0-9a-fA-F,]*)(z)(\{)ÚnodeÚ statementÚ
statementsú;z#pushz\};ú"zO\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|[0-7]{1,3})z [^\\"\n]+z\\)r r r# Úrootr"