friendly 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +23 -0
- data/APACHE-LICENSE +202 -0
- data/LICENSE +20 -0
- data/README.md +173 -0
- data/Rakefile +67 -0
- data/VERSION +1 -0
- data/examples/friendly.yml +7 -0
- data/friendly.gemspec +201 -0
- data/lib/friendly/attribute.rb +65 -0
- data/lib/friendly/boolean.rb +6 -0
- data/lib/friendly/cache/by_id.rb +33 -0
- data/lib/friendly/cache.rb +24 -0
- data/lib/friendly/config.rb +5 -0
- data/lib/friendly/data_store.rb +72 -0
- data/lib/friendly/document.rb +165 -0
- data/lib/friendly/document_table.rb +56 -0
- data/lib/friendly/index.rb +73 -0
- data/lib/friendly/memcached.rb +48 -0
- data/lib/friendly/newrelic.rb +6 -0
- data/lib/friendly/query.rb +42 -0
- data/lib/friendly/sequel_monkey_patches.rb +35 -0
- data/lib/friendly/storage.rb +31 -0
- data/lib/friendly/storage_factory.rb +24 -0
- data/lib/friendly/storage_proxy.rb +103 -0
- data/lib/friendly/table.rb +15 -0
- data/lib/friendly/table_creator.rb +43 -0
- data/lib/friendly/time.rb +14 -0
- data/lib/friendly/translator.rb +32 -0
- data/lib/friendly/uuid.rb +143 -0
- data/lib/friendly.rb +49 -0
- data/rails/init.rb +3 -0
- data/spec/fakes/data_store_fake.rb +29 -0
- data/spec/fakes/database_fake.rb +12 -0
- data/spec/fakes/dataset_fake.rb +28 -0
- data/spec/fakes/document.rb +18 -0
- data/spec/fakes/serializer_fake.rb +12 -0
- data/spec/fakes/time_fake.rb +12 -0
- data/spec/integration/basic_object_lifecycle_spec.rb +114 -0
- data/spec/integration/batch_insertion_spec.rb +29 -0
- data/spec/integration/convenience_api_spec.rb +25 -0
- data/spec/integration/count_spec.rb +12 -0
- data/spec/integration/default_value_spec.rb +15 -0
- data/spec/integration/find_via_cache_spec.rb +101 -0
- data/spec/integration/finder_spec.rb +64 -0
- data/spec/integration/index_spec.rb +57 -0
- data/spec/integration/pagination_spec.rb +63 -0
- data/spec/integration/table_creator_spec.rb +52 -0
- data/spec/integration/write_through_cache_spec.rb +53 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +90 -0
- data/spec/unit/attribute_spec.rb +64 -0
- data/spec/unit/cache_by_id_spec.rb +102 -0
- data/spec/unit/cache_spec.rb +21 -0
- data/spec/unit/config_spec.rb +4 -0
- data/spec/unit/data_store_spec.rb +188 -0
- data/spec/unit/document_spec.rb +311 -0
- data/spec/unit/document_table_spec.rb +126 -0
- data/spec/unit/friendly_spec.rb +25 -0
- data/spec/unit/index_spec.rb +196 -0
- data/spec/unit/memcached_spec.rb +114 -0
- data/spec/unit/query_spec.rb +104 -0
- data/spec/unit/storage_factory_spec.rb +59 -0
- data/spec/unit/storage_proxy_spec.rb +218 -0
- data/spec/unit/translator_spec.rb +96 -0
- data/website/index.html +210 -0
- data/website/scripts/clipboard.swf +0 -0
- data/website/scripts/shBrushAS3.js +61 -0
- data/website/scripts/shBrushBash.js +66 -0
- data/website/scripts/shBrushCSharp.js +67 -0
- data/website/scripts/shBrushColdFusion.js +102 -0
- data/website/scripts/shBrushCpp.js +99 -0
- data/website/scripts/shBrushCss.js +93 -0
- data/website/scripts/shBrushDelphi.js +57 -0
- data/website/scripts/shBrushDiff.js +43 -0
- data/website/scripts/shBrushErlang.js +54 -0
- data/website/scripts/shBrushGroovy.js +69 -0
- data/website/scripts/shBrushJScript.js +52 -0
- data/website/scripts/shBrushJava.js +59 -0
- data/website/scripts/shBrushJavaFX.js +60 -0
- data/website/scripts/shBrushPerl.js +74 -0
- data/website/scripts/shBrushPhp.js +91 -0
- data/website/scripts/shBrushPlain.js +35 -0
- data/website/scripts/shBrushPowerShell.js +76 -0
- data/website/scripts/shBrushPython.js +66 -0
- data/website/scripts/shBrushRuby.js +57 -0
- data/website/scripts/shBrushScala.js +53 -0
- data/website/scripts/shBrushSql.js +68 -0
- data/website/scripts/shBrushVb.js +58 -0
- data/website/scripts/shBrushXml.js +71 -0
- data/website/scripts/shCore.js +30 -0
- data/website/scripts/shLegacy.js +30 -0
- data/website/styles/friendly.css +103 -0
- data/website/styles/help.png +0 -0
- data/website/styles/ie.css +35 -0
- data/website/styles/magnifier.png +0 -0
- data/website/styles/page_white_code.png +0 -0
- data/website/styles/page_white_copy.png +0 -0
- data/website/styles/print.css +29 -0
- data/website/styles/printer.png +0 -0
- data/website/styles/screen.css +257 -0
- data/website/styles/shCore.css +330 -0
- data/website/styles/shThemeDefault.css +173 -0
- data/website/styles/shThemeDjango.css +176 -0
- data/website/styles/shThemeEclipse.css +190 -0
- data/website/styles/shThemeEmacs.css +175 -0
- data/website/styles/shThemeFadeToGrey.css +177 -0
- data/website/styles/shThemeMidnight.css +175 -0
- data/website/styles/shThemeRDark.css +175 -0
- metadata +264 -0
@@ -0,0 +1,93 @@
|
|
1
|
+
/**
|
2
|
+
* SyntaxHighlighter
|
3
|
+
* http://alexgorbatchev.com/
|
4
|
+
*
|
5
|
+
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
6
|
+
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
7
|
+
*
|
8
|
+
* @version
|
9
|
+
* 2.1.364 (October 15 2009)
|
10
|
+
*
|
11
|
+
* @copyright
|
12
|
+
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
13
|
+
*
|
14
|
+
* @license
|
15
|
+
* This file is part of SyntaxHighlighter.
|
16
|
+
*
|
17
|
+
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
18
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
19
|
+
* the Free Software Foundation, either version 3 of the License, or
|
20
|
+
* (at your option) any later version.
|
21
|
+
*
|
22
|
+
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
23
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25
|
+
* GNU General Public License for more details.
|
26
|
+
*
|
27
|
+
* You should have received a copy of the GNU General Public License
|
28
|
+
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
29
|
+
*/
|
30
|
+
SyntaxHighlighter.brushes.CSS = function()
|
31
|
+
{
|
32
|
+
function getKeywordsCSS(str)
|
33
|
+
{
|
34
|
+
return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
|
35
|
+
};
|
36
|
+
|
37
|
+
function getValuesCSS(str)
|
38
|
+
{
|
39
|
+
return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
|
40
|
+
};
|
41
|
+
|
42
|
+
var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' +
|
43
|
+
'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' +
|
44
|
+
'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' +
|
45
|
+
'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' +
|
46
|
+
'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' +
|
47
|
+
'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' +
|
48
|
+
'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' +
|
49
|
+
'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' +
|
50
|
+
'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' +
|
51
|
+
'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' +
|
52
|
+
'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' +
|
53
|
+
'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' +
|
54
|
+
'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' +
|
55
|
+
'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';
|
56
|
+
|
57
|
+
var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+
|
58
|
+
'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+
|
59
|
+
'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+
|
60
|
+
'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+
|
61
|
+
'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+
|
62
|
+
'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+
|
63
|
+
'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+
|
64
|
+
'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+
|
65
|
+
'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+
|
66
|
+
'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+
|
67
|
+
'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+
|
68
|
+
'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+
|
69
|
+
'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+
|
70
|
+
'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';
|
71
|
+
|
72
|
+
var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif';
|
73
|
+
|
74
|
+
this.regexList = [
|
75
|
+
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
76
|
+
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
77
|
+
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
78
|
+
{ regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors
|
79
|
+
{ regex: /(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g, css: 'value' }, // sizes
|
80
|
+
{ regex: /!important/g, css: 'color3' }, // !important
|
81
|
+
{ regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords
|
82
|
+
{ regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values
|
83
|
+
{ regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts
|
84
|
+
];
|
85
|
+
|
86
|
+
this.forHtmlScript({
|
87
|
+
left: /(<|<)\s*style.*?(>|>)/gi,
|
88
|
+
right: /(<|<)\/\s*style\s*(>|>)/gi
|
89
|
+
});
|
90
|
+
};
|
91
|
+
|
92
|
+
SyntaxHighlighter.brushes.CSS.prototype = new SyntaxHighlighter.Highlighter();
|
93
|
+
SyntaxHighlighter.brushes.CSS.aliases = ['css'];
|
@@ -0,0 +1,57 @@
|
|
1
|
+
/**
|
2
|
+
* SyntaxHighlighter
|
3
|
+
* http://alexgorbatchev.com/
|
4
|
+
*
|
5
|
+
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
6
|
+
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
7
|
+
*
|
8
|
+
* @version
|
9
|
+
* 2.1.364 (October 15 2009)
|
10
|
+
*
|
11
|
+
* @copyright
|
12
|
+
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
13
|
+
*
|
14
|
+
* @license
|
15
|
+
* This file is part of SyntaxHighlighter.
|
16
|
+
*
|
17
|
+
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
18
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
19
|
+
* the Free Software Foundation, either version 3 of the License, or
|
20
|
+
* (at your option) any later version.
|
21
|
+
*
|
22
|
+
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
23
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25
|
+
* GNU General Public License for more details.
|
26
|
+
*
|
27
|
+
* You should have received a copy of the GNU General Public License
|
28
|
+
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
29
|
+
*/
|
30
|
+
SyntaxHighlighter.brushes.Delphi = function()
|
31
|
+
{
|
32
|
+
var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' +
|
33
|
+
'case char class comp const constructor currency destructor div do double ' +
|
34
|
+
'downto else end except exports extended false file finalization finally ' +
|
35
|
+
'for function goto if implementation in inherited int64 initialization ' +
|
36
|
+
'integer interface is label library longint longword mod nil not object ' +
|
37
|
+
'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' +
|
38
|
+
'pint64 pointer private procedure program property pshortstring pstring ' +
|
39
|
+
'pvariant pwidechar pwidestring protected public published raise real real48 ' +
|
40
|
+
'record repeat set shl shortint shortstring shr single smallint string then ' +
|
41
|
+
'threadvar to true try type unit until uses val var varirnt while widechar ' +
|
42
|
+
'widestring with word write writeln xor';
|
43
|
+
|
44
|
+
this.regexList = [
|
45
|
+
{ regex: /\(\*[\s\S]*?\*\)/gm, css: 'comments' }, // multiline comments (* *)
|
46
|
+
{ regex: /{(?!\$)[\s\S]*?}/gm, css: 'comments' }, // multiline comments { }
|
47
|
+
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line
|
48
|
+
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
49
|
+
{ regex: /\{\$[a-zA-Z]+ .+\}/g, css: 'color1' }, // compiler Directives and Region tags
|
50
|
+
{ regex: /\b[\d\.]+\b/g, css: 'value' }, // numbers 12345
|
51
|
+
{ regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // numbers $F5D3
|
52
|
+
{ regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
|
53
|
+
];
|
54
|
+
};
|
55
|
+
|
56
|
+
SyntaxHighlighter.brushes.Delphi.prototype = new SyntaxHighlighter.Highlighter();
|
57
|
+
SyntaxHighlighter.brushes.Delphi.aliases = ['delphi', 'pascal', 'pas'];
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/**
|
2
|
+
* SyntaxHighlighter
|
3
|
+
* http://alexgorbatchev.com/
|
4
|
+
*
|
5
|
+
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
6
|
+
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
7
|
+
*
|
8
|
+
* @version
|
9
|
+
* 2.1.364 (October 15 2009)
|
10
|
+
*
|
11
|
+
* @copyright
|
12
|
+
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
13
|
+
*
|
14
|
+
* @license
|
15
|
+
* This file is part of SyntaxHighlighter.
|
16
|
+
*
|
17
|
+
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
18
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
19
|
+
* the Free Software Foundation, either version 3 of the License, or
|
20
|
+
* (at your option) any later version.
|
21
|
+
*
|
22
|
+
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
23
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25
|
+
* GNU General Public License for more details.
|
26
|
+
*
|
27
|
+
* You should have received a copy of the GNU General Public License
|
28
|
+
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
29
|
+
*/
|
30
|
+
SyntaxHighlighter.brushes.Diff = function()
|
31
|
+
{
|
32
|
+
this.regexList = [
|
33
|
+
{ regex: /^\+\+\+.*$/gm, css: 'color2' },
|
34
|
+
{ regex: /^\-\-\-.*$/gm, css: 'color2' },
|
35
|
+
{ regex: /^\s.*$/gm, css: 'color1' },
|
36
|
+
{ regex: /^@@.*@@$/gm, css: 'variable' },
|
37
|
+
{ regex: /^\+[^\+]{1}.*$/gm, css: 'string' },
|
38
|
+
{ regex: /^\-[^\-]{1}.*$/gm, css: 'comments' }
|
39
|
+
];
|
40
|
+
};
|
41
|
+
|
42
|
+
SyntaxHighlighter.brushes.Diff.prototype = new SyntaxHighlighter.Highlighter();
|
43
|
+
SyntaxHighlighter.brushes.Diff.aliases = ['diff', 'patch'];
|
@@ -0,0 +1,54 @@
|
|
1
|
+
/**
|
2
|
+
* SyntaxHighlighter
|
3
|
+
* http://alexgorbatchev.com/
|
4
|
+
*
|
5
|
+
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
6
|
+
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
7
|
+
*
|
8
|
+
* @version
|
9
|
+
* 2.1.364 (October 15 2009)
|
10
|
+
*
|
11
|
+
* @copyright
|
12
|
+
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
13
|
+
*
|
14
|
+
* @license
|
15
|
+
* This file is part of SyntaxHighlighter.
|
16
|
+
*
|
17
|
+
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
18
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
19
|
+
* the Free Software Foundation, either version 3 of the License, or
|
20
|
+
* (at your option) any later version.
|
21
|
+
*
|
22
|
+
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
23
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25
|
+
* GNU General Public License for more details.
|
26
|
+
*
|
27
|
+
* You should have received a copy of the GNU General Public License
|
28
|
+
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
29
|
+
*/
|
30
|
+
SyntaxHighlighter.brushes.Erlang = function()
|
31
|
+
{
|
32
|
+
// Contributed by Jean-Lou Dupont
|
33
|
+
// http://jldupont.blogspot.com/2009/06/erlang-syntax-highlighter.html
|
34
|
+
|
35
|
+
// According to: http://erlang.org/doc/reference_manual/introduction.html#1.5
|
36
|
+
var keywords = 'after and andalso band begin bnot bor bsl bsr bxor '+
|
37
|
+
'case catch cond div end fun if let not of or orelse '+
|
38
|
+
'query receive rem try when xor'+
|
39
|
+
// additional
|
40
|
+
' module export import define';
|
41
|
+
|
42
|
+
this.regexList = [
|
43
|
+
{ regex: new RegExp("[A-Z][A-Za-z0-9_]+", 'g'), css: 'constants' },
|
44
|
+
{ regex: new RegExp("\\%.+", 'gm'), css: 'comments' },
|
45
|
+
{ regex: new RegExp("\\?[A-Za-z0-9_]+", 'g'), css: 'preprocessor' },
|
46
|
+
{ regex: new RegExp("[a-z0-9_]+:[a-z0-9_]+", 'g'), css: 'functions' },
|
47
|
+
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
|
48
|
+
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
|
49
|
+
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
|
50
|
+
];
|
51
|
+
};
|
52
|
+
|
53
|
+
SyntaxHighlighter.brushes.Erlang.prototype = new SyntaxHighlighter.Highlighter();
|
54
|
+
SyntaxHighlighter.brushes.Erlang.aliases = ['erl', 'erlang'];
|
@@ -0,0 +1,69 @@
|
|
1
|
+
/**
|
2
|
+
* SyntaxHighlighter
|
3
|
+
* http://alexgorbatchev.com/
|
4
|
+
*
|
5
|
+
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
6
|
+
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
7
|
+
*
|
8
|
+
* @version
|
9
|
+
* 2.1.364 (October 15 2009)
|
10
|
+
*
|
11
|
+
* @copyright
|
12
|
+
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
13
|
+
*
|
14
|
+
* @license
|
15
|
+
* This file is part of SyntaxHighlighter.
|
16
|
+
*
|
17
|
+
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
18
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
19
|
+
* the Free Software Foundation, either version 3 of the License, or
|
20
|
+
* (at your option) any later version.
|
21
|
+
*
|
22
|
+
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
23
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25
|
+
* GNU General Public License for more details.
|
26
|
+
*
|
27
|
+
* You should have received a copy of the GNU General Public License
|
28
|
+
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
29
|
+
*/
|
30
|
+
SyntaxHighlighter.brushes.Groovy = function()
|
31
|
+
{
|
32
|
+
// Contributed by Andres Almiray
|
33
|
+
// http://jroller.com/aalmiray/entry/nice_source_code_syntax_highlighter
|
34
|
+
|
35
|
+
var keywords = 'as assert break case catch class continue def default do else extends finally ' +
|
36
|
+
'if in implements import instanceof interface new package property return switch ' +
|
37
|
+
'throw throws try while public protected private static';
|
38
|
+
var types = 'void boolean byte char short int long float double';
|
39
|
+
var constants = 'null';
|
40
|
+
var methods = 'allProperties count get size '+
|
41
|
+
'collect each eachProperty eachPropertyName eachWithIndex find findAll ' +
|
42
|
+
'findIndexOf grep inject max min reverseEach sort ' +
|
43
|
+
'asImmutable asSynchronized flatten intersect join pop reverse subMap toList ' +
|
44
|
+
'padRight padLeft contains eachMatch toCharacter toLong toUrl tokenize ' +
|
45
|
+
'eachFile eachFileRecurse eachB yte eachLine readBytes readLine getText ' +
|
46
|
+
'splitEachLine withReader append encodeBase64 decodeBase64 filterLine ' +
|
47
|
+
'transformChar transformLine withOutputStream withPrintWriter withStream ' +
|
48
|
+
'withStreams withWriter withWriterAppend write writeLine '+
|
49
|
+
'dump inspect invokeMethod print println step times upto use waitForOrKill '+
|
50
|
+
'getText';
|
51
|
+
|
52
|
+
this.regexList = [
|
53
|
+
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
54
|
+
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
55
|
+
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
56
|
+
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
57
|
+
{ regex: /""".*"""/g, css: 'string' }, // GStrings
|
58
|
+
{ regex: new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b', 'gi'), css: 'value' }, // numbers
|
59
|
+
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // goovy keyword
|
60
|
+
{ regex: new RegExp(this.getKeywords(types), 'gm'), css: 'color1' }, // goovy/java type
|
61
|
+
{ regex: new RegExp(this.getKeywords(constants), 'gm'), css: 'constants' }, // constants
|
62
|
+
{ regex: new RegExp(this.getKeywords(methods), 'gm'), css: 'functions' } // methods
|
63
|
+
];
|
64
|
+
|
65
|
+
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
|
66
|
+
}
|
67
|
+
|
68
|
+
SyntaxHighlighter.brushes.Groovy.prototype = new SyntaxHighlighter.Highlighter();
|
69
|
+
SyntaxHighlighter.brushes.Groovy.aliases = ['groovy'];
|
@@ -0,0 +1,52 @@
|
|
1
|
+
/**
|
2
|
+
* SyntaxHighlighter
|
3
|
+
* http://alexgorbatchev.com/
|
4
|
+
*
|
5
|
+
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
6
|
+
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
7
|
+
*
|
8
|
+
* @version
|
9
|
+
* 2.1.364 (October 15 2009)
|
10
|
+
*
|
11
|
+
* @copyright
|
12
|
+
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
13
|
+
*
|
14
|
+
* @license
|
15
|
+
* This file is part of SyntaxHighlighter.
|
16
|
+
*
|
17
|
+
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
18
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
19
|
+
* the Free Software Foundation, either version 3 of the License, or
|
20
|
+
* (at your option) any later version.
|
21
|
+
*
|
22
|
+
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
23
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25
|
+
* GNU General Public License for more details.
|
26
|
+
*
|
27
|
+
* You should have received a copy of the GNU General Public License
|
28
|
+
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
29
|
+
*/
|
30
|
+
SyntaxHighlighter.brushes.JScript = function()
|
31
|
+
{
|
32
|
+
var keywords = 'break case catch continue ' +
|
33
|
+
'default delete do else false ' +
|
34
|
+
'for function if in instanceof ' +
|
35
|
+
'new null return super switch ' +
|
36
|
+
'this throw true try typeof var while with'
|
37
|
+
;
|
38
|
+
|
39
|
+
this.regexList = [
|
40
|
+
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
41
|
+
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
42
|
+
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
43
|
+
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
44
|
+
{ regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
|
45
|
+
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
|
46
|
+
];
|
47
|
+
|
48
|
+
this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
|
49
|
+
};
|
50
|
+
|
51
|
+
SyntaxHighlighter.brushes.JScript.prototype = new SyntaxHighlighter.Highlighter();
|
52
|
+
SyntaxHighlighter.brushes.JScript.aliases = ['js', 'jscript', 'javascript'];
|
@@ -0,0 +1,59 @@
|
|
1
|
+
/**
|
2
|
+
* SyntaxHighlighter
|
3
|
+
* http://alexgorbatchev.com/
|
4
|
+
*
|
5
|
+
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
6
|
+
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
7
|
+
*
|
8
|
+
* @version
|
9
|
+
* 2.1.364 (October 15 2009)
|
10
|
+
*
|
11
|
+
* @copyright
|
12
|
+
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
13
|
+
*
|
14
|
+
* @license
|
15
|
+
* This file is part of SyntaxHighlighter.
|
16
|
+
*
|
17
|
+
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
18
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
19
|
+
* the Free Software Foundation, either version 3 of the License, or
|
20
|
+
* (at your option) any later version.
|
21
|
+
*
|
22
|
+
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
23
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25
|
+
* GNU General Public License for more details.
|
26
|
+
*
|
27
|
+
* You should have received a copy of the GNU General Public License
|
28
|
+
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
29
|
+
*/
|
30
|
+
SyntaxHighlighter.brushes.Java = function()
|
31
|
+
{
|
32
|
+
var keywords = 'abstract assert boolean break byte case catch char class const ' +
|
33
|
+
'continue default do double else enum extends ' +
|
34
|
+
'false final finally float for goto if implements import ' +
|
35
|
+
'instanceof int interface long native new null ' +
|
36
|
+
'package private protected public return ' +
|
37
|
+
'short static strictfp super switch synchronized this throw throws true ' +
|
38
|
+
'transient try void volatile while';
|
39
|
+
|
40
|
+
this.regexList = [
|
41
|
+
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
42
|
+
{ regex: /\/\*([^\*][\s\S]*)?\*\//gm, css: 'comments' }, // multiline comments
|
43
|
+
{ regex: /\/\*(?!\*\/)\*[\s\S]*?\*\//gm, css: 'preprocessor' }, // documentation comments
|
44
|
+
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
45
|
+
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
46
|
+
{ regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers
|
47
|
+
{ regex: /(?!\@interface\b)\@[\$\w]+\b/g, css: 'color1' }, // annotation @anno
|
48
|
+
{ regex: /\@interface\b/g, css: 'color2' }, // @interface keyword
|
49
|
+
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // java keyword
|
50
|
+
];
|
51
|
+
|
52
|
+
this.forHtmlScript({
|
53
|
+
left : /(<|<)%[@!=]?/g,
|
54
|
+
right : /%(>|>)/g
|
55
|
+
});
|
56
|
+
};
|
57
|
+
|
58
|
+
SyntaxHighlighter.brushes.Java.prototype = new SyntaxHighlighter.Highlighter();
|
59
|
+
SyntaxHighlighter.brushes.Java.aliases = ['java'];
|
@@ -0,0 +1,60 @@
|
|
1
|
+
/**
|
2
|
+
* SyntaxHighlighter
|
3
|
+
* http://alexgorbatchev.com/
|
4
|
+
*
|
5
|
+
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
6
|
+
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
7
|
+
*
|
8
|
+
* @version
|
9
|
+
* 2.1.364 (October 15 2009)
|
10
|
+
*
|
11
|
+
* @copyright
|
12
|
+
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
13
|
+
*
|
14
|
+
* @license
|
15
|
+
* This file is part of SyntaxHighlighter.
|
16
|
+
*
|
17
|
+
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
18
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
19
|
+
* the Free Software Foundation, either version 3 of the License, or
|
20
|
+
* (at your option) any later version.
|
21
|
+
*
|
22
|
+
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
23
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25
|
+
* GNU General Public License for more details.
|
26
|
+
*
|
27
|
+
* You should have received a copy of the GNU General Public License
|
28
|
+
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
29
|
+
*/
|
30
|
+
SyntaxHighlighter.brushes.JavaFX = function()
|
31
|
+
{
|
32
|
+
// Contributed by Patrick Webster
|
33
|
+
// http://patrickwebster.blogspot.com/2009/04/javafx-brush-for-syntaxhighlighter.html
|
34
|
+
var datatypes = 'Boolean Byte Character Double Duration '
|
35
|
+
+ 'Float Integer Long Number Short String Void'
|
36
|
+
;
|
37
|
+
|
38
|
+
var keywords = 'abstract after and as assert at before bind bound break catch class '
|
39
|
+
+ 'continue def delete else exclusive extends false finally first for from '
|
40
|
+
+ 'function if import in indexof init insert instanceof into inverse last '
|
41
|
+
+ 'lazy mixin mod nativearray new not null on or override package postinit '
|
42
|
+
+ 'protected public public-init public-read replace return reverse sizeof '
|
43
|
+
+ 'step super then this throw true try tween typeof var where while with '
|
44
|
+
+ 'attribute let private readonly static trigger'
|
45
|
+
;
|
46
|
+
|
47
|
+
this.regexList = [
|
48
|
+
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' },
|
49
|
+
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' },
|
50
|
+
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
|
51
|
+
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
|
52
|
+
{ regex: /(-?\.?)(\b(\d*\.?\d+|\d+\.?\d*)(e[+-]?\d+)?|0x[a-f\d]+)\b\.?/gi, css: 'color2' }, // numbers
|
53
|
+
{ regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'variable' }, // datatypes
|
54
|
+
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
|
55
|
+
];
|
56
|
+
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
|
57
|
+
};
|
58
|
+
|
59
|
+
SyntaxHighlighter.brushes.JavaFX.prototype = new SyntaxHighlighter.Highlighter();
|
60
|
+
SyntaxHighlighter.brushes.JavaFX.aliases = ['jfx', 'javafx'];
|
@@ -0,0 +1,74 @@
|
|
1
|
+
/**
|
2
|
+
* SyntaxHighlighter
|
3
|
+
* http://alexgorbatchev.com/
|
4
|
+
*
|
5
|
+
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
6
|
+
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
7
|
+
*
|
8
|
+
* @version
|
9
|
+
* 2.1.364 (October 15 2009)
|
10
|
+
*
|
11
|
+
* @copyright
|
12
|
+
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
13
|
+
*
|
14
|
+
* @license
|
15
|
+
* This file is part of SyntaxHighlighter.
|
16
|
+
*
|
17
|
+
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
18
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
19
|
+
* the Free Software Foundation, either version 3 of the License, or
|
20
|
+
* (at your option) any later version.
|
21
|
+
*
|
22
|
+
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
23
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25
|
+
* GNU General Public License for more details.
|
26
|
+
*
|
27
|
+
* You should have received a copy of the GNU General Public License
|
28
|
+
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
29
|
+
*/
|
30
|
+
SyntaxHighlighter.brushes.Perl = function()
|
31
|
+
{
|
32
|
+
// Contributed by David Simmons-Duffin and Marty Kube
|
33
|
+
|
34
|
+
var funcs =
|
35
|
+
'abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr ' +
|
36
|
+
'chroot close closedir connect cos crypt defined delete each endgrent ' +
|
37
|
+
'endhostent endnetent endprotoent endpwent endservent eof exec exists ' +
|
38
|
+
'exp fcntl fileno flock fork format formline getc getgrent getgrgid ' +
|
39
|
+
'getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr ' +
|
40
|
+
'getnetbyname getnetent getpeername getpgrp getppid getpriority ' +
|
41
|
+
'getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid ' +
|
42
|
+
'getservbyname getservbyport getservent getsockname getsockopt glob ' +
|
43
|
+
'gmtime grep hex index int ioctl join keys kill lc lcfirst length link ' +
|
44
|
+
'listen localtime lock log lstat map mkdir msgctl msgget msgrcv msgsnd ' +
|
45
|
+
'oct open opendir ord pack pipe pop pos print printf prototype push ' +
|
46
|
+
'quotemeta rand read readdir readline readlink readpipe recv rename ' +
|
47
|
+
'reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl ' +
|
48
|
+
'semget semop send setgrent sethostent setnetent setpgrp setpriority ' +
|
49
|
+
'setprotoent setpwent setservent setsockopt shift shmctl shmget shmread ' +
|
50
|
+
'shmwrite shutdown sin sleep socket socketpair sort splice split sprintf ' +
|
51
|
+
'sqrt srand stat study substr symlink syscall sysopen sysread sysseek ' +
|
52
|
+
'system syswrite tell telldir time times tr truncate uc ucfirst umask ' +
|
53
|
+
'undef unlink unpack unshift utime values vec wait waitpid warn write';
|
54
|
+
|
55
|
+
var keywords =
|
56
|
+
'bless caller continue dbmclose dbmopen die do dump else elsif eval exit ' +
|
57
|
+
'for foreach goto if import last local my next no our package redo ref ' +
|
58
|
+
'require return sub tie tied unless untie until use wantarray while';
|
59
|
+
|
60
|
+
this.regexList = [
|
61
|
+
{ regex: new RegExp('#[^!].*$', 'gm'), css: 'comments' },
|
62
|
+
{ regex: new RegExp('^\\s*#!.*$', 'gm'), css: 'preprocessor' }, // shebang
|
63
|
+
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
|
64
|
+
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
|
65
|
+
{ regex: new RegExp('(\\$|@|%)\\w+', 'g'), css: 'variable' },
|
66
|
+
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' },
|
67
|
+
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
|
68
|
+
];
|
69
|
+
|
70
|
+
this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
|
71
|
+
}
|
72
|
+
|
73
|
+
SyntaxHighlighter.brushes.Perl.prototype = new SyntaxHighlighter.Highlighter();
|
74
|
+
SyntaxHighlighter.brushes.Perl.aliases = ['perl', 'Perl', 'pl'];
|
@@ -0,0 +1,91 @@
|
|
1
|
+
/**
|
2
|
+
* SyntaxHighlighter
|
3
|
+
* http://alexgorbatchev.com/
|
4
|
+
*
|
5
|
+
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
6
|
+
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
7
|
+
*
|
8
|
+
* @version
|
9
|
+
* 2.1.364 (October 15 2009)
|
10
|
+
*
|
11
|
+
* @copyright
|
12
|
+
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
13
|
+
*
|
14
|
+
* @license
|
15
|
+
* This file is part of SyntaxHighlighter.
|
16
|
+
*
|
17
|
+
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
18
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
19
|
+
* the Free Software Foundation, either version 3 of the License, or
|
20
|
+
* (at your option) any later version.
|
21
|
+
*
|
22
|
+
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
23
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25
|
+
* GNU General Public License for more details.
|
26
|
+
*
|
27
|
+
* You should have received a copy of the GNU General Public License
|
28
|
+
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
|
29
|
+
*/
|
30
|
+
SyntaxHighlighter.brushes.Php = function()
|
31
|
+
{
|
32
|
+
var funcs = 'abs acos acosh addcslashes addslashes ' +
|
33
|
+
'array_change_key_case array_chunk array_combine array_count_values array_diff '+
|
34
|
+
'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+
|
35
|
+
'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+
|
36
|
+
'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+
|
37
|
+
'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+
|
38
|
+
'array_push array_rand array_reduce array_reverse array_search array_shift '+
|
39
|
+
'array_slice array_splice array_sum array_udiff array_udiff_assoc '+
|
40
|
+
'array_udiff_uassoc array_uintersect array_uintersect_assoc '+
|
41
|
+
'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+
|
42
|
+
'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+
|
43
|
+
'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+
|
44
|
+
'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+
|
45
|
+
'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+
|
46
|
+
'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+
|
47
|
+
'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+
|
48
|
+
'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+
|
49
|
+
'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+
|
50
|
+
'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+
|
51
|
+
'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+
|
52
|
+
'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+
|
53
|
+
'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+
|
54
|
+
'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+
|
55
|
+
'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+
|
56
|
+
'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+
|
57
|
+
'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+
|
58
|
+
'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+
|
59
|
+
'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+
|
60
|
+
'parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir '+
|
61
|
+
'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+
|
62
|
+
'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+
|
63
|
+
'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+
|
64
|
+
'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+
|
65
|
+
'strtoupper strtr strval substr substr_compare';
|
66
|
+
|
67
|
+
var keywords = 'and or xor array as break case ' +
|
68
|
+
'cfunction class const continue declare default die do else ' +
|
69
|
+
'elseif enddeclare endfor endforeach endif endswitch endwhile ' +
|
70
|
+
'extends for foreach function include include_once global if ' +
|
71
|
+
'new old_function return static switch use require require_once ' +
|
72
|
+
'var while abstract interface public implements extends private protected throw';
|
73
|
+
|
74
|
+
var constants = '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__';
|
75
|
+
|
76
|
+
this.regexList = [
|
77
|
+
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
78
|
+
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
79
|
+
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
80
|
+
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
81
|
+
{ regex: /\$\w+/g, css: 'variable' }, // variables
|
82
|
+
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // common functions
|
83
|
+
{ regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' }, // constants
|
84
|
+
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword
|
85
|
+
];
|
86
|
+
|
87
|
+
this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
|
88
|
+
};
|
89
|
+
|
90
|
+
SyntaxHighlighter.brushes.Php.prototype = new SyntaxHighlighter.Highlighter();
|
91
|
+
SyntaxHighlighter.brushes.Php.aliases = ['php'];
|