plugins/geshi/geshi/cmake.php
changeset 3 f3e2bbbd2155
equal deleted inserted replaced
2:9e3258dfae15 3:f3e2bbbd2155
       
     1 <?php
       
     2 /*************************************************************************************
       
     3  * cmake.php
       
     4  * -------
       
     5  * Author: Daniel Nelson (danieln@eng.utah.edu)
       
     6  * Copyright: (c) 2009 Daniel Nelson
       
     7  * Release Version: 1.0.8.4
       
     8  * Date Started: 2009/04/06
       
     9  *
       
    10  * CMake language file for GeSHi.
       
    11  *
       
    12  * Keyword list generated using CMake 2.6.3.
       
    13  *
       
    14  * CHANGES
       
    15  * -------
       
    16  * <date-of-release> (<GeSHi release>)
       
    17  *  -  First Release
       
    18  *
       
    19  * TODO (updated <date-of-release>)
       
    20  * -------------------------
       
    21  *
       
    22  *************************************************************************************
       
    23  *
       
    24  *     This file is part of GeSHi.
       
    25  *
       
    26  *   GeSHi is free software; you can redistribute it and/or modify
       
    27  *   it under the terms of the GNU General Public License as published by
       
    28  *   the Free Software Foundation; either version 2 of the License, or
       
    29  *   (at your option) any later version.
       
    30  *
       
    31  *   GeSHi is distributed in the hope that it will be useful,
       
    32  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    33  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    34  *   GNU General Public License for more details.
       
    35  *
       
    36  *   You should have received a copy of the GNU General Public License
       
    37  *   along with GeSHi; if not, write to the Free Software
       
    38  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
       
    39  *
       
    40  ************************************************************************************/
       
    41 
       
    42 $language_data = array (
       
    43     'LANG_NAME' => 'CMake',
       
    44     'COMMENT_SINGLE' => array(1 => '#'),
       
    45     'COMMENT_MULTI' => array(),
       
    46     'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
       
    47     'QUOTEMARKS' => array('"'),
       
    48     'ESCAPE_CHAR' => '\\',
       
    49     'ESCAPE_REGEXP' => array(
       
    50         // Quoted variables ${...}
       
    51         1 => "/\\$(ENV)?\\{[^\\n\\}]*?\\}/i",
       
    52         // Quoted registry keys [...]
       
    53         2 => "/\\[HKEY[^\n\\]]*?]/i"
       
    54         ),
       
    55     'KEYWORDS' => array(
       
    56         1 => array(
       
    57             'add_custom_command', 'add_custom_target', 'add_definitions',
       
    58             'add_dependencies', 'add_executable', 'add_library',
       
    59             'add_subdirectory', 'add_test', 'aux_source_directory', 'break',
       
    60             'build_command', 'cmake_minimum_required', 'cmake_policy',
       
    61             'configure_file', 'create_test_sourcelist', 'define_property',
       
    62             'else', 'elseif', 'enable_language', 'enable_testing',
       
    63             'endforeach', 'endfunction', 'endif', 'endmacro',
       
    64             'endwhile', 'execute_process', 'export', 'file', 'find_file',
       
    65             'find_library', 'find_package', 'find_path', 'find_program',
       
    66             'fltk_wrap_ui', 'foreach', 'function', 'get_cmake_property',
       
    67             'get_directory_property', 'get_filename_component', 'get_property',
       
    68             'get_source_file_property', 'get_target_property',
       
    69             'get_test_property', 'if', 'include', 'include_directories',
       
    70             'include_external_msproject', 'include_regular_expression',
       
    71             'install', 'link_directories', 'list', 'load_cache',
       
    72             'load_command', 'macro', 'mark_as_advanced', 'math', 'message',
       
    73             'option', 'output_required_files', 'project', 'qt_wrap_cpp',
       
    74             'qt_wrap_ui', 'remove_definitions', 'return', 'separate_arguments',
       
    75             'set', 'set_directory_properties', 'set_property',
       
    76             'set_source_files_properties', 'set_target_properties',
       
    77             'set_tests_properties', 'site_name', 'source_group', 'string',
       
    78             'target_link_libraries', 'try_compile', 'try_run', 'unset',
       
    79             'variable_watch', 'while'
       
    80             ),
       
    81         2 => array(
       
    82             // Deprecated commands
       
    83             'build_name', 'exec_program', 'export_library_dependencies',
       
    84             'install_files', 'install_programs', 'install_targets',
       
    85             'link_libraries', 'make_directory', 'remove', 'subdir_depends',
       
    86             'subdirs', 'use_mangled_mesa', 'utility_source',
       
    87             'variable_requires', 'write_file'
       
    88             ),
       
    89         3 => array(
       
    90             // Special command arguments, this list is not comprehesive.
       
    91             'AND', 'APPEND', 'ASCII', 'BOOL', 'CACHE', 'COMMAND', 'COMMENT',
       
    92             'COMPARE', 'CONFIGURE', 'DEFINED', 'DEPENDS', 'DIRECTORY',
       
    93             'EQUAL', 'EXCLUDE_FROM_ALL', 'EXISTS', 'FALSE', 'FATAL_ERROR',
       
    94             'FILEPATH', 'FIND', 'FORCE', 'GET', 'GLOBAL', 'GREATER',
       
    95             'IMPLICIT_DEPENDS', 'INSERT', 'INTERNAL', 'IS_ABSOLUTE',
       
    96             'IS_DIRECTORY', 'IS_NEWER_THAN', 'LENGTH', 'LESS',
       
    97             'MAIN_DEPENDENCY', 'MATCH', 'MATCHALL', 'MATCHES', 'MODULE', 'NOT',
       
    98             'NOTFOUND', 'OFF', 'ON', 'OR', 'OUTPUT', 'PARENT_SCOPE', 'PATH',
       
    99             'POLICY', 'POST_BUILD', 'PRE_BUILD', 'PRE_LINK', 'PROPERTY',
       
   100             'RANDOM', 'REGEX', 'REMOVE_AT', 'REMOVE_DUPLICATES', 'REMOVE_ITEM',
       
   101             'REPLACE', 'REVERSE', 'SEND_ERROR', 'SHARED', 'SORT', 'SOURCE',
       
   102             'STATIC', 'STATUS', 'STREQUAL', 'STRGREATER', 'STRING', 'STRIP',
       
   103             'STRLESS', 'SUBSTRING', 'TARGET', 'TEST', 'TOLOWER', 'TOUPPER',
       
   104             'TRUE', 'VERBATIM', 'VERSION', 'VERSION_EQUAL', 'VERSION_GREATOR',
       
   105             'VERSION_LESS', 'WORKING_DIRECTORY',
       
   106             )
       
   107         ),
       
   108     'CASE_SENSITIVE' => array(
       
   109         GESHI_COMMENTS => false,
       
   110         1 => false,
       
   111         2 => false,
       
   112         3 => true
       
   113         ),
       
   114     'SYMBOLS' => array(
       
   115         0 => array('(', ')')
       
   116         ),
       
   117     'STYLES' => array(
       
   118         'KEYWORDS' => array(
       
   119             1 => 'color: #1f3f81; font-style: bold;',
       
   120             2 => 'color: #1f3f81;',
       
   121             3 => 'color: #077807; font-sytle: italic;'
       
   122             ),
       
   123         'BRACKETS' => array(),
       
   124         'COMMENTS' => array(
       
   125             1 => 'color: #666666; font-style: italic;'
       
   126             ),
       
   127         'ESCAPE_CHAR' => array(
       
   128             0 => 'color: #000099; font-weight: bold;',
       
   129             1 => 'color: #b08000;',
       
   130             2 => 'color: #0000cd;'
       
   131             ),
       
   132         'STRINGS' => array(
       
   133             0 => 'color: #912f11;',
       
   134             ),
       
   135         'SYMBOLS' => array(
       
   136             0 => 'color: #197d8b;'
       
   137             ),
       
   138         'NUMBERS' => array(),
       
   139         'METHODS' => array(),
       
   140         'REGEXPS' => array(
       
   141             0 => 'color: #b08000;',
       
   142             1 => 'color: #0000cd;'
       
   143             ),
       
   144         'SCRIPT' => array()
       
   145         ),
       
   146     'URLS' => array(
       
   147         1 => 'http://www.cmake.org/cmake/help/cmake2.6docs.html#command:{FNAMEL}',
       
   148         2 => 'http://www.cmake.org/cmake/help/cmake2.6docs.html#command:{FNAMEL}',
       
   149         3 => '',
       
   150         ),
       
   151     'OOLANG' => false,
       
   152     'OBJECT_SPLITTERS' => array(),
       
   153     'REGEXPS' => array(
       
   154         // Unquoted variables
       
   155         0 => "\\$(ENV)?\\{[^\\n}]*?\\}",
       
   156         // Unquoted registry keys
       
   157         1 => "\\[HKEY[^\n\\]]*?]"
       
   158         ),
       
   159     'STRICT_MODE_APPLIES' => GESHI_NEVER,
       
   160     'SCRIPT_DELIMITERS' => array(),
       
   161     'HIGHLIGHT_STRICT_BLOCK' => array(),
       
   162     'TAB_WIDTH' => 4,
       
   163     'PARSER_CONTROL' => array(
       
   164         'KEYWORDS' => array(
       
   165             // These keywords cannot come after a open paren
       
   166             1 => array(
       
   167                 'DISALLOWED_AFTER' =>  '(?= *\()'
       
   168                 ),
       
   169             2 => array(
       
   170                 'DISALLOWED_AFTER' =>  '(?= *\()'
       
   171                 )
       
   172             ),
       
   173         'ENABLE_FLAGS' => array(
       
   174             'BRACKETS' => GESHI_NEVER,
       
   175             'METHODS' => GESHI_NEVER,
       
   176             'NUMBERS' => GESHI_NEVER
       
   177             )
       
   178         )
       
   179 );
       
   180 
       
   181 ?>