Advertisement
kajacx

PRPL highliter 1.0.1

Sep 23rd, 2017
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.46 KB | None | 0 0
  1. <?php
  2. /*************************************************************************************
  3.  * prpl.php
  4.  * --------
  5.  * Author: Karel Hrkal (kajacx@gmail.com)
  6.  * Release Version: 1.0.1
  7.  * Date Started: 2017/09/01
  8.  *
  9.  * PRPL language file for GeSHi.
  10.  *
  11.  * CHANGES
  12.  * -------
  13.  * 2017/09/01 (1.0.0)
  14.  *  -  First Release
  15.  * 2017/09/23 (1.0.1)
  16.  *  -  Added numbers to variable and function names
  17.  *
  18.  * -------------------------
  19.  *
  20.  *************************************************************************************
  21.  *
  22.  *     This file is part of GeSHi.
  23.  *
  24.  *   GeSHi is free software; you can redistribute it and/or modify
  25.  *   it under the terms of the GNU General Public License as published by
  26.  *   the Free Software Foundation; either version 2 of the License, or
  27.  *   (at your option) any later version.
  28.  *
  29.  *   GeSHi is distributed in the hope that it will be useful,
  30.  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  31.  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  32.  *   GNU General Public License for more details.
  33.  *
  34.  *   You should have received a copy of the GNU General Public License
  35.  *   along with GeSHi; if not, write to the Free Software
  36.  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  37.  *
  38.  ************************************************************************************/
  39.  
  40. $language_data = array (
  41.     'LANG_NAME' => 'PRPL',
  42.     'COMMENT_SINGLE' => array(1 => '#'),
  43.     //'COMMENT_MULTI' => array('/*' => '*/'),
  44.     'QUOTEMARKS' => array("\""),
  45.     'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  46.     //'NUMBERS' => '[0-9]+(\\.[0-9]+)?',
  47.     'KEYWORDS' => array(
  48.         1 => array( #flow control - dark green
  49.            'do','if','once','while','else','endif','endonce','endwhile','loop'
  50.         ),
  51.         2 => array( #stack manimulation - brown
  52.            'break','concat','do','dup','dup2','pop','repeat','return','swap'
  53.         ),
  54.         3 => array( #math - red
  55.            'abs','acos','add','and','asfloat','asin','asint','atan','atan2','ceil','cos','div','eq','eq0','floor',
  56.             'gt','gte','lt','lte','ln','log','log10','max','min','mod','mul','neg','neq','neq0','not','or','pow','sin','sqrt',
  57.             'sub','tan','xor'
  58.         ),
  59.         4 => array( #constans and iteration variables
  60.            'I','J','K','E','PI','TWOPI','TRUE','FALSE'
  61.         )
  62.     ),
  63.     'SYMBOLS' => array(
  64.         '(', ')', '[', ']', ':'
  65.     ),
  66.     'CASE_SENSITIVE' => array(
  67.         GESHI_COMMENTS => false,
  68.         1 => false,
  69.         2 => false,
  70.         3 => false,
  71.         4 => false,
  72.     ),
  73.     'STYLES' => array(
  74.         'KEYWORDS' => array(
  75.             1 => 'color: #006000;', #flow control - dark green
  76.            2 => 'color: #804000; font-weight: normal;', #stack manimulation - brown
  77.            3 => 'color: #ff0000;', #math - red
  78.            4 => 'color: #004080;'  #constans and iteration variables
  79.            ),
  80.         'COMMENTS' => array(
  81.             1 => 'color: #808080; font-style: italic;'
  82.             ),
  83.         'STRINGS' => array(
  84.             0 => 'color: #0000c0;'
  85.             ),
  86.         'NUMBERS' => array(
  87.             0 => 'color: #0000c0;'
  88.             ),
  89.         'METHODS' => array(
  90.             ),
  91.         'SYMBOLS' => array(
  92.             0 => 'color: #800000;',
  93.             ),
  94.         'REGEXPS' => array(
  95.             0 => 'color: #0080ff;', //Variables - local
  96.             1 => 'color: #8000ff;',  //Variables - global
  97.             2 => 'color: #004040; font-weight: bold;', //Script variables
  98.             3 => 'color: #800040; background-color: #ffff80; text-decoration: underline;', #method definition
  99.            4 => 'color: #800080;', #method usage
  100.            ),
  101.         'SCRIPT' => array(
  102.             )
  103.         ),
  104.     'URLS' => array(
  105.         1 => '',
  106.         2 => '',
  107.         3 => '',
  108.         4 => '',
  109.         5 => ''
  110.     ),
  111.     'OOLANG' => false,
  112.     'OBJECT_SPLITTERS' => array(
  113.         ),
  114.     'REGEXPS' => array(
  115.         0 => "(&lt;\\-|\\-\\&gt;|\\-\\-|\\-\\?)(\\!|[0-9a-zA-Z_]+)", //Variables - local
  116.         1 => "(&lt;\\-|\\-\\&gt;|\\-\\-|\\-\\?)(\\!\\*|\\*[0-9a-zA-Z_]+)", //Variables - global
  117.         2 => "\\$[0-9a-zA-Z_]+", //Script variables
  118.         3 => ":[0-9a-zA-Z_]+", #method definition
  119.        4 => "@[0-9a-zA-Z_]+", #method usage
  120.        ),
  121.     'STRICT_MODE_APPLIES' => GESHI_NEVER,
  122.     'SCRIPT_DELIMITERS' => array(
  123.         ),
  124.     'HIGHLIGHT_STRICT_BLOCK' => array(
  125.         ),
  126.     'TAB_WIDTH' => 4
  127. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement