Added new (clean) yii boilerplate
This commit is contained in:
165
framework/vendors/Net_IDNA2/LICENSE.txt
vendored
Normal file
165
framework/vendors/Net_IDNA2/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
3402
framework/vendors/Net_IDNA2/Net/IDNA2.php
vendored
Normal file
3402
framework/vendors/Net_IDNA2/Net/IDNA2.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
framework/vendors/Net_IDNA2/Net/IDNA2/Exception.php
vendored
Normal file
4
framework/vendors/Net_IDNA2/Net/IDNA2/Exception.php
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
class Net_IDNA2_Exception extends Exception
|
||||
{
|
||||
}
|
||||
6
framework/vendors/Net_IDNA2/Net/IDNA2/Exception/Nameprep.php
vendored
Normal file
6
framework/vendors/Net_IDNA2/Net/IDNA2/Exception/Nameprep.php
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
require_once dirname(__FILE__).'/../Exception.php';
|
||||
|
||||
class Net_IDNA2_Exception_Nameprep extends Net_IDNA2_Exception
|
||||
{
|
||||
}
|
||||
119
framework/vendors/README.html
vendored
Normal file
119
framework/vendors/README.html
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Third-Party Library List</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Third-Party Library List</h1>
|
||||
<p>
|
||||
This folder includes third-party libraries that are used by the Yii framework.
|
||||
<em>All these libraries are using licenses that are compatible to the BSD license used by Yii.</em>
|
||||
This means you can safely use Yii for whatever purpose, provided you comply to the BSD license.
|
||||
Please refer to the detailed license information as shown below:
|
||||
</p>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>Library Name</th>
|
||||
<th>License</th>
|
||||
<th>Related Yii Component</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><a href="http://jquery.com">jQuery 1.8.3</a></td>
|
||||
<td><a href="jquery/LICENSE.txt">MIT</a></td>
|
||||
<td>most JavaScript-related functionalities</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.jqueryui.com">jQuery UI 1.9.2</a></td>
|
||||
<td><a href="jqueryui/MIT-LICENSE.txt">MIT</a></td>
|
||||
<td>the widgets under zii/widgets/jui</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://benalman.com/projects/jquery-bbq-plugin/">jQuery BBQ Plugin 1.4pre</a></td>
|
||||
<td><a href="bbq/LICENSE.txt">MIT</a></td>
|
||||
<td><a href="http://www.yiiframework.com/doc/api/1.1/CGridView">CGridView</a> and <a href="http://www.yiiframework.com/doc/api/1.1/CListView">CListView</a> widgets</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/">jQuery Autocomplete 1.1.0</a></td>
|
||||
<td><a href="jquery/autocomplete/LICENSE.txt">MIT</a></td>
|
||||
<td>CHtml::autoComplete()</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://digitalbush.com/projects/masked-input-plugin">jQuery Masked Input 1.3.1</a></td>
|
||||
<td><a href="jquery/maskedinput/LICENSE.txt">MIT</a></td>
|
||||
<td><a href="http://www.yiiframework.com/doc/api/1.1/CMaskedTextField">CMaskedTextField</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.fyneworks.com/jquery/multiple-file-upload/">jQuery Multi File Upload 1.47</a></td>
|
||||
<td><a href="http://www.fyneworks.com/jquery/multiple-file-upload/#tab-License">MIT</a></td>
|
||||
<td><a href="http://www.yiiframework.com/doc/api/1.1/CMultiFileUpload">CMultiFileUpload</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://bassistance.de/jquery-plugins/jquery-plugin-treeview/">jQuery TreeView 1.4.1</a></td>
|
||||
<td><a href="jquery/autocomplete/LICENSE.txt">MIT</a></td>
|
||||
<td><a href="http://www.yiiframework.com/doc/api/1.1/CTreeView">CTreeView</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.fyneworks.com/jquery/star-rating/">jQuery Star Rating 4.11</a></td>
|
||||
<td><a href="http://www.opensource.org/licenses/mit-license.php">MIT</a></td>
|
||||
<td><a href="http://www.yiiframework.com/doc/api/1.1/CStarRating">CStarRating</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://pear.php.net/pepr/pepr-proposal-show.php?id=198">PEAR JSON</a></td>
|
||||
<td><a href="json/LICENSE.txt">BSD</a></td>
|
||||
<td><a href="http://www.yiiframework.com/doc/api/1.1/CJSON">CJSON</a>, <a href="http://www.yiiframework.com/doc/api/1.1/CJavaScript">CJavaScript</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.unicode.org/cldr/">Unicode CLDR Data 1.6</a></td>
|
||||
<td><a href="cldr/LICENSE.txt">Unicode</a></td>
|
||||
<td>I18N-related functionalities</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://phplens.com/phpeverywhere/">ADOdb Date Library</a></td>
|
||||
<td><a href="adodb/LICENSE.txt">BSD</a></td>
|
||||
<td><a href="http://www.yiiframework.com/doc/api/1.1/CTimestamp">CTimestamp</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://pear.php.net/package/Text_Highlighter/">Text_Highlighter - Generic Syntax Highlighter</a> (v0.7.0 beta)</td>
|
||||
<td><a href="http://www.php.net/license/3_01.txt">The PHP License</a></td>
|
||||
<td><a href="http://www.yiiframework.com/doc/api/1.1/CTextHighlighter">CTextHighlighter</a> (note: many PHP files are modified to make them workable in PHP 5 strict mode and their PEAR dependency are also removed.) </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://pear.php.net/package/File_Gettext/">PEAR Gettext</a> (v0.4.1 beta)</td>
|
||||
<td><a href="gettext/LICENSE.txt">The PHP License</a></td>
|
||||
<td><a href="http://www.yiiframework.com/doc/api/1.1/CGettextMoFile">CGettextMoFile</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://htmlpurifier.org/">HTML Purifier</a> (v4.5.0)</td>
|
||||
<td><a href="htmlpurifier/LICENSE.txt">LGPL</a></td>
|
||||
<td><a href="http://www.yiiframework.com/doc/api/1.1/CHtmlPurifier">CHtmlPurifier</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://michelf.com/projects/php-markdown/">PHP Markdown Extra</a> (v1.2.5)</td>
|
||||
<td><a href="markdown/LICENSE.txt">BSD</a></td>
|
||||
<td><a href="http://www.yiiframework.com/doc/api/1.1/CMarkdown">CMarkdown</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://github.com/balupton/history.js/">History.js</a> (v1.7.1) - October 4 2011</td>
|
||||
<td><a href="history/license.txt">BSD</a></td>
|
||||
<td><a href="http://www.yiiframework.com/doc/api/1.1/CGridView">CGridView</a>, <a href="http://www.yiiframework.com/doc/api/1.1/CGridView">CListView</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://pear.php.net/package/Net_IDNA2/">Net_IDNA2 - Punycode encoding and decoding</a> (0.1.1 (beta) was released on 2010-12-09)</td>
|
||||
<td><a href="Net_IDNA2/LICENCE">LGPL</a></td>
|
||||
<td><a href="http://www.yiiframework.com/doc/api/1.1/CUrlValidator">CUrlValidator</a>, <a href="http://www.yiiframework.com/doc/api/1.1/CEmailValidator">CEmailValidator</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://github.com/bestiejs/punycode.js">Punycode.js</a> (v1.2.0) - October 10 2012</td>
|
||||
<td><a href="punycode/LICENSE-MIT.txt">MIT</a>, <a href="punycode/LICENSE-GPL.txt">GPL</a></td>
|
||||
<td><a href="http://www.yiiframework.com/doc/api/1.1/CUrlValidator">CUrlValidator</a>, <a href="http://www.yiiframework.com/doc/api/1.1/CEmailValidator">CEmailValidator</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://github.com/Zenovations/console-normalizer">Console Normalizer</a> (git commit: <a href="https://github.com/Zenovations/console-normalizer/commit/36556c695ec1a741e1e2c0f99f17d1639169bb82">36556c695e</a>) - December 7 2012</td>
|
||||
<td><a href="console-normalizer/README.md">MIT</a></td>
|
||||
<td><a href="http://www.yiiframework.com/doc/api/1.1/CWebLogRoute">CWebLogRoute</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
397
framework/vendors/TextHighlighter/Text/Highlighter.php
vendored
Normal file
397
framework/vendors/TextHighlighter/Text/Highlighter.php
vendored
Normal file
@@ -0,0 +1,397 @@
|
||||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
/**
|
||||
* Highlighter base class
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version CVS: $Id: Highlighter.php,v 1.1 2007/06/03 02:35:28 ssttoo Exp $
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
// {{{ BC constants
|
||||
|
||||
// BC trick : define constants related to default
|
||||
// renderer if needed
|
||||
if (!defined('HL_NUMBERS_LI')) {
|
||||
/**#@+
|
||||
* Constant for use with $options['numbers']
|
||||
* @see Text_Highlighter_Renderer_Html::_init()
|
||||
*/
|
||||
/**
|
||||
* use numbered list
|
||||
*/
|
||||
define ('HL_NUMBERS_LI' , 1);
|
||||
/**
|
||||
* Use 2-column table with line numbers in left column and code in right column.
|
||||
* Forces $options['tag'] = HL_TAG_PRE
|
||||
*/
|
||||
define ('HL_NUMBERS_TABLE' , 2);
|
||||
/**#@-*/
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ constants
|
||||
/**
|
||||
* for our purpose, it is infinity
|
||||
*/
|
||||
define ('HL_INFINITY', 1000000000);
|
||||
|
||||
// }}}
|
||||
|
||||
/**
|
||||
* Text highlighter base class
|
||||
*
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
// {{{ Text_Highlighter
|
||||
|
||||
/**
|
||||
* Text highlighter base class
|
||||
*
|
||||
* This class implements all functions necessary for highlighting,
|
||||
* but it does not contain highlighting rules. Actual highlighting is
|
||||
* done using a descendent of this class.
|
||||
*
|
||||
* One is not supposed to manually create descendent classes.
|
||||
* Instead, describe highlighting rules in XML format and
|
||||
* use {@link Text_Highlighter_Generator} to create descendent class.
|
||||
* Alternatively, an instance of a descendent class can be created
|
||||
* directly.
|
||||
*
|
||||
* Use {@link Text_Highlighter::factory()} to create an
|
||||
* object for particular language highlighter
|
||||
*
|
||||
* Usage example
|
||||
* <code>
|
||||
*require_once 'Text/Highlighter.php';
|
||||
*$hlSQL =& Text_Highlighter::factory('SQL',array('numbers'=>true));
|
||||
*echo $hlSQL->highlight('SELECT * FROM table a WHERE id = 12');
|
||||
* </code>
|
||||
*
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @package Text_Highlighter
|
||||
* @access public
|
||||
*/
|
||||
|
||||
class Text_Highlighter
|
||||
{
|
||||
// {{{ members
|
||||
|
||||
/**
|
||||
* Syntax highlighting rules.
|
||||
* Auto-generated classes set this var
|
||||
*
|
||||
* @access protected
|
||||
* @see _init
|
||||
* @var array
|
||||
*/
|
||||
var $_syntax;
|
||||
|
||||
/**
|
||||
* Renderer object.
|
||||
*
|
||||
* @access private
|
||||
* @var array
|
||||
*/
|
||||
var $_renderer;
|
||||
|
||||
/**
|
||||
* Options. Keeped for BC
|
||||
*
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
var $_options = array();
|
||||
|
||||
/**
|
||||
* Conditionds
|
||||
*
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
var $_conditions = array();
|
||||
|
||||
/**
|
||||
* Disabled keywords
|
||||
*
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
var $_disabled = array();
|
||||
|
||||
/**
|
||||
* Language
|
||||
*
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
var $_language = '';
|
||||
|
||||
// }}}
|
||||
// {{{ _checkDefines
|
||||
|
||||
/**
|
||||
* Called by subclssses' constructors to enable/disable
|
||||
* optional highlighter rules
|
||||
*
|
||||
* @param array $defines Conditional defines
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
function _checkDefines()
|
||||
{
|
||||
if (isset($this->_options['defines'])) {
|
||||
$defines = $this->_options['defines'];
|
||||
} else {
|
||||
$defines = array();
|
||||
}
|
||||
foreach ($this->_conditions as $name => $actions) {
|
||||
foreach($actions as $action) {
|
||||
$present = in_array($name, $defines);
|
||||
if (!$action[1]) {
|
||||
$present = !$present;
|
||||
}
|
||||
if ($present) {
|
||||
unset($this->_disabled[$action[0]]);
|
||||
} else {
|
||||
$this->_disabled[$action[0]] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ factory
|
||||
|
||||
/**
|
||||
* Create a new Highlighter object for specified language
|
||||
*
|
||||
* @param string $lang language, for example "SQL"
|
||||
* @param array $options Rendering options. This
|
||||
* parameter is only keeped for BC reasons, use
|
||||
* {@link Text_Highlighter::setRenderer()} instead
|
||||
*
|
||||
* @return mixed a newly created Highlighter object, or
|
||||
* a PEAR error object on error
|
||||
*
|
||||
* @static
|
||||
* @access public
|
||||
*/
|
||||
public static function factory($lang, $options = array())
|
||||
{
|
||||
$lang = strtoupper($lang);
|
||||
$langFile = dirname(__FILE__)."/Highlighter/$lang.php";
|
||||
if (is_file($langFile))
|
||||
include_once $langFile;
|
||||
else
|
||||
return false;
|
||||
|
||||
$classname = 'Text_Highlighter_' . $lang;
|
||||
|
||||
if (!class_exists($classname))
|
||||
return false;
|
||||
|
||||
return new $classname($options);
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ setRenderer
|
||||
|
||||
/**
|
||||
* Set renderer object
|
||||
*
|
||||
* @param object $renderer Text_Highlighter_Renderer
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function setRenderer($renderer)
|
||||
{
|
||||
$this->_renderer = $renderer;
|
||||
}
|
||||
|
||||
// }}}
|
||||
|
||||
/**
|
||||
* Helper function to find matching brackets
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
function _matchingBrackets($str)
|
||||
{
|
||||
return strtr($str, '()<>[]{}', ')(><][}{');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function _getToken()
|
||||
{
|
||||
if (!empty($this->_tokenStack)) {
|
||||
return array_pop($this->_tokenStack);
|
||||
}
|
||||
if ($this->_pos >= $this->_len) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ($this->_state != -1 && preg_match($this->_endpattern, $this->_str, $m, PREG_OFFSET_CAPTURE, $this->_pos)) {
|
||||
$endpos = $m[0][1];
|
||||
$endmatch = $m[0][0];
|
||||
} else {
|
||||
$endpos = -1;
|
||||
}
|
||||
preg_match ($this->_regs[$this->_state], $this->_str, $m, PREG_OFFSET_CAPTURE, $this->_pos);
|
||||
$n = 1;
|
||||
|
||||
|
||||
foreach ($this->_counts[$this->_state] as $i=>$count) {
|
||||
if (!isset($m[$n])) {
|
||||
break;
|
||||
}
|
||||
if ($m[$n][1]>-1 && ($endpos == -1 || $m[$n][1] < $endpos)) {
|
||||
if ($this->_states[$this->_state][$i] != -1) {
|
||||
$this->_tokenStack[] = array($this->_delim[$this->_state][$i], $m[$n][0]);
|
||||
} else {
|
||||
$inner = $this->_inner[$this->_state][$i];
|
||||
if (isset($this->_parts[$this->_state][$i])) {
|
||||
$parts = array();
|
||||
$partpos = $m[$n][1];
|
||||
for ($j=1; $j<=$count; $j++) {
|
||||
if ($m[$j+$n][1] < 0) {
|
||||
continue;
|
||||
}
|
||||
if (isset($this->_parts[$this->_state][$i][$j])) {
|
||||
if ($m[$j+$n][1] > $partpos) {
|
||||
array_unshift($parts, array($inner, substr($this->_str, $partpos, $m[$j+$n][1]-$partpos)));
|
||||
}
|
||||
array_unshift($parts, array($this->_parts[$this->_state][$i][$j], $m[$j+$n][0]));
|
||||
}
|
||||
$partpos = $m[$j+$n][1] + strlen($m[$j+$n][0]);
|
||||
}
|
||||
if ($partpos < $m[$n][1] + strlen($m[$n][0])) {
|
||||
array_unshift($parts, array($inner, substr($this->_str, $partpos, $m[$n][1] - $partpos + strlen($m[$n][0]))));
|
||||
}
|
||||
$this->_tokenStack = array_merge($this->_tokenStack, $parts);
|
||||
} else {
|
||||
foreach ($this->_keywords[$this->_state][$i] as $g => $re) {
|
||||
if (isset($this->_disabled[$g])) {
|
||||
continue;
|
||||
}
|
||||
if (preg_match($re, $m[$n][0])) {
|
||||
$inner = $this->_kwmap[$g];
|
||||
break;
|
||||
}
|
||||
}
|
||||
$this->_tokenStack[] = array($inner, $m[$n][0]);
|
||||
}
|
||||
}
|
||||
if ($m[$n][1] > $this->_pos) {
|
||||
$this->_tokenStack[] = array($this->_lastinner, substr($this->_str, $this->_pos, $m[$n][1]-$this->_pos));
|
||||
}
|
||||
$this->_pos = $m[$n][1] + strlen($m[$n][0]);
|
||||
if ($this->_states[$this->_state][$i] != -1) {
|
||||
$this->_stack[] = array($this->_state, $this->_lastdelim, $this->_lastinner, $this->_endpattern);
|
||||
$this->_lastinner = $this->_inner[$this->_state][$i];
|
||||
$this->_lastdelim = $this->_delim[$this->_state][$i];
|
||||
$l = $this->_state;
|
||||
$this->_state = $this->_states[$this->_state][$i];
|
||||
$this->_endpattern = $this->_end[$this->_state];
|
||||
if ($this->_subst[$l][$i]) {
|
||||
for ($k=0; $k<=$this->_counts[$l][$i]; $k++) {
|
||||
if (!isset($m[$i+$k])) {
|
||||
break;
|
||||
}
|
||||
$quoted = preg_quote($m[$n+$k][0], '/');
|
||||
$this->_endpattern = str_replace('%'.$k.'%', $quoted, $this->_endpattern);
|
||||
$this->_endpattern = str_replace('%b'.$k.'%', $this->_matchingBrackets($quoted), $this->_endpattern);
|
||||
}
|
||||
}
|
||||
}
|
||||
return array_pop($this->_tokenStack);
|
||||
}
|
||||
$n += $count + 1;
|
||||
}
|
||||
|
||||
if ($endpos > -1) {
|
||||
$this->_tokenStack[] = array($this->_lastdelim, $endmatch);
|
||||
if ($endpos > $this->_pos) {
|
||||
$this->_tokenStack[] = array($this->_lastinner, substr($this->_str, $this->_pos, $endpos-$this->_pos));
|
||||
}
|
||||
list($this->_state, $this->_lastdelim, $this->_lastinner, $this->_endpattern) = array_pop($this->_stack);
|
||||
$this->_pos = $endpos + strlen($endmatch);
|
||||
return array_pop($this->_tokenStack);
|
||||
}
|
||||
$p = $this->_pos;
|
||||
$this->_pos = HL_INFINITY;
|
||||
return array($this->_lastinner, substr($this->_str, $p));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// {{{ highlight
|
||||
|
||||
/**
|
||||
* Highlights code
|
||||
*
|
||||
* @param string $str Code to highlight
|
||||
* @access public
|
||||
* @return string Highlighted text
|
||||
*
|
||||
*/
|
||||
|
||||
function highlight($str)
|
||||
{
|
||||
if (!($this->_renderer)) {
|
||||
include_once(dirname(__FILE__).'/Renderer/Html.php');
|
||||
$this->_renderer = new Text_Highlighter_Renderer_Html($this->_options);
|
||||
}
|
||||
$this->_state = -1;
|
||||
$this->_pos = 0;
|
||||
$this->_stack = array();
|
||||
$this->_tokenStack = array();
|
||||
$this->_lastinner = $this->_defClass;
|
||||
$this->_lastdelim = $this->_defClass;
|
||||
$this->_endpattern = '';
|
||||
$this->_renderer->reset();
|
||||
$this->_renderer->setCurrentLanguage($this->_language);
|
||||
$this->_str = $this->_renderer->preprocess($str);
|
||||
$this->_len = strlen($this->_str);
|
||||
while ($token = $this->_getToken()) {
|
||||
$this->_renderer->acceptToken($token[0], $token[1]);
|
||||
}
|
||||
$this->_renderer->finalize();
|
||||
return $this->_renderer->getOutput();
|
||||
}
|
||||
|
||||
// }}}
|
||||
|
||||
}
|
||||
|
||||
// }}}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* c-hanging-comment-ender-p: nil
|
||||
* End:
|
||||
*/
|
||||
|
||||
?>
|
||||
505
framework/vendors/TextHighlighter/Text/Highlighter/ABAP.php
vendored
Normal file
505
framework/vendors/TextHighlighter/Text/Highlighter/ABAP.php
vendored
Normal file
@@ -0,0 +1,505 @@
|
||||
<?php
|
||||
/**
|
||||
* Auto-generated class. ABAP syntax highlighting
|
||||
*
|
||||
* PHP version 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @version generated from: : abap.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp
|
||||
* @author Stoyan Stefanov <ssttoo@gmail.com>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
/**
|
||||
* Auto-generated class. ABAP syntax highlighting
|
||||
*
|
||||
* @author Stoyan Stefanov <ssttoo@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
class Text_Highlighter_ABAP extends Text_Highlighter
|
||||
{
|
||||
var $_language = 'abap';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $options
|
||||
* @access public
|
||||
*/
|
||||
function __construct($options=array())
|
||||
{
|
||||
|
||||
$this->_options = $options;
|
||||
$this->_regs = array (
|
||||
-1 => '/((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)^\\*|")|((?i)\')|((?i)[a-z_\\-]\\w*)/',
|
||||
0 => '/((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)^\\*|")|((?i)\')|((?i)0[xX][\\da-f]+)|((?i)\\d\\d*|\\b0\\b)|((?i)0[0-7]+)|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)[a-z_\\-]\\w*)/',
|
||||
1 => '/((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)^\\*|")|((?i)\')|((?i)0[xX][\\da-f]+)|((?i)\\d\\d*|\\b0\\b)|((?i)0[0-7]+)|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)[a-z_\\-]\\w*)/',
|
||||
2 => '/((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)^\\*|")|((?i)\')|((?i)0[xX][\\da-f]+)|((?i)\\d\\d*|\\b0\\b)|((?i)0[0-7]+)|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)[a-z_\\-]\\w*)/',
|
||||
3 => '//',
|
||||
4 => '//',
|
||||
);
|
||||
$this->_counts = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 2,
|
||||
9 => 0,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 2,
|
||||
9 => 0,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 2,
|
||||
9 => 0,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
);
|
||||
$this->_delim = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'brackets',
|
||||
1 => 'brackets',
|
||||
2 => 'brackets',
|
||||
3 => 'comment',
|
||||
4 => 'quotes',
|
||||
5 => '',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 'brackets',
|
||||
1 => 'brackets',
|
||||
2 => 'brackets',
|
||||
3 => 'comment',
|
||||
4 => 'quotes',
|
||||
5 => '',
|
||||
6 => '',
|
||||
7 => '',
|
||||
8 => '',
|
||||
9 => '',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 'brackets',
|
||||
1 => 'brackets',
|
||||
2 => 'brackets',
|
||||
3 => 'comment',
|
||||
4 => 'quotes',
|
||||
5 => '',
|
||||
6 => '',
|
||||
7 => '',
|
||||
8 => '',
|
||||
9 => '',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'brackets',
|
||||
1 => 'brackets',
|
||||
2 => 'brackets',
|
||||
3 => 'comment',
|
||||
4 => 'quotes',
|
||||
5 => '',
|
||||
6 => '',
|
||||
7 => '',
|
||||
8 => '',
|
||||
9 => '',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
);
|
||||
$this->_inner = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'code',
|
||||
1 => 'code',
|
||||
2 => 'code',
|
||||
3 => 'comment',
|
||||
4 => 'string',
|
||||
5 => 'identifier',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 'code',
|
||||
1 => 'code',
|
||||
2 => 'code',
|
||||
3 => 'comment',
|
||||
4 => 'string',
|
||||
5 => 'number',
|
||||
6 => 'number',
|
||||
7 => 'number',
|
||||
8 => 'number',
|
||||
9 => 'identifier',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 'code',
|
||||
1 => 'code',
|
||||
2 => 'code',
|
||||
3 => 'comment',
|
||||
4 => 'string',
|
||||
5 => 'number',
|
||||
6 => 'number',
|
||||
7 => 'number',
|
||||
8 => 'number',
|
||||
9 => 'identifier',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'code',
|
||||
1 => 'code',
|
||||
2 => 'code',
|
||||
3 => 'comment',
|
||||
4 => 'string',
|
||||
5 => 'number',
|
||||
6 => 'number',
|
||||
7 => 'number',
|
||||
8 => 'number',
|
||||
9 => 'identifier',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
);
|
||||
$this->_end = array (
|
||||
0 => '/(?i)\\}/',
|
||||
1 => '/(?i)\\)/',
|
||||
2 => '/(?i)\\]/',
|
||||
3 => '/(?mi)$/',
|
||||
4 => '/(?i)\'/',
|
||||
);
|
||||
$this->_states = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => -1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
9 => -1,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
9 => -1,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
9 => -1,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
);
|
||||
$this->_keywords = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 =>
|
||||
array (
|
||||
'sy' => '/^((?i)screen-name|screen-group1|screen-group2|screen-group3|screen-group4|screen-required|screen-input|screen-output|screen-intensified|screen-invisible|screen-length|screen-active|sy-index|sy-pagno|sy-tabix|sy-tfill|sy-tlopc|sy-tmaxl|sy-toccu|sy-ttabc|sy-tstis|sy-ttabi|sy-dbcnt|sy-fdpos|sy-colno|sy-linct|sy-linno|sy-linsz|sy-pagct|sy-macol|sy-marow|sy-tleng|sy-sfoff|sy-willi|sy-lilli|sy-subrc|sy-fleng|sy-cucol|sy-curow|sy-lsind|sy-listi|sy-stepl|sy-tpagi|sy-winx1|sy-winy1|sy-winx2|sy-winy2|sy-winco|sy-winro|sy-windi|sy-srows|sy-scols|sy-loopc|sy-folen|sy-fodec|sy-tzone|sy-dayst|sy-ftype|sy-appli|sy-fdayw|sy-ccurs|sy-ccurt|sy-debug|sy-ctype|sy-input|sy-langu|sy-modno|sy-batch|sy-binpt|sy-calld|sy-dynnr|sy-dyngr|sy-newpa|sy-pri40|sy-rstrt|sy-wtitl|sy-cpage|sy-dbnam|sy-mandt|sy-prefx|sy-fmkey|sy-pexpi|sy-prini|sy-primm|sy-prrel|sy-playo|sy-prbig|sy-playp|sy-prnew|sy-prlog|sy-pdest|sy-plist|sy-pauth|sy-prdsn|sy-pnwpa|sy-callr|sy-repi2|sy-rtitl|sy-prrec|sy-prtxt|sy-prabt|sy-lpass|sy-nrpag|sy-paart|sy-prcop|sy-batzs|sy-bspld|sy-brep4|sy-batzo|sy-batzd|sy-batzw|sy-batzm|sy-ctabl|sy-dbsys|sy-dcsys|sy-macdb|sy-sysid|sy-opsys|sy-pfkey|sy-saprl|sy-tcode|sy-ucomm|sy-cfwae|sy-chwae|sy-spono|sy-sponr|sy-waers|sy-cdate|sy-datum|sy-slset|sy-subty|sy-subcs|sy-group|sy-ffile|sy-uzeit|sy-dsnam|sy-repid|sy-tabid|sy-tfdsn|sy-uname|sy-lstat|sy-abcde|sy-marky|sy-sfnam|sy-tname|sy-msgli|sy-title|sy-entry|sy-lisel|sy-uline|sy-xcode|sy-cprog|sy-xprog|sy-xform|sy-ldbpg|sy-tvar0|sy-tvar1|sy-tvar2|sy-tvar3|sy-tvar4|sy-tvar5|sy-tvar6|sy-tvar7|sy-tvar8|sy-tvar9|sy-msgid|sy-msgty|sy-msgno|sy-msgv1|sy-msgv2|sy-msgv3|sy-msgv4|sy-oncom|sy-vline|sy-winsl|sy-staco|sy-staro|sy-datar|sy-host|sy-locdb|sy-locop|sy-datlo|sy-timlo|sy-zonlo|syst-index|syst-pagno|syst-tabix|syst-tfill|syst-tlopc|syst-tmaxl|syst-toccu|syst-ttabc|syst-tstis|syst-ttabi|syst-dbcnt|syst-fdpos|syst-colno|syst-linct|syst-linno|syst-linsz|syst-pagct|syst-macol|syst-marow|syst-tleng|syst-sfoff|syst-willi|syst-lilli|syst-subrc|syst-fleng|syst-cucol|syst-curow|syst-lsind|syst-listi|syst-stepl|syst-tpagi|syst-winx1|syst-winy1|syst-winx2|syst-winy2|syst-winco|syst-winro|syst-windi|syst-srows|syst-scols|syst-loopc|syst-folen|syst-fodec|syst-tzone|syst-dayst|syst-ftype|syst-appli|syst-fdayw|syst-ccurs|syst-ccurt|syst-debug|syst-ctype|syst-input|syst-langu|syst-modno|syst-batch|syst-binpt|syst-calld|syst-dynnr|syst-dyngr|syst-newpa|syst-pri40|syst-rstrt|syst-wtitl|syst-cpage|syst-dbnam|syst-mandt|syst-prefx|syst-fmkey|syst-pexpi|syst-prini|syst-primm|syst-prrel|syst-playo|syst-prbig|syst-playp|syst-prnew|syst-prlog|syst-pdest|syst-plist|syst-pauth|syst-prdsn|syst-pnwpa|syst-callr|syst-repi2|syst-rtitl|syst-prrec|syst-prtxt|syst-prabt|syst-lpass|syst-nrpag|syst-paart|syst-prcop|syst-batzs|syst-bspld|syst-brep4|syst-batzo|syst-batzd|syst-batzw|syst-batzm|syst-ctabl|syst-dbsys|syst-dcsys|syst-macdb|syst-sysid|syst-opsys|syst-pfkey|syst-saprl|syst-tcode|syst-ucomm|syst-cfwae|syst-chwae|syst-spono|syst-sponr|syst-waers|syst-cdate|syst-datum|syst-slset|syst-subty|syst-subcs|syst-group|syst-ffile|syst-uzeit|syst-dsnam|syst-repid|syst-tabid|syst-tfdsn|syst-uname|syst-lstat|syst-abcde|syst-marky|syst-sfnam|syst-tname|syst-msgli|syst-title|syst-entry|syst-lisel|syst-uline|syst-xcode|syst-cprog|syst-xprog|syst-xform|syst-ldbpg|syst-tvar0|syst-tvar1|syst-tvar2|syst-tvar3|syst-tvar4|syst-tvar5|syst-tvar6|syst-tvar7|syst-tvar8|syst-tvar9|syst-msgid|syst-msgty|syst-msgno|syst-msgv1|syst-msgv2|syst-msgv3|syst-msgv4|syst-oncom|syst-vline|syst-winsl|syst-staco|syst-staro|syst-datar|syst-host|syst-locdb|syst-locop|syst-datlo|syst-timlo|syst-zonlo)$/',
|
||||
'reserved' => '/^((?i)abs|acos|add|add-corresponding|adjacent|after|aliases|all|analyzer|and|any|append|as|ascending|asin|assign|assigned|assigning|at|atan|authority-check|avg|back|before|begin|binary|bit|bit-and|bit-not|bit-or|bit-xor|blank|block|break-point|buffer|by|c|call|case|catch|ceil|centered|chain|change|changing|check|checkbox|class|class-data|class-events|class-methods|class-pool|clear|client|close|cnt|code|collect|color|comment|commit|communication|compute|concatenate|condense|constants|context|contexts|continue|control|controls|convert|copy|corresponding|cos|cosh|count|country|create|currency|cursor|customer-function|data|database|dataset|delete|decimals|default|define|demand|descending|describe|dialog|distinct|div|divide|divide-corresponding|do|duplicates|dynpro|edit|editor-call|else|elseif|end|end-of-definition|end-of-page|end-of-selection|endat|endcase|endcatch|endchain|endclass|enddo|endexec|endform|endfunction|endif|endinterface|endloop|endmethod|endmodule|endon|endprovide|endselect|endwhile|entries|events|exec|exit|exit-command|exp|exponent|export|exporting|exceptions|extended|extract|fetch|field|field-groups|field-symbols|fields|floor|for|form|format|frac|frame|free|from|function|function-pool|generate|get|group|hashed|header|help-id|help-request|hide|hotspot|icon|id|if|import|importing|include|index|infotypes|initialization|inner|input|insert|intensified|interface|interface-pool|interfaces|into|inverse|join|key|language|last|leave|left|left-justified|like|line|line-count|line-selection|line-size|lines|list-processing|load|load-of-program|local|locale|log|log10|loop|m|margin|mask|matchcode|max|memory|message|message-id|messages|method|methods|min|mod|mode|modif|modify|module|move|move-corresponding|multiply|multiply-corresponding|new|new-line|new-page|next|no|no-gap|no-gaps|no-heading|no-scrolling|no-sign|no-title|no-zero|nodes|non-unique|o|object|obligatory|occurs|of|off|on|open|or|order|others|outer|output|overlay|pack|page|parameter|parameters|perform|pf-status|position|print|print-control|private|process|program|property|protected|provide|public|put|radiobutton|raise|raising|range|ranges|read|receive|refresh|reject|replace|report|requested|reserve|reset|right-justified|rollback|round|rows|rtti|run|scan|screen|search|separated|scroll|scroll-boundary|select|select-options|selection-screen|selection-table|set|shared|shift|sign|sin|single|sinh|size|skip|sort|sorted|split|sql|sqrt|stamp|standard|start-of-selection|statics|stop|string|strlen|structure|submit|subtract|subtract-corresponding|sum|supply|suppress|symbol|syntax-check|syntax-trace|system-call|system-exceptions|table|table_line|tables|tan|tanh|text|textpool|time|times|title|titlebar|to|top-of-page|transaction|transfer|translate|transporting|trunc|type|type-pool|type-pools|types|uline|under|unique|unit|unpack|up|update|user-command|using|value|value-request|values|vary|when|where|while|window|with|with-title|work|write|x|xstring|z|zone)$/',
|
||||
'constants' => '/^((?i)initial|null|space|col_background|col_heading|col_normal|col_total|col_key|col_positive|col_negative|col_group)$/',
|
||||
),
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 =>
|
||||
array (
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'sy' => '/^((?i)screen-name|screen-group1|screen-group2|screen-group3|screen-group4|screen-required|screen-input|screen-output|screen-intensified|screen-invisible|screen-length|screen-active|sy-index|sy-pagno|sy-tabix|sy-tfill|sy-tlopc|sy-tmaxl|sy-toccu|sy-ttabc|sy-tstis|sy-ttabi|sy-dbcnt|sy-fdpos|sy-colno|sy-linct|sy-linno|sy-linsz|sy-pagct|sy-macol|sy-marow|sy-tleng|sy-sfoff|sy-willi|sy-lilli|sy-subrc|sy-fleng|sy-cucol|sy-curow|sy-lsind|sy-listi|sy-stepl|sy-tpagi|sy-winx1|sy-winy1|sy-winx2|sy-winy2|sy-winco|sy-winro|sy-windi|sy-srows|sy-scols|sy-loopc|sy-folen|sy-fodec|sy-tzone|sy-dayst|sy-ftype|sy-appli|sy-fdayw|sy-ccurs|sy-ccurt|sy-debug|sy-ctype|sy-input|sy-langu|sy-modno|sy-batch|sy-binpt|sy-calld|sy-dynnr|sy-dyngr|sy-newpa|sy-pri40|sy-rstrt|sy-wtitl|sy-cpage|sy-dbnam|sy-mandt|sy-prefx|sy-fmkey|sy-pexpi|sy-prini|sy-primm|sy-prrel|sy-playo|sy-prbig|sy-playp|sy-prnew|sy-prlog|sy-pdest|sy-plist|sy-pauth|sy-prdsn|sy-pnwpa|sy-callr|sy-repi2|sy-rtitl|sy-prrec|sy-prtxt|sy-prabt|sy-lpass|sy-nrpag|sy-paart|sy-prcop|sy-batzs|sy-bspld|sy-brep4|sy-batzo|sy-batzd|sy-batzw|sy-batzm|sy-ctabl|sy-dbsys|sy-dcsys|sy-macdb|sy-sysid|sy-opsys|sy-pfkey|sy-saprl|sy-tcode|sy-ucomm|sy-cfwae|sy-chwae|sy-spono|sy-sponr|sy-waers|sy-cdate|sy-datum|sy-slset|sy-subty|sy-subcs|sy-group|sy-ffile|sy-uzeit|sy-dsnam|sy-repid|sy-tabid|sy-tfdsn|sy-uname|sy-lstat|sy-abcde|sy-marky|sy-sfnam|sy-tname|sy-msgli|sy-title|sy-entry|sy-lisel|sy-uline|sy-xcode|sy-cprog|sy-xprog|sy-xform|sy-ldbpg|sy-tvar0|sy-tvar1|sy-tvar2|sy-tvar3|sy-tvar4|sy-tvar5|sy-tvar6|sy-tvar7|sy-tvar8|sy-tvar9|sy-msgid|sy-msgty|sy-msgno|sy-msgv1|sy-msgv2|sy-msgv3|sy-msgv4|sy-oncom|sy-vline|sy-winsl|sy-staco|sy-staro|sy-datar|sy-host|sy-locdb|sy-locop|sy-datlo|sy-timlo|sy-zonlo|syst-index|syst-pagno|syst-tabix|syst-tfill|syst-tlopc|syst-tmaxl|syst-toccu|syst-ttabc|syst-tstis|syst-ttabi|syst-dbcnt|syst-fdpos|syst-colno|syst-linct|syst-linno|syst-linsz|syst-pagct|syst-macol|syst-marow|syst-tleng|syst-sfoff|syst-willi|syst-lilli|syst-subrc|syst-fleng|syst-cucol|syst-curow|syst-lsind|syst-listi|syst-stepl|syst-tpagi|syst-winx1|syst-winy1|syst-winx2|syst-winy2|syst-winco|syst-winro|syst-windi|syst-srows|syst-scols|syst-loopc|syst-folen|syst-fodec|syst-tzone|syst-dayst|syst-ftype|syst-appli|syst-fdayw|syst-ccurs|syst-ccurt|syst-debug|syst-ctype|syst-input|syst-langu|syst-modno|syst-batch|syst-binpt|syst-calld|syst-dynnr|syst-dyngr|syst-newpa|syst-pri40|syst-rstrt|syst-wtitl|syst-cpage|syst-dbnam|syst-mandt|syst-prefx|syst-fmkey|syst-pexpi|syst-prini|syst-primm|syst-prrel|syst-playo|syst-prbig|syst-playp|syst-prnew|syst-prlog|syst-pdest|syst-plist|syst-pauth|syst-prdsn|syst-pnwpa|syst-callr|syst-repi2|syst-rtitl|syst-prrec|syst-prtxt|syst-prabt|syst-lpass|syst-nrpag|syst-paart|syst-prcop|syst-batzs|syst-bspld|syst-brep4|syst-batzo|syst-batzd|syst-batzw|syst-batzm|syst-ctabl|syst-dbsys|syst-dcsys|syst-macdb|syst-sysid|syst-opsys|syst-pfkey|syst-saprl|syst-tcode|syst-ucomm|syst-cfwae|syst-chwae|syst-spono|syst-sponr|syst-waers|syst-cdate|syst-datum|syst-slset|syst-subty|syst-subcs|syst-group|syst-ffile|syst-uzeit|syst-dsnam|syst-repid|syst-tabid|syst-tfdsn|syst-uname|syst-lstat|syst-abcde|syst-marky|syst-sfnam|syst-tname|syst-msgli|syst-title|syst-entry|syst-lisel|syst-uline|syst-xcode|syst-cprog|syst-xprog|syst-xform|syst-ldbpg|syst-tvar0|syst-tvar1|syst-tvar2|syst-tvar3|syst-tvar4|syst-tvar5|syst-tvar6|syst-tvar7|syst-tvar8|syst-tvar9|syst-msgid|syst-msgty|syst-msgno|syst-msgv1|syst-msgv2|syst-msgv3|syst-msgv4|syst-oncom|syst-vline|syst-winsl|syst-staco|syst-staro|syst-datar|syst-host|syst-locdb|syst-locop|syst-datlo|syst-timlo|syst-zonlo)$/',
|
||||
'reserved' => '/^((?i)abs|acos|add|add-corresponding|adjacent|after|aliases|all|analyzer|and|any|append|as|ascending|asin|assign|assigned|assigning|at|atan|authority-check|avg|back|before|begin|binary|bit|bit-and|bit-not|bit-or|bit-xor|blank|block|break-point|buffer|by|c|call|case|catch|ceil|centered|chain|change|changing|check|checkbox|class|class-data|class-events|class-methods|class-pool|clear|client|close|cnt|code|collect|color|comment|commit|communication|compute|concatenate|condense|constants|context|contexts|continue|control|controls|convert|copy|corresponding|cos|cosh|count|country|create|currency|cursor|customer-function|data|database|dataset|delete|decimals|default|define|demand|descending|describe|dialog|distinct|div|divide|divide-corresponding|do|duplicates|dynpro|edit|editor-call|else|elseif|end|end-of-definition|end-of-page|end-of-selection|endat|endcase|endcatch|endchain|endclass|enddo|endexec|endform|endfunction|endif|endinterface|endloop|endmethod|endmodule|endon|endprovide|endselect|endwhile|entries|events|exec|exit|exit-command|exp|exponent|export|exporting|exceptions|extended|extract|fetch|field|field-groups|field-symbols|fields|floor|for|form|format|frac|frame|free|from|function|function-pool|generate|get|group|hashed|header|help-id|help-request|hide|hotspot|icon|id|if|import|importing|include|index|infotypes|initialization|inner|input|insert|intensified|interface|interface-pool|interfaces|into|inverse|join|key|language|last|leave|left|left-justified|like|line|line-count|line-selection|line-size|lines|list-processing|load|load-of-program|local|locale|log|log10|loop|m|margin|mask|matchcode|max|memory|message|message-id|messages|method|methods|min|mod|mode|modif|modify|module|move|move-corresponding|multiply|multiply-corresponding|new|new-line|new-page|next|no|no-gap|no-gaps|no-heading|no-scrolling|no-sign|no-title|no-zero|nodes|non-unique|o|object|obligatory|occurs|of|off|on|open|or|order|others|outer|output|overlay|pack|page|parameter|parameters|perform|pf-status|position|print|print-control|private|process|program|property|protected|provide|public|put|radiobutton|raise|raising|range|ranges|read|receive|refresh|reject|replace|report|requested|reserve|reset|right-justified|rollback|round|rows|rtti|run|scan|screen|search|separated|scroll|scroll-boundary|select|select-options|selection-screen|selection-table|set|shared|shift|sign|sin|single|sinh|size|skip|sort|sorted|split|sql|sqrt|stamp|standard|start-of-selection|statics|stop|string|strlen|structure|submit|subtract|subtract-corresponding|sum|supply|suppress|symbol|syntax-check|syntax-trace|system-call|system-exceptions|table|table_line|tables|tan|tanh|text|textpool|time|times|title|titlebar|to|top-of-page|transaction|transfer|translate|transporting|trunc|type|type-pool|type-pools|types|uline|under|unique|unit|unpack|up|update|user-command|using|value|value-request|values|vary|when|where|while|window|with|with-title|work|write|x|xstring|z|zone)$/',
|
||||
'constants' => '/^((?i)initial|null|space|col_background|col_heading|col_normal|col_total|col_key|col_positive|col_negative|col_group)$/',
|
||||
),
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 =>
|
||||
array (
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'sy' => '/^((?i)screen-name|screen-group1|screen-group2|screen-group3|screen-group4|screen-required|screen-input|screen-output|screen-intensified|screen-invisible|screen-length|screen-active|sy-index|sy-pagno|sy-tabix|sy-tfill|sy-tlopc|sy-tmaxl|sy-toccu|sy-ttabc|sy-tstis|sy-ttabi|sy-dbcnt|sy-fdpos|sy-colno|sy-linct|sy-linno|sy-linsz|sy-pagct|sy-macol|sy-marow|sy-tleng|sy-sfoff|sy-willi|sy-lilli|sy-subrc|sy-fleng|sy-cucol|sy-curow|sy-lsind|sy-listi|sy-stepl|sy-tpagi|sy-winx1|sy-winy1|sy-winx2|sy-winy2|sy-winco|sy-winro|sy-windi|sy-srows|sy-scols|sy-loopc|sy-folen|sy-fodec|sy-tzone|sy-dayst|sy-ftype|sy-appli|sy-fdayw|sy-ccurs|sy-ccurt|sy-debug|sy-ctype|sy-input|sy-langu|sy-modno|sy-batch|sy-binpt|sy-calld|sy-dynnr|sy-dyngr|sy-newpa|sy-pri40|sy-rstrt|sy-wtitl|sy-cpage|sy-dbnam|sy-mandt|sy-prefx|sy-fmkey|sy-pexpi|sy-prini|sy-primm|sy-prrel|sy-playo|sy-prbig|sy-playp|sy-prnew|sy-prlog|sy-pdest|sy-plist|sy-pauth|sy-prdsn|sy-pnwpa|sy-callr|sy-repi2|sy-rtitl|sy-prrec|sy-prtxt|sy-prabt|sy-lpass|sy-nrpag|sy-paart|sy-prcop|sy-batzs|sy-bspld|sy-brep4|sy-batzo|sy-batzd|sy-batzw|sy-batzm|sy-ctabl|sy-dbsys|sy-dcsys|sy-macdb|sy-sysid|sy-opsys|sy-pfkey|sy-saprl|sy-tcode|sy-ucomm|sy-cfwae|sy-chwae|sy-spono|sy-sponr|sy-waers|sy-cdate|sy-datum|sy-slset|sy-subty|sy-subcs|sy-group|sy-ffile|sy-uzeit|sy-dsnam|sy-repid|sy-tabid|sy-tfdsn|sy-uname|sy-lstat|sy-abcde|sy-marky|sy-sfnam|sy-tname|sy-msgli|sy-title|sy-entry|sy-lisel|sy-uline|sy-xcode|sy-cprog|sy-xprog|sy-xform|sy-ldbpg|sy-tvar0|sy-tvar1|sy-tvar2|sy-tvar3|sy-tvar4|sy-tvar5|sy-tvar6|sy-tvar7|sy-tvar8|sy-tvar9|sy-msgid|sy-msgty|sy-msgno|sy-msgv1|sy-msgv2|sy-msgv3|sy-msgv4|sy-oncom|sy-vline|sy-winsl|sy-staco|sy-staro|sy-datar|sy-host|sy-locdb|sy-locop|sy-datlo|sy-timlo|sy-zonlo|syst-index|syst-pagno|syst-tabix|syst-tfill|syst-tlopc|syst-tmaxl|syst-toccu|syst-ttabc|syst-tstis|syst-ttabi|syst-dbcnt|syst-fdpos|syst-colno|syst-linct|syst-linno|syst-linsz|syst-pagct|syst-macol|syst-marow|syst-tleng|syst-sfoff|syst-willi|syst-lilli|syst-subrc|syst-fleng|syst-cucol|syst-curow|syst-lsind|syst-listi|syst-stepl|syst-tpagi|syst-winx1|syst-winy1|syst-winx2|syst-winy2|syst-winco|syst-winro|syst-windi|syst-srows|syst-scols|syst-loopc|syst-folen|syst-fodec|syst-tzone|syst-dayst|syst-ftype|syst-appli|syst-fdayw|syst-ccurs|syst-ccurt|syst-debug|syst-ctype|syst-input|syst-langu|syst-modno|syst-batch|syst-binpt|syst-calld|syst-dynnr|syst-dyngr|syst-newpa|syst-pri40|syst-rstrt|syst-wtitl|syst-cpage|syst-dbnam|syst-mandt|syst-prefx|syst-fmkey|syst-pexpi|syst-prini|syst-primm|syst-prrel|syst-playo|syst-prbig|syst-playp|syst-prnew|syst-prlog|syst-pdest|syst-plist|syst-pauth|syst-prdsn|syst-pnwpa|syst-callr|syst-repi2|syst-rtitl|syst-prrec|syst-prtxt|syst-prabt|syst-lpass|syst-nrpag|syst-paart|syst-prcop|syst-batzs|syst-bspld|syst-brep4|syst-batzo|syst-batzd|syst-batzw|syst-batzm|syst-ctabl|syst-dbsys|syst-dcsys|syst-macdb|syst-sysid|syst-opsys|syst-pfkey|syst-saprl|syst-tcode|syst-ucomm|syst-cfwae|syst-chwae|syst-spono|syst-sponr|syst-waers|syst-cdate|syst-datum|syst-slset|syst-subty|syst-subcs|syst-group|syst-ffile|syst-uzeit|syst-dsnam|syst-repid|syst-tabid|syst-tfdsn|syst-uname|syst-lstat|syst-abcde|syst-marky|syst-sfnam|syst-tname|syst-msgli|syst-title|syst-entry|syst-lisel|syst-uline|syst-xcode|syst-cprog|syst-xprog|syst-xform|syst-ldbpg|syst-tvar0|syst-tvar1|syst-tvar2|syst-tvar3|syst-tvar4|syst-tvar5|syst-tvar6|syst-tvar7|syst-tvar8|syst-tvar9|syst-msgid|syst-msgty|syst-msgno|syst-msgv1|syst-msgv2|syst-msgv3|syst-msgv4|syst-oncom|syst-vline|syst-winsl|syst-staco|syst-staro|syst-datar|syst-host|syst-locdb|syst-locop|syst-datlo|syst-timlo|syst-zonlo)$/',
|
||||
'reserved' => '/^((?i)abs|acos|add|add-corresponding|adjacent|after|aliases|all|analyzer|and|any|append|as|ascending|asin|assign|assigned|assigning|at|atan|authority-check|avg|back|before|begin|binary|bit|bit-and|bit-not|bit-or|bit-xor|blank|block|break-point|buffer|by|c|call|case|catch|ceil|centered|chain|change|changing|check|checkbox|class|class-data|class-events|class-methods|class-pool|clear|client|close|cnt|code|collect|color|comment|commit|communication|compute|concatenate|condense|constants|context|contexts|continue|control|controls|convert|copy|corresponding|cos|cosh|count|country|create|currency|cursor|customer-function|data|database|dataset|delete|decimals|default|define|demand|descending|describe|dialog|distinct|div|divide|divide-corresponding|do|duplicates|dynpro|edit|editor-call|else|elseif|end|end-of-definition|end-of-page|end-of-selection|endat|endcase|endcatch|endchain|endclass|enddo|endexec|endform|endfunction|endif|endinterface|endloop|endmethod|endmodule|endon|endprovide|endselect|endwhile|entries|events|exec|exit|exit-command|exp|exponent|export|exporting|exceptions|extended|extract|fetch|field|field-groups|field-symbols|fields|floor|for|form|format|frac|frame|free|from|function|function-pool|generate|get|group|hashed|header|help-id|help-request|hide|hotspot|icon|id|if|import|importing|include|index|infotypes|initialization|inner|input|insert|intensified|interface|interface-pool|interfaces|into|inverse|join|key|language|last|leave|left|left-justified|like|line|line-count|line-selection|line-size|lines|list-processing|load|load-of-program|local|locale|log|log10|loop|m|margin|mask|matchcode|max|memory|message|message-id|messages|method|methods|min|mod|mode|modif|modify|module|move|move-corresponding|multiply|multiply-corresponding|new|new-line|new-page|next|no|no-gap|no-gaps|no-heading|no-scrolling|no-sign|no-title|no-zero|nodes|non-unique|o|object|obligatory|occurs|of|off|on|open|or|order|others|outer|output|overlay|pack|page|parameter|parameters|perform|pf-status|position|print|print-control|private|process|program|property|protected|provide|public|put|radiobutton|raise|raising|range|ranges|read|receive|refresh|reject|replace|report|requested|reserve|reset|right-justified|rollback|round|rows|rtti|run|scan|screen|search|separated|scroll|scroll-boundary|select|select-options|selection-screen|selection-table|set|shared|shift|sign|sin|single|sinh|size|skip|sort|sorted|split|sql|sqrt|stamp|standard|start-of-selection|statics|stop|string|strlen|structure|submit|subtract|subtract-corresponding|sum|supply|suppress|symbol|syntax-check|syntax-trace|system-call|system-exceptions|table|table_line|tables|tan|tanh|text|textpool|time|times|title|titlebar|to|top-of-page|transaction|transfer|translate|transporting|trunc|type|type-pool|type-pools|types|uline|under|unique|unit|unpack|up|update|user-command|using|value|value-request|values|vary|when|where|while|window|with|with-title|work|write|x|xstring|z|zone)$/',
|
||||
'constants' => '/^((?i)initial|null|space|col_background|col_heading|col_normal|col_total|col_key|col_positive|col_negative|col_group)$/',
|
||||
),
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 =>
|
||||
array (
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'sy' => '/^((?i)screen-name|screen-group1|screen-group2|screen-group3|screen-group4|screen-required|screen-input|screen-output|screen-intensified|screen-invisible|screen-length|screen-active|sy-index|sy-pagno|sy-tabix|sy-tfill|sy-tlopc|sy-tmaxl|sy-toccu|sy-ttabc|sy-tstis|sy-ttabi|sy-dbcnt|sy-fdpos|sy-colno|sy-linct|sy-linno|sy-linsz|sy-pagct|sy-macol|sy-marow|sy-tleng|sy-sfoff|sy-willi|sy-lilli|sy-subrc|sy-fleng|sy-cucol|sy-curow|sy-lsind|sy-listi|sy-stepl|sy-tpagi|sy-winx1|sy-winy1|sy-winx2|sy-winy2|sy-winco|sy-winro|sy-windi|sy-srows|sy-scols|sy-loopc|sy-folen|sy-fodec|sy-tzone|sy-dayst|sy-ftype|sy-appli|sy-fdayw|sy-ccurs|sy-ccurt|sy-debug|sy-ctype|sy-input|sy-langu|sy-modno|sy-batch|sy-binpt|sy-calld|sy-dynnr|sy-dyngr|sy-newpa|sy-pri40|sy-rstrt|sy-wtitl|sy-cpage|sy-dbnam|sy-mandt|sy-prefx|sy-fmkey|sy-pexpi|sy-prini|sy-primm|sy-prrel|sy-playo|sy-prbig|sy-playp|sy-prnew|sy-prlog|sy-pdest|sy-plist|sy-pauth|sy-prdsn|sy-pnwpa|sy-callr|sy-repi2|sy-rtitl|sy-prrec|sy-prtxt|sy-prabt|sy-lpass|sy-nrpag|sy-paart|sy-prcop|sy-batzs|sy-bspld|sy-brep4|sy-batzo|sy-batzd|sy-batzw|sy-batzm|sy-ctabl|sy-dbsys|sy-dcsys|sy-macdb|sy-sysid|sy-opsys|sy-pfkey|sy-saprl|sy-tcode|sy-ucomm|sy-cfwae|sy-chwae|sy-spono|sy-sponr|sy-waers|sy-cdate|sy-datum|sy-slset|sy-subty|sy-subcs|sy-group|sy-ffile|sy-uzeit|sy-dsnam|sy-repid|sy-tabid|sy-tfdsn|sy-uname|sy-lstat|sy-abcde|sy-marky|sy-sfnam|sy-tname|sy-msgli|sy-title|sy-entry|sy-lisel|sy-uline|sy-xcode|sy-cprog|sy-xprog|sy-xform|sy-ldbpg|sy-tvar0|sy-tvar1|sy-tvar2|sy-tvar3|sy-tvar4|sy-tvar5|sy-tvar6|sy-tvar7|sy-tvar8|sy-tvar9|sy-msgid|sy-msgty|sy-msgno|sy-msgv1|sy-msgv2|sy-msgv3|sy-msgv4|sy-oncom|sy-vline|sy-winsl|sy-staco|sy-staro|sy-datar|sy-host|sy-locdb|sy-locop|sy-datlo|sy-timlo|sy-zonlo|syst-index|syst-pagno|syst-tabix|syst-tfill|syst-tlopc|syst-tmaxl|syst-toccu|syst-ttabc|syst-tstis|syst-ttabi|syst-dbcnt|syst-fdpos|syst-colno|syst-linct|syst-linno|syst-linsz|syst-pagct|syst-macol|syst-marow|syst-tleng|syst-sfoff|syst-willi|syst-lilli|syst-subrc|syst-fleng|syst-cucol|syst-curow|syst-lsind|syst-listi|syst-stepl|syst-tpagi|syst-winx1|syst-winy1|syst-winx2|syst-winy2|syst-winco|syst-winro|syst-windi|syst-srows|syst-scols|syst-loopc|syst-folen|syst-fodec|syst-tzone|syst-dayst|syst-ftype|syst-appli|syst-fdayw|syst-ccurs|syst-ccurt|syst-debug|syst-ctype|syst-input|syst-langu|syst-modno|syst-batch|syst-binpt|syst-calld|syst-dynnr|syst-dyngr|syst-newpa|syst-pri40|syst-rstrt|syst-wtitl|syst-cpage|syst-dbnam|syst-mandt|syst-prefx|syst-fmkey|syst-pexpi|syst-prini|syst-primm|syst-prrel|syst-playo|syst-prbig|syst-playp|syst-prnew|syst-prlog|syst-pdest|syst-plist|syst-pauth|syst-prdsn|syst-pnwpa|syst-callr|syst-repi2|syst-rtitl|syst-prrec|syst-prtxt|syst-prabt|syst-lpass|syst-nrpag|syst-paart|syst-prcop|syst-batzs|syst-bspld|syst-brep4|syst-batzo|syst-batzd|syst-batzw|syst-batzm|syst-ctabl|syst-dbsys|syst-dcsys|syst-macdb|syst-sysid|syst-opsys|syst-pfkey|syst-saprl|syst-tcode|syst-ucomm|syst-cfwae|syst-chwae|syst-spono|syst-sponr|syst-waers|syst-cdate|syst-datum|syst-slset|syst-subty|syst-subcs|syst-group|syst-ffile|syst-uzeit|syst-dsnam|syst-repid|syst-tabid|syst-tfdsn|syst-uname|syst-lstat|syst-abcde|syst-marky|syst-sfnam|syst-tname|syst-msgli|syst-title|syst-entry|syst-lisel|syst-uline|syst-xcode|syst-cprog|syst-xprog|syst-xform|syst-ldbpg|syst-tvar0|syst-tvar1|syst-tvar2|syst-tvar3|syst-tvar4|syst-tvar5|syst-tvar6|syst-tvar7|syst-tvar8|syst-tvar9|syst-msgid|syst-msgty|syst-msgno|syst-msgv1|syst-msgv2|syst-msgv3|syst-msgv4|syst-oncom|syst-vline|syst-winsl|syst-staco|syst-staro|syst-datar|syst-host|syst-locdb|syst-locop|syst-datlo|syst-timlo|syst-zonlo)$/',
|
||||
'reserved' => '/^((?i)abs|acos|add|add-corresponding|adjacent|after|aliases|all|analyzer|and|any|append|as|ascending|asin|assign|assigned|assigning|at|atan|authority-check|avg|back|before|begin|binary|bit|bit-and|bit-not|bit-or|bit-xor|blank|block|break-point|buffer|by|c|call|case|catch|ceil|centered|chain|change|changing|check|checkbox|class|class-data|class-events|class-methods|class-pool|clear|client|close|cnt|code|collect|color|comment|commit|communication|compute|concatenate|condense|constants|context|contexts|continue|control|controls|convert|copy|corresponding|cos|cosh|count|country|create|currency|cursor|customer-function|data|database|dataset|delete|decimals|default|define|demand|descending|describe|dialog|distinct|div|divide|divide-corresponding|do|duplicates|dynpro|edit|editor-call|else|elseif|end|end-of-definition|end-of-page|end-of-selection|endat|endcase|endcatch|endchain|endclass|enddo|endexec|endform|endfunction|endif|endinterface|endloop|endmethod|endmodule|endon|endprovide|endselect|endwhile|entries|events|exec|exit|exit-command|exp|exponent|export|exporting|exceptions|extended|extract|fetch|field|field-groups|field-symbols|fields|floor|for|form|format|frac|frame|free|from|function|function-pool|generate|get|group|hashed|header|help-id|help-request|hide|hotspot|icon|id|if|import|importing|include|index|infotypes|initialization|inner|input|insert|intensified|interface|interface-pool|interfaces|into|inverse|join|key|language|last|leave|left|left-justified|like|line|line-count|line-selection|line-size|lines|list-processing|load|load-of-program|local|locale|log|log10|loop|m|margin|mask|matchcode|max|memory|message|message-id|messages|method|methods|min|mod|mode|modif|modify|module|move|move-corresponding|multiply|multiply-corresponding|new|new-line|new-page|next|no|no-gap|no-gaps|no-heading|no-scrolling|no-sign|no-title|no-zero|nodes|non-unique|o|object|obligatory|occurs|of|off|on|open|or|order|others|outer|output|overlay|pack|page|parameter|parameters|perform|pf-status|position|print|print-control|private|process|program|property|protected|provide|public|put|radiobutton|raise|raising|range|ranges|read|receive|refresh|reject|replace|report|requested|reserve|reset|right-justified|rollback|round|rows|rtti|run|scan|screen|search|separated|scroll|scroll-boundary|select|select-options|selection-screen|selection-table|set|shared|shift|sign|sin|single|sinh|size|skip|sort|sorted|split|sql|sqrt|stamp|standard|start-of-selection|statics|stop|string|strlen|structure|submit|subtract|subtract-corresponding|sum|supply|suppress|symbol|syntax-check|syntax-trace|system-call|system-exceptions|table|table_line|tables|tan|tanh|text|textpool|time|times|title|titlebar|to|top-of-page|transaction|transfer|translate|transporting|trunc|type|type-pool|type-pools|types|uline|under|unique|unit|unpack|up|update|user-command|using|value|value-request|values|vary|when|where|while|window|with|with-title|work|write|x|xstring|z|zone)$/',
|
||||
'constants' => '/^((?i)initial|null|space|col_background|col_heading|col_normal|col_total|col_key|col_positive|col_negative|col_group)$/',
|
||||
),
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
);
|
||||
$this->_parts = array (
|
||||
0 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
9 => NULL,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
9 => NULL,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
9 => NULL,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
);
|
||||
$this->_subst = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
);
|
||||
$this->_conditions = array (
|
||||
);
|
||||
$this->_kwmap = array (
|
||||
'sy' => 'reserved',
|
||||
'reserved' => 'reserved',
|
||||
'constants' => 'reserved',
|
||||
);
|
||||
$this->_defClass = 'code';
|
||||
$this->_checkDefines();
|
||||
}
|
||||
|
||||
}
|
||||
840
framework/vendors/TextHighlighter/Text/Highlighter/CPP.php
vendored
Normal file
840
framework/vendors/TextHighlighter/Text/Highlighter/CPP.php
vendored
Normal file
@@ -0,0 +1,840 @@
|
||||
<?php
|
||||
/**
|
||||
* Auto-generated class. CPP syntax highlighting
|
||||
*
|
||||
*
|
||||
* Thanks to Aaron Kalin for initial
|
||||
* implementation of this highlighter
|
||||
*
|
||||
*
|
||||
* PHP version 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @version generated from: : cpp.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp
|
||||
* @author Aaron Kalin
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Auto-generated class. CPP syntax highlighting
|
||||
*
|
||||
* @author Aaron Kalin
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
class Text_Highlighter_CPP extends Text_Highlighter
|
||||
{
|
||||
var $_language = 'cpp';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $options
|
||||
* @access public
|
||||
*/
|
||||
function __construct($options=array())
|
||||
{
|
||||
|
||||
$this->_options = $options;
|
||||
$this->_regs = array (
|
||||
-1 => '/((?i)")|((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)[a-z_]\\w*)|((?mi)^[ \\t]*#include)|((?mii)^[ \\t]*#[ \\t]*[a-z]+)|((?i)\\d*\\.?\\d+)|((?i)\\/\\*)|((?i)\\/\\/.+)/',
|
||||
0 => '/((?i)\\\\)/',
|
||||
1 => '/((?i)")|((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)[a-z_]\\w*)|((?i)\\b0[xX][\\da-f]+)|((?i)\\b\\d\\d*|\\b0\\b)|((?i)\\b0[0-7]+)|((?i)\\b(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?mi)^[ \\t]*#include)|((?mii)^[ \\t]*#[ \\t]*[a-z]+)|((?i)\\d*\\.?\\d+)|((?i)\\/\\*)|((?i)\\/\\/.+)/',
|
||||
2 => '/((?i)")|((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)[a-z_]\\w*)|((?i)\\b0[xX][\\da-f]+)|((?i)\\b\\d\\d*|\\b0\\b)|((?i)\\b0[0-7]+)|((?i)\\b(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?mi)^[ \\t]*#include)|((?mii)^[ \\t]*#[ \\t]*[a-z]+)|((?i)\\d*\\.?\\d+)|((?i)\\/\\*)|((?i)\\/\\/.+)/',
|
||||
3 => '/((?i)")|((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)[a-z_]\\w*)|((?i)\\b0[xX][\\da-f]+)|((?i)\\b\\d\\d*|\\b0\\b)|((?i)\\b0[0-7]+)|((?i)\\b(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?mi)^[ \\t]*#include)|((?mii)^[ \\t]*#[ \\t]*[a-z]+)|((?i)\\d*\\.?\\d+)|((?i)\\/\\*)|((?i)\\/\\/.+)/',
|
||||
4 => '//',
|
||||
5 => '/((?i)")|((?i)<)/',
|
||||
6 => '/((?i)")|((?i)\\{)|((?i)\\()|((?i)[a-z_]\\w*)|((?i)\\b0[xX][\\da-f]+)|((?i)\\b\\d\\d*|\\b0\\b)|((?i)\\b0[0-7]+)|((?i)\\b(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)\\/\\*)|((?i)\\/\\/.+)/',
|
||||
7 => '/((?i)\\$\\w+\\s*:.+\\$)/',
|
||||
8 => '/((?i)\\$\\w+\\s*:.+\\$)/',
|
||||
);
|
||||
$this->_counts = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 0,
|
||||
9 => 0,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 2,
|
||||
9 => 0,
|
||||
10 => 0,
|
||||
11 => 0,
|
||||
12 => 0,
|
||||
13 => 0,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 2,
|
||||
9 => 0,
|
||||
10 => 0,
|
||||
11 => 0,
|
||||
12 => 0,
|
||||
13 => 0,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 2,
|
||||
9 => 0,
|
||||
10 => 0,
|
||||
11 => 0,
|
||||
12 => 0,
|
||||
13 => 0,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 2,
|
||||
8 => 0,
|
||||
9 => 0,
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
);
|
||||
$this->_delim = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'quotes',
|
||||
1 => 'brackets',
|
||||
2 => 'brackets',
|
||||
3 => 'brackets',
|
||||
4 => '',
|
||||
5 => 'prepro',
|
||||
6 => 'prepro',
|
||||
7 => '',
|
||||
8 => 'mlcomment',
|
||||
9 => 'comment',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 'quotes',
|
||||
1 => 'brackets',
|
||||
2 => 'brackets',
|
||||
3 => 'brackets',
|
||||
4 => '',
|
||||
5 => '',
|
||||
6 => '',
|
||||
7 => '',
|
||||
8 => '',
|
||||
9 => 'prepro',
|
||||
10 => 'prepro',
|
||||
11 => '',
|
||||
12 => 'mlcomment',
|
||||
13 => 'comment',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'quotes',
|
||||
1 => 'brackets',
|
||||
2 => 'brackets',
|
||||
3 => 'brackets',
|
||||
4 => '',
|
||||
5 => '',
|
||||
6 => '',
|
||||
7 => '',
|
||||
8 => '',
|
||||
9 => 'prepro',
|
||||
10 => 'prepro',
|
||||
11 => '',
|
||||
12 => 'mlcomment',
|
||||
13 => 'comment',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 'quotes',
|
||||
1 => 'brackets',
|
||||
2 => 'brackets',
|
||||
3 => 'brackets',
|
||||
4 => '',
|
||||
5 => '',
|
||||
6 => '',
|
||||
7 => '',
|
||||
8 => '',
|
||||
9 => 'prepro',
|
||||
10 => 'prepro',
|
||||
11 => '',
|
||||
12 => 'mlcomment',
|
||||
13 => 'comment',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 'quotes',
|
||||
1 => 'quotes',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => 'quotes',
|
||||
1 => 'brackets',
|
||||
2 => 'brackets',
|
||||
3 => '',
|
||||
4 => '',
|
||||
5 => '',
|
||||
6 => '',
|
||||
7 => '',
|
||||
8 => 'mlcomment',
|
||||
9 => 'comment',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
);
|
||||
$this->_inner = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'string',
|
||||
1 => 'code',
|
||||
2 => 'code',
|
||||
3 => 'code',
|
||||
4 => 'identifier',
|
||||
5 => 'prepro',
|
||||
6 => 'code',
|
||||
7 => 'number',
|
||||
8 => 'mlcomment',
|
||||
9 => 'comment',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 'string',
|
||||
1 => 'code',
|
||||
2 => 'code',
|
||||
3 => 'code',
|
||||
4 => 'identifier',
|
||||
5 => 'number',
|
||||
6 => 'number',
|
||||
7 => 'number',
|
||||
8 => 'number',
|
||||
9 => 'prepro',
|
||||
10 => 'code',
|
||||
11 => 'number',
|
||||
12 => 'mlcomment',
|
||||
13 => 'comment',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'string',
|
||||
1 => 'code',
|
||||
2 => 'code',
|
||||
3 => 'code',
|
||||
4 => 'identifier',
|
||||
5 => 'number',
|
||||
6 => 'number',
|
||||
7 => 'number',
|
||||
8 => 'number',
|
||||
9 => 'prepro',
|
||||
10 => 'code',
|
||||
11 => 'number',
|
||||
12 => 'mlcomment',
|
||||
13 => 'comment',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 'string',
|
||||
1 => 'code',
|
||||
2 => 'code',
|
||||
3 => 'code',
|
||||
4 => 'identifier',
|
||||
5 => 'number',
|
||||
6 => 'number',
|
||||
7 => 'number',
|
||||
8 => 'number',
|
||||
9 => 'prepro',
|
||||
10 => 'code',
|
||||
11 => 'number',
|
||||
12 => 'mlcomment',
|
||||
13 => 'comment',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 'string',
|
||||
1 => 'string',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => 'string',
|
||||
1 => 'code',
|
||||
2 => 'code',
|
||||
3 => 'identifier',
|
||||
4 => 'number',
|
||||
5 => 'number',
|
||||
6 => 'number',
|
||||
7 => 'number',
|
||||
8 => 'mlcomment',
|
||||
9 => 'comment',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
0 => 'inlinedoc',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
0 => 'inlinedoc',
|
||||
),
|
||||
);
|
||||
$this->_end = array (
|
||||
0 => '/(?i)"/',
|
||||
1 => '/(?i)\\}/',
|
||||
2 => '/(?i)\\)/',
|
||||
3 => '/(?i)\\]/',
|
||||
4 => '/(?i)>/',
|
||||
5 => '/(?mi)(?<!\\\\)$/',
|
||||
6 => '/(?mi)(?<!\\\\)$/',
|
||||
7 => '/(?i)\\*\\//',
|
||||
8 => '/(?mi)$/',
|
||||
);
|
||||
$this->_states = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => -1,
|
||||
5 => 5,
|
||||
6 => 6,
|
||||
7 => -1,
|
||||
8 => 7,
|
||||
9 => 8,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
9 => 5,
|
||||
10 => 6,
|
||||
11 => -1,
|
||||
12 => 7,
|
||||
13 => 8,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
9 => 5,
|
||||
10 => 6,
|
||||
11 => -1,
|
||||
12 => 7,
|
||||
13 => 8,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
9 => 5,
|
||||
10 => 6,
|
||||
11 => -1,
|
||||
12 => 7,
|
||||
13 => 8,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 4,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 => -1,
|
||||
8 => 7,
|
||||
9 => 8,
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
);
|
||||
$this->_keywords = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 =>
|
||||
array (
|
||||
'reserved' => '/^(and|and_eq|asm|bitand|bitor|break|case|catch|compl|const_cast|continue|default|delete|do|dynamic_cast|else|for|fortran|friend|goto|if|new|not|not_eq|operator|or|or_eq|private|protected|public|reinterpret_cast|return|sizeof|static_cast|switch|this|throw|try|typeid|using|while|xor|xor_eq|false|true)$/',
|
||||
'types' => '/^(auto|bool|char|class|const|double|enum|explicit|export|extern|float|inline|int|long|mutable|namespace|register|short|signed|static|struct|template|typedef|typename|union|unsigned|virtual|void|volatile|wchar_t)$/',
|
||||
'Common Macros' => '/^(NULL|TRUE|FALSE|MAX|MIN|__LINE__|__DATA__|__FILE__|__TIME__|__STDC__)$/',
|
||||
),
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 =>
|
||||
array (
|
||||
),
|
||||
8 => -1,
|
||||
9 => -1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 =>
|
||||
array (
|
||||
'reserved' => '/^(and|and_eq|asm|bitand|bitor|break|case|catch|compl|const_cast|continue|default|delete|do|dynamic_cast|else|for|fortran|friend|goto|if|new|not|not_eq|operator|or|or_eq|private|protected|public|reinterpret_cast|return|sizeof|static_cast|switch|this|throw|try|typeid|using|while|xor|xor_eq|false|true)$/',
|
||||
'types' => '/^(auto|bool|char|class|const|double|enum|explicit|export|extern|float|inline|int|long|mutable|namespace|register|short|signed|static|struct|template|typedef|typename|union|unsigned|virtual|void|volatile|wchar_t)$/',
|
||||
'Common Macros' => '/^(NULL|TRUE|FALSE|MAX|MIN|__LINE__|__DATA__|__FILE__|__TIME__|__STDC__)$/',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
9 => -1,
|
||||
10 => -1,
|
||||
11 =>
|
||||
array (
|
||||
),
|
||||
12 => -1,
|
||||
13 => -1,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 =>
|
||||
array (
|
||||
'reserved' => '/^(and|and_eq|asm|bitand|bitor|break|case|catch|compl|const_cast|continue|default|delete|do|dynamic_cast|else|for|fortran|friend|goto|if|new|not|not_eq|operator|or|or_eq|private|protected|public|reinterpret_cast|return|sizeof|static_cast|switch|this|throw|try|typeid|using|while|xor|xor_eq|false|true)$/',
|
||||
'types' => '/^(auto|bool|char|class|const|double|enum|explicit|export|extern|float|inline|int|long|mutable|namespace|register|short|signed|static|struct|template|typedef|typename|union|unsigned|virtual|void|volatile|wchar_t)$/',
|
||||
'Common Macros' => '/^(NULL|TRUE|FALSE|MAX|MIN|__LINE__|__DATA__|__FILE__|__TIME__|__STDC__)$/',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
9 => -1,
|
||||
10 => -1,
|
||||
11 =>
|
||||
array (
|
||||
),
|
||||
12 => -1,
|
||||
13 => -1,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 =>
|
||||
array (
|
||||
'reserved' => '/^(and|and_eq|asm|bitand|bitor|break|case|catch|compl|const_cast|continue|default|delete|do|dynamic_cast|else|for|fortran|friend|goto|if|new|not|not_eq|operator|or|or_eq|private|protected|public|reinterpret_cast|return|sizeof|static_cast|switch|this|throw|try|typeid|using|while|xor|xor_eq|false|true)$/',
|
||||
'types' => '/^(auto|bool|char|class|const|double|enum|explicit|export|extern|float|inline|int|long|mutable|namespace|register|short|signed|static|struct|template|typedef|typename|union|unsigned|virtual|void|volatile|wchar_t)$/',
|
||||
'Common Macros' => '/^(NULL|TRUE|FALSE|MAX|MIN|__LINE__|__DATA__|__FILE__|__TIME__|__STDC__)$/',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
9 => -1,
|
||||
10 => -1,
|
||||
11 =>
|
||||
array (
|
||||
),
|
||||
12 => -1,
|
||||
13 => -1,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 =>
|
||||
array (
|
||||
'reserved' => '/^(and|and_eq|asm|bitand|bitor|break|case|catch|compl|const_cast|continue|default|delete|do|dynamic_cast|else|for|fortran|friend|goto|if|new|not|not_eq|operator|or|or_eq|private|protected|public|reinterpret_cast|return|sizeof|static_cast|switch|this|throw|try|typeid|using|while|xor|xor_eq|false|true)$/',
|
||||
'types' => '/^(auto|bool|char|class|const|double|enum|explicit|export|extern|float|inline|int|long|mutable|namespace|register|short|signed|static|struct|template|typedef|typename|union|unsigned|virtual|void|volatile|wchar_t)$/',
|
||||
'Common Macros' => '/^(NULL|TRUE|FALSE|MAX|MIN|__LINE__|__DATA__|__FILE__|__TIME__|__STDC__)$/',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
),
|
||||
8 => -1,
|
||||
9 => -1,
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
);
|
||||
$this->_parts = array (
|
||||
0 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
9 => NULL,
|
||||
10 => NULL,
|
||||
11 => NULL,
|
||||
12 => NULL,
|
||||
13 => NULL,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
9 => NULL,
|
||||
10 => NULL,
|
||||
11 => NULL,
|
||||
12 => NULL,
|
||||
13 => NULL,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
9 => NULL,
|
||||
10 => NULL,
|
||||
11 => NULL,
|
||||
12 => NULL,
|
||||
13 => NULL,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
9 => NULL,
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
);
|
||||
$this->_subst = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
10 => false,
|
||||
11 => false,
|
||||
12 => false,
|
||||
13 => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
10 => false,
|
||||
11 => false,
|
||||
12 => false,
|
||||
13 => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
10 => false,
|
||||
11 => false,
|
||||
12 => false,
|
||||
13 => false,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
);
|
||||
$this->_conditions = array (
|
||||
);
|
||||
$this->_kwmap = array (
|
||||
'reserved' => 'reserved',
|
||||
'types' => 'types',
|
||||
'Common Macros' => 'prepro',
|
||||
);
|
||||
$this->_defClass = 'code';
|
||||
$this->_checkDefines();
|
||||
}
|
||||
|
||||
}
|
||||
419
framework/vendors/TextHighlighter/Text/Highlighter/CSS.php
vendored
Normal file
419
framework/vendors/TextHighlighter/Text/Highlighter/CSS.php
vendored
Normal file
@@ -0,0 +1,419 @@
|
||||
<?php
|
||||
/**
|
||||
* Auto-generated class. CSS syntax highlighting
|
||||
*
|
||||
* PHP version 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @version generated from: : css.xml,v 1.2 2008/01/01 23:45:07 ssttoo Exp
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Auto-generated class. CSS syntax highlighting
|
||||
*
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
class Text_Highlighter_CSS extends Text_Highlighter
|
||||
{
|
||||
var $_language = 'css';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $options
|
||||
* @access public
|
||||
*/
|
||||
function __construct($options=array())
|
||||
{
|
||||
|
||||
$this->_options = $options;
|
||||
$this->_regs = array (
|
||||
-1 => '/((?i)\\/\\*)|((?i)(@[a-z\\d]+))|((?i)(((\\.|#)?[a-z]+[a-z\\d\\-]*(?![a-z\\d\\-]))|(\\*))(?!\\s*:\\s*[\\s\\{]))|((?i):[a-z][a-z\\d\\-]*)|((?i)\\[)|((?i)\\{)/',
|
||||
0 => '//',
|
||||
1 => '/((?i)\\d*\\.?\\d+(\\%|em|ex|pc|pt|px|in|mm|cm))|((?i)\\d*\\.?\\d+)|((?i)[a-z][a-z\\d\\-]*)|((?i)#([\\da-f]{6}|[\\da-f]{3})\\b)/',
|
||||
2 => '/((?i)\')|((?i)")|((?i)[\\w\\-\\:]+)/',
|
||||
3 => '/((?i)\\/\\*)|((?i)[a-z][a-z\\d\\-]*\\s*:)|((?i)(((\\.|#)?[a-z]+[a-z\\d\\-]*(?![a-z\\d\\-]))|(\\*))(?!\\s*:\\s*[\\s\\{]))|((?i)\\{)/',
|
||||
4 => '/((?i)\\\\[\\\\(\\\\)\\\\])/',
|
||||
5 => '/((?i)\\\\\\\\|\\\\"|\\\\\'|\\\\`)/',
|
||||
6 => '/((?i)\\\\\\\\|\\\\"|\\\\\'|\\\\`|\\\\t|\\\\n|\\\\r)/',
|
||||
);
|
||||
$this->_counts = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 4,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 1,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 1,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 4,
|
||||
3 => 0,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
);
|
||||
$this->_delim = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => '',
|
||||
2 => '',
|
||||
3 => '',
|
||||
4 => 'brackets',
|
||||
5 => 'brackets',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => '',
|
||||
1 => '',
|
||||
2 => '',
|
||||
3 => '',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'quotes',
|
||||
1 => 'quotes',
|
||||
2 => '',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'reserved',
|
||||
2 => '',
|
||||
3 => 'brackets',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
);
|
||||
$this->_inner = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'var',
|
||||
2 => 'identifier',
|
||||
3 => 'special',
|
||||
4 => 'code',
|
||||
5 => 'code',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 'number',
|
||||
1 => 'number',
|
||||
2 => 'code',
|
||||
3 => 'var',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'string',
|
||||
1 => 'string',
|
||||
2 => 'var',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'code',
|
||||
2 => 'identifier',
|
||||
3 => 'code',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 'string',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
);
|
||||
$this->_end = array (
|
||||
0 => '/(?i)\\*\\//',
|
||||
1 => '/(?i)(?=;|\\})/',
|
||||
2 => '/(?i)\\]/',
|
||||
3 => '/(?i)\\}/',
|
||||
4 => '/(?i)\\)/',
|
||||
5 => '/(?i)\'/',
|
||||
6 => '/(?i)"/',
|
||||
);
|
||||
$this->_states = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => 2,
|
||||
5 => 3,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 5,
|
||||
1 => 6,
|
||||
2 => -1,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => -1,
|
||||
3 => 3,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
);
|
||||
$this->_keywords = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'propertyValue' => '/^((?i)far-left|left|center-left|center-right|center|far-right|right-side|right|behind|leftwards|rightwards|inherit|scroll|fixed|transparent|none|repeat-x|repeat-y|repeat|no-repeat|collapse|separate|auto|top|bottom|both|open-quote|close-quote|no-open-quote|no-close-quote|crosshair|default|pointer|move|e-resize|ne-resize|nw-resize|n-resize|se-resize|sw-resize|s-resize|text|wait|help|ltr|rtl|inline|block|list-item|run-in|compact|marker|table|inline-table|table-row-group|table-header-group|table-footer-group|table-row|table-column-group|table-column|table-cell|table-caption|below|level|above|higher|lower|show|hide|caption|icon|menu|message-box|small-caption|status-bar|normal|wider|narrower|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|italic|oblique|small-caps|bold|bolder|lighter|inside|outside|disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman|lower-greek|lower-alpha|lower-latin|upper-alpha|upper-latin|hebrew|armenian|georgian|cjk-ideographic|hiragana|katakana|hiragana-iroha|katakana-iroha|crop|cross|invert|visible|hidden|always|avoid|x-low|low|medium|high|x-high|mix?|repeat?|static|relative|absolute|portrait|landscape|spell-out|once|digits|continuous|code|x-slow|slow|fast|x-fast|faster|slower|justify|underline|overline|line-through|blink|capitalize|uppercase|lowercase|embed|bidi-override|baseline|sub|super|text-top|middle|text-bottom|silent|x-soft|soft|loud|x-loud|pre|nowrap|serif|sans-serif|cursive|fantasy|monospace|empty|string|strict|loose|char|true|false|dotted|dashed|solid|double|groove|ridge|inset|outset|larger|smaller|xx-small|x-small|small|large|x-large|xx-large|all|newspaper|distribute|distribute-all-lines|distribute-center-last|inter-word|inter-ideograph|inter-cluster|kashida|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|keep-all|break-all|break-word|lr-tb|tb-rl|thin|thick|inline-block|w-resize|hand|distribute-letter|distribute-space|whitespace|male|female|child)$/',
|
||||
'namedcolor' => '/^((?i)aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow|activeborder|activecaption|appworkspace|background|buttonface|buttonhighlight|buttonshadow|buttontext|captiontext|graytext|highlight|highlighttext|inactiveborder|inactivecaption|inactivecaptiontext|infobackground|infotext|menu|menutext|scrollbar|threeddarkshadow|threedface|threedhighlight|threedlightshadow|threedshadow|window|windowframe|windowtext)$/',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 => -1,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
);
|
||||
$this->_parts = array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
1 => 'string',
|
||||
),
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
);
|
||||
$this->_subst = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
);
|
||||
$this->_conditions = array (
|
||||
);
|
||||
$this->_kwmap = array (
|
||||
'propertyValue' => 'string',
|
||||
'namedcolor' => 'var',
|
||||
);
|
||||
$this->_defClass = 'code';
|
||||
$this->_checkDefines();
|
||||
}
|
||||
|
||||
}
|
||||
366
framework/vendors/TextHighlighter/Text/Highlighter/DIFF.php
vendored
Normal file
366
framework/vendors/TextHighlighter/Text/Highlighter/DIFF.php
vendored
Normal file
@@ -0,0 +1,366 @@
|
||||
<?php
|
||||
/**
|
||||
* Auto-generated class. DIFF syntax highlighting
|
||||
*
|
||||
* PHP version 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @version generated from: : diff.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Auto-generated class. DIFF syntax highlighting
|
||||
*
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
class Text_Highlighter_DIFF extends Text_Highlighter
|
||||
{
|
||||
var $_language = 'diff';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $options
|
||||
* @access public
|
||||
*/
|
||||
function __construct($options=array())
|
||||
{
|
||||
|
||||
$this->_options = $options;
|
||||
$this->_regs = array (
|
||||
-1 => '/((?m)^\\\\\\sNo\\snewline.+$)|((?m)^\\-\\-\\-$)|((?m)^(diff\\s+\\-|Only\\s+|Index).*$)|((?m)^(\\-\\-\\-|\\+\\+\\+)\\s.+$)|((?m)^\\*.*$)|((?m)^\\+.*$)|((?m)^!.*$)|((?m)^\\<\\s.*$)|((?m)^\\>\\s.*$)|((?m)^\\d+(\\,\\d+)?[acd]\\d+(,\\d+)?$)|((?m)^\\-.*$)|((?m)^\\+.*$)|((?m)^@@.+@@$)|((?m)^d\\d+\\s\\d+$)|((?m)^a\\d+\\s\\d+$)|((?m)^(\\d+)(,\\d+)?(a)$)|((?m)^(\\d+)(,\\d+)?(c)$)|((?m)^(\\d+)(,\\d+)?(d)$)|((?m)^a(\\d+)(\\s\\d+)?$)|((?m)^c(\\d+)(\\s\\d+)?$)|((?m)^d(\\d+)(\\s\\d+)?$)/',
|
||||
0 => '//',
|
||||
1 => '//',
|
||||
2 => '//',
|
||||
3 => '//',
|
||||
4 => '//',
|
||||
);
|
||||
$this->_counts = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 1,
|
||||
3 => 1,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 0,
|
||||
9 => 2,
|
||||
10 => 0,
|
||||
11 => 0,
|
||||
12 => 0,
|
||||
13 => 0,
|
||||
14 => 0,
|
||||
15 => 3,
|
||||
16 => 3,
|
||||
17 => 3,
|
||||
18 => 2,
|
||||
19 => 2,
|
||||
20 => 2,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
);
|
||||
$this->_delim = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => '',
|
||||
1 => '',
|
||||
2 => '',
|
||||
3 => '',
|
||||
4 => '',
|
||||
5 => '',
|
||||
6 => '',
|
||||
7 => '',
|
||||
8 => '',
|
||||
9 => '',
|
||||
10 => '',
|
||||
11 => '',
|
||||
12 => '',
|
||||
13 => '',
|
||||
14 => 'code',
|
||||
15 => 'code',
|
||||
16 => 'code',
|
||||
17 => '',
|
||||
18 => 'code',
|
||||
19 => 'code',
|
||||
20 => '',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
);
|
||||
$this->_inner = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
1 => 'code',
|
||||
2 => 'var',
|
||||
3 => 'reserved',
|
||||
4 => 'quotes',
|
||||
5 => 'string',
|
||||
6 => 'inlinedoc',
|
||||
7 => 'quotes',
|
||||
8 => 'string',
|
||||
9 => 'code',
|
||||
10 => 'quotes',
|
||||
11 => 'string',
|
||||
12 => 'code',
|
||||
13 => 'code',
|
||||
14 => 'var',
|
||||
15 => 'string',
|
||||
16 => 'inlinedoc',
|
||||
17 => 'code',
|
||||
18 => 'string',
|
||||
19 => 'inlinedoc',
|
||||
20 => 'code',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
);
|
||||
$this->_end = array (
|
||||
0 => '/(?m)(?=^[ad]\\d+\\s\\d+)/',
|
||||
1 => '/(?m)^(\\.)$/',
|
||||
2 => '/(?m)^(\\.)$/',
|
||||
3 => '/(?m)^(\\.)$/',
|
||||
4 => '/(?m)^(\\.)$/',
|
||||
);
|
||||
$this->_states = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
9 => -1,
|
||||
10 => -1,
|
||||
11 => -1,
|
||||
12 => -1,
|
||||
13 => -1,
|
||||
14 => 0,
|
||||
15 => 1,
|
||||
16 => 2,
|
||||
17 => -1,
|
||||
18 => 3,
|
||||
19 => 4,
|
||||
20 => -1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
);
|
||||
$this->_keywords = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
),
|
||||
13 =>
|
||||
array (
|
||||
),
|
||||
14 => -1,
|
||||
15 => -1,
|
||||
16 => -1,
|
||||
17 =>
|
||||
array (
|
||||
),
|
||||
18 => -1,
|
||||
19 => -1,
|
||||
20 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
);
|
||||
$this->_parts = array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
);
|
||||
$this->_subst = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
10 => false,
|
||||
11 => false,
|
||||
12 => false,
|
||||
13 => false,
|
||||
14 => false,
|
||||
15 => false,
|
||||
16 => false,
|
||||
17 => false,
|
||||
18 => false,
|
||||
19 => false,
|
||||
20 => false,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
);
|
||||
$this->_conditions = array (
|
||||
);
|
||||
$this->_kwmap = array (
|
||||
);
|
||||
$this->_defClass = 'default';
|
||||
$this->_checkDefines();
|
||||
}
|
||||
|
||||
}
|
||||
408
framework/vendors/TextHighlighter/Text/Highlighter/DTD.php
vendored
Normal file
408
framework/vendors/TextHighlighter/Text/Highlighter/DTD.php
vendored
Normal file
@@ -0,0 +1,408 @@
|
||||
<?php
|
||||
/**
|
||||
* Auto-generated class. DTD syntax highlighting
|
||||
*
|
||||
* PHP version 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @version generated from: : dtd.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Auto-generated class. DTD syntax highlighting
|
||||
*
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
class Text_Highlighter_DTD extends Text_Highlighter
|
||||
{
|
||||
var $_language = 'dtd';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $options
|
||||
* @access public
|
||||
*/
|
||||
function __construct($options=array())
|
||||
{
|
||||
|
||||
$this->_options = $options;
|
||||
$this->_regs = array (
|
||||
-1 => '/(\\<!--)|(\\<\\!\\[)|((\\&|\\%)[\\w\\-\\.]+;)/',
|
||||
0 => '//',
|
||||
1 => '/(\\<!--)|(\\<)|(#PCDATA\\b)|((\\&|\\%)[\\w\\-\\.]+;)|((?i)[a-z][a-z\\d\\-\\,:]+)/',
|
||||
2 => '/(\\<!--)|(\\()|(\')|(")|((?<=\\<)!(ENTITY|ATTLIST|ELEMENT|NOTATION)\\b)|(\\s(#(IMPLIED|REQUIRED|FIXED))|CDATA|ENTITY|NOTATION|NMTOKENS?|PUBLIC|SYSTEM\\b)|(#PCDATA\\b)|((\\&|\\%)[\\w\\-\\.]+;)|((?i)[a-z][a-z\\d\\-\\,:]+)/',
|
||||
3 => '/(\\()|((\\&|\\%)[\\w\\-\\.]+;)|((?i)[a-z][a-z\\d\\-\\,:]+)/',
|
||||
4 => '/((\\&|\\%)[\\w\\-\\.]+;)/',
|
||||
5 => '/((\\&|\\%)[\\w\\-\\.]+;)/',
|
||||
);
|
||||
$this->_counts = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 1,
|
||||
4 => 0,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 1,
|
||||
5 => 2,
|
||||
6 => 0,
|
||||
7 => 1,
|
||||
8 => 0,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 0,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 1,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 1,
|
||||
),
|
||||
);
|
||||
$this->_delim = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'brackets',
|
||||
2 => '',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'brackets',
|
||||
2 => '',
|
||||
3 => '',
|
||||
4 => '',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'brackets',
|
||||
2 => 'quotes',
|
||||
3 => 'quotes',
|
||||
4 => '',
|
||||
5 => '',
|
||||
6 => '',
|
||||
7 => '',
|
||||
8 => '',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 'brackets',
|
||||
1 => '',
|
||||
2 => '',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
);
|
||||
$this->_inner = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'code',
|
||||
2 => 'special',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'code',
|
||||
2 => 'reserved',
|
||||
3 => 'special',
|
||||
4 => 'identifier',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'code',
|
||||
2 => 'string',
|
||||
3 => 'string',
|
||||
4 => 'var',
|
||||
5 => 'reserved',
|
||||
6 => 'reserved',
|
||||
7 => 'special',
|
||||
8 => 'identifier',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 'code',
|
||||
1 => 'special',
|
||||
2 => 'identifier',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
);
|
||||
$this->_end = array (
|
||||
0 => '/--\\>/',
|
||||
1 => '/\\]\\]\\>/',
|
||||
2 => '/\\>/',
|
||||
3 => '/\\)/',
|
||||
4 => '/\'/',
|
||||
5 => '/"/',
|
||||
);
|
||||
$this->_states = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => -1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 2,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 3,
|
||||
2 => 4,
|
||||
3 => 5,
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 3,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
);
|
||||
$this->_keywords = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
);
|
||||
$this->_parts = array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
);
|
||||
$this->_subst = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
);
|
||||
$this->_conditions = array (
|
||||
);
|
||||
$this->_kwmap = array (
|
||||
);
|
||||
$this->_defClass = 'code';
|
||||
$this->_checkDefines();
|
||||
}
|
||||
|
||||
}
|
||||
1254
framework/vendors/TextHighlighter/Text/Highlighter/Generator.php
vendored
Normal file
1254
framework/vendors/TextHighlighter/Text/Highlighter/Generator.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
220
framework/vendors/TextHighlighter/Text/Highlighter/HTML.php
vendored
Normal file
220
framework/vendors/TextHighlighter/Text/Highlighter/HTML.php
vendored
Normal file
@@ -0,0 +1,220 @@
|
||||
<?php
|
||||
/**
|
||||
* Auto-generated class. HTML syntax highlighting
|
||||
*
|
||||
* PHP version 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @version generated from: : html.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
/**
|
||||
* Auto-generated class. HTML syntax highlighting
|
||||
*
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
class Text_Highlighter_HTML extends Text_Highlighter
|
||||
{
|
||||
var $_language = 'html';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $options
|
||||
* @access public
|
||||
*/
|
||||
function __construct($options=array())
|
||||
{
|
||||
|
||||
$this->_options = $options;
|
||||
$this->_regs = array (
|
||||
-1 => '/((?i)\\<!--)|((?i)\\<[\\?\\/]?)|((?i)(&)[\\w\\-\\.]+;)/',
|
||||
0 => '//',
|
||||
1 => '/((?i)(?<=[\\<\\/?])[\\w\\-\\:]+)|((?i)[\\w\\-\\:]+)|((?i)")/',
|
||||
2 => '/((?i)(&)[\\w\\-\\.]+;)/',
|
||||
);
|
||||
$this->_counts = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 1,
|
||||
),
|
||||
);
|
||||
$this->_delim = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'brackets',
|
||||
2 => '',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => '',
|
||||
1 => '',
|
||||
2 => 'quotes',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
);
|
||||
$this->_inner = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'code',
|
||||
2 => 'special',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 'reserved',
|
||||
1 => 'var',
|
||||
2 => 'string',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
);
|
||||
$this->_end = array (
|
||||
0 => '/(?i)--\\>/',
|
||||
1 => '/(?i)[\\/\\?]?\\>/',
|
||||
2 => '/(?i)"/',
|
||||
);
|
||||
$this->_states = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => -1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => 2,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
);
|
||||
$this->_keywords = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 => -1,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
);
|
||||
$this->_parts = array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
);
|
||||
$this->_subst = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
);
|
||||
$this->_conditions = array (
|
||||
);
|
||||
$this->_kwmap = array (
|
||||
);
|
||||
$this->_defClass = 'code';
|
||||
$this->_checkDefines();
|
||||
}
|
||||
|
||||
}
|
||||
784
framework/vendors/TextHighlighter/Text/Highlighter/JAVA.php
vendored
Normal file
784
framework/vendors/TextHighlighter/Text/Highlighter/JAVA.php
vendored
Normal file
File diff suppressed because one or more lines are too long
613
framework/vendors/TextHighlighter/Text/Highlighter/JAVASCRIPT.php
vendored
Normal file
613
framework/vendors/TextHighlighter/Text/Highlighter/JAVASCRIPT.php
vendored
Normal file
@@ -0,0 +1,613 @@
|
||||
<?php
|
||||
/**
|
||||
* Auto-generated class. JAVASCRIPT syntax highlighting
|
||||
*
|
||||
* PHP version 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @version generated from: : javascript.xml,v 1.3 2008/01/01 23:43:36 ssttoo Exp
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Auto-generated class. JAVASCRIPT syntax highlighting
|
||||
*
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
class Text_Highlighter_JAVASCRIPT extends Text_Highlighter
|
||||
{
|
||||
var $_language = 'javascript';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $options
|
||||
* @access public
|
||||
*/
|
||||
function __construct($options=array())
|
||||
{
|
||||
|
||||
$this->_options = $options;
|
||||
$this->_regs = array (
|
||||
-1 => '/((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)\\/\\*)|((?i)")|((?i)\')|((?i)\\/\\/)|((?i)[a-z_]\\w*)|((?i)0x\\d*|\\d*\\.?\\d+)/',
|
||||
0 => '/((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)\\/\\*)|((?i)")|((?i)\')|((?i)\\/\\/)|((?i)[a-z_]\\w*)|((?i)0x\\d*|\\d*\\.?\\d+)/',
|
||||
1 => '/((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)\\/\\*)|((?i)")|((?i)\')|((?i)\\/\\/)|((?i)[a-z_]\\w*)|((?i)0x\\d*|\\d*\\.?\\d+)/',
|
||||
2 => '/((?i)\\{)|((?i)\\()|((?i)\\[)|((?i)\\/\\*)|((?i)")|((?i)\')|((?i)\\/\\/)|((?i)[a-z_]\\w*)|((?i)0x\\d*|\\d*\\.?\\d+)/',
|
||||
3 => '/((?i)((https?|ftp):\\/\\/[\\w\\?\\.\\-\\&=\\/%+]+)|(^|[\\s,!?])www\\.\\w+\\.\\w+[\\w\\?\\.\\&=\\/%+]*)|((?i)\\w+[\\.\\w\\-]+@(\\w+[\\.\\w\\-])+)|((?i)\\b(note|fixme):)|((?i)\\$\\w+:.+\\$)/',
|
||||
4 => '/((?i)\\\\\\\\|\\\\"|\\\\\'|\\\\`|\\\\t|\\\\n|\\\\r)/',
|
||||
5 => '/((?i)\\\\\\\\|\\\\"|\\\\\'|\\\\`)/',
|
||||
6 => '/((?i)((https?|ftp):\\/\\/[\\w\\?\\.\\-\\&=\\/%+]+)|(^|[\\s,!?])www\\.\\w+\\.\\w+[\\w\\?\\.\\&=\\/%+]*)|((?i)\\w+[\\.\\w\\-]+@(\\w+[\\.\\w\\-])+)|((?i)\\b(note|fixme):)|((?i)\\$\\w+:.+\\$)/',
|
||||
);
|
||||
$this->_counts = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 0,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 0,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 0,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 0,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 3,
|
||||
1 => 1,
|
||||
2 => 1,
|
||||
3 => 0,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => 3,
|
||||
1 => 1,
|
||||
2 => 1,
|
||||
3 => 0,
|
||||
),
|
||||
);
|
||||
$this->_delim = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'brackets',
|
||||
1 => 'brackets',
|
||||
2 => 'brackets',
|
||||
3 => 'comment',
|
||||
4 => 'quotes',
|
||||
5 => 'quotes',
|
||||
6 => 'comment',
|
||||
7 => '',
|
||||
8 => '',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 'brackets',
|
||||
1 => 'brackets',
|
||||
2 => 'brackets',
|
||||
3 => 'comment',
|
||||
4 => 'quotes',
|
||||
5 => 'quotes',
|
||||
6 => 'comment',
|
||||
7 => '',
|
||||
8 => '',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 'brackets',
|
||||
1 => 'brackets',
|
||||
2 => 'brackets',
|
||||
3 => 'comment',
|
||||
4 => 'quotes',
|
||||
5 => 'quotes',
|
||||
6 => 'comment',
|
||||
7 => '',
|
||||
8 => '',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'brackets',
|
||||
1 => 'brackets',
|
||||
2 => 'brackets',
|
||||
3 => 'comment',
|
||||
4 => 'quotes',
|
||||
5 => 'quotes',
|
||||
6 => 'comment',
|
||||
7 => '',
|
||||
8 => '',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => '',
|
||||
1 => '',
|
||||
2 => '',
|
||||
3 => '',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => '',
|
||||
1 => '',
|
||||
2 => '',
|
||||
3 => '',
|
||||
),
|
||||
);
|
||||
$this->_inner = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'code',
|
||||
1 => 'code',
|
||||
2 => 'code',
|
||||
3 => 'comment',
|
||||
4 => 'string',
|
||||
5 => 'string',
|
||||
6 => 'comment',
|
||||
7 => 'identifier',
|
||||
8 => 'number',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 'code',
|
||||
1 => 'code',
|
||||
2 => 'code',
|
||||
3 => 'comment',
|
||||
4 => 'string',
|
||||
5 => 'string',
|
||||
6 => 'comment',
|
||||
7 => 'identifier',
|
||||
8 => 'number',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 'code',
|
||||
1 => 'code',
|
||||
2 => 'code',
|
||||
3 => 'comment',
|
||||
4 => 'string',
|
||||
5 => 'string',
|
||||
6 => 'comment',
|
||||
7 => 'identifier',
|
||||
8 => 'number',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'code',
|
||||
1 => 'code',
|
||||
2 => 'code',
|
||||
3 => 'comment',
|
||||
4 => 'string',
|
||||
5 => 'string',
|
||||
6 => 'comment',
|
||||
7 => 'identifier',
|
||||
8 => 'number',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 'url',
|
||||
1 => 'url',
|
||||
2 => 'inlinedoc',
|
||||
3 => 'inlinedoc',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => 'url',
|
||||
1 => 'url',
|
||||
2 => 'inlinedoc',
|
||||
3 => 'inlinedoc',
|
||||
),
|
||||
);
|
||||
$this->_end = array (
|
||||
0 => '/(?i)\\}/',
|
||||
1 => '/(?i)\\)/',
|
||||
2 => '/(?i)\\]/',
|
||||
3 => '/(?i)\\*\\//',
|
||||
4 => '/(?i)"/',
|
||||
5 => '/(?i)\'/',
|
||||
6 => '/(?mi)$/',
|
||||
);
|
||||
$this->_states = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => 5,
|
||||
6 => 6,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => 5,
|
||||
6 => 6,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => 5,
|
||||
6 => 6,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => 5,
|
||||
6 => 6,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
),
|
||||
);
|
||||
$this->_keywords = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 =>
|
||||
array (
|
||||
'builtin' => '/^(String|Array|RegExp|Function|Math|Number|Date|Image|window|document|navigator|onAbort|onBlur|onChange|onClick|onDblClick|onDragDrop|onError|onFocus|onKeyDown|onKeyPress|onKeyUp|onLoad|onMouseDown|onMouseOver|onMouseOut|onMouseMove|onMouseUp|onMove|onReset|onResize|onSelect|onSubmit|onUnload)$/',
|
||||
'reserved' => '/^(break|continue|do|while|export|for|in|if|else|import|return|label|switch|case|var|with|delete|new|this|typeof|void|abstract|boolean|byte|catch|char|class|const|debugger|default|double|enum|extends|false|final|finally|float|function|implements|goto|instanceof|int|interface|long|native|null|package|private|protected|public|short|static|super|synchronized|throw|throws|transient|true|try|volatile)$/',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 =>
|
||||
array (
|
||||
'builtin' => '/^(String|Array|RegExp|Function|Math|Number|Date|Image|window|document|navigator|onAbort|onBlur|onChange|onClick|onDblClick|onDragDrop|onError|onFocus|onKeyDown|onKeyPress|onKeyUp|onLoad|onMouseDown|onMouseOver|onMouseOut|onMouseMove|onMouseUp|onMove|onReset|onResize|onSelect|onSubmit|onUnload)$/',
|
||||
'reserved' => '/^(break|continue|do|while|export|for|in|if|else|import|return|label|switch|case|var|with|delete|new|this|typeof|void|abstract|boolean|byte|catch|char|class|const|debugger|default|double|enum|extends|false|final|finally|float|function|implements|goto|instanceof|int|interface|long|native|null|package|private|protected|public|short|static|super|synchronized|throw|throws|transient|true|try|volatile)$/',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 =>
|
||||
array (
|
||||
'builtin' => '/^(String|Array|RegExp|Function|Math|Number|Date|Image|window|document|navigator|onAbort|onBlur|onChange|onClick|onDblClick|onDragDrop|onError|onFocus|onKeyDown|onKeyPress|onKeyUp|onLoad|onMouseDown|onMouseOver|onMouseOut|onMouseMove|onMouseUp|onMove|onReset|onResize|onSelect|onSubmit|onUnload)$/',
|
||||
'reserved' => '/^(break|continue|do|while|export|for|in|if|else|import|return|label|switch|case|var|with|delete|new|this|typeof|void|abstract|boolean|byte|catch|char|class|const|debugger|default|double|enum|extends|false|final|finally|float|function|implements|goto|instanceof|int|interface|long|native|null|package|private|protected|public|short|static|super|synchronized|throw|throws|transient|true|try|volatile)$/',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 =>
|
||||
array (
|
||||
'builtin' => '/^(String|Array|RegExp|Function|Math|Number|Date|Image|window|document|navigator|onAbort|onBlur|onChange|onClick|onDblClick|onDragDrop|onError|onFocus|onKeyDown|onKeyPress|onKeyUp|onLoad|onMouseDown|onMouseOver|onMouseOut|onMouseMove|onMouseUp|onMove|onReset|onResize|onSelect|onSubmit|onUnload)$/',
|
||||
'reserved' => '/^(break|continue|do|while|export|for|in|if|else|import|return|label|switch|case|var|with|delete|new|this|typeof|void|abstract|boolean|byte|catch|char|class|const|debugger|default|double|enum|extends|false|final|finally|float|function|implements|goto|instanceof|int|interface|long|native|null|package|private|protected|public|short|static|super|synchronized|throw|throws|transient|true|try|volatile)$/',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
);
|
||||
$this->_parts = array (
|
||||
0 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
),
|
||||
);
|
||||
$this->_subst = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
),
|
||||
);
|
||||
$this->_conditions = array (
|
||||
);
|
||||
$this->_kwmap = array (
|
||||
'builtin' => 'builtin',
|
||||
'reserved' => 'reserved',
|
||||
);
|
||||
$this->_defClass = 'code';
|
||||
$this->_checkDefines();
|
||||
}
|
||||
|
||||
}
|
||||
416
framework/vendors/TextHighlighter/Text/Highlighter/MYSQL.php
vendored
Normal file
416
framework/vendors/TextHighlighter/Text/Highlighter/MYSQL.php
vendored
Normal file
@@ -0,0 +1,416 @@
|
||||
<?php
|
||||
/**
|
||||
* Auto-generated class. MYSQL syntax highlighting
|
||||
*
|
||||
* PHP version 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @version generated from: : mysql.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Auto-generated class. MYSQL syntax highlighting
|
||||
*
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
class Text_Highlighter_MYSQL extends Text_Highlighter
|
||||
{
|
||||
var $_language = 'mysql';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $options
|
||||
* @access public
|
||||
*/
|
||||
function __construct($options=array())
|
||||
{
|
||||
|
||||
$this->_options = $options;
|
||||
$this->_regs = array (
|
||||
-1 => '/((?i)`)|((?i)\\/\\*)|((?i)(#|--\\s).*)|((?i)[a-z_]\\w*(?=\\s*\\())|((?i)[a-z_]\\w*)|((?i)")|((?i)\\()|((?i)\')|((?i)((\\d+|((\\d*\\.\\d+)|(\\d+\\.\\d*)))[eE][+-]?\\d+))|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)\\d+l?|\\b0l?\\b)|((?i)0[xX][\\da-f]+l?)/',
|
||||
0 => '//',
|
||||
1 => '//',
|
||||
2 => '/((?i)\\\\.)/',
|
||||
3 => '/((?i)`)|((?i)\\/\\*)|((?i)(#|--\\s).*)|((?i)[a-z_]\\w*(?=\\s*\\())|((?i)[a-z_]\\w*)|((?i)")|((?i)\\()|((?i)\')|((?i)((\\d+|((\\d*\\.\\d+)|(\\d+\\.\\d*)))[eE][+-]?\\d+))|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)\\d+l?|\\b0l?\\b)|((?i)0[xX][\\da-f]+l?)/',
|
||||
4 => '/((?i)\\\\.)/',
|
||||
);
|
||||
$this->_counts = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 1,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 5,
|
||||
9 => 2,
|
||||
10 => 0,
|
||||
11 => 0,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 1,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 5,
|
||||
9 => 2,
|
||||
10 => 0,
|
||||
11 => 0,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
);
|
||||
$this->_delim = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'quotes',
|
||||
1 => 'comment',
|
||||
2 => '',
|
||||
3 => '',
|
||||
4 => '',
|
||||
5 => 'quotes',
|
||||
6 => 'brackets',
|
||||
7 => 'quotes',
|
||||
8 => '',
|
||||
9 => '',
|
||||
10 => '',
|
||||
11 => '',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 'quotes',
|
||||
1 => 'comment',
|
||||
2 => '',
|
||||
3 => '',
|
||||
4 => '',
|
||||
5 => 'quotes',
|
||||
6 => 'brackets',
|
||||
7 => 'quotes',
|
||||
8 => '',
|
||||
9 => '',
|
||||
10 => '',
|
||||
11 => '',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
);
|
||||
$this->_inner = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'identifier',
|
||||
1 => 'comment',
|
||||
2 => 'comment',
|
||||
3 => 'identifier',
|
||||
4 => 'identifier',
|
||||
5 => 'string',
|
||||
6 => 'code',
|
||||
7 => 'string',
|
||||
8 => 'number',
|
||||
9 => 'number',
|
||||
10 => 'number',
|
||||
11 => 'number',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 'identifier',
|
||||
1 => 'comment',
|
||||
2 => 'comment',
|
||||
3 => 'identifier',
|
||||
4 => 'identifier',
|
||||
5 => 'string',
|
||||
6 => 'code',
|
||||
7 => 'string',
|
||||
8 => 'number',
|
||||
9 => 'number',
|
||||
10 => 'number',
|
||||
11 => 'number',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
);
|
||||
$this->_end = array (
|
||||
0 => '/(?i)`/',
|
||||
1 => '/(?i)\\*\\//',
|
||||
2 => '/(?i)"/',
|
||||
3 => '/(?i)\\)/',
|
||||
4 => '/(?i)\'/',
|
||||
);
|
||||
$this->_states = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 => 2,
|
||||
6 => 3,
|
||||
7 => 4,
|
||||
8 => -1,
|
||||
9 => -1,
|
||||
10 => -1,
|
||||
11 => -1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 => 2,
|
||||
6 => 3,
|
||||
7 => 4,
|
||||
8 => -1,
|
||||
9 => -1,
|
||||
10 => -1,
|
||||
11 => -1,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
);
|
||||
$this->_keywords = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'function' => '/^((?i)abs|acos|adddate|ascii|asin|atan|atan2|avg|benchmark|bin|ceiling|char|coalesce|concat|conv|cos|cot|count|curdate|curtime|database|dayname|dayofmonth|dayofweek|dayofyear|decode|degrees|elt|encode|encrypt|exp|extract|field|floor|format|greatest|hex|hour|if|ifnull|insert|instr|interval|isnull|lcase|least|left|length|locate|log|log10|lower|lpad|ltrim|max|md5|mid|min|minute|mod|month|monthname|now|nullif|oct|ord|password|pi|position|pow|power|prepare|quarter|radians|rand|repeat|replace|reverse|right|round|rpad|rtrim|second|sign|sin|soundex|space|sqrt|std|stddev|strcmp|subdate|substring|sum|sysdate|tan|trim|truncate|ucase|upper|user|version|week|weekday|year)$/',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'reserved' => '/^((?i)action|add|aggregate|all|alter|after|and|as|asc|avg|avg_row_length|auto_increment|between|bigint|bit|binary|blob|bool|both|by|cascade|case|char|character|change|check|checksum|column|columns|comment|constraint|create|cross|current_date|current_time|current_timestamp|data|database|databases|date|datetime|day|day_hour|day_minute|day_second|dayofmonth|dayofweek|dayofyear|dec|decimal|default|delayed|delay_key_write|delete|desc|describe|distinct|distinctrow|double|drop|end|else|escape|escaped|enclosed|enum|explain|exists|fields|file|first|float|float4|float8|flush|foreign|from|for|full|function|global|grant|grants|group|having|heap|high_priority|hour|hour_minute|hour_second|hosts|identified|ignore|in|index|infile|inner|insert|insert_id|int|integer|interval|int1|int2|int3|int4|int8|into|if|is|isam|join|key|keys|kill|last_insert_id|leading|left|length|like|lines|limit|load|local|lock|logs|long|longblob|longtext|low_priority|max|max_rows|match|mediumblob|mediumtext|mediumint|middleint|min_rows|minute|minute_second|modify|month|monthname|myisam|natural|numeric|no|not|null|on|optimize|option|optionally|or|order|outer|outfile|pack_keys|partial|password|precision|primary|procedure|process|processlist|privileges|read|real|references|reload|regexp|rename|replace|restrict|returns|revoke|rlike|row|rows|second|select|set|show|shutdown|smallint|soname|sql_big_tables|sql_big_selects|sql_low_priority_updates|sql_log_off|sql_log_update|sql_select_limit|sql_small_result|sql_big_result|sql_warnings|straight_join|starting|status|string|table|tables|temporary|terminated|text|then|time|timestamp|tinyblob|tinytext|tinyint|trailing|to|type|use|using|unique|unlock|unsigned|update|usage|values|varchar|variables|varying|varbinary|with|write|when|where|year|year_month|zerofill)$/',
|
||||
),
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 => -1,
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'function' => '/^((?i)abs|acos|adddate|ascii|asin|atan|atan2|avg|benchmark|bin|ceiling|char|coalesce|concat|conv|cos|cot|count|curdate|curtime|database|dayname|dayofmonth|dayofweek|dayofyear|decode|degrees|elt|encode|encrypt|exp|extract|field|floor|format|greatest|hex|hour|if|ifnull|insert|instr|interval|isnull|lcase|least|left|length|locate|log|log10|lower|lpad|ltrim|max|md5|mid|min|minute|mod|month|monthname|now|nullif|oct|ord|password|pi|position|pow|power|prepare|quarter|radians|rand|repeat|replace|reverse|right|round|rpad|rtrim|second|sign|sin|soundex|space|sqrt|std|stddev|strcmp|subdate|substring|sum|sysdate|tan|trim|truncate|ucase|upper|user|version|week|weekday|year)$/',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'reserved' => '/^((?i)action|add|aggregate|all|alter|after|and|as|asc|avg|avg_row_length|auto_increment|between|bigint|bit|binary|blob|bool|both|by|cascade|case|char|character|change|check|checksum|column|columns|comment|constraint|create|cross|current_date|current_time|current_timestamp|data|database|databases|date|datetime|day|day_hour|day_minute|day_second|dayofmonth|dayofweek|dayofyear|dec|decimal|default|delayed|delay_key_write|delete|desc|describe|distinct|distinctrow|double|drop|end|else|escape|escaped|enclosed|enum|explain|exists|fields|file|first|float|float4|float8|flush|foreign|from|for|full|function|global|grant|grants|group|having|heap|high_priority|hour|hour_minute|hour_second|hosts|identified|ignore|in|index|infile|inner|insert|insert_id|int|integer|interval|int1|int2|int3|int4|int8|into|if|is|isam|join|key|keys|kill|last_insert_id|leading|left|length|like|lines|limit|load|local|lock|logs|long|longblob|longtext|low_priority|max|max_rows|match|mediumblob|mediumtext|mediumint|middleint|min_rows|minute|minute_second|modify|month|monthname|myisam|natural|numeric|no|not|null|on|optimize|option|optionally|or|order|outer|outfile|pack_keys|partial|password|precision|primary|procedure|process|processlist|privileges|read|real|references|reload|regexp|rename|replace|restrict|returns|revoke|rlike|row|rows|second|select|set|show|shutdown|smallint|soname|sql_big_tables|sql_big_selects|sql_low_priority_updates|sql_log_off|sql_log_update|sql_select_limit|sql_small_result|sql_big_result|sql_warnings|straight_join|starting|status|string|table|tables|temporary|terminated|text|then|time|timestamp|tinyblob|tinytext|tinyint|trailing|to|type|use|using|unique|unlock|unsigned|update|usage|values|varchar|variables|varying|varbinary|with|write|when|where|year|year_month|zerofill)$/',
|
||||
),
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 => -1,
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
);
|
||||
$this->_parts = array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
9 => NULL,
|
||||
10 => NULL,
|
||||
11 => NULL,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
);
|
||||
$this->_subst = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
10 => false,
|
||||
11 => false,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
10 => false,
|
||||
11 => false,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
);
|
||||
$this->_conditions = array (
|
||||
);
|
||||
$this->_kwmap = array (
|
||||
'function' => 'reserved',
|
||||
'reserved' => 'reserved',
|
||||
);
|
||||
$this->_defClass = 'code';
|
||||
$this->_checkDefines();
|
||||
}
|
||||
|
||||
}
|
||||
1334
framework/vendors/TextHighlighter/Text/Highlighter/PERL.php
vendored
Normal file
1334
framework/vendors/TextHighlighter/Text/Highlighter/PERL.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1089
framework/vendors/TextHighlighter/Text/Highlighter/PHP.php
vendored
Normal file
1089
framework/vendors/TextHighlighter/Text/Highlighter/PHP.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
629
framework/vendors/TextHighlighter/Text/Highlighter/PYTHON.php
vendored
Normal file
629
framework/vendors/TextHighlighter/Text/Highlighter/PYTHON.php
vendored
Normal file
@@ -0,0 +1,629 @@
|
||||
<?php
|
||||
/**
|
||||
* Auto-generated class. PYTHON syntax highlighting
|
||||
*
|
||||
* PHP version 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @version generated from: : python.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Auto-generated class. PYTHON syntax highlighting
|
||||
*
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
class Text_Highlighter_PYTHON extends Text_Highlighter
|
||||
{
|
||||
var $_language = 'python';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $options
|
||||
* @access public
|
||||
*/
|
||||
function __construct($options=array())
|
||||
{
|
||||
|
||||
$this->_options = $options;
|
||||
$this->_regs = array (
|
||||
-1 => '/((?i)\'\'\')|((?i)""")|((?i)")|((?i)\')|((?i)\\()|((?i)\\[)|((?i)[a-z_]\\w*(?=\\s*\\())|((?i)[a-z_]\\w*)|((?i)((\\d+|((\\d*\\.\\d+)|(\\d+\\.\\d*)))[eE][+-]?\\d+))|((?i)((\\d*\\.\\d+)|(\\d+\\.\\d*)|(\\d+))j)|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)\\d+l?|\\b0l?\\b)|((?i)0[xX][\\da-f]+l?)|((?i)0[0-7]+l?)|((?i)#.+)/',
|
||||
0 => '/((?i)\\\\.)/',
|
||||
1 => '/((?i)\\\\.)/',
|
||||
2 => '/((?i)\\\\.)/',
|
||||
3 => '/((?i)\\\\.)/',
|
||||
4 => '/((?i)\'\'\')|((?i)""")|((?i)")|((?i)\')|((?i)\\()|((?i)\\[)|((?i)[a-z_]\\w*(?=\\s*\\())|((?i)[a-z_]\\w*)|((?i)((\\d+|((\\d*\\.\\d+)|(\\d+\\.\\d*)))[eE][+-]?\\d+))|((?i)((\\d*\\.\\d+)|(\\d+\\.\\d*)|(\\d+))j)|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)\\d+l?|\\b0l?\\b)|((?i)0[xX][\\da-f]+l?)|((?i)0[0-7]+l?)|((?i)#.+)/',
|
||||
5 => '/((?i)\'\'\')|((?i)""")|((?i)")|((?i)\')|((?i)\\()|((?i)\\[)|((?i)[a-z_]\\w*(?=\\s*\\())|((?i)[a-z_]\\w*)|((?i)((\\d+|((\\d*\\.\\d+)|(\\d+\\.\\d*)))[eE][+-]?\\d+))|((?i)((\\d*\\.\\d+)|(\\d+\\.\\d*)|(\\d+))j)|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)\\d+l?|\\b0l?\\b)|((?i)0[xX][\\da-f]+l?)|((?i)0[0-7]+l?)|((?i)#.+)/',
|
||||
);
|
||||
$this->_counts = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 5,
|
||||
9 => 4,
|
||||
10 => 2,
|
||||
11 => 0,
|
||||
12 => 0,
|
||||
13 => 0,
|
||||
14 => 0,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 5,
|
||||
9 => 4,
|
||||
10 => 2,
|
||||
11 => 0,
|
||||
12 => 0,
|
||||
13 => 0,
|
||||
14 => 0,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 5,
|
||||
9 => 4,
|
||||
10 => 2,
|
||||
11 => 0,
|
||||
12 => 0,
|
||||
13 => 0,
|
||||
14 => 0,
|
||||
),
|
||||
);
|
||||
$this->_delim = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'quotes',
|
||||
1 => 'quotes',
|
||||
2 => 'quotes',
|
||||
3 => 'quotes',
|
||||
4 => 'brackets',
|
||||
5 => 'brackets',
|
||||
6 => '',
|
||||
7 => '',
|
||||
8 => '',
|
||||
9 => '',
|
||||
10 => '',
|
||||
11 => '',
|
||||
12 => '',
|
||||
13 => '',
|
||||
14 => '',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 'quotes',
|
||||
1 => 'quotes',
|
||||
2 => 'quotes',
|
||||
3 => 'quotes',
|
||||
4 => 'brackets',
|
||||
5 => 'brackets',
|
||||
6 => '',
|
||||
7 => '',
|
||||
8 => '',
|
||||
9 => '',
|
||||
10 => '',
|
||||
11 => '',
|
||||
12 => '',
|
||||
13 => '',
|
||||
14 => '',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 'quotes',
|
||||
1 => 'quotes',
|
||||
2 => 'quotes',
|
||||
3 => 'quotes',
|
||||
4 => 'brackets',
|
||||
5 => 'brackets',
|
||||
6 => '',
|
||||
7 => '',
|
||||
8 => '',
|
||||
9 => '',
|
||||
10 => '',
|
||||
11 => '',
|
||||
12 => '',
|
||||
13 => '',
|
||||
14 => '',
|
||||
),
|
||||
);
|
||||
$this->_inner = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'string',
|
||||
1 => 'string',
|
||||
2 => 'string',
|
||||
3 => 'string',
|
||||
4 => 'code',
|
||||
5 => 'code',
|
||||
6 => 'identifier',
|
||||
7 => 'identifier',
|
||||
8 => 'number',
|
||||
9 => 'number',
|
||||
10 => 'number',
|
||||
11 => 'number',
|
||||
12 => 'number',
|
||||
13 => 'number',
|
||||
14 => 'comment',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 'string',
|
||||
1 => 'string',
|
||||
2 => 'string',
|
||||
3 => 'string',
|
||||
4 => 'code',
|
||||
5 => 'code',
|
||||
6 => 'identifier',
|
||||
7 => 'identifier',
|
||||
8 => 'number',
|
||||
9 => 'number',
|
||||
10 => 'number',
|
||||
11 => 'number',
|
||||
12 => 'number',
|
||||
13 => 'number',
|
||||
14 => 'comment',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 'string',
|
||||
1 => 'string',
|
||||
2 => 'string',
|
||||
3 => 'string',
|
||||
4 => 'code',
|
||||
5 => 'code',
|
||||
6 => 'identifier',
|
||||
7 => 'identifier',
|
||||
8 => 'number',
|
||||
9 => 'number',
|
||||
10 => 'number',
|
||||
11 => 'number',
|
||||
12 => 'number',
|
||||
13 => 'number',
|
||||
14 => 'comment',
|
||||
),
|
||||
);
|
||||
$this->_end = array (
|
||||
0 => '/(?i)\'\'\'/',
|
||||
1 => '/(?i)"""/',
|
||||
2 => '/(?i)"/',
|
||||
3 => '/(?i)\'/',
|
||||
4 => '/(?i)\\)/',
|
||||
5 => '/(?i)\\]/',
|
||||
);
|
||||
$this->_states = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => 5,
|
||||
6 => -1,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
9 => -1,
|
||||
10 => -1,
|
||||
11 => -1,
|
||||
12 => -1,
|
||||
13 => -1,
|
||||
14 => -1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => 5,
|
||||
6 => -1,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
9 => -1,
|
||||
10 => -1,
|
||||
11 => -1,
|
||||
12 => -1,
|
||||
13 => -1,
|
||||
14 => -1,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => 5,
|
||||
6 => -1,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
9 => -1,
|
||||
10 => -1,
|
||||
11 => -1,
|
||||
12 => -1,
|
||||
13 => -1,
|
||||
14 => -1,
|
||||
),
|
||||
);
|
||||
$this->_keywords = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
6 =>
|
||||
array (
|
||||
'builtin' => '/^(__import__|abs|apply|basestring|bool|buffer|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|min|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|round|setattr|slice|staticmethod|sum|super|str|tuple|type|unichr|unicode|vars|xrange|zip)$/',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'reserved' => '/^(and|del|for|is|raise|assert|elif|from|lambda|return|break|else|global|not|try|class|except|if|or|while|continue|exec|import|pass|yield|def|finally|in|print|False|True|None|NotImplemented|Ellipsis|Exception|SystemExit|StopIteration|StandardError|KeyboardInterrupt|ImportError|EnvironmentError|IOError|OSError|WindowsError|EOFError|RuntimeError|NotImplementedError|NameError|UnboundLocalError|AttributeError|SyntaxError|IndentationError|TabError|TypeError|AssertionError|LookupError|IndexError|KeyError|ArithmeticError|OverflowError|ZeroDivisionError|FloatingPointError|ValueError|UnicodeError|UnicodeEncodeError|UnicodeDecodeError|UnicodeTranslateError|ReferenceError|SystemError|MemoryError|Warning|UserWarning|DeprecationWarning|PendingDeprecationWarning|SyntaxWarning|OverflowWarning|RuntimeWarning|FutureWarning)$/',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
),
|
||||
13 =>
|
||||
array (
|
||||
),
|
||||
14 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
6 =>
|
||||
array (
|
||||
'builtin' => '/^(__import__|abs|apply|basestring|bool|buffer|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|min|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|round|setattr|slice|staticmethod|sum|super|str|tuple|type|unichr|unicode|vars|xrange|zip)$/',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'reserved' => '/^(and|del|for|is|raise|assert|elif|from|lambda|return|break|else|global|not|try|class|except|if|or|while|continue|exec|import|pass|yield|def|finally|in|print|False|True|None|NotImplemented|Ellipsis|Exception|SystemExit|StopIteration|StandardError|KeyboardInterrupt|ImportError|EnvironmentError|IOError|OSError|WindowsError|EOFError|RuntimeError|NotImplementedError|NameError|UnboundLocalError|AttributeError|SyntaxError|IndentationError|TabError|TypeError|AssertionError|LookupError|IndexError|KeyError|ArithmeticError|OverflowError|ZeroDivisionError|FloatingPointError|ValueError|UnicodeError|UnicodeEncodeError|UnicodeDecodeError|UnicodeTranslateError|ReferenceError|SystemError|MemoryError|Warning|UserWarning|DeprecationWarning|PendingDeprecationWarning|SyntaxWarning|OverflowWarning|RuntimeWarning|FutureWarning)$/',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
),
|
||||
13 =>
|
||||
array (
|
||||
),
|
||||
14 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
6 =>
|
||||
array (
|
||||
'builtin' => '/^(__import__|abs|apply|basestring|bool|buffer|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|min|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|round|setattr|slice|staticmethod|sum|super|str|tuple|type|unichr|unicode|vars|xrange|zip)$/',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'reserved' => '/^(and|del|for|is|raise|assert|elif|from|lambda|return|break|else|global|not|try|class|except|if|or|while|continue|exec|import|pass|yield|def|finally|in|print|False|True|None|NotImplemented|Ellipsis|Exception|SystemExit|StopIteration|StandardError|KeyboardInterrupt|ImportError|EnvironmentError|IOError|OSError|WindowsError|EOFError|RuntimeError|NotImplementedError|NameError|UnboundLocalError|AttributeError|SyntaxError|IndentationError|TabError|TypeError|AssertionError|LookupError|IndexError|KeyError|ArithmeticError|OverflowError|ZeroDivisionError|FloatingPointError|ValueError|UnicodeError|UnicodeEncodeError|UnicodeDecodeError|UnicodeTranslateError|ReferenceError|SystemError|MemoryError|Warning|UserWarning|DeprecationWarning|PendingDeprecationWarning|SyntaxWarning|OverflowWarning|RuntimeWarning|FutureWarning)$/',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
),
|
||||
13 =>
|
||||
array (
|
||||
),
|
||||
14 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
);
|
||||
$this->_parts = array (
|
||||
0 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
9 => NULL,
|
||||
10 => NULL,
|
||||
11 => NULL,
|
||||
12 => NULL,
|
||||
13 => NULL,
|
||||
14 => NULL,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
9 => NULL,
|
||||
10 => NULL,
|
||||
11 => NULL,
|
||||
12 => NULL,
|
||||
13 => NULL,
|
||||
14 => NULL,
|
||||
),
|
||||
);
|
||||
$this->_subst = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
10 => false,
|
||||
11 => false,
|
||||
12 => false,
|
||||
13 => false,
|
||||
14 => false,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
10 => false,
|
||||
11 => false,
|
||||
12 => false,
|
||||
13 => false,
|
||||
14 => false,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
10 => false,
|
||||
11 => false,
|
||||
12 => false,
|
||||
13 => false,
|
||||
14 => false,
|
||||
),
|
||||
);
|
||||
$this->_conditions = array (
|
||||
);
|
||||
$this->_kwmap = array (
|
||||
'builtin' => 'builtin',
|
||||
'reserved' => 'reserved',
|
||||
);
|
||||
$this->_defClass = 'code';
|
||||
$this->_checkDefines();
|
||||
}
|
||||
|
||||
}
|
||||
807
framework/vendors/TextHighlighter/Text/Highlighter/RUBY.php
vendored
Normal file
807
framework/vendors/TextHighlighter/Text/Highlighter/RUBY.php
vendored
Normal file
@@ -0,0 +1,807 @@
|
||||
<?php
|
||||
/**
|
||||
* Auto-generated class. RUBY syntax highlighting
|
||||
*
|
||||
*
|
||||
* FIXME: While this construction : s.split /z/i
|
||||
* is valid, regular expression is not recognized as such
|
||||
* (/ folowing an identifier or number is not recognized as
|
||||
* start of RE), making highlighting improper
|
||||
*
|
||||
* %q(a (nested) string) does not get highlighted correctly
|
||||
*
|
||||
*
|
||||
* PHP version 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @version generated from: : ruby.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Auto-generated class. RUBY syntax highlighting
|
||||
*
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
class Text_Highlighter_RUBY extends Text_Highlighter
|
||||
{
|
||||
var $_language = 'ruby';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $options
|
||||
* @access public
|
||||
*/
|
||||
function __construct($options=array())
|
||||
{
|
||||
|
||||
$this->_options = $options;
|
||||
$this->_regs = array (
|
||||
-1 => '/((?mi)^__END__$)|((?i)")|((?i)%[Qx]([!"#\\$%&\'+\\-*.\\/:;=?@^`|~{<\\[(]))|((?i)\')|((?i)%[wq]([!"#\\$%&\'+\\-*.\\/:;=?@^`|~{<\\[(]))|((?i)\\$(\\W|\\w+))|((?ii)@@?[_a-z][\\d_a-z]*)|((?i)\\()|((?i)\\[)|((?i)[a-z_]\\w*)|((?i)((\\d+|((\\d*\\.\\d+)|(\\d+\\.\\d*)))[eE][+-]?\\d+))|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)0[xX][\\da-f]+l?)|((?i)\\d+l?|\\b0l?\\b)|((?i)0[0-7]+l?)|((?mi)^=begin$)|((?i)#)|((?i)\\s*\\/)/',
|
||||
0 => '//',
|
||||
1 => '/((?i)\\\\.)/',
|
||||
2 => '/((?i)\\\\.)/',
|
||||
3 => '/((?i)\\\\.)/',
|
||||
4 => '/((?i)\\\\.)/',
|
||||
5 => '/((?mi)^__END__$)|((?i)")|((?i)%[Qx]([!"#\\$%&\'+\\-*.\\/:;=?@^`|~{<\\[(]))|((?i)\')|((?i)%[wq]([!"#\\$%&\'+\\-*.\\/:;=?@^`|~{<\\[(]))|((?i)\\$(\\W|\\w+))|((?ii)@@?[_a-z][\\d_a-z]*)|((?i)\\()|((?i)\\[)|((?i)[a-z_]\\w*)|((?i)((\\d+|((\\d*\\.\\d+)|(\\d+\\.\\d*)))[eE][+-]?\\d+))|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)0[xX][\\da-f]+l?)|((?i)\\d+l?|\\b0l?\\b)|((?i)0[0-7]+l?)|((?mi)^=begin$)|((?i)#)|((?i)\\s*\\/)/',
|
||||
6 => '/((?mi)^__END__$)|((?i)")|((?i)%[Qx]([!"#\\$%&\'+\\-*.\\/:;=?@^`|~{<\\[(]))|((?i)\')|((?i)%[wq]([!"#\\$%&\'+\\-*.\\/:;=?@^`|~{<\\[(]))|((?i)\\$(\\W|\\w+))|((?ii)@@?[_a-z][\\d_a-z]*)|((?i)\\()|((?i)\\[)|((?i)[a-z_]\\w*)|((?i)((\\d+|((\\d*\\.\\d+)|(\\d+\\.\\d*)))[eE][+-]?\\d+))|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)0[xX][\\da-f]+l?)|((?i)\\d+l?|\\b0l?\\b)|((?i)0[0-7]+l?)|((?mi)^=begin$)|((?i)#)|((?i)\\s*\\/)/',
|
||||
7 => '/((?i)\\$\\w+\\s*:.+\\$)/',
|
||||
8 => '/((?i)\\$\\w+\\s*:.+\\$)/',
|
||||
9 => '/((?i)\\\\.)/',
|
||||
);
|
||||
$this->_counts = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 1,
|
||||
3 => 0,
|
||||
4 => 1,
|
||||
5 => 1,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 0,
|
||||
9 => 0,
|
||||
10 => 5,
|
||||
11 => 2,
|
||||
12 => 0,
|
||||
13 => 0,
|
||||
14 => 0,
|
||||
15 => 0,
|
||||
16 => 0,
|
||||
17 => 0,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 1,
|
||||
3 => 0,
|
||||
4 => 1,
|
||||
5 => 1,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 0,
|
||||
9 => 0,
|
||||
10 => 5,
|
||||
11 => 2,
|
||||
12 => 0,
|
||||
13 => 0,
|
||||
14 => 0,
|
||||
15 => 0,
|
||||
16 => 0,
|
||||
17 => 0,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 1,
|
||||
3 => 0,
|
||||
4 => 1,
|
||||
5 => 1,
|
||||
6 => 0,
|
||||
7 => 0,
|
||||
8 => 0,
|
||||
9 => 0,
|
||||
10 => 5,
|
||||
11 => 2,
|
||||
12 => 0,
|
||||
13 => 0,
|
||||
14 => 0,
|
||||
15 => 0,
|
||||
16 => 0,
|
||||
17 => 0,
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
);
|
||||
$this->_delim = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'reserved',
|
||||
1 => 'quotes',
|
||||
2 => 'quotes',
|
||||
3 => 'quotes',
|
||||
4 => 'quotes',
|
||||
5 => '',
|
||||
6 => '',
|
||||
7 => 'brackets',
|
||||
8 => 'brackets',
|
||||
9 => '',
|
||||
10 => '',
|
||||
11 => '',
|
||||
12 => '',
|
||||
13 => '',
|
||||
14 => '',
|
||||
15 => 'comment',
|
||||
16 => 'comment',
|
||||
17 => 'quotes',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 'reserved',
|
||||
1 => 'quotes',
|
||||
2 => 'quotes',
|
||||
3 => 'quotes',
|
||||
4 => 'quotes',
|
||||
5 => '',
|
||||
6 => '',
|
||||
7 => 'brackets',
|
||||
8 => 'brackets',
|
||||
9 => '',
|
||||
10 => '',
|
||||
11 => '',
|
||||
12 => '',
|
||||
13 => '',
|
||||
14 => '',
|
||||
15 => 'comment',
|
||||
16 => 'comment',
|
||||
17 => 'quotes',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => 'reserved',
|
||||
1 => 'quotes',
|
||||
2 => 'quotes',
|
||||
3 => 'quotes',
|
||||
4 => 'quotes',
|
||||
5 => '',
|
||||
6 => '',
|
||||
7 => 'brackets',
|
||||
8 => 'brackets',
|
||||
9 => '',
|
||||
10 => '',
|
||||
11 => '',
|
||||
12 => '',
|
||||
13 => '',
|
||||
14 => '',
|
||||
15 => 'comment',
|
||||
16 => 'comment',
|
||||
17 => 'quotes',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
);
|
||||
$this->_inner = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'string',
|
||||
2 => 'string',
|
||||
3 => 'string',
|
||||
4 => 'string',
|
||||
5 => 'var',
|
||||
6 => 'var',
|
||||
7 => 'code',
|
||||
8 => 'code',
|
||||
9 => 'identifier',
|
||||
10 => 'number',
|
||||
11 => 'number',
|
||||
12 => 'number',
|
||||
13 => 'number',
|
||||
14 => 'number',
|
||||
15 => 'comment',
|
||||
16 => 'comment',
|
||||
17 => 'string',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'string',
|
||||
2 => 'string',
|
||||
3 => 'string',
|
||||
4 => 'string',
|
||||
5 => 'var',
|
||||
6 => 'var',
|
||||
7 => 'code',
|
||||
8 => 'code',
|
||||
9 => 'identifier',
|
||||
10 => 'number',
|
||||
11 => 'number',
|
||||
12 => 'number',
|
||||
13 => 'number',
|
||||
14 => 'number',
|
||||
15 => 'comment',
|
||||
16 => 'comment',
|
||||
17 => 'string',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'string',
|
||||
2 => 'string',
|
||||
3 => 'string',
|
||||
4 => 'string',
|
||||
5 => 'var',
|
||||
6 => 'var',
|
||||
7 => 'code',
|
||||
8 => 'code',
|
||||
9 => 'identifier',
|
||||
10 => 'number',
|
||||
11 => 'number',
|
||||
12 => 'number',
|
||||
13 => 'number',
|
||||
14 => 'number',
|
||||
15 => 'comment',
|
||||
16 => 'comment',
|
||||
17 => 'string',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
0 => 'inlinedoc',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
0 => 'inlinedoc',
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
);
|
||||
$this->_end = array (
|
||||
0 => '/(?i)$/',
|
||||
1 => '/(?i)"/',
|
||||
2 => '/(?i)%b1%/',
|
||||
3 => '/(?i)\'/',
|
||||
4 => '/(?i)%b1%/',
|
||||
5 => '/(?i)\\)/',
|
||||
6 => '/(?i)\\]/',
|
||||
7 => '/(?mi)^=end$/',
|
||||
8 => '/(?mi)$/',
|
||||
9 => '/(?i)\\/[iomx]*/',
|
||||
);
|
||||
$this->_states = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 => 5,
|
||||
8 => 6,
|
||||
9 => -1,
|
||||
10 => -1,
|
||||
11 => -1,
|
||||
12 => -1,
|
||||
13 => -1,
|
||||
14 => -1,
|
||||
15 => 7,
|
||||
16 => 8,
|
||||
17 => 9,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 => 5,
|
||||
8 => 6,
|
||||
9 => -1,
|
||||
10 => -1,
|
||||
11 => -1,
|
||||
12 => -1,
|
||||
13 => -1,
|
||||
14 => -1,
|
||||
15 => 7,
|
||||
16 => 8,
|
||||
17 => 9,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 4,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 => 5,
|
||||
8 => 6,
|
||||
9 => -1,
|
||||
10 => -1,
|
||||
11 => -1,
|
||||
12 => -1,
|
||||
13 => -1,
|
||||
14 => -1,
|
||||
15 => 7,
|
||||
16 => 8,
|
||||
17 => 9,
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
);
|
||||
$this->_keywords = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 =>
|
||||
array (
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
),
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
9 =>
|
||||
array (
|
||||
'reserved' => '/^(__FILE__|require|and|def|end|in|or|self|unless|__LINE__|begin|defined?|ensure|module|redo|super|until|BEGIN|break|do|false|next|rescue|then|when|END|case|else|for|nil|retry|true|while|alias|module_function|private|public|protected|attr_reader|attr_writer|attr_accessor|class|elsif|if|not|return|undef|yield)$/',
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
),
|
||||
13 =>
|
||||
array (
|
||||
),
|
||||
14 =>
|
||||
array (
|
||||
),
|
||||
15 => -1,
|
||||
16 => -1,
|
||||
17 => -1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 =>
|
||||
array (
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
),
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
9 =>
|
||||
array (
|
||||
'reserved' => '/^(__FILE__|require|and|def|end|in|or|self|unless|__LINE__|begin|defined?|ensure|module|redo|super|until|BEGIN|break|do|false|next|rescue|then|when|END|case|else|for|nil|retry|true|while|alias|module_function|private|public|protected|attr_reader|attr_writer|attr_accessor|class|elsif|if|not|return|undef|yield)$/',
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
),
|
||||
13 =>
|
||||
array (
|
||||
),
|
||||
14 =>
|
||||
array (
|
||||
),
|
||||
15 => -1,
|
||||
16 => -1,
|
||||
17 => -1,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 =>
|
||||
array (
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
),
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
9 =>
|
||||
array (
|
||||
'reserved' => '/^(__FILE__|require|and|def|end|in|or|self|unless|__LINE__|begin|defined?|ensure|module|redo|super|until|BEGIN|break|do|false|next|rescue|then|when|END|case|else|for|nil|retry|true|while|alias|module_function|private|public|protected|attr_reader|attr_writer|attr_accessor|class|elsif|if|not|return|undef|yield)$/',
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
),
|
||||
13 =>
|
||||
array (
|
||||
),
|
||||
14 =>
|
||||
array (
|
||||
),
|
||||
15 => -1,
|
||||
16 => -1,
|
||||
17 => -1,
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
);
|
||||
$this->_parts = array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
9 => NULL,
|
||||
10 => NULL,
|
||||
11 => NULL,
|
||||
12 => NULL,
|
||||
13 => NULL,
|
||||
14 => NULL,
|
||||
15 => NULL,
|
||||
16 => NULL,
|
||||
17 => NULL,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
9 => NULL,
|
||||
10 => NULL,
|
||||
11 => NULL,
|
||||
12 => NULL,
|
||||
13 => NULL,
|
||||
14 => NULL,
|
||||
15 => NULL,
|
||||
16 => NULL,
|
||||
17 => NULL,
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
);
|
||||
$this->_subst = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => true,
|
||||
3 => false,
|
||||
4 => true,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
10 => false,
|
||||
11 => false,
|
||||
12 => false,
|
||||
13 => false,
|
||||
14 => false,
|
||||
15 => false,
|
||||
16 => false,
|
||||
17 => false,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => true,
|
||||
3 => false,
|
||||
4 => true,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
10 => false,
|
||||
11 => false,
|
||||
12 => false,
|
||||
13 => false,
|
||||
14 => false,
|
||||
15 => false,
|
||||
16 => false,
|
||||
17 => false,
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => true,
|
||||
3 => false,
|
||||
4 => true,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
10 => false,
|
||||
11 => false,
|
||||
12 => false,
|
||||
13 => false,
|
||||
14 => false,
|
||||
15 => false,
|
||||
16 => false,
|
||||
17 => false,
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
);
|
||||
$this->_conditions = array (
|
||||
);
|
||||
$this->_kwmap = array (
|
||||
'reserved' => 'reserved',
|
||||
);
|
||||
$this->_defClass = 'code';
|
||||
$this->_checkDefines();
|
||||
}
|
||||
|
||||
}
|
||||
152
framework/vendors/TextHighlighter/Text/Highlighter/Renderer.php
vendored
Normal file
152
framework/vendors/TextHighlighter/Text/Highlighter/Renderer.php
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
/**
|
||||
* Abstract base class for Highlighter renderers
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version CVS: $Id: Renderer.php,v 1.1 2007/06/03 02:36:35 ssttoo Exp $
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
/**
|
||||
* Abstract base class for Highlighter renderers
|
||||
*
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
* @abstract
|
||||
*/
|
||||
|
||||
class Text_Highlighter_Renderer
|
||||
{
|
||||
/**
|
||||
* Renderer options
|
||||
*
|
||||
* @var array
|
||||
* @access protected
|
||||
*/
|
||||
public $_options = array();
|
||||
|
||||
/**
|
||||
* Current language
|
||||
*
|
||||
* @var string
|
||||
* @access protected
|
||||
*/
|
||||
public $_language = '';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @param array $options Rendering options. Renderer-specific.
|
||||
*/
|
||||
function __construct($options = array())
|
||||
{
|
||||
$this->_options = $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets renderer state
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @param array $options Rendering options. Renderer-specific.
|
||||
*/
|
||||
function reset()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Preprocesses code
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @param string $str Code to preprocess
|
||||
* @return string Preprocessed code
|
||||
*/
|
||||
function preprocess($str)
|
||||
{
|
||||
return $str;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accepts next token
|
||||
*
|
||||
* @abstract
|
||||
* @access public
|
||||
*
|
||||
* @param string $class Token class
|
||||
* @param string $content Token content
|
||||
*/
|
||||
function acceptToken($class, $content)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Signals that no more tokens are available
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
function finalize()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get generated output
|
||||
*
|
||||
* @abstract
|
||||
* @return mixed Renderer-specific
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
function getOutput()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set current language
|
||||
*
|
||||
* @abstract
|
||||
* @return void
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
function setCurrentLanguage($lang)
|
||||
{
|
||||
$this->_language = $lang;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* c-hanging-comment-ender-p: nil
|
||||
* End:
|
||||
*/
|
||||
|
||||
?>
|
||||
199
framework/vendors/TextHighlighter/Text/Highlighter/Renderer/Array.php
vendored
Normal file
199
framework/vendors/TextHighlighter/Text/Highlighter/Renderer/Array.php
vendored
Normal file
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
/**
|
||||
* Array renderer.
|
||||
*
|
||||
* Produces an array that contains class names and content pairs.
|
||||
* The array can be enumerated or associative. Associative means
|
||||
* <code>class => content</code> pairs.
|
||||
* Based on the HTML renderer by Andrey Demenev.
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @author Stoyan Stefanov <ssttoo@gmail.com>
|
||||
* @copyright 2006 Stoyan Stefanov
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version CVS: $Id: Array.php,v 1.1 2007/06/03 02:37:08 ssttoo Exp $
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__).'/../Renderer.php';
|
||||
|
||||
/**
|
||||
* Array renderer, based on Andrey Demenev's HTML renderer.
|
||||
*
|
||||
* In addition to the options supported by the HTML renderer,
|
||||
* the following options were also introduced:
|
||||
* <ul><li>htmlspecialchars - whether or not htmlspecialchars() will
|
||||
* be called on the content, default TRUE</li>
|
||||
* <li>enumerated - type of array produced, default FALSE,
|
||||
* meaning associative array</li>
|
||||
* </ul>
|
||||
*
|
||||
*
|
||||
* @author Stoyan Stefanov <ssttoo@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2006 Stoyan Stefanov
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.5.0
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
class Text_Highlighter_Renderer_Array extends Text_Highlighter_Renderer
|
||||
{
|
||||
|
||||
/**#@+
|
||||
* @access private
|
||||
*/
|
||||
|
||||
/**
|
||||
* Tab size
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
var $_tabsize = 4;
|
||||
|
||||
/**
|
||||
* Should htmlentities() will be called
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
var $_htmlspecialchars = true;
|
||||
|
||||
/**
|
||||
* Enumerated or associative array
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
var $_enumerated = false;
|
||||
|
||||
/**
|
||||
* Array containing highlighting rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
var $_output = array();
|
||||
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Preprocesses code
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @param string $str Code to preprocess
|
||||
* @return string Preprocessed code
|
||||
*/
|
||||
function preprocess($str)
|
||||
{
|
||||
// normalize whitespace and tabs
|
||||
$str = str_replace("\r\n","\n", $str);
|
||||
// some browsers refuse to display empty lines
|
||||
$str = preg_replace('~^$~m'," ", $str);
|
||||
$str = str_replace("\t",str_repeat(' ', $this->_tabsize), $str);
|
||||
return rtrim($str);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Resets renderer state
|
||||
*
|
||||
* Descendents of Text_Highlighter call this method from the constructor,
|
||||
* passing $options they get as parameter.
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
function reset()
|
||||
{
|
||||
$this->_output = array();
|
||||
$this->_lastClass = 'default';
|
||||
if (isset($this->_options['tabsize'])) {
|
||||
$this->_tabsize = $this->_options['tabsize'];
|
||||
}
|
||||
if (isset($this->_options['htmlspecialchars'])) {
|
||||
$this->_htmlspecialchars = $this->_options['htmlspecialchars'];
|
||||
}
|
||||
if (isset($this->_options['enumerated'])) {
|
||||
$this->_enumerated = $this->_options['enumerated'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Accepts next token
|
||||
*
|
||||
* @abstract
|
||||
* @access public
|
||||
* @param string $class Token class
|
||||
* @param string $content Token content
|
||||
*/
|
||||
function acceptToken($class, $content)
|
||||
{
|
||||
|
||||
|
||||
$theClass = $this->_getFullClassName($class);
|
||||
if ($this->_htmlspecialchars) {
|
||||
$content = htmlspecialchars($content);
|
||||
}
|
||||
if ($this->_enumerated) {
|
||||
$this->_output[] = array($class, $content);
|
||||
} else {
|
||||
$this->_output[][$class] = $content;
|
||||
}
|
||||
$this->_lastClass = $class;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Given a CSS class name, returns the class name
|
||||
* with language name prepended, if necessary
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @param string $class Token class
|
||||
*/
|
||||
function _getFullClassName($class)
|
||||
{
|
||||
if (!empty($this->_options['use_language'])) {
|
||||
$theClass = $this->_language . '-' . $class;
|
||||
} else {
|
||||
$theClass = $class;
|
||||
}
|
||||
return $theClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get generated output
|
||||
*
|
||||
* @abstract
|
||||
* @return array Highlighted code as an array
|
||||
* @access public
|
||||
*/
|
||||
function getOutput()
|
||||
{
|
||||
return $this->_output;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* c-hanging-comment-ender-p: nil
|
||||
* End:
|
||||
*/
|
||||
|
||||
?>
|
||||
238
framework/vendors/TextHighlighter/Text/Highlighter/Renderer/BB.php
vendored
Normal file
238
framework/vendors/TextHighlighter/Text/Highlighter/Renderer/BB.php
vendored
Normal file
@@ -0,0 +1,238 @@
|
||||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
/**
|
||||
* BB code renderer.
|
||||
*
|
||||
* This BB renderer produces BB code, ready to be pasted in bulletin boards and
|
||||
* other applications that accept BB code. Based on the HTML renderer by Andrey Demenev.
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @author Stoyan Stefanov <ssttoo@gmail.com>
|
||||
* @copyright 2005 Stoyan Stefanov
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version CVS: $Id: BB.php,v 1.1 2007/06/03 02:37:08 ssttoo Exp $
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__).'/../Renderer.php';
|
||||
|
||||
/**
|
||||
* BB code renderer, based on Andrey Demenev's HTML renderer.
|
||||
*
|
||||
* Elements of $options argument of constructor (each being optional):
|
||||
*
|
||||
* - 'numbers' - Line numbering TRUE or FALSE
|
||||
* - 'tabsize' - Tab size, default is 4
|
||||
* - 'bb_tags' - An array containing three BB tags, see below
|
||||
* - 'tag_brackets' - An array that conains opening and closing tags, [ and ]
|
||||
* - 'colors' - An array with all the colors to be used for highlighting
|
||||
*
|
||||
* The default BB tags are:
|
||||
* - 'color' => 'color'
|
||||
* - 'list' => 'list'
|
||||
* - 'list_item' => '*'
|
||||
*
|
||||
* The default colors for the highlighter are:
|
||||
* - 'default' => 'Black',
|
||||
* - 'code' => 'Gray',
|
||||
* - 'brackets' => 'Olive',
|
||||
* - 'comment' => 'Orange',
|
||||
* - 'mlcomment' => 'Orange',
|
||||
* - 'quotes' => 'Darkred',
|
||||
* - 'string' => 'Red',
|
||||
* - 'identifier' => 'Blue',
|
||||
* - 'builtin' => 'Teal',
|
||||
* - 'reserved' => 'Green',
|
||||
* - 'inlinedoc' => 'Blue',
|
||||
* - 'var' => 'Darkblue',
|
||||
* - 'url' => 'Blue',
|
||||
* - 'special' => 'Navy',
|
||||
* - 'number' => 'Maroon',
|
||||
* - 'inlinetags' => 'Blue',
|
||||
*
|
||||
*
|
||||
* @author Stoyan Stefanov <ssttoo@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 20045 Stoyan Stefanov
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.5.0
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
class Text_Highlighter_Renderer_BB extends Text_Highlighter_Renderer_Array
|
||||
{
|
||||
|
||||
/**#@+
|
||||
* @access private
|
||||
*/
|
||||
|
||||
/**
|
||||
* Line numbering - will use the specified BB tag for listings
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
var $_numbers = false;
|
||||
|
||||
/**
|
||||
* BB tags to be used
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
var $_bb_tags = array (
|
||||
'color' => 'color',
|
||||
'list' => 'list',
|
||||
'list_item' => '*',
|
||||
'code' => 'code',
|
||||
);
|
||||
|
||||
/**
|
||||
* BB brackets - [ and ]
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
var $_tag_brackets = array ('start' => '[', 'end' => ']');
|
||||
|
||||
/**
|
||||
* Colors map
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
var $_colors = array(
|
||||
'default' => 'Black',
|
||||
'code' => 'Gray',
|
||||
'brackets' => 'Olive',
|
||||
'comment' => 'Orange',
|
||||
'mlcomment' => 'Orange',
|
||||
'quotes' => 'Darkred',
|
||||
'string' => 'Red',
|
||||
'identifier' => 'Blue',
|
||||
'builtin' => 'Teal',
|
||||
'reserved' => 'Green',
|
||||
'inlinedoc' => 'Blue',
|
||||
'var' => 'Darkblue',
|
||||
'url' => 'Blue',
|
||||
'special' => 'Navy',
|
||||
'number' => 'Maroon',
|
||||
'inlinetags' => 'Blue',
|
||||
);
|
||||
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Resets renderer state
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
*
|
||||
* Descendents of Text_Highlighter call this method from the constructor,
|
||||
* passing $options they get as parameter.
|
||||
*/
|
||||
function reset()
|
||||
{
|
||||
parent::reset();
|
||||
if (isset($this->_options['numbers'])) {
|
||||
$this->_numbers = $this->_options['numbers'];
|
||||
}
|
||||
if (isset($this->_options['bb_tags'])) {
|
||||
$this->_bb_tags = array_merge($this->_bb_tags, $this->_options['bb_tags']);
|
||||
}
|
||||
if (isset($this->_options['tag_brackets'])) {
|
||||
$this->_tag_brackets = array_merge($this->_tag_brackets, $this->_options['tag_brackets']);
|
||||
}
|
||||
if (isset($this->_options['colors'])) {
|
||||
$this->_colors = array_merge($this->_colors, $this->_options['colors']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Signals that no more tokens are available
|
||||
*
|
||||
* @abstract
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
function finalize()
|
||||
{
|
||||
|
||||
// get parent's output
|
||||
parent::finalize();
|
||||
$output = parent::getOutput();
|
||||
|
||||
$bb_output = '';
|
||||
|
||||
$color_start = $this->_tag_brackets['start'] . $this->_bb_tags['color'] . '=%s' . $this->_tag_brackets['end'];
|
||||
$color_end = $this->_tag_brackets['start'] . '/' . $this->_bb_tags['color'] . $this->_tag_brackets['end'];
|
||||
|
||||
// loop through each class=>content pair
|
||||
foreach ($output AS $token) {
|
||||
|
||||
if ($this->_enumerated) {
|
||||
$class = $token[0];
|
||||
$content = $token[1];
|
||||
} else {
|
||||
$key = key($token);
|
||||
$class = $key;
|
||||
$content = $token[$key];
|
||||
}
|
||||
|
||||
$iswhitespace = ctype_space($content);
|
||||
if (!$iswhitespace && !empty($this->_colors[$class])) {
|
||||
$bb_output .= sprintf($color_start, $this->_colors[$class]);
|
||||
$bb_output .= $content;
|
||||
$bb_output .= $color_end;
|
||||
} else {
|
||||
$bb_output .= $content;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->_numbers) {
|
||||
|
||||
$item_tag = $this->_tag_brackets['start'] .
|
||||
$this->_bb_tags['list_item'] .
|
||||
$this->_tag_brackets['end'];
|
||||
$this->_output = $item_tag . str_replace("\n", "\n". $item_tag .' ', $bb_output);
|
||||
$this->_output = $this->_tag_brackets['start'] .
|
||||
$this->_bb_tags['list'] .
|
||||
$this->_tag_brackets['end'] .
|
||||
$this->_output .
|
||||
$this->_tag_brackets['start'] .
|
||||
'/'.
|
||||
$this->_bb_tags['list'] .
|
||||
$this->_tag_brackets['end']
|
||||
;
|
||||
} else {
|
||||
$this->_output = $this->_tag_brackets['start'] .
|
||||
$this->_bb_tags['code'] .
|
||||
$this->_tag_brackets['end'] .
|
||||
$bb_output .
|
||||
$this->_tag_brackets['start'] .
|
||||
'/' .
|
||||
$this->_bb_tags['code'] .
|
||||
$this->_tag_brackets['end'];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* c-hanging-comment-ender-p: nil
|
||||
* End:
|
||||
*/
|
||||
|
||||
?>
|
||||
208
framework/vendors/TextHighlighter/Text/Highlighter/Renderer/Console.php
vendored
Normal file
208
framework/vendors/TextHighlighter/Text/Highlighter/Renderer/Console.php
vendored
Normal file
@@ -0,0 +1,208 @@
|
||||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
/**
|
||||
* Console renderer
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version CVS: $Id: Console.php,v 1.1 2007/06/03 02:37:08 ssttoo Exp $
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__).'/../Renderer.php';
|
||||
|
||||
define ('HL_CONSOLE_DEFCOLOR', "\033[0m");
|
||||
|
||||
/**
|
||||
* Console renderer
|
||||
*
|
||||
* Suitable for displaying text on color-capable terminals, directly
|
||||
* or trough less -r
|
||||
*
|
||||
* Elements of $options argument of constructor (each being optional):
|
||||
*
|
||||
* - 'numbers' - whether to add line numbers
|
||||
* - 'tabsize' - Tab size
|
||||
* - 'colors' - additional colors
|
||||
*
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
class Text_Highlighter_Renderer_Console extends Text_Highlighter_Renderer
|
||||
{
|
||||
|
||||
/**#@+
|
||||
* @access private
|
||||
*/
|
||||
|
||||
/**
|
||||
* class of last outputted text chunk
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $_lastClass;
|
||||
|
||||
/**
|
||||
* Line numbering
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
var $_numbers = false;
|
||||
|
||||
/**
|
||||
* Tab size
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
var $_tabsize = 4;
|
||||
|
||||
/**
|
||||
* Highlighted code
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $_output = '';
|
||||
|
||||
/**#@-*/
|
||||
|
||||
var $_colors = array();
|
||||
|
||||
var $_defColors = array(
|
||||
'default' => "\033[0m",
|
||||
'inlinetags' => "\033[31m",
|
||||
'brackets' => "\033[36m",
|
||||
'quotes' => "\033[34m",
|
||||
'inlinedoc' => "\033[34m",
|
||||
'var' => "\033[1m",
|
||||
'types' => "\033[32m",
|
||||
'number' => "\033[32m",
|
||||
'string' => "\033[31m",
|
||||
'reserved' => "\033[35m",
|
||||
'comment' => "\033[33m",
|
||||
'mlcomment' => "\033[33m",
|
||||
);
|
||||
|
||||
function preprocess($str)
|
||||
{
|
||||
// normalize whitespace and tabs
|
||||
$str = str_replace("\r\n","\n", $str);
|
||||
$str = str_replace("\t",str_repeat(' ', $this->_tabsize), $str);
|
||||
return rtrim($str);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Resets renderer state
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
*
|
||||
* Descendents of Text_Highlighter call this method from the constructor,
|
||||
* passing $options they get as parameter.
|
||||
*/
|
||||
function reset()
|
||||
{
|
||||
$this->_lastClass = '';
|
||||
if (isset($this->_options['numbers'])) {
|
||||
$this->_numbers = (bool)$this->_options['numbers'];
|
||||
} else {
|
||||
$this->_numbers = false;
|
||||
}
|
||||
if (isset($this->_options['tabsize'])) {
|
||||
$this->_tabsize = $this->_options['tabsize'];
|
||||
} else {
|
||||
$this->_tabsize = 4;
|
||||
}
|
||||
if (isset($this->_options['colors'])) {
|
||||
$this->_colors = array_merge($this->_defColors, $this->_options['colors']);
|
||||
} else {
|
||||
$this->_colors = $this->_defColors;
|
||||
}
|
||||
$this->_output = '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Accepts next token
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @param string $class Token class
|
||||
* @param string $content Token content
|
||||
*/
|
||||
function acceptToken($class, $content)
|
||||
{
|
||||
if (isset($this->_colors[$class])) {
|
||||
$color = $this->_colors[$class];
|
||||
} else {
|
||||
$color = $this->_colors['default'];
|
||||
}
|
||||
if ($this->_lastClass != $class) {
|
||||
$this->_output .= $color;
|
||||
}
|
||||
$content = str_replace("\n", $this->_colors['default'] . "\n" . $color, $content);
|
||||
$content .= $this->_colors['default'];
|
||||
$this->_output .= $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Signals that no more tokens are available
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
function finalize()
|
||||
{
|
||||
if ($this->_numbers) {
|
||||
$nlines = substr_count($this->_output, "\n") + 1;
|
||||
$len = strlen($nlines);
|
||||
$i = 1;
|
||||
$this->_output = preg_replace('~^~em', '" " . str_pad($i++, $len, " ", STR_PAD_LEFT) . ": "', $this->_output);
|
||||
}
|
||||
$this->_output .= HL_CONSOLE_DEFCOLOR . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get generated output
|
||||
*
|
||||
* @return string Highlighted code
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
function getOutput()
|
||||
{
|
||||
return $this->_output;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* c-hanging-comment-ender-p: nil
|
||||
* End:
|
||||
*/
|
||||
|
||||
?>
|
||||
454
framework/vendors/TextHighlighter/Text/Highlighter/Renderer/Html.php
vendored
Normal file
454
framework/vendors/TextHighlighter/Text/Highlighter/Renderer/Html.php
vendored
Normal file
@@ -0,0 +1,454 @@
|
||||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
/**
|
||||
* HTML renderer
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version CVS: $Id: Html.php,v 1.2 2007/06/29 06:56:34 ssttoo Exp $
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__).'/../Renderer.php';
|
||||
require_once dirname(__FILE__).'/../Renderer/Array.php';
|
||||
|
||||
// BC trick : only define constants if Text/Highlighter.php
|
||||
// is not yet included
|
||||
if (!defined('HL_NUMBERS_LI')) {
|
||||
/**#@+
|
||||
* Constant for use with $options['numbers']
|
||||
*/
|
||||
/**
|
||||
* use numbered list, deprecated, use HL_NUMBERS_OL instaed
|
||||
* @deprecated
|
||||
*/
|
||||
define ('HL_NUMBERS_LI' , 1);
|
||||
/**
|
||||
* Use 2-column table with line numbers in left column and code in right column.
|
||||
*/
|
||||
define ('HL_NUMBERS_TABLE' , 2);
|
||||
/**#@-*/
|
||||
}
|
||||
|
||||
|
||||
/**#@+
|
||||
* Constant for use with $options['numbers']
|
||||
*/
|
||||
/**
|
||||
* Use numbered list
|
||||
*/
|
||||
define ('HL_NUMBERS_OL', 1);
|
||||
/**
|
||||
* Use non-numbered list
|
||||
*/
|
||||
define ('HL_NUMBERS_UL', 3);
|
||||
/**#@-*/
|
||||
|
||||
|
||||
/**
|
||||
* HTML renderer
|
||||
*
|
||||
* Elements of $options argument of constructor (each being optional):
|
||||
*
|
||||
* - 'numbers' - Line numbering style 0 or {@link HL_NUMBERS_TABLE}
|
||||
* or {@link HL_NUMBERS_UL} or {@link HL_NUMBERS_OL}
|
||||
* - 'numbers_start' - starting number for numbered lines
|
||||
* - 'tabsize' - Tab size
|
||||
* - 'style_map' - Mapping of keywords to formatting rules using inline styles
|
||||
* - 'class_map' - Mapping of keywords to formatting rules using class names
|
||||
* - 'doclinks' - array that has keys "url", "target" and "elements", used for
|
||||
* generating links to online documentation
|
||||
* - 'use_language' - class names will be prefixed with language, like "php-reserved" or "css-code"
|
||||
*
|
||||
* Example of setting documentation links:
|
||||
* $options['doclinks'] = array(
|
||||
* 'url' => 'http://php.net/%s',
|
||||
* 'target' => '_blank',
|
||||
* 'elements' => array('reserved', 'identifier')
|
||||
* );
|
||||
*
|
||||
* Example of setting class names map:
|
||||
* $options['class_map'] = array(
|
||||
* 'main' => 'my-main',
|
||||
* 'table' => 'my-table',
|
||||
* 'gutter' => 'my-gutter',
|
||||
* 'brackets' => 'my-brackets',
|
||||
* 'builtin' => 'my-builtin',
|
||||
* 'code' => 'my-code',
|
||||
* 'comment' => 'my-comment',
|
||||
* 'default' => 'my-default',
|
||||
* 'identifier' => 'my-identifier',
|
||||
* 'inlinedoc' => 'my-inlinedoc',
|
||||
* 'inlinetags' => 'my-inlinetags',
|
||||
* 'mlcomment' => 'my-mlcomment',
|
||||
* 'number' => 'my-number',
|
||||
* 'quotes' => 'my-quotes',
|
||||
* 'reserved' => 'my-reserved',
|
||||
* 'special' => 'my-special',
|
||||
* 'string' => 'my-string',
|
||||
* 'url' => 'my-url',
|
||||
* 'var' => 'my-var',
|
||||
* );
|
||||
*
|
||||
* Example of setting styles mapping:
|
||||
* $options['style_map'] = array(
|
||||
* 'main' => 'color: black',
|
||||
* 'table' => 'border: 1px solid black',
|
||||
* 'gutter' => 'background-color: yellow',
|
||||
* 'brackets' => 'color: blue',
|
||||
* 'builtin' => 'color: red',
|
||||
* 'code' => 'color: green',
|
||||
* 'comment' => 'color: orange',
|
||||
* // ....
|
||||
* );
|
||||
*
|
||||
*
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
class Text_Highlighter_Renderer_Html extends Text_Highlighter_Renderer_Array
|
||||
{
|
||||
|
||||
/**#@+
|
||||
* @access private
|
||||
*/
|
||||
|
||||
/**
|
||||
* Line numbering style
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
var $_numbers = 0;
|
||||
|
||||
/**
|
||||
* For numberered lines - where to start
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
var $_numbers_start = 0;
|
||||
|
||||
/**
|
||||
* Tab size
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
var $_tabsize = 4;
|
||||
|
||||
/**
|
||||
* Highlighted code
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $_output = '';
|
||||
|
||||
/**
|
||||
* Mapping of keywords to formatting rules using inline styles
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
var $_style_map = array();
|
||||
|
||||
/**
|
||||
* Mapping of keywords to formatting rules using class names
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
var $_class_map = array(
|
||||
'main' => 'hl-main',
|
||||
'table' => 'hl-table',
|
||||
'gutter' => 'hl-gutter',
|
||||
'brackets' => 'hl-brackets',
|
||||
'builtin' => 'hl-builtin',
|
||||
'code' => 'hl-code',
|
||||
'comment' => 'hl-comment',
|
||||
'default' => 'hl-default',
|
||||
'identifier' => 'hl-identifier',
|
||||
'inlinedoc' => 'hl-inlinedoc',
|
||||
'inlinetags' => 'hl-inlinetags',
|
||||
'mlcomment' => 'hl-mlcomment',
|
||||
'number' => 'hl-number',
|
||||
'quotes' => 'hl-quotes',
|
||||
'reserved' => 'hl-reserved',
|
||||
'special' => 'hl-special',
|
||||
'string' => 'hl-string',
|
||||
'url' => 'hl-url',
|
||||
'var' => 'hl-var',
|
||||
);
|
||||
|
||||
/**
|
||||
* Setup for links to online documentation
|
||||
*
|
||||
* This is an array with keys:
|
||||
* - url, ex. http://php.net/%s
|
||||
* - target, ex. _blank, default - no target
|
||||
* - elements, default is <code>array('reserved', 'identifier')</code>
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
var $_doclinks = array();
|
||||
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Resets renderer state
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
*
|
||||
* Descendents of Text_Highlighter call this method from the constructor,
|
||||
* passing $options they get as parameter.
|
||||
*/
|
||||
function reset()
|
||||
{
|
||||
$this->_output = '';
|
||||
if (isset($this->_options['numbers'])) {
|
||||
$this->_numbers = (int)$this->_options['numbers'];
|
||||
if ($this->_numbers != HL_NUMBERS_LI
|
||||
&& $this->_numbers != HL_NUMBERS_UL
|
||||
&& $this->_numbers != HL_NUMBERS_OL
|
||||
&& $this->_numbers != HL_NUMBERS_TABLE
|
||||
) {
|
||||
$this->_numbers = 0;
|
||||
}
|
||||
}
|
||||
if (isset($this->_options['tabsize'])) {
|
||||
$this->_tabsize = $this->_options['tabsize'];
|
||||
}
|
||||
if (isset($this->_options['numbers_start'])) {
|
||||
$this->_numbers_start = intval($this->_options['numbers_start']);
|
||||
}
|
||||
if (isset($this->_options['doclinks']) &&
|
||||
is_array($this->_options['doclinks']) &&
|
||||
!empty($this->_options['doclinks']['url'])
|
||||
) {
|
||||
|
||||
$this->_doclinks = $this->_options['doclinks']; // keys: url, target, elements array
|
||||
|
||||
if (empty($this->_options['doclinks']['elements'])) {
|
||||
$this->_doclinks['elements'] = array('reserved', 'identifier');
|
||||
}
|
||||
}
|
||||
if (isset($this->_options['style_map'])) {
|
||||
$this->_style_map = $this->_options['style_map'];
|
||||
}
|
||||
if (isset($this->_options['class_map'])) {
|
||||
$this->_class_map = array_merge($this->_class_map, $this->_options['class_map']);
|
||||
}
|
||||
$this->_htmlspecialchars = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Given a CSS class name, returns the class name
|
||||
* with language name prepended, if necessary
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @param string $class Token class
|
||||
*/
|
||||
function _getFullClassName($class)
|
||||
{
|
||||
if (!empty($this->_options['use_language'])) {
|
||||
$the_class = $this->_language . '-' . $class;
|
||||
} else {
|
||||
$the_class = $class;
|
||||
}
|
||||
return $the_class;
|
||||
}
|
||||
|
||||
/**
|
||||
* Signals that no more tokens are available
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function finalize()
|
||||
{
|
||||
|
||||
// get parent's output
|
||||
parent::finalize();
|
||||
$output = parent::getOutput();
|
||||
if(empty($output))
|
||||
return;
|
||||
|
||||
$html_output = '';
|
||||
|
||||
$numbers_li = false;
|
||||
|
||||
if (
|
||||
$this->_numbers == HL_NUMBERS_LI ||
|
||||
$this->_numbers == HL_NUMBERS_UL ||
|
||||
$this->_numbers == HL_NUMBERS_OL
|
||||
)
|
||||
{
|
||||
$numbers_li = true;
|
||||
}
|
||||
|
||||
// loop through each class=>content pair
|
||||
foreach ($output AS $token) {
|
||||
|
||||
if ($this->_enumerated) {
|
||||
$key = false;
|
||||
$the_class = $token[0];
|
||||
$content = $token[1];
|
||||
} else {
|
||||
$key = key($token);
|
||||
$the_class = $key;
|
||||
$content = $token[$key];
|
||||
}
|
||||
|
||||
$span = $this->_getStyling($the_class);
|
||||
$decorated_output = $this->_decorate($content, $key);
|
||||
//print "<pre> token = ".var_export($token, true)." -- span = " . htmlentities($span). "-- deco = ".$decorated_output."</pre>\n";
|
||||
$html_output .= sprintf($span, $decorated_output);
|
||||
}
|
||||
|
||||
// format lists
|
||||
if (!empty($this->_numbers) && $numbers_li == true) {
|
||||
|
||||
//$html_output = "<pre>".$html_output."</pre>";
|
||||
// additional whitespace for browsers that do not display
|
||||
// empty list items correctly
|
||||
$this->_output = '<li><pre> ' . str_replace("\n", "</pre></li>\n<li><pre> ", $html_output) . '</pre></li>';
|
||||
|
||||
|
||||
$start = '';
|
||||
if ($this->_numbers == HL_NUMBERS_OL && intval($this->_numbers_start) > 0) {
|
||||
$start = ' start="' . $this->_numbers_start . '"';
|
||||
}
|
||||
|
||||
$list_tag = 'ol';
|
||||
if ($this->_numbers == HL_NUMBERS_UL) {
|
||||
$list_tag = 'ul';
|
||||
}
|
||||
|
||||
|
||||
$this->_output = '<' . $list_tag . $start
|
||||
. ' ' . $this->_getStyling('main', false) . '>'
|
||||
. $this->_output . '</'. $list_tag .'>';
|
||||
|
||||
// render a table
|
||||
} else if ($this->_numbers == HL_NUMBERS_TABLE) {
|
||||
|
||||
|
||||
$start_number = 0;
|
||||
if (intval($this->_numbers_start)) {
|
||||
$start_number = $this->_numbers_start - 1;
|
||||
}
|
||||
|
||||
$numbers = '';
|
||||
|
||||
$nlines = substr_count($html_output,"\n")+1;
|
||||
for ($i=1; $i <= $nlines; $i++) {
|
||||
$numbers .= ($start_number + $i) . "\n";
|
||||
}
|
||||
$this->_output = '<table ' . $this->_getStyling('table', false) . ' width="100%"><tr>' .
|
||||
'<td '. $this->_getStyling('gutter', false) .' align="right" valign="top">' .
|
||||
'<pre>' . $numbers . '</pre></td><td '. $this->_getStyling('main', false) .
|
||||
' valign="top"><pre>' .
|
||||
$html_output . '</pre></td></tr></table>';
|
||||
}
|
||||
if (!$this->_numbers) {
|
||||
$this->_output = '<pre>' . $html_output . '</pre>';
|
||||
}
|
||||
$this->_output = '<div ' . $this->_getStyling('main', false) . '>' . $this->_output . '</div>';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Provides additional formatting to a keyword
|
||||
*
|
||||
* @param string $content Keyword
|
||||
* @return string Keyword with additional formatting
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
function _decorate($content, $key = false)
|
||||
{
|
||||
// links to online documentation
|
||||
if (!empty($this->_doclinks) &&
|
||||
!empty($this->_doclinks['url']) &&
|
||||
in_array($key, $this->_doclinks['elements'])
|
||||
) {
|
||||
|
||||
$link = '<a href="'. sprintf($this->_doclinks['url'], $content) . '"';
|
||||
if (!empty($this->_doclinks['target'])) {
|
||||
$link.= ' target="' . $this->_doclinks['target'] . '"';
|
||||
}
|
||||
$link .= '>';
|
||||
$link.= $content;
|
||||
$link.= '</a>';
|
||||
|
||||
$content = $link;
|
||||
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>class</code> and/or <code>style</code> attribute,
|
||||
* optionally enclosed in a <code>span</code> tag
|
||||
*
|
||||
* @param string $class Class name
|
||||
* @paran boolean $span_tag Whether or not to return styling attributes in a <code>>span<</code> tag
|
||||
* @return string <code>span</code> tag or just a <code>class</code> and/or <code>style</code> attributes
|
||||
* @access private
|
||||
*/
|
||||
function _getStyling($class, $span_tag = true)
|
||||
{
|
||||
$attrib = '';
|
||||
if (!empty($this->_style_map) &&
|
||||
!empty($this->_style_map[$class])
|
||||
) {
|
||||
$attrib = 'style="'. $this->_style_map[$class] .'"';
|
||||
}
|
||||
if (!empty($this->_class_map) &&
|
||||
!empty($this->_class_map[$class])
|
||||
) {
|
||||
if ($attrib) {
|
||||
$attrib .= ' ';
|
||||
}
|
||||
$attrib .= 'class="'. $this->_getFullClassName($this->_class_map[$class]) .'"';
|
||||
}
|
||||
|
||||
if ($span_tag) {
|
||||
$span = '<span ' . $attrib . '>%s</span>';
|
||||
return $span;
|
||||
} else {
|
||||
return $attrib;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* c-hanging-comment-ender-p: nil
|
||||
* End:
|
||||
*/
|
||||
|
||||
?>
|
||||
187
framework/vendors/TextHighlighter/Text/Highlighter/Renderer/HtmlTags.php
vendored
Normal file
187
framework/vendors/TextHighlighter/Text/Highlighter/Renderer/HtmlTags.php
vendored
Normal file
@@ -0,0 +1,187 @@
|
||||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
/**
|
||||
* HTML renderer that uses only basic html tags
|
||||
*
|
||||
* PHP versions 4 and 5. Based on the "normal" HTML renderer by Andrey Demenev.
|
||||
* It's designed to work with user agents that support only a limited number of
|
||||
* HTML tags. Like the iPod which supports only b, i, u and a.
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @author Stoyan Stefanov <ssttoo@gmail.com>
|
||||
* @copyright 2005 Stoyan Stefanov
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version CVS: $Id: HtmlTags.php,v 1.1 2007/06/03 02:37:09 ssttoo Exp $
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__).'/../Renderer.php';
|
||||
require_once dirname(__FILE__).'/../Renderer/Array.php';
|
||||
|
||||
/**
|
||||
* HTML basic tags renderer, based on Andrey Demenev's HTML renderer.
|
||||
*
|
||||
* Elements of $options argument of constructor (each being optional):
|
||||
*
|
||||
* - 'numbers' - Line numbering TRUE or FALSE. Default is FALSE.
|
||||
* - 'tabsize' - Tab size, default is 4.
|
||||
* - 'tags' - Array, containing the tags to be used for highlighting
|
||||
*
|
||||
* Here's the listing of the default tags:
|
||||
* - 'default' => '',
|
||||
* - 'code' => '',
|
||||
* - 'brackets' => 'b',
|
||||
* - 'comment' => 'i',
|
||||
* - 'mlcomment' => 'i',
|
||||
* - 'quotes' => '',
|
||||
* - 'string' => 'i',
|
||||
* - 'identifier' => 'b',
|
||||
* - 'builtin' => 'b',
|
||||
* - 'reserved' => 'u',
|
||||
* - 'inlinedoc' => 'i',
|
||||
* - 'var' => 'b',
|
||||
* - 'url' => 'i',
|
||||
* - 'special' => '',
|
||||
* - 'number' => '',
|
||||
* - 'inlinetags' => ''
|
||||
*
|
||||
* @author Stoyan Stefanov <ssttoo@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2005 Stoyan Stefanov
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.5.0
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
class Text_Highlighter_Renderer_HtmlTags extends Text_Highlighter_Renderer_Array
|
||||
{
|
||||
|
||||
/**#@+
|
||||
* @access private
|
||||
*/
|
||||
|
||||
/**
|
||||
* Line numbering - will use 'ol' tag
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
var $_numbers = false;
|
||||
|
||||
/**
|
||||
* HTML tags map
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
var $_hilite_tags = array(
|
||||
'default' => '',
|
||||
'code' => '',
|
||||
'brackets' => 'b',
|
||||
'comment' => 'i',
|
||||
'mlcomment' => 'i',
|
||||
'quotes' => '',
|
||||
'string' => 'i',
|
||||
'identifier' => 'b',
|
||||
'builtin' => 'b',
|
||||
'reserved' => 'u',
|
||||
'inlinedoc' => 'i',
|
||||
'var' => 'b',
|
||||
'url' => 'i',
|
||||
'special' => '',
|
||||
'number' => '',
|
||||
'inlinetags' => '',
|
||||
);
|
||||
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Resets renderer state
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
*
|
||||
* Descendents of Text_Highlighter call this method from the constructor,
|
||||
* passing $options they get as parameter.
|
||||
*/
|
||||
function reset()
|
||||
{
|
||||
parent::reset();
|
||||
if (isset($this->_options['numbers'])) {
|
||||
$this->_numbers = $this->_options['numbers'];
|
||||
}
|
||||
if (isset($this->_options['tags'])) {
|
||||
$this->_hilite_tags = array_merge($this->_tags, $this->_options['tags']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Signals that no more tokens are available
|
||||
*
|
||||
* @abstract
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
function finalize()
|
||||
{
|
||||
|
||||
// get parent's output
|
||||
parent::finalize();
|
||||
$output = parent::getOutput();
|
||||
|
||||
$html_output = '';
|
||||
|
||||
// loop through each class=>content pair
|
||||
foreach ($output AS $token) {
|
||||
|
||||
if ($this->_enumerated) {
|
||||
$class = $token[0];
|
||||
$content = $token[1];
|
||||
} else {
|
||||
$key = key($token);
|
||||
$class = $key;
|
||||
$content = $token[$key];
|
||||
}
|
||||
|
||||
$iswhitespace = ctype_space($content);
|
||||
if (!$iswhitespace && !empty($this->_hilite_tags[$class])) {
|
||||
$html_output .= '<'. $this->_hilite_tags[$class] . '>' . $content . '</'. $this->_hilite_tags[$class] . '>';
|
||||
} else {
|
||||
$html_output .= $content;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($this->_numbers) {
|
||||
/* additional whitespace for browsers that do not display
|
||||
empty list items correctly */
|
||||
$html_output = '<li> ' . str_replace("\n", "</li>\n<li> ", $html_output) . '</li>';
|
||||
$this->_output = '<ol>' . str_replace(' ', ' ', $html_output) . '</ol>';
|
||||
} else {
|
||||
$this->_output = '<pre>' . $html_output . '</pre>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* c-hanging-comment-ender-p: nil
|
||||
* End:
|
||||
*/
|
||||
|
||||
?>
|
||||
86
framework/vendors/TextHighlighter/Text/Highlighter/Renderer/JSON.php
vendored
Normal file
86
framework/vendors/TextHighlighter/Text/Highlighter/Renderer/JSON.php
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
/**
|
||||
* JSON renderer.
|
||||
*
|
||||
* Based on the HTML renderer by Andrey Demenev.
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @author Stoyan Stefanov <ssttoo@gmail.com>
|
||||
* @copyright 2006 Stoyan Stefanov
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version CVS: $Id: JSON.php,v 1.1 2007/06/03 02:37:09 ssttoo Exp $
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__).'/../Renderer.php';
|
||||
require_once dirname(__FILE__).'/../Renderer/Array.php';
|
||||
|
||||
/**
|
||||
* JSON renderer, based on Andrey Demenev's HTML renderer.
|
||||
*
|
||||
* @author Stoyan Stefanov <ssttoo@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2006 Stoyan Stefanov
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.5.0
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
class Text_Highlighter_Renderer_JSON extends Text_Highlighter_Renderer_Array
|
||||
{
|
||||
|
||||
/**
|
||||
* Signals that no more tokens are available
|
||||
*
|
||||
* @abstract
|
||||
* @access public
|
||||
*/
|
||||
function finalize()
|
||||
{
|
||||
|
||||
parent::finalize();
|
||||
$output = parent::getOutput();
|
||||
|
||||
$json_array = array();
|
||||
|
||||
foreach ($output AS $token) {
|
||||
|
||||
if ($this->_enumerated) {
|
||||
$json_array[] = '["' . $token[0] . '","' . $token[1] . '"]';
|
||||
} else {
|
||||
$key = key($token);
|
||||
$json_array[] = '{"class": "' . $key . '","content":"' . $token[$key] . '"}';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->_output = '['. implode(',', $json_array) .']';
|
||||
$this->_output = str_replace("\n", '\n', $this->_output);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* c-hanging-comment-ender-p: nil
|
||||
* End:
|
||||
*/
|
||||
|
||||
?>
|
||||
103
framework/vendors/TextHighlighter/Text/Highlighter/Renderer/XML.php
vendored
Normal file
103
framework/vendors/TextHighlighter/Text/Highlighter/Renderer/XML.php
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
/**
|
||||
* XML renderer.
|
||||
*
|
||||
* Based on the HTML renderer by Andrey Demenev.
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @author Stoyan Stefanov <ssttoo@gmail.com>
|
||||
* @copyright 2006 Stoyan Stefanov
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version CVS: $Id: XML.php,v 1.1 2007/06/03 02:37:09 ssttoo Exp $
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__).'/../Renderer.php';
|
||||
require_once dirname(__FILE__).'/../Renderer/Array.php';
|
||||
|
||||
/**
|
||||
* XML renderer, based on Andrey Demenev's HTML renderer.
|
||||
*
|
||||
* @author Stoyan Stefanov <ssttoo@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2006 Stoyan Stefanov
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.5.0
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
class Text_Highlighter_Renderer_XML extends Text_Highlighter_Renderer_Array
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Options for XML_Serializer
|
||||
*
|
||||
* @access private
|
||||
* @var array
|
||||
*/
|
||||
var $_serializer_options = array();
|
||||
|
||||
|
||||
/**
|
||||
* Resets renderer state
|
||||
*
|
||||
* Descendents of Text_Highlighter call this method from the constructor,
|
||||
* passing $options they get as parameter.
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
function reset()
|
||||
{
|
||||
parent::reset();
|
||||
if (isset($this->_options['xml_serializer'])) {
|
||||
$this->_serializer_options = $this->_options['xml_serializer'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Signals that no more tokens are available
|
||||
*
|
||||
* @abstract
|
||||
* @access public
|
||||
*/
|
||||
function finalize()
|
||||
{
|
||||
|
||||
// call parent's finalize(), then serialize array into XML
|
||||
parent::finalize();
|
||||
$output = parent::getOutput();
|
||||
|
||||
$serializer = new XML_Serializer($this->_serializer_options);
|
||||
$result = $serializer->serialize($output);
|
||||
if ($result === true) {
|
||||
$this->_output = $serializer->getSerializedData();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* c-hanging-comment-ender-p: nil
|
||||
* End:
|
||||
*/
|
||||
|
||||
?>
|
||||
1207
framework/vendors/TextHighlighter/Text/Highlighter/SH.php
vendored
Normal file
1207
framework/vendors/TextHighlighter/Text/Highlighter/SH.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
401
framework/vendors/TextHighlighter/Text/Highlighter/SQL.php
vendored
Normal file
401
framework/vendors/TextHighlighter/Text/Highlighter/SQL.php
vendored
Normal file
@@ -0,0 +1,401 @@
|
||||
<?php
|
||||
/**
|
||||
* Auto-generated class. SQL syntax highlighting
|
||||
*
|
||||
* Based on SQL-99
|
||||
*
|
||||
* PHP version 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @version generated from: : sql.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Auto-generated class. SQL syntax highlighting
|
||||
*
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
class Text_Highlighter_SQL extends Text_Highlighter
|
||||
{
|
||||
var $_language = 'sql';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $options
|
||||
* @access public
|
||||
*/
|
||||
function __construct($options=array())
|
||||
{
|
||||
|
||||
$this->_options = $options;
|
||||
$this->_regs = array (
|
||||
-1 => '/((?i)`)|((?i)\\/\\*)|((?i)(#|--\\s).*)|((?i)[a-z_]\\w*)|((?i)")|((?i)\\()|((?i)\')|((?i)((\\d+|((\\d*\\.\\d+)|(\\d+\\.\\d*)))[eE][+-]?\\d+))|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)\\d+l?|\\b0l?\\b)|((?i)0[xX][\\da-f]+l?)/',
|
||||
0 => '//',
|
||||
1 => '//',
|
||||
2 => '/((?i)\\\\.)/',
|
||||
3 => '/((?i)`)|((?i)\\/\\*)|((?i)(#|--\\s).*)|((?i)[a-z_]\\w*)|((?i)")|((?i)\\()|((?i)\')|((?i)((\\d+|((\\d*\\.\\d+)|(\\d+\\.\\d*)))[eE][+-]?\\d+))|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)\\d+l?|\\b0l?\\b)|((?i)0[xX][\\da-f]+l?)/',
|
||||
4 => '/((?i)\\\\.)/',
|
||||
);
|
||||
$this->_counts = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 1,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 5,
|
||||
8 => 2,
|
||||
9 => 0,
|
||||
10 => 0,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 1,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
6 => 0,
|
||||
7 => 5,
|
||||
8 => 2,
|
||||
9 => 0,
|
||||
10 => 0,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 0,
|
||||
),
|
||||
);
|
||||
$this->_delim = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'quotes',
|
||||
1 => 'comment',
|
||||
2 => '',
|
||||
3 => '',
|
||||
4 => 'quotes',
|
||||
5 => 'brackets',
|
||||
6 => 'quotes',
|
||||
7 => '',
|
||||
8 => '',
|
||||
9 => '',
|
||||
10 => '',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 'quotes',
|
||||
1 => 'comment',
|
||||
2 => '',
|
||||
3 => '',
|
||||
4 => 'quotes',
|
||||
5 => 'brackets',
|
||||
6 => 'quotes',
|
||||
7 => '',
|
||||
8 => '',
|
||||
9 => '',
|
||||
10 => '',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
);
|
||||
$this->_inner = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'identifier',
|
||||
1 => 'comment',
|
||||
2 => 'comment',
|
||||
3 => 'identifier',
|
||||
4 => 'string',
|
||||
5 => 'code',
|
||||
6 => 'string',
|
||||
7 => 'number',
|
||||
8 => 'number',
|
||||
9 => 'number',
|
||||
10 => 'number',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 'identifier',
|
||||
1 => 'comment',
|
||||
2 => 'comment',
|
||||
3 => 'identifier',
|
||||
4 => 'string',
|
||||
5 => 'code',
|
||||
6 => 'string',
|
||||
7 => 'number',
|
||||
8 => 'number',
|
||||
9 => 'number',
|
||||
10 => 'number',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
);
|
||||
$this->_end = array (
|
||||
0 => '/(?i)`/',
|
||||
1 => '/(?i)\\*\\//',
|
||||
2 => '/(?i)"/',
|
||||
3 => '/(?i)\\)/',
|
||||
4 => '/(?i)\'/',
|
||||
);
|
||||
$this->_states = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => 2,
|
||||
5 => 3,
|
||||
6 => 4,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
9 => -1,
|
||||
10 => -1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
4 => 2,
|
||||
5 => 3,
|
||||
6 => 4,
|
||||
7 => -1,
|
||||
8 => -1,
|
||||
9 => -1,
|
||||
10 => -1,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
);
|
||||
$this->_keywords = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'reserved' => '/^((?i)absolute|action|add|admin|after|aggregate|alias|all|allocate|alter|and|any|are|array|as|asc|assertion|at|authorization|before|begin|binary|bit|blob|boolean|both|breadth|by|call|cascade|cascaded|case|cast|catalog|char|character|check|class|clob|close|collate|collation|column|commit|completion|connect|connection|constraint|constraints|constructor|continue|corresponding|create|cross|cube|current|current_date|current_path|current_role|current_time|current_timestamp|current_user|cursor|cycle|data|date|day|deallocate|dec|decimal|declare|default|deferrable|deferred|delete|depth|deref|desc|describe|descriptor|destroy|destructor|deterministic|diagnostics|dictionary|disconnect|distinct|domain|double|drop|dynamic|each|else|end|end-exec|equals|escape|every|except|exception|exec|execute|external|false|fetch|first|float|for|foreign|found|free|from|full|function|general|get|global|go|goto|grant|group|grouping|having|host|hour|identity|ignore|immediate|in|indicator|initialize|initially|inner|inout|input|insert|int|integer|intersect|interval|into|is|isolation|iterate|join|key|language|large|last|lateral|leading|left|less|level|like|limit|local|localtime|localtimestamp|locator|map|match|minute|modifies|modify|module|month|names|national|natural|nchar|nclob|new|next|no|none|not|null|numeric|object|of|off|old|on|only|open|operation|option|or|order|ordinality|out|outer|output|pad|parameter|parameters|partial|path|postfix|precision|prefix|preorder|prepare|preserve|primary|prior|privileges|procedure|public|read|reads|real|recursive|ref|references|referencing|relative|restrict|result|return|returns|revoke|right|role|rollback|rollup|routine|row|rows|savepoint|schema|scope|scroll|search|second|section|select|sequence|session|session_user|set|sets|size|smallint|some|space|specific|specifictype|sql|sqlexception|sqlstate|sqlwarning|start|state|statement|static|structure|system_user|table|temporary|terminate|than|then|time|timestamp|timezone_hour|timezone_minute|to|trailing|transaction|translation|treat|trigger|true|under|union|unique|unknown|unnest|update|usage|user|using|value|values|varchar|variable|varying|view|when|whenever|where|with|without|work|write|year|zone)$/',
|
||||
'keyword' => '/^((?i)abs|ada|asensitive|assignment|asymmetric|atomic|avg|between|bitvar|bit_length|c|called|cardinality|catalog_name|chain|character_length|character_set_catalog|character_set_name|character_set_schema|char_length|checked|class_origin|coalesce|cobol|collation_catalog|collation_name|collation_schema|column_name|command_function|command_function_code|committed|condition_number|connection_name|constraint_catalog|constraint_name|constraint_schema|contains|convert|count|cursor_name|datetime_interval_code|datetime_interval_precision|defined|definer|dispatch|dynamic_function|dynamic_function_code|existing|exists|extract|final|fortran|g|generated|granted|hierarchy|hold|implementation|infix|insensitive|instance|instantiable|invoker|k|key_member|key_type|length|lower|m|max|message_length|message_octet_length|message_text|method|min|mod|more|mumps|name|nullable|nullif|number|octet_length|options|overlaps|overlay|overriding|parameter_mode|parameter_name|parameter_ordinal_position|parameter_specific_catalog|parameter_specific_name|parameter_specific_schema|pascal|pli|position|repeatable|returned_length|returned_octet_length|returned_sqlstate|routine_catalog|routine_name|routine_schema|row_count|scale|schema_name|security|self|sensitive|serializable|server_name|similar|simple|source|specific_name|style|subclass_origin|sublist|substring|sum|symmetric|system|table_name|transactions_committed|transactions_rolled_back|transaction_active|transform|transforms|translate|trigger_catalog|trigger_name|trigger_schema|trim|type|uncommitted|unnamed|upper|user_defined_type_catalog|user_defined_type_name|user_defined_type_schema)$/',
|
||||
),
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 =>
|
||||
array (
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'reserved' => '/^((?i)absolute|action|add|admin|after|aggregate|alias|all|allocate|alter|and|any|are|array|as|asc|assertion|at|authorization|before|begin|binary|bit|blob|boolean|both|breadth|by|call|cascade|cascaded|case|cast|catalog|char|character|check|class|clob|close|collate|collation|column|commit|completion|connect|connection|constraint|constraints|constructor|continue|corresponding|create|cross|cube|current|current_date|current_path|current_role|current_time|current_timestamp|current_user|cursor|cycle|data|date|day|deallocate|dec|decimal|declare|default|deferrable|deferred|delete|depth|deref|desc|describe|descriptor|destroy|destructor|deterministic|diagnostics|dictionary|disconnect|distinct|domain|double|drop|dynamic|each|else|end|end-exec|equals|escape|every|except|exception|exec|execute|external|false|fetch|first|float|for|foreign|found|free|from|full|function|general|get|global|go|goto|grant|group|grouping|having|host|hour|identity|ignore|immediate|in|indicator|initialize|initially|inner|inout|input|insert|int|integer|intersect|interval|into|is|isolation|iterate|join|key|language|large|last|lateral|leading|left|less|level|like|limit|local|localtime|localtimestamp|locator|map|match|minute|modifies|modify|module|month|names|national|natural|nchar|nclob|new|next|no|none|not|null|numeric|object|of|off|old|on|only|open|operation|option|or|order|ordinality|out|outer|output|pad|parameter|parameters|partial|path|postfix|precision|prefix|preorder|prepare|preserve|primary|prior|privileges|procedure|public|read|reads|real|recursive|ref|references|referencing|relative|restrict|result|return|returns|revoke|right|role|rollback|rollup|routine|row|rows|savepoint|schema|scope|scroll|search|second|section|select|sequence|session|session_user|set|sets|size|smallint|some|space|specific|specifictype|sql|sqlexception|sqlstate|sqlwarning|start|state|statement|static|structure|system_user|table|temporary|terminate|than|then|time|timestamp|timezone_hour|timezone_minute|to|trailing|transaction|translation|treat|trigger|true|under|union|unique|unknown|unnest|update|usage|user|using|value|values|varchar|variable|varying|view|when|whenever|where|with|without|work|write|year|zone)$/',
|
||||
'keyword' => '/^((?i)abs|ada|asensitive|assignment|asymmetric|atomic|avg|between|bitvar|bit_length|c|called|cardinality|catalog_name|chain|character_length|character_set_catalog|character_set_name|character_set_schema|char_length|checked|class_origin|coalesce|cobol|collation_catalog|collation_name|collation_schema|column_name|command_function|command_function_code|committed|condition_number|connection_name|constraint_catalog|constraint_name|constraint_schema|contains|convert|count|cursor_name|datetime_interval_code|datetime_interval_precision|defined|definer|dispatch|dynamic_function|dynamic_function_code|existing|exists|extract|final|fortran|g|generated|granted|hierarchy|hold|implementation|infix|insensitive|instance|instantiable|invoker|k|key_member|key_type|length|lower|m|max|message_length|message_octet_length|message_text|method|min|mod|more|mumps|name|nullable|nullif|number|octet_length|options|overlaps|overlay|overriding|parameter_mode|parameter_name|parameter_ordinal_position|parameter_specific_catalog|parameter_specific_name|parameter_specific_schema|pascal|pli|position|repeatable|returned_length|returned_octet_length|returned_sqlstate|routine_catalog|routine_name|routine_schema|row_count|scale|schema_name|security|self|sensitive|serializable|server_name|similar|simple|source|specific_name|style|subclass_origin|sublist|substring|sum|symmetric|system|table_name|transactions_committed|transactions_rolled_back|transaction_active|transform|transforms|translate|trigger_catalog|trigger_name|trigger_schema|trim|type|uncommitted|unnamed|upper|user_defined_type_catalog|user_defined_type_name|user_defined_type_schema)$/',
|
||||
),
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
6 => -1,
|
||||
7 =>
|
||||
array (
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
);
|
||||
$this->_parts = array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
6 => NULL,
|
||||
7 => NULL,
|
||||
8 => NULL,
|
||||
9 => NULL,
|
||||
10 => NULL,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
);
|
||||
$this->_subst = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
10 => false,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
6 => false,
|
||||
7 => false,
|
||||
8 => false,
|
||||
9 => false,
|
||||
10 => false,
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
);
|
||||
$this->_conditions = array (
|
||||
);
|
||||
$this->_kwmap = array (
|
||||
'reserved' => 'reserved',
|
||||
'keyword' => 'var',
|
||||
);
|
||||
$this->_defClass = 'code';
|
||||
$this->_checkDefines();
|
||||
}
|
||||
|
||||
}
|
||||
300
framework/vendors/TextHighlighter/Text/Highlighter/VBSCRIPT.php
vendored
Normal file
300
framework/vendors/TextHighlighter/Text/Highlighter/VBSCRIPT.php
vendored
Normal file
@@ -0,0 +1,300 @@
|
||||
<?php
|
||||
/**
|
||||
* Auto-generated class. VBSCRIPT syntax highlighting
|
||||
*
|
||||
* PHP version 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @version generated from: : vbscript.xml,v 1.2 2008/01/02 00:05:52 ssttoo Exp
|
||||
* @author Daniel Fruzynski <daniel-AT-poradnik-webmastera.com>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Auto-generated class. VBSCRIPT syntax highlighting
|
||||
*
|
||||
* @author Daniel Fruzynski <daniel-AT-poradnik-webmastera.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
class Text_Highlighter_VBSCRIPT extends Text_Highlighter
|
||||
{
|
||||
var $_language = 'vbscript';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $options
|
||||
* @access public
|
||||
*/
|
||||
function __construct($options=array())
|
||||
{
|
||||
|
||||
$this->_options = $options;
|
||||
$this->_regs = array (
|
||||
-1 => '/((?i)\\()|((?i)")|((?i)\'|[Rr][Ee][Mm]\\b)|((?i)\\d*\\.?\\d+)|((?i)&H[0-9a-fA-F]+)|((?i)[a-z_]\\w*)/',
|
||||
0 => '/((?i)\\()|((?i)")|((?i)\'|[Rr][Ee][Mm]\\b)|((?i)\\d*\\.?\\d+)|((?i)&H[0-9a-fA-F]+)|((?i)[a-z_]\\w*)/',
|
||||
1 => '//',
|
||||
2 => '/((?i)((https?|ftp):\\/\\/[\\w\\?\\.\\-\\&=\\/%+]+)|(^|[\\s,!?])www\\.\\w+\\.\\w+[\\w\\?\\.\\&=\\/%+]*)|((?i)\\w+[\\.\\w\\-]+@(\\w+[\\.\\w\\-])+)|((?i)\\b(note|fixme):)|((?i)\\$\\w+:.+\\$)/',
|
||||
);
|
||||
$this->_counts = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 0,
|
||||
4 => 0,
|
||||
5 => 0,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 3,
|
||||
1 => 1,
|
||||
2 => 1,
|
||||
3 => 0,
|
||||
),
|
||||
);
|
||||
$this->_delim = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'brackets',
|
||||
1 => 'quotes',
|
||||
2 => 'comment',
|
||||
3 => '',
|
||||
4 => '',
|
||||
5 => '',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 'brackets',
|
||||
1 => 'quotes',
|
||||
2 => 'comment',
|
||||
3 => '',
|
||||
4 => '',
|
||||
5 => '',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => '',
|
||||
1 => '',
|
||||
2 => '',
|
||||
3 => '',
|
||||
),
|
||||
);
|
||||
$this->_inner = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'code',
|
||||
1 => 'string',
|
||||
2 => 'comment',
|
||||
3 => 'number',
|
||||
4 => 'number',
|
||||
5 => 'identifier',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 'code',
|
||||
1 => 'string',
|
||||
2 => 'comment',
|
||||
3 => 'number',
|
||||
4 => 'number',
|
||||
5 => 'identifier',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'url',
|
||||
1 => 'url',
|
||||
2 => 'inlinedoc',
|
||||
3 => 'inlinedoc',
|
||||
),
|
||||
);
|
||||
$this->_end = array (
|
||||
0 => '/(?i)\\)/',
|
||||
1 => '/(?i)"/',
|
||||
2 => '/(?mi)$/',
|
||||
);
|
||||
$this->_states = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => -1,
|
||||
4 => -1,
|
||||
5 => -1,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 => -1,
|
||||
),
|
||||
);
|
||||
$this->_keywords = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'constants' => '/^((?i)vbblack|vbred|vbgreen|vbyellow|vbblue|vbmagenta|vbcyan|vbwhite|vbbinarycompare|vbtextcompare|vbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbokonly|vbokcancel|vbabortretryignore|vbyesnocancel|vbyesno|vbretrycancel|vbcritical|vbquestion|vbexclamation|vbinformation|vbdefaultbutton1|vbdefaultbutton2|vbdefaultbutton3|vbdefaultbutton4|vbapplicationmodal|vbsystemmodal|vbok|vbcancel|vbabort|vbretry|vbignore|vbyes|vbno|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|vbtab|vbverticaltab|vbusedefault|vbtrue|vbfalse|vbempty|vbnull|vbinteger|vblong|vbsingle|vbdouble|vbcurrency|vbdate|vbstring|vbobject|vberror|vbboolean|vbvariant|vbdataobject|vbdecimal|vbbyte|vbarray)$/',
|
||||
'functions' => '/^((?i)abs|array|asc|atn|cbool|cbyte|ccur|cdate|cdbl|chr|cint|clng|cos|createobject|csng|cstr|date|dateadd|datediff|datepart|dateserial|datevalue|day|escape|eval|exp|filter|formatcurrency|formatdatetime|formatnumber|formatpercent|getlocale|getobject|getref|hex|hour|inputbox|instr|instrrev|int|fix|isarray|isdate|isempty|isnull|isnumeric|isobject|join|lbound|lcase|left|len|loadpicture|log|ltrim|rtrim|trim|mid|minute|month|monthname|msgbox|now|oct|replace|rgb|right|rnd|round|scriptengine|scriptenginebuildversion|scriptenginemajorversion|scriptengineminorversion|second|setlocale|sgn|sin|space|split|sqr|strcomp|string|strreverse|tan|time|timer|timeserial|timevalue|typename|ubound|ucase|unescape|vartype|weekday|weekdayname|year)$/',
|
||||
'builtin' => '/^((?i)debug|err|match|regexp)$/',
|
||||
'reserved' => '/^((?i)empty|false|nothing|null|true|and|eqv|imp|is|mod|not|or|xor|call|class|end|const|public|private|dim|do|while|until|exit|loop|erase|execute|executeglobal|for|each|in|to|step|next|function|default|if|then|else|elseif|on|error|resume|goto|option|explicit|property|get|let|set|randomize|redim|preserve|select|case|stop|sub|wend|with)$/',
|
||||
),
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'constants' => '/^((?i)vbblack|vbred|vbgreen|vbyellow|vbblue|vbmagenta|vbcyan|vbwhite|vbbinarycompare|vbtextcompare|vbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbokonly|vbokcancel|vbabortretryignore|vbyesnocancel|vbyesno|vbretrycancel|vbcritical|vbquestion|vbexclamation|vbinformation|vbdefaultbutton1|vbdefaultbutton2|vbdefaultbutton3|vbdefaultbutton4|vbapplicationmodal|vbsystemmodal|vbok|vbcancel|vbabort|vbretry|vbignore|vbyes|vbno|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|vbtab|vbverticaltab|vbusedefault|vbtrue|vbfalse|vbempty|vbnull|vbinteger|vblong|vbsingle|vbdouble|vbcurrency|vbdate|vbstring|vbobject|vberror|vbboolean|vbvariant|vbdataobject|vbdecimal|vbbyte|vbarray)$/',
|
||||
'functions' => '/^((?i)abs|array|asc|atn|cbool|cbyte|ccur|cdate|cdbl|chr|cint|clng|cos|createobject|csng|cstr|date|dateadd|datediff|datepart|dateserial|datevalue|day|escape|eval|exp|filter|formatcurrency|formatdatetime|formatnumber|formatpercent|getlocale|getobject|getref|hex|hour|inputbox|instr|instrrev|int|fix|isarray|isdate|isempty|isnull|isnumeric|isobject|join|lbound|lcase|left|len|loadpicture|log|ltrim|rtrim|trim|mid|minute|month|monthname|msgbox|now|oct|replace|rgb|right|rnd|round|scriptengine|scriptenginebuildversion|scriptenginemajorversion|scriptengineminorversion|second|setlocale|sgn|sin|space|split|sqr|strcomp|string|strreverse|tan|time|timer|timeserial|timevalue|typename|ubound|ucase|unescape|vartype|weekday|weekdayname|year)$/',
|
||||
'builtin' => '/^((?i)debug|err|match|regexp)$/',
|
||||
'reserved' => '/^((?i)empty|false|nothing|null|true|and|eqv|imp|is|mod|not|or|xor|call|class|end|const|public|private|dim|do|while|until|exit|loop|erase|execute|executeglobal|for|each|in|to|step|next|function|default|if|then|else|elseif|on|error|resume|goto|option|explicit|property|get|let|set|randomize|redim|preserve|select|case|stop|sub|wend|with)$/',
|
||||
),
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
);
|
||||
$this->_parts = array (
|
||||
0 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
4 => NULL,
|
||||
5 => NULL,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
3 => NULL,
|
||||
),
|
||||
);
|
||||
$this->_subst = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
4 => false,
|
||||
5 => false,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
),
|
||||
);
|
||||
$this->_conditions = array (
|
||||
);
|
||||
$this->_kwmap = array (
|
||||
'constants' => 'builtin',
|
||||
'functions' => 'builtin',
|
||||
'builtin' => 'builtin',
|
||||
'reserved' => 'reserved',
|
||||
);
|
||||
$this->_defClass = 'code';
|
||||
$this->_checkDefines();
|
||||
}
|
||||
|
||||
}
|
||||
245
framework/vendors/TextHighlighter/Text/Highlighter/XML.php
vendored
Normal file
245
framework/vendors/TextHighlighter/Text/Highlighter/XML.php
vendored
Normal file
@@ -0,0 +1,245 @@
|
||||
<?php
|
||||
/**
|
||||
* Auto-generated class. XML syntax highlighting
|
||||
*
|
||||
* PHP version 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @version generated from: : xml.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Auto-generated class. XML syntax highlighting
|
||||
*
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @copyright 2004-2006 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version Release: 0.7.1
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
class Text_Highlighter_XML extends Text_Highlighter
|
||||
{
|
||||
var $_language = 'xml';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $options
|
||||
* @access public
|
||||
*/
|
||||
function __construct($options=array())
|
||||
{
|
||||
|
||||
$this->_options = $options;
|
||||
$this->_regs = array (
|
||||
-1 => '/((?i)\\<\\!\\[CDATA\\[)|((?i)\\<!--)|((?i)\\<[\\?\\/]?)|((?i)(&|%)[\\w\\-\\.]+;)/',
|
||||
0 => '//',
|
||||
1 => '//',
|
||||
2 => '/((?i)(?<=[\\<\\/?])[\\w\\-\\:]+)|((?i)[\\w\\-\\:]+)|((?i)")/',
|
||||
3 => '/((?i)(&|%)[\\w\\-\\.]+;)/',
|
||||
);
|
||||
$this->_counts = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
3 => 1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 1,
|
||||
),
|
||||
);
|
||||
$this->_delim = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'comment',
|
||||
2 => 'brackets',
|
||||
3 => '',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => '',
|
||||
1 => '',
|
||||
2 => 'quotes',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => '',
|
||||
),
|
||||
);
|
||||
$this->_inner = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 'comment',
|
||||
1 => 'comment',
|
||||
2 => 'code',
|
||||
3 => 'special',
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => 'reserved',
|
||||
1 => 'var',
|
||||
2 => 'string',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => 'special',
|
||||
),
|
||||
);
|
||||
$this->_end = array (
|
||||
0 => '/(?i)\\]\\]\\>/',
|
||||
1 => '/(?i)--\\>/',
|
||||
2 => '/(?i)[\\/\\?]?\\>/',
|
||||
3 => '/(?i)"/',
|
||||
);
|
||||
$this->_states = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 1,
|
||||
2 => 2,
|
||||
3 => -1,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => 3,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => -1,
|
||||
),
|
||||
);
|
||||
$this->_keywords = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => -1,
|
||||
1 => -1,
|
||||
2 => -1,
|
||||
3 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 => -1,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
);
|
||||
$this->_parts = array (
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
1 => NULL,
|
||||
2 => NULL,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => NULL,
|
||||
),
|
||||
);
|
||||
$this->_subst = array (
|
||||
-1 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
3 => false,
|
||||
),
|
||||
0 =>
|
||||
array (
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
0 => false,
|
||||
1 => false,
|
||||
2 => false,
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
);
|
||||
$this->_conditions = array (
|
||||
);
|
||||
$this->_kwmap = array (
|
||||
);
|
||||
$this->_defClass = 'code';
|
||||
$this->_checkDefines();
|
||||
}
|
||||
|
||||
}
|
||||
455
framework/vendors/TextHighlighter/Text/README
vendored
Normal file
455
framework/vendors/TextHighlighter/Text/README
vendored
Normal file
@@ -0,0 +1,455 @@
|
||||
# $Id: README,v 1.2 2007/06/13 10:09:47 ssttoo Exp $
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
Text_Highlighter is a class for syntax highlighting. The main idea is to
|
||||
simplify creation of subclasses implementing syntax highlighting for
|
||||
particular language. Subclasses do not implement any new functioanality, they
|
||||
just provide syntax highlighting rules. The rules sources are in XML format.
|
||||
To create a highlighter for a language, there is no need to code a new class
|
||||
manually. Simply describe the rules in XML file and use Text_Highlighter_Generator
|
||||
to create a new class.
|
||||
|
||||
|
||||
This document does not contain a formal description of API - it is very
|
||||
simple, and I believe providing some examples of code is sufficient.
|
||||
|
||||
|
||||
Highlighter XML source
|
||||
======================
|
||||
|
||||
Basics
|
||||
------
|
||||
|
||||
Creating a new syntax highlighter begins with describing the highlighting
|
||||
rules. There are two basic elements: block and region. A block is just a
|
||||
portion of text matching a regular expression and highlighted with a single
|
||||
color. Keyword is an example of a block. A region is defined by two regular
|
||||
expressions: one for start of region, and another for the end. The main
|
||||
difference from a block is that a region can contain blocks and regions
|
||||
(including same-named regions). An example of a region is a group of
|
||||
statements enclosed in curly brackets (this is used in many languages, for
|
||||
example PHP and C). Also, characters matching start and end of a region may be
|
||||
highlighted with their own color, and region contents with another.
|
||||
|
||||
Blocks and regions may be declared as contained. Contained blocks and regions
|
||||
can only appear inside regions. If a region or a block is not declared as
|
||||
contained, it can appear both on top level and inside regions. Block or region
|
||||
declared as not-contained can only appear on top level.
|
||||
|
||||
For any region, a list of blocks and regions that can appear inside this
|
||||
region can be specified.
|
||||
|
||||
In this document, the term "color group" is used. Chunks of text assigned to
|
||||
same color group will be highlighted with same color. Note that in versions
|
||||
prior 0.5.0 color goups were refered as CSS classes, but since 0.5.0 not only
|
||||
HTML output is supported, so "color group" is more appropriate term.
|
||||
|
||||
Elements
|
||||
--------
|
||||
|
||||
The toplevel element is <highlight>. Attribute lang is required and denotes
|
||||
the name of the language. Its value is used as a part of generated class name,
|
||||
and must only contain letters, digits and underscores. Optional attribute
|
||||
case, when given value yes, makes the language case sensitive (default is case
|
||||
insensitive). Allowed subelements are:
|
||||
|
||||
* <authors>: Information about the authors of the file.
|
||||
<author>: Information about a single author of the file. (May be used
|
||||
multiple times, one per author.)
|
||||
- name="...": Author's name. Required.
|
||||
- email="...": Author's email address. Optional.
|
||||
|
||||
* <default>: Default color group.
|
||||
- innerGroup="...": color group name. Required.
|
||||
|
||||
* <region>: Region definition
|
||||
- name="...": Region name. Required.
|
||||
- innerGroup="...": Default color group of region contents. Required.
|
||||
- delimGroup="...": color group of start and end of region. Optional,
|
||||
defaults to value of innerGroup attribute.
|
||||
- start="...", end="...": Regular expression matching start and end
|
||||
of region. Required. Regular expression delimiters are optional, but
|
||||
if you need to specify delimiter, use /. The only case when the
|
||||
delimiters are needed, is specifying regular expression modifiers,
|
||||
such as m or U. Examples: \/\* or /$/m.
|
||||
- contained="yes": Marks region as contained.
|
||||
- never-contained="yes": Marks region as not-contained.
|
||||
- <contains>: Elements allowed inside this region.
|
||||
- all="yes" Region can contain any other region or block
|
||||
(except not-contained). May be used multiple times.
|
||||
- <but> Do not allow certain regions or blocks.
|
||||
- region="..." Name of region not allowed within
|
||||
current region.
|
||||
- block="..." Name of block not allowed within
|
||||
current region.
|
||||
- region="..." Name of region allowed within current region.
|
||||
- block="..." Name of block allowed within current region.
|
||||
- <onlyin> Only allow this region within certain regions. May be
|
||||
used multiple times.
|
||||
- block="..." Name of parent region
|
||||
|
||||
* <block>: Block definition
|
||||
- name="...": Block name. Required.
|
||||
- innerGroup="...": color group of block contents. Optional. If not
|
||||
specified, color group of parent region or default color group will be
|
||||
used. One would only want to omit this attribute if there are
|
||||
keyword groups (see below) inherited from this block, and no special
|
||||
highlighting should apply when the block does not match the keyword.
|
||||
- match="..." Regular expression matching the block. Required.
|
||||
Regular expression delimiters are optional, but if you need to
|
||||
specify delimiter, use /. The only case when the delimiters are
|
||||
needed, is specifying regular expression modifiers, such as m or U.
|
||||
Examples: #|\/\/ or /$/m.
|
||||
- contained="yes": Marks block as contained.
|
||||
- never-contained="yes": Marks block as not-contained.
|
||||
- <onlyin> Only allow this block within certain regions. May be used
|
||||
multiple times.
|
||||
- block="..." Name of parent region
|
||||
- multiline="yes": Marks block as multi-line. By default, whole
|
||||
blocks are assumed to reside in a single line. This make the things
|
||||
faster. If you need to declare a multi-line block, use this
|
||||
attribute.
|
||||
- <partgroup>: Assigns another color group to a part of the block that
|
||||
matched a subpattern.
|
||||
- index="n": Subpattern index. Required.
|
||||
- innerGroup="...": color group name. Required.
|
||||
|
||||
This is an example from CSS highlighter: the measure is matched as
|
||||
a whole, but the measurement units are highlighted with different
|
||||
color.
|
||||
|
||||
<block name="measure" match="\d*\.?\d+(\%|em|ex|pc|pt|px|in|mm|cm)"
|
||||
innerGroup="number" contained="yes">
|
||||
<onlyin region="property"/>
|
||||
<partGroup index="1" innerGroup="string" />
|
||||
</block>
|
||||
|
||||
* <keywords>: Keyword group definition. Keyword groups are useful when you
|
||||
want to highlight some words that match a condition for a block with a
|
||||
different color. Keywords are defined with literal match, not regular
|
||||
expressions. For example, you have a block named identifier matching a
|
||||
general identifier, and want to highlight reserved words (which match
|
||||
this block as well) with different color. You inherit a keyword group
|
||||
"reserved" from "identifier" block.
|
||||
- name="...": Keyword group. Required.
|
||||
- ifdef="...", ifndef="..." : Conditional declaration. See
|
||||
"Conditions" below.
|
||||
- inherits="...": Inherited block name. Required.
|
||||
- innerGroup="...": color group of keyword group. Required.
|
||||
- case="yes|no": Overrides case-sensitivity of the language.
|
||||
Optional, defaults to global value.
|
||||
- <keyword>: Single keyword definition.
|
||||
- match="..." The keyword. Note: this is not a regular
|
||||
expression, but literal match (possibly case insensitive).
|
||||
|
||||
Note that for BC reasons element partClass is alias for partGroup, and
|
||||
attributes innerClass and delimClass are aliases of innerGroup and
|
||||
delimGroup, respectively.
|
||||
|
||||
|
||||
Conditions
|
||||
----------
|
||||
|
||||
Conditional declarations allow enabling or disabling certain highlighting
|
||||
rules at runtime. For example, Java highlighter has a very big list of
|
||||
keywords matching Java standard classes. Finding a match in this list can take
|
||||
much time. For that reason, corresponding keyword group is declared with
|
||||
"ifdef" attribute :
|
||||
|
||||
<keywords name="builtin" inherits="identifier" innerClass="builtin"
|
||||
case="yes" ifdef="java.builtins">
|
||||
<keyword match="AbstractAction" />
|
||||
<keyword match="AbstractBorder" />
|
||||
<keyword match="AbstractButton" />
|
||||
...
|
||||
...
|
||||
<keyword match="_Remote_Stub" />
|
||||
<keyword match="_ServantActivatorStub" />
|
||||
<keyword match="_ServantLocatorStub" />
|
||||
</keywords>
|
||||
|
||||
This keyword group will be only enabled when "java.builtins" is passed as an
|
||||
element of "defines" option:
|
||||
|
||||
$options = array(
|
||||
'defines' => array(
|
||||
'java.builtins',
|
||||
),
|
||||
'numbers' => HL_NUMBERS_TABLE,
|
||||
);
|
||||
$highlighter =& Text_Highlighter::factory('java', $options);
|
||||
|
||||
"ifndef" attribute has reverse meaning.
|
||||
|
||||
Currently, "ifdef" and "ifndef" attributes are only supported for <keywords>
|
||||
tag.
|
||||
|
||||
|
||||
|
||||
Class generation
|
||||
================
|
||||
|
||||
Creating XML description of highlighting rules is the most complicated part of
|
||||
the process. To generate the class, you need just few lines of code:
|
||||
|
||||
<?php
|
||||
require_once 'Text/Highlighter/Generator.php';
|
||||
$generator =& new Text_Highlighter_Generator('php.xml');
|
||||
$generator->generate();
|
||||
$generator->saveCode('PHP.php');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
Command-line class generation tool
|
||||
==================================
|
||||
|
||||
Example from previous section looks pretty simple, but it does not handle any
|
||||
errors which may occur during parsing of XML source. The package provides a
|
||||
command-line script to make generation of classes even more simple, and takes
|
||||
care of possible errors. It is called generate (on Unix/Linux) or generate.bat
|
||||
(on Windows). This script is able to process multiple files in one run, and
|
||||
also to process XML from standard input and write generated code to standard
|
||||
output.
|
||||
|
||||
Usage:
|
||||
generate options
|
||||
|
||||
Options:
|
||||
-x filename, --xml=filename
|
||||
source XML file. Multiple input files can be specified, in which
|
||||
case each -x option must be followed by -p unless -d is specified
|
||||
Defaults to stdin
|
||||
-p filename, --php=filename
|
||||
destination PHP file. Defaults to stdout. If specied multiple times,
|
||||
each -p must follow -x
|
||||
-d dirname, --dir=dirname
|
||||
Default destination directory. File names will be taken from XML input
|
||||
("lang" attribute of <highlight> tag)
|
||||
-h, --help
|
||||
This help
|
||||
|
||||
Examples
|
||||
|
||||
Read from php.xml, write to PHP.php
|
||||
|
||||
generate -x php.xml -p PHP.php
|
||||
|
||||
Read from php.xml, write to standard output
|
||||
|
||||
generate -x php.xml
|
||||
|
||||
Read from php.xml, write to PHP.php, read from xml.xml, write to XML.php
|
||||
|
||||
generate -x php.xml -p PHP.php -x xml.xml -p XML.php
|
||||
|
||||
Read from php.xml, write to /some/dir/PHP.php, read from xml.xml, write to
|
||||
/some/dir/XML.php (assuming that xml.xml contains <highlight lang="xml">, and
|
||||
php.xml contains <highlight lang="php">)
|
||||
|
||||
generate -x php.xml -x xml.xml -d /some/dir/
|
||||
|
||||
|
||||
|
||||
Renderers
|
||||
=========
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
Text_Highlighter supports renderes. Using renderers, you can get output in
|
||||
different formats. Two renderers are included in the package:
|
||||
|
||||
- HTML renderer. Generates HTML output. A style sheet should be linked to
|
||||
the document to display colored text
|
||||
|
||||
- Console renderer. Can be used to output highlighted text to
|
||||
color-capable terminals, either directly or trough less -r
|
||||
|
||||
|
||||
Renderers API
|
||||
-------------
|
||||
|
||||
Renderers are subclasses of Text_Highlighter_Renderer. Renderer should
|
||||
override at least two methods - acceptToken and getOutput. Overriding other
|
||||
methods is optional, depending on the nature of renderer's output and details
|
||||
of implementation.
|
||||
|
||||
string reset()
|
||||
resets renderer state. This method is called every time before a new
|
||||
source file is highlighted.
|
||||
|
||||
string preprocess(string $code)
|
||||
preprocesses code. Can be used, for example, to normalize whitespace
|
||||
before highlighting. Returns preprocessed string.
|
||||
|
||||
void acceptToken(string $group, string $content)
|
||||
the core method of the renderer. Highlighter passes chunks of text to
|
||||
this method in $content, and color group in $group
|
||||
|
||||
void finalize()
|
||||
signals the renderer that no more tokens are available.
|
||||
|
||||
mixed getOutput()
|
||||
returns generated output.
|
||||
|
||||
|
||||
Setting renderer options
|
||||
--------------------------------
|
||||
|
||||
Renderers accept an optional argument to their constructor - options array.
|
||||
Elements of this array are renderer-specific.
|
||||
|
||||
HTML renderer
|
||||
-------------
|
||||
|
||||
HTML renderer produces HTML output with optional line numbering. The renderer
|
||||
itself does not provide information about actual colors of highlighted text.
|
||||
Instead, <span class="hl-XXX"> is used, where XXX is replaced with color group
|
||||
name (hl-var, hl-string, etc.). It is up to you to create a CSS stylesheet.
|
||||
If 'use_language' option with value evaluating to true was passed, class names
|
||||
will be formatted as "LANG-hl-XXX", where LANG is language name as defined in
|
||||
highlighter XML source ("lang" attribute of <highlight> tag) in lower case.
|
||||
|
||||
There are 3 special CSS classes:
|
||||
|
||||
hl-main - this class applies to whole output or right table column,
|
||||
depending on 'numbers' option
|
||||
hl-gutter - applies to left column in table
|
||||
hl-table - applies to whole table
|
||||
|
||||
HTML renderer accepts following options (each being optional):
|
||||
|
||||
* numbers - line numbering style.
|
||||
0 - no numbering (default)
|
||||
HL_NUMBERS_LI - use <ol></ol> for line numbering
|
||||
HL_NUMBERS_TABLE - create a 2-column table, with line numbers in left
|
||||
column and highlighted text in right column
|
||||
|
||||
* tabsize - tabulation size. Defaults to 4
|
||||
|
||||
Example:
|
||||
|
||||
require_once 'Text/Highlighter/Renderer/Html.php';
|
||||
$options = array(
|
||||
'numbers' => HL_NUMBERS_LI,
|
||||
'tabsize' => 8,
|
||||
);
|
||||
$renderer =& new Text_Highlighter_Renderer_HTML($options);
|
||||
|
||||
Console renderer
|
||||
----------------
|
||||
|
||||
Console renderer produces output for displaying on a color-capable terminal,
|
||||
either directly or through less -r, using ANSI escape sequences. By default,
|
||||
this renderer only highlights most common color groups. Additional colors
|
||||
can be specified using 'colors' option. This renderer also accepts 'numbers'
|
||||
option - a boolean value, and 'tabsize' option.
|
||||
|
||||
Example :
|
||||
|
||||
require_once 'Text/Highlighter/Renderer/Console.php';
|
||||
$colors = array(
|
||||
'prepro' => "\033[35m",
|
||||
'types' => "\033[32m",
|
||||
);
|
||||
$options = array(
|
||||
'numbers' => true,
|
||||
'tabsize' => 8,
|
||||
'colors' => $colors,
|
||||
);
|
||||
$renderer =& new Text_Highlighter_Renderer_Console($options);
|
||||
|
||||
|
||||
ANSI color escape sequences have the following format:
|
||||
|
||||
ESC[#;#;....;#m
|
||||
|
||||
where ESC is character with ASCII code 27 (033 octal, 0x1B hexadecimal). # is
|
||||
one of the following:
|
||||
|
||||
0 for normal display
|
||||
1 for bold on
|
||||
4 underline (mono only)
|
||||
5 blink on
|
||||
7 reverse video on
|
||||
8 nondisplayed (invisible)
|
||||
30 black foreground
|
||||
31 red foreground
|
||||
32 green foreground
|
||||
33 yellow foreground
|
||||
34 blue foreground
|
||||
35 magenta foreground
|
||||
36 cyan foreground
|
||||
37 white foreground
|
||||
40 black background
|
||||
41 red background
|
||||
42 green background
|
||||
43 yellow background
|
||||
44 blue background
|
||||
45 magenta background
|
||||
46 cyan background
|
||||
47 white background
|
||||
|
||||
|
||||
How to use Text_Highlighter class
|
||||
=================================
|
||||
|
||||
Creating a highlighter object
|
||||
-----------------------------
|
||||
|
||||
To create a highlighter for a certain language, use Text_Highlighter::factory()
|
||||
static method:
|
||||
|
||||
require_once 'Text/Highlighter.php';
|
||||
$hl =& Text_Highlighter::factory('php');
|
||||
|
||||
|
||||
Setting a renderer
|
||||
------------------
|
||||
|
||||
Actual output is produced by a renderer.
|
||||
|
||||
require_once 'Text/Highlighter.php';
|
||||
require_once 'Text/Highlighter/Renderer/Html.php';
|
||||
$options = array(
|
||||
'numbers' => HL_NUMBERS_LI,
|
||||
'tabsize' => 8,
|
||||
);
|
||||
$renderer =& new Text_Highlighter_Renderer_HTML($options);
|
||||
$hl =& Text_Highlighter::factory('php');
|
||||
$hl->setRenderer($renderer);
|
||||
|
||||
Note that for BC reasons, it is possible to use highlighter without setting a
|
||||
renderer. If no renderer is set, HTML renderer will be used by default. In
|
||||
this case, you should pass options as second parameter to factory method. The
|
||||
following example works exactly as previous one:
|
||||
|
||||
require_once 'Text/Highlighter.php';
|
||||
$options = array(
|
||||
'numbers' => HL_NUMBERS_LI,
|
||||
'tabsize' => 8,
|
||||
);
|
||||
$hl =& Text_Highlighter::factory('php', $options);
|
||||
|
||||
|
||||
Getting output
|
||||
--------------
|
||||
|
||||
And finally, do the highlighting and get the output:
|
||||
|
||||
require_once 'Text/Highlighter.php';
|
||||
require_once 'Text/Highlighter/Renderer/Html.php';
|
||||
$options = array(
|
||||
'numbers' => HL_NUMBERS_LI,
|
||||
'tabsize' => 8,
|
||||
);
|
||||
$renderer =& new Text_Highlighter_Renderer_HTML($options);
|
||||
$hl =& Text_Highlighter::factory('php');
|
||||
$hl->setRenderer($renderer);
|
||||
$html = $hl->highlight(file_get_contents('example.php'));
|
||||
|
||||
# vim: set autoindent tabstop=4 shiftwidth=4 softtabstop=4 tw=78: */
|
||||
|
||||
12
framework/vendors/TextHighlighter/Text/TODO
vendored
Normal file
12
framework/vendors/TextHighlighter/Text/TODO
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# $Id: TODO,v 1.1 2007/06/03 02:35:28 ssttoo Exp $
|
||||
|
||||
Major issues to solve (but I currently have no idea how) :
|
||||
|
||||
- speedup highlighting process
|
||||
|
||||
- switching between highlighters depending on context, for example :
|
||||
PHP code -> HTML -> (JavaScript|CSS)
|
||||
|
||||
|
||||
# vim: set autoindent tabstop=4 shiftwidth=4 softtabstop=4 tw=78: */
|
||||
|
||||
802
framework/vendors/TextHighlighter/Text/abap.xml
vendored
Normal file
802
framework/vendors/TextHighlighter/Text/abap.xml
vendored
Normal file
@@ -0,0 +1,802 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: abap.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="abap" case = "no">
|
||||
|
||||
<authors>
|
||||
<author name="Stoyan Stefanov" email ="ssttoo@gmail.com"/>
|
||||
</authors>
|
||||
|
||||
|
||||
<default innerClass="code" />
|
||||
|
||||
|
||||
<region name="block" delimClass="brackets" innerClass="code" start="\{" end="\}">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="brackets" delimClass="brackets" innerClass="code" start="\(" end="\)">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="sqbrackets" delimClass="brackets" innerClass="code" start="\[" end="\]">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="comment" start="^\*|"" end="/$/m" innerClass="comment">
|
||||
<contains all="no"/>
|
||||
</region>
|
||||
|
||||
<region name="strsingle" delimClass="quotes" innerClass="string" start="'" end="'" />
|
||||
|
||||
<block name="identifier" match="[a-zA-Z_]\w*" innerClass="identifier" contained="yes"/>
|
||||
|
||||
<block name="hexinteger" match="0[xX][\da-f]+" innerClass="number" contained="yes"/>
|
||||
|
||||
<block name="integer" match="\d\d*|\b0\b" innerClass="number" contained="yes"/>
|
||||
|
||||
<block name="octinteger" match="0[0-7]+" innerClass="number" contained="yes"/>
|
||||
|
||||
<block name="float" match="(\d*\.\d+)|(\d+\.\d*)" innerClass="number" contained="yes"/>
|
||||
|
||||
|
||||
<block name="identifier" match="[a-z_\-]\w*" innerClass="identifier" case="no"/>
|
||||
|
||||
<keywords name="sy" inherits="identifier" innerClass="reserved">
|
||||
<keyword match="SCREEN-NAME"/>
|
||||
<keyword match="SCREEN-GROUP1"/>
|
||||
<keyword match="SCREEN-GROUP2"/>
|
||||
<keyword match="SCREEN-GROUP3"/>
|
||||
<keyword match="SCREEN-GROUP4"/>
|
||||
<keyword match="SCREEN-REQUIRED"/>
|
||||
<keyword match="SCREEN-INPUT"/>
|
||||
<keyword match="SCREEN-OUTPUT"/>
|
||||
<keyword match="SCREEN-INTENSIFIED"/>
|
||||
<keyword match="SCREEN-INVISIBLE"/>
|
||||
<keyword match="SCREEN-LENGTH"/>
|
||||
<keyword match="SCREEN-ACTIVE"/>
|
||||
<keyword match="SY-INDEX"/>
|
||||
<keyword match="SY-PAGNO"/>
|
||||
<keyword match="SY-TABIX"/>
|
||||
<keyword match="SY-TFILL"/>
|
||||
<keyword match="SY-TLOPC"/>
|
||||
<keyword match="SY-TMAXL"/>
|
||||
<keyword match="SY-TOCCU"/>
|
||||
<keyword match="SY-TTABC"/>
|
||||
<keyword match="SY-TSTIS"/>
|
||||
<keyword match="SY-TTABI"/>
|
||||
<keyword match="SY-DBCNT"/>
|
||||
<keyword match="SY-FDPOS"/>
|
||||
<keyword match="SY-COLNO"/>
|
||||
<keyword match="SY-LINCT"/>
|
||||
<keyword match="SY-LINNO"/>
|
||||
<keyword match="SY-LINSZ"/>
|
||||
<keyword match="SY-PAGCT"/>
|
||||
<keyword match="SY-MACOL"/>
|
||||
<keyword match="SY-MAROW"/>
|
||||
<keyword match="SY-TLENG"/>
|
||||
<keyword match="SY-SFOFF"/>
|
||||
<keyword match="SY-WILLI"/>
|
||||
<keyword match="SY-LILLI"/>
|
||||
<keyword match="SY-SUBRC"/>
|
||||
<keyword match="SY-FLENG"/>
|
||||
<keyword match="SY-CUCOL"/>
|
||||
<keyword match="SY-CUROW"/>
|
||||
<keyword match="SY-LSIND"/>
|
||||
<keyword match="SY-LISTI"/>
|
||||
<keyword match="SY-STEPL"/>
|
||||
<keyword match="SY-TPAGI"/>
|
||||
<keyword match="SY-WINX1"/>
|
||||
<keyword match="SY-WINY1"/>
|
||||
<keyword match="SY-WINX2"/>
|
||||
<keyword match="SY-WINY2"/>
|
||||
<keyword match="SY-WINCO"/>
|
||||
<keyword match="SY-WINRO"/>
|
||||
<keyword match="SY-WINDI"/>
|
||||
<keyword match="SY-SROWS"/>
|
||||
<keyword match="SY-SCOLS"/>
|
||||
<keyword match="SY-LOOPC"/>
|
||||
<keyword match="SY-FOLEN"/>
|
||||
<keyword match="SY-FODEC"/>
|
||||
<keyword match="SY-TZONE"/>
|
||||
<keyword match="SY-DAYST"/>
|
||||
<keyword match="SY-FTYPE"/>
|
||||
<keyword match="SY-APPLI"/>
|
||||
<keyword match="SY-FDAYW"/>
|
||||
<keyword match="SY-CCURS"/>
|
||||
<keyword match="SY-CCURT"/>
|
||||
<keyword match="SY-DEBUG"/>
|
||||
<keyword match="SY-CTYPE"/>
|
||||
<keyword match="SY-INPUT"/>
|
||||
<keyword match="SY-LANGU"/>
|
||||
<keyword match="SY-MODNO"/>
|
||||
<keyword match="SY-BATCH"/>
|
||||
<keyword match="SY-BINPT"/>
|
||||
<keyword match="SY-CALLD"/>
|
||||
<keyword match="SY-DYNNR"/>
|
||||
<keyword match="SY-DYNGR"/>
|
||||
<keyword match="SY-NEWPA"/>
|
||||
<keyword match="SY-PRI40"/>
|
||||
<keyword match="SY-RSTRT"/>
|
||||
<keyword match="SY-WTITL"/>
|
||||
<keyword match="SY-CPAGE"/>
|
||||
<keyword match="SY-DBNAM"/>
|
||||
<keyword match="SY-MANDT"/>
|
||||
<keyword match="SY-PREFX"/>
|
||||
<keyword match="SY-FMKEY"/>
|
||||
<keyword match="SY-PEXPI"/>
|
||||
<keyword match="SY-PRINI"/>
|
||||
<keyword match="SY-PRIMM"/>
|
||||
<keyword match="SY-PRREL"/>
|
||||
<keyword match="SY-PLAYO"/>
|
||||
<keyword match="SY-PRBIG"/>
|
||||
<keyword match="SY-PLAYP"/>
|
||||
<keyword match="SY-PRNEW"/>
|
||||
<keyword match="SY-PRLOG"/>
|
||||
<keyword match="SY-PDEST"/>
|
||||
<keyword match="SY-PLIST"/>
|
||||
<keyword match="SY-PAUTH"/>
|
||||
<keyword match="SY-PRDSN"/>
|
||||
<keyword match="SY-PNWPA"/>
|
||||
<keyword match="SY-CALLR"/>
|
||||
<keyword match="SY-REPI2"/>
|
||||
<keyword match="SY-RTITL"/>
|
||||
<keyword match="SY-PRREC"/>
|
||||
<keyword match="SY-PRTXT"/>
|
||||
<keyword match="SY-PRABT"/>
|
||||
<keyword match="SY-LPASS"/>
|
||||
<keyword match="SY-NRPAG"/>
|
||||
<keyword match="SY-PAART"/>
|
||||
<keyword match="SY-PRCOP"/>
|
||||
<keyword match="SY-BATZS"/>
|
||||
<keyword match="SY-BSPLD"/>
|
||||
<keyword match="SY-BREP4"/>
|
||||
<keyword match="SY-BATZO"/>
|
||||
<keyword match="SY-BATZD"/>
|
||||
<keyword match="SY-BATZW"/>
|
||||
<keyword match="SY-BATZM"/>
|
||||
<keyword match="SY-CTABL"/>
|
||||
<keyword match="SY-DBSYS"/>
|
||||
<keyword match="SY-DCSYS"/>
|
||||
<keyword match="SY-MACDB"/>
|
||||
<keyword match="SY-SYSID"/>
|
||||
<keyword match="SY-OPSYS"/>
|
||||
<keyword match="SY-PFKEY"/>
|
||||
<keyword match="SY-SAPRL"/>
|
||||
<keyword match="SY-TCODE"/>
|
||||
<keyword match="SY-UCOMM"/>
|
||||
<keyword match="SY-CFWAE"/>
|
||||
<keyword match="SY-CHWAE"/>
|
||||
<keyword match="SY-SPONO"/>
|
||||
<keyword match="SY-SPONR"/>
|
||||
<keyword match="SY-WAERS"/>
|
||||
<keyword match="SY-CDATE"/>
|
||||
<keyword match="SY-DATUM"/>
|
||||
<keyword match="SY-SLSET"/>
|
||||
<keyword match="SY-SUBTY"/>
|
||||
<keyword match="SY-SUBCS"/>
|
||||
<keyword match="SY-GROUP"/>
|
||||
<keyword match="SY-FFILE"/>
|
||||
<keyword match="SY-UZEIT"/>
|
||||
<keyword match="SY-DSNAM"/>
|
||||
<keyword match="SY-REPID"/>
|
||||
<keyword match="SY-TABID"/>
|
||||
<keyword match="SY-TFDSN"/>
|
||||
<keyword match="SY-UNAME"/>
|
||||
<keyword match="SY-LSTAT"/>
|
||||
<keyword match="SY-ABCDE"/>
|
||||
<keyword match="SY-MARKY"/>
|
||||
<keyword match="SY-SFNAM"/>
|
||||
<keyword match="SY-TNAME"/>
|
||||
<keyword match="SY-MSGLI"/>
|
||||
<keyword match="SY-TITLE"/>
|
||||
<keyword match="SY-ENTRY"/>
|
||||
<keyword match="SY-LISEL"/>
|
||||
<keyword match="SY-ULINE"/>
|
||||
<keyword match="SY-XCODE"/>
|
||||
<keyword match="SY-CPROG"/>
|
||||
<keyword match="SY-XPROG"/>
|
||||
<keyword match="SY-XFORM"/>
|
||||
<keyword match="SY-LDBPG"/>
|
||||
<keyword match="SY-TVAR0"/>
|
||||
<keyword match="SY-TVAR1"/>
|
||||
<keyword match="SY-TVAR2"/>
|
||||
<keyword match="SY-TVAR3"/>
|
||||
<keyword match="SY-TVAR4"/>
|
||||
<keyword match="SY-TVAR5"/>
|
||||
<keyword match="SY-TVAR6"/>
|
||||
<keyword match="SY-TVAR7"/>
|
||||
<keyword match="SY-TVAR8"/>
|
||||
<keyword match="SY-TVAR9"/>
|
||||
<keyword match="SY-MSGID"/>
|
||||
<keyword match="SY-MSGTY"/>
|
||||
<keyword match="SY-MSGNO"/>
|
||||
<keyword match="SY-MSGV1"/>
|
||||
<keyword match="SY-MSGV2"/>
|
||||
<keyword match="SY-MSGV3"/>
|
||||
<keyword match="SY-MSGV4"/>
|
||||
<keyword match="SY-ONCOM"/>
|
||||
<keyword match="SY-VLINE"/>
|
||||
<keyword match="SY-WINSL"/>
|
||||
<keyword match="SY-STACO"/>
|
||||
<keyword match="SY-STARO"/>
|
||||
<keyword match="SY-DATAR"/>
|
||||
<keyword match="SY-HOST"/>
|
||||
<keyword match="SY-LOCDB"/>
|
||||
<keyword match="SY-LOCOP"/>
|
||||
<keyword match="SY-DATLO"/>
|
||||
<keyword match="SY-TIMLO"/>
|
||||
<keyword match="SY-ZONLO"/>
|
||||
<keyword match="SYST-INDEX"/>
|
||||
<keyword match="SYST-PAGNO"/>
|
||||
<keyword match="SYST-TABIX"/>
|
||||
<keyword match="SYST-TFILL"/>
|
||||
<keyword match="SYST-TLOPC"/>
|
||||
<keyword match="SYST-TMAXL"/>
|
||||
<keyword match="SYST-TOCCU"/>
|
||||
<keyword match="SYST-TTABC"/>
|
||||
<keyword match="SYST-TSTIS"/>
|
||||
<keyword match="SYST-TTABI"/>
|
||||
<keyword match="SYST-DBCNT"/>
|
||||
<keyword match="SYST-FDPOS"/>
|
||||
<keyword match="SYST-COLNO"/>
|
||||
<keyword match="SYST-LINCT"/>
|
||||
<keyword match="SYST-LINNO"/>
|
||||
<keyword match="SYST-LINSZ"/>
|
||||
<keyword match="SYST-PAGCT"/>
|
||||
<keyword match="SYST-MACOL"/>
|
||||
<keyword match="SYST-MAROW"/>
|
||||
<keyword match="SYST-TLENG"/>
|
||||
<keyword match="SYST-SFOFF"/>
|
||||
<keyword match="SYST-WILLI"/>
|
||||
<keyword match="SYST-LILLI"/>
|
||||
<keyword match="SYST-SUBRC"/>
|
||||
<keyword match="SYST-FLENG"/>
|
||||
<keyword match="SYST-CUCOL"/>
|
||||
<keyword match="SYST-CUROW"/>
|
||||
<keyword match="SYST-LSIND"/>
|
||||
<keyword match="SYST-LISTI"/>
|
||||
<keyword match="SYST-STEPL"/>
|
||||
<keyword match="SYST-TPAGI"/>
|
||||
<keyword match="SYST-WINX1"/>
|
||||
<keyword match="SYST-WINY1"/>
|
||||
<keyword match="SYST-WINX2"/>
|
||||
<keyword match="SYST-WINY2"/>
|
||||
<keyword match="SYST-WINCO"/>
|
||||
<keyword match="SYST-WINRO"/>
|
||||
<keyword match="SYST-WINDI"/>
|
||||
<keyword match="SYST-SROWS"/>
|
||||
<keyword match="SYST-SCOLS"/>
|
||||
<keyword match="SYST-LOOPC"/>
|
||||
<keyword match="SYST-FOLEN"/>
|
||||
<keyword match="SYST-FODEC"/>
|
||||
<keyword match="SYST-TZONE"/>
|
||||
<keyword match="SYST-DAYST"/>
|
||||
<keyword match="SYST-FTYPE"/>
|
||||
<keyword match="SYST-APPLI"/>
|
||||
<keyword match="SYST-FDAYW"/>
|
||||
<keyword match="SYST-CCURS"/>
|
||||
<keyword match="SYST-CCURT"/>
|
||||
<keyword match="SYST-DEBUG"/>
|
||||
<keyword match="SYST-CTYPE"/>
|
||||
<keyword match="SYST-INPUT"/>
|
||||
<keyword match="SYST-LANGU"/>
|
||||
<keyword match="SYST-MODNO"/>
|
||||
<keyword match="SYST-BATCH"/>
|
||||
<keyword match="SYST-BINPT"/>
|
||||
<keyword match="SYST-CALLD"/>
|
||||
<keyword match="SYST-DYNNR"/>
|
||||
<keyword match="SYST-DYNGR"/>
|
||||
<keyword match="SYST-NEWPA"/>
|
||||
<keyword match="SYST-PRI40"/>
|
||||
<keyword match="SYST-RSTRT"/>
|
||||
<keyword match="SYST-WTITL"/>
|
||||
<keyword match="SYST-CPAGE"/>
|
||||
<keyword match="SYST-DBNAM"/>
|
||||
<keyword match="SYST-MANDT"/>
|
||||
<keyword match="SYST-PREFX"/>
|
||||
<keyword match="SYST-FMKEY"/>
|
||||
<keyword match="SYST-PEXPI"/>
|
||||
<keyword match="SYST-PRINI"/>
|
||||
<keyword match="SYST-PRIMM"/>
|
||||
<keyword match="SYST-PRREL"/>
|
||||
<keyword match="SYST-PLAYO"/>
|
||||
<keyword match="SYST-PRBIG"/>
|
||||
<keyword match="SYST-PLAYP"/>
|
||||
<keyword match="SYST-PRNEW"/>
|
||||
<keyword match="SYST-PRLOG"/>
|
||||
<keyword match="SYST-PDEST"/>
|
||||
<keyword match="SYST-PLIST"/>
|
||||
<keyword match="SYST-PAUTH"/>
|
||||
<keyword match="SYST-PRDSN"/>
|
||||
<keyword match="SYST-PNWPA"/>
|
||||
<keyword match="SYST-CALLR"/>
|
||||
<keyword match="SYST-REPI2"/>
|
||||
<keyword match="SYST-RTITL"/>
|
||||
<keyword match="SYST-PRREC"/>
|
||||
<keyword match="SYST-PRTXT"/>
|
||||
<keyword match="SYST-PRABT"/>
|
||||
<keyword match="SYST-LPASS"/>
|
||||
<keyword match="SYST-NRPAG"/>
|
||||
<keyword match="SYST-PAART"/>
|
||||
<keyword match="SYST-PRCOP"/>
|
||||
<keyword match="SYST-BATZS"/>
|
||||
<keyword match="SYST-BSPLD"/>
|
||||
<keyword match="SYST-BREP4"/>
|
||||
<keyword match="SYST-BATZO"/>
|
||||
<keyword match="SYST-BATZD"/>
|
||||
<keyword match="SYST-BATZW"/>
|
||||
<keyword match="SYST-BATZM"/>
|
||||
<keyword match="SYST-CTABL"/>
|
||||
<keyword match="SYST-DBSYS"/>
|
||||
<keyword match="SYST-DCSYS"/>
|
||||
<keyword match="SYST-MACDB"/>
|
||||
<keyword match="SYST-SYSID"/>
|
||||
<keyword match="SYST-OPSYS"/>
|
||||
<keyword match="SYST-PFKEY"/>
|
||||
<keyword match="SYST-SAPRL"/>
|
||||
<keyword match="SYST-TCODE"/>
|
||||
<keyword match="SYST-UCOMM"/>
|
||||
<keyword match="SYST-CFWAE"/>
|
||||
<keyword match="SYST-CHWAE"/>
|
||||
<keyword match="SYST-SPONO"/>
|
||||
<keyword match="SYST-SPONR"/>
|
||||
<keyword match="SYST-WAERS"/>
|
||||
<keyword match="SYST-CDATE"/>
|
||||
<keyword match="SYST-DATUM"/>
|
||||
<keyword match="SYST-SLSET"/>
|
||||
<keyword match="SYST-SUBTY"/>
|
||||
<keyword match="SYST-SUBCS"/>
|
||||
<keyword match="SYST-GROUP"/>
|
||||
<keyword match="SYST-FFILE"/>
|
||||
<keyword match="SYST-UZEIT"/>
|
||||
<keyword match="SYST-DSNAM"/>
|
||||
<keyword match="SYST-REPID"/>
|
||||
<keyword match="SYST-TABID"/>
|
||||
<keyword match="SYST-TFDSN"/>
|
||||
<keyword match="SYST-UNAME"/>
|
||||
<keyword match="SYST-LSTAT"/>
|
||||
<keyword match="SYST-ABCDE"/>
|
||||
<keyword match="SYST-MARKY"/>
|
||||
<keyword match="SYST-SFNAM"/>
|
||||
<keyword match="SYST-TNAME"/>
|
||||
<keyword match="SYST-MSGLI"/>
|
||||
<keyword match="SYST-TITLE"/>
|
||||
<keyword match="SYST-ENTRY"/>
|
||||
<keyword match="SYST-LISEL"/>
|
||||
<keyword match="SYST-ULINE"/>
|
||||
<keyword match="SYST-XCODE"/>
|
||||
<keyword match="SYST-CPROG"/>
|
||||
<keyword match="SYST-XPROG"/>
|
||||
<keyword match="SYST-XFORM"/>
|
||||
<keyword match="SYST-LDBPG"/>
|
||||
<keyword match="SYST-TVAR0"/>
|
||||
<keyword match="SYST-TVAR1"/>
|
||||
<keyword match="SYST-TVAR2"/>
|
||||
<keyword match="SYST-TVAR3"/>
|
||||
<keyword match="SYST-TVAR4"/>
|
||||
<keyword match="SYST-TVAR5"/>
|
||||
<keyword match="SYST-TVAR6"/>
|
||||
<keyword match="SYST-TVAR7"/>
|
||||
<keyword match="SYST-TVAR8"/>
|
||||
<keyword match="SYST-TVAR9"/>
|
||||
<keyword match="SYST-MSGID"/>
|
||||
<keyword match="SYST-MSGTY"/>
|
||||
<keyword match="SYST-MSGNO"/>
|
||||
<keyword match="SYST-MSGV1"/>
|
||||
<keyword match="SYST-MSGV2"/>
|
||||
<keyword match="SYST-MSGV3"/>
|
||||
<keyword match="SYST-MSGV4"/>
|
||||
<keyword match="SYST-ONCOM"/>
|
||||
<keyword match="SYST-VLINE"/>
|
||||
<keyword match="SYST-WINSL"/>
|
||||
<keyword match="SYST-STACO"/>
|
||||
<keyword match="SYST-STARO"/>
|
||||
<keyword match="SYST-DATAR"/>
|
||||
<keyword match="SYST-HOST"/>
|
||||
<keyword match="SYST-LOCDB"/>
|
||||
<keyword match="SYST-LOCOP"/>
|
||||
<keyword match="SYST-DATLO"/>
|
||||
<keyword match="SYST-TIMLO"/>
|
||||
<keyword match="SYST-ZONLO"/>
|
||||
</keywords>
|
||||
|
||||
|
||||
<keywords name="reserved" inherits="identifier" innerClass="reserved">
|
||||
<keyword match="ABS"/>
|
||||
<keyword match="ACOS"/>
|
||||
<keyword match="ADD"/>
|
||||
<keyword match="ADD-CORRESPONDING"/>
|
||||
<keyword match="ADJACENT"/>
|
||||
<keyword match="AFTER"/>
|
||||
<keyword match="ALIASES"/>
|
||||
<keyword match="ALL"/>
|
||||
<keyword match="ANALYZER"/>
|
||||
<keyword match="AND"/>
|
||||
<keyword match="ANY"/>
|
||||
<keyword match="APPEND"/>
|
||||
<keyword match="AS"/>
|
||||
<keyword match="ASCENDING"/>
|
||||
<keyword match="ASIN"/>
|
||||
<keyword match="ASSIGN"/>
|
||||
<keyword match="ASSIGNED"/>
|
||||
<keyword match="ASSIGNING"/>
|
||||
<keyword match="AT"/>
|
||||
<keyword match="ATAN"/>
|
||||
<keyword match="AUTHORITY-CHECK"/>
|
||||
<keyword match="AVG"/>
|
||||
<keyword match="BACK"/>
|
||||
<keyword match="BEFORE"/>
|
||||
<keyword match="BEGIN"/>
|
||||
<keyword match="BINARY"/>
|
||||
<keyword match="BIT"/>
|
||||
<keyword match="BIT-AND"/>
|
||||
<keyword match="BIT-NOT"/>
|
||||
<keyword match="BIT-OR"/>
|
||||
<keyword match="BIT-XOR"/>
|
||||
<keyword match="BLANK"/>
|
||||
<keyword match="BLOCK"/>
|
||||
<keyword match="BREAK-POINT"/>
|
||||
<keyword match="BUFFER"/>
|
||||
<keyword match="BY"/>
|
||||
<keyword match="C"/>
|
||||
<keyword match="CALL"/>
|
||||
<keyword match="CASE"/>
|
||||
<keyword match="CATCH"/>
|
||||
<keyword match="CEIL"/>
|
||||
<keyword match="CENTERED"/>
|
||||
<keyword match="CHAIN"/>
|
||||
<keyword match="CHANGE"/>
|
||||
<keyword match="CHANGING"/>
|
||||
<keyword match="CHECK"/>
|
||||
<keyword match="CHECKBOX"/>
|
||||
<keyword match="CLASS"/>
|
||||
<keyword match="CLASS-DATA"/>
|
||||
<keyword match="CLASS-EVENTS"/>
|
||||
<keyword match="CLASS-METHODS"/>
|
||||
<keyword match="CLASS-POOL"/>
|
||||
<keyword match="CLEAR"/>
|
||||
<keyword match="CLIENT"/>
|
||||
<keyword match="CLOSE"/>
|
||||
<keyword match="CNT"/>
|
||||
<keyword match="CODE"/>
|
||||
<keyword match="COLLECT"/>
|
||||
<keyword match="COLOR"/>
|
||||
<keyword match="COMMENT"/>
|
||||
<keyword match="COMMIT"/>
|
||||
<keyword match="COMMUNICATION"/>
|
||||
<keyword match="COMPUTE"/>
|
||||
<keyword match="CONCATENATE"/>
|
||||
<keyword match="CONDENSE"/>
|
||||
<keyword match="CONSTANTS"/>
|
||||
<keyword match="CONTEXT"/>
|
||||
<keyword match="CONTEXTS"/>
|
||||
<keyword match="CONTINUE"/>
|
||||
<keyword match="CONTROL"/>
|
||||
<keyword match="CONTROLS"/>
|
||||
<keyword match="CONVERT"/>
|
||||
<keyword match="COPY"/>
|
||||
<keyword match="CORRESPONDING"/>
|
||||
<keyword match="COS"/>
|
||||
<keyword match="COSH"/>
|
||||
<keyword match="COUNT"/>
|
||||
<keyword match="COUNTRY"/>
|
||||
<keyword match="CREATE"/>
|
||||
<keyword match="CURRENCY"/>
|
||||
<keyword match="CURSOR"/>
|
||||
<keyword match="CUSTOMER-FUNCTION"/>
|
||||
<keyword match="DATA"/>
|
||||
<keyword match="DATABASE"/>
|
||||
<keyword match="DATASET"/>
|
||||
<keyword match="DELETE"/>
|
||||
<keyword match="DECIMALS"/>
|
||||
<keyword match="DEFAULT"/>
|
||||
<keyword match="DEFINE"/>
|
||||
<keyword match="DELETE"/>
|
||||
<keyword match="DEMAND"/>
|
||||
<keyword match="DESCENDING"/>
|
||||
<keyword match="DESCRIBE"/>
|
||||
<keyword match="DIALOG"/>
|
||||
<keyword match="DISTINCT"/>
|
||||
<keyword match="DIV"/>
|
||||
<keyword match="DIVIDE"/>
|
||||
<keyword match="DIVIDE-CORRESPONDING"/>
|
||||
<keyword match="DO"/>
|
||||
<keyword match="DUPLICATES"/>
|
||||
<keyword match="DYNPRO"/>
|
||||
<keyword match="EDIT"/>
|
||||
<keyword match="EDITOR-CALL"/>
|
||||
<keyword match="ELSE"/>
|
||||
<keyword match="ELSEIF"/>
|
||||
<keyword match="END"/>
|
||||
<keyword match="END-OF-DEFINITION"/>
|
||||
<keyword match="END-OF-PAGE"/>
|
||||
<keyword match="END-OF-SELECTION"/>
|
||||
<keyword match="ENDAT"/>
|
||||
<keyword match="ENDCASE"/>
|
||||
<keyword match="ENDCATCH"/>
|
||||
<keyword match="ENDCHAIN"/>
|
||||
<keyword match="ENDCLASS"/>
|
||||
<keyword match="ENDDO"/>
|
||||
<keyword match="ENDEXEC"/>
|
||||
<keyword match="ENDFORM"/>
|
||||
<keyword match="ENDFUNCTION"/>
|
||||
<keyword match="ENDIF"/>
|
||||
<keyword match="ENDINTERFACE"/>
|
||||
<keyword match="ENDLOOP"/>
|
||||
<keyword match="ENDMETHOD"/>
|
||||
<keyword match="ENDMODULE"/>
|
||||
<keyword match="ENDON"/>
|
||||
<keyword match="ENDPROVIDE"/>
|
||||
<keyword match="ENDSELECT"/>
|
||||
<keyword match="ENDWHILE"/>
|
||||
<keyword match="ENTRIES"/>
|
||||
<keyword match="EVENTS"/>
|
||||
<keyword match="EXEC"/>
|
||||
<keyword match="EXIT"/>
|
||||
<keyword match="EXIT-COMMAND"/>
|
||||
<keyword match="EXP"/>
|
||||
<keyword match="EXPONENT"/>
|
||||
<keyword match="EXPORT"/>
|
||||
<keyword match="EXPORTING"/>
|
||||
<keyword match="EXCEPTIONS"/>
|
||||
<keyword match="EXTENDED"/>
|
||||
<keyword match="EXTRACT"/>
|
||||
<keyword match="FETCH"/>
|
||||
<keyword match="FIELD"/>
|
||||
<keyword match="FIELD-GROUPS"/>
|
||||
<keyword match="FIELD-SYMBOLS"/>
|
||||
<keyword match="FIELDS"/>
|
||||
<keyword match="FLOOR"/>
|
||||
<keyword match="FOR"/>
|
||||
<keyword match="FORM"/>
|
||||
<keyword match="FORMAT"/>
|
||||
<keyword match="FRAC"/>
|
||||
<keyword match="FRAME"/>
|
||||
<keyword match="FREE"/>
|
||||
<keyword match="FROM"/>
|
||||
<keyword match="FUNCTION"/>
|
||||
<keyword match="FUNCTION-POOL"/>
|
||||
<keyword match="GENERATE"/>
|
||||
<keyword match="GET"/>
|
||||
<keyword match="GROUP"/>
|
||||
<keyword match="HASHED"/>
|
||||
<keyword match="HEADER"/>
|
||||
<keyword match="HELP-ID"/>
|
||||
<keyword match="HELP-REQUEST"/>
|
||||
<keyword match="HIDE"/>
|
||||
<keyword match="HOTSPOT"/>
|
||||
<keyword match="ICON"/>
|
||||
<keyword match="ID"/>
|
||||
<keyword match="IF"/>
|
||||
<keyword match="IMPORT"/>
|
||||
<keyword match="IMPORTING"/>
|
||||
<keyword match="INCLUDE"/>
|
||||
<keyword match="INDEX"/>
|
||||
<keyword match="INFOTYPES"/>
|
||||
<keyword match="INITIALIZATION"/>
|
||||
<keyword match="INNER"/>
|
||||
<keyword match="INPUT"/>
|
||||
<keyword match="INSERT"/>
|
||||
<keyword match="INTENSIFIED"/>
|
||||
<keyword match="INTERFACE"/>
|
||||
<keyword match="INTERFACE-POOL"/>
|
||||
<keyword match="INTERFACES"/>
|
||||
<keyword match="INTO"/>
|
||||
<keyword match="INVERSE"/>
|
||||
<keyword match="JOIN"/>
|
||||
<keyword match="KEY"/>
|
||||
<keyword match="LANGUAGE"/>
|
||||
<keyword match="LAST"/>
|
||||
<keyword match="LEAVE"/>
|
||||
<keyword match="LEFT"/>
|
||||
<keyword match="LEFT-JUSTIFIED"/>
|
||||
<keyword match="LIKE"/>
|
||||
<keyword match="LINE"/>
|
||||
<keyword match="LINE-COUNT"/>
|
||||
<keyword match="LINE-SELECTION"/>
|
||||
<keyword match="LINE-SIZE"/>
|
||||
<keyword match="LINES"/>
|
||||
<keyword match="LIST-PROCESSING"/>
|
||||
<keyword match="LOAD"/>
|
||||
<keyword match="LOAD-OF-PROGRAM"/>
|
||||
<keyword match="LOCAL"/>
|
||||
<keyword match="LOCALE"/>
|
||||
<keyword match="LOG"/>
|
||||
<keyword match="LOG10"/>
|
||||
<keyword match="LOOP"/>
|
||||
<keyword match="M"/>
|
||||
<keyword match="MARGIN"/>
|
||||
<keyword match="MASK"/>
|
||||
<keyword match="MATCHCODE"/>
|
||||
<keyword match="MAX"/>
|
||||
<keyword match="MEMORY"/>
|
||||
<keyword match="MESSAGE"/>
|
||||
<keyword match="MESSAGE-ID"/>
|
||||
<keyword match="MESSAGES"/>
|
||||
<keyword match="METHOD"/>
|
||||
<keyword match="METHODS"/>
|
||||
<keyword match="MIN"/>
|
||||
<keyword match="MOD"/>
|
||||
<keyword match="MODE"/>
|
||||
<keyword match="MODIF"/>
|
||||
<keyword match="MODIFY"/>
|
||||
<keyword match="MODULE"/>
|
||||
<keyword match="MOVE"/>
|
||||
<keyword match="MOVE-CORRESPONDING"/>
|
||||
<keyword match="MULTIPLY"/>
|
||||
<keyword match="MULTIPLY-CORRESPONDING"/>
|
||||
<keyword match="NEW"/>
|
||||
<keyword match="NEW-LINE"/>
|
||||
<keyword match="NEW-PAGE"/>
|
||||
<keyword match="NEXT"/>
|
||||
<keyword match="NO"/>
|
||||
<keyword match="NO-GAP"/>
|
||||
<keyword match="NO-GAPS"/>
|
||||
<keyword match="NO-HEADING"/>
|
||||
<keyword match="NO-SCROLLING"/>
|
||||
<keyword match="NO-SIGN"/>
|
||||
<keyword match="NO-TITLE"/>
|
||||
<keyword match="NO-ZERO"/>
|
||||
<keyword match="NODES"/>
|
||||
<keyword match="NON-UNIQUE"/>
|
||||
<keyword match="O"/>
|
||||
<keyword match="OBJECT"/>
|
||||
<keyword match="OBLIGATORY"/>
|
||||
<keyword match="OCCURS"/>
|
||||
<keyword match="OF"/>
|
||||
<keyword match="OFF"/>
|
||||
<keyword match="ON"/>
|
||||
<keyword match="OPEN"/>
|
||||
<keyword match="OR"/>
|
||||
<keyword match="ORDER"/>
|
||||
<keyword match="OTHERS"/>
|
||||
<keyword match="OUTER"/>
|
||||
<keyword match="OUTPUT"/>
|
||||
<keyword match="OVERLAY"/>
|
||||
<keyword match="PACK"/>
|
||||
<keyword match="PAGE"/>
|
||||
<keyword match="PARAMETER"/>
|
||||
<keyword match="PARAMETERS"/>
|
||||
<keyword match="PERFORM"/>
|
||||
<keyword match="PF-STATUS"/>
|
||||
<keyword match="POSITION"/>
|
||||
<keyword match="PRINT"/>
|
||||
<keyword match="PRINT-CONTROL"/>
|
||||
<keyword match="PRIVATE"/>
|
||||
<keyword match="PROCESS"/>
|
||||
<keyword match="PROGRAM"/>
|
||||
<keyword match="PROPERTY"/>
|
||||
<keyword match="PROTECTED"/>
|
||||
<keyword match="PROVIDE"/>
|
||||
<keyword match="PUBLIC"/>
|
||||
<keyword match="PUT"/>
|
||||
<keyword match="RADIOBUTTON"/>
|
||||
<keyword match="RAISE"/>
|
||||
<keyword match="RAISING"/>
|
||||
<keyword match="RANGE"/>
|
||||
<keyword match="RANGES"/>
|
||||
<keyword match="READ"/>
|
||||
<keyword match="RECEIVE"/>
|
||||
<keyword match="REFRESH"/>
|
||||
<keyword match="REJECT"/>
|
||||
<keyword match="REPLACE"/>
|
||||
<keyword match="REPORT"/>
|
||||
<keyword match="REQUESTED"/>
|
||||
<keyword match="RESERVE"/>
|
||||
<keyword match="RESET"/>
|
||||
<keyword match="RIGHT-JUSTIFIED"/>
|
||||
<keyword match="ROLLBACK"/>
|
||||
<keyword match="ROUND"/>
|
||||
<keyword match="ROWS"/>
|
||||
<keyword match="RTTI"/>
|
||||
<keyword match="RUN"/>
|
||||
<keyword match="SCAN"/>
|
||||
<keyword match="SCREEN"/>
|
||||
<keyword match="SEARCH"/>
|
||||
<keyword match="SEPARATED"/>
|
||||
<keyword match="SCROLL"/>
|
||||
<keyword match="SCROLL-BOUNDARY"/>
|
||||
<keyword match="SEARCH"/>
|
||||
<keyword match="SELECT"/>
|
||||
<keyword match="SELECT-OPTIONS"/>
|
||||
<keyword match="SELECTION-SCREEN"/>
|
||||
<keyword match="SELECTION-TABLE"/>
|
||||
<keyword match="SET"/>
|
||||
<keyword match="SHARED"/>
|
||||
<keyword match="SHIFT"/>
|
||||
<keyword match="SIGN"/>
|
||||
<keyword match="SIN"/>
|
||||
<keyword match="SINGLE"/>
|
||||
<keyword match="SINH"/>
|
||||
<keyword match="SIZE"/>
|
||||
<keyword match="SKIP"/>
|
||||
<keyword match="SORT"/>
|
||||
<keyword match="SORTED"/>
|
||||
<keyword match="SPLIT"/>
|
||||
<keyword match="SQL"/>
|
||||
<keyword match="SQRT"/>
|
||||
<keyword match="STAMP"/>
|
||||
<keyword match="STANDARD"/>
|
||||
<keyword match="START-OF-SELECTION"/>
|
||||
<keyword match="STATICS"/>
|
||||
<keyword match="STOP"/>
|
||||
<keyword match="STRING"/>
|
||||
<keyword match="STRLEN"/>
|
||||
<keyword match="STRUCTURE"/>
|
||||
<keyword match="SUBMIT"/>
|
||||
<keyword match="SUBTRACT"/>
|
||||
<keyword match="SUBTRACT-CORRESPONDING"/>
|
||||
<keyword match="SUM"/>
|
||||
<keyword match="SUPPLY"/>
|
||||
<keyword match="SUPPRESS"/>
|
||||
<keyword match="SYMBOL"/>
|
||||
<keyword match="SYNTAX-CHECK"/>
|
||||
<keyword match="SYNTAX-TRACE"/>
|
||||
<keyword match="SYSTEM-CALL"/>
|
||||
<keyword match="SYSTEM-EXCEPTIONS"/>
|
||||
<keyword match="TABLE"/>
|
||||
<keyword match="TABLE_LINE"/>
|
||||
<keyword match="TABLES"/>
|
||||
<keyword match="TAN"/>
|
||||
<keyword match="TANH"/>
|
||||
<keyword match="TEXT"/>
|
||||
<keyword match="TEXTPOOL"/>
|
||||
<keyword match="TIME"/>
|
||||
<keyword match="TIMES"/>
|
||||
<keyword match="TITLE"/>
|
||||
<keyword match="TITLEBAR"/>
|
||||
<keyword match="TO"/>
|
||||
<keyword match="TOP-OF-PAGE"/>
|
||||
<keyword match="TRANSACTION"/>
|
||||
<keyword match="TRANSFER"/>
|
||||
<keyword match="TRANSLATE"/>
|
||||
<keyword match="TRANSPORTING"/>
|
||||
<keyword match="TRUNC"/>
|
||||
<keyword match="TYPE"/>
|
||||
<keyword match="TYPE-POOL"/>
|
||||
<keyword match="TYPE-POOLS"/>
|
||||
<keyword match="TYPES"/>
|
||||
<keyword match="ULINE"/>
|
||||
<keyword match="UNDER"/>
|
||||
<keyword match="UNIQUE"/>
|
||||
<keyword match="UNIT"/>
|
||||
<keyword match="UNPACK"/>
|
||||
<keyword match="UP"/>
|
||||
<keyword match="UPDATE"/>
|
||||
<keyword match="USER-COMMAND"/>
|
||||
<keyword match="USING"/>
|
||||
<keyword match="VALUE"/>
|
||||
<keyword match="VALUE-REQUEST"/>
|
||||
<keyword match="VALUES"/>
|
||||
<keyword match="VARY"/>
|
||||
<keyword match="WHEN"/>
|
||||
<keyword match="WHERE"/>
|
||||
<keyword match="WHILE"/>
|
||||
<keyword match="WINDOW"/>
|
||||
<keyword match="WITH"/>
|
||||
<keyword match="WITH-TITLE"/>
|
||||
<keyword match="WORK"/>
|
||||
<keyword match="WRITE"/>
|
||||
<keyword match="X"/>
|
||||
<keyword match="XSTRING"/>
|
||||
<keyword match="Z"/>
|
||||
<keyword match="ZONE"/>
|
||||
</keywords>
|
||||
|
||||
|
||||
<keywords name="constants" inherits="identifier" innerClass="reserved">
|
||||
<keyword match="INITIAL"/>
|
||||
<keyword match="NULL"/>
|
||||
<keyword match="SPACE"/>
|
||||
<keyword match="COL_BACKGROUND"/>
|
||||
<keyword match="COL_HEADING"/>
|
||||
<keyword match="COL_NORMAL"/>
|
||||
<keyword match="COL_TOTAL"/>
|
||||
<keyword match="COL_KEY"/>
|
||||
<keyword match="COL_POSITIVE"/>
|
||||
<keyword match="COL_NEGATIVE"/>
|
||||
<keyword match="COL_GROUP"/>
|
||||
</keywords>
|
||||
|
||||
</highlight>
|
||||
201
framework/vendors/TextHighlighter/Text/cpp.xml
vendored
Normal file
201
framework/vendors/TextHighlighter/Text/cpp.xml
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: cpp.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="CPP" case="no">
|
||||
|
||||
<authors>
|
||||
<author name="Aaron Kalin"/>
|
||||
<author name="Andrey Demenev" email="demenev@gmail.com"/>
|
||||
</authors>
|
||||
|
||||
<comment>
|
||||
Thanks to Aaron Kalin for initial
|
||||
implementation of this highlighter
|
||||
</comment>
|
||||
|
||||
<default innerClass="code" />
|
||||
|
||||
<block name="escaped" match="\\" innerClass="special" contained="yes">
|
||||
<onlyin region="strdouble"/>
|
||||
</block>
|
||||
|
||||
<region name="strdouble" delimClass="quotes" innerClass="string" start=""" end="""/>
|
||||
|
||||
<region name="block" delimClass="brackets" innerClass="code" start="\{" end="\}">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="brackets" delimClass="brackets" innerClass="code" start="\(" end="\)">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="sqbrackets" delimClass="brackets" innerClass="code" start="\[" end="\]">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<block name="identifier" match="[a-z_]\w*" innerClass="identifier" case="no"/>
|
||||
|
||||
<block name="hexinteger" match="\b0[xX][\da-f]+" innerClass="number" contained="yes"/>
|
||||
<block name="integer" match="\b\d\d*|\b0\b" innerClass="number" contained="yes"/>
|
||||
<block name="octinteger" match="\b0[0-7]+" innerClass="number" contained="yes"/>
|
||||
<block name="float" match="\b(\d*\.\d+)|(\d+\.\d*)" innerClass="number" contained="yes"/>
|
||||
|
||||
|
||||
<region name="strincl" delimClass="quotes" innerClass="string" start="<" end=">">
|
||||
<onlyin region="include" />
|
||||
</region>
|
||||
|
||||
<!-- <block name="preprocessor" match="^#[azAZ_]\w*" innerClass="prepro"/> -->
|
||||
<region name="include" innerClass="prepro" start="/^[ \t]*#include/m" end="/(?<!\\)$/m">
|
||||
<contains region="strdouble"/>
|
||||
<contains region="strincl"/>
|
||||
</region>
|
||||
|
||||
<region name="preprocessor" delimClass="prepro" innerClass="code" start="/^[ \t]*#[ \t]*[a-z]+/mi" end="/(?<!\\)$/m">
|
||||
<contains region="comment"/>
|
||||
<contains region="mlcomment"/>
|
||||
<contains region="strdouble"/>
|
||||
<contains region="brackets"/>
|
||||
<contains region="block"/>
|
||||
<contains block="identifier"/>
|
||||
<contains block="integer"/>
|
||||
<contains block="hexinteger"/>
|
||||
<contains block="octinteger"/>
|
||||
<contains block="float"/>
|
||||
|
||||
</region>
|
||||
|
||||
<block name="number" match="\d*\.?\d+" innerClass="number"/>
|
||||
|
||||
|
||||
<region name="mlcomment" innerClass="mlcomment" start="\/\*" end="\*\/" >
|
||||
<contains block="cvstag"/>
|
||||
</region>
|
||||
|
||||
<block name="cvstag" match="\$\w+\s*:.+\$" innerClass="inlinedoc">
|
||||
|
||||
<onlyin region="mlcomment"/>
|
||||
<onlyin region="comment"/>
|
||||
</block>
|
||||
|
||||
<region name="comment" start="\/\/.+" end="/$/m" innerClass="comment" delimClass="comment">
|
||||
<contains block="cvstag"/>
|
||||
</region>
|
||||
|
||||
<keywords name="reserved" inherits="identifier" innerClass="reserved" case="yes">
|
||||
<keyword match="and" />
|
||||
<keyword match="and_eq" />
|
||||
<keyword match="asm" />
|
||||
|
||||
<keyword match="bitand" />
|
||||
<keyword match="bitor" />
|
||||
<keyword match="break" />
|
||||
<keyword match="case" />
|
||||
<keyword match="catch" />
|
||||
<keyword match="compl" />
|
||||
|
||||
<keyword match="const_cast" />
|
||||
<keyword match="continue" />
|
||||
<keyword match="default" />
|
||||
<keyword match="delete" />
|
||||
<keyword match="do" />
|
||||
<keyword match="dynamic_cast" />
|
||||
|
||||
<keyword match="else" />
|
||||
<keyword match="for" />
|
||||
<keyword match="fortran" />
|
||||
<keyword match="friend" />
|
||||
<keyword match="goto" />
|
||||
<keyword match="if" />
|
||||
|
||||
<keyword match="new" />
|
||||
<keyword match="not" />
|
||||
<keyword match="not_eq" />
|
||||
<keyword match="operator" />
|
||||
<keyword match="or" />
|
||||
<keyword match="or_eq" />
|
||||
|
||||
<keyword match="private" />
|
||||
<keyword match="protected" />
|
||||
<keyword match="public" />
|
||||
<keyword match="reinterpret_cast" />
|
||||
<keyword match="return" />
|
||||
<keyword match="sizeof" />
|
||||
|
||||
<keyword match="static_cast" />
|
||||
<keyword match="switch" />
|
||||
<keyword match="this" />
|
||||
<keyword match="throw" />
|
||||
<keyword match="try" />
|
||||
<keyword match="typeid" />
|
||||
|
||||
<keyword match="using" />
|
||||
<keyword match="while" />
|
||||
<keyword match="xor" />
|
||||
<keyword match="xor_eq" />
|
||||
|
||||
<keyword match="false" />
|
||||
<keyword match="true" />
|
||||
</keywords>
|
||||
|
||||
<keywords name="types" inherits="identifier" innerClass="types" case="yes">
|
||||
|
||||
<keyword match="auto" />
|
||||
<keyword match="bool" />
|
||||
<keyword match="char" />
|
||||
<keyword match="class" />
|
||||
<keyword match="const" />
|
||||
<keyword match="double" />
|
||||
|
||||
<keyword match="enum" />
|
||||
<keyword match="explicit" />
|
||||
<keyword match="export" />
|
||||
<keyword match="extern" />
|
||||
<keyword match="float" />
|
||||
<keyword match="inline" />
|
||||
|
||||
<keyword match="int" />
|
||||
<keyword match="long" />
|
||||
<keyword match="mutable" />
|
||||
<keyword match="namespace" />
|
||||
<keyword match="register" />
|
||||
<keyword match="short" />
|
||||
|
||||
<keyword match="signed" />
|
||||
<keyword match="static" />
|
||||
<keyword match="struct" />
|
||||
<keyword match="template" />
|
||||
<keyword match="typedef" />
|
||||
<keyword match="typename" />
|
||||
|
||||
<keyword match="union" />
|
||||
<keyword match="unsigned" />
|
||||
<keyword match="virtual" />
|
||||
<keyword match="void" />
|
||||
<keyword match="volatile" />
|
||||
<keyword match="wchar_t" />
|
||||
|
||||
</keywords>
|
||||
|
||||
<keywords name="Common Macros" inherits="identifier" innerClass="prepro" case="yes">
|
||||
<keyword match="NULL" />
|
||||
<keyword match="TRUE" />
|
||||
<keyword match="FALSE" />
|
||||
<keyword match="MAX" />
|
||||
|
||||
<keyword match="MIN" />
|
||||
<keyword match="__LINE__" />
|
||||
<keyword match="__DATA__" />
|
||||
<keyword match="__FILE__" />
|
||||
<keyword match="__TIME__" />
|
||||
<keyword match="__STDC__" />
|
||||
|
||||
</keywords>
|
||||
|
||||
|
||||
<!--
|
||||
<keywords name="reserved" inherits="identifier" innerClass="reserved" case="yes">
|
||||
-->
|
||||
|
||||
</highlight>
|
||||
|
||||
368
framework/vendors/TextHighlighter/Text/css.xml
vendored
Normal file
368
framework/vendors/TextHighlighter/Text/css.xml
vendored
Normal file
@@ -0,0 +1,368 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: css.xml,v 1.2 2008/01/01 23:45:07 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="css" case="no">
|
||||
|
||||
<authors>
|
||||
<author name="Andrey Demenev" email="demenev@gmail.com"/>
|
||||
</authors>
|
||||
|
||||
|
||||
<default innerClass="code" />
|
||||
|
||||
|
||||
<region name="mlcomment" innerClass="comment" start="\/\*" end="\*\/" >
|
||||
|
||||
</region>
|
||||
|
||||
|
||||
<block name="atrule" match="(@[a-z\d]+)"
|
||||
innerClass="var" never-contained="yes"/>
|
||||
|
||||
<region name="property" start="[a-z][a-z\d\-]*\s*:" end="(?=;|\})"
|
||||
innerClass="code" delimClass="reserved" contained="yes"/>
|
||||
|
||||
<block name="selector" match="(((\.|#)?[a-z]+[a-z\d\-]*(?![a-z\d\-]))|(\*))(?!\s*:\s*[\s\{])"
|
||||
innerClass="identifier" >
|
||||
</block>
|
||||
|
||||
<block name="pseudo" match=":[a-z][a-z\d\-]*"
|
||||
innerClass="special" />
|
||||
|
||||
<block name="bescaped" match="\\[\\(\\)\\]"
|
||||
innerClass="string" contained="yes"/>
|
||||
|
||||
|
||||
<region name="paramselector" start="\[" end="\]" innerClass="code"
|
||||
delimClass="brackets" >
|
||||
<contains block="paramname" />
|
||||
<not-contains block="identifier" />
|
||||
<contains region="strdouble" />
|
||||
<contains region="strsingle" />
|
||||
</region>
|
||||
|
||||
<region name="block" start="\{" end="\}" innerClass="code"
|
||||
delimClass="brackets" >
|
||||
<contains region="block" />
|
||||
<contains region="property" />
|
||||
<contains block="selector" />
|
||||
<contains region="mlcomment" />
|
||||
</region>
|
||||
|
||||
<region name="brackets" start="\(" end="\)" innerClass="string"
|
||||
delimClass="brackets" contained="yes">
|
||||
<contains block="bescaped"/>
|
||||
</region>
|
||||
|
||||
<region name="strsingle" delimClass="quotes" innerClass="string" start="'" end="'" contained="yes"/>
|
||||
|
||||
<block name="escaped" match="\\\\|\\"|\\'|\\`" innerClass="special" contained="yes">
|
||||
<onlyin region="strsingle"/>
|
||||
</block>
|
||||
|
||||
<block name="descaped" match="\\\\|\\"|\\'|\\`|\\t|\\n|\\r" innerClass="special" contained="yes">
|
||||
<onlyin region="strdouble"/>
|
||||
</block>
|
||||
|
||||
<region name="strdouble" delimClass="quotes" innerClass="string"
|
||||
start=""" end=""" contained="yes" />
|
||||
|
||||
<block name="measure" match="\d*\.?\d+(\%|em|ex|pc|pt|px|in|mm|cm)"
|
||||
innerClass="number" contained="yes">
|
||||
<onlyin region="property"/>
|
||||
<partClass index="1" innerClass="string" />
|
||||
</block>
|
||||
|
||||
<block name="number" match="\d*\.?\d+" innerClass="number" contained="yes" >
|
||||
<onlyin region="property"/>
|
||||
</block>
|
||||
|
||||
<block name="identifier" match="[a-z][a-z\d\-]*"
|
||||
innerClass="code" contained="yes">
|
||||
<onlyin region="property"/>
|
||||
</block>
|
||||
|
||||
<block name="hexcolor" match="#([\da-f]{6}|[\da-f]{3})\b" innerClass="var" contained="yes">
|
||||
<onlyin region="property"/>
|
||||
</block>
|
||||
|
||||
<block name="paramname" match="[\w\-\:]+" innerClass="var" contained="yes">
|
||||
<onlyin region="paramselector"/>
|
||||
</block>
|
||||
|
||||
<keywords name="propertyValue" inherits="identifier" innerClass="string" case = "no">
|
||||
<word name="left-side"/>
|
||||
<keyword match="far-left"/>
|
||||
<keyword match="left"/>
|
||||
<keyword match="center-left"/>
|
||||
<keyword match="center-right"/>
|
||||
<keyword match="center"/>
|
||||
<keyword match="far-right"/>
|
||||
<keyword match="right-side"/>
|
||||
<keyword match="right"/>
|
||||
<keyword match="behind"/>
|
||||
<keyword match="leftwards"/>
|
||||
<keyword match="rightwards"/>
|
||||
<keyword match="inherit"/>
|
||||
<keyword match="scroll"/>
|
||||
<keyword match="fixed"/>
|
||||
<keyword match="transparent"/>
|
||||
<keyword match="none"/>
|
||||
<keyword match="repeat-x"/>
|
||||
<keyword match="repeat-y"/>
|
||||
<keyword match="repeat"/>
|
||||
<keyword match="no-repeat"/>
|
||||
<keyword match="collapse"/>
|
||||
<keyword match="separate"/>
|
||||
<keyword match="auto"/>
|
||||
<keyword match="top"/>
|
||||
<keyword match="bottom"/>
|
||||
<keyword match="both"/>
|
||||
<keyword match="open-quote"/>
|
||||
<keyword match="close-quote"/>
|
||||
<keyword match="no-open-quote"/>
|
||||
<keyword match="no-close-quote"/>
|
||||
<keyword match="crosshair"/>
|
||||
<keyword match="default"/>
|
||||
<keyword match="pointer"/>
|
||||
<keyword match="move"/>
|
||||
<keyword match="e-resize"/>
|
||||
<keyword match="ne-resize"/>
|
||||
<keyword match="nw-resize"/>
|
||||
<keyword match="n-resize"/>
|
||||
<keyword match="se-resize"/>
|
||||
<keyword match="sw-resize"/>
|
||||
<keyword match="s-resize"/>
|
||||
<keyword match="text"/>
|
||||
<keyword match="wait"/>
|
||||
<keyword match="help"/>
|
||||
<keyword match="ltr"/>
|
||||
<keyword match="rtl"/>
|
||||
<keyword match="inline"/>
|
||||
<keyword match="block"/>
|
||||
<keyword match="list-item"/>
|
||||
<keyword match="run-in"/>
|
||||
<keyword match="compact"/>
|
||||
<keyword match="marker"/>
|
||||
<keyword match="table"/>
|
||||
<keyword match="inline-table"/>
|
||||
<keyword match="table-row-group"/>
|
||||
<keyword match="table-header-group"/>
|
||||
<keyword match="table-footer-group"/>
|
||||
<keyword match="table-row"/>
|
||||
<keyword match="table-column-group"/>
|
||||
<keyword match="table-column"/>
|
||||
<keyword match="table-cell"/>
|
||||
<keyword match="table-caption"/>
|
||||
<keyword match="below"/>
|
||||
<keyword match="level"/>
|
||||
<keyword match="above"/>
|
||||
<keyword match="higher"/>
|
||||
<keyword match="lower"/>
|
||||
<keyword match="show"/>
|
||||
<keyword match="hide"/>
|
||||
<keyword match="caption"/>
|
||||
<keyword match="icon"/>
|
||||
<keyword match="menu"/>
|
||||
<keyword match="message-box"/>
|
||||
<keyword match="small-caption"/>
|
||||
<keyword match="status-bar"/>
|
||||
<keyword match="normal"/>
|
||||
<keyword match="wider"/>
|
||||
<keyword match="narrower"/>
|
||||
<keyword match="ultra-condensed"/>
|
||||
<keyword match="extra-condensed"/>
|
||||
<keyword match="condensed"/>
|
||||
<keyword match="semi-condensed"/>
|
||||
<keyword match="semi-expanded"/>
|
||||
<keyword match="expanded"/>
|
||||
<keyword match="extra-expanded"/>
|
||||
<keyword match="ultra-expanded"/>
|
||||
<keyword match="italic"/>
|
||||
<keyword match="oblique"/>
|
||||
<keyword match="small-caps"/>
|
||||
<keyword match="bold"/>
|
||||
<keyword match="bolder"/>
|
||||
<keyword match="lighter"/>
|
||||
<keyword match="inside"/>
|
||||
<keyword match="outside"/>
|
||||
<keyword match="disc"/>
|
||||
<keyword match="circle"/>
|
||||
<keyword match="square"/>
|
||||
<keyword match="decimal"/>
|
||||
<keyword match="decimal-leading-zero"/>
|
||||
<keyword match="lower-roman"/>
|
||||
<keyword match="upper-roman"/>
|
||||
<keyword match="lower-greek"/>
|
||||
<keyword match="lower-alpha"/>
|
||||
<keyword match="lower-latin"/>
|
||||
<keyword match="upper-alpha"/>
|
||||
<keyword match="upper-latin"/>
|
||||
<keyword match="hebrew"/>
|
||||
<keyword match="armenian"/>
|
||||
<keyword match="georgian"/>
|
||||
<keyword match="cjk-ideographic"/>
|
||||
<keyword match="hiragana"/>
|
||||
<keyword match="katakana"/>
|
||||
<keyword match="hiragana-iroha"/>
|
||||
<keyword match="katakana-iroha"/>
|
||||
<keyword match="crop"/>
|
||||
<keyword match="cross"/>
|
||||
<keyword match="invert"/>
|
||||
<keyword match="visible"/>
|
||||
<keyword match="hidden"/>
|
||||
<keyword match="always"/>
|
||||
<keyword match="avoid"/>
|
||||
<keyword match="x-low"/>
|
||||
<keyword match="low"/>
|
||||
<keyword match="medium"/>
|
||||
<keyword match="high"/>
|
||||
<keyword match="x-high"/>
|
||||
<keyword match="mix?"/>
|
||||
<keyword match="repeat?"/>
|
||||
<keyword match="static"/>
|
||||
<keyword match="relative"/>
|
||||
<keyword match="absolute"/>
|
||||
<keyword match="portrait"/>
|
||||
<keyword match="landscape"/>
|
||||
<keyword match="spell-out"/>
|
||||
<keyword match="once"/>
|
||||
<keyword match="digits"/>
|
||||
<keyword match="continuous"/>
|
||||
<keyword match="code"/>
|
||||
<keyword match="x-slow"/>
|
||||
<keyword match="slow"/>
|
||||
<keyword match="fast"/>
|
||||
<keyword match="x-fast"/>
|
||||
<keyword match="faster"/>
|
||||
<keyword match="slower"/>
|
||||
<keyword match="justify"/>
|
||||
<keyword match="underline"/>
|
||||
<keyword match="overline"/>
|
||||
<keyword match="line-through"/>
|
||||
<keyword match="blink"/>
|
||||
<keyword match="capitalize"/>
|
||||
<keyword match="uppercase"/>
|
||||
<keyword match="lowercase"/>
|
||||
<keyword match="embed"/>
|
||||
<keyword match="bidi-override"/>
|
||||
<keyword match="baseline"/>
|
||||
<keyword match="sub"/>
|
||||
<keyword match="super"/>
|
||||
<keyword match="text-top"/>
|
||||
<keyword match="middle"/>
|
||||
<keyword match="text-bottom"/>
|
||||
<keyword match="silent"/>
|
||||
<keyword match="x-soft"/>
|
||||
<keyword match="soft"/>
|
||||
<keyword match="loud"/>
|
||||
<keyword match="x-loud"/>
|
||||
<keyword match="pre"/>
|
||||
<keyword match="nowrap"/>
|
||||
<keyword match="serif"/>
|
||||
<keyword match="sans-serif"/>
|
||||
<keyword match="cursive"/>
|
||||
<keyword match="fantasy"/>
|
||||
<keyword match="monospace"/>
|
||||
<keyword match="empty"/>
|
||||
<keyword match="string"/>
|
||||
<keyword match="strict"/>
|
||||
<keyword match="loose"/>
|
||||
<keyword match="char"/>
|
||||
<keyword match="true"/>
|
||||
<keyword match="false"/>
|
||||
<keyword match="dotted"/>
|
||||
<keyword match="dashed"/>
|
||||
<keyword match="solid"/>
|
||||
<keyword match="double"/>
|
||||
<keyword match="groove"/>
|
||||
<keyword match="ridge"/>
|
||||
<keyword match="inset"/>
|
||||
<keyword match="outset"/>
|
||||
<keyword match="larger"/>
|
||||
<keyword match="smaller"/>
|
||||
<keyword match="xx-small"/>
|
||||
<keyword match="x-small"/>
|
||||
<keyword match="small"/>
|
||||
<keyword match="large"/>
|
||||
<keyword match="x-large"/>
|
||||
<keyword match="xx-large"/>
|
||||
<keyword match="all"/>
|
||||
<keyword match="newspaper"/>
|
||||
<keyword match="distribute"/>
|
||||
<keyword match="distribute-all-lines"/>
|
||||
<keyword match="distribute-center-last"/>
|
||||
<keyword match="inter-word"/>
|
||||
<keyword match="inter-ideograph"/>
|
||||
<keyword match="inter-cluster"/>
|
||||
<keyword match="kashida"/>
|
||||
<keyword match="ideograph-alpha"/>
|
||||
<keyword match="ideograph-numeric"/>
|
||||
<keyword match="ideograph-parenthesis"/>
|
||||
<keyword match="ideograph-space"/>
|
||||
<keyword match="keep-all"/>
|
||||
<keyword match="break-all"/>
|
||||
<keyword match="break-word"/>
|
||||
<keyword match="lr-tb"/>
|
||||
<keyword match="tb-rl"/>
|
||||
<keyword match="thin"/>
|
||||
<keyword match="thick"/>
|
||||
<keyword match="inline-block"/>
|
||||
<keyword match="w-resize"/>
|
||||
<keyword match="hand"/>
|
||||
<keyword match="distribute-letter"/>
|
||||
<keyword match="distribute-space"/>
|
||||
<keyword match="whitespace"/>
|
||||
<keyword match="male"/>
|
||||
<keyword match="female"/>
|
||||
<keyword match="child"/>
|
||||
</keywords>
|
||||
|
||||
|
||||
<keywords name="namedcolor" inherits="identifier" innerClass="var" case = "no">
|
||||
<keyword match="aqua"/>
|
||||
<keyword match="black"/>
|
||||
<keyword match="blue"/>
|
||||
<keyword match="fuchsia"/>
|
||||
<keyword match="gray"/>
|
||||
<keyword match="green"/>
|
||||
<keyword match="lime"/>
|
||||
<keyword match="maroon"/>
|
||||
<keyword match="navy"/>
|
||||
<keyword match="olive"/>
|
||||
<keyword match="purple"/>
|
||||
<keyword match="red"/>
|
||||
<keyword match="silver"/>
|
||||
<keyword match="teal"/>
|
||||
<keyword match="white"/>
|
||||
<keyword match="yellow"/>
|
||||
<keyword match="ActiveBorder"/>
|
||||
<keyword match="ActiveCaption"/>
|
||||
<keyword match="AppWorkspace"/>
|
||||
<keyword match="Background"/>
|
||||
<keyword match="ButtonFace"/>
|
||||
<keyword match="ButtonHighlight"/>
|
||||
<keyword match="ButtonShadow"/>
|
||||
<keyword match="ButtonText"/>
|
||||
<keyword match="CaptionText"/>
|
||||
<keyword match="GrayText"/>
|
||||
<keyword match="Highlight"/>
|
||||
<keyword match="HighlightText"/>
|
||||
<keyword match="InactiveBorder"/>
|
||||
<keyword match="InactiveCaption"/>
|
||||
<keyword match="InactiveCaptionText"/>
|
||||
<keyword match="InfoBackground"/>
|
||||
<keyword match="InfoText"/>
|
||||
<keyword match="Menu"/>
|
||||
<keyword match="MenuText"/>
|
||||
<keyword match="Scrollbar"/>
|
||||
<keyword match="ThreeDDarkShadow"/>
|
||||
<keyword match="ThreeDFace"/>
|
||||
<keyword match="ThreeDHighlight"/>
|
||||
<keyword match="ThreeDLightShadow"/>
|
||||
<keyword match="ThreeDShadow"/>
|
||||
<keyword match="Window"/>
|
||||
<keyword match="WindowFrame"/>
|
||||
<keyword match="WindowText"/>
|
||||
</keywords>
|
||||
</highlight>
|
||||
45
framework/vendors/TextHighlighter/Text/diff.xml
vendored
Normal file
45
framework/vendors/TextHighlighter/Text/diff.xml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: diff.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="diff" case="yes">
|
||||
|
||||
<authors>
|
||||
<author name="Andrey Demenev" email="demenev@gmail.com"/>
|
||||
</authors>
|
||||
|
||||
|
||||
<default innerClass="default" />
|
||||
|
||||
<block name="noNewLine" match="/^\\\sNo\snewline.+$/m" innerClass="special"/>
|
||||
|
||||
<block name="diffSeparator" match="/^\-\-\-$/m" innerClass="code"/>
|
||||
|
||||
<block name="diffCmdLine" match="/^(diff\s+\-|Only\s+|Index).*$/m" innerClass="var"/>
|
||||
<block name="diffFiles" match="/^(\-\-\-|\+\+\+)\s.+$/m" innerClass="reserved"/>
|
||||
|
||||
<block name="contextOrg" match="/^\*.*$/m" innerClass="quotes"/>
|
||||
<block name="contextNew" match="/^\+.*$/m" innerClass="string"/>
|
||||
<block name="contextChg" match="/^!.*$/m" innerClass="inlinedoc"/>
|
||||
|
||||
<block name="defOrg" match="/^\<\s.*$/m" innerClass="quotes"/>
|
||||
<block name="defNew" match="/^\>\s.*$/m" innerClass="string"/>
|
||||
<block name="defChg" match="/^\d+(\,\d+)?[acd]\d+(,\d+)?$/m" innerClass="code"/>
|
||||
|
||||
<block name="uniOrg" match="/^\-.*$/m" innerClass="quotes"/>
|
||||
<block name="uniNew" match="/^\+.*$/m" innerClass="string"/>
|
||||
<block name="uniChg" match="/^@@.+@@$/m" innerClass="code"/>
|
||||
|
||||
<block name="normOrg" match="/^d\d+\s\d+$/m" innerClass="code"/>
|
||||
<region name="normNew" start="/^a\d+\s\d+$/m" end="/(?=^[ad]\d+\s\d+)/m" innerClass="var" delimClass="code"/>
|
||||
|
||||
<region name="edNew" start="/^(\d+)(,\d+)?(a)$/m" end="/^(\.)$/m" innerClass="string" delimClass="code"/>
|
||||
<region name="edChg" start="/^(\d+)(,\d+)?(c)$/m" end="/^(\.)$/m" innerClass="inlinedoc" delimClass="code"/>
|
||||
<block name="edDel" match="/^(\d+)(,\d+)?(d)$/m" innerClass="code"/>
|
||||
|
||||
<region name="fedNew" start="/^a(\d+)(\s\d+)?$/m" end="/^(\.)$/m" innerClass="string" delimClass="code"/>
|
||||
<region name="fedChg" start="/^c(\d+)(\s\d+)?$/m" end="/^(\.)$/m" innerClass="inlinedoc" delimClass="code"/>
|
||||
<block name="fedDel" match="/^d(\d+)(\s\d+)?$/m"
|
||||
innerClass="code"/>
|
||||
|
||||
|
||||
</highlight>
|
||||
66
framework/vendors/TextHighlighter/Text/dtd.xml
vendored
Normal file
66
framework/vendors/TextHighlighter/Text/dtd.xml
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: dtd.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="dtd" case="yes">
|
||||
|
||||
<authors>
|
||||
<author name="Andrey Demenev" email="demenev@gmail.com"/>
|
||||
</authors>
|
||||
|
||||
|
||||
<default innerClass="code" />
|
||||
|
||||
<region name="comment" delimClass="comment" innerClass="comment"
|
||||
start="\<!--" end="--\>">
|
||||
</region>
|
||||
|
||||
<region name="redecl" start="\<\!\[" end="\]\]\>" delimClass="brackets"
|
||||
innerClass="code" never-contained="yes">
|
||||
<contains all="yes" />
|
||||
</region>
|
||||
|
||||
<region name="tag" start="\<" end="\>" delimClass="brackets"
|
||||
innerClass="code" >
|
||||
<contains all="yes" />
|
||||
<onlyin region="redecl"/>
|
||||
</region>
|
||||
|
||||
<region name="brackets" start="\(" end="\)" delimClass="brackets"
|
||||
innerClass="code" contained="yes">
|
||||
<onlyin region="tag"/>
|
||||
<onlyin region="brackets"/>
|
||||
<contains block="entity" />
|
||||
<contains block="identifier" />
|
||||
</region>
|
||||
|
||||
<region name="strsingle" start="'" end="'" delimClass="quotes"
|
||||
innerClass="string" contained="yes">
|
||||
<onlyin region="tag"/>
|
||||
<contains block="entity" />
|
||||
</region>
|
||||
|
||||
<region name="strdouble" start=""" end=""" delimClass="quotes"
|
||||
innerClass="string" contained="yes">
|
||||
<onlyin region="tag"/>
|
||||
<contains block="entity" />
|
||||
</region>
|
||||
|
||||
<block name="tagname" match="(?<=\<)!(ENTITY|ATTLIST|ELEMENT|NOTATION)\b"
|
||||
innerClass="var" contained="yes">
|
||||
<onlyin region="tag"/>
|
||||
</block>
|
||||
|
||||
<block name="reserved" match="\s(#(IMPLIED|REQUIRED|FIXED))|CDATA|ENTITY|NOTATION|NMTOKENS?|PUBLIC|SYSTEM\b"
|
||||
innerClass="reserved" contained="yes">
|
||||
<onlyin region="tag"/>
|
||||
</block>
|
||||
|
||||
<block name="pcdata" match="#PCDATA\b"
|
||||
innerClass="reserved" contained="yes" />
|
||||
|
||||
<block name="entity" match="(\&|\%)[\w\-\.]+;" innerClass="special" />
|
||||
|
||||
<block name="identifier" match="[a-z][a-z\d\-\,:]+"
|
||||
innerClass="identifier" contained="yes" case="no"/>
|
||||
|
||||
</highlight>
|
||||
171
framework/vendors/TextHighlighter/Text/generate
vendored
Normal file
171
framework/vendors/TextHighlighter/Text/generate
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
#!@php_bin@
|
||||
<?php
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
/**
|
||||
* Console highlighter class generator
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to license@php.net so we can mail you a copy immediately.
|
||||
*
|
||||
* @category Text
|
||||
* @package Text_Highlighter
|
||||
* @author Andrey Demenev <demenev@gmail.com>
|
||||
* @copyright 2004 Andrey Demenev
|
||||
* @license http://www.php.net/license/3_0.txt PHP License
|
||||
* @version CVS: $Id: generate,v 1.1 2007/06/03 02:35:28 ssttoo Exp $
|
||||
* @link http://pear.php.net/package/Text_Highlighter
|
||||
*/
|
||||
|
||||
require_once 'Text/Highlighter/Generator.php';
|
||||
require_once 'Console/Getopt.php';
|
||||
|
||||
$options = Console_Getopt::getopt($argv, 'x:p:d:h', array('xml=', 'php=','dir=', 'help'));
|
||||
|
||||
if (PEAR::isError($options)) {
|
||||
$message = str_replace('Console_Getopt: ','',$options->message);
|
||||
usage($message);
|
||||
}
|
||||
|
||||
$source = array();
|
||||
$dest = array();
|
||||
$dir = '';
|
||||
|
||||
$expectp = false;
|
||||
$expectx = false;
|
||||
$unexpectedx = false;
|
||||
$unexpectedp = false;
|
||||
$si = $di = 0;
|
||||
|
||||
foreach ($options[0] as $option) {
|
||||
switch ($option[0]) {
|
||||
case 'x':
|
||||
case '--xml':
|
||||
$source[$si] = $option[1];
|
||||
if ($si) {
|
||||
$di++;
|
||||
}
|
||||
$si++;
|
||||
if ($expectp) {
|
||||
$unexpectedx = true;
|
||||
}
|
||||
$expectp = true;
|
||||
$expectx = false;
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
case '--php':
|
||||
if ($expectx) {
|
||||
$unexpectedp = true;
|
||||
}
|
||||
$dest[$di] = $option[1];
|
||||
$expectp = false;
|
||||
$expectx = true;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
case '--dir':
|
||||
$dir = $option[1];
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
case '--help':
|
||||
usage();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($unexpectedx && !$dir) {
|
||||
usage('Unexpected -x or --xml', STDERR);
|
||||
}
|
||||
|
||||
if ($unexpectedp) {
|
||||
usage('Unexpected -p or --php', STDERR);
|
||||
}
|
||||
|
||||
$nsource = count($source);
|
||||
$ndest = count($dest);
|
||||
|
||||
if (!$nsource && !$ndest) {
|
||||
$source[]='php://stdin';
|
||||
if (!$dir) {
|
||||
$dest[]='php://stdout';
|
||||
} else {
|
||||
$dest[] = null;
|
||||
}
|
||||
} elseif ($expectp && !$dir && $nsource > 1) {
|
||||
usage('-x or --xml without following -p or --php', STDERR);
|
||||
} elseif ($nsource == 1 && !$ndest && !$dir) {
|
||||
$dest[]='php://stdout';
|
||||
}
|
||||
|
||||
if ($dir && substr($dir,-1)!='/' && substr($dir,-1)!=='\\' ) {
|
||||
$dir .= DIRECTORY_SEPARATOR;
|
||||
}
|
||||
|
||||
|
||||
foreach ($source as $i => $xmlfile)
|
||||
{
|
||||
$gen =& new Text_Highlighter_Generator;
|
||||
$gen->setInputFile($xmlfile);
|
||||
if ($gen->hasErrors()) {
|
||||
break;
|
||||
}
|
||||
$gen->generate();
|
||||
if ($gen->hasErrors()) {
|
||||
break;
|
||||
}
|
||||
if (isset($dest[$i])) {
|
||||
$phpfile = $dest[$i];
|
||||
} else {
|
||||
$phpfile = $dir . $gen->language . '.php';
|
||||
}
|
||||
$gen->saveCode($phpfile);
|
||||
if ($gen->hasErrors()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($gen->hasErrors()) {
|
||||
$errors = $gen->getErrors();
|
||||
foreach ($errors as $error) {
|
||||
fwrite (STDERR, $error . "\n");
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
|
||||
function usage($message='', $file=STDOUT)
|
||||
{
|
||||
$code = 0;
|
||||
if ($message) {
|
||||
$message .= "\n\n";
|
||||
$code = 1;
|
||||
}
|
||||
$message .= <<<MSG
|
||||
Generates a highlighter class from XML source
|
||||
Usage:
|
||||
generate options
|
||||
|
||||
Options:
|
||||
-x filename, --xml=filename
|
||||
source XML file. Multiple input files can be specified, in which
|
||||
case each -x option must be followed by -p unless -d is specified
|
||||
Defaults to stdin
|
||||
-p filename, --php=filename
|
||||
destination PHP file. Defaults to stdout. If specied multiple times,
|
||||
each -p must follow -x
|
||||
-d dirname, --dir=dirname
|
||||
Default destination directory. File names will be taken from XML input
|
||||
("lang" attribute of <highlight> tag)
|
||||
-h, --help
|
||||
This help
|
||||
MSG;
|
||||
fwrite ($file, $message);
|
||||
exit($code);
|
||||
}
|
||||
?>
|
||||
|
||||
188
framework/vendors/TextHighlighter/Text/generate.bat
vendored
Normal file
188
framework/vendors/TextHighlighter/Text/generate.bat
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
@echo off
|
||||
rem vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:
|
||||
|
||||
rem Console highlighter class generator
|
||||
|
||||
rem PHP versions 4 and 5
|
||||
|
||||
rem LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
rem that is available through the world-wide-web at the following URI:
|
||||
rem http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
rem the PHP License and are unable to obtain it through the web, please
|
||||
rem send a note to license@php.net so we can mail you a copy immediately.
|
||||
|
||||
rem @category Text
|
||||
rem @package Text_Highlighter
|
||||
rem @author Andrey Demenev <demenev@gmail.com>
|
||||
rem @copyright 2004 Andrey Demenev
|
||||
rem @license http://www.php.net/license/3_0.txt PHP License
|
||||
rem @version CVS: $Id: generate.bat,v 1.1 2007/06/03 02:35:28 ssttoo Exp $
|
||||
rem @link http://pear.php.net/package/Text_Highlighter
|
||||
|
||||
set "MHL_PARAMS="
|
||||
:doshift
|
||||
set "MHL_PARAMS=%MHL_PARAMS% %1"
|
||||
shift
|
||||
if -%1- == -- GOTO noshift
|
||||
GOTO doshift
|
||||
:noshift
|
||||
@php_bin@ -q -d output_buffering=1 -d include_path="@php_dir@" @bin_dir@/Text/Highlighter/generate.bat %MHL_PARAMS%
|
||||
|
||||
GOTO finish
|
||||
<?php
|
||||
ob_end_clean();
|
||||
|
||||
if (!defined('STDOUT')) {
|
||||
define('STDOUT', fopen('php://stdout', 'wb'));
|
||||
define('STDERR', fopen('php://stderr', 'wb'));
|
||||
}
|
||||
require_once 'Text/Highlighter/Generator.php';
|
||||
require_once 'Console/Getopt.php';
|
||||
|
||||
$options = Console_Getopt::getopt($argv, 'x:p:d:h', array('xml=', 'php=','dir=', 'help'));
|
||||
|
||||
if (PEAR::isError($options)) {
|
||||
$message = str_replace('Console_Getopt: ','',$options->message);
|
||||
usage($message);
|
||||
}
|
||||
|
||||
$source = array();
|
||||
$dest = array();
|
||||
$dir = '';
|
||||
|
||||
$expectp = false;
|
||||
$expectx = false;
|
||||
$unexpectedx = false;
|
||||
$unexpectedp = false;
|
||||
$si = $di = 0;
|
||||
|
||||
foreach ($options[0] as $option) {
|
||||
switch ($option[0]) {
|
||||
case 'x':
|
||||
case '--xml':
|
||||
$source[$si] = $option[1];
|
||||
if ($si) {
|
||||
$di++;
|
||||
}
|
||||
$si++;
|
||||
if ($expectp) {
|
||||
$unexpectedx = true;
|
||||
}
|
||||
$expectp = true;
|
||||
$expectx = false;
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
case '--php':
|
||||
if ($expectx) {
|
||||
$unexpectedp = true;
|
||||
}
|
||||
$dest[$di] = $option[1];
|
||||
$expectp = false;
|
||||
$expectx = true;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
case '--dir':
|
||||
$dir = $option[1];
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
case '--help':
|
||||
usage();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($unexpectedx && !$dir) {
|
||||
usage('Unexpected -x or --xml', STDERR);
|
||||
}
|
||||
|
||||
if ($unexpectedp) {
|
||||
usage('Unexpected -p or --php', STDERR);
|
||||
}
|
||||
|
||||
$nsource = count($source);
|
||||
$ndest = count($dest);
|
||||
|
||||
if (!$nsource && !$ndest) {
|
||||
$source[]='php://stdin';
|
||||
if (!$dir) {
|
||||
$dest[]='php://stdout';
|
||||
} else {
|
||||
$dest[] = null;
|
||||
}
|
||||
} elseif ($expectp && !$dir && $nsource > 1) {
|
||||
usage('-x or --xml without following -p or --php', STDERR);
|
||||
} elseif ($nsource == 1 && !$ndest && !$dir) {
|
||||
$dest[]='php://stdout';
|
||||
}
|
||||
|
||||
if ($dir && substr($dir,-1)!='/' && substr($dir,-1)!=='\\' ) {
|
||||
$dir .= DIRECTORY_SEPARATOR;
|
||||
}
|
||||
|
||||
|
||||
foreach ($source as $i => $xmlfile)
|
||||
{
|
||||
$gen =& new Text_Highlighter_Generator;
|
||||
$gen->setInputFile($xmlfile);
|
||||
if ($gen->hasErrors()) {
|
||||
break;
|
||||
}
|
||||
$gen->generate();
|
||||
if ($gen->hasErrors()) {
|
||||
break;
|
||||
}
|
||||
if (isset($dest[$i])) {
|
||||
$phpfile = $dest[$i];
|
||||
} else {
|
||||
$phpfile = $dir . $gen->language . '.php';
|
||||
}
|
||||
$gen->saveCode($phpfile);
|
||||
if ($gen->hasErrors()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($gen->hasErrors()) {
|
||||
$errors = $gen->getErrors();
|
||||
foreach ($errors as $error) {
|
||||
fwrite (STDERR, $error . "\n");
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
|
||||
exit(0);
|
||||
|
||||
function usage($message='', $file=STDOUT)
|
||||
{
|
||||
$code = 0;
|
||||
if ($message) {
|
||||
$message .= "\n\n";
|
||||
$code = 1;
|
||||
}
|
||||
$message .= <<<MSG
|
||||
Generates a highlighter class from XML source
|
||||
Usage:
|
||||
generate options
|
||||
|
||||
Options:
|
||||
-x filename, --xml=filename
|
||||
source XML file. Multiple input files can be specified, in which
|
||||
case each -x option must be followed by -p unless -d is specified
|
||||
Defaults to stdin
|
||||
-p filename, --php=filename
|
||||
destination PHP file. Defaults to stdout. If specied multiple times,
|
||||
each -p must follow -x
|
||||
-d dirname, --dir=dirname
|
||||
Default destination directory. File names will be taken from XML input
|
||||
("lang" attribute of <highlight> tag)
|
||||
-h, --help
|
||||
This help
|
||||
MSG;
|
||||
fwrite ($file, $message);
|
||||
exit($code);
|
||||
}
|
||||
?>
|
||||
:finish
|
||||
33
framework/vendors/TextHighlighter/Text/html.xml
vendored
Normal file
33
framework/vendors/TextHighlighter/Text/html.xml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: html.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="html" case="no">
|
||||
|
||||
<authors>
|
||||
<author name="Andrey Demenev" email="demenev@gmail.com"/>
|
||||
</authors>
|
||||
|
||||
|
||||
<default innerClass="code" />
|
||||
|
||||
<region name="comment" delimClass="comment" innerClass="comment"
|
||||
start="\<!--" end="--\>">
|
||||
</region>
|
||||
|
||||
<region name="tag" delimClass="brackets" innerClass="code" start="\<[\?\/]?" end="[\/\?]?\>">
|
||||
<contains block="tagname"/>
|
||||
<contains region="param"/>
|
||||
<contains block="paramname"/>
|
||||
</region>
|
||||
|
||||
<block name="tagname" match="(?<=[\<\/?])[\w\-\:]+" innerClass="reserved" contained="yes"/>
|
||||
|
||||
<block name="paramname" match="[\w\-\:]+" innerClass="var" contained="yes"/>
|
||||
|
||||
<block name="entity" match="(&)[\w\-\.]+;" innerClass="special" />
|
||||
|
||||
<region name="param" start=""" end=""" delimClass="quotes" innerClass="string" contained="yes">
|
||||
<contains block="entity"/>
|
||||
</region>
|
||||
|
||||
</highlight>
|
||||
2824
framework/vendors/TextHighlighter/Text/java.xml
vendored
Normal file
2824
framework/vendors/TextHighlighter/Text/java.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
174
framework/vendors/TextHighlighter/Text/javascript.xml
vendored
Normal file
174
framework/vendors/TextHighlighter/Text/javascript.xml
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: javascript.xml,v 1.3 2008/01/01 23:43:36 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="javascript" case = "no">
|
||||
|
||||
<authors>
|
||||
<author name="Andrey Demenev" email ="demenev@gmail.com"/>
|
||||
</authors>
|
||||
|
||||
<default innerClass="code" />
|
||||
|
||||
<region name="block" delimClass="brackets" innerClass="code" start="\{" end="\}">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="brackets" delimClass="brackets" innerClass="code" start="\(" end="\)">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="sqbrackets" delimClass="brackets" innerClass="code" start="\[" end="\]">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
|
||||
<region name="mlcomment" innerClass="comment" start="\/\*" end="\*\/" >
|
||||
<contains block="cvstag"/>
|
||||
</region>
|
||||
|
||||
<region name="strdouble" delimClass="quotes" innerClass="string" start=""" end="""/>
|
||||
|
||||
<region name="strsingle" delimClass="quotes" innerClass="string" start="'" end="'" />
|
||||
|
||||
<block name="escaped" match="\\\\|\\"|\\'|\\`" innerClass="special" contained="yes">
|
||||
<onlyin region="strsingle"/>
|
||||
</block>
|
||||
|
||||
<block name="descaped" match="\\\\|\\"|\\'|\\`|\\t|\\n|\\r" innerClass="special" contained="yes">
|
||||
<onlyin region="strdouble"/>
|
||||
</block>
|
||||
|
||||
<region name="comment" start="\/\/" end="/$/m" innerClass="comment">
|
||||
<contains block="cvstag"/>
|
||||
</region>
|
||||
|
||||
<block name="identifier" match="[a-z_]\w*" innerClass="identifier" case="no"/>
|
||||
|
||||
<block name="number" match="0x\d*|\d*\.?\d+" innerClass="number"/>
|
||||
|
||||
|
||||
<block name="url" match="((https?|ftp):\/\/[\w\?\.\-\&=\/%+]+)|(^|[\s,!?])www\.\w+\.\w+[\w\?\.\&=\/%+]*" innerClass="url" contained="yes">
|
||||
<onlyin region="mlcomment"/>
|
||||
<onlyin region="comment"/>
|
||||
</block>
|
||||
|
||||
<block name="email" match="\w+[\.\w\-]+@(\w+[\.\w\-])+" innerClass="url" contained="yes">
|
||||
<onlyin region="mlcomment"/>
|
||||
<onlyin region="comment"/>
|
||||
</block>
|
||||
|
||||
<block name="note" match="\b(note|fixme):" innerClass="inlinedoc" contained="yes" case="no">
|
||||
<onlyin region="mlcomment"/>
|
||||
<onlyin region="comment"/>
|
||||
</block>
|
||||
|
||||
|
||||
<block name="cvstag" match="\$\w+:.+\$" innerClass="inlinedoc" contained="yes">
|
||||
<onlyin region="mlcomment"/>
|
||||
<onlyin region="comment"/>
|
||||
</block>
|
||||
|
||||
<keywords name="builtin" inherits="identifier" innerClass="builtin" case = "yes">
|
||||
<keyword match="String"/>
|
||||
<keyword match="Array"/>
|
||||
<keyword match="RegExp"/>
|
||||
<keyword match="Function"/>
|
||||
<keyword match="Math"/>
|
||||
<keyword match="Number"/>
|
||||
<keyword match="Date"/>
|
||||
<keyword match="Image"/>
|
||||
<keyword match="window"/>
|
||||
<keyword match="document"/>
|
||||
<keyword match="navigator"/>
|
||||
<keyword match="onAbort"/>
|
||||
<keyword match="onBlur"/>
|
||||
<keyword match="onChange"/>
|
||||
<keyword match="onClick"/>
|
||||
<keyword match="onDblClick"/>
|
||||
<keyword match="onDragDrop"/>
|
||||
<keyword match="onError"/>
|
||||
<keyword match="onFocus"/>
|
||||
<keyword match="onKeyDown"/>
|
||||
<keyword match="onKeyPress"/>
|
||||
<keyword match="onKeyUp"/>
|
||||
<keyword match="onLoad"/>
|
||||
<keyword match="onMouseDown"/>
|
||||
<keyword match="onMouseOver"/>
|
||||
<keyword match="onMouseOut"/>
|
||||
<keyword match="onMouseMove"/>
|
||||
<keyword match="onMouseUp"/>
|
||||
<keyword match="onMove"/>
|
||||
<keyword match="onReset"/>
|
||||
<keyword match="onResize"/>
|
||||
<keyword match="onSelect"/>
|
||||
<keyword match="onSubmit"/>
|
||||
<keyword match="onUnload"/>
|
||||
</keywords>
|
||||
|
||||
<keywords name="reserved" inherits="identifier" innerClass="reserved" case = "yes">
|
||||
<keyword match="break"/>
|
||||
<keyword match="continue"/>
|
||||
<keyword match="do"/>
|
||||
<keyword match="while"/>
|
||||
<keyword match="do"/>
|
||||
<keyword match="export"/>
|
||||
<keyword match="for"/>
|
||||
<keyword match="in"/>
|
||||
<keyword match="if"/>
|
||||
<keyword match="else"/>
|
||||
<keyword match="import"/>
|
||||
<keyword match="return"/>
|
||||
<keyword match="label"/>
|
||||
<keyword match="switch"/>
|
||||
<keyword match="case"/>
|
||||
<keyword match="var"/>
|
||||
<keyword match="with"/>
|
||||
<keyword match="delete"/>
|
||||
<keyword match="new"/>
|
||||
<keyword match="this"/>
|
||||
<keyword match="typeof"/>
|
||||
<keyword match="void"/>
|
||||
<keyword match="abstract"/>
|
||||
<keyword match="boolean"/>
|
||||
<keyword match="byte"/>
|
||||
<keyword match="catch"/>
|
||||
<keyword match="char"/>
|
||||
<keyword match="class"/>
|
||||
<keyword match="const"/>
|
||||
<keyword match="continue"/>
|
||||
<keyword match="debugger"/>
|
||||
<keyword match="default"/>
|
||||
<keyword match="double"/>
|
||||
<keyword match="enum"/>
|
||||
<keyword match="extends"/>
|
||||
<keyword match="false"/>
|
||||
<keyword match="final"/>
|
||||
<keyword match="finally"/>
|
||||
<keyword match="float"/>
|
||||
<keyword match="function"/>
|
||||
<keyword match="implements"/>
|
||||
<keyword match="goto"/>
|
||||
<keyword match="in"/>
|
||||
<keyword match="instanceof"/>
|
||||
<keyword match="int"/>
|
||||
<keyword match="interface"/>
|
||||
<keyword match="long"/>
|
||||
<keyword match="native"/>
|
||||
<keyword match="null"/>
|
||||
<keyword match="package"/>
|
||||
<keyword match="private"/>
|
||||
<keyword match="protected"/>
|
||||
<keyword match="public"/>
|
||||
<keyword match="short"/>
|
||||
<keyword match="static"/>
|
||||
<keyword match="super"/>
|
||||
<keyword match="synchronized"/>
|
||||
<keyword match="throw"/>
|
||||
<keyword match="throws"/>
|
||||
<keyword match="transient"/>
|
||||
<keyword match="true"/>
|
||||
<keyword match="try"/>
|
||||
<keyword match="volatile"/>
|
||||
</keywords>
|
||||
|
||||
</highlight>
|
||||
424
framework/vendors/TextHighlighter/Text/mysql.xml
vendored
Normal file
424
framework/vendors/TextHighlighter/Text/mysql.xml
vendored
Normal file
@@ -0,0 +1,424 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: mysql.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="mysql" case="no">
|
||||
|
||||
<authors>
|
||||
<author name="Andrey Demenev" email="demenev@gmail.com"/>
|
||||
</authors>
|
||||
|
||||
|
||||
<default innerClass="code" />
|
||||
|
||||
<region name="qidentifier" delimClass="quotes" innerClass="identifier"
|
||||
start="`" end="`" />
|
||||
|
||||
<region name="mlcomment" delimClass="comment" innerClass="comment"
|
||||
start="\/\*" end="\*\/" />
|
||||
|
||||
<block name="comment" match="(#|--\s).*" innerClass="comment" />
|
||||
|
||||
<block name="possiblefunction" match="[a-z_]\w*(?=\s*\()" innerClass="identifier" />
|
||||
|
||||
<block name="identifier" match="[a-z_]\w*" innerClass="identifier" />
|
||||
|
||||
<region name="strdouble" delimClass="quotes" innerClass="string"
|
||||
start=""" end=""" >
|
||||
</region>
|
||||
|
||||
<region name="brackets" delimClass="brackets" innerClass="code"
|
||||
start="\(" end="\)" >
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="strsingle" delimClass="quotes" innerClass="string"
|
||||
start="'" end="'" />
|
||||
|
||||
<block name="escaped" match="\\." innerClass="special" contained="yes">
|
||||
<onlyin region="strsingle"/>
|
||||
<onlyin region="strdouble"/>
|
||||
</block>
|
||||
|
||||
<block name="exponent"
|
||||
match="((\d+|((\d*\.\d+)|(\d+\.\d*)))[eE][+-]?\d+)"
|
||||
innerClass="number" />
|
||||
|
||||
<block name="float" match="(\d*\.\d+)|(\d+\.\d*)" innerClass="number"/>
|
||||
|
||||
<block name="integer" match="\d+l?|\b0l?\b" innerClass="number" />
|
||||
|
||||
<block name="hexinteger" match="0[xX][\da-f]+l?" innerClass="number" />
|
||||
|
||||
<keywords name="reserved" inherits="identifier" innerClass="reserved"
|
||||
case="no">
|
||||
<keyword match="action" />
|
||||
<keyword match="add" />
|
||||
<keyword match="aggregate" />
|
||||
<keyword match="all" />
|
||||
<keyword match="alter" />
|
||||
<keyword match="after" />
|
||||
<keyword match="and" />
|
||||
<keyword match="as" />
|
||||
<keyword match="asc" />
|
||||
<keyword match="avg" />
|
||||
<keyword match="avg_row_length" />
|
||||
<keyword match="auto_increment" />
|
||||
<keyword match="between" />
|
||||
<keyword match="bigint" />
|
||||
<keyword match="bit" />
|
||||
|
||||
<keyword match="binary" />
|
||||
<keyword match="blob" />
|
||||
<keyword match="bool" />
|
||||
<keyword match="both" />
|
||||
<keyword match="by" />
|
||||
<keyword match="cascade" />
|
||||
<keyword match="case" />
|
||||
<keyword match="char" />
|
||||
<keyword match="character" />
|
||||
<keyword match="change" />
|
||||
<keyword match="check" />
|
||||
<keyword match="checksum" />
|
||||
<keyword match="column" />
|
||||
<keyword match="columns" />
|
||||
<keyword match="comment" />
|
||||
<keyword match="constraint" />
|
||||
<keyword match="create" />
|
||||
|
||||
<keyword match="cross" />
|
||||
<keyword match="current_date" />
|
||||
<keyword match="current_time" />
|
||||
<keyword match="current_timestamp" />
|
||||
<keyword match="data" />
|
||||
<keyword match="database" />
|
||||
<keyword match="databases" />
|
||||
<keyword match="date" />
|
||||
<keyword match="datetime" />
|
||||
<keyword match="day" />
|
||||
<keyword match="day_hour" />
|
||||
<keyword match="day_minute" />
|
||||
<keyword match="day_second" />
|
||||
<keyword match="dayofmonth" />
|
||||
<keyword match="dayofweek" />
|
||||
<keyword match="dayofyear" />
|
||||
<keyword match="dec" />
|
||||
|
||||
<keyword match="decimal" />
|
||||
<keyword match="default" />
|
||||
<keyword match="delayed" />
|
||||
<keyword match="delay_key_write" />
|
||||
<keyword match="delete" />
|
||||
<keyword match="desc" />
|
||||
<keyword match="describe" />
|
||||
<keyword match="distinct" />
|
||||
<keyword match="distinctrow" />
|
||||
<keyword match="double" />
|
||||
<keyword match="drop" />
|
||||
<keyword match="end" />
|
||||
<keyword match="else" />
|
||||
<keyword match="escape" />
|
||||
<keyword match="escaped" />
|
||||
<keyword match="enclosed" />
|
||||
<keyword match="enum" />
|
||||
|
||||
<keyword match="explain" />
|
||||
<keyword match="exists" />
|
||||
<keyword match="fields" />
|
||||
<keyword match="file" />
|
||||
<keyword match="first" />
|
||||
<keyword match="float" />
|
||||
<keyword match="float4" />
|
||||
<keyword match="float8" />
|
||||
<keyword match="flush" />
|
||||
<keyword match="foreign" />
|
||||
<keyword match="from" />
|
||||
<keyword match="for" />
|
||||
<keyword match="full" />
|
||||
<keyword match="function" />
|
||||
<keyword match="global" />
|
||||
<keyword match="grant" />
|
||||
<keyword match="grants" />
|
||||
|
||||
<keyword match="group" />
|
||||
<keyword match="having" />
|
||||
<keyword match="heap" />
|
||||
<keyword match="high_priority" />
|
||||
<keyword match="hour" />
|
||||
<keyword match="hour_minute" />
|
||||
<keyword match="hour_second" />
|
||||
<keyword match="hosts" />
|
||||
<keyword match="identified" />
|
||||
<keyword match="ignore" />
|
||||
<keyword match="in" />
|
||||
<keyword match="index" />
|
||||
<keyword match="infile" />
|
||||
<keyword match="inner" />
|
||||
<keyword match="insert" />
|
||||
<keyword match="insert_id" />
|
||||
<keyword match="int" />
|
||||
|
||||
<keyword match="integer" />
|
||||
<keyword match="interval" />
|
||||
<keyword match="int1" />
|
||||
<keyword match="int2" />
|
||||
<keyword match="int3" />
|
||||
<keyword match="int4" />
|
||||
<keyword match="int8" />
|
||||
<keyword match="into" />
|
||||
<keyword match="if" />
|
||||
<keyword match="is" />
|
||||
<keyword match="isam" />
|
||||
<keyword match="join" />
|
||||
<keyword match="key" />
|
||||
<keyword match="keys" />
|
||||
<keyword match="kill" />
|
||||
<keyword match="last_insert_id" />
|
||||
<keyword match="leading" />
|
||||
|
||||
<keyword match="left" />
|
||||
<keyword match="length" />
|
||||
<keyword match="like" />
|
||||
<keyword match="lines" />
|
||||
<keyword match="limit" />
|
||||
<keyword match="load" />
|
||||
<keyword match="local" />
|
||||
<keyword match="lock" />
|
||||
<keyword match="logs" />
|
||||
<keyword match="long" />
|
||||
<keyword match="longblob" />
|
||||
<keyword match="longtext" />
|
||||
<keyword match="low_priority" />
|
||||
<keyword match="max" />
|
||||
<keyword match="max_rows" />
|
||||
<keyword match="match" />
|
||||
<keyword match="mediumblob" />
|
||||
|
||||
<keyword match="mediumtext" />
|
||||
<keyword match="mediumint" />
|
||||
<keyword match="middleint" />
|
||||
<keyword match="min_rows" />
|
||||
<keyword match="minute" />
|
||||
<keyword match="minute_second" />
|
||||
<keyword match="modify" />
|
||||
<keyword match="month" />
|
||||
<keyword match="monthname" />
|
||||
<keyword match="myisam" />
|
||||
<keyword match="natural" />
|
||||
<keyword match="numeric" />
|
||||
<keyword match="no" />
|
||||
<keyword match="not" />
|
||||
<keyword match="null" />
|
||||
<keyword match="on" />
|
||||
<keyword match="optimize" />
|
||||
|
||||
<keyword match="option" />
|
||||
<keyword match="optionally" />
|
||||
<keyword match="or" />
|
||||
<keyword match="order" />
|
||||
<keyword match="outer" />
|
||||
<keyword match="outfile" />
|
||||
<keyword match="pack_keys" />
|
||||
<keyword match="partial" />
|
||||
<keyword match="password" />
|
||||
<keyword match="precision" />
|
||||
<keyword match="primary" />
|
||||
<keyword match="procedure" />
|
||||
<keyword match="process" />
|
||||
<keyword match="processlist" />
|
||||
<keyword match="privileges" />
|
||||
<keyword match="read" />
|
||||
<keyword match="real" />
|
||||
|
||||
<keyword match="references" />
|
||||
<keyword match="reload" />
|
||||
<keyword match="regexp" />
|
||||
<keyword match="rename" />
|
||||
<keyword match="replace" />
|
||||
<keyword match="restrict" />
|
||||
<keyword match="returns" />
|
||||
<keyword match="revoke" />
|
||||
<keyword match="rlike" />
|
||||
<keyword match="row" />
|
||||
<keyword match="rows" />
|
||||
<keyword match="second" />
|
||||
<keyword match="select" />
|
||||
<keyword match="set" />
|
||||
<keyword match="show" />
|
||||
<keyword match="shutdown" />
|
||||
<keyword match="smallint" />
|
||||
|
||||
<keyword match="soname" />
|
||||
<keyword match="sql_big_tables" />
|
||||
<keyword match="sql_big_selects" />
|
||||
<keyword match="sql_low_priority_updates" />
|
||||
<keyword match="sql_log_off" />
|
||||
<keyword match="sql_log_update" />
|
||||
<keyword match="sql_select_limit" />
|
||||
<keyword match="sql_small_result" />
|
||||
<keyword match="sql_big_result" />
|
||||
<keyword match="sql_warnings" />
|
||||
<keyword match="straight_join" />
|
||||
<keyword match="starting" />
|
||||
<keyword match="status" />
|
||||
<keyword match="string" />
|
||||
<keyword match="table" />
|
||||
<keyword match="tables" />
|
||||
<keyword match="temporary" />
|
||||
|
||||
<keyword match="terminated" />
|
||||
<keyword match="text" />
|
||||
<keyword match="then" />
|
||||
<keyword match="time" />
|
||||
<keyword match="timestamp" />
|
||||
<keyword match="tinyblob" />
|
||||
<keyword match="tinytext" />
|
||||
<keyword match="tinyint" />
|
||||
<keyword match="trailing" />
|
||||
<keyword match="to" />
|
||||
<keyword match="type" />
|
||||
<keyword match="use" />
|
||||
<keyword match="using" />
|
||||
<keyword match="unique" />
|
||||
<keyword match="unlock" />
|
||||
<keyword match="unsigned" />
|
||||
<keyword match="update" />
|
||||
|
||||
<keyword match="usage" />
|
||||
<keyword match="values" />
|
||||
<keyword match="varchar" />
|
||||
<keyword match="variables" />
|
||||
<keyword match="varying" />
|
||||
<keyword match="varbinary" />
|
||||
<keyword match="with" />
|
||||
<keyword match="write" />
|
||||
<keyword match="when" />
|
||||
<keyword match="where" />
|
||||
<keyword match="year" />
|
||||
<keyword match="year_month" />
|
||||
<keyword match="zerofill" />
|
||||
</keywords>
|
||||
|
||||
<keywords name="function" inherits="possiblefunction" innerClass="reserved"
|
||||
case="no" otherwise="identifier">
|
||||
<keyword match="ABS" />
|
||||
<keyword match="ACOS" />
|
||||
<keyword match="ADDDATE" />
|
||||
<keyword match="ASCII" />
|
||||
<keyword match="ASIN" />
|
||||
<keyword match="ATAN" />
|
||||
<keyword match="ATAN2" />
|
||||
<keyword match="AVG" />
|
||||
<keyword match="BENCHMARK" />
|
||||
<keyword match="BIN" />
|
||||
<keyword match="CEILING" />
|
||||
<keyword match="CHAR" />
|
||||
<keyword match="COALESCE" />
|
||||
<keyword match="CONCAT" />
|
||||
<keyword match="CONV" />
|
||||
<keyword match="COS" />
|
||||
<keyword match="COT" />
|
||||
<keyword match="COUNT" />
|
||||
<keyword match="CURDATE" />
|
||||
<keyword match="CURTIME" />
|
||||
<keyword match="DATABASE" />
|
||||
<keyword match="DAYNAME" />
|
||||
<keyword match="DAYOFMONTH" />
|
||||
<keyword match="DAYOFWEEK" />
|
||||
<keyword match="DAYOFYEAR" />
|
||||
<keyword match="DECODE" />
|
||||
<keyword match="DEGREES" />
|
||||
<keyword match="ELT" />
|
||||
|
||||
<keyword match="ENCODE" />
|
||||
<keyword match="ENCRYPT" />
|
||||
<keyword match="EXP" />
|
||||
<keyword match="EXTRACT" />
|
||||
|
||||
<keyword match="EXTRACT" />
|
||||
<keyword match="FIELD" />
|
||||
<keyword match="FLOOR" />
|
||||
<keyword match="FORMAT" />
|
||||
<keyword match="GREATEST" />
|
||||
<keyword match="HEX" />
|
||||
<keyword match="HOUR" />
|
||||
<keyword match="IF" />
|
||||
<keyword match="IFNULL" />
|
||||
<keyword match="INSERT" />
|
||||
<keyword match="INSTR" />
|
||||
<keyword match="INTERVAL" />
|
||||
|
||||
<keyword match="ISNULL" />
|
||||
<keyword match="LCASE" />
|
||||
<keyword match="LEAST" />
|
||||
<keyword match="LEFT" />
|
||||
<keyword match="LENGTH" />
|
||||
<keyword match="LOCATE" />
|
||||
|
||||
<keyword match="LOCATE" />
|
||||
<keyword match="LOG" />
|
||||
<keyword match="LOG10" />
|
||||
<keyword match="LOWER" />
|
||||
<keyword match="LPAD" />
|
||||
<keyword match="LTRIM" />
|
||||
<keyword match="MAX" />
|
||||
<keyword match="MD5" />
|
||||
<keyword match="MID" />
|
||||
<keyword match="MIN" />
|
||||
|
||||
<keyword match="MINUTE" />
|
||||
<keyword match="MOD" />
|
||||
<keyword match="MONTH" />
|
||||
<keyword match="MONTHNAME" />
|
||||
<keyword match="NOW" />
|
||||
<keyword match="NULLIF" />
|
||||
<keyword match="OCT" />
|
||||
<keyword match="ORD" />
|
||||
<keyword match="PASSWORD" />
|
||||
<keyword match="PI" />
|
||||
<keyword match="POSITION" />
|
||||
|
||||
<keyword match="POW" />
|
||||
<keyword match="POWER" />
|
||||
<keyword match="prepare" />
|
||||
<keyword match="QUARTER" />
|
||||
<keyword match="RADIANS" />
|
||||
<keyword match="RAND" />
|
||||
<keyword match="REPEAT" />
|
||||
<keyword match="REPLACE" />
|
||||
<keyword match="REVERSE" />
|
||||
<keyword match="RIGHT" />
|
||||
<keyword match="ROUND" />
|
||||
|
||||
<keyword match="ROUND" />
|
||||
<keyword match="RPAD" />
|
||||
|
||||
<keyword match="RTRIM" />
|
||||
<keyword match="SECOND" />
|
||||
<keyword match="SIGN" />
|
||||
<keyword match="SIN" />
|
||||
<keyword match="SOUNDEX" />
|
||||
<keyword match="SPACE" />
|
||||
<keyword match="SQRT" />
|
||||
<keyword match="STD" />
|
||||
<keyword match="STDDEV" />
|
||||
<keyword match="STRCMP" />
|
||||
<keyword match="SUBDATE" />
|
||||
<keyword match="SUBSTRING" />
|
||||
|
||||
<keyword match="SUBSTRING" />
|
||||
<keyword match="SUM" />
|
||||
<keyword match="SYSDATE" />
|
||||
<keyword match="TAN" />
|
||||
|
||||
<keyword match="TRIM" />
|
||||
<keyword match="TRUNCATE" />
|
||||
<keyword match="UCASE" />
|
||||
<keyword match="UPPER" />
|
||||
<keyword match="USER" />
|
||||
<keyword match="VERSION" />
|
||||
<keyword match="WEEK" />
|
||||
<keyword match="WEEKDAY" />
|
||||
<keyword match="YEAR" />
|
||||
</keywords>
|
||||
|
||||
</highlight>
|
||||
243
framework/vendors/TextHighlighter/Text/package.xml
vendored
Normal file
243
framework/vendors/TextHighlighter/Text/package.xml
vendored
Normal file
@@ -0,0 +1,243 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<package packagerversion="1.5.4" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
|
||||
<name>Text_Highlighter</name>
|
||||
<channel>pear.php.net</channel>
|
||||
<summary>Syntax highlighting</summary>
|
||||
<description>Text_Highlighter is a package for syntax highlighting.
|
||||
|
||||
It provides a base class provining all the functionality,
|
||||
and a descendent classes geneator class.
|
||||
|
||||
The main idea is to simplify creation of subclasses
|
||||
implementing syntax highlighting for particular language.
|
||||
Subclasses do not implement any new functioanality,
|
||||
they just provide syntax highlighting rules.
|
||||
The rules sources are in XML format.
|
||||
|
||||
To create a highlighter for a language, there is no need
|
||||
to code a new class manually. Simply describe the rules
|
||||
in XML file and use Text_Highlighter_Generator to create
|
||||
a new class.</description>
|
||||
<lead>
|
||||
<name>Stoyan Stefanov</name>
|
||||
<user>stoyan</user>
|
||||
<email>ssttoo@gmail.com</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<lead>
|
||||
<name>Andrey Demenev</name>
|
||||
<user>blindman</user>
|
||||
<email>demenev@gmail.com</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<date>2007-06-06</date>
|
||||
<time>11:28:05</time>
|
||||
<version>
|
||||
<release>0.7.0</release>
|
||||
<api>0.7.0</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>beta</release>
|
||||
<api>beta</api>
|
||||
</stability>
|
||||
<license uri="http://www.php.net/license">PHP License</license>
|
||||
<notes>- added new renderer - Array
|
||||
- HTML renderer modified to extend Array
|
||||
- more new renderers - BB, HTMLTags, JSON, XML, all extending Array
|
||||
(feature requests #8704 and #9188 )
|
||||
- new syntax definition - ABAP programming language (feature request #8809)
|
||||
- linked elements to their online documentation option (request #7480)
|
||||
- option to output code as unordered list (request #4640)
|
||||
- option to set starting number when outputting code in ordered lists
|
||||
(request #7077)
|
||||
- option to set CSS class names mapping insead of using hardcoded
|
||||
class names (request #7077)
|
||||
- option to set a CSS style mappping instead of class names (request #7077)
|
||||
- fixed /= issue when highlighting javascript (bug #11160)
|
||||
- added sample CSS to the package (bug #11211)</notes>
|
||||
<contents>
|
||||
<dir name="/">
|
||||
<file baseinstalldir="Text" md5sum="013c9c0ecdee58dbc4ca528dc15a34a2" name="Highlighter/Renderer/Array.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="a971bba378a46ed71dba3d041bd56f0b" name="Highlighter/Renderer/BB.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="acf2457b365cf36813d573ff6f8805b5" name="Highlighter/Renderer/Console.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="203dbdbb0082dc1e2d6364104c13b185" name="Highlighter/Renderer/Html.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="2c3f20ccfaa49beb1f52210dbe3dab96" name="Highlighter/Renderer/HtmlTags.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="c89a16a844d5ca566378a7413f930b39" name="Highlighter/Renderer/JSON.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="77497ce0df4f06685b6a490ae6c4f9b2" name="Highlighter/Renderer/XML.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="9eda0470e135719c006267d635b0f4da" name="Highlighter/ABAP.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="3542033429d49f7cae984b555f4b0e8b" name="Highlighter/CPP.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="f65969cad2155c3024b678211f9658c9" name="Highlighter/CSS.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="b122955b7d554cefcefd4eb20c720ab7" name="Highlighter/DIFF.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="64106222a94c953984d940e3c2c412df" name="Highlighter/DTD.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="243c07edbe16c13a751e21a7255d585e" name="Highlighter/Generator.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="7285f8e1eae5787c4736366e09fc92fa" name="Highlighter/HTML.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="e33a3c1b1c602954ef64be97c35da538" name="Highlighter/JAVA.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="87e889b7fa92c2cba0de2a0f8c827d4b" name="Highlighter/JAVASCRIPT.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="2c14a034318efc04f54a891f4d92efd5" name="Highlighter/MYSQL.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="36b6e4204bda4fd3f46f63d192edfb6c" name="Highlighter/PERL.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="a2298d02fd3712e63abda97f4459186d" name="Highlighter/PHP.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="5a84265037e4c802262b8453fa03f05d" name="Highlighter/PYTHON.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="733b468795b3ccaa82188d60ba42e0db" name="Highlighter/Renderer.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="741b76badb0510310efb053ffb38103c" name="Highlighter/RUBY.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="9612b29d18c0d18cd9a851ed6e49594b" name="Highlighter/SQL.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="d5ebca4d8fbadf6b93f582786a818ab3" name="Highlighter/XML.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="71e89de3fd80eb8c9fe2139bc786c739" name="abap.xml" role="data" />
|
||||
<file baseinstalldir="Text" md5sum="150e48565986dc85cbd5def048c861ff" name="cpp.xml" role="data" />
|
||||
<file baseinstalldir="Text" md5sum="80b88a5630616a43900e9f6255876d73" name="css.xml" role="data" />
|
||||
<file baseinstalldir="Text" md5sum="03bbb9f97dd557688082125fec184160" name="diff.xml" role="data" />
|
||||
<file baseinstalldir="Text" md5sum="2f0dc7366f5da77b875fead48dd1d992" name="dtd.xml" role="data" />
|
||||
<file baseinstalldir="Text/Highlighter" md5sum="3864e523f21aa47f670935233daaf155" name="generate" role="script">
|
||||
<tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
|
||||
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
|
||||
</file>
|
||||
<file baseinstalldir="Text/Highlighter" md5sum="15a780d6a0e5f8e2f17e10f621d48a77" name="generate.bat" role="script">
|
||||
<tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" />
|
||||
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
|
||||
<tasks:replace from="@php_dir@" to="php_dir" type="pear-config" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="fb358f890eb689f066067ae7440c2e65" name="Highlighter.php" role="php">
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||
</file>
|
||||
<file baseinstalldir="Text" md5sum="4724355723d91173e3fbff1a49cf6ed2" name="html.xml" role="data" />
|
||||
<file baseinstalldir="Text" md5sum="fca74bdc9fb76c5f4ebf25e13632d724" name="java.xml" role="data" />
|
||||
<file baseinstalldir="Text" md5sum="317d36bed5a22b1207d2903116dc211d" name="javascript.xml" role="data" />
|
||||
<file baseinstalldir="Text" md5sum="abd328d98009176bee09ccd40c195c28" name="mysql.xml" role="data" />
|
||||
<file baseinstalldir="Text" md5sum="e29d249c5868fba82b59cbf5a9a65b36" name="perl.xml" role="data" />
|
||||
<file baseinstalldir="Text" md5sum="9c94779edb325cc7b597f41e7911c87f" name="php.xml" role="data" />
|
||||
<file baseinstalldir="Text" md5sum="17b174ea131f4c9a33383bdac2ecd707" name="python.xml" role="data" />
|
||||
<file baseinstalldir="Text" md5sum="c1cddeb6c05c8a2c38f106dc9c0bf1b4" name="README" role="doc" />
|
||||
<file baseinstalldir="Text" md5sum="77abf6bfda4e2f55e41b313c0a08e076" name="ruby.xml" role="data" />
|
||||
<file baseinstalldir="Text" md5sum="3fcc7d0e298ecfd1432bbd051e977e2d" name="sample.css" role="data" />
|
||||
<file baseinstalldir="Text" md5sum="239d1d056dc1a02b6fc1e52f84fb451c" name="sql.xml" role="data" />
|
||||
<file baseinstalldir="Text" md5sum="96a7618ad15217978ff1d5f70f76eb05" name="TODO" role="data" />
|
||||
<file baseinstalldir="Text" md5sum="abd0b34519988975de481f81bd507ee7" name="xml.xml" role="data" />
|
||||
</dir>
|
||||
</contents>
|
||||
<dependencies>
|
||||
<required>
|
||||
<php>
|
||||
<min>4.3.3</min>
|
||||
</php>
|
||||
<pearinstaller>
|
||||
<min>1.4.0b1</min>
|
||||
</pearinstaller>
|
||||
<package>
|
||||
<name>PEAR</name>
|
||||
<channel>pear.php.net</channel>
|
||||
<min>1.0</min>
|
||||
</package>
|
||||
<package>
|
||||
<name>XML_Parser</name>
|
||||
<channel>pear.php.net</channel>
|
||||
<min>1.0.1</min>
|
||||
</package>
|
||||
<package>
|
||||
<name>Console_Getopt</name>
|
||||
<channel>pear.php.net</channel>
|
||||
<min>1.0</min>
|
||||
</package>
|
||||
</required>
|
||||
</dependencies>
|
||||
<phprelease>
|
||||
<installconditions>
|
||||
<os>
|
||||
<name>(*ix|*ux)</name>
|
||||
</os>
|
||||
</installconditions>
|
||||
<filelist>
|
||||
<ignore name="generate.bat" />
|
||||
</filelist>
|
||||
</phprelease>
|
||||
<phprelease>
|
||||
<installconditions>
|
||||
<os>
|
||||
<name>windows</name>
|
||||
</os>
|
||||
</installconditions>
|
||||
<filelist>
|
||||
<ignore name="generate" />
|
||||
</filelist>
|
||||
</phprelease>
|
||||
<phprelease>
|
||||
<filelist>
|
||||
<ignore name="generate" />
|
||||
<ignore name="generate.bat" />
|
||||
</filelist>
|
||||
</phprelease>
|
||||
<changelog>
|
||||
<release>
|
||||
<version>
|
||||
<release>0.7.0</release>
|
||||
<api>0.7.0</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>beta</release>
|
||||
<api>beta</api>
|
||||
</stability>
|
||||
<date>2007-06-06</date>
|
||||
<license uri="http://www.php.net/license">PHP License</license>
|
||||
<notes>- added new renderer - Array
|
||||
- HTML renderer modified to extend Array
|
||||
- more new renderers - BB, HTMLTags, JSON, XML, all extending Array
|
||||
(feature requests #8704 and #9188 )
|
||||
- new syntax definition - ABAP programming language (feature request #8809)
|
||||
- linked elements to their online documentation option (request #7480)
|
||||
- option to output code as unordered list (request #4640)
|
||||
- option to set starting number when outputting code in ordered lists
|
||||
(request #7077)
|
||||
- option to set CSS class names mapping insead of using hardcoded
|
||||
class names (request #7077)
|
||||
- option to set a CSS style mappping instead of class names (request #7077)
|
||||
- fixed /= issue when highlighting javascript (bug #11160)
|
||||
- added sample CSS to the package (bug #11211)</notes>
|
||||
</release>
|
||||
</changelog>
|
||||
</package>
|
||||
439
framework/vendors/TextHighlighter/Text/perl.xml
vendored
Normal file
439
framework/vendors/TextHighlighter/Text/perl.xml
vendored
Normal file
@@ -0,0 +1,439 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: perl.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="perl" case = "yes">
|
||||
|
||||
<authors>
|
||||
<author name="Mariusz 'kg' Jakubowski" email="kg@alternatywa.info" jid="kg@chrome.pl"/>
|
||||
<author name="Andrey Demenev" email="demenev@gmail.com"/>
|
||||
</authors>
|
||||
|
||||
<comment>This highlighter is EXPERIMENTAL, so that it may work incorrectly.
|
||||
Most rules were created by Mariusz Jakubowski, and extended by me.
|
||||
My knowledge of Perl is poor, and Perl syntax seems too
|
||||
complicated to me.</comment>
|
||||
|
||||
<default innerClass="code"/>
|
||||
|
||||
<block name="interpreter" match="/^(#!)(.*)/m" innerClass="special">
|
||||
<partClass index="1" innerClass="special" />
|
||||
<partClass index="2" innerClass="string" />
|
||||
</block>
|
||||
|
||||
<region name="pod" innerClass="comment" start="/^=\w+/m" end="/^=cut[^\n]*/m" startBOL="yes" endBOL="yes"/>
|
||||
|
||||
<!--
|
||||
brackets
|
||||
-->
|
||||
<region name="block" delimClass="brackets" innerClass="code" start="\{" end="\}">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="brackets" delimClass="brackets" innerClass="code" start="\(" end="\)">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="sqbrackets" delimClass="brackets" innerClass="code" start="\[" end="\]">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<!--
|
||||
use smth
|
||||
-->
|
||||
<block name="usestatement" match="(use)\s+([\w:]*)" innerClass="special">
|
||||
<partClass index="1" innerClass="reserved" />
|
||||
<partClass index="2" innerClass="special" />
|
||||
</block>
|
||||
|
||||
<block name="packagereference" match="[& ](\w{2,}::)+\w{2,}" innerClass="special"/>
|
||||
|
||||
<region name="q-w-q-statement"
|
||||
start="/\b(q[wq]\s*((\{)|(\()|(\[)|(\<)|([\W\S])))(?=(.*)((?(3)\})(?(4)\))(?(5)\])(?(6)\>)(?(7)\7)))/Us"
|
||||
end="%b2%"
|
||||
innerClass="string" delimClass="quotes" remember="yes">
|
||||
|
||||
<contains block="containedvar"/>
|
||||
<contains block="specialvar"/>
|
||||
<contains block="curlyvar"/>
|
||||
|
||||
</region>
|
||||
|
||||
<region name="qstatement"
|
||||
start="/\b(q\s*((\{)|(\()|(\[)|(\<)|([\W\S])))(?=(.*)((?(3)\})(?(4)\))(?(5)\])(?(6)\>)(?(7)\7)))/Us"
|
||||
end="%b2%"
|
||||
innerClass="string" delimClass="quotes" remember="yes">
|
||||
|
||||
</region>
|
||||
|
||||
<!--
|
||||
comments
|
||||
-->
|
||||
<block name="comment" match="#.*" innerClass="comment" />
|
||||
|
||||
|
||||
<!--
|
||||
regexpr
|
||||
FIXME: this should be rewrited
|
||||
-->
|
||||
<block name="dblregexprver1" match="/(s|tr) ([|#~`!@$%^&*-+=\\;:'",.\/?]) ((\\.|[^\\])*?) (\2)((\\.|[^\\])*?)(\2[ecgimosx]*)/x" innerClass="string">
|
||||
<partClass index="1" innerClass="quotes" />
|
||||
<partClass index="2" innerClass="quotes" />
|
||||
<partClass index="3" innerClass="string" />
|
||||
<partClass index="5" innerClass="quotes" />
|
||||
<partClass index="6" innerClass="string" />
|
||||
<partClass index="8" innerClass="quotes" />
|
||||
</block>
|
||||
|
||||
<block name="dblregexprver2" match="/(m) ([|#~`!@$%^&*-+=\\;:'",.\/?]) ((\\.|[^\\])*?) (\2[ecgimosx]*)/x" innerClass="string">
|
||||
<partClass index="1" innerClass="quotes" />
|
||||
<partClass index="2" innerClass="quotes" />
|
||||
<partClass index="3" innerClass="string" />
|
||||
<partClass index="5" innerClass="quotes" />
|
||||
</block>
|
||||
|
||||
|
||||
<region name="regexp" start=" \/" end="\/[cgimosx]*" innerClass="string" delimClass="quotes" case="yes">
|
||||
<contains block="reescaped"/>
|
||||
</region>
|
||||
|
||||
<block name="reescaped" match="\\\/" innerClass="string" contained="yes">
|
||||
<onlyin region="regexp"/>
|
||||
</block>
|
||||
|
||||
<!--
|
||||
variables
|
||||
FIXME: @{...}
|
||||
-->
|
||||
<block name="bracketsvars" match="([a-z1-9_]+)(\s*=>)" innerClass="string" contained="yes" case="no">
|
||||
<partClass index="1" innerClass="string" />
|
||||
<partClass index="2" innerClass="code" />
|
||||
<onlyin region="brackets"/>
|
||||
</block>
|
||||
|
||||
<block name="specialvar" match="\$#?[1-9'`@!]" innerClass="var"/>
|
||||
|
||||
<block name="var" match="(\$#?|[@%*])([a-z1-9_]+::)*([a-z1-9_]+|\^(?-i)[A-Z]?(?i))" innerClass="var" case="no"/>
|
||||
<block name="containedvar" match="\$([a-z1-9_]+|\^(?-i)[A-Z]?(?i))" innerClass="var" case="no"/>
|
||||
|
||||
<!-- not shure what is this, but the Perlers do it :) -->
|
||||
<block name="var2" match="(&|\w+)'[\w_']+\b" innerClass="var" case="no"/>
|
||||
|
||||
<block name="classvar" match="(\{)([a-z1-9]+)(\})" innerClass="var" case="no">
|
||||
<partClass index="1" innerClass="brackets" />
|
||||
<partClass index="2" innerClass="var" />
|
||||
<partClass index="3" innerClass="brackets" />
|
||||
</block>
|
||||
|
||||
<block name="curlyvar" match="[\$@%]#?\{[a-z1-9]+\}" innerClass="var" case="no"/>
|
||||
|
||||
<!--
|
||||
quotes
|
||||
-->
|
||||
<region name="exec" delimClass="quotes" innerClass="string" start="`" end="`">
|
||||
<contains block="containedvar"/>
|
||||
<contains block="specialvar"/>
|
||||
<contains block="curlyvar"/>
|
||||
</region>
|
||||
|
||||
<region name="strsingle" delimClass="quotes" innerClass="string" start="'" end="'"/>
|
||||
|
||||
<block name="escaped" match="\\\\|\\"|\\'|\\`" innerClass="special" contained="yes">
|
||||
<onlyin region="qstatement"/>
|
||||
<onlyin region="strsingle"/>
|
||||
<onlyin region="exec"/>
|
||||
</block>
|
||||
|
||||
<region name="strdouble" delimClass="quotes" innerClass="string" start=""" end=""">
|
||||
<contains block="containedvar"/>
|
||||
<contains block="specialvar"/>
|
||||
<contains block="curlyvar"/>
|
||||
</region>
|
||||
|
||||
<block name="descaped" match="\\[\\"'`tnr\$\{@]" innerClass="special" contained="yes">
|
||||
<onlyin region="strdouble"/>
|
||||
<onlyin region="q-w-q-statement"/>
|
||||
</block>
|
||||
|
||||
<!-- logical op.
|
||||
<block name="logic" match="\|\||&&" innerClass="reserved" contained="yes"/>-->
|
||||
|
||||
<!--
|
||||
identifiers
|
||||
-->
|
||||
<block name="identifier" match="[a-z_]\w*" innerClass="identifier" case="no"/>
|
||||
|
||||
<!--
|
||||
numbers
|
||||
-->
|
||||
<block name="number" match="\d*\.?\d+" innerClass="number"/>
|
||||
|
||||
<!--
|
||||
http://www.perldoc.com/perl5.6/pod/perlfunc.html
|
||||
Alphabetical Listing of Perl Functions
|
||||
-->
|
||||
<keywords name="reserved" inherits="identifier" innerClass="reserved" case = "yes">
|
||||
<keyword match="abs"/>
|
||||
<keyword match="accept"/>
|
||||
<keyword match="alarm"/>
|
||||
<keyword match="atan2"/>
|
||||
|
||||
<keyword match="bind"/>
|
||||
<keyword match="binmode"/>
|
||||
<keyword match="bless"/>
|
||||
|
||||
<keyword match="caller"/>
|
||||
<keyword match="chdir"/>
|
||||
<keyword match="chmod"/>
|
||||
<keyword match="chomp"/>
|
||||
<keyword match="chop"/>
|
||||
<keyword match="chown"/>
|
||||
<keyword match="chr"/>
|
||||
<keyword match="chroot"/>
|
||||
<keyword match="close"/>
|
||||
<keyword match="closedir"/>
|
||||
<keyword match="connect"/>
|
||||
<keyword match="continue"/>
|
||||
<keyword match="cos"/>
|
||||
<keyword match="crypt"/>
|
||||
|
||||
<keyword match="dbmclose"/>
|
||||
<keyword match="dbmopen"/>
|
||||
<keyword match="defined"/>
|
||||
<keyword match="delete"/>
|
||||
<keyword match="die"/>
|
||||
<keyword match="do"/>
|
||||
<keyword match="dump"/>
|
||||
|
||||
<keyword match="each"/>
|
||||
<keyword match="endgrent"/>
|
||||
<keyword match="endhostent"/>
|
||||
<keyword match="endnetent"/>
|
||||
<keyword match="endprotoent"/>
|
||||
<keyword match="endpwent"/>
|
||||
<keyword match="endservent"/>
|
||||
<keyword match="eof"/>
|
||||
<keyword match="eval"/>
|
||||
<keyword match="exec"/>
|
||||
<keyword match="exists"/>
|
||||
<keyword match="exit"/>
|
||||
<keyword match="exp"/>
|
||||
|
||||
<keyword match="fcntl"/>
|
||||
<keyword match="fileno"/>
|
||||
<keyword match="flock"/>
|
||||
<keyword match="fork"/>
|
||||
<keyword match="format"/>
|
||||
<keyword match="formline"/>
|
||||
|
||||
<keyword match="getc"/>
|
||||
<keyword match="getgrent"/>
|
||||
<keyword match="getgrgid"/>
|
||||
<keyword match="getgrnam"/>
|
||||
<keyword match="gethostbyaddr"/>
|
||||
<keyword match="gethostbyname"/>
|
||||
<keyword match="gethostent"/>
|
||||
<keyword match="getlogin"/>
|
||||
<keyword match="getnetbyaddr"/>
|
||||
<keyword match="getnetbyname"/>
|
||||
<keyword match="getnetent"/>
|
||||
<keyword match="getpeername"/>
|
||||
<keyword match="getpgrp"/>
|
||||
<keyword match="getppid"/>
|
||||
<keyword match="getpriority"/>
|
||||
<keyword match="getprotobyname"/>
|
||||
<keyword match="getprotobynumber"/>
|
||||
<keyword match="getprotoent"/>
|
||||
<keyword match="getpwent"/>
|
||||
<keyword match="getpwnam"/>
|
||||
<keyword match="getpwuid"/>
|
||||
<keyword match="getservbyname"/>
|
||||
<keyword match="getservbyport"/>
|
||||
<keyword match="getservent"/>
|
||||
<keyword match="getsockname"/>
|
||||
<keyword match="getsockopt"/>
|
||||
<keyword match="glob"/>
|
||||
<keyword match="gmtime"/>
|
||||
<keyword match="goto"/>
|
||||
<keyword match="grep"/>
|
||||
|
||||
<keyword match="hex"/>
|
||||
|
||||
<keyword match="import"/>
|
||||
<keyword match="index"/>
|
||||
<keyword match="int"/>
|
||||
<keyword match="ioctl"/>
|
||||
|
||||
<keyword match="join"/>
|
||||
|
||||
<keyword match="keys"/>
|
||||
<keyword match="kill"/>
|
||||
|
||||
<keyword match="last"/>
|
||||
<keyword match="lc"/>
|
||||
<keyword match="lcfirst"/>
|
||||
<keyword match="length"/>
|
||||
<keyword match="link"/>
|
||||
<keyword match="listen"/>
|
||||
<keyword match="local"/>
|
||||
<keyword match="localtime"/>
|
||||
<keyword match="lock"/>
|
||||
<keyword match="log"/>
|
||||
<keyword match="lstat"/>
|
||||
|
||||
<!--<keyword match="m"/>-->
|
||||
<keyword match="map"/>
|
||||
<keyword match="mkdir"/>
|
||||
<keyword match="msgctl"/>
|
||||
<keyword match="msgget"/>
|
||||
<keyword match="msgrcv"/>
|
||||
<keyword match="msgsnd"/>
|
||||
<keyword match="my"/>
|
||||
|
||||
<keyword match="next"/>
|
||||
<keyword match="no"/>
|
||||
|
||||
<keyword match="oct"/>
|
||||
<keyword match="open"/>
|
||||
<keyword match="opendir"/>
|
||||
<keyword match="ord"/>
|
||||
<keyword match="our"/>
|
||||
|
||||
<keyword match="pack"/>
|
||||
<keyword match="package"/>
|
||||
<keyword match="pipe"/>
|
||||
<keyword match="pop"/>
|
||||
<keyword match="pos"/>
|
||||
<keyword match="print"/>
|
||||
<keyword match="printf"/>
|
||||
<keyword match="prototype"/>
|
||||
<keyword match="push"/>
|
||||
|
||||
<!--<keyword match="q"/>
|
||||
<keyword match="qq"/>
|
||||
<keyword match="qr"/>-->
|
||||
<keyword match="quotemeta"/>
|
||||
<!--<keyword match="qw"/>
|
||||
<keyword match="qx"/>-->
|
||||
|
||||
<keyword match="rand"/>
|
||||
<keyword match="read"/>
|
||||
<keyword match="readdir"/>
|
||||
<keyword match="readline"/>
|
||||
<keyword match="readlink"/>
|
||||
<keyword match="readpipe"/>
|
||||
<keyword match="recv"/>
|
||||
<keyword match="redo"/>
|
||||
<keyword match="ref"/>
|
||||
<keyword match="rename"/>
|
||||
<keyword match="require"/>
|
||||
<keyword match="reset"/>
|
||||
<keyword match="return"/>
|
||||
<keyword match="reverse"/>
|
||||
<keyword match="rewinddir"/>
|
||||
<keyword match="rindex"/>
|
||||
<keyword match="rmdir"/>
|
||||
|
||||
<!--<keyword match="s"/>-->
|
||||
<keyword match="scalar"/>
|
||||
<keyword match="seek"/>
|
||||
<keyword match="seekdir"/>
|
||||
<keyword match="select"/>
|
||||
<keyword match="semctl"/>
|
||||
<keyword match="semget"/>
|
||||
<keyword match="semop"/>
|
||||
<keyword match="send"/>
|
||||
<keyword match="setgrent"/>
|
||||
<keyword match="sethostent"/>
|
||||
<keyword match="setnetent"/>
|
||||
<keyword match="setpgrp"/>
|
||||
<keyword match="setpriority"/>
|
||||
<keyword match="setprotoent"/>
|
||||
<keyword match="setpwent"/>
|
||||
<keyword match="setservent"/>
|
||||
<keyword match="setsockopt"/>
|
||||
<keyword match="shift"/>
|
||||
<keyword match="shmctl"/>
|
||||
<keyword match="shmget"/>
|
||||
<keyword match="shmread"/>
|
||||
<keyword match="shmwrite"/>
|
||||
<keyword match="shutdown"/>
|
||||
<keyword match="sin"/>
|
||||
<keyword match="sleep"/>
|
||||
<keyword match="socket"/>
|
||||
<keyword match="socketpair"/>
|
||||
<keyword match="sort"/>
|
||||
<keyword match="splice"/>
|
||||
<keyword match="split"/>
|
||||
<keyword match="sprintf"/>
|
||||
<keyword match="sqrt"/>
|
||||
<keyword match="srand"/>
|
||||
<keyword match="stat"/>
|
||||
<keyword match="study"/>
|
||||
<keyword match="sub"/>
|
||||
<keyword match="substr"/>
|
||||
<keyword match="symlink"/>
|
||||
<keyword match="syscall"/>
|
||||
<keyword match="sysopen"/>
|
||||
<keyword match="sysread"/>
|
||||
<keyword match="sysseek"/>
|
||||
<keyword match="system"/>
|
||||
<keyword match="syswrite"/>
|
||||
|
||||
<keyword match="tell"/>
|
||||
<keyword match="telldir"/>
|
||||
<keyword match="tie"/>
|
||||
<keyword match="tied"/>
|
||||
<keyword match="time"/>
|
||||
<keyword match="times"/>
|
||||
<!--<keyword match="tr"/>-->
|
||||
<keyword match="truncate"/>
|
||||
|
||||
<keyword match="uc"/>
|
||||
<keyword match="ucfirst"/>
|
||||
<keyword match="umask"/>
|
||||
<keyword match="undef"/>
|
||||
<keyword match="unlink"/>
|
||||
<keyword match="unpack"/>
|
||||
<keyword match="unshift"/>
|
||||
<keyword match="untie"/>
|
||||
<keyword match="use"/>
|
||||
<keyword match="utime"/>
|
||||
|
||||
<keyword match="values"/>
|
||||
<keyword match="vec"/>
|
||||
|
||||
<keyword match="wait"/>
|
||||
<keyword match="waitpid"/>
|
||||
<keyword match="wantarray"/>
|
||||
<keyword match="warn"/>
|
||||
<keyword match="write"/>
|
||||
|
||||
<keyword match="y"/>
|
||||
</keywords>
|
||||
|
||||
<keywords name="missingreserved" inherits="identifier" innerClass="reserved" case = "yes">
|
||||
<keyword match="new"/>
|
||||
</keywords>
|
||||
|
||||
|
||||
<keywords name="flowcontrol" inherits="identifier" innerClass="reserved" case = "yes">
|
||||
<keyword match="if"/>
|
||||
<keyword match="else"/>
|
||||
<keyword match="elsif"/>
|
||||
<keyword match="while"/>
|
||||
<keyword match="unless"/>
|
||||
<keyword match="for"/>
|
||||
<keyword match="foreach"/>
|
||||
<keyword match="until"/>
|
||||
<keyword match="do"/>
|
||||
<keyword match="continue"/>
|
||||
<keyword match="not"/>
|
||||
<keyword match="or"/>
|
||||
<keyword match="and"/>
|
||||
<keyword match="eq"/>
|
||||
<keyword match="ne"/>
|
||||
<keyword match="gt"/>
|
||||
<keyword match="lt"/>
|
||||
</keywords>
|
||||
|
||||
</highlight>
|
||||
194
framework/vendors/TextHighlighter/Text/php.xml
vendored
Normal file
194
framework/vendors/TextHighlighter/Text/php.xml
vendored
Normal file
@@ -0,0 +1,194 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: php.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="php">
|
||||
|
||||
<authors>
|
||||
<author name="Andrey Demenev" email ="demenev@gmail.com"/>
|
||||
</authors>
|
||||
|
||||
|
||||
<default innerClass="code" />
|
||||
|
||||
<region name="phpCode" delimClass="inlinetags" innerClass="code"
|
||||
start="(\<\?(php|=)?)?" end="\?\>" never-contained="yes">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="block" delimClass="brackets" innerClass="code" start="\{" end="\}" contained="yes">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="brackets" delimClass="brackets" innerClass="code" start="\(" end="\)" contained="yes" >
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="sqbrackets" delimClass="brackets" innerClass="code" start="\[" end="\]" contained="yes">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
|
||||
<region name="mlcomment" innerClass="comment" start="\/\*" end="\*\/" contained="yes">
|
||||
<contains block="phpdoc"/>
|
||||
<contains block="cvstag"/>
|
||||
</region>
|
||||
|
||||
<region name="strdouble" delimClass="quotes" innerClass="string" start=""" end=""" contained="yes">
|
||||
<contains block="var"/>
|
||||
</region>
|
||||
|
||||
<region name="exec" delimClass="quotes" innerClass="string" start="`" end="`" contained="yes">
|
||||
<contains block="var"/>
|
||||
</region>
|
||||
|
||||
<region name="heredoc" delimClass="quotes" innerClass="string" start="/\<\<\<[\x20\x09]*(\w+)$/m" end="/^%1%;?$/m" contained="yes" remember="yes">
|
||||
<contains block="var"/>
|
||||
</region>
|
||||
|
||||
<region name="strsingle" delimClass="quotes" innerClass="string" start="'" end="'" contained="yes"/>
|
||||
|
||||
<block name="escaped" match="\\\\|\\"|\\'|\\`" innerClass="special" contained="yes">
|
||||
<onlyin region="strsingle"/>
|
||||
<onlyin region="exec"/>
|
||||
</block>
|
||||
|
||||
<block name="descaped" match="\\[\\"'`tnr\$\{]" innerClass="special" contained="yes">
|
||||
<onlyin region="strdouble"/>
|
||||
<onlyin region="heredoc"/>
|
||||
</block>
|
||||
|
||||
|
||||
<region name="comment" start="(#|\/\/)" end="/$|(?=\?\>)/m" innerClass="comment" contained="yes">
|
||||
<contains block="cvstag"/>
|
||||
</region>
|
||||
|
||||
|
||||
<block name="identifier" match="[a-z_]\w*" innerClass="identifier" contained="yes"/>
|
||||
|
||||
<block name="typecast" match="\((array|int|integer|string|bool|boolean|object|float|double)\)" innerClass="reserved" contained="yes"/>
|
||||
|
||||
<block name="curlyvar" match="\{\$[a-z_].*\}" innerClass="var" contained="yes">
|
||||
<onlyin region="strdouble"/>
|
||||
<onlyin region="heredoc"/>
|
||||
<onlyin region="exec"/>
|
||||
</block>
|
||||
|
||||
<region name="codeescape" delimClass="inlinetags" innerClass="default" end="\<\?(php|=)?" start="\?\>" contained="yes">
|
||||
<onlyin region="block"/>
|
||||
</region>
|
||||
|
||||
<block name="hexinteger" match="0[xX][\da-f]+" innerClass="number" contained="yes"/>
|
||||
<block name="var" match="\$[a-z_]\w*" innerClass="var" contained="yes"/>
|
||||
|
||||
<block name="integer" match="\d\d*|\b0\b" innerClass="number" contained="yes"/>
|
||||
|
||||
|
||||
<block name="octinteger" match="0[0-7]+" innerClass="number" contained="yes"/>
|
||||
|
||||
<block name="float" match="(\d*\.\d+)|(\d+\.\d*)" innerClass="number" contained="yes"/>
|
||||
|
||||
<block name="exponent"
|
||||
match="((\d+|((\d*\.\d+)|(\d+\.\d*)))[eE][+-]?\d+)"
|
||||
innerClass="number" contained="yes"/>
|
||||
|
||||
<block name="phpdoc" match="\s@\w+\s" innerClass="inlinedoc" contained="yes">
|
||||
<onlyin region="mlcomment"/>
|
||||
<onlyin region="comment"/>
|
||||
</block>
|
||||
|
||||
<block name="url" match="((https?|ftp):\/\/[\w\?\.\-\&=\/%+]+)|(^|[\s,!?])www\.\w+\.\w+[\w\?\.\&=\/%+]*" innerClass="url" contained="yes">
|
||||
<onlyin region="mlcomment"/>
|
||||
<onlyin region="comment"/>
|
||||
</block>
|
||||
|
||||
<block name="email" match="\w+[\.\w\-]+@(\w+[\.\w\-])+" innerClass="url" contained="yes">
|
||||
<onlyin region="mlcomment"/>
|
||||
<onlyin region="comment"/>
|
||||
</block>
|
||||
|
||||
<block name="note" match="\bnote:" innerClass="inlinedoc" contained="yes">
|
||||
<onlyin region="mlcomment"/>
|
||||
<onlyin region="comment"/>
|
||||
</block>
|
||||
|
||||
|
||||
<block name="cvstag" match="\$\w+\s*:.*\$" innerClass="inlinedoc" contained="yes">
|
||||
<onlyin region="mlcomment"/>
|
||||
<onlyin region="comment"/>
|
||||
</block>
|
||||
|
||||
<keywords name="constants" inherits="identifier" innerClass="reserved" case = "yes">
|
||||
<keyword match="DIRECTORY_SEPARATOR"/>
|
||||
<keyword match="PATH_SEPARATOR"/>
|
||||
</keywords>
|
||||
|
||||
<keywords name="reserved" inherits="identifier" innerClass="reserved">
|
||||
<keyword match="echo"/>
|
||||
<keyword match="foreach"/>
|
||||
<keyword match="else"/>
|
||||
<keyword match="if"/>
|
||||
<keyword match="elseif"/>
|
||||
<keyword match="for"/>
|
||||
<keyword match="as"/>
|
||||
<keyword match="while"/>
|
||||
<keyword match="foreach"/>
|
||||
<keyword match="break"/>
|
||||
<keyword match="continue"/>
|
||||
<keyword match="class"/>
|
||||
<keyword match="const"/>
|
||||
<keyword match="declare"/>
|
||||
<keyword match="switch"/>
|
||||
<keyword match="case"/>
|
||||
<keyword match="endfor"/>
|
||||
<keyword match="endswitch"/>
|
||||
<keyword match="endforeach"/>
|
||||
<keyword match="endswitch"/>
|
||||
<keyword match="endif"/>
|
||||
<keyword match="array"/>
|
||||
<keyword match="default"/>
|
||||
<keyword match="do"/>
|
||||
<keyword match="enddeclare"/>
|
||||
<keyword match="eval"/>
|
||||
<keyword match="exit"/>
|
||||
<keyword match="die"/>
|
||||
<keyword match="extends"/>
|
||||
<keyword match="function"/>
|
||||
<keyword match="global"/>
|
||||
<keyword match="include"/>
|
||||
<keyword match="include_once"/>
|
||||
<keyword match="require"/>
|
||||
<keyword match="require_once"/>
|
||||
<keyword match="isset"/>
|
||||
<keyword match="empty"/>
|
||||
<keyword match="list"/>
|
||||
<keyword match="new"/>
|
||||
<keyword match="static"/>
|
||||
<keyword match="unset"/>
|
||||
<keyword match="var"/>
|
||||
<keyword match="return"/>
|
||||
<keyword match="try"/>
|
||||
<keyword match="catch"/>
|
||||
<keyword match="final"/>
|
||||
<keyword match="throw"/>
|
||||
<keyword match="public"/>
|
||||
<keyword match="private"/>
|
||||
<keyword match="protected"/>
|
||||
<keyword match="abstract"/>
|
||||
<keyword match="interface"/>
|
||||
<keyword match="implements"/>
|
||||
<keyword match="const"/>
|
||||
<keyword match="define"/>
|
||||
<keyword match="__FILE__"/>
|
||||
<keyword match="__LINE__"/>
|
||||
<keyword match="__CLASS__"/>
|
||||
<keyword match="__METHOD__"/>
|
||||
<keyword match="__FUNCTION__"/>
|
||||
<keyword match="NULL"/>
|
||||
<keyword match="true"/>
|
||||
<keyword match="false"/>
|
||||
<keyword match="and"/>
|
||||
<keyword match="or"/>
|
||||
<keyword match="xor"/>
|
||||
</keywords>
|
||||
|
||||
</highlight>
|
||||
229
framework/vendors/TextHighlighter/Text/python.xml
vendored
Normal file
229
framework/vendors/TextHighlighter/Text/python.xml
vendored
Normal file
@@ -0,0 +1,229 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: python.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="python" case="no">
|
||||
|
||||
<authors>
|
||||
<author name="Andrey Demenev" email="demenev@gmail.com"/>
|
||||
</authors>
|
||||
|
||||
<default innerClass="code" />
|
||||
|
||||
<region name="strsingle3" delimClass="quotes" innerClass="string"
|
||||
start="'''" end="'''" />
|
||||
|
||||
<region name="strdouble3" delimClass="quotes" innerClass="string"
|
||||
start=""""" end=""""">
|
||||
</region>
|
||||
|
||||
<region name="strdouble" delimClass="quotes" innerClass="string"
|
||||
start=""" end=""" >
|
||||
</region>
|
||||
|
||||
<region name="strsingle" delimClass="quotes" innerClass="string"
|
||||
start="'" end="'" />
|
||||
|
||||
<region name="brackets" delimClass="brackets" innerClass="code" start="\(" end="\)" >
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="sqbrackets" delimClass="brackets" innerClass="code" start="\[" end="\]" >
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<block name="escaped" match="\\." innerClass="special" contained="yes">
|
||||
<onlyin region="strsingle"/>
|
||||
<onlyin region="strsingle3"/>
|
||||
<onlyin region="strdouble"/>
|
||||
<onlyin region="strdouble3"/>
|
||||
</block>
|
||||
|
||||
<block name="possiblefunction" match="[a-z_]\w*(?=\s*\()" innerClass="identifier" />
|
||||
|
||||
<block name="identifier" match="[a-z_]\w*" innerClass="identifier" />
|
||||
|
||||
<block name="exponent"
|
||||
match="((\d+|((\d*\.\d+)|(\d+\.\d*)))[eE][+-]?\d+)"
|
||||
innerClass="number" />
|
||||
|
||||
<block name="imaginary" match="((\d*\.\d+)|(\d+\.\d*)|(\d+))j" innerClass="number"/>
|
||||
|
||||
<block name="float" match="(\d*\.\d+)|(\d+\.\d*)" innerClass="number"/>
|
||||
|
||||
<block name="integer" match="\d+l?|\b0l?\b" innerClass="number" />
|
||||
|
||||
<block name="hexinteger" match="0[xX][\da-f]+l?" innerClass="number" />
|
||||
|
||||
<block name="octinteger" match="0[0-7]+l?" innerClass="number" />
|
||||
|
||||
<block name="comment" innerClass="comment"
|
||||
match="#.+" />
|
||||
|
||||
<keywords name="reserved" inherits="identifier" innerClass="reserved" case = "yes">
|
||||
<keyword match="and"/>
|
||||
<keyword match="del"/>
|
||||
<keyword match="for"/>
|
||||
<keyword match="is"/>
|
||||
<keyword match="raise"/>
|
||||
<keyword match="assert"/>
|
||||
<keyword match="elif"/>
|
||||
<keyword match="from"/>
|
||||
<keyword match="lambda"/>
|
||||
<keyword match="return"/>
|
||||
<keyword match="break"/>
|
||||
<keyword match="else"/>
|
||||
<keyword match="global"/>
|
||||
<keyword match="not"/>
|
||||
<keyword match="try"/>
|
||||
<keyword match="class"/>
|
||||
<keyword match="except"/>
|
||||
<keyword match="if"/>
|
||||
<keyword match="or"/>
|
||||
<keyword match="while"/>
|
||||
<keyword match="continue"/>
|
||||
<keyword match="exec"/>
|
||||
<keyword match="import"/>
|
||||
<keyword match="pass"/>
|
||||
<keyword match="yield"/>
|
||||
<keyword match="def"/>
|
||||
<keyword match="finally"/>
|
||||
<keyword match="in"/>
|
||||
<keyword match="print"/>
|
||||
<keyword match="False"/>
|
||||
<keyword match="True"/>
|
||||
<keyword match="None"/>
|
||||
<keyword match="NotImplemented"/>
|
||||
<keyword match="Ellipsis"/>
|
||||
|
||||
<keyword match="Exception" />
|
||||
<keyword match="SystemExit" />
|
||||
<keyword match="StopIteration" />
|
||||
<keyword match="StandardError" />
|
||||
<keyword match="KeyboardInterrupt" />
|
||||
<keyword match="ImportError" />
|
||||
<keyword match="EnvironmentError" />
|
||||
<keyword match="IOError" />
|
||||
<keyword match="OSError" />
|
||||
<keyword match="WindowsError" />
|
||||
<keyword match="EOFError" />
|
||||
<keyword match="RuntimeError" />
|
||||
<keyword match="NotImplementedError" />
|
||||
<keyword match="NameError" />
|
||||
<keyword match="UnboundLocalError" />
|
||||
|
||||
<keyword match="AttributeError" />
|
||||
<keyword match="SyntaxError" />
|
||||
<keyword match="IndentationError" />
|
||||
<keyword match="TabError" />
|
||||
<keyword match="TypeError" />
|
||||
<keyword match="AssertionError" />
|
||||
<keyword match="LookupError" />
|
||||
<keyword match="IndexError" />
|
||||
<keyword match="KeyError" />
|
||||
<keyword match="ArithmeticError" />
|
||||
<keyword match="OverflowError" />
|
||||
<keyword match="ZeroDivisionError" />
|
||||
<keyword match="FloatingPointError" />
|
||||
<keyword match="ValueError" />
|
||||
<keyword match="UnicodeError" />
|
||||
<keyword match="UnicodeEncodeError" />
|
||||
<keyword match="UnicodeDecodeError" />
|
||||
|
||||
<keyword match="UnicodeTranslateError" />
|
||||
<keyword match="ReferenceError" />
|
||||
<keyword match="SystemError" />
|
||||
<keyword match="MemoryError" />
|
||||
<keyword match="Warning" />
|
||||
<keyword match="UserWarning" />
|
||||
<keyword match="DeprecationWarning" />
|
||||
<keyword match="PendingDeprecationWarning" />
|
||||
<keyword match="SyntaxWarning" />
|
||||
<keyword match="OverflowWarning" />
|
||||
<keyword match="RuntimeWarning" />
|
||||
<keyword match="FutureWarning" />
|
||||
|
||||
</keywords>
|
||||
|
||||
<keywords name="builtin" inherits="possiblefunction"
|
||||
innerClass="builtin" otherwise="identifier" case = "yes">
|
||||
<keyword match="__import__"/>
|
||||
|
||||
<keyword match="abs"/>
|
||||
<keyword match="apply"/>
|
||||
<keyword match="basestring"/>
|
||||
<keyword match="bool"/>
|
||||
<keyword match="buffer"/>
|
||||
<keyword match="callable"/>
|
||||
<keyword match="chr"/>
|
||||
<keyword match="classmethod"/>
|
||||
<keyword match="cmp"/>
|
||||
|
||||
<keyword match="coerce"/>
|
||||
<keyword match="compile"/>
|
||||
<keyword match="complex"/>
|
||||
<keyword match="delattr"/>
|
||||
<keyword match="dict"/>
|
||||
<keyword match="dir"/>
|
||||
<keyword match="divmod"/>
|
||||
<keyword match="enumerate"/>
|
||||
<keyword match="eval"/>
|
||||
|
||||
<keyword match="execfile"/>
|
||||
<keyword match="file"/>
|
||||
<keyword match="filter"/>
|
||||
<keyword match="float"/>
|
||||
<keyword match="getattr"/>
|
||||
<keyword match="globals"/>
|
||||
<keyword match="hasattr"/>
|
||||
<keyword match="hash"/>
|
||||
<keyword match="help"/>
|
||||
|
||||
<keyword match="hex"/>
|
||||
<keyword match="id"/>
|
||||
<keyword match="input"/>
|
||||
<keyword match="int"/>
|
||||
<keyword match="intern"/>
|
||||
<keyword match="isinstance"/>
|
||||
<keyword match="issubclass"/>
|
||||
<keyword match="iter"/>
|
||||
<keyword match="len"/>
|
||||
|
||||
<keyword match="list"/>
|
||||
<keyword match="locals"/>
|
||||
<keyword match="long"/>
|
||||
<keyword match="map"/>
|
||||
<keyword match="max"/>
|
||||
<keyword match="min"/>
|
||||
<keyword match="object"/>
|
||||
<keyword match="oct"/>
|
||||
<keyword match="open"/>
|
||||
|
||||
<keyword match="ord"/>
|
||||
<keyword match="pow"/>
|
||||
<keyword match="property"/>
|
||||
<keyword match="range"/>
|
||||
<keyword match="raw_input"/>
|
||||
<keyword match="reduce"/>
|
||||
<keyword match="reload"/>
|
||||
<keyword match="repr"/>
|
||||
<keyword match="round"/>
|
||||
|
||||
<keyword match="setattr"/>
|
||||
<keyword match="slice"/>
|
||||
<keyword match="staticmethod"/>
|
||||
<keyword match="sum"/>
|
||||
<keyword match="super"/>
|
||||
<keyword match="str"/>
|
||||
<keyword match="tuple"/>
|
||||
<keyword match="type"/>
|
||||
<keyword match="unichr"/>
|
||||
|
||||
<keyword match="unicode"/>
|
||||
<keyword match="vars"/>
|
||||
<keyword match="xrange"/>
|
||||
<keyword match="zip"/>
|
||||
|
||||
</keywords>
|
||||
|
||||
</highlight>
|
||||
|
||||
141
framework/vendors/TextHighlighter/Text/ruby.xml
vendored
Normal file
141
framework/vendors/TextHighlighter/Text/ruby.xml
vendored
Normal file
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: ruby.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="ruby" case="no">
|
||||
|
||||
<authors>
|
||||
<author name="Andrey Demenev" email="demenev@gmail.com"/>
|
||||
</authors>
|
||||
|
||||
<comment>
|
||||
FIXME: While this construction : s.split /z/i
|
||||
is valid, regular expression is not recognized as such
|
||||
(/ folowing an identifier or number is not recognized as
|
||||
start of RE), making highlighting improper
|
||||
|
||||
%q(a (nested) string) does not get highlighted correctly
|
||||
</comment>
|
||||
|
||||
<default innerClass="code" />
|
||||
|
||||
<region name="data" start="/^__END__$/m" end="$" delimClass="reserved" innerClass="comment" never-conteined="yes" />
|
||||
|
||||
<region name="strdouble" delimClass="quotes" innerClass="string"
|
||||
start=""" end=""" >
|
||||
</region>
|
||||
|
||||
<region name="qstrdouble" delimClass="quotes" innerClass="string"
|
||||
start="%[Qx]([!"#\$%&'+\-*.\/:;=?@^`|~{<\[(])" end="%b1%" remember="yes" />
|
||||
|
||||
<region name="strsingle" delimClass="quotes" innerClass="string"
|
||||
start="'" end="'" />
|
||||
|
||||
<region name="qstrsingle" delimClass="quotes" innerClass="string"
|
||||
start="%[wq]([!"#\$%&'+\-*.\/:;=?@^`|~{<\[(])" end="%b1%" remember="yes" />
|
||||
|
||||
<block name="global" match="\$(\W|\w+)" innerClass="var" />
|
||||
|
||||
<block name="classvar" match="/@@?[_a-z][\d_a-z]*/i" innerClass="var" />
|
||||
|
||||
<region name="brackets" delimClass="brackets" innerClass="code" start="\(" end="\)" >
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="sqbrackets" delimClass="brackets" innerClass="code" start="\[" end="\]" >
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<block name="escaped" match="\\." innerClass="special" contained="yes">
|
||||
<onlyin region="qstrsingle"/>
|
||||
<onlyin region="strsingle"/>
|
||||
<onlyin region="qstrdouble"/>
|
||||
<onlyin region="strdouble"/>
|
||||
<onlyin region="regexp"/>
|
||||
</block>
|
||||
|
||||
<block name="identifier" match="[a-z_]\w*" innerClass="identifier" />
|
||||
|
||||
<block name="exponent"
|
||||
match="((\d+|((\d*\.\d+)|(\d+\.\d*)))[eE][+-]?\d+)"
|
||||
innerClass="number" />
|
||||
|
||||
<block name="float" match="(\d*\.\d+)|(\d+\.\d*)" innerClass="number"/>
|
||||
|
||||
<block name="hexinteger" match="0[xX][\da-f]+l?" innerClass="number" />
|
||||
|
||||
<block name="integer" match="\d+l?|\b0l?\b" innerClass="number" />
|
||||
|
||||
<block name="octinteger" match="0[0-7]+l?" innerClass="number" />
|
||||
|
||||
|
||||
<region name="rubydoc" start="/^=begin$/m" end="/^=end$/m" delimClass="comment" innerClass="comment">
|
||||
<contains block="cvstag" />
|
||||
</region>
|
||||
|
||||
<block name="cvstag" match="\$\w+\s*:.+\$" innerClass="inlinedoc" contained="yes">
|
||||
<onlyin region="comment"/>
|
||||
<onlyin region="rubydoc"/>
|
||||
</block>
|
||||
|
||||
<region name="comment" innerClass="comment" start="#" end="/$/m" delimClass="comment" >
|
||||
<contains block="cvstag" />
|
||||
</region>
|
||||
|
||||
<region name="regexp" delimClass="quotes" innerClass="string" start="\s*\/" end="\/[iomx]*"
|
||||
neverAfter="(?<!\band|\bor|\bwhile|\buntil|\bunless|\bif|\belsif|\bwhen|[~=!|&(,\[])$">
|
||||
</region>
|
||||
|
||||
<keywords name="reserved" inherits="identifier" innerClass="reserved" case = "yes">
|
||||
<keyword match="__FILE__" />
|
||||
<keyword match="require" />
|
||||
<keyword match="and" />
|
||||
<keyword match="def" />
|
||||
<keyword match="end" />
|
||||
<keyword match="in" />
|
||||
<keyword match="or" />
|
||||
<keyword match="self" />
|
||||
<keyword match="unless" />
|
||||
<keyword match="__LINE__" />
|
||||
<keyword match="begin" />
|
||||
<keyword match="defined?" />
|
||||
<keyword match="ensure" />
|
||||
<keyword match="module" />
|
||||
<keyword match="redo" />
|
||||
<keyword match="super" />
|
||||
<keyword match="until" />
|
||||
<keyword match="BEGIN" />
|
||||
<keyword match="break" />
|
||||
<keyword match="do" />
|
||||
<keyword match="false" />
|
||||
<keyword match="next" />
|
||||
<keyword match="rescue" />
|
||||
<keyword match="then" />
|
||||
<keyword match="when" />
|
||||
<keyword match="END" />
|
||||
<keyword match="case" />
|
||||
<keyword match="else" />
|
||||
<keyword match="for" />
|
||||
<keyword match="nil" />
|
||||
<keyword match="retry" />
|
||||
<keyword match="true" />
|
||||
<keyword match="while" />
|
||||
<keyword match="alias" />
|
||||
<keyword match="module_function" />
|
||||
<keyword match="private" />
|
||||
<keyword match="public" />
|
||||
<keyword match="protected" />
|
||||
<keyword match="attr_reader" />
|
||||
<keyword match="attr_writer" />
|
||||
<keyword match="attr_accessor" />
|
||||
<keyword match="class" />
|
||||
<keyword match="elsif" />
|
||||
<keyword match="if" />
|
||||
<keyword match="not" />
|
||||
<keyword match="return" />
|
||||
<keyword match="undef" />
|
||||
<keyword match="yield" />
|
||||
</keywords>
|
||||
|
||||
|
||||
</highlight>
|
||||
|
||||
57
framework/vendors/TextHighlighter/Text/sample.css
vendored
Normal file
57
framework/vendors/TextHighlighter/Text/sample.css
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
.hl-default {
|
||||
color: Black;
|
||||
}
|
||||
.hl-code {
|
||||
color: Gray;
|
||||
}
|
||||
.hl-brackets {
|
||||
color: Olive;
|
||||
}
|
||||
.hl-comment {
|
||||
color: Orange;
|
||||
}
|
||||
.hl-quotes {
|
||||
color: Darkred;
|
||||
}
|
||||
.hl-string {
|
||||
color: Red;
|
||||
}
|
||||
.hl-identifier {
|
||||
color: Blue;
|
||||
}
|
||||
.hl-builtin {
|
||||
color: Teal;
|
||||
}
|
||||
.hl-reserved {
|
||||
color: Green;
|
||||
}
|
||||
.hl-inlinedoc {
|
||||
color: Blue;
|
||||
}
|
||||
.hl-var {
|
||||
color: Darkblue;
|
||||
}
|
||||
.hl-url {
|
||||
color: Blue;
|
||||
}
|
||||
.hl-special {
|
||||
color: Navy;
|
||||
}
|
||||
.hl-number {
|
||||
color: Maroon;
|
||||
}
|
||||
.hl-inlinetags {
|
||||
color: Blue;
|
||||
}
|
||||
.hl-main {
|
||||
background-color: White;
|
||||
}
|
||||
.hl-gutter {
|
||||
background-color: #999999;
|
||||
color: White
|
||||
}
|
||||
.hl-table {
|
||||
font-family: courier;
|
||||
font-size: 12px;
|
||||
border: solid 1px Lightgrey;
|
||||
}
|
||||
242
framework/vendors/TextHighlighter/Text/sh.xml
vendored
Normal file
242
framework/vendors/TextHighlighter/Text/sh.xml
vendored
Normal file
@@ -0,0 +1,242 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: sh.xml,v 1.2 2007/06/14 00:15:50 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="sh" case = "yes">
|
||||
|
||||
<authors>
|
||||
<author name="Noah Spurrier" email="noah@noah.org" />
|
||||
</authors>
|
||||
|
||||
<comment>This highlighter is EXPERIMENTAL. It may work incorrectly.
|
||||
It is a crude hack of the perl syntax, which itself wasn't so good.
|
||||
But this seems to work OK.
|
||||
</comment>
|
||||
|
||||
<default innerClass="code"/>
|
||||
|
||||
<block name="interpreter" match="/^(#!)(.*)/m" innerClass="special">
|
||||
<partClass index="1" innerClass="special" />
|
||||
<partClass index="2" innerClass="string" />
|
||||
</block>
|
||||
|
||||
<!--
|
||||
brackets
|
||||
-->
|
||||
<region name="block" delimClass="brackets" innerClass="code" start="\{" end="\}">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="brackets" delimClass="brackets" innerClass="code" start="\(" end="\)">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="sqbrackets" delimClass="brackets" innerClass="code" start="\[" end="\]">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<!--
|
||||
use smth
|
||||
-->
|
||||
<block name="usestatement" match="(use)\s+([\w:]*)" innerClass="special">
|
||||
<partClass index="1" innerClass="reserved" />
|
||||
<partClass index="2" innerClass="special" />
|
||||
</block>
|
||||
|
||||
|
||||
<region name="q-w-q-statement"
|
||||
start="/\b(q[wq]\s*((\{)|(\()|(\[)|(\<)|([\W\S])))(?=(.*)((?(3)\})(?(4)\))(?(5)\])(?(6)\>)(?(7)\7)))/Us"
|
||||
end="%b2%"
|
||||
innerClass="string" delimClass="quotes" remember="yes">
|
||||
|
||||
<contains block="containedvar"/>
|
||||
<contains block="specialvar"/>
|
||||
<contains block="curlyvar"/>
|
||||
|
||||
</region>
|
||||
|
||||
<region name="qstatement"
|
||||
start="/\b(q\s*((\{)|(\()|(\[)|(\<)|([\W\S])))(?=(.*)((?(3)\})(?(4)\))(?(5)\])(?(6)\>)(?(7)\7)))/Us"
|
||||
end="%b2%"
|
||||
innerClass="string" delimClass="quotes" remember="yes">
|
||||
|
||||
</region>
|
||||
|
||||
<!--
|
||||
comments
|
||||
-->
|
||||
<block name="comment" match="#.*" innerClass="comment" />
|
||||
|
||||
|
||||
<!--
|
||||
regexpr
|
||||
FIXME: this should be rewritten
|
||||
-->
|
||||
<block name="dblregexprver1" match="/(s|tr) ([|#~`!@$%^&*-+=\\;:'",.\/?]) ((\\.|[^\\])*?) (\2)((\\.|[^\\])*?)(\2[ecgimosx]*)/x" innerClass="string">
|
||||
<partClass index="1" innerClass="quotes" />
|
||||
<partClass index="2" innerClass="quotes" />
|
||||
<partClass index="3" innerClass="string" />
|
||||
<partClass index="5" innerClass="quotes" />
|
||||
<partClass index="6" innerClass="string" />
|
||||
<partClass index="8" innerClass="quotes" />
|
||||
</block>
|
||||
|
||||
<block name="dblregexprver2" match="/(m) ([|#~`!@$%^&*-+=\\;:'",.\/?]) ((\\.|[^\\])*?) (\2[ecgimosx]*)/x" innerClass="string">
|
||||
<partClass index="1" innerClass="quotes" />
|
||||
<partClass index="2" innerClass="quotes" />
|
||||
<partClass index="3" innerClass="string" />
|
||||
<partClass index="5" innerClass="quotes" />
|
||||
</block>
|
||||
|
||||
|
||||
<region name="regexp" start=" \/" end="\/[cgimosx]*" innerClass="string" delimClass="quotes" case="yes">
|
||||
<contains block="reescaped"/>
|
||||
</region>
|
||||
|
||||
<block name="reescaped" match="\\\/" innerClass="string" contained="yes">
|
||||
<onlyin region="regexp"/>
|
||||
</block>
|
||||
|
||||
<!--
|
||||
variables
|
||||
FIXME: @{...}
|
||||
-->
|
||||
<block name="bracketsvars" match="([a-z1-9_]+)(\s*=>)" innerClass="string" contained="yes" case="no">
|
||||
<partClass index="1" innerClass="string" />
|
||||
<partClass index="2" innerClass="code" />
|
||||
<onlyin region="brackets"/>
|
||||
</block>
|
||||
|
||||
<block name="specialvar" match="\$#?[1-9'`@!]" innerClass="var"/>
|
||||
|
||||
<block name="var" match="(\$#?|[@%*])([a-z1-9_]+::)*([a-z1-9_]+|\^(?-i)[A-Z]?(?i))" innerClass="var" case="no"/>
|
||||
<block name="containedvar" match="\$([a-z1-9_]+|\^(?-i)[A-Z]?(?i))" innerClass="var" case="no"/>
|
||||
|
||||
<block name="classvar" match="(\{)([a-z1-9]+)(\})" innerClass="var" case="no">
|
||||
<partClass index="1" innerClass="brackets" />
|
||||
<partClass index="2" innerClass="var" />
|
||||
<partClass index="3" innerClass="brackets" />
|
||||
</block>
|
||||
|
||||
<block name="curlyvar" match="[\$@%]#?\{[a-z1-9]+\}" innerClass="var" case="no"/>
|
||||
|
||||
<!--
|
||||
quotes
|
||||
-->
|
||||
<region name="exec" delimClass="quotes" innerClass="string" start="`" end="`">
|
||||
<contains block="containedvar"/>
|
||||
<contains block="specialvar"/>
|
||||
<contains block="curlyvar"/>
|
||||
</region>
|
||||
|
||||
<region name="strsingle" delimClass="quotes" innerClass="string" start="'" end="'"/>
|
||||
|
||||
<block name="escaped" match="\\\\|\\"|\\'|\\`" innerClass="special" contained="yes">
|
||||
<onlyin region="qstatement"/>
|
||||
<onlyin region="strsingle"/>
|
||||
<onlyin region="exec"/>
|
||||
</block>
|
||||
|
||||
<region name="strdouble" delimClass="quotes" innerClass="string" start=""" end=""">
|
||||
<contains block="containedvar"/>
|
||||
<contains block="specialvar"/>
|
||||
<contains block="curlyvar"/>
|
||||
</region>
|
||||
|
||||
<block name="descaped" match="\\[\\"'`tnr\$\{@]" innerClass="special" contained="yes">
|
||||
<onlyin region="strdouble"/>
|
||||
<onlyin region="q-w-q-statement"/>
|
||||
</block>
|
||||
|
||||
<!-- logical op.
|
||||
<block name="logic" match="\|\||&&" innerClass="reserved" contained="yes"/>-->
|
||||
|
||||
<!--
|
||||
identifiers
|
||||
-->
|
||||
<block name="identifier" match="[a-z_]\w*" innerClass="identifier" case="no"/>
|
||||
|
||||
<!--
|
||||
numbers
|
||||
-->
|
||||
<block name="number" match="\d*\.?\d+" innerClass="number"/>
|
||||
|
||||
<!--
|
||||
GNU and posix standard shell utilities here.
|
||||
-->
|
||||
<keywords name="reserved" inherits="identifier" innerClass="reserved" case = "yes">
|
||||
<keyword match="cd"/>
|
||||
<keyword match="cp"/>
|
||||
<keyword match="rm"/>
|
||||
<keyword match="echo"/>
|
||||
<keyword match="printf"/>
|
||||
<keyword match="exit"/>
|
||||
<keyword match="cut"/>
|
||||
<keyword match="join"/>
|
||||
<keyword match="comm"/>
|
||||
<keyword match="fmt"/>
|
||||
<keyword match="grep"/>
|
||||
<keyword match="egrep"/>
|
||||
<keyword match="fgrep"/>
|
||||
<keyword match="sed"/>
|
||||
<keyword match="awk"/>
|
||||
<keyword match="yes"/>
|
||||
<keyword match="false"/>
|
||||
<keyword match="true"/>
|
||||
<keyword match="test"/>
|
||||
<keyword match="expr"/>
|
||||
<keyword match="tee"/>
|
||||
<keyword match="basename"/>
|
||||
<keyword match="dirname"/>
|
||||
<keyword match="pathchk"/>
|
||||
<keyword match="pwd"/>
|
||||
<keyword match="stty"/>
|
||||
<keyword match="tty"/>
|
||||
<keyword match="env"/>
|
||||
<keyword match="printenv"/>
|
||||
<keyword match="id"/>
|
||||
<keyword match="logname"/>
|
||||
<keyword match="whoami"/>
|
||||
<keyword match="groups"/>
|
||||
<keyword match="users"/>
|
||||
<keyword match="who"/>
|
||||
<keyword match="date"/>
|
||||
<keyword match="uname"/>
|
||||
<keyword match="hostname"/>
|
||||
<keyword match="chroot"/>
|
||||
<keyword match="nice"/>
|
||||
<keyword match="nohup"/>
|
||||
<keyword match="sleep"/>
|
||||
<keyword match="factor"/>
|
||||
<keyword match="seq"/>
|
||||
<keyword match="getopt"/>
|
||||
<keyword match="getopts"/>
|
||||
<keyword match="options"/>
|
||||
<keyword match="shift"/>
|
||||
</keywords>
|
||||
|
||||
<keywords name="flowcontrol" inherits="identifier" innerClass="reserved" case = "yes">
|
||||
<keyword match="if"/>
|
||||
<keyword match="fi"/>
|
||||
<keyword match="then"/>
|
||||
<keyword match="else"/>
|
||||
<keyword match="elif"/>
|
||||
<keyword match="case"/>
|
||||
<keyword match="esac"/>
|
||||
<keyword match="while"/>
|
||||
<keyword match="done"/>
|
||||
<keyword match="for"/>
|
||||
<keyword match="in"/>
|
||||
<keyword match="function"/>
|
||||
<keyword match="until"/>
|
||||
<keyword match="do"/>
|
||||
<keyword match="select"/>
|
||||
<keyword match="time"/>
|
||||
<!--
|
||||
<keyword match="[["/>
|
||||
<keyword match="]]"/>
|
||||
-->
|
||||
<keyword match="read"/>
|
||||
<keyword match="set"/>
|
||||
</keywords>
|
||||
|
||||
</highlight>
|
||||
496
framework/vendors/TextHighlighter/Text/sql.xml
vendored
Normal file
496
framework/vendors/TextHighlighter/Text/sql.xml
vendored
Normal file
@@ -0,0 +1,496 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: sql.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="sql" case="no">
|
||||
|
||||
<authors>
|
||||
<author name="Andrey Demenev" email="demenev@gmail.com"/>
|
||||
</authors>
|
||||
|
||||
|
||||
<comment>Based on SQL-99</comment>
|
||||
|
||||
<default innerClass="code" />
|
||||
|
||||
<region name="qidentifier" delimClass="quotes" innerClass="identifier"
|
||||
start="`" end="`" />
|
||||
|
||||
<region name="mlcomment" delimClass="comment" innerClass="comment"
|
||||
start="\/\*" end="\*\/" />
|
||||
|
||||
<block name="comment" match="(#|--\s).*" innerClass="comment" />
|
||||
|
||||
<block name="identifier" match="[a-z_]\w*" innerClass="identifier" />
|
||||
|
||||
<region name="strdouble" delimClass="quotes" innerClass="string"
|
||||
start=""" end=""" >
|
||||
</region>
|
||||
|
||||
<region name="brackets" delimClass="brackets" innerClass="code"
|
||||
start="\(" end="\)" >
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
<region name="strsingle" delimClass="quotes" innerClass="string"
|
||||
start="'" end="'" />
|
||||
|
||||
<block name="escaped" match="\\." innerClass="special" contained="yes">
|
||||
<onlyin region="strsingle"/>
|
||||
<onlyin region="strdouble"/>
|
||||
</block>
|
||||
|
||||
<block name="exponent"
|
||||
match="((\d+|((\d*\.\d+)|(\d+\.\d*)))[eE][+-]?\d+)"
|
||||
innerClass="number" />
|
||||
|
||||
<block name="float" match="(\d*\.\d+)|(\d+\.\d*)" innerClass="number"/>
|
||||
|
||||
<block name="integer" match="\d+l?|\b0l?\b" innerClass="number" />
|
||||
|
||||
<block name="hexinteger" match="0[xX][\da-f]+l?" innerClass="number" />
|
||||
|
||||
<keywords name="reserved" inherits="identifier" innerClass="reserved" case = "no">
|
||||
<keyword match="ABSOLUTE" />
|
||||
<keyword match="ACTION" />
|
||||
<keyword match="ADD" />
|
||||
<keyword match="ADMIN" />
|
||||
<keyword match="AFTER" />
|
||||
<keyword match="AGGREGATE" />
|
||||
<keyword match="ALIAS" />
|
||||
<keyword match="ALL" />
|
||||
<keyword match="ALLOCATE" />
|
||||
<keyword match="ALTER" />
|
||||
<keyword match="AND" />
|
||||
<keyword match="ANY" />
|
||||
<keyword match="ARE" />
|
||||
<keyword match="ARRAY" />
|
||||
<keyword match="AS" />
|
||||
<keyword match="ASC" />
|
||||
<keyword match="ASSERTION" />
|
||||
<keyword match="AT" />
|
||||
<keyword match="AUTHORIZATION" />
|
||||
<keyword match="BEFORE" />
|
||||
<keyword match="BEGIN" />
|
||||
<keyword match="BINARY" />
|
||||
<keyword match="BIT" />
|
||||
<keyword match="BLOB" />
|
||||
<keyword match="BOOLEAN" />
|
||||
<keyword match="BOTH" />
|
||||
<keyword match="BREADTH" />
|
||||
<keyword match="BY" />
|
||||
<keyword match="CALL" />
|
||||
<keyword match="CASCADE" />
|
||||
<keyword match="CASCADED" />
|
||||
<keyword match="CASE" />
|
||||
<keyword match="CAST" />
|
||||
<keyword match="CATALOG" />
|
||||
<keyword match="CHAR" />
|
||||
<keyword match="CHARACTER" />
|
||||
<keyword match="CHECK" />
|
||||
<keyword match="CLASS" />
|
||||
<keyword match="CLOB" />
|
||||
<keyword match="CLOSE" />
|
||||
<keyword match="COLLATE" />
|
||||
<keyword match="COLLATION" />
|
||||
<keyword match="COLUMN" />
|
||||
<keyword match="COMMIT" />
|
||||
<keyword match="COMPLETION" />
|
||||
<keyword match="CONNECT" />
|
||||
<keyword match="CONNECTION" />
|
||||
<keyword match="CONSTRAINT" />
|
||||
<keyword match="CONSTRAINTS" />
|
||||
<keyword match="CONSTRUCTOR" />
|
||||
<keyword match="CONTINUE" />
|
||||
<keyword match="CORRESPONDING" />
|
||||
<keyword match="CREATE" />
|
||||
<keyword match="CROSS" />
|
||||
<keyword match="CUBE" />
|
||||
<keyword match="CURRENT" />
|
||||
<keyword match="CURRENT_DATE" />
|
||||
<keyword match="CURRENT_PATH" />
|
||||
<keyword match="CURRENT_ROLE" />
|
||||
<keyword match="CURRENT_TIME" />
|
||||
<keyword match="CURRENT_TIMESTAMP" />
|
||||
<keyword match="CURRENT_USER" />
|
||||
<keyword match="CURSOR" />
|
||||
<keyword match="CYCLE" />
|
||||
<keyword match="DATA" />
|
||||
<keyword match="DATE" />
|
||||
<keyword match="DAY" />
|
||||
<keyword match="DEALLOCATE" />
|
||||
<keyword match="DEC" />
|
||||
<keyword match="DECIMAL" />
|
||||
<keyword match="DECLARE" />
|
||||
<keyword match="DEFAULT" />
|
||||
<keyword match="DEFERRABLE" />
|
||||
<keyword match="DEFERRED" />
|
||||
<keyword match="DELETE" />
|
||||
<keyword match="DEPTH" />
|
||||
<keyword match="DEREF" />
|
||||
<keyword match="DESC" />
|
||||
<keyword match="DESCRIBE" />
|
||||
<keyword match="DESCRIPTOR" />
|
||||
<keyword match="DESTROY" />
|
||||
<keyword match="DESTRUCTOR" />
|
||||
<keyword match="DETERMINISTIC" />
|
||||
<keyword match="DIAGNOSTICS" />
|
||||
<keyword match="DICTIONARY" />
|
||||
<keyword match="DISCONNECT" />
|
||||
<keyword match="DISTINCT" />
|
||||
<keyword match="DOMAIN" />
|
||||
<keyword match="DOUBLE" />
|
||||
<keyword match="DROP" />
|
||||
<keyword match="DYNAMIC" />
|
||||
<keyword match="EACH" />
|
||||
<keyword match="ELSE" />
|
||||
<keyword match="END" />
|
||||
<keyword match="END-EXEC" />
|
||||
<keyword match="EQUALS" />
|
||||
<keyword match="ESCAPE" />
|
||||
<keyword match="EVERY" />
|
||||
<keyword match="EXCEPT" />
|
||||
<keyword match="EXCEPTION" />
|
||||
<keyword match="EXEC" />
|
||||
<keyword match="EXECUTE" />
|
||||
<keyword match="EXTERNAL" />
|
||||
<keyword match="FALSE" />
|
||||
<keyword match="FETCH" />
|
||||
<keyword match="FIRST" />
|
||||
<keyword match="FLOAT" />
|
||||
<keyword match="FOR" />
|
||||
<keyword match="FOREIGN" />
|
||||
<keyword match="FOUND" />
|
||||
<keyword match="FREE" />
|
||||
<keyword match="FROM" />
|
||||
<keyword match="FULL" />
|
||||
<keyword match="FUNCTION" />
|
||||
<keyword match="GENERAL" />
|
||||
<keyword match="GET" />
|
||||
<keyword match="GLOBAL" />
|
||||
<keyword match="GO" />
|
||||
<keyword match="GOTO" />
|
||||
<keyword match="GRANT" />
|
||||
<keyword match="GROUP" />
|
||||
<keyword match="GROUPING" />
|
||||
<keyword match="HAVING" />
|
||||
<keyword match="HOST" />
|
||||
<keyword match="HOUR" />
|
||||
<keyword match="IDENTITY" />
|
||||
<keyword match="IGNORE" />
|
||||
<keyword match="IMMEDIATE" />
|
||||
<keyword match="IN" />
|
||||
<keyword match="INDICATOR" />
|
||||
<keyword match="INITIALIZE" />
|
||||
<keyword match="INITIALLY" />
|
||||
<keyword match="INNER" />
|
||||
<keyword match="INOUT" />
|
||||
<keyword match="INPUT" />
|
||||
<keyword match="INSERT" />
|
||||
<keyword match="INT" />
|
||||
<keyword match="INTEGER" />
|
||||
<keyword match="INTERSECT" />
|
||||
<keyword match="INTERVAL" />
|
||||
<keyword match="INTO" />
|
||||
<keyword match="IS" />
|
||||
<keyword match="ISOLATION" />
|
||||
<keyword match="ITERATE" />
|
||||
<keyword match="JOIN" />
|
||||
<keyword match="KEY" />
|
||||
<keyword match="LANGUAGE" />
|
||||
<keyword match="LARGE" />
|
||||
<keyword match="LAST" />
|
||||
<keyword match="LATERAL" />
|
||||
<keyword match="LEADING" />
|
||||
<keyword match="LEFT" />
|
||||
<keyword match="LESS" />
|
||||
<keyword match="LEVEL" />
|
||||
<keyword match="LIKE" />
|
||||
<keyword match="LIMIT" />
|
||||
<keyword match="LOCAL" />
|
||||
<keyword match="LOCALTIME" />
|
||||
<keyword match="LOCALTIMESTAMP" />
|
||||
<keyword match="LOCATOR" />
|
||||
<keyword match="MAP" />
|
||||
<keyword match="MATCH" />
|
||||
<keyword match="MINUTE" />
|
||||
<keyword match="MODIFIES" />
|
||||
<keyword match="MODIFY" />
|
||||
<keyword match="MODULE" />
|
||||
<keyword match="MONTH" />
|
||||
<keyword match="NAMES" />
|
||||
<keyword match="NATIONAL" />
|
||||
<keyword match="NATURAL" />
|
||||
<keyword match="NCHAR" />
|
||||
<keyword match="NCLOB" />
|
||||
<keyword match="NEW" />
|
||||
<keyword match="NEXT" />
|
||||
<keyword match="NO" />
|
||||
<keyword match="NONE" />
|
||||
<keyword match="NOT" />
|
||||
<keyword match="NULL" />
|
||||
<keyword match="NUMERIC" />
|
||||
<keyword match="OBJECT" />
|
||||
<keyword match="OF" />
|
||||
<keyword match="OFF" />
|
||||
<keyword match="OLD" />
|
||||
<keyword match="ON" />
|
||||
<keyword match="ONLY" />
|
||||
<keyword match="OPEN" />
|
||||
<keyword match="OPERATION" />
|
||||
<keyword match="OPTION" />
|
||||
<keyword match="OR" />
|
||||
<keyword match="ORDER" />
|
||||
<keyword match="ORDINALITY" />
|
||||
<keyword match="OUT" />
|
||||
<keyword match="OUTER" />
|
||||
<keyword match="OUTPUT" />
|
||||
<keyword match="PAD" />
|
||||
<keyword match="PARAMETER" />
|
||||
<keyword match="PARAMETERS" />
|
||||
<keyword match="PARTIAL" />
|
||||
<keyword match="PATH" />
|
||||
<keyword match="POSTFIX" />
|
||||
<keyword match="PRECISION" />
|
||||
<keyword match="PREFIX" />
|
||||
<keyword match="PREORDER" />
|
||||
<keyword match="PREPARE" />
|
||||
<keyword match="PRESERVE" />
|
||||
<keyword match="PRIMARY" />
|
||||
<keyword match="PRIOR" />
|
||||
<keyword match="PRIVILEGES" />
|
||||
<keyword match="PROCEDURE" />
|
||||
<keyword match="PUBLIC" />
|
||||
<keyword match="READ" />
|
||||
<keyword match="READS" />
|
||||
<keyword match="REAL" />
|
||||
<keyword match="RECURSIVE" />
|
||||
<keyword match="REF" />
|
||||
<keyword match="REFERENCES" />
|
||||
<keyword match="REFERENCING" />
|
||||
<keyword match="RELATIVE" />
|
||||
<keyword match="RESTRICT" />
|
||||
<keyword match="RESULT" />
|
||||
<keyword match="RETURN" />
|
||||
<keyword match="RETURNS" />
|
||||
<keyword match="REVOKE" />
|
||||
<keyword match="RIGHT" />
|
||||
<keyword match="ROLE" />
|
||||
<keyword match="ROLLBACK" />
|
||||
<keyword match="ROLLUP" />
|
||||
<keyword match="ROUTINE" />
|
||||
<keyword match="ROW" />
|
||||
<keyword match="ROWS" />
|
||||
<keyword match="SAVEPOINT" />
|
||||
<keyword match="SCHEMA" />
|
||||
<keyword match="SCOPE" />
|
||||
<keyword match="SCROLL" />
|
||||
<keyword match="SEARCH" />
|
||||
<keyword match="SECOND" />
|
||||
<keyword match="SECTION" />
|
||||
<keyword match="SELECT" />
|
||||
<keyword match="SEQUENCE" />
|
||||
<keyword match="SESSION" />
|
||||
<keyword match="SESSION_USER" />
|
||||
<keyword match="SET" />
|
||||
<keyword match="SETS" />
|
||||
<keyword match="SIZE" />
|
||||
<keyword match="SMALLINT" />
|
||||
<keyword match="SOME" />
|
||||
<keyword match="SPACE" />
|
||||
<keyword match="SPECIFIC" />
|
||||
<keyword match="SPECIFICTYPE" />
|
||||
<keyword match="SQL" />
|
||||
<keyword match="SQLEXCEPTION" />
|
||||
<keyword match="SQLSTATE" />
|
||||
<keyword match="SQLWARNING" />
|
||||
<keyword match="START" />
|
||||
<keyword match="STATE" />
|
||||
<keyword match="STATEMENT" />
|
||||
<keyword match="STATIC" />
|
||||
<keyword match="STRUCTURE" />
|
||||
<keyword match="SYSTEM_USER" />
|
||||
<keyword match="TABLE" />
|
||||
<keyword match="TEMPORARY" />
|
||||
<keyword match="TERMINATE" />
|
||||
<keyword match="THAN" />
|
||||
<keyword match="THEN" />
|
||||
<keyword match="TIME" />
|
||||
<keyword match="TIMESTAMP" />
|
||||
<keyword match="TIMEZONE_HOUR" />
|
||||
<keyword match="TIMEZONE_MINUTE" />
|
||||
<keyword match="TO" />
|
||||
<keyword match="TRAILING" />
|
||||
<keyword match="TRANSACTION" />
|
||||
<keyword match="TRANSLATION" />
|
||||
<keyword match="TREAT" />
|
||||
<keyword match="TRIGGER" />
|
||||
<keyword match="TRUE" />
|
||||
<keyword match="UNDER" />
|
||||
<keyword match="UNION" />
|
||||
<keyword match="UNIQUE" />
|
||||
<keyword match="UNKNOWN" />
|
||||
<keyword match="UNNEST" />
|
||||
<keyword match="UPDATE" />
|
||||
<keyword match="USAGE" />
|
||||
<keyword match="USER" />
|
||||
<keyword match="USING" />
|
||||
<keyword match="VALUE" />
|
||||
<keyword match="VALUES" />
|
||||
<keyword match="VARCHAR" />
|
||||
<keyword match="VARIABLE" />
|
||||
<keyword match="VARYING" />
|
||||
<keyword match="VIEW" />
|
||||
<keyword match="WHEN" />
|
||||
<keyword match="WHENEVER" />
|
||||
<keyword match="WHERE" />
|
||||
<keyword match="WITH" />
|
||||
<keyword match="WITHOUT" />
|
||||
<keyword match="WORK" />
|
||||
<keyword match="WRITE" />
|
||||
<keyword match="YEAR" />
|
||||
<keyword match="ZONE" />
|
||||
</keywords>
|
||||
<keywords name="keyword" inherits="identifier" innerClass="var" case = "no">
|
||||
<keyword match="ABS" />
|
||||
<keyword match="ADA" />
|
||||
<keyword match="ASENSITIVE" />
|
||||
<keyword match="ASSIGNMENT" />
|
||||
<keyword match="ASYMMETRIC" />
|
||||
<keyword match="ATOMIC" />
|
||||
<keyword match="AVG" />
|
||||
<keyword match="BETWEEN" />
|
||||
<keyword match="BITVAR" />
|
||||
<keyword match="BIT_LENGTH" />
|
||||
<keyword match="C" />
|
||||
<keyword match="CALLED" />
|
||||
<keyword match="CARDINALITY" />
|
||||
<keyword match="CATALOG_NAME" />
|
||||
<keyword match="CHAIN" />
|
||||
<keyword match="CHARACTER_LENGTH" />
|
||||
<keyword match="CHARACTER_SET_CATALOG" />
|
||||
<keyword match="CHARACTER_SET_NAME" />
|
||||
<keyword match="CHARACTER_SET_SCHEMA" />
|
||||
<keyword match="CHAR_LENGTH" />
|
||||
<keyword match="CHECKED" />
|
||||
<keyword match="CLASS_ORIGIN" />
|
||||
<keyword match="COALESCE" />
|
||||
<keyword match="COBOL" />
|
||||
<keyword match="COLLATION_CATALOG" />
|
||||
<keyword match="COLLATION_NAME" />
|
||||
<keyword match="COLLATION_SCHEMA" />
|
||||
<keyword match="COLUMN_NAME" />
|
||||
<keyword match="COMMAND_FUNCTION" />
|
||||
<keyword match="COMMAND_FUNCTION_CODE" />
|
||||
<keyword match="COMMITTED" />
|
||||
<keyword match="CONDITION_NUMBER" />
|
||||
<keyword match="CONNECTION_NAME" />
|
||||
<keyword match="CONSTRAINT_CATALOG" />
|
||||
<keyword match="CONSTRAINT_NAME" />
|
||||
<keyword match="CONSTRAINT_SCHEMA" />
|
||||
<keyword match="CONTAINS" />
|
||||
<keyword match="CONVERT" />
|
||||
<keyword match="COUNT" />
|
||||
<keyword match="CURSOR_NAME" />
|
||||
<keyword match="DATETIME_INTERVAL_CODE" />
|
||||
<keyword match="DATETIME_INTERVAL_PRECISION" />
|
||||
<keyword match="DEFINED" />
|
||||
<keyword match="DEFINER" />
|
||||
<keyword match="DISPATCH" />
|
||||
<keyword match="DYNAMIC_FUNCTION" />
|
||||
<keyword match="DYNAMIC_FUNCTION_CODE" />
|
||||
<keyword match="EXISTING" />
|
||||
<keyword match="EXISTS" />
|
||||
<keyword match="EXTRACT" />
|
||||
<keyword match="FINAL" />
|
||||
<keyword match="FORTRAN" />
|
||||
<keyword match="G" />
|
||||
<keyword match="GENERATED" />
|
||||
<keyword match="GRANTED" />
|
||||
<keyword match="HIERARCHY" />
|
||||
<keyword match="HOLD" />
|
||||
<keyword match="IMPLEMENTATION" />
|
||||
<keyword match="INFIX" />
|
||||
<keyword match="INSENSITIVE" />
|
||||
<keyword match="INSTANCE" />
|
||||
<keyword match="INSTANTIABLE" />
|
||||
<keyword match="INVOKER" />
|
||||
<keyword match="K" />
|
||||
<keyword match="KEY_MEMBER" />
|
||||
<keyword match="KEY_TYPE" />
|
||||
<keyword match="LENGTH" />
|
||||
<keyword match="LOWER" />
|
||||
<keyword match="M" />
|
||||
<keyword match="MAX" />
|
||||
<keyword match="MESSAGE_LENGTH" />
|
||||
<keyword match="MESSAGE_OCTET_LENGTH" />
|
||||
<keyword match="MESSAGE_TEXT" />
|
||||
<keyword match="METHOD" />
|
||||
<keyword match="MIN" />
|
||||
<keyword match="MOD" />
|
||||
<keyword match="MORE" />
|
||||
<keyword match="MUMPS" />
|
||||
<keyword match="NAME" />
|
||||
<keyword match="NULLABLE" />
|
||||
<keyword match="NULLIF" />
|
||||
<keyword match="NUMBER" />
|
||||
<keyword match="OCTET_LENGTH" />
|
||||
<keyword match="OPTIONS" />
|
||||
<keyword match="OVERLAPS" />
|
||||
<keyword match="OVERLAY" />
|
||||
<keyword match="OVERRIDING" />
|
||||
<keyword match="PARAMETER_MODE" />
|
||||
<keyword match="PARAMETER_NAME" />
|
||||
<keyword match="PARAMETER_ORDINAL_POSITION" />
|
||||
<keyword match="PARAMETER_SPECIFIC_CATALOG" />
|
||||
<keyword match="PARAMETER_SPECIFIC_NAME" />
|
||||
<keyword match="PARAMETER_SPECIFIC_SCHEMA" />
|
||||
<keyword match="PASCAL" />
|
||||
<keyword match="PLI" />
|
||||
<keyword match="POSITION" />
|
||||
<keyword match="REPEATABLE" />
|
||||
<keyword match="RETURNED_LENGTH" />
|
||||
<keyword match="RETURNED_OCTET_LENGTH" />
|
||||
<keyword match="RETURNED_SQLSTATE" />
|
||||
<keyword match="ROUTINE_CATALOG" />
|
||||
<keyword match="ROUTINE_NAME" />
|
||||
<keyword match="ROUTINE_SCHEMA" />
|
||||
<keyword match="ROW_COUNT" />
|
||||
<keyword match="SCALE" />
|
||||
<keyword match="SCHEMA_NAME" />
|
||||
<keyword match="SECURITY" />
|
||||
<keyword match="SELF" />
|
||||
<keyword match="SENSITIVE" />
|
||||
<keyword match="SERIALIZABLE" />
|
||||
<keyword match="SERVER_NAME" />
|
||||
<keyword match="SIMILAR" />
|
||||
<keyword match="SIMPLE" />
|
||||
<keyword match="SOURCE" />
|
||||
<keyword match="SPECIFIC_NAME" />
|
||||
<keyword match="STYLE" />
|
||||
<keyword match="SUBCLASS_ORIGIN" />
|
||||
<keyword match="SUBLIST" />
|
||||
<keyword match="SUBSTRING" />
|
||||
<keyword match="SUM" />
|
||||
<keyword match="SYMMETRIC" />
|
||||
<keyword match="SYSTEM" />
|
||||
<keyword match="TABLE_NAME" />
|
||||
<keyword match="TRANSACTIONS_COMMITTED" />
|
||||
<keyword match="TRANSACTIONS_ROLLED_BACK" />
|
||||
<keyword match="TRANSACTION_ACTIVE" />
|
||||
<keyword match="TRANSFORM" />
|
||||
<keyword match="TRANSFORMS" />
|
||||
<keyword match="TRANSLATE" />
|
||||
<keyword match="TRIGGER_CATALOG" />
|
||||
<keyword match="TRIGGER_NAME" />
|
||||
<keyword match="TRIGGER_SCHEMA" />
|
||||
<keyword match="TRIM" />
|
||||
<keyword match="TYPE" />
|
||||
<keyword match="UNCOMMITTED" />
|
||||
<keyword match="UNNAMED" />
|
||||
<keyword match="UPPER" />
|
||||
<keyword match="USER_DEFINED_TYPE_CATALOG" />
|
||||
<keyword match="USER_DEFINED_TYPE_NAME" />
|
||||
<keyword match="USER_DEFINED_TYPE_SCHEMA" />
|
||||
</keywords>
|
||||
|
||||
</highlight>
|
||||
305
framework/vendors/TextHighlighter/Text/vbscript.xml
vendored
Normal file
305
framework/vendors/TextHighlighter/Text/vbscript.xml
vendored
Normal file
@@ -0,0 +1,305 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: vbscript.xml,v 1.2 2008/01/02 00:05:52 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="vbscript" case="no">
|
||||
|
||||
<authors>
|
||||
<author name="Daniel Fruzynski" email="daniel-AT-poradnik-webmastera.com" />
|
||||
</authors>
|
||||
|
||||
<default innerClass="code" />
|
||||
|
||||
<region name="brackets" delimClass="brackets" innerClass="code" start="\(" end="\)">
|
||||
<contains all="yes"/>
|
||||
</region>
|
||||
|
||||
|
||||
<region name="strdouble" delimClass="quotes" innerClass="string" start=""" end="""/>
|
||||
|
||||
<region name="comment" start="'|[Rr][Ee][Mm]\b" end="/$/m" innerClass="comment">
|
||||
<contains block="cvstag"/>
|
||||
</region>
|
||||
|
||||
<block name="number" match="\d*\.?\d+" innerClass="number"/>
|
||||
<block name="hexnumber" match="&H[0-9a-fA-F]+" innerClass="number"/>
|
||||
|
||||
<block name="identifier" match="[a-z_]\w*" innerClass="identifier" case="no"/>
|
||||
|
||||
<block name="url" match="((https?|ftp):\/\/[\w\?\.\-\&=\/%+]+)|(^|[\s,!?])www\.\w+\.\w+[\w\?\.\&=\/%+]*" innerClass="url" contained="yes">
|
||||
<onlyin region="comment"/>
|
||||
</block>
|
||||
|
||||
<block name="email" match="\w+[\.\w\-]+@(\w+[\.\w\-])+" innerClass="url" contained="yes">
|
||||
<onlyin region="comment"/>
|
||||
</block>
|
||||
|
||||
<block name="note" match="\b(note|fixme):" innerClass="inlinedoc" contained="yes" case="no">
|
||||
<onlyin region="comment"/>
|
||||
</block>
|
||||
|
||||
|
||||
<block name="cvstag" match="\$\w+:.+\$" innerClass="inlinedoc" contained="yes">
|
||||
<onlyin region="comment"/>
|
||||
</block>
|
||||
|
||||
<keywords name="constants" inherits="identifier" innerClass="builtin" case="no">
|
||||
<!-- Color Constants -->
|
||||
<keyword match="vbBlack" />
|
||||
<keyword match="vbRed" />
|
||||
<keyword match="vbGreen" />
|
||||
<keyword match="vbYellow" />
|
||||
<keyword match="vbBlue" />
|
||||
<keyword match="vbMagenta" />
|
||||
<keyword match="vbCyan" />
|
||||
<keyword match="vbWhite" />
|
||||
<!-- Comparison Constants -->
|
||||
<keyword match="vbBinaryCompare" />
|
||||
<keyword match="vbTextCompare" />
|
||||
<!-- Date and Time Constants -->
|
||||
<keyword match="vbSunday" />
|
||||
<keyword match="vbMonday" />
|
||||
<keyword match="vbTuesday" />
|
||||
<keyword match="vbWednesday" />
|
||||
<keyword match="vbThursday" />
|
||||
<keyword match="vbFriday" />
|
||||
<keyword match="vbSaturday" />
|
||||
<keyword match="vbUseSystemDayOfWeek" />
|
||||
<keyword match="vbFirstJan1" />
|
||||
<keyword match="vbFirstFourDays" />
|
||||
<keyword match="vbFirstFullWeek" />
|
||||
<!-- Date Format Constants -->
|
||||
<keyword match="vbGeneralDate" />
|
||||
<keyword match="vbLongDate" />
|
||||
<keyword match="vbShortDate" />
|
||||
<keyword match="vbLongTime" />
|
||||
<keyword match="vbShortTime" />
|
||||
<!-- Miscellaneous Constants -->
|
||||
<keyword match="vbObjectError" />
|
||||
<!-- MsgBox Constants -->
|
||||
<keyword match="vbOKOnly" />
|
||||
<keyword match="vbOKCancel" />
|
||||
<keyword match="vbAbortRetryIgnore" />
|
||||
<keyword match="vbYesNoCancel" />
|
||||
<keyword match="vbYesNo" />
|
||||
<keyword match="vbRetryCancel" />
|
||||
<keyword match="vbCritical" />
|
||||
<keyword match="vbQuestion" />
|
||||
<keyword match="vbExclamation" />
|
||||
<keyword match="vbInformation" />
|
||||
<keyword match="vbDefaultButton1" />
|
||||
<keyword match="vbDefaultButton2" />
|
||||
<keyword match="vbDefaultButton3" />
|
||||
<keyword match="vbDefaultButton4" />
|
||||
<keyword match="vbApplicationModal" />
|
||||
<keyword match="vbSystemModal" />
|
||||
<keyword match="vbOK" />
|
||||
<keyword match="vbCancel" />
|
||||
<keyword match="vbAbort" />
|
||||
<keyword match="vbRetry" />
|
||||
<keyword match="vbIgnore" />
|
||||
<keyword match="vbYes" />
|
||||
<keyword match="vbNo" />
|
||||
<!-- String Constants -->
|
||||
<keyword match="vbCr" />
|
||||
<keyword match="VbCrLf" />
|
||||
<keyword match="vbFormFeed" />
|
||||
<keyword match="vbLf" />
|
||||
<keyword match="vbNewLine" />
|
||||
<keyword match="vbNullChar" />
|
||||
<keyword match="vbNullString" />
|
||||
<keyword match="vbTab" />
|
||||
<keyword match="vbVerticalTab" />
|
||||
<!-- Tristate Constants -->
|
||||
<keyword match="vbUseDefault" />
|
||||
<keyword match="vbTrue" />
|
||||
<keyword match="vbFalse" />
|
||||
<!-- VarType Constants -->
|
||||
<keyword match="vbEmpty" />
|
||||
<keyword match="vbNull" />
|
||||
<keyword match="vbInteger" />
|
||||
<keyword match="vbLong" />
|
||||
<keyword match="vbSingle" />
|
||||
<keyword match="vbDouble" />
|
||||
<keyword match="vbCurrency" />
|
||||
<keyword match="vbDate" />
|
||||
<keyword match="vbString" />
|
||||
<keyword match="vbObject" />
|
||||
<keyword match="vbError" />
|
||||
<keyword match="vbBoolean" />
|
||||
<keyword match="vbVariant" />
|
||||
<keyword match="vbDataObject" />
|
||||
<keyword match="vbDecimal" />
|
||||
<keyword match="vbByte" />
|
||||
<keyword match="vbArray" />
|
||||
</keywords>
|
||||
|
||||
<keywords name="functions" inherits="identifier" innerClass="builtin" case="no">
|
||||
<keyword match="Abs" />
|
||||
<keyword match="Array" />
|
||||
<keyword match="Asc" />
|
||||
<keyword match="Atn" />
|
||||
<keyword match="CBool" />
|
||||
<keyword match="CByte" />
|
||||
<keyword match="CCur" />
|
||||
<keyword match="CDate" />
|
||||
<keyword match="CDbl" />
|
||||
<keyword match="Chr" />
|
||||
<keyword match="CInt" />
|
||||
<keyword match="CLng" />
|
||||
<keyword match="Cos" />
|
||||
<keyword match="CreateObject" />
|
||||
<keyword match="CSng" />
|
||||
<keyword match="CStr" />
|
||||
<keyword match="Date" />
|
||||
<keyword match="DateAdd" />
|
||||
<keyword match="DateDiff" />
|
||||
<keyword match="DatePart" />
|
||||
<keyword match="DateSerial" />
|
||||
<keyword match="DateValue" />
|
||||
<keyword match="Day" />
|
||||
<keyword match="Escape" />
|
||||
<keyword match="Eval" />
|
||||
<keyword match="Exp" />
|
||||
<keyword match="Filter" />
|
||||
<keyword match="FormatCurrency" />
|
||||
<keyword match="FormatDateTime" />
|
||||
<keyword match="FormatNumber" />
|
||||
<keyword match="FormatPercent" />
|
||||
<keyword match="GetLocale" />
|
||||
<keyword match="GetObject" />
|
||||
<keyword match="GetRef" />
|
||||
<keyword match="Hex" />
|
||||
<keyword match="Hour" />
|
||||
<keyword match="InputBox" />
|
||||
<keyword match="InStr" />
|
||||
<keyword match="InStrRev" />
|
||||
<keyword match="Int" />
|
||||
<keyword match="Fix" />
|
||||
<keyword match="IsArray" />
|
||||
<keyword match="IsDate" />
|
||||
<keyword match="IsEmpty" />
|
||||
<keyword match="IsNull" />
|
||||
<keyword match="IsNumeric" />
|
||||
<keyword match="IsObject" />
|
||||
<keyword match="Join" />
|
||||
<keyword match="LBound" />
|
||||
<keyword match="LCase" />
|
||||
<keyword match="Left" />
|
||||
<keyword match="Len" />
|
||||
<keyword match="LoadPicture" />
|
||||
<keyword match="Log" />
|
||||
<keyword match="LTrim" />
|
||||
<keyword match="RTrim" />
|
||||
<keyword match="Trim" />
|
||||
<keyword match="Mid" />
|
||||
<keyword match="Minute" />
|
||||
<keyword match="Month" />
|
||||
<keyword match="MonthName" />
|
||||
<keyword match="MsgBox" />
|
||||
<keyword match="Now" />
|
||||
<keyword match="Oct" />
|
||||
<keyword match="Replace" />
|
||||
<keyword match="RGB" />
|
||||
<keyword match="Right" />
|
||||
<keyword match="Rnd" />
|
||||
<keyword match="Round" />
|
||||
<keyword match="ScriptEngine" />
|
||||
<keyword match="ScriptEngineBuildVersion" />
|
||||
<keyword match="ScriptEngineMajorVersion" />
|
||||
<keyword match="ScriptEngineMinorVersion" />
|
||||
<keyword match="Second" />
|
||||
<keyword match="SetLocale" />
|
||||
<keyword match="Sgn" />
|
||||
<keyword match="Sin" />
|
||||
<keyword match="Space" />
|
||||
<keyword match="Split" />
|
||||
<keyword match="Sqr" />
|
||||
<keyword match="StrComp" />
|
||||
<keyword match="String" />
|
||||
<keyword match="StrReverse" />
|
||||
<keyword match="Tan" />
|
||||
<keyword match="Time" />
|
||||
<keyword match="Timer" />
|
||||
<keyword match="TimeSerial" />
|
||||
<keyword match="TimeValue" />
|
||||
<keyword match="TypeName" />
|
||||
<keyword match="UBound" />
|
||||
<keyword match="UCase" />
|
||||
<keyword match="Unescape" />
|
||||
<keyword match="VarType" />
|
||||
<keyword match="Weekday" />
|
||||
<keyword match="WeekdayName" />
|
||||
<keyword match="Year" />
|
||||
</keywords>
|
||||
|
||||
<keywords name="builtin" inherits="identifier" innerClass="builtin" case="no">
|
||||
<!--<keyword match="Class" />-->
|
||||
<keyword match="Debug" />
|
||||
<keyword match="Err" />
|
||||
<keyword match="Match" />
|
||||
<keyword match="RegExp" />
|
||||
</keywords>
|
||||
|
||||
<keywords name="reserved" inherits="identifier" innerClass="reserved" case="no">
|
||||
<keyword match="Empty" />
|
||||
<keyword match="False" />
|
||||
<keyword match="Nothing" />
|
||||
<keyword match="Null" />
|
||||
<keyword match="True" />
|
||||
<keyword match="And" />
|
||||
<keyword match="Eqv" />
|
||||
<keyword match="Imp" />
|
||||
<keyword match="Is" />
|
||||
<keyword match="Mod" />
|
||||
<keyword match="Not" />
|
||||
<keyword match="Or" />
|
||||
<keyword match="Xor" />
|
||||
<keyword match="Call" />
|
||||
<keyword match="Class" />
|
||||
<keyword match="End" />
|
||||
<keyword match="Const" />
|
||||
<keyword match="Public" />
|
||||
<keyword match="Private" />
|
||||
<keyword match="Dim" />
|
||||
<keyword match="Do" />
|
||||
<keyword match="While" />
|
||||
<keyword match="Until" />
|
||||
<keyword match="Exit" />
|
||||
<keyword match="Loop" />
|
||||
<keyword match="Erase" />
|
||||
<keyword match="Execute" />
|
||||
<keyword match="ExecuteGlobal" />
|
||||
<keyword match="For" />
|
||||
<keyword match="Each" />
|
||||
<keyword match="In" />
|
||||
<keyword match="To" />
|
||||
<keyword match="Step" />
|
||||
<keyword match="Next" />
|
||||
<keyword match="Function" />
|
||||
<keyword match="Default" />
|
||||
<keyword match="If" />
|
||||
<keyword match="Then" />
|
||||
<keyword match="Else" />
|
||||
<keyword match="ElseIf" />
|
||||
<keyword match="On" />
|
||||
<keyword match="Error" />
|
||||
<keyword match="Resume" />
|
||||
<keyword match="Goto" />
|
||||
<keyword match="Option" />
|
||||
<keyword match="Explicit" />
|
||||
<keyword match="Property" />
|
||||
<keyword match="Get" />
|
||||
<keyword match="Let" />
|
||||
<keyword match="Set" />
|
||||
<keyword match="Randomize" />
|
||||
<keyword match="ReDim" />
|
||||
<keyword match="Preserve" />
|
||||
<keyword match="Select" />
|
||||
<keyword match="Case" />
|
||||
<keyword match="Stop" />
|
||||
<keyword match="Sub" />
|
||||
<keyword match="Wend" />
|
||||
<keyword match="With" />
|
||||
</keywords>
|
||||
|
||||
</highlight>
|
||||
37
framework/vendors/TextHighlighter/Text/xml.xml
vendored
Normal file
37
framework/vendors/TextHighlighter/Text/xml.xml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id: xml.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp $ -->
|
||||
|
||||
<highlight lang="xml" case="no">
|
||||
|
||||
<authors>
|
||||
<author name="Andrey Demenev" email="demenev@gmail.com"/>
|
||||
</authors>
|
||||
|
||||
|
||||
<default innerClass="code" />
|
||||
|
||||
<region name="cdata" delimClass="comment" innerClass="comment"
|
||||
start="\<\!\[CDATA\[" end="\]\]\>">
|
||||
</region>
|
||||
|
||||
<region name="comment" delimClass="comment" innerClass="comment"
|
||||
start="\<!--" end="--\>">
|
||||
</region>
|
||||
|
||||
<region name="tag" delimClass="brackets" innerClass="code" start="\<[\?\/]?" end="[\/\?]?\>">
|
||||
<contains block="tagname"/>
|
||||
<contains region="param"/>
|
||||
<contains block="paramname"/>
|
||||
</region>
|
||||
|
||||
<block name="tagname" match="(?<=[\<\/?])[\w\-\:]+" innerClass="reserved" contained="yes"/>
|
||||
|
||||
<block name="paramname" match="[\w\-\:]+" innerClass="var" contained="yes"/>
|
||||
|
||||
<block name="entity" match="(&|%)[\w\-\.]+;" innerClass="special" />
|
||||
|
||||
<region name="param" start=""" end=""" delimClass="quotes" innerClass="string" contained="yes">
|
||||
<contains block="entity"/>
|
||||
</region>
|
||||
|
||||
</highlight>
|
||||
383
framework/vendors/TextHighlighter/highlight.css
vendored
Normal file
383
framework/vendors/TextHighlighter/highlight.css
vendored
Normal file
@@ -0,0 +1,383 @@
|
||||
.php-hl-default {
|
||||
color: Black;
|
||||
}
|
||||
.php-hl-code {
|
||||
color: Gray;
|
||||
}
|
||||
.php-hl-brackets {
|
||||
color: Olive;
|
||||
}
|
||||
.php-hl-comment {
|
||||
color: #808080;
|
||||
font-style: italic;
|
||||
}
|
||||
.php-hl-quotes {
|
||||
color: red;
|
||||
}
|
||||
.php-hl-string {
|
||||
color: Red;
|
||||
}
|
||||
.php-hl-identifier {
|
||||
color: green;
|
||||
}
|
||||
.php-hl-builtin {
|
||||
color: Teal;
|
||||
}
|
||||
.php-hl-reserved {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
.php-hl-inlinedoc {
|
||||
color: Blue;
|
||||
}
|
||||
.php-hl-var {
|
||||
color: blue;
|
||||
}
|
||||
.php-hl-url {
|
||||
color: Blue;
|
||||
}
|
||||
.php-hl-special {
|
||||
color: Navy;
|
||||
}
|
||||
.php-hl-number {
|
||||
color: Maroon;
|
||||
}
|
||||
.php-hl-inlinetags {
|
||||
color: Blue;
|
||||
}
|
||||
.php-hl-main {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-weight: normal;
|
||||
font-size: 12px;
|
||||
}
|
||||
ol.php-hl-main pre {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.php-hl-gutter {
|
||||
background-color: #999999;
|
||||
color: White
|
||||
}
|
||||
.php-hl-table {
|
||||
font-family: courier;
|
||||
font-size: 12px;
|
||||
border: solid 1px #505050;
|
||||
}
|
||||
|
||||
.xml-hl-default {
|
||||
color: Black;
|
||||
}
|
||||
.xml-hl-code {
|
||||
color: Gray;
|
||||
}
|
||||
.xml-hl-brackets {
|
||||
color: Olive;
|
||||
}
|
||||
.xml-hl-comment {
|
||||
color: #808080;
|
||||
font-style: italic;
|
||||
}
|
||||
.xml-hl-quotes {
|
||||
color: red;
|
||||
}
|
||||
.xml-hl-string {
|
||||
color: Red;
|
||||
}
|
||||
.xml-hl-identifier {
|
||||
color: Blue;
|
||||
}
|
||||
.xml-hl-builtin {
|
||||
color: Teal;
|
||||
}
|
||||
.xml-hl-reserved {
|
||||
color: Green;
|
||||
}
|
||||
.xml-hl-inlinedoc {
|
||||
color: Blue;
|
||||
}
|
||||
.xml-hl-var {
|
||||
color: #000020;
|
||||
}
|
||||
.xml-hl-url {
|
||||
color: Blue;
|
||||
}
|
||||
.xml-hl-special {
|
||||
color: Navy;
|
||||
}
|
||||
.xml-hl-number {
|
||||
color: Maroon;
|
||||
}
|
||||
.xml-hl-inlinetags {
|
||||
color: Blue;
|
||||
}
|
||||
.xml-hl-main {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-weight: normal;
|
||||
}
|
||||
.xml-hl-gutter {
|
||||
background-color: #999999;
|
||||
color: White
|
||||
}
|
||||
.xml-hl-table {
|
||||
font-family: courier;
|
||||
font-size: 12px;
|
||||
border: solid 1px #505050;
|
||||
}
|
||||
|
||||
.html-hl-default {
|
||||
color: Black;
|
||||
}
|
||||
.html-hl-code {
|
||||
color: Gray;
|
||||
}
|
||||
.html-hl-brackets {
|
||||
color: Olive;
|
||||
}
|
||||
.html-hl-comment {
|
||||
color: #808080;
|
||||
font-style: italic;
|
||||
}
|
||||
.html-hl-quotes {
|
||||
color: red;
|
||||
}
|
||||
.html-hl-string {
|
||||
color: Red;
|
||||
}
|
||||
.html-hl-identifier {
|
||||
color: Blue;
|
||||
}
|
||||
.html-hl-builtin {
|
||||
color: Teal;
|
||||
}
|
||||
.html-hl-reserved {
|
||||
color: Green;
|
||||
}
|
||||
.html-hl-inlinedoc {
|
||||
color: Blue;
|
||||
}
|
||||
.html-hl-var {
|
||||
color: #000020;
|
||||
}
|
||||
.html-hl-url {
|
||||
color: Blue;
|
||||
}
|
||||
.html-hl-special {
|
||||
color: Navy;
|
||||
}
|
||||
.html-hl-number {
|
||||
color: Maroon;
|
||||
}
|
||||
.html-hl-inlinetags {
|
||||
color: Blue;
|
||||
}
|
||||
.html-hl-main {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-weight: normal;
|
||||
}
|
||||
.html-hl-gutter {
|
||||
background-color: #999999;
|
||||
color: White
|
||||
}
|
||||
.html-hl-table {
|
||||
font-family: courier;
|
||||
font-size: 12px;
|
||||
border: solid 1px #505050;
|
||||
}
|
||||
|
||||
.css-hl-default {
|
||||
color: Black;
|
||||
}
|
||||
.css-hl-code {
|
||||
color: Gray;
|
||||
}
|
||||
.css-hl-brackets {
|
||||
color: Olive;
|
||||
}
|
||||
.css-hl-comment {
|
||||
color: #808080;
|
||||
font-style: italic;
|
||||
}
|
||||
.css-hl-quotes {
|
||||
color: red;
|
||||
}
|
||||
.css-hl-string {
|
||||
color: Red;
|
||||
}
|
||||
.css-hl-identifier {
|
||||
color: Blue;
|
||||
}
|
||||
.css-hl-builtin {
|
||||
color: Teal;
|
||||
}
|
||||
.css-hl-reserved {
|
||||
color: Green;
|
||||
}
|
||||
.css-hl-inlinedoc {
|
||||
color: Blue;
|
||||
}
|
||||
.css-hl-var {
|
||||
color: #000020;
|
||||
}
|
||||
.css-hl-url {
|
||||
color: Blue;
|
||||
}
|
||||
.css-hl-special {
|
||||
color: Navy;
|
||||
}
|
||||
.css-hl-number {
|
||||
color: Maroon;
|
||||
}
|
||||
.css-hl-inlinetags {
|
||||
color: Blue;
|
||||
}
|
||||
.css-hl-main {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-weight: normal;
|
||||
}
|
||||
.css-hl-gutter {
|
||||
background-color: #999999;
|
||||
color: White
|
||||
}
|
||||
.css-hl-table {
|
||||
font-family: courier;
|
||||
font-size: 12px;
|
||||
border: solid 1px #505050;
|
||||
}
|
||||
|
||||
.javascript-hl-default {
|
||||
color: Black;
|
||||
}
|
||||
.javascript-hl-code {
|
||||
color: Gray;
|
||||
}
|
||||
.javascript-hl-brackets {
|
||||
color: Olive;
|
||||
}
|
||||
.javascript-hl-comment {
|
||||
color: #808080;
|
||||
font-style: italic;
|
||||
}
|
||||
.javascript-hl-quotes {
|
||||
color: red;
|
||||
}
|
||||
.javascript-hl-string {
|
||||
color: Red;
|
||||
}
|
||||
.javascript-hl-identifier {
|
||||
color: Blue;
|
||||
}
|
||||
.javascript-hl-builtin {
|
||||
color: Teal;
|
||||
}
|
||||
.javascript-hl-reserved {
|
||||
color: Green;
|
||||
}
|
||||
.javascript-hl-inlinedoc {
|
||||
color: Blue;
|
||||
}
|
||||
.javascript-hl-var {
|
||||
color: #000020;
|
||||
}
|
||||
.javascript-hl-url {
|
||||
color: Blue;
|
||||
}
|
||||
.javascript-hl-special {
|
||||
color: Navy;
|
||||
}
|
||||
.javascript-hl-number {
|
||||
color: Maroon;
|
||||
}
|
||||
.javascript-hl-inlinetags {
|
||||
color: Blue;
|
||||
}
|
||||
.javascript-hl-main {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-weight: normal;
|
||||
}
|
||||
.javascript-hl-gutter {
|
||||
background-color: #999999;
|
||||
color: White
|
||||
}
|
||||
.javascript-hl-table {
|
||||
font-family: courier;
|
||||
font-size: 12px;
|
||||
border: solid 1px #505050;
|
||||
}
|
||||
|
||||
|
||||
.sql-hl-default {
|
||||
color: Black;
|
||||
}
|
||||
.sql-hl-code {
|
||||
color: Gray;
|
||||
}
|
||||
.sql-hl-brackets {
|
||||
color: Olive;
|
||||
}
|
||||
.sql-hl-comment {
|
||||
color: #808080;
|
||||
font-style: italic;
|
||||
}
|
||||
.sql-hl-quotes {
|
||||
color: red;
|
||||
}
|
||||
.sql-hl-string {
|
||||
color: Red;
|
||||
}
|
||||
.sql-hl-identifier {
|
||||
color: Blue;
|
||||
}
|
||||
.sql-hl-builtin {
|
||||
color: Teal;
|
||||
}
|
||||
.sql-hl-reserved {
|
||||
color: Green;
|
||||
}
|
||||
.sql-hl-inlinedoc {
|
||||
color: Blue;
|
||||
}
|
||||
.sql-hl-var {
|
||||
color: #000020;
|
||||
}
|
||||
.sql-hl-url {
|
||||
color: Blue;
|
||||
}
|
||||
.sql-hl-special {
|
||||
color: Navy;
|
||||
}
|
||||
.sql-hl-number {
|
||||
color: Maroon;
|
||||
}
|
||||
.sql-hl-inlinetags {
|
||||
color: Blue;
|
||||
}
|
||||
.sql-hl-main {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-weight: normal;
|
||||
}
|
||||
.sql-hl-gutter {
|
||||
background-color: #999999;
|
||||
color: White
|
||||
}
|
||||
.sql-hl-table {
|
||||
font-family: courier;
|
||||
font-size: 12px;
|
||||
border: solid 1px #505050;
|
||||
}
|
||||
|
||||
.source .copycode
|
||||
{
|
||||
text-align: right;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.source .copycode a
|
||||
{
|
||||
cursor: pointer;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.source .copycode_hover a
|
||||
{
|
||||
color: red;
|
||||
}
|
||||
182
framework/vendors/adodb/LICENSE.txt
vendored
Normal file
182
framework/vendors/adodb/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,182 @@
|
||||
ADOdb is dual licensed using BSD and LGPL.
|
||||
|
||||
In plain English, you do not need to distribute your application in source code form, nor do you need to distribute ADOdb source code, provided you follow the rest of terms of the BSD license.
|
||||
|
||||
For more info about ADOdb, visit http://adodb.sourceforge.net/
|
||||
|
||||
BSD Style-License
|
||||
=================
|
||||
|
||||
Copyright (c) 2000, 2001, 2002, 2003, 2004 John Lim
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
of conditions and the following disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
Neither the name of the John Lim nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
DISCLAIMER:
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
JOHN LIM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
==========================================================
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
|
||||
Preamble
|
||||
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
|
||||
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
|
||||
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
|
||||
c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
|
||||
d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
|
||||
(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
|
||||
|
||||
|
||||
a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
|
||||
b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
|
||||
c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
|
||||
d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
|
||||
e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
|
||||
For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
|
||||
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
|
||||
b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
|
||||
8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
22
framework/vendors/bbq/LICENSE.txt
vendored
Normal file
22
framework/vendors/bbq/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
Copyright © 2010 "Cowboy" Ben Alman
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
33
framework/vendors/cldr/LICENSE.txt
vendored
Normal file
33
framework/vendors/cldr/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
Copyright © 1991-2007 Unicode, Inc. All rights reserved. Distributed
|
||||
under the Terms of Use in http://www.unicode.org/copyright.html.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Unicode data files and any associated documentation
|
||||
(the "Data Files") or Unicode software and any associated documentation
|
||||
(the "Software") to deal in the Data Files or Software without
|
||||
restriction, including without limitation the rights to use, copy,
|
||||
modify, merge, publish, distribute, and/or sell copies of the Data
|
||||
Files or Software, and to permit persons to whom the Data Files or
|
||||
Software are furnished to do so, provided that (a) the above copyright
|
||||
notice(s) and this permission notice appear with all copies of the
|
||||
Data Files or Software, (b) both the above copyright notice(s) and
|
||||
this permission notice appear in associated documentation, and (c)
|
||||
there is clear notice in each modified Data File or in the Software
|
||||
as well as in the documentation associated with the Data File(s) or
|
||||
Software that the data or software has been modified.
|
||||
|
||||
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY
|
||||
OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
|
||||
ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
|
||||
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE
|
||||
DATA FILES OR SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of a copyright holder
|
||||
shall not be used in advertising or otherwise to promote the sale,
|
||||
use or other dealings in these Data Files or Software without prior
|
||||
written authorization of the copyright holder.
|
||||
86
framework/vendors/console-normalizer/README.md
vendored
Normal file
86
framework/vendors/console-normalizer/README.md
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
Console Normalizer
|
||||
==================
|
||||
|
||||
IE, oh IE, how we fight... this utility fixes issues with IE's console object so you can use it just like a real console.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
```html
|
||||
<script src="normalizeconsole.min.js"></script>
|
||||
<script>
|
||||
console.group('Play around');
|
||||
console.time('timer');
|
||||
|
||||
console.log('hello'); // does not blow up if IE console is closed
|
||||
|
||||
console.log.apply(console, ['one', 'two', 'three']); // does not cause an Invocation error
|
||||
|
||||
typeof(console.log); // function (some things you shouldn't have to say...)
|
||||
|
||||
console.info();
|
||||
console.warn();
|
||||
console.error();
|
||||
|
||||
console.timeEnd('timer');
|
||||
console.groupEnd();
|
||||
</script>
|
||||
```
|
||||
|
||||
What it fixes
|
||||
-------------
|
||||
|
||||
IE 8 & 9's console objects are a bit... well, it's IE, our favorite stepchild. To be fair, Chrome has a few similar issues which are fixed by this utility as well. Here's a quick summary, with details below:
|
||||
|
||||
* window.console available in IE, even if it is closed
|
||||
* console.log/info/warn/error.apply work in IE and Chrome
|
||||
* console.time and console.timeEnd supported
|
||||
* console.group and console.groupEnd supported
|
||||
* Function.prototype.bind added if it doesn't exist (for IE 8)
|
||||
|
||||
### console is null or not an object
|
||||
|
||||
The `window.console` object is only availble in IE 8/9 when it is opened; this is also true in Chrome.
|
||||
|
||||
### console.group and console.groupEnd
|
||||
|
||||
Implements compatible functions for `group` and `groupEnd`
|
||||
|
||||
### console.time and console.timeEnd
|
||||
|
||||
Implements compatible functions for `time` and `timeEnd`
|
||||
|
||||
### Function.prototype.apply
|
||||
|
||||
Calling `apply` on any of the logging methods (i.e. `console.log.apply(console, arguments)`) breaks with "Object doesn't support this property or method" in IE8 and a Method Invocation Error in IE 9. This is [because it is a "host object" and does not extend Object](http://stackoverflow.com/questions/5538972/console-log-apply-not-working-in-ie9).
|
||||
|
||||
### Function.prototype.bind in IE 8
|
||||
|
||||
As a side effect, this utility also implements a compatible version of Function.prototype.bind for IE 8.
|
||||
|
||||
Compatibility
|
||||
-------------
|
||||
|
||||
Compatible with everything after IE 5.5
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
Clone, modify, and submit pull requests via [GitHub](https://github.com/katowulf/console-normalizer).
|
||||
|
||||
To create the minimized file, use [Dean Edward's packer](http://dean.edwards.name/packer/).
|
||||
|
||||
License
|
||||
-------
|
||||
(The MIT License)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Support
|
||||
-------
|
||||
|
||||
https://github.com/katowulf/console-normalizer
|
||||
1
framework/vendors/console-normalizer/normalizeconsole.min.js
vendored
Normal file
1
framework/vendors/console-normalizer/normalizeconsole.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function(f){f||(f=window.console={log:function(a,b,c,d,e){},info:function(a,b,c,d,e){},warn:function(a,b,c,d,e){},error:function(a,b,c,d,e){}});if(!Function.prototype.bind){Function.prototype.bind=function(a){var b=this,args=Array.prototype.slice.call(arguments,1);return function(){return b.apply(a,Array.prototype.concat.apply(args,arguments))}}}if(typeof(f.log)==='object'){f.log=Function.prototype.call.bind(f.log,f);f.info=Function.prototype.call.bind(f.info,f);f.warn=Function.prototype.call.bind(f.warn,f);f.error=Function.prototype.call.bind(f.error,f)}('group'in f)||(f.group=function(a){f.info("\n------------\n"+a+"\n------------")});('groupEnd'in f)||(f.groupEnd=function(){});('time'in f)||(function(){var c={};f.time=function(a){c[a]=new Date().getTime()};f.timeEnd=function(a){var b=new Date().getTime(),time=(a in c)?b-c[a]:0;f.info(a+': '+time+'ms')}}())})(window.console);
|
||||
22
framework/vendors/gettext/LICENSE.txt
vendored
Normal file
22
framework/vendors/gettext/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
Copyright (c) 2004-2005, Michael Wallner <mike@iworks.at>.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
10
framework/vendors/history/license.txt
vendored
Normal file
10
framework/vendors/history/license.txt
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
Copyright (c) 2011, Benjamin Arthur Lupton
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
• Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
• Neither the name of Benjamin Arthur Lupton nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
17627
framework/vendors/htmlpurifier/HTMLPurifier.standalone.php
vendored
Normal file
17627
framework/vendors/htmlpurifier/HTMLPurifier.standalone.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
504
framework/vendors/htmlpurifier/LICENSE.txt
vendored
Normal file
504
framework/vendors/htmlpurifier/LICENSE.txt
vendored
Normal file
@@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
44
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php
vendored
Normal file
44
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Builder/ConfigSchema.php
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Converts HTMLPurifier_ConfigSchema_Interchange to our runtime
|
||||
* representation used to perform checks on user configuration.
|
||||
*/
|
||||
class HTMLPurifier_ConfigSchema_Builder_ConfigSchema
|
||||
{
|
||||
|
||||
public function build($interchange) {
|
||||
$schema = new HTMLPurifier_ConfigSchema();
|
||||
foreach ($interchange->directives as $d) {
|
||||
$schema->add(
|
||||
$d->id->key,
|
||||
$d->default,
|
||||
$d->type,
|
||||
$d->typeAllowsNull
|
||||
);
|
||||
if ($d->allowed !== null) {
|
||||
$schema->addAllowedValues(
|
||||
$d->id->key,
|
||||
$d->allowed
|
||||
);
|
||||
}
|
||||
foreach ($d->aliases as $alias) {
|
||||
$schema->addAlias(
|
||||
$alias->key,
|
||||
$d->id->key
|
||||
);
|
||||
}
|
||||
if ($d->valueAliases !== null) {
|
||||
$schema->addValueAliases(
|
||||
$d->id->key,
|
||||
$d->valueAliases
|
||||
);
|
||||
}
|
||||
}
|
||||
$schema->postProcess();
|
||||
return $schema;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
106
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Builder/Xml.php
vendored
Normal file
106
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Builder/Xml.php
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Converts HTMLPurifier_ConfigSchema_Interchange to an XML format,
|
||||
* which can be further processed to generate documentation.
|
||||
*/
|
||||
class HTMLPurifier_ConfigSchema_Builder_Xml extends XMLWriter
|
||||
{
|
||||
|
||||
protected $interchange;
|
||||
private $namespace;
|
||||
|
||||
protected function writeHTMLDiv($html) {
|
||||
$this->startElement('div');
|
||||
|
||||
$purifier = HTMLPurifier::getInstance();
|
||||
$html = $purifier->purify($html);
|
||||
$this->writeAttribute('xmlns', 'http://www.w3.org/1999/xhtml');
|
||||
$this->writeRaw($html);
|
||||
|
||||
$this->endElement(); // div
|
||||
}
|
||||
|
||||
protected function export($var) {
|
||||
if ($var === array()) return 'array()';
|
||||
return var_export($var, true);
|
||||
}
|
||||
|
||||
public function build($interchange) {
|
||||
// global access, only use as last resort
|
||||
$this->interchange = $interchange;
|
||||
|
||||
$this->setIndent(true);
|
||||
$this->startDocument('1.0', 'UTF-8');
|
||||
$this->startElement('configdoc');
|
||||
$this->writeElement('title', $interchange->name);
|
||||
|
||||
foreach ($interchange->directives as $directive) {
|
||||
$this->buildDirective($directive);
|
||||
}
|
||||
|
||||
if ($this->namespace) $this->endElement(); // namespace
|
||||
|
||||
$this->endElement(); // configdoc
|
||||
$this->flush();
|
||||
}
|
||||
|
||||
public function buildDirective($directive) {
|
||||
|
||||
// Kludge, although I suppose having a notion of a "root namespace"
|
||||
// certainly makes things look nicer when documentation is built.
|
||||
// Depends on things being sorted.
|
||||
if (!$this->namespace || $this->namespace !== $directive->id->getRootNamespace()) {
|
||||
if ($this->namespace) $this->endElement(); // namespace
|
||||
$this->namespace = $directive->id->getRootNamespace();
|
||||
$this->startElement('namespace');
|
||||
$this->writeAttribute('id', $this->namespace);
|
||||
$this->writeElement('name', $this->namespace);
|
||||
}
|
||||
|
||||
$this->startElement('directive');
|
||||
$this->writeAttribute('id', $directive->id->toString());
|
||||
|
||||
$this->writeElement('name', $directive->id->getDirective());
|
||||
|
||||
$this->startElement('aliases');
|
||||
foreach ($directive->aliases as $alias) $this->writeElement('alias', $alias->toString());
|
||||
$this->endElement(); // aliases
|
||||
|
||||
$this->startElement('constraints');
|
||||
if ($directive->version) $this->writeElement('version', $directive->version);
|
||||
$this->startElement('type');
|
||||
if ($directive->typeAllowsNull) $this->writeAttribute('allow-null', 'yes');
|
||||
$this->text($directive->type);
|
||||
$this->endElement(); // type
|
||||
if ($directive->allowed) {
|
||||
$this->startElement('allowed');
|
||||
foreach ($directive->allowed as $value => $x) $this->writeElement('value', $value);
|
||||
$this->endElement(); // allowed
|
||||
}
|
||||
$this->writeElement('default', $this->export($directive->default));
|
||||
$this->writeAttribute('xml:space', 'preserve');
|
||||
if ($directive->external) {
|
||||
$this->startElement('external');
|
||||
foreach ($directive->external as $project) $this->writeElement('project', $project);
|
||||
$this->endElement();
|
||||
}
|
||||
$this->endElement(); // constraints
|
||||
|
||||
if ($directive->deprecatedVersion) {
|
||||
$this->startElement('deprecated');
|
||||
$this->writeElement('version', $directive->deprecatedVersion);
|
||||
$this->writeElement('use', $directive->deprecatedUse->toString());
|
||||
$this->endElement(); // deprecated
|
||||
}
|
||||
|
||||
$this->startElement('description');
|
||||
$this->writeHTMLDiv($directive->description);
|
||||
$this->endElement(); // description
|
||||
|
||||
$this->endElement(); // directive
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
11
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Exception.php
vendored
Normal file
11
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Exception.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Exceptions related to configuration schema
|
||||
*/
|
||||
class HTMLPurifier_ConfigSchema_Exception extends HTMLPurifier_Exception
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
42
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Interchange.php
vendored
Normal file
42
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Interchange.php
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Generic schema interchange format that can be converted to a runtime
|
||||
* representation (HTMLPurifier_ConfigSchema) or HTML documentation. Members
|
||||
* are completely validated.
|
||||
*/
|
||||
class HTMLPurifier_ConfigSchema_Interchange
|
||||
{
|
||||
|
||||
/**
|
||||
* Name of the application this schema is describing.
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* Array of Directive ID => array(directive info)
|
||||
*/
|
||||
public $directives = array();
|
||||
|
||||
/**
|
||||
* Adds a directive array to $directives
|
||||
*/
|
||||
public function addDirective($directive) {
|
||||
if (isset($this->directives[$i = $directive->id->toString()])) {
|
||||
throw new HTMLPurifier_ConfigSchema_Exception("Cannot redefine directive '$i'");
|
||||
}
|
||||
$this->directives[$i] = $directive;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience function to perform standard validation. Throws exception
|
||||
* on failed validation.
|
||||
*/
|
||||
public function validate() {
|
||||
$validator = new HTMLPurifier_ConfigSchema_Validator();
|
||||
return $validator->validate($this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
77
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Interchange/Directive.php
vendored
Normal file
77
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Interchange/Directive.php
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Interchange component class describing configuration directives.
|
||||
*/
|
||||
class HTMLPurifier_ConfigSchema_Interchange_Directive
|
||||
{
|
||||
|
||||
/**
|
||||
* ID of directive, instance of HTMLPurifier_ConfigSchema_Interchange_Id.
|
||||
*/
|
||||
public $id;
|
||||
|
||||
/**
|
||||
* String type, e.g. 'integer' or 'istring'.
|
||||
*/
|
||||
public $type;
|
||||
|
||||
/**
|
||||
* Default value, e.g. 3 or 'DefaultVal'.
|
||||
*/
|
||||
public $default;
|
||||
|
||||
/**
|
||||
* HTML description.
|
||||
*/
|
||||
public $description;
|
||||
|
||||
/**
|
||||
* Boolean whether or not null is allowed as a value.
|
||||
*/
|
||||
public $typeAllowsNull = false;
|
||||
|
||||
/**
|
||||
* Lookup table of allowed scalar values, e.g. array('allowed' => true).
|
||||
* Null if all values are allowed.
|
||||
*/
|
||||
public $allowed;
|
||||
|
||||
/**
|
||||
* List of aliases for the directive,
|
||||
* e.g. array(new HTMLPurifier_ConfigSchema_Interchange_Id('Ns', 'Dir'))).
|
||||
*/
|
||||
public $aliases = array();
|
||||
|
||||
/**
|
||||
* Hash of value aliases, e.g. array('alt' => 'real'). Null if value
|
||||
* aliasing is disabled (necessary for non-scalar types).
|
||||
*/
|
||||
public $valueAliases;
|
||||
|
||||
/**
|
||||
* Version of HTML Purifier the directive was introduced, e.g. '1.3.1'.
|
||||
* Null if the directive has always existed.
|
||||
*/
|
||||
public $version;
|
||||
|
||||
/**
|
||||
* ID of directive that supercedes this old directive, is an instance
|
||||
* of HTMLPurifier_ConfigSchema_Interchange_Id. Null if not deprecated.
|
||||
*/
|
||||
public $deprecatedUse;
|
||||
|
||||
/**
|
||||
* Version of HTML Purifier this directive was deprecated. Null if not
|
||||
* deprecated.
|
||||
*/
|
||||
public $deprecatedVersion;
|
||||
|
||||
/**
|
||||
* List of external projects this directive depends on, e.g. array('CSSTidy').
|
||||
*/
|
||||
public $external = array();
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
37
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Interchange/Id.php
vendored
Normal file
37
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Interchange/Id.php
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Represents a directive ID in the interchange format.
|
||||
*/
|
||||
class HTMLPurifier_ConfigSchema_Interchange_Id
|
||||
{
|
||||
|
||||
public $key;
|
||||
|
||||
public function __construct($key) {
|
||||
$this->key = $key;
|
||||
}
|
||||
|
||||
/**
|
||||
* @warning This is NOT magic, to ensure that people don't abuse SPL and
|
||||
* cause problems for PHP 5.0 support.
|
||||
*/
|
||||
public function toString() {
|
||||
return $this->key;
|
||||
}
|
||||
|
||||
public function getRootNamespace() {
|
||||
return substr($this->key, 0, strpos($this->key, "."));
|
||||
}
|
||||
|
||||
public function getDirective() {
|
||||
return substr($this->key, strpos($this->key, ".") + 1);
|
||||
}
|
||||
|
||||
public static function make($id) {
|
||||
return new HTMLPurifier_ConfigSchema_Interchange_Id($id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
180
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/InterchangeBuilder.php
vendored
Normal file
180
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/InterchangeBuilder.php
vendored
Normal file
@@ -0,0 +1,180 @@
|
||||
<?php
|
||||
|
||||
class HTMLPurifier_ConfigSchema_InterchangeBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* Used for processing DEFAULT, nothing else.
|
||||
*/
|
||||
protected $varParser;
|
||||
|
||||
public function __construct($varParser = null) {
|
||||
$this->varParser = $varParser ? $varParser : new HTMLPurifier_VarParser_Native();
|
||||
}
|
||||
|
||||
public static function buildFromDirectory($dir = null) {
|
||||
$builder = new HTMLPurifier_ConfigSchema_InterchangeBuilder();
|
||||
$interchange = new HTMLPurifier_ConfigSchema_Interchange();
|
||||
return $builder->buildDir($interchange, $dir);
|
||||
}
|
||||
|
||||
public function buildDir($interchange, $dir = null) {
|
||||
if (!$dir) $dir = HTMLPURIFIER_PREFIX . '/HTMLPurifier/ConfigSchema/schema';
|
||||
if (file_exists($dir . '/info.ini')) {
|
||||
$info = parse_ini_file($dir . '/info.ini');
|
||||
$interchange->name = $info['name'];
|
||||
}
|
||||
|
||||
$files = array();
|
||||
$dh = opendir($dir);
|
||||
while (false !== ($file = readdir($dh))) {
|
||||
if (!$file || $file[0] == '.' || strrchr($file, '.') !== '.txt') {
|
||||
continue;
|
||||
}
|
||||
$files[] = $file;
|
||||
}
|
||||
closedir($dh);
|
||||
|
||||
sort($files);
|
||||
foreach ($files as $file) {
|
||||
$this->buildFile($interchange, $dir . '/' . $file);
|
||||
}
|
||||
|
||||
return $interchange;
|
||||
}
|
||||
|
||||
public function buildFile($interchange, $file) {
|
||||
$parser = new HTMLPurifier_StringHashParser();
|
||||
$this->build(
|
||||
$interchange,
|
||||
new HTMLPurifier_StringHash( $parser->parseFile($file) )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds an interchange object based on a hash.
|
||||
* @param $interchange HTMLPurifier_ConfigSchema_Interchange object to build
|
||||
* @param $hash HTMLPurifier_ConfigSchema_StringHash source data
|
||||
*/
|
||||
public function build($interchange, $hash) {
|
||||
if (!$hash instanceof HTMLPurifier_StringHash) {
|
||||
$hash = new HTMLPurifier_StringHash($hash);
|
||||
}
|
||||
if (!isset($hash['ID'])) {
|
||||
throw new HTMLPurifier_ConfigSchema_Exception('Hash does not have any ID');
|
||||
}
|
||||
if (strpos($hash['ID'], '.') === false) {
|
||||
if (count($hash) == 2 && isset($hash['DESCRIPTION'])) {
|
||||
$hash->offsetGet('DESCRIPTION'); // prevent complaining
|
||||
} else {
|
||||
throw new HTMLPurifier_ConfigSchema_Exception('All directives must have a namespace');
|
||||
}
|
||||
} else {
|
||||
$this->buildDirective($interchange, $hash);
|
||||
}
|
||||
$this->_findUnused($hash);
|
||||
}
|
||||
|
||||
public function buildDirective($interchange, $hash) {
|
||||
$directive = new HTMLPurifier_ConfigSchema_Interchange_Directive();
|
||||
|
||||
// These are required elements:
|
||||
$directive->id = $this->id($hash->offsetGet('ID'));
|
||||
$id = $directive->id->toString(); // convenience
|
||||
|
||||
if (isset($hash['TYPE'])) {
|
||||
$type = explode('/', $hash->offsetGet('TYPE'));
|
||||
if (isset($type[1])) $directive->typeAllowsNull = true;
|
||||
$directive->type = $type[0];
|
||||
} else {
|
||||
throw new HTMLPurifier_ConfigSchema_Exception("TYPE in directive hash '$id' not defined");
|
||||
}
|
||||
|
||||
if (isset($hash['DEFAULT'])) {
|
||||
try {
|
||||
$directive->default = $this->varParser->parse($hash->offsetGet('DEFAULT'), $directive->type, $directive->typeAllowsNull);
|
||||
} catch (HTMLPurifier_VarParserException $e) {
|
||||
throw new HTMLPurifier_ConfigSchema_Exception($e->getMessage() . " in DEFAULT in directive hash '$id'");
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($hash['DESCRIPTION'])) {
|
||||
$directive->description = $hash->offsetGet('DESCRIPTION');
|
||||
}
|
||||
|
||||
if (isset($hash['ALLOWED'])) {
|
||||
$directive->allowed = $this->lookup($this->evalArray($hash->offsetGet('ALLOWED')));
|
||||
}
|
||||
|
||||
if (isset($hash['VALUE-ALIASES'])) {
|
||||
$directive->valueAliases = $this->evalArray($hash->offsetGet('VALUE-ALIASES'));
|
||||
}
|
||||
|
||||
if (isset($hash['ALIASES'])) {
|
||||
$raw_aliases = trim($hash->offsetGet('ALIASES'));
|
||||
$aliases = preg_split('/\s*,\s*/', $raw_aliases);
|
||||
foreach ($aliases as $alias) {
|
||||
$directive->aliases[] = $this->id($alias);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($hash['VERSION'])) {
|
||||
$directive->version = $hash->offsetGet('VERSION');
|
||||
}
|
||||
|
||||
if (isset($hash['DEPRECATED-USE'])) {
|
||||
$directive->deprecatedUse = $this->id($hash->offsetGet('DEPRECATED-USE'));
|
||||
}
|
||||
|
||||
if (isset($hash['DEPRECATED-VERSION'])) {
|
||||
$directive->deprecatedVersion = $hash->offsetGet('DEPRECATED-VERSION');
|
||||
}
|
||||
|
||||
if (isset($hash['EXTERNAL'])) {
|
||||
$directive->external = preg_split('/\s*,\s*/', trim($hash->offsetGet('EXTERNAL')));
|
||||
}
|
||||
|
||||
$interchange->addDirective($directive);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates an array PHP code string without array() wrapper
|
||||
*/
|
||||
protected function evalArray($contents) {
|
||||
return eval('return array('. $contents .');');
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts an array list into a lookup array.
|
||||
*/
|
||||
protected function lookup($array) {
|
||||
$ret = array();
|
||||
foreach ($array as $val) $ret[$val] = true;
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience function that creates an HTMLPurifier_ConfigSchema_Interchange_Id
|
||||
* object based on a string Id.
|
||||
*/
|
||||
protected function id($id) {
|
||||
return HTMLPurifier_ConfigSchema_Interchange_Id::make($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers errors for any unused keys passed in the hash; such keys
|
||||
* may indicate typos, missing values, etc.
|
||||
* @param $hash Instance of ConfigSchema_StringHash to check.
|
||||
*/
|
||||
protected function _findUnused($hash) {
|
||||
$accessed = $hash->getAccessed();
|
||||
foreach ($hash as $k => $v) {
|
||||
if (!isset($accessed[$k])) {
|
||||
trigger_error("String hash key '$k' not used by builder", E_USER_NOTICE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
206
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Validator.php
vendored
Normal file
206
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/Validator.php
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Performs validations on HTMLPurifier_ConfigSchema_Interchange
|
||||
*
|
||||
* @note If you see '// handled by InterchangeBuilder', that means a
|
||||
* design decision in that class would prevent this validation from
|
||||
* ever being necessary. We have them anyway, however, for
|
||||
* redundancy.
|
||||
*/
|
||||
class HTMLPurifier_ConfigSchema_Validator
|
||||
{
|
||||
|
||||
/**
|
||||
* Easy to access global objects.
|
||||
*/
|
||||
protected $interchange, $aliases;
|
||||
|
||||
/**
|
||||
* Context-stack to provide easy to read error messages.
|
||||
*/
|
||||
protected $context = array();
|
||||
|
||||
/**
|
||||
* HTMLPurifier_VarParser to test default's type.
|
||||
*/
|
||||
protected $parser;
|
||||
|
||||
public function __construct() {
|
||||
$this->parser = new HTMLPurifier_VarParser();
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates a fully-formed interchange object. Throws an
|
||||
* HTMLPurifier_ConfigSchema_Exception if there's a problem.
|
||||
*/
|
||||
public function validate($interchange) {
|
||||
$this->interchange = $interchange;
|
||||
$this->aliases = array();
|
||||
// PHP is a bit lax with integer <=> string conversions in
|
||||
// arrays, so we don't use the identical !== comparison
|
||||
foreach ($interchange->directives as $i => $directive) {
|
||||
$id = $directive->id->toString();
|
||||
if ($i != $id) $this->error(false, "Integrity violation: key '$i' does not match internal id '$id'");
|
||||
$this->validateDirective($directive);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates a HTMLPurifier_ConfigSchema_Interchange_Id object.
|
||||
*/
|
||||
public function validateId($id) {
|
||||
$id_string = $id->toString();
|
||||
$this->context[] = "id '$id_string'";
|
||||
if (!$id instanceof HTMLPurifier_ConfigSchema_Interchange_Id) {
|
||||
// handled by InterchangeBuilder
|
||||
$this->error(false, 'is not an instance of HTMLPurifier_ConfigSchema_Interchange_Id');
|
||||
}
|
||||
// keys are now unconstrained (we might want to narrow down to A-Za-z0-9.)
|
||||
// we probably should check that it has at least one namespace
|
||||
$this->with($id, 'key')
|
||||
->assertNotEmpty()
|
||||
->assertIsString(); // implicit assertIsString handled by InterchangeBuilder
|
||||
array_pop($this->context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates a HTMLPurifier_ConfigSchema_Interchange_Directive object.
|
||||
*/
|
||||
public function validateDirective($d) {
|
||||
$id = $d->id->toString();
|
||||
$this->context[] = "directive '$id'";
|
||||
$this->validateId($d->id);
|
||||
|
||||
$this->with($d, 'description')
|
||||
->assertNotEmpty();
|
||||
|
||||
// BEGIN - handled by InterchangeBuilder
|
||||
$this->with($d, 'type')
|
||||
->assertNotEmpty();
|
||||
$this->with($d, 'typeAllowsNull')
|
||||
->assertIsBool();
|
||||
try {
|
||||
// This also tests validity of $d->type
|
||||
$this->parser->parse($d->default, $d->type, $d->typeAllowsNull);
|
||||
} catch (HTMLPurifier_VarParserException $e) {
|
||||
$this->error('default', 'had error: ' . $e->getMessage());
|
||||
}
|
||||
// END - handled by InterchangeBuilder
|
||||
|
||||
if (!is_null($d->allowed) || !empty($d->valueAliases)) {
|
||||
// allowed and valueAliases require that we be dealing with
|
||||
// strings, so check for that early.
|
||||
$d_int = HTMLPurifier_VarParser::$types[$d->type];
|
||||
if (!isset(HTMLPurifier_VarParser::$stringTypes[$d_int])) {
|
||||
$this->error('type', 'must be a string type when used with allowed or value aliases');
|
||||
}
|
||||
}
|
||||
|
||||
$this->validateDirectiveAllowed($d);
|
||||
$this->validateDirectiveValueAliases($d);
|
||||
$this->validateDirectiveAliases($d);
|
||||
|
||||
array_pop($this->context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extra validation if $allowed member variable of
|
||||
* HTMLPurifier_ConfigSchema_Interchange_Directive is defined.
|
||||
*/
|
||||
public function validateDirectiveAllowed($d) {
|
||||
if (is_null($d->allowed)) return;
|
||||
$this->with($d, 'allowed')
|
||||
->assertNotEmpty()
|
||||
->assertIsLookup(); // handled by InterchangeBuilder
|
||||
if (is_string($d->default) && !isset($d->allowed[$d->default])) {
|
||||
$this->error('default', 'must be an allowed value');
|
||||
}
|
||||
$this->context[] = 'allowed';
|
||||
foreach ($d->allowed as $val => $x) {
|
||||
if (!is_string($val)) $this->error("value $val", 'must be a string');
|
||||
}
|
||||
array_pop($this->context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extra validation if $valueAliases member variable of
|
||||
* HTMLPurifier_ConfigSchema_Interchange_Directive is defined.
|
||||
*/
|
||||
public function validateDirectiveValueAliases($d) {
|
||||
if (is_null($d->valueAliases)) return;
|
||||
$this->with($d, 'valueAliases')
|
||||
->assertIsArray(); // handled by InterchangeBuilder
|
||||
$this->context[] = 'valueAliases';
|
||||
foreach ($d->valueAliases as $alias => $real) {
|
||||
if (!is_string($alias)) $this->error("alias $alias", 'must be a string');
|
||||
if (!is_string($real)) $this->error("alias target $real from alias '$alias'", 'must be a string');
|
||||
if ($alias === $real) {
|
||||
$this->error("alias '$alias'", "must not be an alias to itself");
|
||||
}
|
||||
}
|
||||
if (!is_null($d->allowed)) {
|
||||
foreach ($d->valueAliases as $alias => $real) {
|
||||
if (isset($d->allowed[$alias])) {
|
||||
$this->error("alias '$alias'", 'must not be an allowed value');
|
||||
} elseif (!isset($d->allowed[$real])) {
|
||||
$this->error("alias '$alias'", 'must be an alias to an allowed value');
|
||||
}
|
||||
}
|
||||
}
|
||||
array_pop($this->context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extra validation if $aliases member variable of
|
||||
* HTMLPurifier_ConfigSchema_Interchange_Directive is defined.
|
||||
*/
|
||||
public function validateDirectiveAliases($d) {
|
||||
$this->with($d, 'aliases')
|
||||
->assertIsArray(); // handled by InterchangeBuilder
|
||||
$this->context[] = 'aliases';
|
||||
foreach ($d->aliases as $alias) {
|
||||
$this->validateId($alias);
|
||||
$s = $alias->toString();
|
||||
if (isset($this->interchange->directives[$s])) {
|
||||
$this->error("alias '$s'", 'collides with another directive');
|
||||
}
|
||||
if (isset($this->aliases[$s])) {
|
||||
$other_directive = $this->aliases[$s];
|
||||
$this->error("alias '$s'", "collides with alias for directive '$other_directive'");
|
||||
}
|
||||
$this->aliases[$s] = $d->id->toString();
|
||||
}
|
||||
array_pop($this->context);
|
||||
}
|
||||
|
||||
// protected helper functions
|
||||
|
||||
/**
|
||||
* Convenience function for generating HTMLPurifier_ConfigSchema_ValidatorAtom
|
||||
* for validating simple member variables of objects.
|
||||
*/
|
||||
protected function with($obj, $member) {
|
||||
return new HTMLPurifier_ConfigSchema_ValidatorAtom($this->getFormattedContext(), $obj, $member);
|
||||
}
|
||||
|
||||
/**
|
||||
* Emits an error, providing helpful context.
|
||||
*/
|
||||
protected function error($target, $msg) {
|
||||
if ($target !== false) $prefix = ucfirst($target) . ' in ' . $this->getFormattedContext();
|
||||
else $prefix = ucfirst($this->getFormattedContext());
|
||||
throw new HTMLPurifier_ConfigSchema_Exception(trim($prefix . ' ' . $msg));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a formatted context string.
|
||||
*/
|
||||
protected function getFormattedContext() {
|
||||
return implode(' in ', array_reverse($this->context));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
66
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/ValidatorAtom.php
vendored
Normal file
66
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/ValidatorAtom.php
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Fluent interface for validating the contents of member variables.
|
||||
* This should be immutable. See HTMLPurifier_ConfigSchema_Validator for
|
||||
* use-cases. We name this an 'atom' because it's ONLY for validations that
|
||||
* are independent and usually scalar.
|
||||
*/
|
||||
class HTMLPurifier_ConfigSchema_ValidatorAtom
|
||||
{
|
||||
|
||||
protected $context, $obj, $member, $contents;
|
||||
|
||||
public function __construct($context, $obj, $member) {
|
||||
$this->context = $context;
|
||||
$this->obj = $obj;
|
||||
$this->member = $member;
|
||||
$this->contents =& $obj->$member;
|
||||
}
|
||||
|
||||
public function assertIsString() {
|
||||
if (!is_string($this->contents)) $this->error('must be a string');
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function assertIsBool() {
|
||||
if (!is_bool($this->contents)) $this->error('must be a boolean');
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function assertIsArray() {
|
||||
if (!is_array($this->contents)) $this->error('must be an array');
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function assertNotNull() {
|
||||
if ($this->contents === null) $this->error('must not be null');
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function assertAlnum() {
|
||||
$this->assertIsString();
|
||||
if (!ctype_alnum($this->contents)) $this->error('must be alphanumeric');
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function assertNotEmpty() {
|
||||
if (empty($this->contents)) $this->error('must not be empty');
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function assertIsLookup() {
|
||||
$this->assertIsArray();
|
||||
foreach ($this->contents as $v) {
|
||||
if ($v !== true) $this->error('must be a lookup array');
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function error($msg) {
|
||||
throw new HTMLPurifier_ConfigSchema_Exception(ucfirst($this->member) . ' in ' . $this->context . ' ' . $msg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
BIN
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/schema.ser
vendored
Normal file
BIN
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/schema.ser
vendored
Normal file
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
Attr.AllowedClasses
|
||||
TYPE: lookup/null
|
||||
VERSION: 4.0.0
|
||||
DEFAULT: null
|
||||
--DESCRIPTION--
|
||||
List of allowed class values in the class attribute. By default, this is null,
|
||||
which means all classes are allowed.
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,12 @@
|
||||
Attr.AllowedFrameTargets
|
||||
TYPE: lookup
|
||||
DEFAULT: array()
|
||||
--DESCRIPTION--
|
||||
Lookup table of all allowed link frame targets. Some commonly used link
|
||||
targets include _blank, _self, _parent and _top. Values should be
|
||||
lowercase, as validation will be done in a case-sensitive manner despite
|
||||
W3C's recommendation. XHTML 1.0 Strict does not permit the target attribute
|
||||
so this directive will have no effect in that doctype. XHTML 1.1 does not
|
||||
enable the Target module by default, you will have to manually enable it
|
||||
(see the module documentation for more details.)
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,9 @@
|
||||
Attr.AllowedRel
|
||||
TYPE: lookup
|
||||
VERSION: 1.6.0
|
||||
DEFAULT: array()
|
||||
--DESCRIPTION--
|
||||
List of allowed forward document relationships in the rel attribute. Common
|
||||
values may be nofollow or print. By default, this is empty, meaning that no
|
||||
document relationships are allowed.
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,9 @@
|
||||
Attr.AllowedRev
|
||||
TYPE: lookup
|
||||
VERSION: 1.6.0
|
||||
DEFAULT: array()
|
||||
--DESCRIPTION--
|
||||
List of allowed reverse document relationships in the rev attribute. This
|
||||
attribute is a bit of an edge-case; if you don't know what it is for, stay
|
||||
away.
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,19 @@
|
||||
Attr.ClassUseCDATA
|
||||
TYPE: bool/null
|
||||
DEFAULT: null
|
||||
VERSION: 4.0.0
|
||||
--DESCRIPTION--
|
||||
If null, class will auto-detect the doctype and, if matching XHTML 1.1 or
|
||||
XHTML 2.0, will use the restrictive NMTOKENS specification of class. Otherwise,
|
||||
it will use a relaxed CDATA definition. If true, the relaxed CDATA definition
|
||||
is forced; if false, the NMTOKENS definition is forced. To get behavior
|
||||
of HTML Purifier prior to 4.0.0, set this directive to false.
|
||||
|
||||
Some rational behind the auto-detection:
|
||||
in previous versions of HTML Purifier, it was assumed that the form of
|
||||
class was NMTOKENS, as specified by the XHTML Modularization (representing
|
||||
XHTML 1.1 and XHTML 2.0). The DTDs for HTML 4.01 and XHTML 1.0, however
|
||||
specify class as CDATA. HTML 5 effectively defines it as CDATA, but
|
||||
with the additional constraint that each name should be unique (this is not
|
||||
explicitly outlined in previous specifications).
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,11 @@
|
||||
Attr.DefaultImageAlt
|
||||
TYPE: string/null
|
||||
DEFAULT: null
|
||||
VERSION: 3.2.0
|
||||
--DESCRIPTION--
|
||||
This is the content of the alt tag of an image if the user had not
|
||||
previously specified an alt attribute. This applies to all images without
|
||||
a valid alt attribute, as opposed to %Attr.DefaultInvalidImageAlt, which
|
||||
only applies to invalid images, and overrides in the case of an invalid image.
|
||||
Default behavior with null is to use the basename of the src tag for the alt.
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,9 @@
|
||||
Attr.DefaultInvalidImage
|
||||
TYPE: string
|
||||
DEFAULT: ''
|
||||
--DESCRIPTION--
|
||||
This is the default image an img tag will be pointed to if it does not have
|
||||
a valid src attribute. In future versions, we may allow the image tag to
|
||||
be removed completely, but due to design issues, this is not possible right
|
||||
now.
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,8 @@
|
||||
Attr.DefaultInvalidImageAlt
|
||||
TYPE: string
|
||||
DEFAULT: 'Invalid image'
|
||||
--DESCRIPTION--
|
||||
This is the content of the alt tag of an invalid image if the user had not
|
||||
previously specified an alt attribute. It has no effect when the image is
|
||||
valid but there was no alt attribute present.
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,10 @@
|
||||
Attr.DefaultTextDir
|
||||
TYPE: string
|
||||
DEFAULT: 'ltr'
|
||||
--DESCRIPTION--
|
||||
Defines the default text direction (ltr or rtl) of the document being
|
||||
parsed. This generally is the same as the value of the dir attribute in
|
||||
HTML, or ltr if that is not specified.
|
||||
--ALLOWED--
|
||||
'ltr', 'rtl'
|
||||
--# vim: et sw=4 sts=4
|
||||
16
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt
vendored
Normal file
16
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/schema/Attr.EnableID.txt
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
Attr.EnableID
|
||||
TYPE: bool
|
||||
DEFAULT: false
|
||||
VERSION: 1.2.0
|
||||
--DESCRIPTION--
|
||||
Allows the ID attribute in HTML. This is disabled by default due to the
|
||||
fact that without proper configuration user input can easily break the
|
||||
validation of a webpage by specifying an ID that is already on the
|
||||
surrounding HTML. If you don't mind throwing caution to the wind, enable
|
||||
this directive, but I strongly recommend you also consider blacklisting IDs
|
||||
you use (%Attr.IDBlacklist) or prefixing all user supplied IDs
|
||||
(%Attr.IDPrefix). When set to true HTML Purifier reverts to the behavior of
|
||||
pre-1.2.0 versions.
|
||||
--ALIASES--
|
||||
HTML.EnableAttrID
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,8 @@
|
||||
Attr.ForbiddenClasses
|
||||
TYPE: lookup
|
||||
VERSION: 4.0.0
|
||||
DEFAULT: array()
|
||||
--DESCRIPTION--
|
||||
List of forbidden class values in the class attribute. By default, this is
|
||||
empty, which means that no classes are forbidden. See also %Attr.AllowedClasses.
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,5 @@
|
||||
Attr.IDBlacklist
|
||||
TYPE: list
|
||||
DEFAULT: array()
|
||||
DESCRIPTION: Array of IDs not allowed in the document.
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,9 @@
|
||||
Attr.IDBlacklistRegexp
|
||||
TYPE: string/null
|
||||
VERSION: 1.6.0
|
||||
DEFAULT: NULL
|
||||
--DESCRIPTION--
|
||||
PCRE regular expression to be matched against all IDs. If the expression is
|
||||
matches, the ID is rejected. Use this with care: may cause significant
|
||||
degradation. ID matching is done after all other validation.
|
||||
--# vim: et sw=4 sts=4
|
||||
12
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt
vendored
Normal file
12
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/schema/Attr.IDPrefix.txt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
Attr.IDPrefix
|
||||
TYPE: string
|
||||
VERSION: 1.2.0
|
||||
DEFAULT: ''
|
||||
--DESCRIPTION--
|
||||
String to prefix to IDs. If you have no idea what IDs your pages may use,
|
||||
you may opt to simply add a prefix to all user-submitted ID attributes so
|
||||
that they are still usable, but will not conflict with core page IDs.
|
||||
Example: setting the directive to 'user_' will result in a user submitted
|
||||
'foo' to become 'user_foo' Be sure to set %HTML.EnableAttrID to true
|
||||
before using this.
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,14 @@
|
||||
Attr.IDPrefixLocal
|
||||
TYPE: string
|
||||
VERSION: 1.2.0
|
||||
DEFAULT: ''
|
||||
--DESCRIPTION--
|
||||
Temporary prefix for IDs used in conjunction with %Attr.IDPrefix. If you
|
||||
need to allow multiple sets of user content on web page, you may need to
|
||||
have a seperate prefix that changes with each iteration. This way,
|
||||
seperately submitted user content displayed on the same page doesn't
|
||||
clobber each other. Ideal values are unique identifiers for the content it
|
||||
represents (i.e. the id of the row in the database). Be sure to add a
|
||||
seperator (like an underscore) at the end. Warning: this directive will
|
||||
not work unless %Attr.IDPrefix is set to a non-empty value!
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,31 @@
|
||||
AutoFormat.AutoParagraph
|
||||
TYPE: bool
|
||||
VERSION: 2.0.1
|
||||
DEFAULT: false
|
||||
--DESCRIPTION--
|
||||
|
||||
<p>
|
||||
This directive turns on auto-paragraphing, where double newlines are
|
||||
converted in to paragraphs whenever possible. Auto-paragraphing:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Always applies to inline elements or text in the root node,</li>
|
||||
<li>Applies to inline elements or text with double newlines in nodes
|
||||
that allow paragraph tags,</li>
|
||||
<li>Applies to double newlines in paragraph tags</li>
|
||||
</ul>
|
||||
<p>
|
||||
<code>p</code> tags must be allowed for this directive to take effect.
|
||||
We do not use <code>br</code> tags for paragraphing, as that is
|
||||
semantically incorrect.
|
||||
</p>
|
||||
<p>
|
||||
To prevent auto-paragraphing as a content-producer, refrain from using
|
||||
double-newlines except to specify a new paragraph or in contexts where
|
||||
it has special meaning (whitespace usually has no meaning except in
|
||||
tags like <code>pre</code>, so this should not be difficult.) To prevent
|
||||
the paragraphing of inline text adjacent to block elements, wrap them
|
||||
in <code>div</code> tags (the behavior is slightly different outside of
|
||||
the root node.)
|
||||
</p>
|
||||
--# vim: et sw=4 sts=4
|
||||
12
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt
vendored
Normal file
12
framework/vendors/htmlpurifier/standalone/HTMLPurifier/ConfigSchema/schema/AutoFormat.Custom.txt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
AutoFormat.Custom
|
||||
TYPE: list
|
||||
VERSION: 2.0.1
|
||||
DEFAULT: array()
|
||||
--DESCRIPTION--
|
||||
|
||||
<p>
|
||||
This directive can be used to add custom auto-format injectors.
|
||||
Specify an array of injector names (class name minus the prefix)
|
||||
or concrete implementations. Injector class must exist.
|
||||
</p>
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,11 @@
|
||||
AutoFormat.DisplayLinkURI
|
||||
TYPE: bool
|
||||
VERSION: 3.2.0
|
||||
DEFAULT: false
|
||||
--DESCRIPTION--
|
||||
<p>
|
||||
This directive turns on the in-text display of URIs in <a> tags, and disables
|
||||
those links. For example, <a href="http://example.com">example</a> becomes
|
||||
example (<a>http://example.com</a>).
|
||||
</p>
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,12 @@
|
||||
AutoFormat.Linkify
|
||||
TYPE: bool
|
||||
VERSION: 2.0.1
|
||||
DEFAULT: false
|
||||
--DESCRIPTION--
|
||||
|
||||
<p>
|
||||
This directive turns on linkification, auto-linking http, ftp and
|
||||
https URLs. <code>a</code> tags with the <code>href</code> attribute
|
||||
must be allowed.
|
||||
</p>
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,12 @@
|
||||
AutoFormat.PurifierLinkify.DocURL
|
||||
TYPE: string
|
||||
VERSION: 2.0.1
|
||||
DEFAULT: '#%s'
|
||||
ALIASES: AutoFormatParam.PurifierLinkifyDocURL
|
||||
--DESCRIPTION--
|
||||
<p>
|
||||
Location of configuration documentation to link to, let %s substitute
|
||||
into the configuration's namespace and directive names sans the percent
|
||||
sign.
|
||||
</p>
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,12 @@
|
||||
AutoFormat.PurifierLinkify
|
||||
TYPE: bool
|
||||
VERSION: 2.0.1
|
||||
DEFAULT: false
|
||||
--DESCRIPTION--
|
||||
|
||||
<p>
|
||||
Internal auto-formatter that converts configuration directives in
|
||||
syntax <a>%Namespace.Directive</a> to links. <code>a</code> tags
|
||||
with the <code>href</code> attribute must be allowed.
|
||||
</p>
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,11 @@
|
||||
AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions
|
||||
TYPE: lookup
|
||||
VERSION: 4.0.0
|
||||
DEFAULT: array('td' => true, 'th' => true)
|
||||
--DESCRIPTION--
|
||||
<p>
|
||||
When %AutoFormat.RemoveEmpty and %AutoFormat.RemoveEmpty.RemoveNbsp
|
||||
are enabled, this directive defines what HTML elements should not be
|
||||
removede if they have only a non-breaking space in them.
|
||||
</p>
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,15 @@
|
||||
AutoFormat.RemoveEmpty.RemoveNbsp
|
||||
TYPE: bool
|
||||
VERSION: 4.0.0
|
||||
DEFAULT: false
|
||||
--DESCRIPTION--
|
||||
<p>
|
||||
When enabled, HTML Purifier will treat any elements that contain only
|
||||
non-breaking spaces as well as regular whitespace as empty, and remove
|
||||
them when %AutoForamt.RemoveEmpty is enabled.
|
||||
</p>
|
||||
<p>
|
||||
See %AutoFormat.RemoveEmpty.RemoveNbsp.Exceptions for a list of elements
|
||||
that don't have this behavior applied to them.
|
||||
</p>
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,46 @@
|
||||
AutoFormat.RemoveEmpty
|
||||
TYPE: bool
|
||||
VERSION: 3.2.0
|
||||
DEFAULT: false
|
||||
--DESCRIPTION--
|
||||
<p>
|
||||
When enabled, HTML Purifier will attempt to remove empty elements that
|
||||
contribute no semantic information to the document. The following types
|
||||
of nodes will be removed:
|
||||
</p>
|
||||
<ul><li>
|
||||
Tags with no attributes and no content, and that are not empty
|
||||
elements (remove <code><a></a></code> but not
|
||||
<code><br /></code>), and
|
||||
</li>
|
||||
<li>
|
||||
Tags with no content, except for:<ul>
|
||||
<li>The <code>colgroup</code> element, or</li>
|
||||
<li>
|
||||
Elements with the <code>id</code> or <code>name</code> attribute,
|
||||
when those attributes are permitted on those elements.
|
||||
</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<p>
|
||||
Please be very careful when using this functionality; while it may not
|
||||
seem that empty elements contain useful information, they can alter the
|
||||
layout of a document given appropriate styling. This directive is most
|
||||
useful when you are processing machine-generated HTML, please avoid using
|
||||
it on regular user HTML.
|
||||
</p>
|
||||
<p>
|
||||
Elements that contain only whitespace will be treated as empty. Non-breaking
|
||||
spaces, however, do not count as whitespace. See
|
||||
%AutoFormat.RemoveEmpty.RemoveNbsp for alternate behavior.
|
||||
</p>
|
||||
<p>
|
||||
This algorithm is not perfect; you may still notice some empty tags,
|
||||
particularly if a node had elements, but those elements were later removed
|
||||
because they were not permitted in that context, or tags that, after
|
||||
being auto-closed by another tag, where empty. This is for safety reasons
|
||||
to prevent clever code from breaking validation. The general rule of thumb:
|
||||
if a tag looked empty on the way in, it will get removed; if HTML Purifier
|
||||
made it empty, it will stay.
|
||||
</p>
|
||||
--# vim: et sw=4 sts=4
|
||||
@@ -0,0 +1,11 @@
|
||||
AutoFormat.RemoveSpansWithoutAttributes
|
||||
TYPE: bool
|
||||
VERSION: 4.0.1
|
||||
DEFAULT: false
|
||||
--DESCRIPTION--
|
||||
<p>
|
||||
This directive causes <code>span</code> tags without any attributes
|
||||
to be removed. It will also remove spans that had all attributes
|
||||
removed during processing.
|
||||
</p>
|
||||
--# vim: et sw=4 sts=4
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user