Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
564 lines (561 sloc) 15.1 KB
<?php
/*************************************************************************************
* puppet.php
* --------
* Stolen from the following:
* Author: Moises Deniz
* Copyright: (c) 2007 Moises Deniz
* Release Version: 1.0.8.9
* Date Started: 2007/03/21
*
* Puppet language file for GeSHi.
*
* CHANGES
* -------
* 2011/10/14 (jsnbyh@gmail.com)
* - Updated with recent types and attributes.
* - Support for C style multi line comments
* 2010/11/24 (chris@brightroll.com)
* - Changed to puppet from Ruby
* 2008/05/23 (1.0.7.22)
* - Added description of extra language features (SF#1970248)
* 2007/03/21 (1.0.7.19)
* - Initial release
*
*************************************************************************************
*
* This file is part of GeSHi.
*
* GeSHi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* GeSHi 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GeSHi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
************************************************************************************/
$language_data = array (
'LANG_NAME' => 'Puppet',
'COMMENT_SINGLE' => array(1 => "#"),
'COMMENT_MULTI' => array("=begin" => "=end", '/*' => '*/'),
'COMMENT_REGEXP' => array(
//Heredoc
4 => '/<<\s*?(\w+)\\n.*?\\n\\1(?![a-zA-Z0-9])/si',
),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
'QUOTEMARKS' => array('"', '`','\''),
'ESCAPE_CHAR' => '\\',
'KEYWORDS' => array(
1 => array(
'augeas',
'computer',
'cron',
'exec',
'file',
'filebucket',
'firewall',
'group',
'host',
'interface',
'k5login',
'macauthorization',
'mailalias',
'maillist',
'mcx',
'mount',
'nagioscommand',
'nagioscontact',
'nagioscontactgroup',
'nagioshost',
'nagioshostdependency',
'nagioshostescalation',
'nagioshostextinfo',
'nagioshostgroup',
'nagiosservice',
'nagiosservicedependency',
'nagiosserviceescalation',
'nagiosserviceextinfo',
'nagiosservicegroup',
'nagiostimeperiod',
//'notify',
'package',
'resources',
'router',
'schedule',
'selboolean',
'selmodule',
'service',
'sshauthorizedkey',
'sshkey',
'stage',
'tidy',
//'user',
'vlan',
'yumrepo',
'zfs',
'zone',
'zpool',
),
2 => array(
'_naginator_name',
'aclinherit',
'aclmode',
'action',
'action_url',
'active_checks_enabled',
'address',
'address1',
'address2',
'address3',
'address4',
'address5',
'address6',
'admin',
'adminfile',
'age',
'alias',
'allow_root',
'allowcdrom',
'allowdupe',
'allowed_trunk_vlans',
'atboot',
'atime',
'attribute_membership',
'attributes',
'auth_class',
'auth_membership',
'auth_type',
'authenticate_user',
'auths',
'autoboot',
'backup',
'baseurl',
'binary',
'blockdevice',
'burst',
'can_submit_commands',
'canmount',
'category',
'chain',
'changes',
'check_command',
'check_freshness',
'check_interval',
'check_period',
'checksum',
'clone',
'command',
'command_line',
'command_name',
'comment',
'compression',
'configfiles',
'contact_groups',
'contact_name',
'contactgroup_members',
'contactgroup_name',
'contactgroups',
'contacts',
'content',
'context',
'control',
'copies',
'cost',
'create_args',
'creates',
'ctime',
'cwd',
'dataset',
'dependency_period',
'dependent_host_name',
'dependent_hostgroup_name',
'dependent_service_description',
'descr',
'description',
'destination',
'device',
'device_url',
'devices',
'disk',
'display_name',
'dport',
'ds_name',
'ds_type',
'dump',
'duplex',
'email',
'en_address',
'enable',
'enabled',
'enablegroups',
'encapsulation',
'ensure',
'environment',
'escalation_options',
'escalation_period',
'etherchannel',
'event_handler',
'event_handler_enabled',
'exclude',
'exec',
'execution_failure_criteria',
'expiry',
'failovermethod',
'failure_prediction_enabled',
'first_notification',
'first_notification_delay',
'flap_detection_enabled',
'flap_detection_options',
'flavor',
'force',
'freshness_threshold',
'friday',
'fstype',
'gid',
'gpgcheck',
'gpgkey',
'group',
'groups',
'hasrestart',
'hasstatus',
'high_flap_threshold',
'home',
'host_aliases',
'host_name',
'host_notification_commands',
'host_notification_options',
'host_notification_period',
'host_notifications_enabled',
'hostgroup_members',
'hostgroup_name',
'hostgroups',
'hour',
'http_caching',
'ia_load_module',
'icmp',
'icon_image',
'icon_image_alt',
'id',
'ignore',
'incl',
'include',
'includepkgs',
'inherit',
'inherits_parent',
'iniface',
'initial_state',
'install_args',
'install_options',
'instance',
'ip',
'ip_address',
'ipaddress',
'iptype',
'is_volatile',
'jump',
'k_of_n',
'keepalive',
'key',
'key_membership',
'keys',
'last_notification',
'lens',
'limit',
'links',
'load_path',
'log',
'log_level',
'log_prefix',
'logbias',
'logoutput',
'low_flap_threshold',
'mailserver',
'managehome',
'manifest',
'matches',
'max_check_attempts',
'mechanisms',
'members',
'membership',
'message',
'metadata_expire',
'minute',
'mirror',
'mirrorlist',
'mode',
'monday',
'month',
'monthday',
'mountpoint',
'mtime',
'name',
'native_vlan',
'nbmand',
'normal_check_interval',
'notes',
'notes_url',
'notification_failure_criteria',
'notification_interval',
'notification_options',
'notification_period',
'notifications_enabled',
'notify',
'obsess_over_host',
'obsess_over_service',
'onlyif',
'options',
'outiface',
'owner',
'pager',
'parallelize_check',
'parents',
'pass',
'passive_checks_enabled',
'password',
'password_max_age',
'password_min_age',
'path',
'pattern',
'period',
'periodmatch',
'persistent',
'platform',
'pool',
'port',
'primarycache',
'principals',
'priority',
'process_perf_data',
'profile_membership',
'profiles',
'project',
'protect',
'proto',
'provider',
'proxy',
'proxy_password',
'proxy_username',
'purge',
'quota',
'raid_parity',
'raidz',
'range',
'readonly',
'realhostname',
'realname',
'recipient',
'recordsize',
'recurse',
'recurselimit',
'refquota',
'refreservation',
'refresh',
'refreshonly',
'register',
'reject',
'remounts',
'repeat',
'replace',
'require',
'reservation',
'responsefile',
'restart',
'retain_nonstatus_information',
'retain_status_information',
'retry_check_interval',
'retry_interval',
'returns',
'rmdirs',
'role_membership',
'roles',
'root',
'rule',
'saturday',
'secondarycache',
'selinux_ignore_defaults',
'selmoduledir',
'selmodulepath',
'selrange',
'selrole',
'seltype',
'seluser',
'server',
'service_description',
'service_notification_commands',
'service_notification_options',
'service_notification_period',
'service_notifications_enabled',
'servicegroup_members',
'servicegroup_name',
'servicegroups',
'session_owner',
'setuid',
'shared',
'shareiscsi',
'sharenfs',
'shares',
'sharesmb',
'shell',
'size',
'snapdir',
'source',
'sourceselect',
'spare',
'special',
'speed',
'sport',
'stalking_options',
'start',
'state',
'status',
'statusmap_image',
'stop',
'sunday',
'syncversion',
'sysidcfg',
'system',
'table',
'target',
'thursday',
'timeout',
'timeperiod_name',
'todest',
'toports',
'tosource',
'tries',
'try_sleep',
'tuesday',
'type',
'type_check',
'uid',
'unless',
'unless_system_user',
'url',
'use',
'user',
'value',
'vendor',
'version',
'volsize',
'vrml_image',
'vscan',
'webserver',
'wednesday',
'weekday',
'withpath',
'xattr',
'zoned',
),
3 => array(
'class', 'define', 'site', 'node'
),
4 => array(
'include', 'inherits', 'import'
),
),
'SYMBOLS' => array(
'(', ')', '[', ']', '{', '}', '%', '&', '*', '|', '/', '<', '>',
'+', '-', '=>', '<<'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
1 => false,
2 => false,
3 => false,
4 => true,
),
'STYLES' => array(
'KEYWORDS' => array(
1 => 'color:#9966CC; font-weight:bold;',
2 => 'color:#0000FF; font-weight:bold;',
3 => 'color:#CC0066; font-weight:bold;',
4 => 'color:#CC00FF; font-weight:bold;',
),
'COMMENTS' => array(
1 => 'color:#008000; font-style:italic;',
4 => 'color: #cc0000; font-style: italic;',
'MULTI' => 'color:#000080; font-style:italic;'
),
'ESCAPE_CHAR' => array(
0 => 'color:#000099;'
),
'BRACKETS' => array(
0 => 'color:#006600; font-weight:bold;'
),
'STRINGS' => array(
0 => 'color:#996600;'
),
'NUMBERS' => array(
0 => 'color:#006666;'
),
'METHODS' => array(
1 => 'color:#9900CC;'
),
'SYMBOLS' => array(
0 => 'color:#006600; font-weight:bold;'
),
'REGEXPS' => array(
0 => 'color:#ff6633; font-weight:bold;',
1 => 'color:#0066ff; font-weight:bold;',
2 => 'color:#6666ff; font-weight:bold;',
3 => 'color:#ff3333; font-weight:bold;'
),
'SCRIPT' => array(
0 => '',
1 => '',
2 => '',
)
),
'URLS' => array(
1 => '',
2 => '',
3 => '',
4 => ''
),
'OOLANG' => true,
'OBJECT_SPLITTERS' => array(
1 => '.'
),
'REGEXPS' => array(
0 => array(//Variables
GESHI_SEARCH => "([[:space:]])(\\$[a-zA-Z_][a-zA-Z0-9_]*)",
GESHI_REPLACE => '\\2',
GESHI_MODIFIERS => '',
GESHI_BEFORE => '\\1',
GESHI_AFTER => ''
),
1 => array(//Arrays
GESHI_SEARCH => "([[:space:]])(@[a-zA-Z_][a-zA-Z0-9_]*)",
GESHI_REPLACE => '\\2',
GESHI_MODIFIERS => '',
GESHI_BEFORE => '\\1',
GESHI_AFTER => ''
),
2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*",//Static OOP symbols
3 => array(
GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)",
GESHI_REPLACE => '\\2',
GESHI_MODIFIERS => '',
GESHI_BEFORE => '\\1',
GESHI_AFTER => ''
)
),
'STRICT_MODE_APPLIES' => GESHI_MAYBE,
'SCRIPT_DELIMITERS' => array(
0 => array(
'<%' => '%>'
)
),
'HIGHLIGHT_STRICT_BLOCK' => array(
0 => true,
),
'TAB_WIDTH' => 2
);
?>
You can’t perform that action at this time.