/pygments/lexers/other.py
Python | 1390 lines | 1193 code | 53 blank | 144 comment | 14 complexity | c14fd0f30191228040912a7d5c867e26 MD5 | raw file
Possible License(s): BSD-2-Clause
Large files files are truncated, but you can click here to view the full file
- # -*- coding: utf-8 -*-
- """
- pygments.lexers.other
- ~~~~~~~~~~~~~~~~~~~~~
- Lexers for other languages.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
- :license: BSD, see LICENSE for details.
- """
- import re
- from pygments.lexer import RegexLexer, include, bygroups, using, \
- this, combined, ExtendedRegexLexer
- from pygments.token import Error, Punctuation, Literal, Token, \
- Text, Comment, Operator, Keyword, Name, String, Number, Generic
- from pygments.lexers.web import HtmlLexer
- # backwards compatibility
- from pygments.lexers.sql import SqlLexer, MySqlLexer, SqliteConsoleLexer
- from pygments.lexers.shell import BashLexer, BashSessionLexer, BatchLexer, \
- TcshLexer
- __all__ = ['BrainfuckLexer', 'BefungeLexer', 'RedcodeLexer', 'MOOCodeLexer',
- 'SmalltalkLexer', 'LogtalkLexer', 'GnuplotLexer', 'PovrayLexer',
- 'AppleScriptLexer', 'ModelicaLexer', 'RebolLexer', 'ABAPLexer',
- 'NewspeakLexer', 'GherkinLexer', 'AsymptoteLexer', 'PostScriptLexer',
- 'AutohotkeyLexer', 'GoodDataCLLexer', 'MaqlLexer', 'ProtoBufLexer',
- 'HybrisLexer', 'AwkLexer', 'Cfengine3Lexer', 'SnobolLexer',
- 'ECLLexer', 'UrbiscriptLexer', 'OpenEdgeLexer', 'BroLexer']
- class ECLLexer(RegexLexer):
- """
- Lexer for the declarative big-data `ECL
- <http://hpccsystems.com/community/docs/ecl-language-reference/html>`_
- language.
- *New in Pygments 1.5.*
- """
- name = 'ECL'
- aliases = ['ecl']
- filenames = ['*.ecl']
- mimetypes = ['application/x-ecl']
- flags = re.IGNORECASE | re.MULTILINE
- tokens = {
- 'root': [
- include('whitespace'),
- include('statements'),
- ],
- 'whitespace': [
- (r'\s+', Text),
- (r'\/\/.*', Comment.Single),
- (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
- ],
- 'statements': [
- include('types'),
- include('keywords'),
- include('functions'),
- include('hash'),
- (r'"', String, 'string'),
- (r'\'', String, 'string'),
- (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float),
- (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
- (r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex),
- (r'0[0-7]+[LlUu]*', Number.Oct),
- (r'\d+[LlUu]*', Number.Integer),
- (r'\*/', Error),
- (r'[~!%^&*+=|?:<>/-]+', Operator),
- (r'[{}()\[\],.;]', Punctuation),
- (r'[a-zA-Z_][a-zA-Z0-9_]*', Name),
- ],
- 'hash': [
- (r'^#.*$', Comment.Preproc),
- ],
- 'types': [
- (r'(RECORD|END)[^\d]', Keyword.Declaration),
- (r'((?:ASCII|BIG_ENDIAN|BOOLEAN|DATA|DECIMAL|EBCDIC|INTEGER|PATTERN|'
- r'QSTRING|REAL|RECORD|RULE|SET OF|STRING|TOKEN|UDECIMAL|UNICODE|'
- r'UNSIGNED|VARSTRING|VARUNICODE)\d*)(\s+)',
- bygroups(Keyword.Type, Text)),
- ],
- 'keywords': [
- (r'(APPLY|ASSERT|BUILD|BUILDINDEX|EVALUATE|FAIL|KEYDIFF|KEYPATCH|'
- r'LOADXML|NOTHOR|NOTIFY|OUTPUT|PARALLEL|SEQUENTIAL|SOAPCALL|WAIT'
- r'CHECKPOINT|DEPRECATED|FAILCODE|FAILMESSAGE|FAILURE|GLOBAL|'
- r'INDEPENDENT|ONWARNING|PERSIST|PRIORITY|RECOVERY|STORED|SUCCESS|'
- r'WAIT|WHEN)\b', Keyword.Reserved),
- # These are classed differently, check later
- (r'(ALL|AND|ANY|AS|ATMOST|BEFORE|BEGINC\+\+|BEST|BETWEEN|CASE|CONST|'
- r'COUNTER|CSV|DESCEND|ENCRYPT|ENDC\+\+|ENDMACRO|EXCEPT|EXCLUSIVE|'
- r'EXPIRE|EXPORT|EXTEND|FALSE|FEW|FIRST|FLAT|FULL|FUNCTION|GROUP|'
- r'HEADER|HEADING|HOLE|IFBLOCK|IMPORT|IN|JOINED|KEEP|KEYED|LAST|'
- r'LEFT|LIMIT|LOAD|LOCAL|LOCALE|LOOKUP|MACRO|MANY|MAXCOUNT|'
- r'MAXLENGTH|MIN SKEW|MODULE|INTERFACE|NAMED|NOCASE|NOROOT|NOSCAN|'
- r'NOSORT|NOT|OF|ONLY|OPT|OR|OUTER|OVERWRITE|PACKED|PARTITION|'
- r'PENALTY|PHYSICALLENGTH|PIPE|QUOTE|RELATIONSHIP|REPEAT|RETURN|'
- r'RIGHT|SCAN|SELF|SEPARATOR|SERVICE|SHARED|SKEW|SKIP|SQL|STORE|'
- r'TERMINATOR|THOR|THRESHOLD|TOKEN|TRANSFORM|TRIM|TRUE|TYPE|'
- r'UNICODEORDER|UNSORTED|VALIDATE|VIRTUAL|WHOLE|WILD|WITHIN|XML|'
- r'XPATH|__COMPRESSED__)\b', Keyword.Reserved),
- ],
- 'functions': [
- (r'(ABS|ACOS|ALLNODES|ASCII|ASIN|ASSTRING|ATAN|ATAN2|AVE|CASE|'
- r'CHOOSE|CHOOSEN|CHOOSESETS|CLUSTERSIZE|COMBINE|CORRELATION|COS|'
- r'COSH|COUNT|COVARIANCE|CRON|DATASET|DEDUP|DEFINE|DENORMALIZE|'
- r'DISTRIBUTE|DISTRIBUTED|DISTRIBUTION|EBCDIC|ENTH|ERROR|EVALUATE|'
- r'EVENT|EVENTEXTRA|EVENTNAME|EXISTS|EXP|FAILCODE|FAILMESSAGE|'
- r'FETCH|FROMUNICODE|GETISVALID|GLOBAL|GRAPH|GROUP|HASH|HASH32|'
- r'HASH64|HASHCRC|HASHMD5|HAVING|IF|INDEX|INTFORMAT|ISVALID|'
- r'ITERATE|JOIN|KEYUNICODE|LENGTH|LIBRARY|LIMIT|LN|LOCAL|LOG|LOOP|'
- r'MAP|MATCHED|MATCHLENGTH|MATCHPOSITION|MATCHTEXT|MATCHUNICODE|'
- r'MAX|MERGE|MERGEJOIN|MIN|NOLOCAL|NONEMPTY|NORMALIZE|PARSE|PIPE|'
- r'POWER|PRELOAD|PROCESS|PROJECT|PULL|RANDOM|RANGE|RANK|RANKED|'
- r'REALFORMAT|RECORDOF|REGEXFIND|REGEXREPLACE|REGROUP|REJECTED|'
- r'ROLLUP|ROUND|ROUNDUP|ROW|ROWDIFF|SAMPLE|SET|SIN|SINH|SIZEOF|'
- r'SOAPCALL|SORT|SORTED|SQRT|STEPPED|STORED|SUM|TABLE|TAN|TANH|'
- r'THISNODE|TOPN|TOUNICODE|TRANSFER|TRIM|TRUNCATE|TYPEOF|UNGROUP|'
- r'UNICODEORDER|VARIANCE|WHICH|WORKUNIT|XMLDECODE|XMLENCODE|'
- r'XMLTEXT|XMLUNICODE)\b', Name.Function),
- ],
- 'string': [
- (r'"', String, '#pop'),
- (r'\'', String, '#pop'),
- (r'[^"\']+', String),
- ],
- }
- class BrainfuckLexer(RegexLexer):
- """
- Lexer for the esoteric `BrainFuck <http://www.muppetlabs.com/~breadbox/bf/>`_
- language.
- """
- name = 'Brainfuck'
- aliases = ['brainfuck', 'bf']
- filenames = ['*.bf', '*.b']
- mimetypes = ['application/x-brainfuck']
- tokens = {
- 'common': [
- # use different colors for different instruction types
- (r'[.,]+', Name.Tag),
- (r'[+-]+', Name.Builtin),
- (r'[<>]+', Name.Variable),
- (r'[^.,+\-<>\[\]]+', Comment),
- ],
- 'root': [
- (r'\[', Keyword, 'loop'),
- (r'\]', Error),
- include('common'),
- ],
- 'loop': [
- (r'\[', Keyword, '#push'),
- (r'\]', Keyword, '#pop'),
- include('common'),
- ]
- }
- class BefungeLexer(RegexLexer):
- """
- Lexer for the esoteric `Befunge <http://en.wikipedia.org/wiki/Befunge>`_
- language.
- *New in Pygments 0.7.*
- """
- name = 'Befunge'
- aliases = ['befunge']
- filenames = ['*.befunge']
- mimetypes = ['application/x-befunge']
- tokens = {
- 'root': [
- (r'[0-9a-f]', Number),
- (r'[\+\*/%!`-]', Operator), # Traditional math
- (r'[<>^v?\[\]rxjk]', Name.Variable), # Move, imperatives
- (r'[:\\$.,n]', Name.Builtin), # Stack ops, imperatives
- (r'[|_mw]', Keyword),
- (r'[{}]', Name.Tag), # Befunge-98 stack ops
- (r'".*?"', String.Double), # Strings don't appear to allow escapes
- (r'\'.', String.Single), # Single character
- (r'[#;]', Comment), # Trampoline... depends on direction hit
- (r'[pg&~=@iotsy]', Keyword), # Misc
- (r'[()A-Z]', Comment), # Fingerprints
- (r'\s+', Text), # Whitespace doesn't matter
- ],
- }
- class RedcodeLexer(RegexLexer):
- """
- A simple Redcode lexer based on ICWS'94.
- Contributed by Adam Blinkinsop <blinks@acm.org>.
- *New in Pygments 0.8.*
- """
- name = 'Redcode'
- aliases = ['redcode']
- filenames = ['*.cw']
- opcodes = ['DAT','MOV','ADD','SUB','MUL','DIV','MOD',
- 'JMP','JMZ','JMN','DJN','CMP','SLT','SPL',
- 'ORG','EQU','END']
- modifiers = ['A','B','AB','BA','F','X','I']
- tokens = {
- 'root': [
- # Whitespace:
- (r'\s+', Text),
- (r';.*$', Comment.Single),
- # Lexemes:
- # Identifiers
- (r'\b(%s)\b' % '|'.join(opcodes), Name.Function),
- (r'\b(%s)\b' % '|'.join(modifiers), Name.Decorator),
- (r'[A-Za-z_][A-Za-z_0-9]+', Name),
- # Operators
- (r'[-+*/%]', Operator),
- (r'[#$@<>]', Operator), # mode
- (r'[.,]', Punctuation), # mode
- # Numbers
- (r'[-+]?\d+', Number.Integer),
- ],
- }
- class MOOCodeLexer(RegexLexer):
- """
- For `MOOCode <http://www.moo.mud.org/>`_ (the MOO scripting
- language).
- *New in Pygments 0.9.*
- """
- name = 'MOOCode'
- filenames = ['*.moo']
- aliases = ['moocode']
- mimetypes = ['text/x-moocode']
- tokens = {
- 'root' : [
- # Numbers
- (r'(0|[1-9][0-9_]*)', Number.Integer),
- # Strings
- (r'"(\\\\|\\"|[^"])*"', String),
- # exceptions
- (r'(E_PERM|E_DIV)', Name.Exception),
- # db-refs
- (r'((#[-0-9]+)|(\$[a-z_A-Z0-9]+))', Name.Entity),
- # Keywords
- (r'\b(if|else|elseif|endif|for|endfor|fork|endfork|while'
- r'|endwhile|break|continue|return|try'
- r'|except|endtry|finally|in)\b', Keyword),
- # builtins
- (r'(random|length)', Name.Builtin),
- # special variables
- (r'(player|caller|this|args)', Name.Variable.Instance),
- # skip whitespace
- (r'\s+', Text),
- (r'\n', Text),
- # other operators
- (r'([!;=,{}&\|:\.\[\]@\(\)\<\>\?]+)', Operator),
- # function call
- (r'([a-z_A-Z0-9]+)(\()', bygroups(Name.Function, Operator)),
- # variables
- (r'([a-zA-Z_0-9]+)', Text),
- ]
- }
- class SmalltalkLexer(RegexLexer):
- """
- For `Smalltalk <http://www.smalltalk.org/>`_ syntax.
- Contributed by Stefan Matthias Aust.
- Rewritten by Nils Winter.
- *New in Pygments 0.10.*
- """
- name = 'Smalltalk'
- filenames = ['*.st']
- aliases = ['smalltalk', 'squeak']
- mimetypes = ['text/x-smalltalk']
- tokens = {
- 'root' : [
- (r'(<)(\w+:)(.*?)(>)', bygroups(Text, Keyword, Text, Text)),
- include('squeak fileout'),
- include('whitespaces'),
- include('method definition'),
- (r'(\|)([\w\s]*)(\|)', bygroups(Operator, Name.Variable, Operator)),
- include('objects'),
- (r'\^|\:=|\_', Operator),
- # temporaries
- (r'[\]({}.;!]', Text),
- ],
- 'method definition' : [
- # Not perfect can't allow whitespaces at the beginning and the
- # without breaking everything
- (r'([a-zA-Z]+\w*:)(\s*)(\w+)',
- bygroups(Name.Function, Text, Name.Variable)),
- (r'^(\b[a-zA-Z]+\w*\b)(\s*)$', bygroups(Name.Function, Text)),
- (r'^([-+*/\\~<>=|&!?,@%]+)(\s*)(\w+)(\s*)$',
- bygroups(Name.Function, Text, Name.Variable, Text)),
- ],
- 'blockvariables' : [
- include('whitespaces'),
- (r'(:)(\s*)([A-Za-z\w]+)',
- bygroups(Operator, Text, Name.Variable)),
- (r'\|', Operator, '#pop'),
- (r'', Text, '#pop'), # else pop
- ],
- 'literals' : [
- (r'\'[^\']*\'', String, 'afterobject'),
- (r'\$.', String.Char, 'afterobject'),
- (r'#\(', String.Symbol, 'parenth'),
- (r'\)', Text, 'afterobject'),
- (r'(\d+r)?-?\d+(\.\d+)?(e-?\d+)?', Number, 'afterobject'),
- ],
- '_parenth_helper' : [
- include('whitespaces'),
- (r'(\d+r)?-?\d+(\.\d+)?(e-?\d+)?', Number),
- (r'[-+*/\\~<>=|&#!?,@%\w+:]+', String.Symbol),
- # literals
- (r'\'[^\']*\'', String),
- (r'\$.', String.Char),
- (r'#*\(', String.Symbol, 'inner_parenth'),
- ],
- 'parenth' : [
- # This state is a bit tricky since
- # we can't just pop this state
- (r'\)', String.Symbol, ('root','afterobject')),
- include('_parenth_helper'),
- ],
- 'inner_parenth': [
- (r'\)', String.Symbol, '#pop'),
- include('_parenth_helper'),
- ],
- 'whitespaces' : [
- # skip whitespace and comments
- (r'\s+', Text),
- (r'"[^"]*"', Comment),
- ],
- 'objects' : [
- (r'\[', Text, 'blockvariables'),
- (r'\]', Text, 'afterobject'),
- (r'\b(self|super|true|false|nil|thisContext)\b',
- Name.Builtin.Pseudo, 'afterobject'),
- (r'\b[A-Z]\w*(?!:)\b', Name.Class, 'afterobject'),
- (r'\b[a-z]\w*(?!:)\b', Name.Variable, 'afterobject'),
- (r'#("[^"]*"|[-+*/\\~<>=|&!?,@%]+|[\w:]+)',
- String.Symbol, 'afterobject'),
- include('literals'),
- ],
- 'afterobject' : [
- (r'! !$', Keyword , '#pop'), # squeak chunk delimeter
- include('whitespaces'),
- (r'\b(ifTrue:|ifFalse:|whileTrue:|whileFalse:|timesRepeat:)',
- Name.Builtin, '#pop'),
- (r'\b(new\b(?!:))', Name.Builtin),
- (r'\:=|\_', Operator, '#pop'),
- (r'\b[a-zA-Z]+\w*:', Name.Function, '#pop'),
- (r'\b[a-zA-Z]+\w*', Name.Function),
- (r'\w+:?|[-+*/\\~<>=|&!?,@%]+', Name.Function, '#pop'),
- (r'\.', Punctuation, '#pop'),
- (r';', Punctuation),
- (r'[\])}]', Text),
- (r'[\[({]', Text, '#pop'),
- ],
- 'squeak fileout' : [
- # Squeak fileout format (optional)
- (r'^"[^"]*"!', Keyword),
- (r"^'[^']*'!", Keyword),
- (r'^(!)(\w+)( commentStamp: )(.*?)( prior: .*?!\n)(.*?)(!)',
- bygroups(Keyword, Name.Class, Keyword, String, Keyword, Text, Keyword)),
- (r'^(!)(\w+(?: class)?)( methodsFor: )(\'[^\']*\')(.*?!)',
- bygroups(Keyword, Name.Class, Keyword, String, Keyword)),
- (r'^(\w+)( subclass: )(#\w+)'
- r'(\s+instanceVariableNames: )(.*?)'
- r'(\s+classVariableNames: )(.*?)'
- r'(\s+poolDictionaries: )(.*?)'
- r'(\s+category: )(.*?)(!)',
- bygroups(Name.Class, Keyword, String.Symbol, Keyword, String, Keyword,
- String, Keyword, String, Keyword, String, Keyword)),
- (r'^(\w+(?: class)?)(\s+instanceVariableNames: )(.*?)(!)',
- bygroups(Name.Class, Keyword, String, Keyword)),
- (r'(!\n)(\].*)(! !)$', bygroups(Keyword, Text, Keyword)),
- (r'! !$', Keyword),
- ],
- }
- class LogtalkLexer(RegexLexer):
- """
- For `Logtalk <http://logtalk.org/>`_ source code.
- *New in Pygments 0.10.*
- """
- name = 'Logtalk'
- aliases = ['logtalk']
- filenames = ['*.lgt']
- mimetypes = ['text/x-logtalk']
- tokens = {
- 'root': [
- # Directives
- (r'^\s*:-\s',Punctuation,'directive'),
- # Comments
- (r'%.*?\n', Comment),
- (r'/\*(.|\n)*?\*/',Comment),
- # Whitespace
- (r'\n', Text),
- (r'\s+', Text),
- # Numbers
- (r"0'.", Number),
- (r'0b[01]+', Number),
- (r'0o[0-7]+', Number),
- (r'0x[0-9a-fA-F]+', Number),
- (r'\d+\.?\d*((e|E)(\+|-)?\d+)?', Number),
- # Variables
- (r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable),
- # Event handlers
- (r'(after|before)(?=[(])', Keyword),
- # Execution-context methods
- (r'(parameter|this|se(lf|nder))(?=[(])', Keyword),
- # Reflection
- (r'(current_predicate|predicate_property)(?=[(])', Keyword),
- # DCGs and term expansion
- (r'(expand_(goal|term)|(goal|term)_expansion|phrase)(?=[(])',
- Keyword),
- # Entity
- (r'(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])',
- Keyword),
- (r'(object|protocol|category)_property(?=[(])', Keyword),
- # Entity relations
- (r'co(mplements_object|nforms_to_protocol)(?=[(])', Keyword),
- (r'extends_(object|protocol|category)(?=[(])', Keyword),
- (r'imp(lements_protocol|orts_category)(?=[(])', Keyword),
- (r'(instantiat|specializ)es_class(?=[(])', Keyword),
- # Events
- (r'(current_event|(abolish|define)_events)(?=[(])', Keyword),
- # Flags
- (r'(current|set)_logtalk_flag(?=[(])', Keyword),
- # Compiling, loading, and library paths
- (r'logtalk_(compile|l(ibrary_path|oad_context|oad))(?=[(])',
- Keyword),
- # Database
- (r'(clause|retract(all)?)(?=[(])', Keyword),
- (r'a(bolish|ssert(a|z))(?=[(])', Keyword),
- # Control constructs
- (r'(ca(ll|tch)|throw)(?=[(])', Keyword),
- (r'(fail|true)\b', Keyword),
- # All solutions
- (r'((bag|set)of|f(ind|or)all)(?=[(])', Keyword),
- # Multi-threading meta-predicates
- (r'threaded(_(call|once|ignore|exit|peek|wait|notify))?(?=[(])',
- Keyword),
- # Term unification
- (r'unify_with_occurs_check(?=[(])', Keyword),
- # Term creation and decomposition
- (r'(functor|arg|copy_term|numbervars)(?=[(])', Keyword),
- # Evaluable functors
- (r'(rem|mod|abs|sign)(?=[(])', Keyword),
- (r'float(_(integer|fractional)_part)?(?=[(])', Keyword),
- (r'(floor|truncate|round|ceiling)(?=[(])', Keyword),
- # Other arithmetic functors
- (r'(cos|atan|exp|log|s(in|qrt))(?=[(])', Keyword),
- # Term testing
- (r'(var|atom(ic)?|integer|float|c(allable|ompound)|n(onvar|umber)|'
- r'ground)(?=[(])', Keyword),
- # Term comparison
- (r'compare(?=[(])', Keyword),
- # Stream selection and control
- (r'(curren|se)t_(in|out)put(?=[(])', Keyword),
- (r'(open|close)(?=[(])', Keyword),
- (r'flush_output(?=[(])', Keyword),
- (r'(at_end_of_stream|flush_output)\b', Keyword),
- (r'(stream_property|at_end_of_stream|set_stream_position)(?=[(])',
- Keyword),
- # Character and byte input/output
- (r'(nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])', Keyword),
- (r'\bnl\b', Keyword),
- # Term input/output
- (r'read(_term)?(?=[(])', Keyword),
- (r'write(q|_(canonical|term))?(?=[(])', Keyword),
- (r'(current_)?op(?=[(])', Keyword),
- (r'(current_)?char_conversion(?=[(])', Keyword),
- # Atomic term processing
- (r'atom_(length|c(hars|o(ncat|des)))(?=[(])', Keyword),
- (r'(char_code|sub_atom)(?=[(])', Keyword),
- (r'number_c(har|ode)s(?=[(])', Keyword),
- # Implementation defined hooks functions
- (r'(se|curren)t_prolog_flag(?=[(])', Keyword),
- (r'\bhalt\b', Keyword),
- (r'halt(?=[(])', Keyword),
- # Message sending operators
- (r'(::|:|\^\^)', Operator),
- # External call
- (r'[{}]', Keyword),
- # Logic and control
- (r'\b(ignore|once)(?=[(])', Keyword),
- (r'\brepeat\b', Keyword),
- # Sorting
- (r'(key)?sort(?=[(])', Keyword),
- # Bitwise functors
- (r'(>>|<<|/\\|\\\\|\\)', Operator),
- # Arithemtic evaluation
- (r'\bis\b', Keyword),
- # Arithemtic comparison
- (r'(=:=|=\\=|<|=<|>=|>)', Operator),
- # Term creation and decomposition
- (r'=\.\.', Operator),
- # Term unification
- (r'(=|\\=)', Operator),
- # Term comparison
- (r'(==|\\==|@=<|@<|@>=|@>)', Operator),
- # Evaluable functors
- (r'(//|[-+*/])', Operator),
- (r'\b(e|pi|mod|rem)\b', Operator),
- # Other arithemtic functors
- (r'\b\*\*\b', Operator),
- # DCG rules
- (r'-->', Operator),
- # Control constructs
- (r'([!;]|->)', Operator),
- # Logic and control
- (r'\\+', Operator),
- # Mode operators
- (r'[?@]', Operator),
- # Existential quantifier
- (r'\^', Operator),
- # Strings
- (r'"(\\\\|\\"|[^"])*"', String),
- # Ponctuation
- (r'[()\[\],.|]', Text),
- # Atoms
- (r"[a-z][a-zA-Z0-9_]*", Text),
- (r"[']", String, 'quoted_atom'),
- ],
- 'quoted_atom': [
- (r"['][']", String),
- (r"[']", String, '#pop'),
- (r'\\([\\abfnrtv"\']|(x[a-fA-F0-9]+|[0-7]+)\\)', String.Escape),
- (r"[^\\'\n]+", String),
- (r'\\', String),
- ],
- 'directive': [
- # Conditional compilation directives
- (r'(el)?if(?=[(])', Keyword, 'root'),
- (r'(e(lse|ndif))[.]', Keyword, 'root'),
- # Entity directives
- (r'(category|object|protocol)(?=[(])', Keyword, 'entityrelations'),
- (r'(end_(category|object|protocol))[.]',Keyword, 'root'),
- # Predicate scope directives
- (r'(public|protected|private)(?=[(])', Keyword, 'root'),
- # Other directives
- (r'e(n(coding|sure_loaded)|xport)(?=[(])', Keyword, 'root'),
- (r'in(fo|itialization)(?=[(])', Keyword, 'root'),
- (r'(dynamic|synchronized|threaded)[.]', Keyword, 'root'),
- (r'(alias|d(ynamic|iscontiguous)|m(eta_predicate|ode|ultifile)|'
- r's(et_(logtalk|prolog)_flag|ynchronized))(?=[(])',
- Keyword, 'root'),
- (r'op(?=[(])', Keyword, 'root'),
- (r'(c(alls|oinductive)|reexport|use(s|_module))(?=[(])',
- Keyword, 'root'),
- (r'[a-z][a-zA-Z0-9_]*(?=[(])', Text, 'root'),
- (r'[a-z][a-zA-Z0-9_]*[.]', Text, 'root'),
- ],
- 'entityrelations': [
- (r'(complements|extends|i(nstantiates|mp(lements|orts))|specializes)'
- r'(?=[(])', Keyword),
- # Numbers
- (r"0'.", Number),
- (r'0b[01]+', Number),
- (r'0o[0-7]+', Number),
- (r'0x[0-9a-fA-F]+', Number),
- (r'\d+\.?\d*((e|E)(\+|-)?\d+)?', Number),
- # Variables
- (r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable),
- # Atoms
- (r"[a-z][a-zA-Z0-9_]*", Text),
- (r"[']", String, 'quoted_atom'),
- # Strings
- (r'"(\\\\|\\"|[^"])*"', String),
- # End of entity-opening directive
- (r'([)]\.)', Text, 'root'),
- # Scope operator
- (r'(::)', Operator),
- # Ponctuation
- (r'[()\[\],.|]', Text),
- # Comments
- (r'%.*?\n', Comment),
- (r'/\*(.|\n)*?\*/',Comment),
- # Whitespace
- (r'\n', Text),
- (r'\s+', Text),
- ]
- }
- def analyse_text(text):
- if ':- object(' in text:
- return True
- if ':- protocol(' in text:
- return True
- if ':- category(' in text:
- return True
- return False
- def _shortened(word):
- dpos = word.find('$')
- return '|'.join([word[:dpos] + word[dpos+1:i] + r'\b'
- for i in range(len(word), dpos, -1)])
- def _shortened_many(*words):
- return '|'.join(map(_shortened, words))
- class GnuplotLexer(RegexLexer):
- """
- For `Gnuplot <http://gnuplot.info/>`_ plotting scripts.
- *New in Pygments 0.11.*
- """
- name = 'Gnuplot'
- aliases = ['gnuplot']
- filenames = ['*.plot', '*.plt']
- mimetypes = ['text/x-gnuplot']
- tokens = {
- 'root': [
- include('whitespace'),
- (_shortened('bi$nd'), Keyword, 'bind'),
- (_shortened_many('ex$it', 'q$uit'), Keyword, 'quit'),
- (_shortened('f$it'), Keyword, 'fit'),
- (r'(if)(\s*)(\()', bygroups(Keyword, Text, Punctuation), 'if'),
- (r'else\b', Keyword),
- (_shortened('pa$use'), Keyword, 'pause'),
- (_shortened_many('p$lot', 'rep$lot', 'sp$lot'), Keyword, 'plot'),
- (_shortened('sa$ve'), Keyword, 'save'),
- (_shortened('se$t'), Keyword, ('genericargs', 'optionarg')),
- (_shortened_many('sh$ow', 'uns$et'),
- Keyword, ('noargs', 'optionarg')),
- (_shortened_many('low$er', 'ra$ise', 'ca$ll', 'cd$', 'cl$ear',
- 'h$elp', '\\?$', 'hi$story', 'l$oad', 'pr$int',
- 'pwd$', 're$read', 'res$et', 'scr$eendump',
- 'she$ll', 'sy$stem', 'up$date'),
- Keyword, 'genericargs'),
- (_shortened_many('pwd$', 're$read', 'res$et', 'scr$eendump',
- 'she$ll', 'test$'),
- Keyword, 'noargs'),
- ('([a-zA-Z_][a-zA-Z0-9_]*)(\s*)(=)',
- bygroups(Name.Variable, Text, Operator), 'genericargs'),
- ('([a-zA-Z_][a-zA-Z0-9_]*)(\s*\(.*?\)\s*)(=)',
- bygroups(Name.Function, Text, Operator), 'genericargs'),
- (r'@[a-zA-Z_][a-zA-Z0-9_]*', Name.Constant), # macros
- (r';', Keyword),
- ],
- 'comment': [
- (r'[^\\\n]', Comment),
- (r'\\\n', Comment),
- (r'\\', Comment),
- # don't add the newline to the Comment token
- ('', Comment, '#pop'),
- ],
- 'whitespace': [
- ('#', Comment, 'comment'),
- (r'[ \t\v\f]+', Text),
- ],
- 'noargs': [
- include('whitespace'),
- # semicolon and newline end the argument list
- (r';', Punctuation, '#pop'),
- (r'\n', Text, '#pop'),
- ],
- 'dqstring': [
- (r'"', String, '#pop'),
- (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
- (r'[^\\"\n]+', String), # all other characters
- (r'\\\n', String), # line continuation
- (r'\\', String), # stray backslash
- (r'\n', String, '#pop'), # newline ends the string too
- ],
- 'sqstring': [
- (r"''", String), # escaped single quote
- (r"'", String, '#pop'),
- (r"[^\\'\n]+", String), # all other characters
- (r'\\\n', String), # line continuation
- (r'\\', String), # normal backslash
- (r'\n', String, '#pop'), # newline ends the string too
- ],
- 'genericargs': [
- include('noargs'),
- (r'"', String, 'dqstring'),
- (r"'", String, 'sqstring'),
- (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+', Number.Float),
- (r'(\d+\.\d*|\.\d+)', Number.Float),
- (r'-?\d+', Number.Integer),
- ('[,.~!%^&*+=|?:<>/-]', Operator),
- ('[{}()\[\]]', Punctuation),
- (r'(eq|ne)\b', Operator.Word),
- (r'([a-zA-Z_][a-zA-Z0-9_]*)(\s*)(\()',
- bygroups(Name.Function, Text, Punctuation)),
- (r'[a-zA-Z_][a-zA-Z0-9_]*', Name),
- (r'@[a-zA-Z_][a-zA-Z0-9_]*', Name.Constant), # macros
- (r'\\\n', Text),
- ],
- 'optionarg': [
- include('whitespace'),
- (_shortened_many(
- "a$ll","an$gles","ar$row","au$toscale","b$ars","bor$der",
- "box$width","cl$abel","c$lip","cn$trparam","co$ntour","da$ta",
- "data$file","dg$rid3d","du$mmy","enc$oding","dec$imalsign",
- "fit$","font$path","fo$rmat","fu$nction","fu$nctions","g$rid",
- "hid$den3d","his$torysize","is$osamples","k$ey","keyt$itle",
- "la$bel","li$nestyle","ls$","loa$dpath","loc$ale","log$scale",
- "mac$ros","map$ping","map$ping3d","mar$gin","lmar$gin",
- "rmar$gin","tmar$gin","bmar$gin","mo$use","multi$plot",
- "mxt$ics","nomxt$ics","mx2t$ics","nomx2t$ics","myt$ics",
- "nomyt$ics","my2t$ics","nomy2t$ics","mzt$ics","nomzt$ics",
- "mcbt$ics","nomcbt$ics","of$fsets","or$igin","o$utput",
- "pa$rametric","pm$3d","pal$ette","colorb$ox","p$lot",
- "poi$ntsize","pol$ar","pr$int","obj$ect","sa$mples","si$ze",
- "st$yle","su$rface","table$","t$erminal","termo$ptions","ti$cs",
- "ticsc$ale","ticsl$evel","timef$mt","tim$estamp","tit$le",
- "v$ariables","ve$rsion","vi$ew","xyp$lane","xda$ta","x2da$ta",
- "yda$ta","y2da$ta","zda$ta","cbda$ta","xl$abel","x2l$abel",
- "yl$abel","y2l$abel","zl$abel","cbl$abel","xti$cs","noxti$cs",
- "x2ti$cs","nox2ti$cs","yti$cs","noyti$cs","y2ti$cs","noy2ti$cs",
- "zti$cs","nozti$cs","cbti$cs","nocbti$cs","xdti$cs","noxdti$cs",
- "x2dti$cs","nox2dti$cs","ydti$cs","noydti$cs","y2dti$cs",
- "noy2dti$cs","zdti$cs","nozdti$cs","cbdti$cs","nocbdti$cs",
- "xmti$cs","noxmti$cs","x2mti$cs","nox2mti$cs","ymti$cs",
- "noymti$cs","y2mti$cs","noy2mti$cs","zmti$cs","nozmti$cs",
- "cbmti$cs","nocbmti$cs","xr$ange","x2r$ange","yr$ange",
- "y2r$ange","zr$ange","cbr$ange","rr$ange","tr$ange","ur$ange",
- "vr$ange","xzeroa$xis","x2zeroa$xis","yzeroa$xis","y2zeroa$xis",
- "zzeroa$xis","zeroa$xis","z$ero"), Name.Builtin, '#pop'),
- ],
- 'bind': [
- ('!', Keyword, '#pop'),
- (_shortened('all$windows'), Name.Builtin),
- include('genericargs'),
- ],
- 'quit': [
- (r'gnuplot\b', Keyword),
- include('noargs'),
- ],
- 'fit': [
- (r'via\b', Name.Builtin),
- include('plot'),
- ],
- 'if': [
- (r'\)', Punctuation, '#pop'),
- include('genericargs'),
- ],
- 'pause': [
- (r'(mouse|any|button1|button2|button3)\b', Name.Builtin),
- (_shortened('key$press'), Name.Builtin),
- include('genericargs'),
- ],
- 'plot': [
- (_shortened_many('ax$es', 'axi$s', 'bin$ary', 'ev$ery', 'i$ndex',
- 'mat$rix', 's$mooth', 'thru$', 't$itle',
- 'not$itle', 'u$sing', 'w$ith'),
- Name.Builtin),
- include('genericargs'),
- ],
- 'save': [
- (_shortened_many('f$unctions', 's$et', 't$erminal', 'v$ariables'),
- Name.Builtin),
- include('genericargs'),
- ],
- }
- class PovrayLexer(RegexLexer):
- """
- For `Persistence of Vision Raytracer <http://www.povray.org/>`_ files.
- *New in Pygments 0.11.*
- """
- name = 'POVRay'
- aliases = ['pov']
- filenames = ['*.pov', '*.inc']
- mimetypes = ['text/x-povray']
- tokens = {
- 'root': [
- (r'/\*[\w\W]*?\*/', Comment.Multiline),
- (r'//.*\n', Comment.Single),
- (r'(?s)"(?:\\.|[^"\\])+"', String.Double),
- (r'#(debug|default|else|end|error|fclose|fopen|if|ifdef|ifndef|'
- r'include|range|read|render|statistics|switch|undef|version|'
- r'warning|while|write|define|macro|local|declare)',
- Comment.Preproc),
- (r'\b(aa_level|aa_threshold|abs|acos|acosh|adaptive|adc_bailout|'
- r'agate|agate_turb|all|alpha|ambient|ambient_light|angle|'
- r'aperture|arc_angle|area_light|asc|asin|asinh|assumed_gamma|'
- r'atan|atan2|atanh|atmosphere|atmospheric_attenuation|'
- r'attenuating|average|background|black_hole|blue|blur_samples|'
- r'bounded_by|box_mapping|bozo|break|brick|brick_size|'
- r'brightness|brilliance|bumps|bumpy1|bumpy2|bumpy3|bump_map|'
- r'bump_size|case|caustics|ceil|checker|chr|clipped_by|clock|'
- r'color|color_map|colour|colour_map|component|composite|concat|'
- r'confidence|conic_sweep|constant|control0|control1|cos|cosh|'
- r'count|crackle|crand|cube|cubic_spline|cylindrical_mapping|'
- r'debug|declare|default|degrees|dents|diffuse|direction|'
- r'distance|distance_maximum|div|dust|dust_type|eccentricity|'
- r'else|emitting|end|error|error_bound|exp|exponent|'
- r'fade_distance|fade_power|falloff|falloff_angle|false|'
- r'file_exists|filter|finish|fisheye|flatness|flip|floor|'
- r'focal_point|fog|fog_alt|fog_offset|fog_type|frequency|gif|'
- r'global_settings|glowing|gradient|granite|gray_threshold|'
- r'green|halo|hexagon|hf_gray_16|hierarchy|hollow|hypercomplex|'
- r'if|ifdef|iff|image_map|incidence|include|int|interpolate|'
- r'inverse|ior|irid|irid_wavelength|jitter|lambda|leopard|'
- r'linear|linear_spline|linear_sweep|location|log|looks_like|'
- r'look_at|low_error_factor|mandel|map_type|marble|material_map|'
- r'matrix|max|max_intersections|max_iteration|max_trace_level|'
- r'max_value|metallic|min|minimum_reuse|mod|mortar|'
- r'nearest_count|no|normal|normal_map|no_shadow|number_of_waves|'
- r'octaves|off|offset|omega|omnimax|on|once|onion|open|'
- r'orthographic|panoramic|pattern1|pattern2|pattern3|'
- r'perspective|pgm|phase|phong|phong_size|pi|pigment|'
- r'pigment_map|planar_mapping|png|point_at|pot|pow|ppm|'
- r'precision|pwr|quadratic_spline|quaternion|quick_color|'
- r'quick_colour|quilted|radial|radians|radiosity|radius|rainbow|'
- r'ramp_wave|rand|range|reciprocal|recursion_limit|red|'
- r'reflection|refraction|render|repeat|rgb|rgbf|rgbft|rgbt|'
- r'right|ripples|rotate|roughness|samples|scale|scallop_wave|'
- r'scattering|seed|shadowless|sin|sine_wave|sinh|sky|sky_sphere|'
- r'slice|slope_map|smooth|specular|spherical_mapping|spiral|'
- r'spiral1|spiral2|spotlight|spotted|sqr|sqrt|statistics|str|'
- r'strcmp|strength|strlen|strlwr|strupr|sturm|substr|switch|sys|'
- r't|tan|tanh|test_camera_1|test_camera_2|test_camera_3|'
- r'test_camera_4|texture|texture_map|tga|thickness|threshold|'
- r'tightness|tile2|tiles|track|transform|translate|transmit|'
- r'triangle_wave|true|ttf|turbulence|turb_depth|type|'
- r'ultra_wide_angle|up|use_color|use_colour|use_index|u_steps|'
- r'val|variance|vaxis_rotate|vcross|vdot|version|vlength|'
- r'vnormalize|volume_object|volume_rendered|vol_with_light|'
- r'vrotate|v_steps|warning|warp|water_level|waves|while|width|'
- r'wood|wrinkles|yes)\b', Keyword),
- (r'bicubic_patch|blob|box|camera|cone|cubic|cylinder|difference|'
- r'disc|height_field|intersection|julia_fractal|lathe|'
- r'light_source|merge|mesh|object|plane|poly|polygon|prism|'
- r'quadric|quartic|smooth_triangle|sor|sphere|superellipsoid|'
- r'text|torus|triangle|union', Name.Builtin),
- # TODO: <=, etc
- (r'[\[\](){}<>;,]', Punctuation),
- (r'[-+*/=]', Operator),
- (r'\b(x|y|z|u|v)\b', Name.Builtin.Pseudo),
- (r'[a-zA-Z_][a-zA-Z_0-9]*', Name),
- (r'[0-9]+\.[0-9]*', Number.Float),
- (r'\.[0-9]+', Number.Float),
- (r'[0-9]+', Number.Integer),
- (r'\s+', Text),
- ]
- }
- class AppleScriptLexer(RegexLexer):
- """
- For `AppleScript source code
- <http://developer.apple.com/documentation/AppleScript/
- Conceptual/AppleScriptLangGuide>`_,
- including `AppleScript Studio
- <http://developer.apple.com/documentation/AppleScript/
- Reference/StudioReference>`_.
- Contributed by Andreas Amann <aamann@mac.com>.
- """
- name = 'AppleScript'
- aliases = ['applescript']
- filenames = ['*.applescript']
- flags = re.MULTILINE | re.DOTALL
- Identifiers = r'[a-zA-Z]\w*'
- Literals = ['AppleScript', 'current application', 'false', 'linefeed',
- 'missing value', 'pi','quote', 'result', 'return', 'space',
- 'tab', 'text item delimiters', 'true', 'version']
- Classes = ['alias ', 'application ', 'boolean ', 'class ', 'constant ',
- 'date ', 'file ', 'integer ', 'list ', 'number ', 'POSIX file ',
- 'real ', 'record ', 'reference ', 'RGB color ', 'script ',
- 'text ', 'unit types', '(Unicode )?text', 'string']
- BuiltIn = ['attachment', 'attribute run', 'character', 'day', 'month',
- 'paragraph', 'word', 'year']
- HandlerParams = ['about', 'above', 'against', 'apart from', 'around',
- 'aside from', 'at', 'below', 'beneath', 'beside',
- 'between', 'for', 'given', 'instead of', 'on', 'onto',
- 'out of', 'over', 'since']
- Commands = ['ASCII (character|number)', 'activate', 'beep', 'choose URL',
- 'choose application', 'choose color', 'choose file( name)?',
- 'choose folder', 'choose from list',
- 'choose remote application', 'clipboard info',
- 'close( access)?', 'copy', 'count', 'current date', 'delay',
- 'delete', 'display (alert|dialog)', 'do shell script',
- 'duplicate', 'exists', 'get eof', 'get volume settings',
- 'info for', 'launch', 'list (disks|folder)', 'load script',
- 'log', 'make', 'mount volume', 'new', 'offset',
- 'open( (for access|location))?', 'path to', 'print', 'quit',
- 'random number', 'read', 'round', 'run( script)?',
- 'say', 'scripting components',
- 'set (eof|the clipboard to|volume)', 'store script',
- 'summarize', 'system attribute', 'system info',
- 'the clipboard', 'time to GMT', 'write', 'quoted form']
- References = ['(in )?back of', '(in )?front of', '[0-9]+(st|nd|rd|th)',
- 'first', 'second', 'third', 'fourth', 'fifth', 'sixth',
- 'seventh', 'eighth', 'ninth', 'tenth', 'after', 'back',
- 'before', 'behind', 'every', 'front', 'index', 'last',
- 'middle', 'some', 'that', 'through', 'thru', 'where', 'whose']
- Operators = ["and", "or", "is equal", "equals", "(is )?equal to", "is not",
- "isn't", "isn't equal( to)?", "is not equal( to)?",
- "doesn't equal", "does not equal", "(is )?greater than",
- "comes after", "is not less than or equal( to)?",
- "isn't less than or equal( to)?", "(is )?less than",
- "comes before", "is not greater than or equal( to)?",
- "isn't greater than or equal( to)?",
- "(is )?greater than or equal( to)?", "is not less than",
- "isn't less than", "does not come before",
- "doesn't come before", "(is )?less than or equal( to)?",
- "is not greater than", "isn't greater than",
- "does not come after", "doesn't come after", "starts? with",
- "begins? with", "ends? with", "contains?", "does not contain",
- "doesn't contain", "is in", "is contained by", "is not in",
- "is not contained by", "isn't contained by", "div", "mod",
- "not", "(a )?(ref( to)?|reference to)", "is", "does"]
- Control = ['considering', 'else', 'error', 'exit', 'from', 'if',
- 'ignoring', 'in', 'repeat', 'tell', 'then', 'times', 'to',
- 'try', 'until', 'using terms from', 'while', 'whith',
- 'with timeout( of)?', 'with transaction', 'by', 'continue',
- 'end', 'its?', 'me', 'my', 'return', 'of' , 'as']
- Declarations = ['global', 'local', 'prop(erty)?', 'set', 'get']
- Reserved = ['but', 'put', 'returning', 'the']
- StudioClasses = ['action cell', 'alert reply', 'application', 'box',
- 'browser( cell)?', 'bundle', 'button( cell)?', 'cell',
- 'clip view', 'color well', 'color-panel',
- 'combo box( item)?', 'control',
- 'data( (cell|column|item|row|source))?', 'default entry',
- 'dialog reply', 'document', 'drag info', 'drawer',
- 'event', 'font(-panel)?', 'formatter',
- 'image( (cell|view))?', 'matrix', 'menu( item)?', 'item',
- 'movie( view)?', 'open-panel', 'outline view', 'panel',
- 'pasteboard', 'plugin', 'popup button',
- 'progress indicator', 'responder', 'save-panel',
- 'scroll view', 'secure text field( cell)?', 'slider',
- 'sound', 'split view', 'stepper', 'tab view( item)?',
- 'table( (column|header cell|header view|view))',
- 'text( (field( cell)?|view))?', 'toolbar( item)?',
- 'user-defaults', 'view', 'window']
- StudioEvents = ['accept outline drop', 'accept table drop', 'action',
- 'activated', 'alert ended', 'awake from nib', 'became key',
- 'became main', 'begin editing', 'bounds changed',
- 'cell value', 'cell value changed', 'change cell value',
- 'change item value', 'changed', 'child of item',
- 'choose menu item', 'clicked', 'clicked toolbar item',
- 'closed', 'column clicked', 'column moved',
- 'column resized', 'conclude drop', 'data representation',
- 'deminiaturized', 'dialog ended', 'document nib name',
- 'double clicked', 'drag( (entered|exited|updated))?',
- 'drop', 'end editing', 'exposed', 'idle', 'item expandable',
- 'item value', 'item value changed', 'items changed',
- 'keyboard down', 'keyboard up', 'launched',
- 'load data representation', 'miniaturized', 'mouse down',
- 'mouse dragged', 'mouse entered', 'mouse exited',
- 'mouse moved', 'mouse up', 'moved',
- 'number of browser rows', 'number of items',
- 'number of rows', 'open untitled', 'opened', 'panel ended',
- 'parameters updated', 'plugin loaded', 'prepare drop',
- 'prepare outline drag', 'prepare outline drop',
- 'prepare table drag', 'prepare table drop',
- 'read from file', 'resigned active', 'resigned key',
- 'resigned main', 'resized( sub views)?',
- 'right mouse down', 'right mouse dragged',
- 'right mouse up', 'rows changed', 'scroll wheel',
- 'selected tab view item', 'selection changed',
- 'selection changing', 'should begin editing',
- 'should close', 'should collapse item',
- 'should end editing', 'should expand item',
- 'should open( untitled)?',
- 'should quit( after last window closed)?',
- 'should select column', 'should select item',
- 'should select row', 'should select tab view item',
- 'should selection change', 'should zoom', 'shown',
- 'update menu item', 'update parameters',
- 'update toolbar item', 'was hidden', 'was miniaturized',
- 'will become active', 'will close', 'will dismiss',
- 'will display browser cell', 'will display cell',
- 'will display item cell', 'will display outline cell',
- 'will finish launching', 'will hide', 'will miniaturize',
- 'will move', 'will open', 'will pop up', 'will quit',
- 'will resign active', 'will resize( sub views)?',
- 'will select tab view item', 'will show', 'will zoom',
- 'write to file', 'zoomed']
- StudioCommands = ['animate', 'append', 'call method', 'center',
- 'close drawer', 'close panel', 'display',
- 'display alert', 'display dialog', 'display panel', 'go',
- 'hide', 'highlight', 'increment', 'item for',
- 'load image', 'load movie', 'load nib', 'load panel',
- 'load sound', 'localized string', 'lock focus', 'log',
- 'open drawer', 'path for', 'pause', 'perform action',
- 'play', 'register', 'resume', 'scroll', 'select( all)?',
- 'show', 'size to fit', 'start', 'step back',
- 'step forward', 'stop', 'synchronize', 'unlock focus',
- 'update']
- StudioProperties = ['accepts arrow key', 'action method', 'active',
- 'alignment', 'allowed identifiers',
- 'allows branch selection', 'allows column reordering',
- 'allows column resizing', 'allows column selection',
- 'allows customization',
- 'allows editing text attributes',
- 'allows empty selection', 'allows mixed state',
- 'allows multiple selection', 'allows reordering',
- 'allows undo', 'alpha( value)?', 'alternate image',
- 'alternate increment value', 'alternate title',
- 'animation delay', 'associated file name',
- 'associated object', 'auto completes', 'auto display',
- 'auto enables items', 'auto repeat',
- 'auto resizes( outline column)?',
- 'auto save expanded items', 'auto save name',
- 'auto save table columns', 'auto saves configuration',
- 'auto scroll', 'auto sizes all columns to fit',
- 'auto sizes cells', 'background color', 'bezel state',
- 'bezel style', 'bezeled', 'border rect', 'border type',
- 'bordered', 'bounds( rotation)?', 'box type',
- 'button returned', 'button type',
- 'can choose directories', 'can choose files',
- 'can draw', 'can hide',
- 'cell( (background color|size|type))?', 'characters',
- 'class', 'click count', 'clicked( data)? column',
- 'clicked data item', 'clicked( data)? row',
- 'closeable', 'collating', 'color( (mode|panel))',
- 'command key down', 'configuration',
- 'content(s| (size|view( margins)?))?', 'context',
- 'continuous', 'control key down', 'control size',
- 'control tint', 'control view',
- 'controller visible', 'coordinate system',
- 'copies( on scroll)?', 'corner view', 'current cell',
- 'current column', 'current( field)? editor',
- 'current( menu)? item', 'current row',
- 'current tab view item', 'data source',
- 'default identifiers', 'delta (x|y|z)',
- 'destination window', 'directory', 'display mode',
- 'displayed cell', 'document( (edited|rect|view))?',
- 'double value', 'dragged column', 'dragged distance',
- 'dragged items', 'draws( cell)? background',
- 'draws grid', 'dynamically scrolls', 'echos bullets',
- 'edge', 'editable', 'edited( data)? column',
- 'edited data item', 'edited( data)? row', 'enabled',
- 'enclosing scroll view', 'ending page',
- 'error handling', 'event number', 'event type',
- 'excluded from windows menu', 'executable path',
- 'expanded', 'fax number', 'field editor', 'file kind',
- 'file name', 'file type', 'first responder',
- 'first visible column', 'flipped', 'floating',
- 'font( panel)?', 'formatter', 'frameworks path',
- 'frontmost', 'gave up', 'grid color', 'has data items',
- 'has horizontal ruler', 'has horizontal scroller',
- 'has parent data item', 'has resize indicator',
- 'has shadow', 'has sub menu', 'has vertical ruler',
- 'has vertical scroller', 'header cell', 'header view',
- 'hidden', 'hides when deactivated', 'highlights by',
- 'horizontal line scroll', 'horizontal page scroll',
- 'horizontal ruler view', 'horizontally resizable',
- 'icon image', 'id', 'identifier',
- 'ignores multiple clicks',
- 'image( (alignment|dims when disabled|frame style|'
- 'scaling))?',
- 'imports graphics', 'increment value',
- 'indentation per level', 'indeterminate', 'index',
- 'integer value', 'intercell spacing', 'item height',
- 'key( (code|equivalent( modifier)?|window))?',
- 'knob thickness', 'label', 'last( visible)? column',
- 'leading offset', 'leaf', 'level', 'lineā¦
Large files files are truncated, but you can click here to view the full file