doapfiend.lexers.Notation3Lexer

Package doapfiend :: Module lexers :: Class Notation3Lexer |
[hide private]
[frames] | no frames]

# Class Notation3Lexer

source code

               object --+
                        |
     pygments.lexer.Lexer --+
                            |
    pygments.lexer.RegexLexer --+
                                |
                               Notation3Lexer

Lexer for the N3 / Turtle / NT

Nested Classes | [hide private]
Inherited from `pygments.lexer.RegexLexer`: `__metaclass__`

Instance Methods | [hide private]
Inherited from `pygments.lexer.RegexLexer`: `get_tokens_unprocessed` Inherited from `pygments.lexer.Lexer`: `__init__`, `__repr__`, `add_filter`, `get_tokens` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__str__`

Static Methods | [hide private]
Inherited from `pygments.lexer.Lexer`: `analyse_text`

Class Variables | [hide private]
| name = ``'``N3``'`` Name of the lexer
| aliases = ``[``'``n3``'``,` `'``turtle``'``]`` Shortcuts for the lexer
| filenames = ``[``'``*.n3``'``,` `'``*.ttl``'``,` `'``*.NT``'``]`` fn match rules
| mimetypes = ``[``'``text/rdf+n3``'``,` `'``application/x-turtle``'``,` `'``applicati``...`` mime types
| tokens = ``{``'``comments``'``:` `[``(``'``(\\s*#.*)``'``,` Token.Comment`)``]``,` `'``objList``...`` Dict of ``{'state': [(regex, tokentype, new_state), ...], ...
Inherited from `pygments.lexer.RegexLexer`: `flags` Inherited from `pygments.lexer.Lexer`: `alias_filenames`

Properties | [hide private]
Inherited from `object`: `__class__`

Class Variable Details | [hide private]

  ### mimetypes mime types Value:
      ['text/rdf+n3', 'application/x-turtle', 'application/n3']

  ### tokens Dict of ``{'state': [(regex, tokentype, new_state), ...], ...}`` The initial state is 'root'. ``new_state`` can be omitted to signify no state transition. If it is a string, the state is pushed on the stack and changed. If it is a tuple of strings, all states are pushed on the stack and the current state will be the topmost. It can also be ``combined('state1', 'state2', ...)`` to signify a new, anonymous state combined from the rules of two or more existing ones. Furthermore, it can be '#pop' to signify going back one step in the state stack, or '#push' to push the current state on the stack again. The tuple can also be replaced with ``include('state')``, in which case the rules from the state named by the string are included in the current one. Value:
      {'comments': [('(\\s*#.*)', Token.Comment)],
       'objList': [('\\s*\\)', Token.Text, '#pop'), 'object'],
       'object': [('\\s*\\[', Token.Text, 'predObj'),
                  ('\\s*<[^> ]*>', Token.Name.Attribute),
                  ('\\s*("""(?:.|\\n)*?""")(\\@[a-z]{2-4}|\\^\\^<?[a-zA-Z0-9
      \\-\\:_#/\\.]*>?)?\\s*',
                   <function callback at 0x850833c>),
                  ('\\s*".*?[^\\\\]"(?:\\@[a-z]{2-4}|\\^\\^<?[a-zA-Z0-9\\-\\
      ...