parent
68bb97e00e
commit
b78d42cba5
|
@ -25,7 +25,7 @@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
|||
INSTALL = /usr/bin/install -c
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
7Binstall_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
|
|
|
@ -0,0 +1,468 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!-- $Id: index.shtml,v 1.394 2009/03/13 23:41:55 warthog9 Exp $ -->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>The Linux Kernel Archives</title>
|
||||
<link rel="icon" type="image/png" href="favicon.ico" />
|
||||
<link rel="alternate" type="application/rss+xml"
|
||||
title="Latest Linux Kernel Version RSS"
|
||||
href="http://kernel.org/kdist/rss.xml" />
|
||||
<link rel="stylesheet" href="/kernel.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>The Linux Kernel Archives</h1>
|
||||
|
||||
<p class="headtext">
|
||||
Welcome to the Linux Kernel Archives. This is the primary site
|
||||
for the Linux kernel source, but it has much more than just
|
||||
Linux kernels. <span style="font-size:75%"><a
|
||||
href="faq">Frequently Asked Questions</a></span></p>
|
||||
<div id="directory">
|
||||
<table style="margin-top:10px">
|
||||
<tr>
|
||||
<td class="plain">
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<a href="http://www.kernel.org">
|
||||
<img src="/mirrors/countries/flags/us.png" width="61" height="32" hspace="10" alt="US" />
|
||||
<img src="/mirrors/countries/flags/eu.png" width="48" height="32" hspace="10" alt="EU" />
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Protocol</th>
|
||||
<th>Location</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><a href="http://www.ietf.org/rfc/rfc2616.txt">HTTP</a></td>
|
||||
<td><a href="http://www.kernel.org/pub/">http://www.kernel.org/pub/</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><a href="http://www.ietf.org/rfc/rfc959.txt">FTP</a></td>
|
||||
<td><a href="ftp://ftp.kernel.org/pub/">ftp://ftp.kernel.org/pub/</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><a href="http://rsync.samba.org/">RSYNC</a></td>
|
||||
<td>rsync://rsync.kernel.org/pub/</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="versions">
|
||||
|
||||
<table class="kver">
|
||||
<tr align="left">
|
||||
<td>The latest stable version of the Linux kernel is: </td>
|
||||
<td><b><a href="/pub/linux/kernel/v2.6/patch-2.6.29.1.bz2">2.6.29.1</a></b></td>
|
||||
<td>2009-04-02 20:57 UTC</td>
|
||||
<td><a href="/pub/linux/kernel/v2.6/linux-2.6.29.1.tar.bz2">F</a></td>
|
||||
<td><a href="/diff/diffview.cgi?file=%2Fpub%2Flinux%2Fkernel%2Fv2.6%2Fpatch-2.6.29.1.bz2">V</a></td>
|
||||
<td> </td>
|
||||
<td><a href="http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fstable%2Flinux-2.6.29.y.git;a=summary">C</a></td>
|
||||
<td><a href="/pub/linux/kernel/v2.6/ChangeLog-2.6.29.1">Changelog</a></td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td>The latest <a href="/patchtypes/pre.html">prepatch</a> for the stable Linux kernel tree is: </td>
|
||||
<td><b><a href="/pub/linux/kernel/v2.6/testing/patch-2.6.30-rc1.bz2">2.6.30-rc1</a></b></td>
|
||||
<td>2009-04-07 22:45 UTC</td>
|
||||
<td><a href="/pub/linux/kernel/v2.6/linux-2.6.29.tar.bz2">B</a></td>
|
||||
<td><a href="/diff/diffview.cgi?file=%2Fpub%2Flinux%2Fkernel%2Fv2.6%2Ftesting%2Fpatch-2.6.30-rc1.bz2">V</a></td>
|
||||
<td> </td>
|
||||
<td><a href="http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=summary">C</a></td>
|
||||
<td><a href="/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.30-rc1">Changelog</a></td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td>The latest 2.4 version of the Linux kernel is: </td>
|
||||
<td><b><a href="/pub/linux/kernel/v2.4/patch-2.4.37.bz2">2.4.37</a></b></td>
|
||||
<td>2008-12-02 08:13 UTC</td>
|
||||
<td><a href="/pub/linux/kernel/v2.4/linux-2.4.37.tar.bz2">F</a></td>
|
||||
<td><a href="/diff/diffview.cgi?file=%2Fpub%2Flinux%2Fkernel%2Fv2.4%2Fpatch-2.4.37.bz2">V</a></td>
|
||||
<td><a href="/diff/diffview.cgi?file=%2Fpub%2Flinux%2Fkernel%2Fv2.4%2Ftesting%2Fincr%2Fpatch-2.4.37-rc2-final.bz2">VI</a></td>
|
||||
<td><a href="http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fwtarreau%2Flinux-2.4.git;a=summary">C</a></td>
|
||||
<td><a href="/pub/linux/kernel/v2.4/ChangeLog-2.4.37">Changelog</a></td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td>The latest 2.2 version of the Linux kernel is: </td>
|
||||
<td><b><a href="/pub/linux/kernel/v2.2/patch-2.2.26.bz2">2.2.26</a></b></td>
|
||||
<td>2004-02-25 00:28 UTC</td>
|
||||
<td><a href="/pub/linux/kernel/v2.2/linux-2.2.26.tar.bz2">F</a></td>
|
||||
<td><a href="/diff/diffview.cgi?file=%2Fpub%2Flinux%2Fkernel%2Fv2.2%2Fpatch-2.2.26.bz2">V</a></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><a href="/pub/linux/kernel/v2.2/ChangeLog-2.2.26">Changelog</a></td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td>The latest <a href="/patchtypes/pre.html">prepatch</a> for the 2.2 Linux kernel tree is: </td>
|
||||
<td><b><a href="/pub/linux/kernel/v2.2/testing/patch-2.2.27-rc2.bz2">2.2.27-rc2</a></b></td>
|
||||
<td>2005-01-12 23:55 UTC</td>
|
||||
<td><a href="/pub/linux/kernel/v2.2/linux-2.2.26.tar.bz2">B</a></td>
|
||||
<td><a href="/diff/diffview.cgi?file=%2Fpub%2Flinux%2Fkernel%2Fv2.2%2Ftesting%2Fpatch-2.2.27-rc2.bz2">V</a></td>
|
||||
<td><a href="/diff/diffview.cgi?file=%2Fpub%2Flinux%2Fkernel%2Fv2.2%2Ftesting%2Fincr%2Fpatch-2.2.27-rc1-rc2.bz2">VI</a></td>
|
||||
<td> </td>
|
||||
<td><a href="/pub/linux/kernel/v2.2/testing/patch-2.2.27.log">Changelog</a></td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td>The latest <a href="/patchtypes/mm.html">-mm patch</a> to the stable Linux kernels is: </td>
|
||||
<td><b><a href="/pub/linux/kernel/people/akpm/patches/2.6/2.6.28-rc2/2.6.28-rc2-mm1/2.6.28-rc2-mm1.bz2">2.6.28-rc2-mm1</a></b></td>
|
||||
<td>2008-10-29 06:29 UTC</td>
|
||||
<td> </td>
|
||||
<td><a href="/diff/diffview.cgi?file=%2Fpub%2Flinux%2Fkernel%2Fpeople%2Fakpm%2Fpatches%2F2.6%2F2.6.28-rc2%2F2.6.28-rc2-mm1%2F2.6.28-rc2-mm1.bz2">V</a></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p class="pvkey">
|
||||
<b>F</b> = full source, <b>B</b> = patch baseline, <b>V</b> = view patch,
|
||||
<b>VI</b> = view incremental, <b>C</b> = current <a href="changeset.html">changesets</a><br />
|
||||
Changelogs are provided by the kernel authors directly. Please
|
||||
don't write the webmaster about them.<br />
|
||||
<a href="diff/config.html">Customize the patch viewer</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h2 id="news">Site News</h2>
|
||||
<ul>
|
||||
<li class="newsitem">
|
||||
<p>
|
||||
December 31, 2008: <a href="http://patchwork.kernel.org">patchwork.kernel.org</a> is now available for
|
||||
general use. It is currently only monitoring the Linux Kernel mailing-list, but should be useful to kernel
|
||||
developers in dealing with patches flying across the wire.
|
||||
</p>
|
||||
</li>
|
||||
<li class="newsitem">
|
||||
<p>
|
||||
September 19, 2008: mirrors.kernel.org has been flipped over to using our new GeoDNS based bind server (named-geodns).
|
||||
This means that, at the dns query level, our servers will attempt to direct you to the nearest / fastest kernel.org
|
||||
mirror for your request. This means that you no longer have to use mirrors.us.kernel.org or mirrors.eu.kernel.org
|
||||
to generally route you to the right place. This does mean a change to mirrors.kernel.org no longer explicitly
|
||||
pointing at mirrors.us.kernel.org. Additional information on named-geodns will be forth coming, check back here for
|
||||
an addendum soon.
|
||||
</p>
|
||||
</li>
|
||||
<li class="newsitem">
|
||||
September 12, 2008: Thanks to
|
||||
a <a href="http://www.linux-foundation.org/weblogs/jzemlin/2008/09/11/linux-foundation-expands-fellowship-program-to-support-kernel-developers/">fundraising
|
||||
effort</a> by the <a href="http://www.linux-foundation.org/">Linux
|
||||
Foundation</a>, John "warthog9" Hawley will be joining
|
||||
kernel.org full time as administrator starting Monday, September
|
||||
15. John has already been the primary administrator on a volunteer
|
||||
basis for the past three years, and will now be able to devote all his
|
||||
time toward kernel.org.
|
||||
</li>
|
||||
|
||||
<li class="newsitem">
|
||||
<div style="float: right; margin-left: 10px;">
|
||||
<a href="http://mirrors.eu.kernel.org/">
|
||||
<img src="/flags/eu.png" width="48" height="32" alt="EU" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p>March 24, 2008: After far too long of a bringup,
|
||||
<a href="http://mirrors.eu.kernel.org/"><strong>mirrors.eu.kernel.org</strong></a> is
|
||||
now available. Again thanks to to <a href="http://www.hp.com/">Hewlett-Packard</a>,
|
||||
<a href="http://www.isc.org/">ISC</a> and
|
||||
<a href="http://www.umu.se/">Umeå Universitet</a>, we now have a full complement of
|
||||
mirror servers in Amsterdam and Umeå.</p>
|
||||
|
||||
<p>Huge thanks to HP for donating two additional DL585 G5's
|
||||
for this effort, and huge thanks to ISC and UMU for
|
||||
volunteering to host our servers!</p>
|
||||
</li>
|
||||
|
||||
<li class="newsitem">
|
||||
<p>Aug 17, 2007: We have been recognized by the IRS as a
|
||||
<a href="nonprofit.html">501(c)3 nonprofit corporation</a>.</p>
|
||||
</li>
|
||||
|
||||
<li class="newsitem">
|
||||
<div style="float: right; margin-left: 10px;">
|
||||
<a href="http://www.eu.kernel.org/">
|
||||
<img src="/flags/eu.png" width="48" height="32" alt="EU" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p>Jun 30, 2007: <strong>European servers!</strong> Thanks
|
||||
to <a href="http://www.hp.com/">Hewlett-Packard</a>,
|
||||
<a href="http://www.isc.org/">ISC</a> and
|
||||
<a href="http://www.umu.se/">Umeå Universitet</a>, we are
|
||||
introducing new kernel.org servers at ISC in Amsterdam and
|
||||
Umeå Universitet, Sweden. These servers are available as a
|
||||
round-robin as <a href="http://www.eu.kernel.org/">www.eu.kernel.org</a>,
|
||||
<a href="ftp://ftp.eu.kernel.org/">ftp.eu.kernel.org</a>, and
|
||||
rsync.eu.kernel.org.</p>
|
||||
|
||||
<p>Additionally, the
|
||||
hostnames <a href="http://www.all.kernel.org/">www.all.kernel.org</a>,
|
||||
<a href="ftp://ftp.all.kernel.org/">ftp.all.kernel.org</a>,
|
||||
and rsync.all.kernel.org are worldwide round-robins among all
|
||||
four servers.</p>
|
||||
|
||||
<p>We hope to have Geo- or BGP-based IP directing in the
|
||||
future, and hope to soon provide additional services in
|
||||
Europe.</p>
|
||||
|
||||
<p>Huge thanks to HP for donating two additional DL380 G5's
|
||||
for this effort, and huge thanks to ISC and UMU for
|
||||
volunteering to host our servers!</p>
|
||||
</li>
|
||||
|
||||
<li class="newsitem">
|
||||
The bandwidth graphs have now moved
|
||||
<a href="http://cacti.kernel.org/graph_view.php?action=tree&tree_id=2">here</a>.
|
||||
</li>
|
||||
|
||||
<li class="newsitem">
|
||||
<p>May 20, 2007: <strong>New servers!</strong>
|
||||
We have received two new
|
||||
<a href="http://h10010.www1.hp.com/wwpc/us/en/sm/WF05a/15351-15351-3328412-241644-241475-1121516.html?jumpid=reg_R1002_USEN">DL380 G5</a>
|
||||
servers from <a href="http://www.hp.com/">Hewlett-Packard</a>.
|
||||
These servers are dual quad-core Xeon E5335 servers with 16 GB
|
||||
RAM per server, and 15000 RPM SAS disks. These servers have
|
||||
replaced the old servers for all local-contents services (www,
|
||||
ftp, and rsync); the old servers are now dedicated to running
|
||||
<a href="http://mirrors.kernel.org/">mirrors.kernel.org</a>.</p>
|
||||
<p>Once again, thanks to HP for your continued support of
|
||||
kernel.org!</p>
|
||||
</li>
|
||||
|
||||
<li class="newsitem">
|
||||
Mar 13, 2007: <strong>10 years of kernel.org!</strong> The
|
||||
Linux Kernel archives were <a href="970313.08.txt">announced to the world on March 13,
|
||||
1997</a>. Thanks to everyone that has made kernel.org
|
||||
possible over the years, our sponsors, staff volunteers and of
|
||||
course the Linux community for making it a worthwhile effort
|
||||
in the first place!
|
||||
</li>
|
||||
|
||||
<li class="newsitem">
|
||||
Feb 4, 2006:
|
||||
<a href="http://www.hp.com/">Hewlett-Packard</a> has been kind
|
||||
enough to replace our internal master server with a brand new
|
||||
<a href="http://h18004.www1.hp.com/products/servers/proliantdl385/index.html">ProLiant DL385</a>
|
||||
with a dual-core Opteron 275 and 4 GB of RAM. Once
|
||||
again, huge thanks to HP!
|
||||
</li>
|
||||
|
||||
<li class="newsitem">
|
||||
Sep 30, 2005:
|
||||
By popular demand, there is now a <a href="/faq/">kernel.org FAQ</a>.
|
||||
</li>
|
||||
|
||||
<li class="newsitem">
|
||||
Aug 21, 2003:
|
||||
Please don't use <strong>finger.kernel.org</strong> for any
|
||||
sort of automatic monitoring. The number of automatic bots
|
||||
hitting this port is causing the finger daemon to shut down
|
||||
more often than not. The same information is available from
|
||||
<a href="/kdist/finger_banner">http://www.kernel.org/kdist/finger_banner</a>.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="mirrors">The Linux Kernel Archives Mirror System</h2>
|
||||
<p>To improve access for everyone, a number of
|
||||
sites around the world have provided mirrors of this site, which
|
||||
may be faster to use than the master archive itself. Please see
|
||||
<a href="/mirrors/"><strong>http://www.kernel.org/mirrors/</strong></a> for
|
||||
information about how to connect to a participating mirror site.</p>
|
||||
|
||||
<p>To guard against Trojan mirror sites, all files originating at
|
||||
the Linux Kernel Archives are <a href="signature.html">cryptographically signed</a>. <em>If you are
|
||||
getting a message that the verification key has expired, please
|
||||
see <a href="signature.html#expire">this link.</a></em></p>
|
||||
|
||||
<h2 id="whatislinux">What is Linux?</h2>
|
||||
<p>Linux is a clone of the operating system Unix,
|
||||
written from scratch by Linus Torvalds with assistance from a
|
||||
loosely-knit team of hackers across the Net. It aims towards
|
||||
POSIX and <a href="http://www.unix-systems.org/">Single UNIX
|
||||
Specification</a> compliance.</p>
|
||||
|
||||
<p>It has all the features you would expect in a modern
|
||||
fully-fledged Unix, including true multitasking, virtual memory,
|
||||
shared libraries, demand loading, shared copy-on-write executables,
|
||||
proper memory management, and multistack networking including IPv4
|
||||
and IPv6.</p>
|
||||
|
||||
<p>Although originally developed first for 32-bit x86-based PCs (386 or
|
||||
higher), today Linux also runs on (at least) the
|
||||
<a href="http://www.alphalinux.org/">Alpha AXP</a>,
|
||||
<a href="http://www.ultralinux.org/">Sun SPARC</a>,
|
||||
<a href="http://www.linux-m68k.org/">Motorola 68000</a>,
|
||||
<a href="http://penguinppc.org/">PowerPC</a>,
|
||||
<a href="http://www.arm.linux.org.uk/">ARM</a>,
|
||||
<a href="http://linux-sh.org/">Hitachi SuperH</a>,
|
||||
<a href="http://www.ibm.com/developerworks/linux/linux390/">IBM S/390</a>,
|
||||
<a href="http://www.linux-mips.org/">MIPS</a>,
|
||||
<a href="http://www.parisc-linux.org/">HP PA-RISC</a>,
|
||||
<a href="http://www.ia64-linux.org/">Intel IA-64</a>,
|
||||
<a href="http://www.x86-64.org/">AMD x86-64</a>,
|
||||
<a href="http://developer.axis.com/software/linux/">AXIS CRIS</a>,
|
||||
<a href="http://www.linux-m32r.org/">Renesas M32R</a>,
|
||||
<a href="http://www.avr32linux.org/">Atmel AVR32</a>,
|
||||
<a href="http://uclinux-h8.sourceforge.jp/">Renesas H8/300</a>,
|
||||
NEC V850,
|
||||
<a href="http://www.linux-xtensa.org/">Tensilica Xtensa</a>,
|
||||
and <a href="http://blackfin.uclinux.org/">Analog Devices Blackfin</a>
|
||||
architectures; for many of these architectures in both 32- and
|
||||
64-bit variants.</p>
|
||||
|
||||
<p>Linux is easily portable to most general-purpose 32- or 64-bit
|
||||
architectures as long as they have a paged memory management unit
|
||||
(PMMU) and a port of the GNU C compiler (gcc) (part of <a
|
||||
href="http://gcc.gnu.org/">The GNU Compiler Collection, GCC</a>). Linux
|
||||
has also been ported to a number of architectures without a PMMU,
|
||||
although functionality is then obviously somewhat limited. See the
|
||||
<a href="http://www.uclinux.org/">µClinux project</a> for more
|
||||
info.</p>
|
||||
|
||||
<h2 id="newtolinux">New to Linux?</h2>
|
||||
|
||||
<p>If you're new to Linux, you don't want to download the kernel,
|
||||
which is just a component in a working Linux system. Instead, you
|
||||
want what is called a <em>distribution</em> of Linux, which is a
|
||||
complete Linux system. There are numerous distributions available
|
||||
for download on the Internet as well as for purchase from various
|
||||
vendors; some are general-purpose, and some are optimized for
|
||||
specific uses. We currently have mirrors of several distributions
|
||||
available at <a href="http://mirrors.kernel.org/">mirrors.kernel.org</a>,
|
||||
as well as a small collection of special-purpose distributions at
|
||||
<a href="/pub/dist/">http://www.kernel.org/pub/dist/</a>.</p>
|
||||
|
||||
<p>Note, however, that most distributions are very large (several
|
||||
gigabytes), so unless you have a <a href="fast.html">fast Internet
|
||||
link</a> you may want to save yourself some hassle and purchase a
|
||||
CD-ROM with a distribution; such CD-ROMs are available from a number
|
||||
of vendors.</p>
|
||||
|
||||
<p><a href="http://mirrors.kernel.org/LDP/HOWTO/Installation-HOWTO/">The
|
||||
Linux Installation HOWTO</a> has more information how to set up
|
||||
your first Linux system.</p>
|
||||
|
||||
<h2 id="moreinfo">More Information</h2>
|
||||
<p>There is much <a href="links.html">information about Linux on the web</a>.</p>
|
||||
|
||||
<h2 id="reportingbugs">Reporting Linux Kernel bugs</h2>
|
||||
<p>Please see <a href="/pub/linux/docs/lkml/reporting-bugs.html"><strong>http://www.kernel.org/pub/linux/docs/lkml/reporting-bugs.html</strong></a>
|
||||
if you want to report a Linux kernel bug. <em>Bug reports sent to
|
||||
the kernel.org administrators will be ignored.</em></p>
|
||||
|
||||
<p>There is now a bugzilla setup at <a href="http://bugzilla.kernel.org">bugzilla.kernel.org</a>.
|
||||
Currently this is for reporting kernel version 2.6 bugs only.</p>
|
||||
|
||||
<h2 id="mailinglist">Mailing list</h2>
|
||||
<p>The Linux kernel is discussed on the
|
||||
<em>linux-kernel</em> mailing list at <a href="http://vger.kernel.org/"><em>vger.kernel.org</em></a>. The FAQ
|
||||
is available at <a href="/pub/linux/docs/lkml/"><strong>http://www.kernel.org/pub/linux/docs/lkml/</strong></a>,
|
||||
please read the FAQ before subscribing.</p>
|
||||
|
||||
<p>Although there is no official archive site, unofficial
|
||||
archives of the list can be found at:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://marc.info/?l=linux-kernel"><strong>http://marc.info/?l=linux-kernel</strong></a></li>
|
||||
<li><a href="http://www.ussg.iu.edu/hypermail/linux/kernel/"><strong>http://www.ussg.iu.edu/hypermail/linux/kernel/</strong></a></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="git">Development trees</h2>
|
||||
<p>The Linux kernel, as well as several other pieces of software,
|
||||
are maintained using the <a href="/pub/software/scm/git">git</a>
|
||||
source code control system. For a more user-friendly wrapper around
|
||||
git, see <a href="/pub/software/scm/cogito">Cogito</a>.</p>
|
||||
|
||||
<p>See <a href="http://git.kernel.org/">http://git.kernel.org/</a> for a list of
|
||||
git repositories on <em>kernel.org</em>.</p>
|
||||
|
||||
<h2 id="crypto">Cryptographic Software</h2>
|
||||
<p>Due to U.S. Exports Regulations, all
|
||||
cryptographic software on this site is subject to the following
|
||||
legal notice:</p>
|
||||
|
||||
<blockquote>
|
||||
This site includes publicly available
|
||||
encryption source code which, together with object code
|
||||
resulting from the compiling of publicly available source code,
|
||||
may be exported from the United States under License Exception
|
||||
"TSU" pursuant to 15 C.F.R. Section 740.13(e).
|
||||
</blockquote>
|
||||
|
||||
<p>This legal notice applies to <em>cryptographic software
|
||||
only.</em> Please see the <a href="http://www.bis.doc.gov/">Bureau of Industry and Security</a> for
|
||||
more information about current U.S. regulations.</p>
|
||||
|
||||
<p>Our servers are located in Corvallis, Oregon, USA; Palo Alto and San
|
||||
Francisco, California, USA; Amsterdam, Netherlands; and Umeå, Sweden.
|
||||
Use in violation of any applicable laws is prohibited.</p>
|
||||
|
||||
<h2 id="contact">Comments</h2>
|
||||
<p>Before emailing kernel.org, please take a look at our
|
||||
<a href="/faq/">kernel.org FAQ</a>.</p>
|
||||
|
||||
<p>For comments about <i>the web pages</i>, please send mail
|
||||
to <a href="mailto:webmaster@kernel.org"><i>webmaster@kernel.org</i></a>.</p>
|
||||
|
||||
<p>For comments about <i>the file archive</i>, please send mail
|
||||
to <a href="mailto:ftpadmin@kernel.org"><i>ftpadmin@kernel.org</i></a>.</p>
|
||||
|
||||
<p><b><i>Please do not send general Linux questions or bug
|
||||
reports to these addresses. We do not have the resources to reply
|
||||
to them. If your message does not relate to the operation of the
|
||||
Linux Kernel Archives, it will be deleted without action. Because
|
||||
of the volume of unsolicited email we receive, please add [KORG]
|
||||
to the subject to avoid accidental deletion. Additionally, any
|
||||
Content-Type other than text/plain will most likely be deleted
|
||||
without action.</i></b></p>
|
||||
|
||||
<hr />
|
||||
|
||||
<p style="text-align:center;">
|
||||
<small>This site is operated by the Linux Kernel Organization,
|
||||
Inc., a <a href="nonprofit.html">501(c)3 nonprofit corporation</a>, with
|
||||
support from the following sponsors.</small>
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
<p id="sponsors">
|
||||
<a href="http://www.isc.org/"><img src="logos/hostedatisc.png"
|
||||
width="84" height="41" alt="Internet Systems Consortium" /></a>
|
||||
|
||||
<a href="http://www.umu.se/"><img src="logos/umu60.png"
|
||||
width="63" height="60" alt="Umeå Universitet" /></a>
|
||||
|
||||
<a href="http://www.hp.com/"><img src="logos/hplogo.gif"
|
||||
alt="HP" width="66" height="55" /></a>
|
||||
|
||||
<a href="http://www.linux-foundation.org/"><img src="logos/lflogo-med.png"
|
||||
alt="The Linux Foundation" width="108" height="33" /></a>
|
||||
|
||||
<a href="http://www.osuosl.org/"><img src="logos/osl.png"
|
||||
width="88" height="31" alt="Open Source Lab" /></a>
|
||||
|
||||
<a href="powered.html"><img src="logos/logo70-tran.png"
|
||||
alt="Powered by Linux" width="66" height="71" /></a>
|
||||
|
||||
<a href="http://validator.w3.org/check/referer"><img src="logos/valid-xhtml10"
|
||||
alt="Valid XHTML 1.0!" height="31" width="88" /></a>
|
||||
<br clear="left" />
|
||||
</p>
|
||||
|
||||
<p id="trademark">
|
||||
Linux is a Registered Trademark of Linus Torvalds.<br />
|
||||
<a href="legal.html">(Legal Notice)</a>
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,112 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" ><!--
|
||||
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" stuff added
|
||||
8/5/2008 by jboschan for validation purposes. -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>The Benefit Bank</title>
|
||||
<link rel="SHORTCUT ICON" href="/favicon.ico" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/shared/css/tbb.css"/>
|
||||
|
||||
<!-- BDS RELEASE: -->
|
||||
|
||||
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function AlertSiteSeal(){
|
||||
AlertSiteWindow =
|
||||
window.open('http://www.alertsite.com/cgi-bin/alertsite_seal?obj_cust=18428&obj_device=34696','AlertSiteWindow','scrollbars,resizable,height=450,width=500');
|
||||
AlertSiteWindow.focus();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function go() { document.externalLogin.login.focus(); }
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="login" onload="go()">
|
||||
<div id="wrapper">
|
||||
<div id="wrapper-bg">
|
||||
|
||||
<div id="login_header">
|
||||
</div>
|
||||
|
||||
<div id="nav-main" class="nav">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="dvMain">
|
||||
|
||||
|
||||
|
||||
<h1 style="margin-top:30px;">Login to The Benefit Bank!</h1>
|
||||
|
||||
|
||||
<div class="LoginBorder BgWhite" style="width:400px;">
|
||||
|
||||
<form name="externalLogin" action="/ums"
|
||||
method="post"><!-- method="POST" changed to method="post" 8/5/2008 by
|
||||
Jboschan -->
|
||||
<dl>
|
||||
<!-- <dd></dd> tags added around input statement for validation
|
||||
8/7/2008 -->
|
||||
<dd><input name="unassisted" type="hidden" value="1"/></dd>
|
||||
<dd>
|
||||
<!-- this dd added 8/7/2008 by Jboschan to try to fix layout in Safari, Opera. -->
|
||||
<div class="clear"></div>
|
||||
</dd>
|
||||
<dt>Login Name:</dt>
|
||||
<dd><input name="login" type="text" size="10" autocomplete="off"/></dd>
|
||||
<dd>
|
||||
<!-- this dd added 8/7/2008 by Jboschan to try to fix layout in Safari, Opera. -->
|
||||
<div class="clear"></div>
|
||||
</dd>
|
||||
<dt>Password:</dt>
|
||||
<dd>
|
||||
<input name="password" type="password" size="10" autocomplete="off"/>
|
||||
</dd>
|
||||
<dd>
|
||||
<input alt="Log in" type="submit" value="Log In" class="frButton"/>
|
||||
</dd>
|
||||
<dd>
|
||||
<a href="/ums?task=request_password_reset">Reset Password</a> / <a href="/ums?task=request_password_reset&help=t">Log in Help</a>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</form>
|
||||
</div>
|
||||
<br />
|
||||
<!--
|
||||
<a href="javascript:AlertSiteSeal()"><img
|
||||
src="http://www.alertsite.com/images/as_seal_red_sm.gif" border="0"
|
||||
alt="Alert Site Security Certified" align="right"></a>
|
||||
-->
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<ul>
|
||||
<li><a href="http://www.solutionsforprogress.com">A Solutions For Progress Initiative</a> · </li>
|
||||
<li><a href="/shared/all/contactus.html">Technical Assistance</a> · </li>
|
||||
<li><a href="mailto:tbbhelpdesk@thebenefitbank.com?subject=Translation Issues">Translation Issues</a> · </li>
|
||||
<li><a href="/shared/all/contactus.html">Contact Us</a> · </li>
|
||||
<li><a href="/html/disclaimers/privacy.html">Privacy Policy</a> · </li>
|
||||
<li>Copyright © All Rights Reserved</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div id="footer-bottom"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -1128,6 +1128,7 @@ class SetTokenColors(Method):
|
|||
colors = tuple([x.strip() for x in vargs['colors'].split(',')])
|
||||
a = w.application
|
||||
if '*' in name:
|
||||
a.cached_colors = {}
|
||||
nstr = name.replace('.', '\\.').replace('*', '.*')
|
||||
r = re.compile(nstr)
|
||||
count = 0
|
||||
|
|
|
@ -3,8 +3,8 @@ from lex import Grammar, PatternRule, RegionRule
|
|||
|
||||
class StringGrammar(Grammar):
|
||||
rules = [
|
||||
PatternRule('cheetah_placeholder', r'\${[a-zA-Z0-9_.\[\]]+}'),
|
||||
PatternRule('cheetah_placeholder', r'\$[a-zA-Z0-9_.\[\]]+'),
|
||||
PatternRule('cheetah.placeholder', r'\${[a-zA-Z0-9_.\[\]]+}'),
|
||||
PatternRule('cheetah.placeholder', r'\$[a-zA-Z0-9_.\[\]]+'),
|
||||
PatternRule('octal', r'\\[0-7]{3}'),
|
||||
PatternRule('escaped', r'\\.'),
|
||||
PatternRule('data', r'[^\$\\]+'),
|
||||
|
@ -12,8 +12,8 @@ class StringGrammar(Grammar):
|
|||
|
||||
class TagGrammar(Grammar):
|
||||
rules = [
|
||||
PatternRule('cheetah_placeholder', r'\${[a-zA-Z0-9_.\[\]]+}'),
|
||||
PatternRule('cheetah_placeholder', r'\$[a-zA-Z0-9_.\[\]]+'),
|
||||
PatternRule('cheetah.placeholder', r'\${[a-zA-Z0-9_.\[\]]+}'),
|
||||
PatternRule('cheetah.placeholder', r'\$[a-zA-Z0-9_.\[\]]+'),
|
||||
RegionRule('string', '"', StringGrammar, '"'),
|
||||
RegionRule('string', "'", StringGrammar, "'"),
|
||||
PatternRule('namespace', '[a-zA-Z_]+:'),
|
||||
|
@ -25,10 +25,10 @@ class TemplateGrammar(Grammar):
|
|||
rules = [
|
||||
RegionRule('comment', r'#\*', Grammar, r'\*#'),
|
||||
PatternRule('comment', r'##.*\n'),
|
||||
PatternRule('cheetah_placeholder', r'\${[a-zA-Z0-9_.\[\]]+}'),
|
||||
PatternRule('cheetah_placeholder', r'\$[a-zA-Z0-9_.\[\]]+'),
|
||||
PatternRule('cheetah_directive', r'#.*?[#\n]'),
|
||||
RegionRule('cheetah_tag', '</?', TagGrammar, '/?>'),
|
||||
PatternRule('cheetah.placeholder', r'\${[a-zA-Z0-9_.\[\]]+}'),
|
||||
PatternRule('cheetah.placeholder', r'\$[a-zA-Z0-9_.\[\]]+'),
|
||||
PatternRule('cheetah.directive', r'#.*?[#\n]'),
|
||||
RegionRule('cheetah.tag', '</?', TagGrammar, '/?>'),
|
||||
]
|
||||
|
||||
class Template(Fundamental):
|
||||
|
@ -37,16 +37,13 @@ class Template(Fundamental):
|
|||
grammar = TemplateGrammar
|
||||
commentc = '##'
|
||||
colors = {
|
||||
'cheetah_directive': ('magenta', 'default', 'bold'),
|
||||
'cheetah_placeholder': ('magenta', 'default', 'bold'),
|
||||
'cheetah_tag.start': ('default', 'default', 'bold'),
|
||||
'cheetah_tag.namespace': ('magenta', 'default', 'bold'),
|
||||
'cheetah_tag.name': ('blue', 'default', 'bold'),
|
||||
'cheetah_tag.attrname': ('cyan', 'default', 'bold'),
|
||||
'cheetah_tag.string.start': ('green', 'default', 'bold'),
|
||||
'cheetah_tag.string.null': ('green', 'default', 'bold'),
|
||||
'cheetah_tag.string.end': ('green', 'default', 'bold'),
|
||||
'cheetah_tag.end': ('default', 'default', 'bold'),
|
||||
'cheetah.directive': ('magenta', 'default', 'bold'),
|
||||
'cheetah.placeholder': ('magenta', 'default', 'bold'),
|
||||
'cheetah.tag.start': ('default', 'default', 'bold'),
|
||||
'cheetah.tag.namespace': ('magenta', 'default', 'bold'),
|
||||
'cheetah.tag.name': ('blue', 'default', 'bold'),
|
||||
'cheetah.tag.attrname': ('cyan', 'default', 'bold'),
|
||||
'cheetah.tag.end': ('default', 'default', 'bold'),
|
||||
}
|
||||
_bindings = {
|
||||
'close-paren': (')',),
|
||||
|
|
66
mode/css.py
66
mode/css.py
|
@ -21,24 +21,24 @@ class CSSGrammar(Grammar):
|
|||
rules = [
|
||||
RegionRule(r'comment', '/\*', CommentGrammar1, '\*/'),
|
||||
RegionRule(r'comment', '<!--', CommentGrammar2, '-->'),
|
||||
NocasePatternRule(r'css_dimension', r'[+-]?(?:\d+|\d*\.\d+)[-a-z_][-a-z0-9_]*'),
|
||||
NocasePatternRule(r'css_percentage', r'[+-]?(?:\d+|\d*\.\d+)%%'),
|
||||
NocasePatternRule(r'css_length', r'[+-]?(?:\d+|\d*\.\d+)(?:em|ex|px|in|cm|mm|pt|pc)'),
|
||||
NocasePatternRule(r'css_hash', r'#' + chr2 + '+'),
|
||||
NocasePatternRule(r'css_real', r'[+-]?\d*\.\d+'),
|
||||
NocasePatternRule(r'css_int', r'[+-]?\d+'),
|
||||
NocasePatternRule(r'css_rule', r'@(?:page|media|import)'),
|
||||
NocasePatternRule(r'css_color', r'(?:aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|#\d{6}|#\d{3})(?!' + chr2 + ')'),
|
||||
NocasePatternRule(r'css.dimension', r'[+-]?(?:\d+|\d*\.\d+)[-a-z_][-a-z0-9_]*'),
|
||||
NocasePatternRule(r'css.percentage', r'[+-]?(?:\d+|\d*\.\d+)%%'),
|
||||
NocasePatternRule(r'css.length', r'[+-]?(?:\d+|\d*\.\d+)(?:em|ex|px|in|cm|mm|pt|pc)'),
|
||||
NocasePatternRule(r'css.hash', r'#' + chr2 + '+'),
|
||||
NocasePatternRule(r'css.real', r'[+-]?\d*\.\d+'),
|
||||
NocasePatternRule(r'css.int', r'[+-]?\d+'),
|
||||
NocasePatternRule(r'css.rule', r'@(?:page|media|import)'),
|
||||
NocasePatternRule(r'css.color', r'(?:aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|#\d{6}|#\d{3})(?!' + chr2 + ')'),
|
||||
|
||||
NocasePatternRule(r'css_keyword', r'(?:url|rgb|counter)'),
|
||||
NocaseRegionRule(r'css_keyword', '(?:(?<=url)|(?<=rgb)|(?<=counter))\(', KeywordGrammar, '\)'),
|
||||
NocasePatternRule(r'css.keyword', r'(?:url|rgb|counter)'),
|
||||
NocaseRegionRule(r'css.keyword', '(?:(?<=url)|(?<=rgb)|(?<=counter))\(', KeywordGrammar, '\)'),
|
||||
|
||||
NocasePatternRule(r'css_label', r"\.?" + chr2 + "+(?= *{)"),
|
||||
NocasePatternRule(r'css_ident', r"-?[a-z_]" + chr2 + "*"),
|
||||
NocasePatternRule(r'css_name', chr2 + "+"),
|
||||
NocasePatternRule(r'css.label', r"\.?" + chr2 + "+(?= *{)"),
|
||||
NocasePatternRule(r'css.ident', r"-?[a-z_]" + chr2 + "*"),
|
||||
NocasePatternRule(r'css.name', chr2 + "+"),
|
||||
NocasePatternRule(r'delimiter', r'[:;,{}()\[\]]|~=|\|=|='),
|
||||
RegionRule(r'string', "'", StringGrammar1, r"'"),
|
||||
RegionRule(r'string', '"', StringGrammar2, r'"'),
|
||||
RegionRule(r'css.string', "'", StringGrammar1, r"'"),
|
||||
RegionRule(r'css.string', '"', StringGrammar2, r'"'),
|
||||
]
|
||||
|
||||
class CSS(Fundamental):
|
||||
|
@ -50,24 +50,24 @@ class CSS(Fundamental):
|
|||
closetokens = ('delimiter',)
|
||||
closetags = {')': '(', ']': '[', '}': '{'}
|
||||
colors = {
|
||||
'css_dimension': ('magenta', 'default', 'bold'),
|
||||
'css_percentage': ('magenta', 'default', 'bold'),
|
||||
'css_length': ('magenta', 'default', 'bold'),
|
||||
'css_real': ('magenta', 'default', 'bold'),
|
||||
'css_int': ('magenta', 'default', 'bold'),
|
||||
'css_color': ('magenta', 'default', 'bold'),
|
||||
'css_hash': ('cyan', 'default', 'bold'),
|
||||
'css_rule': ('cyan', 'default', 'bold'),
|
||||
'css_label': ('cyan', 'default', 'bold'),
|
||||
'css_keyword': ('cyan', 'default', 'bold'),
|
||||
'css_ident': ('default', 'default'),
|
||||
'css_name': ('default', 'default'),
|
||||
'css_keyword': ('cyan', 'default', 'bold'),
|
||||
'css_keyword.start': ('default', 'default', 'bold'),
|
||||
'css_keyword.null': ('cyan', 'default', 'bold'),
|
||||
'css_keyword.octal': ('magenta', 'default', 'bold'),
|
||||
'css_keyword.escaped': ('magenta', 'default', 'bold'),
|
||||
'css_keyword.end': ('default', 'default', 'bold'),
|
||||
'css.dimension': ('magenta', 'default', 'bold'),
|
||||
'css.percentage': ('magenta', 'default', 'bold'),
|
||||
'css.length': ('magenta', 'default', 'bold'),
|
||||
'css.real': ('magenta', 'default', 'bold'),
|
||||
'css.int': ('magenta', 'default', 'bold'),
|
||||
'css.color': ('magenta', 'default', 'bold'),
|
||||
'css.hash': ('cyan', 'default', 'bold'),
|
||||
'css.rule': ('cyan', 'default', 'bold'),
|
||||
'css.label': ('cyan', 'default', 'bold'),
|
||||
'css.keyword': ('cyan', 'default', 'bold'),
|
||||
'css.ident': ('default', 'default'),
|
||||
'css.name': ('default', 'default'),
|
||||
'css.keyword': ('cyan', 'default', 'bold'),
|
||||
'css.keyword.start': ('default', 'default', 'bold'),
|
||||
'css.keyword.null': ('cyan', 'default', 'bold'),
|
||||
'css.keyword.octal': ('magenta', 'default', 'bold'),
|
||||
'css.keyword.escaped': ('magenta', 'default', 'bold'),
|
||||
'css.keyword.end': ('default', 'default', 'bold'),
|
||||
}
|
||||
_bindings = {
|
||||
'close-paren': (')',),
|
||||
|
|
59
mode/html.py
59
mode/html.py
|
@ -4,24 +4,29 @@ import default
|
|||
import method
|
||||
from mode import Fundamental
|
||||
from lex import Grammar, PatternRule, RegionRule
|
||||
from mode.xml import TagGrammar
|
||||
from mode.xml import TagGrammar, CommentGrammar, MetadataGrammar, CDataGrammar
|
||||
from mode.javascript import JavascriptGrammar
|
||||
from mode.css import CSSGrammar
|
||||
|
||||
class CommentGrammar(Grammar):
|
||||
rules = [PatternRule(r'data', r'(?:[^-]|-(?!-)|--(?!>))+')]
|
||||
class DoctypeGrammar(Grammar):
|
||||
rules = [PatternRule('data', '[^>]+')]
|
||||
|
||||
class HTMLGrammar(Grammar):
|
||||
rules = [
|
||||
# TODO: how does cdata work again?
|
||||
RegionRule(r'comment', r'<!--', CommentGrammar, r'-->'),
|
||||
PatternRule(r'html.data', r'[^&<]+'),
|
||||
# BUG: not all scripts are javascript and not all styles are CSS but
|
||||
# dynamically choosing a grammar based on the 'type' attribute (which
|
||||
# may be on a different line) is impractical.
|
||||
RegionRule(r'script', r'<(?=script[^a-zA-Z0-9_])', TagGrammar, r'>', JavascriptGrammar, r'</(?=script>)', TagGrammar, r'>'),
|
||||
RegionRule(r'style', r'<(?=style[^a-zA-Z0-9_])', TagGrammar, r'>', CSSGrammar, r'</(?=style>)', TagGrammar, r'>'),
|
||||
RegionRule(r'tag', r'</?', TagGrammar, r'/?>'),
|
||||
PatternRule(r'entity', r'&.*?;'),
|
||||
RegionRule('html.tag', '<(?=script[^a-zA-Z0-9_])', TagGrammar, '>',
|
||||
JavascriptGrammar, '</(?=script>)', TagGrammar, '>'),
|
||||
RegionRule('html.tag', '<(?=style[^a-zA-Z0-9_])', TagGrammar, '>',
|
||||
CSSGrammar, '</(?=style>)', TagGrammar, '>'),
|
||||
RegionRule(r'comment', r'<!--', CommentGrammar, r'-->'),
|
||||
RegionRule(r'html.tag', r'<(?![\?!])', TagGrammar, r'/?>'),
|
||||
RegionRule(r'html.metadata', r'<\?', MetadataGrammar, r'\?>'),
|
||||
RegionRule(r'html.doctype', r'<!', DoctypeGrammar, r'>'),
|
||||
PatternRule(r'html.entity', r'&[a-z]+;'),
|
||||
RegionRule(r'html.cdata', r'<!\[CDATA\[', CDataGrammar, r'\]\]>'),
|
||||
]
|
||||
|
||||
class HtmlViewPage(method.Method):
|
||||
|
@ -77,35 +82,31 @@ class HtmlCheckSpelling(method.Method):
|
|||
|
||||
class HTML(Fundamental):
|
||||
name = 'HTML'
|
||||
extensions = ['.html', '.htm', '.shtml', '.shtm', '.xhtml']
|
||||
extensions = ['.html', '.htm', '.shtml', '.shtm', '.xhtml', '.xhtm']
|
||||
grammar = HTMLGrammar
|
||||
colors = {
|
||||
'entity': ('magenta', 'default', 'bold'),
|
||||
'html.entity': ('magenta', 'default', 'bold'),
|
||||
'html.metadata.start': ('magenta', 'default', 'bold'),
|
||||
'html.metadata.data': ('magenta', 'default', 'bold'),
|
||||
'html.metadata.end': ('magenta', 'default', 'bold'),
|
||||
'html.doctype.start': ('magenta', 'default', 'bold'),
|
||||
'html.doctype.data': ('magenta', 'default', 'bold'),
|
||||
'html.doctype.end': ('magenta', 'default', 'bold'),
|
||||
'html.tag.start': ('default', 'default', 'bold'),
|
||||
'html.tag.namespace': ('magenta', 'default', 'bold'),
|
||||
'html.tag.name': ('blue', 'default', 'bold'),
|
||||
'html.tag.attrname': ('cyan', 'default', 'bold'),
|
||||
'html.tag.end': ('default', 'default', 'bold'),
|
||||
}
|
||||
config = {
|
||||
'html.viewcmd': 'firefox&',
|
||||
#'html.viewcmd': 'links',
|
||||
}
|
||||
|
||||
_colorbase = {
|
||||
'start': ('default', 'default', 'bold'),
|
||||
'namespace': ('magenta', 'default', 'bold'),
|
||||
'name': ('blue', 'default', 'bold'),
|
||||
'attrname': ('cyan', 'default', 'bold'),
|
||||
'string.start': ('green', 'default', 'bold'),
|
||||
'string.null': ('green', 'default', 'bold'),
|
||||
'string.end': ('green', 'default', 'bold'),
|
||||
'end': ('default', 'default', 'bold'),
|
||||
}
|
||||
for _name in _colorbase:
|
||||
colors['script.%s' % _name] = _colorbase[_name]
|
||||
colors['style.%s' % _name] = _colorbase[_name]
|
||||
colors['tag.%s' % _name] = _colorbase[_name]
|
||||
actions = [HtmlViewPage, HtmlValidatePage, HtmlCheckSpelling]
|
||||
_bindings = {
|
||||
'close-paren': (')',),
|
||||
'close-brace': ('}',),
|
||||
'close-bracket': (']',),
|
||||
'close-paren': (')',),
|
||||
'close-brace': ('}',),
|
||||
'close-bracket': (']',),
|
||||
'xml-create-tag': ('M-t',),
|
||||
}
|
||||
url = None
|
||||
|
|
|
@ -8,24 +8,24 @@ from point import Point
|
|||
|
||||
class StringGrammar1(Grammar):
|
||||
rules = [
|
||||
PatternRule(r'octal', r'\\[0-7]{3}'),
|
||||
PatternRule(r'hex', r'\\x[0-9a-fA-F]{2}'),
|
||||
PatternRule(r'escaped', r'\\.'),
|
||||
PatternRule(r'data', r'[^\\\']+'),
|
||||
PatternRule('octal', r'\\[0-7]{3}'),
|
||||
PatternRule('hex', r'\\x[0-9a-fA-F]{2}'),
|
||||
PatternRule('escaped', r'\\.'),
|
||||
PatternRule('data', r'[^\\\']+'),
|
||||
]
|
||||
class StringGrammar2(Grammar):
|
||||
rules = [
|
||||
PatternRule(r'octal', r'\\[0-7]{3}'),
|
||||
PatternRule(r'hex', r'\\x[0-9a-fA-F]{2}'),
|
||||
PatternRule(r'escaped', r'\\.'),
|
||||
PatternRule(r'data', r'[^\\\"]+'),
|
||||
PatternRule('octal', r'\\[0-7]{3}'),
|
||||
PatternRule('hex', r'\\x[0-9a-fA-F]{2}'),
|
||||
PatternRule('escaped', r'\\.'),
|
||||
PatternRule('data', r'[^\\\"]+'),
|
||||
]
|
||||
class RegexGrammar(Grammar):
|
||||
rules = [
|
||||
PatternRule(r'octal', r'\\[0-7]{3}'),
|
||||
PatternRule(r'hex', r'\\x[0-9a-fA-F]{2}'),
|
||||
PatternRule(r'escaped', r'\\.'),
|
||||
PatternRule(r'data', r'[^/\\]+'),
|
||||
PatternRule('octal', r'\\[0-7]{3}'),
|
||||
PatternRule('hex', r'\\x[0-9a-fA-F]{2}'),
|
||||
PatternRule('escaped', r'\\.'),
|
||||
PatternRule('data', r'[^/\\]+'),
|
||||
]
|
||||
|
||||
chr1 = '[a-zA-Z_]'
|
||||
|
@ -34,29 +34,31 @@ word = chr1 + chr2 + '*'
|
|||
|
||||
class JavascriptGrammar(Grammar):
|
||||
rules = [
|
||||
PatternRule(r'comment', r'//.*$'),
|
||||
RegionRule(r'comment', '/\*', Grammar, '\*/'),
|
||||
PatternRule(r'continuation', r'\\(?= *$)'),
|
||||
PatternRule('comment', '//.*$'),
|
||||
RegionRule('comment', '/\*', Grammar, '\*/'),
|
||||
PatternRule('continuation', r'\\(?= *$)'),
|
||||
|
||||
PatternMatchRule(r'x', r'(function)( +)('+word+')', 'js_reserved', r'spaces', r'js_function'),
|
||||
PatternMatchRule(r'x', r'(class|new)( +)('+word+')', 'js_reserved', r'spaces', r'js_class'),
|
||||
PatternMatchRule('x', '(function)( +)(' + word + ')',
|
||||
'js.reserved', 'spaces', 'js.function'),
|
||||
PatternMatchRule('x', '(class|new)( +)(' + word + ')',
|
||||
'js.reserved', 'spaces', 'js.class'),
|
||||
|
||||
PatternRule(r'js_reserved', r'(?:abstract|as|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|get|goto|if|import|implements|include|instanceof|interface|in|is|namespace|native|new|null|package|private|protected|public|return|set|super|switch|synchronized|this|throws|throw|transient|true|try|typeof|use|var|void|volatile|while|with)(?!'+chr2+')'),
|
||||
PatternRule('js.reserved', '(?:abstract|as|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|get|goto|if|import|implements|include|instanceof|interface|in|is|namespace|native|new|null|package|private|protected|public|return|set|super|switch|synchronized|this|throws|throw|transient|true|try|typeof|use|var|void|volatile|while|with)(?!' + chr2 + ')'),
|
||||
|
||||
PatternRule(r'identifier', word),
|
||||
PatternRule(r'integer', r"(?:0|[1-9][0-9]*|0[0-7]+|0[xX][0-9a-fA-F]+)[lL]?"),
|
||||
PatternRule(r'float', r"[0-9]+\.[0-9]*|\.[0-9]+|(?:[0-9]|[0-9]+\.[0-9]*|\.[0-9]+)[eE][\+-]?[0-9]+"),
|
||||
PatternRule('js.identifier', word),
|
||||
PatternRule('js.integer', "(?:0|[1-9][0-9]*|0[0-7]+|0[xX][0-9a-fA-F]+)[lL]?"),
|
||||
PatternRule('js.float', r"[0-9]+\.[0-9]*|\.[0-9]+|(?:[0-9]|[0-9]+\.[0-9]*|\.[0-9]+)[eE][\+-]?[0-9]+"),
|
||||
|
||||
PatternRule(r'eol', r'\n'),
|
||||
PatternRule(r'spaces', r' +'),
|
||||
PatternRule(r'delimiter', r'%=|&&=|&=|\(|\)|\*=|\+=|,|-=|\.{3}|\.|/=(?= |$)|::|:|;|<<=|>>=|>>>=|\?|\[|\]|^=|^^=|\{|\}|\|=|\|\|='),
|
||||
PatternRule('eol', r'\n'),
|
||||
PatternRule('spaces', ' +'),
|
||||
PatternRule('delimiter', r'%=|&&=|&=|\(|\)|\*=|\+=|,|-=|\.{3}|\.|/=(?= |$)|::|:|;|<<=|>>=|>>>=|\?|\[|\]|^=|^^=|\{|\}|\|=|\|\|='),
|
||||
|
||||
# fucking javascript!
|
||||
# their lexer grammar requires one-token look-behind in order to know
|
||||
# whether a "/" starts a literal regex, or is part of a mathematical
|
||||
# expression/assignment.
|
||||
RegionRule('js_regex', "(?<=[\(=:,]) */", RegexGrammar, "/[a-z]*"),
|
||||
PatternRule(r'operator', r'!==|!=|!|%|&&|&|\*|\+\+|\+|--|-|/|<<=|<<|<=|<|===|==|=|>>>=|>>>|>>=|>>|>=|>|\\|\|\|'),
|
||||
RegionRule('js.regex', r"(?<=[\(=:,]) */", RegexGrammar, "/[a-z]*"),
|
||||
PatternRule('js.operator', r'!==|!=|!|%|&&|&|\*|\+\+|\+|--|-|/|<<=|<<|<=|<|===|==|=|>>>=|>>>|>>=|>>|>=|>|\\|\|\|'),
|
||||
|
||||
RegionRule('string', "'", StringGrammar1, "'"),
|
||||
RegionRule('string', '"', StringGrammar2, '"'),
|
||||
|
@ -65,7 +67,8 @@ class JavascriptGrammar(Grammar):
|
|||
class JavascriptTabber2(tab.StackTabber2):
|
||||
open_tokens = {'delimiter': {'{': '}', '(': ')', '[': ']'}}
|
||||
close_tokens = {'delimiter': {'}': '{', ')': '(', ']': '['}}
|
||||
control_tokens = {'keyword': {'if': 1, 'else': 1, 'while': 1, 'do': 1, 'for': 1}}
|
||||
control_tokens = {'js.keyword': {'if': 1, 'else': 1, 'while': 1,
|
||||
'do': 1, 'for': 1}}
|
||||
end_at_eof = False
|
||||
end_at_tokens = {'delimiter': {';': 1}}
|
||||
nocontinue_tokens = {'delimiter': {';': 1, ',': 1},
|
||||
|
@ -80,7 +83,7 @@ class JavascriptTabber2(tab.StackTabber2):
|
|||
highlighter = self.mode.window.buffer.highlights[self.mode.name]
|
||||
if not highlighter.tokens[y]: return False
|
||||
t = highlighter.tokens[y][0]
|
||||
return t.name == 'js_reserved' and t.string == 'function'
|
||||
return t.name == 'js.reserved' and t.string == 'function'
|
||||
def _is_indent(self, t):
|
||||
return t.name == 'spaces'
|
||||
def _is_ignored(self, t):
|
||||
|
@ -117,15 +120,15 @@ class Javascript(Fundamental):
|
|||
closetokens = ('delimiter',)
|
||||
closetags = {')': '(', ']': '[', '}': '{'}
|
||||
colors = {
|
||||
'js_function': ('blue', 'default', 'bold'),
|
||||
'js_class': ('magenta', 'default', 'bold'),
|
||||
'js_reserved': ('cyan', 'default', 'bold'),
|
||||
'js_regex.start': ('cyan', 'default', 'bold'),
|
||||
'js_regex.data': ('cyan', 'default', 'bold'),
|
||||
'js_regex.null': ('cyan', 'default', 'bold'),
|
||||
'js_regex.octal': ('magenta', 'default', 'bold'),
|
||||
'js_regex.escaped': ('magenta', 'default', 'bold'),
|
||||
'js_regex.end': ('cyan', 'default', 'bold'),
|
||||
'js.function': ('blue', 'default', 'bold'),
|
||||
'js.class': ('magenta', 'default', 'bold'),
|
||||
'js.reserved': ('cyan', 'default', 'bold'),
|
||||
'js.regex.start': ('cyan', 'default', 'bold'),
|
||||
'js.regex.data': ('cyan', 'default', 'bold'),
|
||||
'js.regex.null': ('cyan', 'default', 'bold'),
|
||||
'js.regex.octal': ('magenta', 'default', 'bold'),
|
||||
'js.regex.escaped': ('magenta', 'default', 'bold'),
|
||||
'js.regex.end': ('cyan', 'default', 'bold'),
|
||||
}
|
||||
config = {'rhino.cmd': 'rhino'}
|
||||
actions = [RhinoStart, RhinoLoadFile]
|
||||
|
|
|
@ -5,9 +5,9 @@ from method import Method
|
|||
from lex import Grammar, PatternRule, RegionRule
|
||||
from mode.text import TextInsertSpace
|
||||
|
||||
class ArgumentGrammar(Grammar): rules = [PatternRule(r'data', r'[^}]+')]
|
||||
class StringGrammar1(Grammar): rules = [PatternRule(r'data', r"[^']+")]
|
||||
class StringGrammar2(Grammar): rules = [PatternRule(r'data', r"(?:[^']|'(?!'))+")]
|
||||
class ArgumentGrammar(Grammar): rules = [PatternRule('data', '[^}]+')]
|
||||
class StringGrammar1(Grammar): rules = [PatternRule('data', "[^']+")]
|
||||
class StringGrammar2(Grammar): rules = [PatternRule('data', "(?:[^']|'(?!'))+")]
|
||||
|
||||
class FalseGrammar(Grammar):
|
||||
rules = [
|
||||
|
@ -17,16 +17,16 @@ class FalseGrammar(Grammar):
|
|||
|
||||
class LatexGrammar(Grammar):
|
||||
rules = [
|
||||
PatternRule(r'comment', r'\%.*$'),
|
||||
PatternRule('comment', r'\%.*$'),
|
||||
RegionRule('comment', r'\\iffalse', FalseGrammar, r'\\fi'),
|
||||
PatternRule(r'latex_wrapper', r'\\(?:begin|end)'),
|
||||
PatternRule(r'latex_control', r'\\[a-zA-Z]+'),
|
||||
RegionRule(r'latex_argument', r'{', ArgumentGrammar, r'}'),
|
||||
RegionRule(r'latex_string', r"``", StringGrammar2, r"''"),
|
||||
RegionRule(r'latex_string', r"`", StringGrammar1, r"'"),
|
||||
PatternRule(r'latex_escaped', r'\\.'),
|
||||
PatternRule(r'latex_special', r'[{}$^_%~#&]'),
|
||||
PatternRule(r'data', r'[^{}$^_%~#&%\\`]+'),
|
||||
PatternRule('latex.wrapper', r'\\(?:begin|end)'),
|
||||
PatternRule('latex.control', r'\\[a-zA-Z]+'),
|
||||
RegionRule('latex.argument', r'{', ArgumentGrammar, r'}'),
|
||||
RegionRule('latex.string', r"``", StringGrammar2, r"''"),
|
||||
RegionRule('latex.string', r"`", StringGrammar1, r"'"),
|
||||
PatternRule('latex.escaped', r'\\.'),
|
||||
PatternRule('latex.special', r'[{}$^_%~#&]'),
|
||||
PatternRule('latex.data', r'[^{}$^_%~#&%\\`]+'),
|
||||
]
|
||||
|
||||
class LatexBuild(Method):
|
||||
|
@ -120,15 +120,10 @@ class Latex(Fundamental):
|
|||
commentc = '%'
|
||||
grammar = LatexGrammar
|
||||
colors = {
|
||||
'latex_wrapper': ('magenta', 'default', 'bold'),
|
||||
'latex_control': ('blue', 'default', 'bold'),
|
||||
'latex_argument.null': ('cyan', 'default', 'bold'),
|
||||
'latex_argument.data': ('cyan', 'default', 'bold'),
|
||||
'latex_string.start': ('green', 'default', 'bold'),
|
||||
'latex_string.null': ('green', 'default', 'bold'),
|
||||
'latex_string.data': ('green', 'default', 'bold'),
|
||||
'latex_string.end': ('green', 'default', 'bold'),
|
||||
'latex_escaped': ('magenta', 'default', 'bold'),
|
||||
'latex.wrapper': ('magenta', 'default', 'bold'),
|
||||
'latex.control': ('blue', 'default', 'bold'),
|
||||
'latex.argument.null': ('cyan', 'default', 'bold'),
|
||||
'latex.argument.data': ('cyan', 'default', 'bold'),
|
||||
}
|
||||
config = {
|
||||
'latex.buildcmd': 'latex',
|
||||
|
|
81
mode/make.py
81
mode/make.py
|
@ -1,35 +1,33 @@
|
|||
import color, mode
|
||||
from lex import Grammar, PatternRule, RegionRule
|
||||
from mode.sh import ShGrammar, Sh
|
||||
from lex import Grammar, PatternRule, RegionRule, PatternMatchRule
|
||||
from mode.sh import ShGrammar, Sh, StringGrammar1, StringGrammar2
|
||||
|
||||
class StringGrammar1(Grammar):
|
||||
rules = [
|
||||
PatternRule(r'escaped', r'\\.'),
|
||||
PatternRule(r'escaped', r'\$\$'),
|
||||
PatternRule(r'variable', r"\$\([a-zA-Z0-9_]+\)"),
|
||||
PatternRule(r'data', r"[^\\']+"),
|
||||
]
|
||||
class StringGrammar2(Grammar):
|
||||
rules = [
|
||||
PatternRule(r'escaped', r'\\.'),
|
||||
PatternRule(r'escaped', r'\$\$'),
|
||||
PatternRule(r'variable', r"\$\([a-zA-Z0-9_]+\)"),
|
||||
PatternRule(r'data', r'[^\\"]+'),
|
||||
]
|
||||
class StanzaGrammar(Grammar): pass
|
||||
StanzaGrammar.rules = [
|
||||
PatternMatchRule('x', r'^( +)([\-@]*)', 'spaces', 'modifier'),
|
||||
PatternRule('spaces', r' +'),
|
||||
PatternRule('continuation', r'\\\n$'),
|
||||
PatternRule('make.extvariable', r'\$\$\{.+?\}'),
|
||||
PatternRule('make.extvariable', r'\$\$[a-zA-Z0-9_]+'),
|
||||
PatternRule('escaped', r'\$\$'),
|
||||
RegionRule('eval', '`', StanzaGrammar, '`'),
|
||||
PatternRule('make.variable', r'\$[?@]'),
|
||||
PatternRule('make.variable', r'\$[a-zA-Z0-9_]+'),
|
||||
PatternRule('make.variable', r'\$\(.+?\)'),
|
||||
PatternRule('make.variable', r'\$\{.+?\}'),
|
||||
PatternRule('escaped', r'\\.'),
|
||||
PatternRule('word', r'[a-zA-Z0-9_]+'),
|
||||
]
|
||||
|
||||
class MakeGrammar(Grammar):
|
||||
rules = [
|
||||
PatternRule(r'comment', r'#.*\n$'),
|
||||
PatternRule(r'spaces', r' +$'),
|
||||
PatternRule(r'continuation', r'\\\n$'),
|
||||
PatternRule(r'targets', r'^[^:= ]+(?= *:)'),
|
||||
RegionRule(r'assignment', r'^[^:= ]+ *=', ShGrammar, r'\n'),
|
||||
RegionRule(r'actions', r'^ ', ShGrammar, r'\n'),
|
||||
PatternRule(r'make_variable', r'\$\([a-zA-Z0-9_]+\)'),
|
||||
PatternRule(r'make_variable', r'\${[a-zA-Z0-9_]+}'),
|
||||
RegionRule(r'make_string', r'"', StringGrammar2, r'"'),
|
||||
RegionRule(r'make_string', r"'", StringGrammar1, r"'"),
|
||||
PatternRule(r'eol', r'\n$'),
|
||||
PatternRule('spaces', ' +'),
|
||||
PatternRule('eol', r'\n'),
|
||||
PatternRule('make.macro', '[^ :=]+(?= *=)'),
|
||||
PatternRule('make.target', '[^ :=]+(?= *:)'),
|
||||
PatternRule('comment', r'#.*\n$'),
|
||||
RegionRule('make.macro', '=', StanzaGrammar, '^(?=[^ ])'),
|
||||
RegionRule('make.target', ':', StanzaGrammar, '^(?=[^ ])'),
|
||||
]
|
||||
|
||||
class Make(mode.Fundamental):
|
||||
|
@ -39,14 +37,27 @@ class Make(mode.Fundamental):
|
|||
commentc = '#'
|
||||
savetabs = True
|
||||
colors = {
|
||||
'targets.start': ('cyan', 'default', 'bold'),
|
||||
'assignment.start': ('yellow', 'default', 'bold'),
|
||||
'make_variable': ('yellow', 'default', 'bold'),
|
||||
'make_string.start': ('green', 'default', 'bold'),
|
||||
'make_string.variable': ('yellow', 'default', 'bold'),
|
||||
'make_string.escaped': ('magenta', 'default', 'bold'),
|
||||
'make_string.null': ('green', 'default', 'bold'),
|
||||
'make_string.end': ('green', 'default', 'bold'),
|
||||
'make.macro': ('yellow', 'default', 'bold'),
|
||||
'make.macro.start': ('default', 'default'),
|
||||
'make.macro.word': ('default', 'default'),
|
||||
'make.macro.null': ('default', 'default'),
|
||||
|
||||
'make.macro.eval.start': ('cyan', 'default', 'bold'),
|
||||
'make.macro.eval.word': ('cyan', 'default', 'bold'),
|
||||
'make.macro.eval.null': ('cyan', 'default', 'bold'),
|
||||
'make.macro.eval.end': ('cyan', 'default', 'bold'),
|
||||
|
||||
'make.target': ('magenta', 'default', 'bold'),
|
||||
'make.target.modifier': ('green', 'default', 'bold'),
|
||||
'make.target.data': ('green', 'default', 'bold'),
|
||||
|
||||
'make.target.eval.start': ('cyan', 'default', 'bold'),
|
||||
'make.target.eval.word': ('cyan', 'default', 'bold'),
|
||||
'make.target.eval.null': ('cyan', 'default', 'bold'),
|
||||
'make.target.eval.end': ('cyan', 'default', 'bold'),
|
||||
|
||||
'make.extvariable': ('blue', 'default', 'bold'),
|
||||
'make.variable': ('yellow', 'default', 'bold'),
|
||||
}
|
||||
|
||||
install = Make.install
|
||||
|
|
60
mode/tt.py
60
mode/tt.py
|
@ -1,11 +1,13 @@
|
|||
import color, mode
|
||||
from lex import Grammar, PatternRule, RegionRule
|
||||
from mode.perl import StringGrammar
|
||||
from mode.perl import StringGrammar, PerlGrammar
|
||||
|
||||
class PerlDirectiveGrammar(Grammar):
|
||||
rules = [PatternRule(r'tt.perl', r'(?:PERL|RAWPERL|END)(?![A-Z_])')]
|
||||
|
||||
class DirectiveGrammar(Grammar):
|
||||
rules = [
|
||||
PatternRule(r'comment', r'#(?:[^%]|%(?!\]))*'),
|
||||
PatternRule(r'keyword', r'(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|FINAL|FILTER|FOREACH|ELSIF|ELSE|END|GET|IF|INCLUDE|INSERT|IN|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)(?![A-Z_])'),
|
||||
PatternRule(r'tt.keyword', r'(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|FINAL|FILTER|FOREACH|ELSIF|ELSE|END|GET|IF|INCLUDE|INSERT|IN|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)(?![A-Z_])'),
|
||||
PatternRule(r'attribute', r'[a-zA-Z_][a-zA-Z0-9_]*(?= *=)'),
|
||||
RegionRule(r'string', r'"', StringGrammar, r'"'),
|
||||
RegionRule(r'string', r"'", StringGrammar, r"'"),
|
||||
|
@ -13,7 +15,7 @@ class DirectiveGrammar(Grammar):
|
|||
|
||||
class TagGrammar(Grammar):
|
||||
rules = [
|
||||
RegionRule(r'directive', r'\[\%', DirectiveGrammar, r'%%\]'),
|
||||
RegionRule(r'tt.directive', r'\[\%', DirectiveGrammar, r'%%\]'),
|
||||
RegionRule(r'string', r'"', Grammar, r'"'),
|
||||
RegionRule(r'string', r"'", Grammar, r"'"),
|
||||
PatternRule(r'namespace', r'[a-zA-Z_]+:'),
|
||||
|
@ -25,8 +27,12 @@ class TemplateGrammar(Grammar):
|
|||
rules = [
|
||||
PatternRule(r'escaped', r'&[^;]+;'),
|
||||
RegionRule(r'comment', r'<!--', Grammar, r'-->'),
|
||||
RegionRule(r'directive', r'\[\%', DirectiveGrammar, r'%%\]'),
|
||||
RegionRule(r'tt_tag', r'</?', TagGrammar, r'/?>'),
|
||||
RegionRule(r'comment', r'\[\%#', Grammar, r'%%\]'),
|
||||
PatternRule(r'tt.data', r'[^\[<&]+'),
|
||||
RegionRule(r'tt.directive', r'\[\%(?= *PERL)', PerlDirectiveGrammar,
|
||||
r'%%\]', PerlGrammar, r'\[%%', PerlDirectiveGrammar, '%%\]'),
|
||||
RegionRule(r'tt.directive', r'\[\%', DirectiveGrammar, r'%%\]'),
|
||||
RegionRule(r'tt.tag', r'</?', TagGrammar, r'/?>'),
|
||||
]
|
||||
|
||||
class Template(mode.Fundamental):
|
||||
|
@ -34,26 +40,28 @@ class Template(mode.Fundamental):
|
|||
extensions = ['.tt']
|
||||
grammar = TemplateGrammar
|
||||
colors = {
|
||||
'directive.start': ('magenta', 'default', 'bold'),
|
||||
'directive.comment': ('red', 'default', 'bold'),
|
||||
'directive.keyword': ('yellow', 'default', 'bold'),
|
||||
'directive.attribute': ('magenta', 'default', 'bold'),
|
||||
'directive.string.start': ('green', 'default', 'bold'),
|
||||
'directive.string.escaped': ('magenta', 'default', 'bold'),
|
||||
'directive.string.octal': ('magenta', 'default', 'bold'),
|
||||
'directive.string.null': ('green', 'default', 'bold'),
|
||||
'directive.string.end': ('green', 'default', 'bold'),
|
||||
'directive.null': ('magenta', 'default', 'bold'),
|
||||
'directive.end': ('magenta', 'default', 'bold'),
|
||||
|
||||
'tt_tag.start': ('default', 'default', 'bold'),
|
||||
'tt_tag.namespace': ('magenta', 'default', 'bold'),
|
||||
'tt_tag.name': ('blue', 'default', 'bold'),
|
||||
'tt_tag.attrname': ('cyan', 'default', 'bold'),
|
||||
'tt_tag.string.start': ('green', 'default', 'bold'),
|
||||
'tt_tag.string.null': ('green', 'default', 'bold'),
|
||||
'tt_tag.string.end': ('green', 'default', 'bold'),
|
||||
'tt_tag.end': ('default', 'default', 'bold'),
|
||||
'tt.directive.start': ('magenta', 'default', 'bold'),
|
||||
'tt.directive.comment': ('red', 'default', 'bold'),
|
||||
'tt.directive.keyword': ('yellow', 'default', 'bold'),
|
||||
'tt.directive.attribute': ('magenta', 'default', 'bold'),
|
||||
'tt.directive.string.start': ('green', 'default', 'bold'),
|
||||
'tt.directive.string.escaped': ('magenta', 'default', 'bold'),
|
||||
'tt.directive.string.octal': ('magenta', 'default', 'bold'),
|
||||
'tt.directive.string.null': ('green', 'default', 'bold'),
|
||||
'tt.directive.string.end': ('green', 'default', 'bold'),
|
||||
'tt.directive.null': ('magenta', 'default', 'bold'),
|
||||
'tt.directive.middle0': ('magenta', 'default', 'bold'),
|
||||
'tt.directive.middle1': ('magenta', 'default', 'bold'),
|
||||
'tt.directive.end': ('magenta', 'default', 'bold'),
|
||||
'tt.tag.start': ('default', 'default', 'bold'),
|
||||
'tt.tag.namespace': ('magenta', 'default', 'bold'),
|
||||
'tt.tag.name': ('blue', 'default', 'bold'),
|
||||
'tt.tag.attrname': ('cyan', 'default', 'bold'),
|
||||
'tt.tag.string.start': ('green', 'default', 'bold'),
|
||||
'tt.tag.string.null': ('green', 'default', 'bold'),
|
||||
'tt.tag.string.end': ('green', 'default', 'bold'),
|
||||
'tt.tag.end': ('default', 'default', 'bold'),
|
||||
'tt.perl': ('red', 'default', 'bold'),
|
||||
}
|
||||
_bindings = {
|
||||
'close-paren': (')',),
|
||||
|
|
|
@ -36,10 +36,13 @@ class XMLGrammar(Grammar):
|
|||
# TODO: how does cdata work again?
|
||||
PatternRule(r'data', r'[^<& \n]+'),
|
||||
PatternRule(r'spaces', r' +'),
|
||||
RegionRule(r'xml.tag', r'<(?![?!])', TagGrammar, r'/?>'),
|
||||
RegionRule(r'comment', r'<!--', CommentGrammar, r'-->'),
|
||||
PatternRule(r'xml.entity', r'&[a-z]+;'),
|
||||
PatternRule(r'eol', r'\n'),
|
||||
PatternMatchRule('x', r'(<)(/)([a-zA-Z_][a-zA-Z0-9_]*)(>)',
|
||||
'xml.tag.start', 'xml.tag.delimiter', 'xml.tag.name',
|
||||
'xml.tag.end'),
|
||||
RegionRule(r'xml.tag', r'<(?![\?!])', TagGrammar, r'/?>'),
|
||||
RegionRule(r'comment', r'<!--', CommentGrammar, r'-->'),
|
||||
RegionRule(r'xml.metadata', r'<\?', MetadataGrammar, r'\?>'),
|
||||
RegionRule(r'xml.cdata', r'<!\[CDATA\[', CDataGrammar, r'\]\]>'),
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue