o as@sbdZddlZddlmZmZmZddlmZmZm Z m Z m Z m Z m Z mZdgZGdddeZdS)z pygments.lexers.oberon ~~~~~~~~~~~~~~~~~~~~~~ Lexers for Oberon family languages. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. N) RegexLexerincludewords)TextCommentOperatorKeywordNameStringNumber PunctuationComponentPascalLexerc@s8eZdZdZdZddgZddgZdgZej ej BZ e de d e d e d e d e d e de dgde fde fgdejfgdefgdejfdejfdejfdejfdejfgdefdefgdefdefdefdefdefd efd!efd"efd#efg d$efged%d&d'ejfed(d&d'ejfd)ejfgd* Zd+d,Zd-S).r zp For `Component Pascal `_ source code. .. versionadded:: 2.1 zComponent Pascalcomponentpascalcpz*.cpz*.cpsztext/x-component-pascal whitespacecomments punctuation numliteralsstrings operatorsbuiltins identifiersz\n+z\s+z\(\*([^$].*?)\*\)z[()\[\]{},.:;|]z [0-9A-F]+X\bz[0-9A-F]+[HL]\bz[0-9]+\.[0-9]+E[+-][0-9]+z[0-9]+\.[0-9]+z[0-9]+z '[^\n']*'z "[^\n"]*"z[+-]z[*/]z[=#<>]z\^&~z:=z\.\.z\$z([a-zA-Z_$][\w$]*)) ANYPTRANYRECBOOLEANBYTECHARINTEGERLONGINTREALSET SHORTCHARSHORTINT SHORTREALz\b)suffix)>ABSABSTRACTARRAYASHASSERTBEGINBITSBYCAPCASECHRCLOSECONSTDECDIVDOELSEELSIFEMPTYENDENTIEREXCLEXIT EXTENSIBLEFORHALTIFIMPORTININCINCLISLENLIMITEDLONGLOOPMAXMINMODMODULENEWODDOFORORDOUTPOINTER PROCEDURERECORDREPEATRETURNSHORTr#r$SIZETHENTYPETOUNTILVARWHILEWITHz(TRUE|FALSE|NIL|INF)\b) rootrrrrrrrrcCsHd}d|vr |d7}d|vr|d7}d|vr|d7}d|vr"|d7}|S)zThe only other lexer using .cp is the C++ one, so we check if for a few common Pascal keywords here. Those are unfortunately quite common across various business languages as well.rr,g{Gz?r:rV)textresultrdrd8/usr/lib/python3/dist-packages/pygments/lexers/oberon.py analyse_textjsz!ComponentPascalLexer.analyse_textN)__name__ __module__ __qualname____doc__namealiases filenames mimetypesre MULTILINEDOTALLflagsrrr Multiliner r HexFloatIntegerr rr rrTypeReservedConstanttokensrhrdrdrdrgr st      I)rlrqpygments.lexerrrrpygments.tokenrrrrr r r r __all__r rdrdrdrgs  (