78 aliases = ['splus', 's', 'r'] |
78 aliases = ['splus', 's', 'r'] |
79 filenames = ['*.S', '*.R', '.Rhistory', '.Rprofile', '.Renviron'] |
79 filenames = ['*.S', '*.R', '.Rhistory', '.Rprofile', '.Renviron'] |
80 mimetypes = ['text/S-plus', 'text/S', 'text/x-r-source', 'text/x-r', |
80 mimetypes = ['text/S-plus', 'text/S', 'text/x-r-source', 'text/x-r', |
81 'text/x-R', 'text/x-r-history', 'text/x-r-profile'] |
81 'text/x-R', 'text/x-r-history', 'text/x-r-profile'] |
82 |
82 |
83 valid_name = r'(?:`[^`\\]*(?:\\.[^`\\]*)*`)|(?:(?:[a-zA-z]|[_.][^0-9])[\w_.]*)' |
83 valid_name = r'`[^`\\]*(?:\\.[^`\\]*)*`|(?:[a-zA-Z]|\.[A-Za-z_.])[\w_.]*|\.' |
84 tokens = { |
84 tokens = { |
85 'comments': [ |
85 'comments': [ |
86 (r'#.*$', Comment.Single), |
86 (r'#.*$', Comment.Single), |
87 ], |
87 ], |
88 'valid_name': [ |
88 'valid_name': [ |
159 Pygments Lexer for R documentation (Rd) files |
159 Pygments Lexer for R documentation (Rd) files |
160 |
160 |
161 This is a very minimal implementation, highlighting little more |
161 This is a very minimal implementation, highlighting little more |
162 than the macros. A description of Rd syntax is found in `Writing R |
162 than the macros. A description of Rd syntax is found in `Writing R |
163 Extensions <http://cran.r-project.org/doc/manuals/R-exts.html>`_ |
163 Extensions <http://cran.r-project.org/doc/manuals/R-exts.html>`_ |
164 and `Parsing Rd files <developer.r-project.org/parseRd.pdf>`_. |
164 and `Parsing Rd files <http://developer.r-project.org/parseRd.pdf>`_. |
165 |
165 |
166 .. versionadded:: 1.6 |
166 .. versionadded:: 1.6 |
167 """ |
167 """ |
168 name = 'Rd' |
168 name = 'Rd' |
169 aliases = ['rd'] |
169 aliases = ['rd'] |