Skip to content

Commit

Permalink
Latest pygments-main
Browse files Browse the repository at this point in the history
  • Loading branch information
tnm committed Dec 7, 2012
1 parent caf5a56 commit 330e820
Show file tree
Hide file tree
Showing 66 changed files with 15,866 additions and 866 deletions.
15 changes: 15 additions & 0 deletions vendor/pygments-main/AUTHORS
Expand Up @@ -9,6 +9,7 @@ Other contributors, listed alphabetically, are:
* Kumar Appaiah -- Debian control lexer
* Ali Afshar -- image formatter
* Andreas Amann -- AppleScript lexer
* Jeffrey Arnold -- R/S, Rd, BUGS, Jags, and Stan lexers
* Jeremy Ashkenas -- CoffeeScript lexer
* Stefan Matthias Aust -- Smalltalk lexer
* Ben Bangert -- Mako lexers
Expand All @@ -22,11 +23,13 @@ Other contributors, listed alphabetically, are:
* Frits van Bommel -- assembler lexers
* Pierre Bourdon -- bugfixes
* Hiram Chirino -- Scaml and Jade lexers
* Ian Cooper -- VGL lexer
* Leaf Corcoran -- MoonScript lexer
* Christopher Creutzig -- MuPAD lexer
* Pete Curry -- bugfixes
* Owen Durni -- haXe lexer
* Nick Efford -- Python 3 lexer
* Sven Efftinge -- Xtend lexer
* Artem Egorkine -- terminal256 formatter
* James H. Fisher -- PostScript lexer
* Carlos Galdino -- Elixir and Elixir Console lexers
Expand All @@ -42,20 +45,26 @@ Other contributors, listed alphabetically, are:
* Matthew Harrison -- SVG formatter
* Steven Hazel -- Tcl lexer
* Aslak Hellesøy -- Gherkin lexer
* Greg Hendershott -- Racket lexer
* Jordi Gutiérrez Hermoso -- Octave lexer
* David Hess, Fish Software, Inc. -- Objective-J lexer
* Varun Hiremath -- Debian control lexer
* Doug Hogan -- Mscgen lexer
* Ben Hollis -- Mason lexer
* Tim Howard -- BlitzMax lexer
* Ivan Inozemtsev -- Fantom lexer
* Brian R. Jackson -- Tea lexer
* Dennis Kaarsemaker -- sources.list lexer
* Igor Kalnitsky -- vhdl lexer
* Pekka Klärck -- Robot Framework lexer
* Eric Knibbe -- Lasso lexer
* Adam Koprowski -- Opa lexer
* Benjamin Kowarsch -- Modula-2 lexer
* Alexander Kriegisch -- Kconfig and AspectJ lexers
* Marek Kubica -- Scheme lexer
* Jochen Kupperschmidt -- Markdown processor
* Gerd Kurzbach -- Modelica lexer
* Jon Larimer, Google Inc. -- Smali lexer
* Olov Lassus -- Dart lexer
* Sylvestre Ledru -- Scilab lexer
* Mark Lee -- Vala lexer
Expand All @@ -66,8 +75,11 @@ Other contributors, listed alphabetically, are:
* Stephen McKamey -- Duel/JBST lexer
* Brian McKenna -- F# lexer
* Lukas Meuser -- BBCode formatter, Lua lexer
* Paul Miller -- LiveScript lexer
* Hong Minhee -- HTTP lexer
* Michael Mior -- Awk lexer
* Reuben Morais -- SourcePawn lexer
* Jon Morton -- Rust lexer
* Paulo Moura -- Logtalk lexer
* Mher Movsisyan -- DTD lexer
* Ana Nelson -- Ragel, ANTLR, R console lexers
Expand All @@ -81,6 +93,7 @@ Other contributors, listed alphabetically, are:
* Benjamin Peterson -- Test suite refactoring
* Dominik Picheta -- Nimrod lexer
* Clément Prévost -- UrbiScript lexer
* Kashif Rasul -- CUDA lexer
* Justin Reidy -- MXML lexer
* Norman Richards -- JSON lexer
* Lubomir Rintel -- GoodData MAQL and CL lexers
Expand All @@ -98,6 +111,7 @@ Other contributors, listed alphabetically, are:
* Steve Spigarelli -- XQuery lexer
* Jerome St-Louis -- eC lexer
* James Strachan -- Kotlin lexer
* Tom Stuart -- Treetop lexer
* Tiberius Teng -- default style overhaul
* Jeremy Thurgood -- Erlang, Squid config lexers
* Erick Tryzelaar -- Felix lexer
Expand All @@ -110,6 +124,7 @@ Other contributors, listed alphabetically, are:
* Nils Winter -- Smalltalk lexer
* Davy Wybiral -- Clojure lexer
* Diego Zamboni -- CFengine3 lexer
* Enrique Zamudio -- Ceylon lexer
* Alex Zimin -- Nemerle lexer

Many thanks for all contributions!
29 changes: 28 additions & 1 deletion vendor/pygments-main/CHANGES
Expand Up @@ -6,14 +6,41 @@ http://bitbucket.org/birkenfeld/pygments-main/issues.

Version 1.6
-----------
(in development)
(in development, to be released xx November 2012)

- Lexers added:

* AspectJ (PR#90)
* BUGS-like languages (PR#89)
* Ceylon (PR#86)
* Croc (new name for MiniD)
* CUDA (PR#75)
* Dg (PR#116)
* Jags (PR#89)
* Julia (PR#61)
* Kconfig (#711)
* Lasso (PR#95)
* LiveScript (PR#84)
* Monkey (PR#117)
* Mscgen (PR#80)
* Racket (PR#94)
* Rdoc (PR#99)
* Robot Framework (PR#137)
* Rust (PR#67)
* Smali (Dalvik assembly)
* SourcePawn (PR#39)
* Stan (PR#89)
* Treetop (PR#125)
* VGL (PR#12)
* Windows Registry (#819)
* Xtend (PR#68)

- Fix Template Haskell highlighting (PR#63)

- Fix some S/R lexer errors (PR#91)

- Fix a bug in the Prolog lexer with names that start with 'is' (#810)


Version 1.5
-----------
Expand Down
2 changes: 1 addition & 1 deletion vendor/pygments-main/LICENSE
@@ -1,4 +1,4 @@
Copyright (c) 2006-2011 by the respective authors (see AUTHORS file).
Copyright (c) 2006-2012 by the respective authors (see AUTHORS file).
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
1 change: 0 additions & 1 deletion vendor/pygments-main/REVISION

This file was deleted.

121 changes: 121 additions & 0 deletions vendor/pygments-main/external/lasso-builtins-generator-9.lasso
@@ -0,0 +1,121 @@
#!/usr/bin/lasso9
/*
Builtins Generator for Lasso 9
This is the shell script that was used to extract Lasso 9's built-in keywords
and generate most of the _lassobuiltins.py file. When run, it creates a file
named "lassobuiltins-9.py" containing the types, traits, and methods of the
currently-installed version of Lasso 9.
A partial list of keywords in Lasso 8 can be generated with this code:
<?LassoScript
local('l8tags' = list);
iterate(tags_list, local('i'));
#l8tags->insert(string_removeleading(#i, -pattern='_global_'));
/iterate;
#l8tags->sort;
iterate(#l8tags, local('i'));
string_lowercase(#i)+"<br>";
/iterate;
*/
output("This output statement is required for a complete list of methods.")
local(f) = file("lassobuiltins-9.py")
#f->doWithClose => {
#f->openWrite
#f->writeString('# -*- coding: utf-8 -*-
"""
pygments.lexers._lassobuiltins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Built-in Lasso types, traits, and methods.
"""
')
lcapi_loadModules
// Load all of the libraries from builtins and lassoserver
// This forces all possible available types and methods to be registered
local(srcs =
tie(
dir(sys_masterHomePath + 'LassoLibraries/builtins/')->eachFilePath,
dir(sys_masterHomePath + 'LassoLibraries/lassoserver/')->eachFilePath
)
)
with topLevelDir in #srcs
where !#topLevelDir->lastComponent->beginsWith('.')
do protect => {
handle_error => {
stdoutnl('Unable to load: ' + #topLevelDir + ' ' + error_msg)
}
library_thread_loader->loadLibrary(#topLevelDir)
stdoutnl('Loaded: ' + #topLevelDir)
}
local(
typesList = list(),
traitsList = list(),
methodsList = list()
)
// unbound methods
with method in sys_listUnboundMethods
where !#method->methodName->asString->endsWith('=')
where #method->methodName->asString->isalpha(1)
where #methodsList !>> #method->methodName->asString
do #methodsList->insert(#method->methodName->asString)
// traits
with trait in sys_listTraits
where !#trait->asString->beginsWith('$')
where #traitsList !>> #trait->asString
do {
#traitsList->insert(#trait->asString)
with tmethod in tie(#trait->getType->provides, #trait->getType->requires)
where !#tmethod->methodName->asString->endsWith('=')
where #tmethod->methodName->asString->isalpha(1)
where #methodsList !>> #tmethod->methodName->asString
do #methodsList->insert(#tmethod->methodName->asString)
}
// types
with type in sys_listTypes
where #typesList !>> #type->asString
do {
#typesList->insert(#type->asString)
with tmethod in #type->getType->listMethods
where !#tmethod->methodName->asString->endsWith('=')
where #tmethod->methodName->asString->isalpha(1)
where #methodsList !>> #tmethod->methodName->asString
do #methodsList->insert(#tmethod->methodName->asString)
}
#f->writeString("BUILTINS = {
'Types': [
")
with t in #typesList
do #f->writeString(" '"+string_lowercase(#t)+"',\n")
#f->writeString(" ],
'Traits': [
")
with t in #traitsList
do #f->writeString(" '"+string_lowercase(#t)+"',\n")
#f->writeString(" ],
'Methods': [
")
with t in #methodsList
do #f->writeString(" '"+string_lowercase(#t)+"',\n")
#f->writeString(" ],
}
")
}
2 changes: 1 addition & 1 deletion vendor/pygments-main/pygments/cmdline.py
Expand Up @@ -219,7 +219,7 @@ def main(args=sys.argv):
return 0

if opts.pop('-V', None) is not None:
print 'Pygments version %s, (c) 2006-2011 by Georg Brandl.' % __version__
print 'Pygments version %s, (c) 2006-2012 by Georg Brandl.' % __version__
return 0

# handle ``pygmentize -L``
Expand Down
1 change: 0 additions & 1 deletion vendor/pygments-main/pygments/filters/__init__.py
Expand Up @@ -331,7 +331,6 @@ def __init__(self, **options):
Filter.__init__(self, **options)

def filter(self, lexer, stream):
output = []
current_type = None
current_value = None
for ttype, value in stream:
Expand Down
4 changes: 2 additions & 2 deletions vendor/pygments-main/pygments/formatters/_mapping.py
Expand Up @@ -13,8 +13,6 @@
:license: BSD, see LICENSE for details.
"""

from pygments.util import docstring_headline

# start
from pygments.formatters.bbcode import BBCodeFormatter
from pygments.formatters.html import HtmlFormatter
Expand Down Expand Up @@ -54,6 +52,8 @@
found_formatters = []
imports = []
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))
from pygments.util import docstring_headline

for filename in os.listdir('.'):
if filename.endswith('.py') and not filename.startswith('_'):
module_name = 'pygments.formatters.%s' % filename[:-3]
Expand Down
2 changes: 1 addition & 1 deletion vendor/pygments-main/pygments/formatters/img.py
Expand Up @@ -10,7 +10,6 @@
"""

import sys
from commands import getstatusoutput

from pygments.formatter import Formatter
from pygments.util import get_bool_opt, get_int_opt, \
Expand Down Expand Up @@ -73,6 +72,7 @@ def __init__(self, font_name, font_size=14):
self._create_nix()

def _get_nix_font_path(self, name, style):
from commands import getstatusoutput
exit, out = getstatusoutput('fc-list "%s:style=%s" file' %
(name, style))
if not exit:
Expand Down
16 changes: 8 additions & 8 deletions vendor/pygments-main/pygments/formatters/latex.py
Expand Up @@ -306,17 +306,17 @@ def format_unencoded(self, tokensource, outfile):
realoutfile = outfile
outfile = StringIO()

outfile.write(r'\begin{Verbatim}[commandchars=\\\{\}')
outfile.write(ur'\begin{Verbatim}[commandchars=\\\{\}')
if self.linenos:
start, step = self.linenostart, self.linenostep
outfile.write(',numbers=left' +
(start and ',firstnumber=%d' % start or '') +
(step and ',stepnumber=%d' % step or ''))
outfile.write(u',numbers=left' +
(start and u',firstnumber=%d' % start or u'') +
(step and u',stepnumber=%d' % step or u''))
if self.mathescape or self.texcomments:
outfile.write(r',codes={\catcode`\$=3\catcode`\^=7\catcode`\_=8}')
outfile.write(ur',codes={\catcode`\$=3\catcode`\^=7\catcode`\_=8}')
if self.verboptions:
outfile.write(',' + self.verboptions)
outfile.write(']\n')
outfile.write(u',' + self.verboptions)
outfile.write(u']\n')

for ttype, value in tokensource:
if ttype in Token.Comment:
Expand Down Expand Up @@ -366,7 +366,7 @@ def format_unencoded(self, tokensource, outfile):
else:
outfile.write(value)

outfile.write('\\end{Verbatim}\n')
outfile.write(u'\\end{Verbatim}\n')

if self.full:
realoutfile.write(DOC_TEMPLATE %
Expand Down
2 changes: 0 additions & 2 deletions vendor/pygments-main/pygments/formatters/other.py
Expand Up @@ -102,8 +102,6 @@ def write(text):
outfile.write(text.encode())
flush = outfile.flush

lasttype = None
lastval = u''
if self.error_color:
for ttype, value in tokensource:
line = "%s\t%r\n" % (ttype, value)
Expand Down

0 comments on commit 330e820

Please sign in to comment.