Back to index

moin  1.9.0~rc2
Public Member Functions | Static Public Attributes
MoinMoin.support.pygments.lexers.text.MakefileLexer Class Reference
Inheritance diagram for MoinMoin.support.pygments.lexers.text.MakefileLexer:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.support.pygments.lexers.text.MakefileLexer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def get_tokens_unprocessed

Static Public Attributes

string name = 'Makefile'
list aliases = ['make', 'makefile', 'mf', 'bsdmake']
list filenames = ['*.mak', 'Makefile', 'makefile', 'Makefile.*', 'GNUmakefile']
list mimetypes = ['text/x-makefile']
tuple r_special
tuple r_comment = re.compile(r'^\s*@?#')

Detailed Description

Lexer for BSD and GNU make extensions (lenient enough to handle both in
the same file even).

*Rewritten in Pygments 0.10.*

Definition at line 111 of file text.py.


Member Function Documentation

Definition at line 131 of file text.py.

00131 
00132     def get_tokens_unprocessed(self, text):
00133         ins = []
00134         lines = text.splitlines(True)
00135         done = ''
00136         lex = BaseMakefileLexer(**self.options)
00137         backslashflag = False
00138         for line in lines:
00139             if self.r_special.match(line) or backslashflag:
00140                 ins.append((len(done), [(0, Comment.Preproc, line)]))
00141                 backslashflag = line.strip().endswith('\\')
00142             elif self.r_comment.match(line):
00143                 ins.append((len(done), [(0, Comment, line)]))
00144             else:
00145                 done += line
00146         for item in do_insertions(ins, lex.get_tokens_unprocessed(done)):
00147             yield item
00148 

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

list MoinMoin.support.pygments.lexers.text.MakefileLexer.aliases = ['make', 'makefile', 'mf', 'bsdmake'] [static]

Definition at line 120 of file text.py.

list MoinMoin.support.pygments.lexers.text.MakefileLexer.filenames = ['*.mak', 'Makefile', 'makefile', 'Makefile.*', 'GNUmakefile'] [static]

Definition at line 121 of file text.py.

Definition at line 122 of file text.py.

Definition at line 119 of file text.py.

tuple MoinMoin.support.pygments.lexers.text.MakefileLexer.r_comment = re.compile(r'^\s*@?#') [static]

Definition at line 129 of file text.py.

Initial value:
re.compile(r'^(?:'
        # BSD Make
        r'\.\s*(include|undef|error|warning|if|else|elif|endif|for|endfor)|'
        # GNU Make
        r'\s*(ifeq|ifneq|ifdef|ifndef|else|endif|-?include|define|endef|:))(?=\s)')

Definition at line 124 of file text.py.


The documentation for this class was generated from the following file: