00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 $language_data = array (
00033 'LANG_NAME' => 'Rails',
00034 'COMMENT_SINGLE' => array(1 => "#"),
00035 'COMMENT_MULTI' => array("=begin" => "=end"),
00036 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
00037 'QUOTEMARKS' => array('"', '`','\''),
00038 'ESCAPE_CHAR' => '\\',
00039 'KEYWORDS' => array(
00040 1 => array(
00041 'alias', 'and', 'begin', 'break', 'case', 'class',
00042 'def', 'defined', 'do', 'else', 'elsif', 'end',
00043 'ensure', 'for', 'if', 'in', 'module', 'while',
00044 'next', 'not', 'or', 'redo', 'rescue', 'yield',
00045 'retry', 'super', 'then', 'undef', 'unless',
00046 'until', 'when', 'BEGIN', 'END', 'include'
00047 ),
00048 2 => array(
00049 '__FILE__', '__LINE__', 'false', 'nil', 'self', 'true',
00050 'return'
00051 ),
00052 3 => array(
00053 'Array', 'Float', 'Integer', 'String', 'at_exit',
00054 'autoload', 'binding', 'caller', 'catch', 'chop', 'chop!',
00055 'chomp', 'chomp!', 'eval', 'exec', 'exit', 'exit!', 'fail',
00056 'fork', 'format', 'gets', 'global_variables', 'gsub', 'gsub!',
00057 'iterator?', 'lambda', 'load', 'local_variables', 'loop',
00058 'open', 'p', 'print', 'printf', 'proc', 'putc', 'puts',
00059 'raise', 'rand', 'readline', 'readlines', 'require', 'select',
00060 'sleep', 'split', 'sprintf', 'srand', 'sub', 'sub!', 'syscall',
00061 'system', 'trace_var', 'trap', 'untrace_var'
00062 ),
00063 4 => array(
00064 'Abbrev', 'ArgumentError', 'Base64', 'Benchmark',
00065 'Benchmark::Tms', 'Bignum', 'Binding', 'CGI', 'CGI::Cookie',
00066 'CGI::HtmlExtension', 'CGI::QueryExtension',
00067 'CGI::Session', 'CGI::Session::FileStore',
00068 'CGI::Session::MemoryStore', 'Class', 'Comparable', 'Complex',
00069 'ConditionVariable', 'Continuation', 'Data',
00070 'Date', 'DateTime', 'Delegator', 'Dir', 'EOFError', 'ERB',
00071 'ERB::Util', 'Enumerable', 'Enumerable::Enumerator', 'Errno',
00072 'Exception', 'FalseClass', 'File',
00073 'File::Constants', 'File::Stat', 'FileTest', 'FileUtils',
00074 'FileUtils::DryRun', 'FileUtils::NoWrite',
00075 'FileUtils::StreamUtils_', 'FileUtils::Verbose', 'Find',
00076 'Fixnum', 'FloatDomainError', 'Forwardable', 'GC', 'Generator',
00077 'Hash', 'IO', 'IOError', 'Iconv', 'Iconv::BrokenLibrary',
00078 'Iconv::Failure', 'Iconv::IllegalSequence',
00079 'Iconv::InvalidCharacter', 'Iconv::InvalidEncoding',
00080 'Iconv::OutOfRange', 'IndexError', 'Interrupt', 'Kernel',
00081 'LoadError', 'LocalJumpError', 'Logger', 'Logger::Application',
00082 'Logger::Error', 'Logger::Formatter', 'Logger::LogDevice',
00083 'Logger::LogDevice::LogDeviceMutex', 'Logger::Severity',
00084 'Logger::ShiftingError', 'Marshal', 'MatchData',
00085 'Math', 'Matrix', 'Method', 'Module', 'Mutex', 'NameError',
00086 'NameError::message', 'NilClass', 'NoMemoryError',
00087 'NoMethodError', 'NotImplementedError', 'Numeric', 'Object',
00088 'ObjectSpace', 'Observable', 'PStore', 'PStore::Error',
00089 'Pathname', 'Precision', 'Proc', 'Process', 'Process::GID',
00090 'Process::Status', 'Process::Sys', 'Process::UID', 'Queue',
00091 'Range', 'RangeError', 'Rational', 'Regexp', 'RegexpError',
00092 'RuntimeError', 'ScriptError', 'SecurityError', 'Set',
00093 'Shellwords', 'Signal', 'SignalException', 'SimpleDelegator',
00094 'SingleForwardable', 'Singleton', 'SingletonClassMethods',
00095 'SizedQueue', 'SortedSet', 'StandardError', 'StringIO',
00096 'StringScanner', 'StringScanner::Error', 'Struct', 'Symbol',
00097 'SyncEnumerator', 'SyntaxError', 'SystemCallError',
00098 'SystemExit', 'SystemStackError', 'Tempfile',
00099 'Test::Unit::TestCase', 'Test::Unit', 'Test', 'Thread',
00100 'ThreadError', 'ThreadGroup',
00101 'ThreadsWait', 'Time', 'TrueClass', 'TypeError', 'URI',
00102 'URI::BadURIError', 'URI::Error', 'URI::Escape', 'URI::FTP',
00103 'URI::Generic', 'URI::HTTP', 'URI::HTTPS',
00104 'URI::InvalidComponentError', 'URI::InvalidURIError',
00105 'URI::LDAP', 'URI::MailTo', 'URI::REGEXP',
00106 'URI::REGEXP::PATTERN', 'UnboundMethod', 'Vector', 'YAML',
00107 'ZeroDivisionError', 'Zlib',
00108 'Zlib::BufError', 'Zlib::DataError', 'Zlib::Deflate',
00109 'Zlib::Error', 'Zlib::GzipFile', 'Zlib::GzipFile::CRCError',
00110 'Zlib::GzipFile::Error', 'Zlib::GzipFile::LengthError',
00111 'Zlib::GzipFile::NoFooter', 'Zlib::GzipReader',
00112 'Zlib::GzipWriter', 'Zlib::Inflate', 'Zlib::MemError',
00113 'Zlib::NeedDict', 'Zlib::StreamEnd', 'Zlib::StreamError',
00114 'Zlib::VersionError',
00115 'Zlib::ZStream',
00116 'ActionController::AbstractRequest',
00117 'ActionController::Assertions::DomAssertions',
00118 'ActionController::Assertions::ModelAssertions',
00119 'ActionController::Assertions::ResponseAssertions',
00120 'ActionController::Assertions::RoutingAssertions',
00121 'ActionController::Assertions::SelectorAssertions',
00122 'ActionController::Assertions::TagAssertions',
00123 'ActionController::Base',
00124 'ActionController::Benchmarking::ClassMethods',
00125 'ActionController::Caching',
00126 'ActionController::Caching::Actions',
00127 'ActionController::Caching::Actions::ActionCachePath',
00128 'ActionController::Caching::Fragments',
00129 'ActionController::Caching::Pages',
00130 'ActionController::Caching::Pages::ClassMethods',
00131 'ActionController::Caching::Sweeping',
00132 'ActionController::Components',
00133 'ActionController::Components::ClassMethods',
00134 'ActionController::Components::InstanceMethods',
00135 'ActionController::Cookies',
00136 'ActionController::Filters::ClassMethods',
00137 'ActionController::Flash',
00138 'ActionController::Flash::FlashHash',
00139 'ActionController::Helpers::ClassMethods',
00140 'ActionController::Integration::Session',
00141 'ActionController::IntegrationTest',
00142 'ActionController::Layout::ClassMethods',
00143 'ActionController::Macros',
00144 'ActionController::Macros::AutoComplete::ClassMethods',
00145 'ActionController::Macros::InPlaceEditing::ClassMethods',
00146 'ActionController::MimeResponds::InstanceMethods',
00147 'ActionController::Pagination',
00148 'ActionController::Pagination::ClassMethods',
00149 'ActionController::Pagination::Paginator',
00150 'ActionController::Pagination::Paginator::Page',
00151 'ActionController::Pagination::Paginator::Window',
00152 'ActionController::Rescue', 'ActionController::Resources',
00153 'ActionController::Routing',
00154 'ActionController::Scaffolding::ClassMethods',
00155 'ActionController::SessionManagement::ClassMethods',
00156 'ActionController::Streaming', 'ActionController::TestProcess',
00157 'ActionController::TestUploadedFile',
00158 'ActionController::UrlWriter',
00159 'ActionController::Verification::ClassMethods',
00160 'ActionMailer::Base', 'ActionView::Base',
00161 'ActionView::Helpers::ActiveRecordHelper',
00162 'ActionView::Helpers::AssetTagHelper',
00163 'ActionView::Helpers::BenchmarkHelper',
00164 'ActionView::Helpers::CacheHelper',
00165 'ActionView::Helpers::CaptureHelper',
00166 'ActionView::Helpers::DateHelper',
00167 'ActionView::Helpers::DebugHelper',
00168 'ActionView::Helpers::FormHelper',
00169 'ActionView::Helpers::FormOptionsHelper',
00170 'ActionView::Helpers::FormTagHelper',
00171 'ActionView::Helpers::JavaScriptHelper',
00172 'ActionView::Helpers::JavaScriptMacrosHelper',
00173 'ActionView::Helpers::NumberHelper',
00174 'ActionView::Helpers::PaginationHelper',
00175 'ActionView::Helpers::PrototypeHelper',
00176 'ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods',
00177 'ActionView::Helpers::ScriptaculousHelper',
00178 'ActionView::Helpers::TagHelper',
00179 'ActionView::Helpers::TextHelper',
00180 'ActionView::Helpers::UrlHelper', 'ActionView::Partials',
00181 'ActionWebService::API::Method', 'ActionWebService::Base',
00182 'ActionWebService::Client::Soap',
00183 'ActionWebService::Client::XmlRpc',
00184 'ActionWebService::Container::ActionController::ClassMethods',
00185 'ActionWebService::Container::Delegated::ClassMethods',
00186 'ActionWebService::Container::Direct::ClassMethods',
00187 'ActionWebService::Invocation::ClassMethods',
00188 'ActionWebService::Scaffolding::ClassMethods',
00189 'ActionWebService::SignatureTypes', 'ActionWebService::Struct',
00190 'ActiveRecord::Acts::List::ClassMethods',
00191 'ActiveRecord::Acts::List::InstanceMethods',
00192 'ActiveRecord::Acts::NestedSet::ClassMethods',
00193 'ActiveRecord::Acts::NestedSet::InstanceMethods',
00194 'ActiveRecord::Acts::Tree::ClassMethods',
00195 'ActiveRecord::Acts::Tree::InstanceMethods',
00196 'ActiveRecord::Aggregations::ClassMethods',
00197 'ActiveRecord::Associations::ClassMethods',
00198 'ActiveRecord::AttributeMethods::ClassMethods',
00199 'ActiveRecord::Base',
00200 'ActiveRecord::Calculations::ClassMethods',
00201 'ActiveRecord::Callbacks',
00202 'ActiveRecord::ConnectionAdapters::AbstractAdapter',
00203 'ActiveRecord::ConnectionAdapters::Column',
00204 'ActiveRecord::ConnectionAdapters::DB2Adapter',
00205 'ActiveRecord::ConnectionAdapters::DatabaseStatements',
00206 'ActiveRecord::ConnectionAdapters::FirebirdAdapter',
00207 'ActiveRecord::ConnectionAdapters::FrontBaseAdapter',
00208 'ActiveRecord::ConnectionAdapters::MysqlAdapter',
00209 'ActiveRecord::ConnectionAdapters::OpenBaseAdapter',
00210 'ActiveRecord::ConnectionAdapters::OracleAdapter',
00211 'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter',
00212 'ActiveRecord::ConnectionAdapters::Quoting',
00213 'ActiveRecord::ConnectionAdapters::SQLServerAdapter',
00214 'ActiveRecord::ConnectionAdapters::SQLiteAdapter',
00215 'ActiveRecord::ConnectionAdapters::SchemaStatements',
00216 'ActiveRecord::ConnectionAdapters::SybaseAdapter::ColumnWithIdentity',
00217 'ActiveRecord::ConnectionAdapters::SybaseAdapterContext',
00218 'ActiveRecord::ConnectionAdapters::TableDefinition',
00219 'ActiveRecord::Errors', 'ActiveRecord::Locking',
00220 'ActiveRecord::Locking::Optimistic',
00221 'ActiveRecord::Locking::Optimistic::ClassMethods',
00222 'ActiveRecord::Locking::Pessimistic',
00223 'ActiveRecord::Migration', 'ActiveRecord::Observer',
00224 'ActiveRecord::Observing::ClassMethods',
00225 'ActiveRecord::Reflection::ClassMethods',
00226 'ActiveRecord::Reflection::MacroReflection',
00227 'ActiveRecord::Schema', 'ActiveRecord::Timestamp',
00228 'ActiveRecord::Transactions::ClassMethods',
00229 'ActiveRecord::Validations',
00230 'ActiveRecord::Validations::ClassMethods',
00231 'ActiveRecord::XmlSerialization',
00232 'ActiveSupport::CachingTools::HashCaching',
00233 'ActiveSupport::CoreExtensions::Array::Conversions',
00234 'ActiveSupport::CoreExtensions::Array::Grouping',
00235 'ActiveSupport::CoreExtensions::Date::Conversions',
00236 'ActiveSupport::CoreExtensions::Hash::Conversions',
00237 'ActiveSupport::CoreExtensions::Hash::Conversions::ClassMethods',
00238 'ActiveSupport::CoreExtensions::Hash::Diff',
00239 'ActiveSupport::CoreExtensions::Hash::Keys',
00240 'ActiveSupport::CoreExtensions::Hash::ReverseMerge',
00241 'ActiveSupport::CoreExtensions::Integer::EvenOdd',
00242 'ActiveSupport::CoreExtensions::Integer::Inflections',
00243 'ActiveSupport::CoreExtensions::Numeric::Bytes',
00244 'ActiveSupport::CoreExtensions::Numeric::Time',
00245 'ActiveSupport::CoreExtensions::Pathname::CleanWithin',
00246 'ActiveSupport::CoreExtensions::Range::Conversions',
00247 'ActiveSupport::CoreExtensions::String::Access',
00248 'ActiveSupport::CoreExtensions::String::Conversions',
00249 'ActiveSupport::CoreExtensions::String::Inflections',
00250 'ActiveSupport::CoreExtensions::String::Iterators',
00251 'ActiveSupport::CoreExtensions::String::StartsEndsWith',
00252 'ActiveSupport::CoreExtensions::String::Unicode',
00253 'ActiveSupport::CoreExtensions::Time::Calculations',
00254 'ActiveSupport::CoreExtensions::Time::Calculations::ClassMethods',
00255 'ActiveSupport::CoreExtensions::Time::Conversions',
00256 'ActiveSupport::Multibyte::Chars',
00257 'ActiveSupport::Multibyte::Handlers::UTF8Handler', 'Binding',
00258 'Breakpoint', 'Builder::BlankSlate', 'Builder::XmlMarkup',
00259 'Enumerable', 'Fixtures',
00260 'HTML::Selector', 'HashWithIndifferentAccess', 'Inflector',
00261 'Inflector::Inflections', 'Mime', 'Mime::Type',
00262 'OCI8AutoRecover', 'Symbol', 'TimeZone', 'XmlSimple'
00263 ),
00264 5 => array(
00265 'image_tag', 'link_to', 'link_to_remote', 'javascript_include_tag',
00266 'assert_equal', 'assert_not_equal', 'before_filter',
00267 'after_filter', 'render', 'redirect_to', 'hide_action',
00268 'render_to_string', 'url_for', 'controller_name',
00269 'controller_class_name', 'controller_path', 'session',
00270 'render_component', 'render_component_as_string', 'cookie',
00271 'layout', 'flash', 'auto_complete_for', 'in_place_editor_for',
00272 'respond_to', 'paginate', 'current_page', 'each', 'first',
00273 'first_page', 'last_page', 'last', 'length', 'new', 'page_count',
00274 'previous', 'next', 'scaffold', 'session', 'send_data',
00275 'send_file', 'deliver', 'receive', 'error_messages_for',
00276 'error_message_on', 'form', 'input', 'stylesheet_link_tag',
00277 'stylesheet_path', 'content_for', 'select_date', 'select', 'ago',
00278 'month', 'day', 'check_box', 'fields_for', 'file_field',
00279 'form_for', 'hidden_field', 'text_area', 'password_field',
00280 'collection_select', 'options_for_select',
00281 'options_from_collection_for_select', 'file_field_tag',
00282 'form_for_tag', 'hidden_field_tag', 'text_area_tag',
00283 'password_field_tag', 'link_to_function', 'javascript_tag',
00284 'human_size', 'number_to_currency', 'pagination_links',
00285 'form_remote_tag', 'form_remote_for', 'link_to_remote',
00286 'submit_to_remote', 'remote_function', 'observe_form',
00287 'observe_field', 'remote_form_for', 'options_for_ajax', 'alert',
00288 'call', 'assign', 'show', 'hide', 'insert_html', 'sortable',
00289 'toggle', 'visual_effect', 'replace', 'replace_html', 'remove',
00290 'save', 'save!', 'draggable', 'drop_receiving', 'literal',
00291 'draggable_element', 'drop_receiving_element', 'sortable_element',
00292 'content_tag', 'tag', 'link_to_image', 'link_to_if',
00293 'link_to_unless', 'mail_to', 'link_image_to', 'button_to',
00294 'current_page?', 'act_as_list', 'act_as_nested', 'act_as_tree',
00295 'has_many', 'has_one', 'belongs_to', 'has_many_and_belogns_to',
00296 'delete', 'destroy', 'destroy_all', 'clone', 'deep_clone', 'copy',
00297 'update', 'table_name', 'primary_key', 'sum', 'maximun', 'minimum',
00298 'count', 'size', 'after_save', 'after_create', 'before_save',
00299 'before_create', 'add_to_base', 'errors', 'add', 'validate',
00300 'validate', 'validates_presence_of', 'validates_format_of',
00301 'validates_numericality_of', 'validates_uniqueness_of',
00302 'validates_length_of', 'validates_format_of', 'validates_size_of',
00303 'to_a', 'to_s', 'to_xml', 'to_i'
00304 )
00305 ),
00306 'SYMBOLS' => array(
00307 '(', ')', '[', ']', '{', '}', '%', '&', '*', '|', '/', '<', '>',
00308 '+', '-', '=>', '=>', '<<'
00309 ),
00310 'CASE_SENSITIVE' => array(
00311 GESHI_COMMENTS => false,
00312 1 => true,
00313 2 => true,
00314 3 => true,
00315 4 => true,
00316 5 => true
00317 ),
00318 'STYLES' => array(
00319 'KEYWORDS' => array(
00320 1 => 'color:#9966CC; font-weight:bold;',
00321 2 => 'color:#0000FF; font-weight:bold;',
00322 3 => 'color:#CC0066; font-weight:bold;',
00323 4 => 'color:#CC00FF; font-weight:bold;',
00324 5 => 'color:#5A0A0A; font-weight:bold;'
00325 ),
00326 'COMMENTS' => array(
00327 1 => 'color:#008000; font-style:italic;',
00328 'MULTI' => 'color:#000080; font-style:italic;'
00329 ),
00330 'ESCAPE_CHAR' => array(
00331 0 => 'color:#000099;'
00332 ),
00333 'BRACKETS' => array(
00334 0 => 'color:#006600; font-weight:bold;'
00335 ),
00336 'STRINGS' => array(
00337 0 => 'color:#996600;'
00338 ),
00339 'NUMBERS' => array(
00340 0 => 'color:#006666;'
00341 ),
00342 'METHODS' => array(
00343 1 => 'color:#9900CC;'
00344 ),
00345 'SYMBOLS' => array(
00346 0 => 'color:#006600; font-weight:bold;'
00347 ),
00348 'REGEXPS' => array(
00349 0 => 'color:#ff6633; font-weight:bold;',
00350 1 => 'color:#0066ff; font-weight:bold;',
00351 2 => 'color:#6666ff; font-weight:bold;',
00352 3 => 'color:#ff3333; font-weight:bold;'
00353 ),
00354 'SCRIPT' => array(
00355 0 => '',
00356 1 => '',
00357 2 => '',
00358 )
00359 ),
00360 'URLS' => array(
00361 1 => '',
00362 2 => '',
00363 3 => ''
00364 ),
00365 'OOLANG' => true,
00366 'OBJECT_SPLITTERS' => array(
00367 1 => '.'
00368 ),
00369 'REGEXPS' => array(
00370 0 => array(
00371 GESHI_SEARCH => "([[:space:]])(\\$[a-zA-Z_][a-zA-Z0-9_]*)",
00372 GESHI_REPLACE => '\\2',
00373 GESHI_MODIFIERS => '',
00374 GESHI_BEFORE => '\\1',
00375 GESHI_AFTER => ''
00376 ),
00377 1 => array(
00378 GESHI_SEARCH => "([[:space:]])(@[a-zA-Z_][a-zA-Z0-9_]*)",
00379 GESHI_REPLACE => '\\2',
00380 GESHI_MODIFIERS => '',
00381 GESHI_BEFORE => '\\1',
00382 GESHI_AFTER => ''
00383 ),
00384 2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*",
00385 3 => array(
00386 GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)",
00387 GESHI_REPLACE => '\\2',
00388 GESHI_MODIFIERS => '',
00389 GESHI_BEFORE => '\\1',
00390 GESHI_AFTER => ''
00391 )
00392 ),
00393 'STRICT_MODE_APPLIES' => GESHI_MAYBE,
00394 'SCRIPT_DELIMITERS' => array(
00395 0 => array(
00396 '<%' => '%>'
00397 )
00398 ),
00399 'HIGHLIGHT_STRICT_BLOCK' => array(
00400 0 => true,
00401 )
00402 );
00403
00404 ?>