plugins/geshi/geshi/whois.php
changeset 3 f3e2bbbd2155
equal deleted inserted replaced
2:9e3258dfae15 3:f3e2bbbd2155
       
     1 <?php
       
     2 /*************************************************************************************
       
     3  * whois.php
       
     4  * --------
       
     5  * Author: Benny Baumann (BenBE@geshi.org)
       
     6  * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/)
       
     7  * Release Version: 1.0.8.4
       
     8  * Date Started: 2008/09/14
       
     9  *
       
    10  * Whois response (RPSL format) language file for GeSHi.
       
    11  *
       
    12  * CHANGES
       
    13  * -------
       
    14  * 2008/09/14 (1.0.0)
       
    15  *  -  First Release
       
    16  *
       
    17  * TODO
       
    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' => 'Whois (RPSL format)',
       
    42     'COMMENT_SINGLE' => array(1 => '% ', 2 => '%ERROR:'),
       
    43     'COMMENT_MULTI' => array(),
       
    44     'COMMENT_REGEXP' => array(
       
    45         //Description
       
    46         3 => '/(?:(?<=^remarks:)|(?<=^descr:))(.|\n\s)*$/mi',
       
    47 
       
    48         //Contact Details
       
    49         4 => '/(?<=^address:)(.|\n\s)*$/mi',
       
    50         5 => '/\+\d+(?:(?:\s\(\d+(\s\d+)*\))?(?:\s\d+)+|-\d+-\d+)/',
       
    51         6 => '/\b(?!-|\.)[\w\-\.]+(?!-|\.)@((?!-)[\w\-]+\.)+\w+\b/',
       
    52 
       
    53         //IP, Networks and AS information\links
       
    54         7 => '/\b(?<!\.|\-)(?:[\da-f:]+(?!\.)|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?:\/1?\d\d?)?(?<!\.|\-)\b/',
       
    55         8 => '/\bAS\d+\b/'
       
    56         ),
       
    57     'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
       
    58     'QUOTEMARKS' => array(),
       
    59     'ESCAPE_CHAR' => '',
       
    60     'KEYWORDS' => array(
       
    61         1 => array( //Object Types
       
    62             'as-block','as-set','aut-num','domain','filter-set','inet-rtr',
       
    63             'inet6num','inetnum','irt','key-cert','limerick','mntner',
       
    64             'organisation','peering-set','person','poem','role','route-set',
       
    65             'route','route6','rtr-set'
       
    66             ),
       
    67         2 => array( //Field Types
       
    68             'abuse-mailbox','address','admin-c','aggr-bndry','aggr-mtd','alias',
       
    69             'as-block','as-name','as-set','aut-num','auth','author','certif',
       
    70             'changed','components','country','default','descr','dom-net',
       
    71             'domain','ds-rdata','e-mail','encryption','export','export-comps',
       
    72             'fax-no','filter','filter-set','fingerpr','form','holes','ifaddr',
       
    73             'import','inet-rtr','inet6num','inetnum','inject','interface','irt',
       
    74             'irt-nfy','key-cert','limerick','local-as','mbrs-by-ref',
       
    75             'member-of','members','method','mnt-by','mnt-domains','mnt-irt',
       
    76             'mnt-lower','mnt-nfy','mnt-ref','mnt-routes','mntner','mp-default',
       
    77             'mp-export','mp-filter','mp-import','mp-members','mp-peer',
       
    78             'mp-peering','netname','nic-hdl','notify','nserver','org',
       
    79             'org-name','org-type','organisation','origin','owner','peer',
       
    80             'peering','peering-set','person','phone','poem','ref-nfy','refer',
       
    81             'referral-by','remarks','rev-srv','role','route','route-set',
       
    82             'route6','rtr-set','signature','source','status','sub-dom','tech-c',
       
    83             'text','upd-to','zone-c'
       
    84             ),
       
    85         3 => array( //RPSL reserved
       
    86             'accept','action','and','announce','any','as-any','at','atomic',
       
    87             'except','from','inbound','into','networks','not','or','outbound',
       
    88             'peeras','refine','rs-any','to'
       
    89             )
       
    90         ),
       
    91     'SYMBOLS' => array(
       
    92         ':'
       
    93         ),
       
    94     'CASE_SENSITIVE' => array(
       
    95         GESHI_COMMENTS => false,
       
    96         1 => false,
       
    97         2 => false,
       
    98         3 => false,
       
    99         ),
       
   100     'STYLES' => array(
       
   101         'KEYWORDS' => array(
       
   102             1 => 'color: #0000FF; font-weight: bold;',
       
   103             2 => 'color: #000080; font-weight: bold;',
       
   104             3 => 'color: #990000; font-weight: bold;'
       
   105             ),
       
   106         'COMMENTS' => array(
       
   107             1 => 'color: #666666; font-style: italic;',
       
   108             2 => 'color: #666666; font-style: italic;',
       
   109             3 => 'color: #404080;',
       
   110             4 => 'color: #408040;',
       
   111             5 => 'color: #408040;',
       
   112             6 => 'color: #408040;',
       
   113             7 => 'color: #804040;',
       
   114             8 => 'color: #804040;',
       
   115             'MULTI' => 'color: #666666; font-style: italic;'
       
   116             ),
       
   117         'ESCAPE_CHAR' => array(
       
   118             0 => 'color: #000099; font-weight: bold;',
       
   119             'HARD' => 'color: #000099; font-weight: bold;'
       
   120             ),
       
   121         'BRACKETS' => array(
       
   122             0 => 'color: #009900;'
       
   123             ),
       
   124         'STRINGS' => array(
       
   125             0 => '',
       
   126             ),
       
   127         'NUMBERS' => array(
       
   128             0 => 'color: #000080;',
       
   129             ),
       
   130         'METHODS' => array(
       
   131             ),
       
   132         'SYMBOLS' => array(
       
   133             0 => 'color: #0000FF;'
       
   134             ),
       
   135         'REGEXPS' => array(
       
   136             0 => 'color: #000088;'
       
   137             ),
       
   138         'SCRIPT' => array(
       
   139             )
       
   140         ),
       
   141     'URLS' => array(
       
   142         1 => '',
       
   143         2 => '',
       
   144         3 => 'http://www.irr.net/docs/rpsl.html'
       
   145         ),
       
   146     'OOLANG' => false,
       
   147     'OBJECT_SPLITTERS' => array(
       
   148         ),
       
   149     'REGEXPS' => array(
       
   150         //Variables
       
   151         0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*"
       
   152         ),
       
   153     'STRICT_MODE_APPLIES' => GESHI_MAYBE,
       
   154     'SCRIPT_DELIMITERS' => array(
       
   155         ),
       
   156     'HIGHLIGHT_STRICT_BLOCK' => array(
       
   157         ),
       
   158     'TAB_WIDTH' => 4,
       
   159     'PARSER_CONTROL' => array(
       
   160         'KEYWORDS' => array(
       
   161             1 => array(
       
   162                 'DISALLOWED_BEFORE' => '(?<=\A |\A \n(?m:^)|\n\n(?m:^))'
       
   163                 ),
       
   164             2 => array(
       
   165                 'DISALLOWED_BEFORE' => '(?m:^)'
       
   166                 )
       
   167             ),
       
   168         'ENABLE_FLAGS' => array(
       
   169             'BRACKETS' => GESHI_NEVER,
       
   170             'SYMBOLS' => GESHI_NEVER,
       
   171             'BRACKETS' => GESHI_NEVER,
       
   172             'STRINGS' => GESHI_NEVER,
       
   173             'ESCAPE_CHAR' => GESHI_NEVER,
       
   174             'NUMBERS' => GESHI_NEVER,
       
   175             'METHODS' => GESHI_NEVER,
       
   176             'SCRIPT' => GESHI_NEVER
       
   177             )
       
   178         ),
       
   179 );
       
   180 
       
   181 ?>