pygments.rb 0.5.4 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +40 -0
- data/README.md +3 -0
- data/lexers +0 -0
- data/lib/pygments/popen.rb +3 -2
- data/lib/pygments/version.rb +1 -1
- data/pygments.rb.gemspec +2 -1
- data/vendor/pygments-main/AUTHORS +20 -1
- data/vendor/pygments-main/CHANGES +55 -3
- data/vendor/pygments-main/LICENSE +1 -1
- data/vendor/pygments-main/MANIFEST.in +1 -1
- data/vendor/pygments-main/Makefile +5 -8
- data/vendor/pygments-main/REVISION +1 -1
- data/vendor/pygments-main/doc/Makefile +153 -0
- data/vendor/pygments-main/doc/_static/favicon.ico +0 -0
- data/vendor/pygments-main/doc/_static/logo_new.png +0 -0
- data/vendor/pygments-main/doc/_static/logo_only.png +0 -0
- data/vendor/pygments-main/doc/_templates/docssidebar.html +3 -0
- data/vendor/pygments-main/doc/_templates/indexsidebar.html +25 -0
- data/vendor/pygments-main/doc/_themes/pygments14/layout.html +98 -0
- data/vendor/pygments-main/doc/_themes/pygments14/static/bodybg.png +0 -0
- data/vendor/pygments-main/doc/_themes/pygments14/static/docbg.png +0 -0
- data/vendor/pygments-main/doc/_themes/pygments14/static/listitem.png +0 -0
- data/vendor/pygments-main/doc/_themes/pygments14/static/logo.png +0 -0
- data/vendor/pygments-main/doc/_themes/pygments14/static/pocoo.png +0 -0
- data/vendor/pygments-main/doc/_themes/pygments14/static/pygments14.css_t +401 -0
- data/vendor/pygments-main/doc/_themes/pygments14/theme.conf +15 -0
- data/vendor/pygments-main/doc/conf.py +249 -0
- data/vendor/pygments-main/doc/docs/api.rst +316 -0
- data/vendor/pygments-main/doc/docs/authors.rst +4 -0
- data/vendor/pygments-main/doc/docs/changelog.rst +1 -0
- data/vendor/pygments-main/{docs/src/cmdline.txt → doc/docs/cmdline.rst} +9 -11
- data/vendor/pygments-main/{docs/src/filterdevelopment.txt → doc/docs/filterdevelopment.rst} +1 -1
- data/vendor/pygments-main/{docs/src/filters.txt → doc/docs/filters.rst} +4 -5
- data/vendor/pygments-main/{docs/src/formatterdevelopment.txt → doc/docs/formatterdevelopment.rst} +1 -1
- data/vendor/pygments-main/{docs/src/formatters.txt → doc/docs/formatters.rst} +6 -6
- data/vendor/pygments-main/doc/docs/index.rst +66 -0
- data/vendor/pygments-main/{docs/src/integrate.txt → doc/docs/integrate.rst} +3 -7
- data/vendor/pygments-main/{docs/src/java.txt → doc/docs/java.rst} +0 -0
- data/vendor/pygments-main/{docs/src/lexerdevelopment.txt → doc/docs/lexerdevelopment.rst} +13 -14
- data/vendor/pygments-main/{docs/src/lexers.txt → doc/docs/lexers.rst} +7 -5
- data/vendor/pygments-main/{docs/src/moinmoin.txt → doc/docs/moinmoin.rst} +0 -0
- data/vendor/pygments-main/{docs/src/plugins.txt → doc/docs/plugins.rst} +0 -0
- data/vendor/pygments-main/{docs/src/quickstart.txt → doc/docs/quickstart.rst} +22 -19
- data/vendor/pygments-main/{docs/src/rstdirective.txt → doc/docs/rstdirective.rst} +0 -0
- data/vendor/pygments-main/{docs/src/styles.txt → doc/docs/styles.rst} +2 -2
- data/vendor/pygments-main/{docs/src/tokens.txt → doc/docs/tokens.rst} +10 -7
- data/vendor/pygments-main/{docs/src/unicode.txt → doc/docs/unicode.rst} +8 -7
- data/vendor/pygments-main/doc/download.rst +41 -0
- data/vendor/pygments-main/doc/faq.rst +143 -0
- data/vendor/pygments-main/doc/index.rst +53 -0
- data/vendor/pygments-main/doc/languages.rst +151 -0
- data/vendor/pygments-main/doc/make.bat +190 -0
- data/vendor/pygments-main/{docs → doc}/pygmentize.1 +0 -0
- data/vendor/pygments-main/external/autopygmentize +65 -48
- data/vendor/pygments-main/external/markdown-processor.py +15 -15
- data/vendor/pygments-main/external/moin-parser.py +1 -1
- data/vendor/pygments-main/external/rst-directive.py +2 -3
- data/vendor/pygments-main/ez_setup.py +340 -234
- data/vendor/pygments-main/pygments/__init__.py +4 -4
- data/vendor/pygments-main/pygments/cmdline.py +81 -68
- data/vendor/pygments-main/pygments/console.py +1 -1
- data/vendor/pygments-main/pygments/filter.py +1 -1
- data/vendor/pygments-main/pygments/filters/__init__.py +11 -9
- data/vendor/pygments-main/pygments/formatter.py +3 -3
- data/vendor/pygments-main/pygments/formatters/__init__.py +5 -3
- data/vendor/pygments-main/pygments/formatters/_mapping.py +16 -5
- data/vendor/pygments-main/pygments/formatters/bbcode.py +1 -1
- data/vendor/pygments-main/pygments/formatters/html.py +44 -26
- data/vendor/pygments-main/pygments/formatters/img.py +21 -14
- data/vendor/pygments-main/pygments/formatters/latex.py +104 -12
- data/vendor/pygments-main/pygments/formatters/other.py +53 -6
- data/vendor/pygments-main/pygments/formatters/rtf.py +30 -16
- data/vendor/pygments-main/pygments/formatters/svg.py +2 -2
- data/vendor/pygments-main/pygments/formatters/terminal.py +41 -1
- data/vendor/pygments-main/pygments/formatters/terminal256.py +2 -2
- data/vendor/pygments-main/pygments/lexer.py +59 -39
- data/vendor/pygments-main/pygments/lexers/__init__.py +38 -15
- data/vendor/pygments-main/pygments/lexers/_asybuiltins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_clbuiltins.py +15 -15
- data/vendor/pygments-main/pygments/lexers/_cocoabuiltins.py +73 -0
- data/vendor/pygments-main/pygments/lexers/_lassobuiltins.py +11 -1
- data/vendor/pygments-main/pygments/lexers/_luabuiltins.py +14 -8
- data/vendor/pygments-main/pygments/lexers/_mapping.py +81 -30
- data/vendor/pygments-main/pygments/lexers/_openedgebuiltins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_phpbuiltins.py +1067 -95
- data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +7 -7
- data/vendor/pygments-main/pygments/lexers/_robotframeworklexer.py +5 -4
- data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_sourcemodbuiltins.py +12 -7
- data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +112 -18
- data/vendor/pygments-main/pygments/lexers/_vimbuiltins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/agile.py +644 -382
- data/vendor/pygments-main/pygments/lexers/asm.py +66 -29
- data/vendor/pygments-main/pygments/lexers/compiled.py +1643 -174
- data/vendor/pygments-main/pygments/lexers/dalvik.py +27 -6
- data/vendor/pygments-main/pygments/lexers/dotnet.py +45 -33
- data/vendor/pygments-main/pygments/lexers/foxpro.py +3 -3
- data/vendor/pygments-main/pygments/lexers/functional.py +1510 -570
- data/vendor/pygments-main/pygments/lexers/graph.py +81 -0
- data/vendor/pygments-main/pygments/lexers/hdl.py +29 -30
- data/vendor/pygments-main/pygments/lexers/inferno.py +96 -0
- data/vendor/pygments-main/pygments/lexers/jvm.py +622 -207
- data/vendor/pygments-main/pygments/lexers/math.py +438 -70
- data/vendor/pygments-main/pygments/lexers/other.py +885 -171
- data/vendor/pygments-main/pygments/lexers/parsers.py +24 -24
- data/vendor/pygments-main/pygments/lexers/qbasic.py +157 -0
- data/vendor/pygments-main/pygments/lexers/rdf.py +99 -0
- data/vendor/pygments-main/pygments/lexers/shell.py +28 -25
- data/vendor/pygments-main/pygments/lexers/special.py +7 -8
- data/vendor/pygments-main/pygments/lexers/sql.py +56 -23
- data/vendor/pygments-main/pygments/lexers/templates.py +377 -59
- data/vendor/pygments-main/pygments/lexers/text.py +208 -46
- data/vendor/pygments-main/pygments/lexers/web.py +729 -264
- data/vendor/pygments-main/pygments/modeline.py +1 -1
- data/vendor/pygments-main/pygments/plugin.py +1 -1
- data/vendor/pygments-main/pygments/scanner.py +1 -1
- data/vendor/pygments-main/pygments/sphinxext.py +153 -0
- data/vendor/pygments-main/pygments/style.py +3 -2
- data/vendor/pygments-main/pygments/styles/__init__.py +5 -1
- data/vendor/pygments-main/pygments/styles/autumn.py +1 -1
- data/vendor/pygments-main/pygments/styles/borland.py +1 -1
- data/vendor/pygments-main/pygments/styles/bw.py +1 -1
- data/vendor/pygments-main/pygments/styles/colorful.py +1 -1
- data/vendor/pygments-main/pygments/styles/default.py +1 -1
- data/vendor/pygments-main/pygments/styles/emacs.py +1 -1
- data/vendor/pygments-main/pygments/styles/friendly.py +1 -1
- data/vendor/pygments-main/pygments/styles/fruity.py +1 -1
- data/vendor/pygments-main/pygments/styles/igor.py +29 -0
- data/vendor/pygments-main/pygments/styles/manni.py +1 -1
- data/vendor/pygments-main/pygments/styles/monokai.py +4 -4
- data/vendor/pygments-main/pygments/styles/murphy.py +1 -1
- data/vendor/pygments-main/pygments/styles/native.py +1 -1
- data/vendor/pygments-main/pygments/styles/paraiso_dark.py +125 -0
- data/vendor/pygments-main/pygments/styles/paraiso_light.py +125 -0
- data/vendor/pygments-main/pygments/styles/pastie.py +1 -1
- data/vendor/pygments-main/pygments/styles/perldoc.py +1 -1
- data/vendor/pygments-main/pygments/styles/rrt.py +1 -1
- data/vendor/pygments-main/pygments/styles/tango.py +1 -1
- data/vendor/pygments-main/pygments/styles/trac.py +1 -1
- data/vendor/pygments-main/pygments/styles/vim.py +1 -1
- data/vendor/pygments-main/pygments/styles/vs.py +1 -1
- data/vendor/pygments-main/pygments/styles/xcode.py +51 -0
- data/vendor/pygments-main/pygments/token.py +4 -1
- data/vendor/pygments-main/pygments/unistring.py +6 -5
- data/vendor/pygments-main/pygments/util.py +35 -21
- data/vendor/pygments-main/scripts/check_sources.py +28 -44
- data/vendor/pygments-main/scripts/detect_missing_analyse_text.py +5 -4
- data/vendor/pygments-main/scripts/find_codetags.py +27 -19
- data/vendor/pygments-main/scripts/find_error.py +16 -13
- data/vendor/pygments-main/scripts/get_vimkw.py +3 -3
- data/vendor/pygments-main/scripts/vim2pygments.py +9 -7
- data/vendor/pygments-main/setup.py +19 -19
- data/vendor/pygments-main/tests/examplefiles/99_bottles_of_beer.chpl +118 -0
- data/vendor/pygments-main/tests/examplefiles/Error.pmod +38 -0
- data/vendor/pygments-main/tests/examplefiles/FakeFile.pike +360 -0
- data/vendor/pygments-main/tests/examplefiles/{ANTLRv3.g → antlr_ANTLRv3.g} +0 -0
- data/vendor/pygments-main/tests/examplefiles/clojure-weird-keywords.clj +5 -0
- data/vendor/pygments-main/tests/examplefiles/core.cljs +52 -0
- data/vendor/pygments-main/tests/examplefiles/demo.cfm +13 -1
- data/vendor/pygments-main/tests/examplefiles/demo.hbs +12 -0
- data/vendor/pygments-main/tests/examplefiles/ember.handlebars +33 -0
- data/vendor/pygments-main/tests/examplefiles/example.als +217 -0
- data/vendor/pygments-main/tests/examplefiles/example.c +1 -1
- data/vendor/pygments-main/tests/examplefiles/example.chai +6 -0
- data/vendor/pygments-main/tests/examplefiles/example.coffee +27 -0
- data/vendor/pygments-main/tests/examplefiles/example.e +124 -0
- data/vendor/pygments-main/tests/examplefiles/example.f90 +8 -0
- data/vendor/pygments-main/tests/examplefiles/example.feature +16 -0
- data/vendor/pygments-main/tests/examplefiles/example.gd +23 -0
- data/vendor/pygments-main/tests/examplefiles/example.gi +64 -0
- data/vendor/pygments-main/tests/examplefiles/example.groovy +2 -0
- data/vendor/pygments-main/tests/examplefiles/example.hs +27 -0
- data/vendor/pygments-main/tests/examplefiles/example.hx +44 -1
- data/vendor/pygments-main/tests/examplefiles/example.i6t +32 -0
- data/vendor/pygments-main/tests/examplefiles/example.i7x +45 -0
- data/vendor/pygments-main/tests/examplefiles/example.inf +374 -0
- data/vendor/pygments-main/tests/examplefiles/example.j +564 -0
- data/vendor/pygments-main/tests/examplefiles/example.java +16 -0
- data/vendor/pygments-main/tests/examplefiles/example.kal +75 -0
- data/vendor/pygments-main/tests/examplefiles/example.liquid +42 -0
- data/vendor/pygments-main/tests/examplefiles/example.ma +8 -0
- data/vendor/pygments-main/tests/examplefiles/example.mq4 +187 -0
- data/vendor/pygments-main/tests/examplefiles/example.mqh +123 -0
- data/vendor/pygments-main/tests/examplefiles/example.ni +57 -0
- data/vendor/pygments-main/tests/examplefiles/example.nix +80 -0
- data/vendor/pygments-main/tests/examplefiles/example.pp +8 -0
- data/vendor/pygments-main/tests/examplefiles/example.red +257 -0
- data/vendor/pygments-main/tests/examplefiles/example.reds +150 -0
- data/vendor/pygments-main/tests/examplefiles/example.rkt +677 -29
- data/vendor/pygments-main/tests/examplefiles/example.sh +22 -0
- data/vendor/pygments-main/tests/examplefiles/example.slim +31 -0
- data/vendor/pygments-main/tests/examplefiles/example.sls +51 -0
- data/vendor/pygments-main/tests/examplefiles/example.stan +2 -0
- data/vendor/pygments-main/tests/examplefiles/example.todotxt +9 -0
- data/vendor/pygments-main/tests/examplefiles/exampleScript.cfc +241 -0
- data/vendor/pygments-main/tests/examplefiles/exampleTag.cfc +18 -0
- data/vendor/pygments-main/tests/examplefiles/example_elixir.ex +192 -350
- data/vendor/pygments-main/tests/examplefiles/hash_syntax.rb +5 -0
- data/vendor/pygments-main/tests/examplefiles/hello.at +6 -0
- data/vendor/pygments-main/tests/examplefiles/hello.golo +5 -0
- data/vendor/pygments-main/tests/examplefiles/hello.lsl +12 -0
- data/vendor/pygments-main/tests/examplefiles/{File.hy → hybris_File.hy} +0 -0
- data/vendor/pygments-main/tests/examplefiles/{mg_sample.pro → idl_sample.pro} +0 -0
- data/vendor/pygments-main/tests/examplefiles/iex_example +23 -0
- data/vendor/pygments-main/tests/examplefiles/inet_pton6.dg +24 -24
- data/vendor/pygments-main/tests/examplefiles/language.hy +165 -0
- data/vendor/pygments-main/tests/examplefiles/limbo.b +456 -0
- data/vendor/pygments-main/tests/examplefiles/livescript-demo.ls +3 -1
- data/vendor/pygments-main/tests/examplefiles/main.cmake +2 -0
- data/vendor/pygments-main/tests/examplefiles/objc_example.m +163 -16
- data/vendor/pygments-main/tests/examplefiles/{example.p → openedge_example} +0 -0
- data/vendor/pygments-main/tests/examplefiles/pawn_example +25 -0
- data/vendor/pygments-main/tests/examplefiles/qbasic_example +2 -0
- data/vendor/pygments-main/tests/examplefiles/r6rs-comments.scm +23 -0
- data/vendor/pygments-main/tests/examplefiles/{robotframework.txt → robotframework_test.txt} +0 -0
- data/vendor/pygments-main/tests/examplefiles/rql-queries.rql +34 -0
- data/vendor/pygments-main/tests/examplefiles/scope.cirru +43 -0
- data/vendor/pygments-main/tests/examplefiles/sparql.rq +23 -0
- data/vendor/pygments-main/tests/examplefiles/test.R +37 -5
- data/vendor/pygments-main/tests/examplefiles/test.apl +26 -0
- data/vendor/pygments-main/tests/examplefiles/test.cyp +123 -0
- data/vendor/pygments-main/tests/examplefiles/test.idr +93 -0
- data/vendor/pygments-main/tests/examplefiles/test.mask +41 -0
- data/vendor/pygments-main/tests/examplefiles/test.pan +54 -0
- data/vendor/pygments-main/tests/examplefiles/test.php +3 -1
- data/vendor/pygments-main/tests/examplefiles/test.pig +148 -0
- data/vendor/pygments-main/tests/examplefiles/test.pwn +253 -0
- data/vendor/pygments-main/tests/examplefiles/test.r3 +27 -7
- data/vendor/pygments-main/tests/examplefiles/test.rsl +111 -0
- data/vendor/pygments-main/tests/examplefiles/test.swift +65 -0
- data/vendor/pygments-main/tests/examplefiles/test.zep +33 -0
- data/vendor/pygments-main/tests/examplefiles/unicode.go +10 -0
- data/vendor/pygments-main/tests/examplefiles/{test.bas → vbnet_test.bas} +0 -0
- data/vendor/pygments-main/tests/examplefiles/vctreestatus_hg +4 -0
- data/vendor/pygments-main/tests/examplefiles/vimrc +21 -0
- data/vendor/pygments-main/tests/run.py +14 -19
- data/vendor/pygments-main/tests/string_asserts.py +22 -0
- data/vendor/pygments-main/tests/test_basic_api.py +28 -14
- data/vendor/pygments-main/tests/test_cfm.py +46 -0
- data/vendor/pygments-main/tests/test_clexer.py +208 -3
- data/vendor/pygments-main/tests/test_cmdline.py +6 -5
- data/vendor/pygments-main/tests/test_examplefiles.py +30 -19
- data/vendor/pygments-main/tests/test_html_formatter.py +15 -13
- data/vendor/pygments-main/tests/test_latex_formatter.py +4 -2
- data/vendor/pygments-main/tests/test_lexers_other.py +11 -11
- data/vendor/pygments-main/tests/test_objectiveclexer.py +81 -0
- data/vendor/pygments-main/tests/test_perllexer.py +1 -1
- data/vendor/pygments-main/tests/test_qbasiclexer.py +43 -0
- data/vendor/pygments-main/tests/test_regexlexer.py +8 -1
- data/vendor/pygments-main/tests/test_rtf_formatter.py +109 -0
- data/vendor/pygments-main/tests/test_string_asserts.py +39 -0
- data/vendor/pygments-main/tests/test_token.py +3 -3
- data/vendor/pygments-main/tests/test_using_api.py +1 -1
- data/vendor/pygments-main/tests/test_util.py +1 -1
- metadata +138 -51
- data/vendor/pygments-main/docs/generate.py +0 -472
- data/vendor/pygments-main/docs/src/api.txt +0 -270
- data/vendor/pygments-main/docs/src/authors.txt +0 -5
- data/vendor/pygments-main/docs/src/changelog.txt +0 -5
- data/vendor/pygments-main/docs/src/index.txt +0 -69
- data/vendor/pygments-main/docs/src/installation.txt +0 -71
- data/vendor/pygments-main/external/rst-directive-old.py +0 -77
- data/vendor/pygments-main/scripts/reindent.py +0 -291
- data/vendor/pygments-main/tests/examplefiles/import.hs +0 -4
- data/vendor/pygments-main/tests/examplefiles/objc_example2.m +0 -24
- data/vendor/pygments-main/tests/old_run.py +0 -138
@@ -0,0 +1,57 @@
|
|
1
|
+
| | |
|
2
|
+
"Informal by Nature"
|
3
|
+
[ * * * ]
|
4
|
+
by
|
5
|
+
[ * * * ]
|
6
|
+
David Corbett
|
7
|
+
|
8
|
+
[This is a [nested] comment.]
|
9
|
+
|
10
|
+
Section 1 - Use option translation
|
11
|
+
|
12
|
+
Use maximum tests of at least 100 translates as (-
|
13
|
+
@c
|
14
|
+
Constant MAX_TESTS = {N}; —). | Section 2
|
15
|
+
|
16
|
+
A room has a number called size.
|
17
|
+
|
18
|
+
The Kitchen is a room. "A nondescript kitchen.“ The Kitchen has size 2.
|
19
|
+
|
20
|
+
When play begins:
|
21
|
+
say "Testing:[line break]";
|
22
|
+
test 0.
|
23
|
+
|
24
|
+
To test (N — number): (—
|
25
|
+
if (Test({N}) == (+size of the Kitchen [this should succeed]+)) {-open—brace}
|
26
|
+
print ”Success.^”;
|
27
|
+
{-close-brace} else {
|
28
|
+
print “Failure.^";
|
29
|
+
}
|
30
|
+
]; ! You shouldn't end a routine within a phrase definition, but it works.
|
31
|
+
[ Unused;
|
32
|
+
#Include "\
|
33
|
+
@p \
|
34
|
+
"; ! At signs hold no power here.
|
35
|
+
! Of course, the file "@p .h" must exist.
|
36
|
+
-).
|
37
|
+
|
38
|
+
Include (-!% This is not ICL.
|
39
|
+
|
40
|
+
[ Test x;
|
41
|
+
if (x) {x++;}
|
42
|
+
{–! Single line comment.}
|
43
|
+
@inc x;
|
44
|
+
@p At signs.
|
45
|
+
...
|
46
|
+
@Purpose: ...
|
47
|
+
...
|
48
|
+
@-...
|
49
|
+
@c ...
|
50
|
+
@inc x;
|
51
|
+
@c
|
52
|
+
@c
|
53
|
+
return x;
|
54
|
+
];
|
55
|
+
@Purpose: ...
|
56
|
+
@-------------------------------------------------------------------------------
|
57
|
+
-).
|
@@ -0,0 +1,80 @@
|
|
1
|
+
{ stdenv, fetchurl, fetchgit, openssl, zlib, pcre, libxml2, libxslt, expat
|
2
|
+
, rtmp ? false
|
3
|
+
, fullWebDAV ? false
|
4
|
+
, syslog ? false
|
5
|
+
, moreheaders ? false, ...}:
|
6
|
+
|
7
|
+
let
|
8
|
+
version = "1.4.4";
|
9
|
+
mainSrc = fetchurl {
|
10
|
+
url = "http://nginx.org/download/nginx-${version}.tar.gz";
|
11
|
+
sha256 = "1f82845mpgmhvm151fhn2cnqjggw9w7cvsqbva9rb320wmc9m63w";
|
12
|
+
};
|
13
|
+
|
14
|
+
rtmp-ext = fetchgit {
|
15
|
+
url = git://github.com/arut/nginx-rtmp-module.git;
|
16
|
+
rev = "1cfb7aeb582789f3b15a03da5b662d1811e2a3f1";
|
17
|
+
sha256 = "03ikfd2l8mzsjwx896l07rdrw5jn7jjfdiyl572yb9jfrnk48fwi";
|
18
|
+
};
|
19
|
+
|
20
|
+
dav-ext = fetchgit {
|
21
|
+
url = git://github.com/arut/nginx-dav-ext-module.git;
|
22
|
+
rev = "54cebc1f21fc13391aae692c6cce672fa7986f9d";
|
23
|
+
sha256 = "1dvpq1fg5rslnl05z8jc39sgnvh3akam9qxfl033akpczq1bh8nq";
|
24
|
+
};
|
25
|
+
|
26
|
+
syslog-ext = fetchgit {
|
27
|
+
url = https://github.com/yaoweibin/nginx_syslog_patch.git;
|
28
|
+
rev = "165affd9741f0e30c4c8225da5e487d33832aca3";
|
29
|
+
sha256 = "14dkkafjnbapp6jnvrjg9ip46j00cr8pqc2g7374z9aj7hrvdvhs";
|
30
|
+
};
|
31
|
+
|
32
|
+
moreheaders-ext = fetchgit {
|
33
|
+
url = https://github.com/agentzh/headers-more-nginx-module.git;
|
34
|
+
rev = "refs/tags/v0.23";
|
35
|
+
sha256 = "12pbjgsxnvcf2ff2i2qdn39q4cm5czlgrng96j8ml4cgxvnbdh39";
|
36
|
+
};
|
37
|
+
in
|
38
|
+
|
39
|
+
stdenv.mkDerivation rec {
|
40
|
+
name = "nginx-${version}";
|
41
|
+
src = mainSrc;
|
42
|
+
|
43
|
+
buildInputs = [ openssl zlib pcre libxml2 libxslt
|
44
|
+
] ++ stdenv.lib.optional fullWebDAV expat;
|
45
|
+
|
46
|
+
patches = if syslog then [ "${syslog-ext}/syslog_1.4.0.patch" ] else [];
|
47
|
+
|
48
|
+
configureFlags = [
|
49
|
+
"--with-http_ssl_module"
|
50
|
+
"--with-http_spdy_module"
|
51
|
+
"--with-http_xslt_module"
|
52
|
+
"--with-http_sub_module"
|
53
|
+
"--with-http_dav_module"
|
54
|
+
"--with-http_gzip_static_module"
|
55
|
+
"--with-http_secure_link_module"
|
56
|
+
"--with-ipv6"
|
57
|
+
# Install destination problems
|
58
|
+
# "--with-http_perl_module"
|
59
|
+
] ++ stdenv.lib.optional rtmp "--add-module=${rtmp-ext}"
|
60
|
+
++ stdenv.lib.optional fullWebDAV "--add-module=${dav-ext}"
|
61
|
+
++ stdenv.lib.optional syslog "--add-module=${syslog-ext}"
|
62
|
+
++ stdenv.lib.optional moreheaders "--add-module=${moreheaders-ext}";
|
63
|
+
|
64
|
+
preConfigure = ''
|
65
|
+
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2 }/include/libxml2"
|
66
|
+
'';
|
67
|
+
|
68
|
+
# escape example
|
69
|
+
postInstall = ''
|
70
|
+
mv $out/sbin $out/bin ''' ''${
|
71
|
+
${ if true then ${ "" } else false }
|
72
|
+
'';
|
73
|
+
|
74
|
+
meta = {
|
75
|
+
description = "A reverse proxy and lightweight webserver";
|
76
|
+
maintainers = [ stdenv.lib.maintainers.raskin];
|
77
|
+
platforms = stdenv.lib.platforms.all;
|
78
|
+
inherit version;
|
79
|
+
};
|
80
|
+
}
|
@@ -0,0 +1,257 @@
|
|
1
|
+
Red [
|
2
|
+
Title: "Red console"
|
3
|
+
Author: ["Nenad Rakocevic" "Kaj de Vos"]
|
4
|
+
File: %console.red
|
5
|
+
Tabs: 4
|
6
|
+
Rights: "Copyright (C) 2012-2013 Nenad Rakocevic. All rights reserved."
|
7
|
+
License: {
|
8
|
+
Distributed under the Boost Software License, Version 1.0.
|
9
|
+
See https://github.com/dockimbel/Red/blob/master/BSL-License.txt
|
10
|
+
}
|
11
|
+
Purpose: "Just some code for testing Pygments colorizer"
|
12
|
+
Language: http://www.red-lang.org/
|
13
|
+
]
|
14
|
+
|
15
|
+
#system-global [
|
16
|
+
#either OS = 'Windows [
|
17
|
+
#import [
|
18
|
+
"kernel32.dll" stdcall [
|
19
|
+
AttachConsole: "AttachConsole" [
|
20
|
+
processID [integer!]
|
21
|
+
return: [integer!]
|
22
|
+
]
|
23
|
+
SetConsoleTitle: "SetConsoleTitleA" [
|
24
|
+
title [c-string!]
|
25
|
+
return: [integer!]
|
26
|
+
]
|
27
|
+
ReadConsole: "ReadConsoleA" [
|
28
|
+
consoleInput [integer!]
|
29
|
+
buffer [byte-ptr!]
|
30
|
+
charsToRead [integer!]
|
31
|
+
numberOfChars [int-ptr!]
|
32
|
+
inputControl [int-ptr!]
|
33
|
+
return: [integer!]
|
34
|
+
]
|
35
|
+
]
|
36
|
+
]
|
37
|
+
line-buffer-size: 16 * 1024
|
38
|
+
line-buffer: allocate line-buffer-size
|
39
|
+
][
|
40
|
+
#switch OS [
|
41
|
+
MacOSX [
|
42
|
+
#define ReadLine-library "libreadline.dylib"
|
43
|
+
]
|
44
|
+
#default [
|
45
|
+
#define ReadLine-library "libreadline.so.6"
|
46
|
+
#define History-library "libhistory.so.6"
|
47
|
+
]
|
48
|
+
]
|
49
|
+
#import [
|
50
|
+
ReadLine-library cdecl [
|
51
|
+
read-line: "readline" [ ; Read a line from the console.
|
52
|
+
prompt [c-string!]
|
53
|
+
return: [c-string!]
|
54
|
+
]
|
55
|
+
rl-bind-key: "rl_bind_key" [
|
56
|
+
key [integer!]
|
57
|
+
command [integer!]
|
58
|
+
return: [integer!]
|
59
|
+
]
|
60
|
+
rl-insert: "rl_insert" [
|
61
|
+
count [integer!]
|
62
|
+
key [integer!]
|
63
|
+
return: [integer!]
|
64
|
+
]
|
65
|
+
]
|
66
|
+
#if OS <> 'MacOSX [
|
67
|
+
History-library cdecl [
|
68
|
+
add-history: "add_history" [ ; Add line to the history.
|
69
|
+
line [c-string!]
|
70
|
+
]
|
71
|
+
]
|
72
|
+
]
|
73
|
+
]
|
74
|
+
|
75
|
+
rl-insert-wrapper: func [
|
76
|
+
[cdecl]
|
77
|
+
count [integer!]
|
78
|
+
key [integer!]
|
79
|
+
return: [integer!]
|
80
|
+
][
|
81
|
+
rl-insert count key
|
82
|
+
]
|
83
|
+
|
84
|
+
]
|
85
|
+
]
|
86
|
+
|
87
|
+
Windows?: system/platform = 'Windows
|
88
|
+
|
89
|
+
read-argument: routine [
|
90
|
+
/local
|
91
|
+
args [str-array!]
|
92
|
+
str [red-string!]
|
93
|
+
][
|
94
|
+
if system/args-count <> 2 [
|
95
|
+
SET_RETURN(none-value)
|
96
|
+
exit
|
97
|
+
]
|
98
|
+
args: system/args-list + 1 ;-- skip binary filename
|
99
|
+
str: simple-io/read-txt args/item
|
100
|
+
SET_RETURN(str)
|
101
|
+
]
|
102
|
+
|
103
|
+
init-console: routine [
|
104
|
+
str [string!]
|
105
|
+
/local
|
106
|
+
ret
|
107
|
+
][
|
108
|
+
#either OS = 'Windows [
|
109
|
+
;ret: AttachConsole -1
|
110
|
+
;if zero? ret [print-line "ReadConsole failed!" halt]
|
111
|
+
|
112
|
+
ret: SetConsoleTitle as c-string! string/rs-head str
|
113
|
+
if zero? ret [print-line "SetConsoleTitle failed!" halt]
|
114
|
+
][
|
115
|
+
rl-bind-key as-integer tab as-integer :rl-insert-wrapper
|
116
|
+
]
|
117
|
+
]
|
118
|
+
|
119
|
+
input: routine [
|
120
|
+
prompt [string!]
|
121
|
+
/local
|
122
|
+
len ret str buffer line
|
123
|
+
][
|
124
|
+
#either OS = 'Windows [
|
125
|
+
len: 0
|
126
|
+
print as c-string! string/rs-head prompt
|
127
|
+
ret: ReadConsole stdin line-buffer line-buffer-size :len null
|
128
|
+
if zero? ret [print-line "ReadConsole failed!" halt]
|
129
|
+
len: len + 1
|
130
|
+
line-buffer/len: null-byte
|
131
|
+
str: string/load as c-string! line-buffer len
|
132
|
+
][
|
133
|
+
line: read-line as c-string! string/rs-head prompt
|
134
|
+
if line = null [halt] ; EOF
|
135
|
+
|
136
|
+
#if OS <> 'MacOSX [add-history line]
|
137
|
+
|
138
|
+
str: string/load line 1 + length? line
|
139
|
+
; free as byte-ptr! line
|
140
|
+
]
|
141
|
+
SET_RETURN(str)
|
142
|
+
]
|
143
|
+
|
144
|
+
count-delimiters: function [
|
145
|
+
buffer [string!]
|
146
|
+
return: [block!]
|
147
|
+
][
|
148
|
+
list: copy [0 0]
|
149
|
+
c: none
|
150
|
+
|
151
|
+
foreach c buffer [
|
152
|
+
case [
|
153
|
+
escaped? [
|
154
|
+
escaped?: no
|
155
|
+
]
|
156
|
+
in-comment? [
|
157
|
+
switch c [
|
158
|
+
#"^/" [in-comment?: no]
|
159
|
+
]
|
160
|
+
]
|
161
|
+
'else [
|
162
|
+
switch c [
|
163
|
+
#"^^" [escaped?: yes]
|
164
|
+
#";" [if zero? list/2 [in-comment?: yes]]
|
165
|
+
#"[" [list/1: list/1 + 1]
|
166
|
+
#"]" [list/1: list/1 - 1]
|
167
|
+
#"{" [list/2: list/2 + 1]
|
168
|
+
#"}" [list/2: list/2 - 1]
|
169
|
+
]
|
170
|
+
]
|
171
|
+
]
|
172
|
+
]
|
173
|
+
list
|
174
|
+
]
|
175
|
+
|
176
|
+
do-console: function [][
|
177
|
+
buffer: make string! 10000
|
178
|
+
prompt: red-prompt: "red>> "
|
179
|
+
mode: 'mono
|
180
|
+
|
181
|
+
switch-mode: [
|
182
|
+
mode: case [
|
183
|
+
cnt/1 > 0 ['block]
|
184
|
+
cnt/2 > 0 ['string]
|
185
|
+
'else [
|
186
|
+
prompt: red-prompt
|
187
|
+
do eval
|
188
|
+
'mono
|
189
|
+
]
|
190
|
+
]
|
191
|
+
prompt: switch mode [
|
192
|
+
block ["[^-"]
|
193
|
+
string ["{^-"]
|
194
|
+
mono [red-prompt]
|
195
|
+
]
|
196
|
+
]
|
197
|
+
|
198
|
+
eval: [
|
199
|
+
code: load/all buffer
|
200
|
+
|
201
|
+
unless tail? code [
|
202
|
+
set/any 'result do code
|
203
|
+
|
204
|
+
unless unset? :result [
|
205
|
+
if 67 = length? result: mold/part :result 67 [ ;-- optimized for width = 72
|
206
|
+
clear back tail result
|
207
|
+
append result "..."
|
208
|
+
]
|
209
|
+
print ["==" result]
|
210
|
+
]
|
211
|
+
]
|
212
|
+
clear buffer
|
213
|
+
]
|
214
|
+
|
215
|
+
while [true][
|
216
|
+
unless tail? line: input prompt [
|
217
|
+
append buffer line
|
218
|
+
cnt: count-delimiters buffer
|
219
|
+
|
220
|
+
either Windows? [
|
221
|
+
remove skip tail buffer -2 ;-- clear extra CR (Windows)
|
222
|
+
][
|
223
|
+
append buffer lf ;-- Unix
|
224
|
+
]
|
225
|
+
|
226
|
+
switch mode [
|
227
|
+
block [if cnt/1 <= 0 [do switch-mode]]
|
228
|
+
string [if cnt/2 <= 0 [do switch-mode]]
|
229
|
+
mono [do either any [cnt/1 > 0 cnt/2 > 0][switch-mode][eval]]
|
230
|
+
]
|
231
|
+
]
|
232
|
+
]
|
233
|
+
]
|
234
|
+
|
235
|
+
q: :quit
|
236
|
+
|
237
|
+
if script: read-argument [
|
238
|
+
script: load script
|
239
|
+
either any [
|
240
|
+
script/1 <> 'Red
|
241
|
+
not block? script/2
|
242
|
+
][
|
243
|
+
print "*** Error: not a Red program!"
|
244
|
+
][
|
245
|
+
do skip script 2
|
246
|
+
]
|
247
|
+
quit
|
248
|
+
]
|
249
|
+
|
250
|
+
init-console "Red Console"
|
251
|
+
|
252
|
+
print {
|
253
|
+
-=== Red Console alpha version ===-
|
254
|
+
(only ASCII input supported)
|
255
|
+
}
|
256
|
+
|
257
|
+
do-console
|
@@ -0,0 +1,150 @@
|
|
1
|
+
Red/System [
|
2
|
+
Title: "Red/System example file"
|
3
|
+
Purpose: "Just some code for testing Pygments colorizer"
|
4
|
+
Language: http://www.red-lang.org/
|
5
|
+
]
|
6
|
+
|
7
|
+
#include %../common/FPU-configuration.reds
|
8
|
+
|
9
|
+
; C types
|
10
|
+
|
11
|
+
#define time! long!
|
12
|
+
#define clock! long!
|
13
|
+
|
14
|
+
date!: alias struct! [
|
15
|
+
second [integer!] ; 0-61 (60?)
|
16
|
+
minute [integer!] ; 0-59
|
17
|
+
hour [integer!] ; 0-23
|
18
|
+
|
19
|
+
day [integer!] ; 1-31
|
20
|
+
month [integer!] ; 0-11
|
21
|
+
year [integer!] ; Since 1900
|
22
|
+
|
23
|
+
weekday [integer!] ; 0-6 since Sunday
|
24
|
+
yearday [integer!] ; 0-365
|
25
|
+
daylight-saving-time? [integer!] ; Negative: unknown
|
26
|
+
]
|
27
|
+
|
28
|
+
#either OS = 'Windows [
|
29
|
+
#define clocks-per-second 1000
|
30
|
+
][
|
31
|
+
; CLOCKS_PER_SEC value for Syllable, Linux (XSI-conformant systems)
|
32
|
+
; TODO: check for other systems
|
33
|
+
#define clocks-per-second 1000'000
|
34
|
+
]
|
35
|
+
|
36
|
+
#import [LIBC-file cdecl [
|
37
|
+
|
38
|
+
; Error handling
|
39
|
+
|
40
|
+
form-error: "strerror" [ ; Return error description.
|
41
|
+
code [integer!]
|
42
|
+
return: [c-string!]
|
43
|
+
]
|
44
|
+
print-error: "perror" [ ; Print error to standard error output.
|
45
|
+
string [c-string!]
|
46
|
+
]
|
47
|
+
|
48
|
+
|
49
|
+
; Memory management
|
50
|
+
|
51
|
+
make: "calloc" [ ; Allocate zero-filled memory.
|
52
|
+
chunks [size!]
|
53
|
+
size [size!]
|
54
|
+
return: [binary!]
|
55
|
+
]
|
56
|
+
resize: "realloc" [ ; Resize memory allocation.
|
57
|
+
memory [binary!]
|
58
|
+
size [size!]
|
59
|
+
return: [binary!]
|
60
|
+
]
|
61
|
+
]
|
62
|
+
|
63
|
+
JVM!: alias struct! [
|
64
|
+
reserved0 [int-ptr!]
|
65
|
+
reserved1 [int-ptr!]
|
66
|
+
reserved2 [int-ptr!]
|
67
|
+
|
68
|
+
DestroyJavaVM [function! [[JNICALL] vm [JVM-ptr!] return: [jint!]]]
|
69
|
+
AttachCurrentThread [function! [[JNICALL] vm [JVM-ptr!] penv [struct! [p [int-ptr!]]] args [byte-ptr!] return: [jint!]]]
|
70
|
+
DetachCurrentThread [function! [[JNICALL] vm [JVM-ptr!] return: [jint!]]]
|
71
|
+
GetEnv [function! [[JNICALL] vm [JVM-ptr!] penv [struct! [p [int-ptr!]]] version [integer!] return: [jint!]]]
|
72
|
+
AttachCurrentThreadAsDaemon [function! [[JNICALL] vm [JVM-ptr!] penv [struct! [p [int-ptr!]]] args [byte-ptr!] return: [jint!]]]
|
73
|
+
]
|
74
|
+
|
75
|
+
;just some datatypes for testing:
|
76
|
+
|
77
|
+
#some-hash
|
78
|
+
10-1-2013
|
79
|
+
quit
|
80
|
+
|
81
|
+
;binary:
|
82
|
+
#{00FF0000}
|
83
|
+
#{00FF0000 FF000000}
|
84
|
+
#{00FF0000 FF000000} ;with tab instead of space
|
85
|
+
2#{00001111}
|
86
|
+
64#{/wAAAA==}
|
87
|
+
64#{/wAAA A==} ;with space inside
|
88
|
+
64#{/wAAA A==} ;with tab inside
|
89
|
+
|
90
|
+
|
91
|
+
;string with char
|
92
|
+
{bla ^(ff) foo}
|
93
|
+
{bla ^(( foo}
|
94
|
+
;some numbers:
|
95
|
+
12
|
96
|
+
1'000
|
97
|
+
1.2
|
98
|
+
FF00FF00h
|
99
|
+
|
100
|
+
;some tests of hexa number notation with not common ending
|
101
|
+
[ff00h ff00h] ff00h{} FFh"foo" 00h(1 + 2) (AEh)
|
102
|
+
|
103
|
+
;normal words:
|
104
|
+
foo char
|
105
|
+
|
106
|
+
;get-word
|
107
|
+
:foo
|
108
|
+
|
109
|
+
;lit-word:
|
110
|
+
'foo 'foo
|
111
|
+
|
112
|
+
;multiple comment tests...
|
113
|
+
1 + 1
|
114
|
+
comment "aa"
|
115
|
+
2 + 2
|
116
|
+
comment {aa}
|
117
|
+
3 + 3
|
118
|
+
comment {a^{}
|
119
|
+
4 + 4
|
120
|
+
comment {{}}
|
121
|
+
5 + 5
|
122
|
+
comment {
|
123
|
+
foo: 6
|
124
|
+
}
|
125
|
+
6 + 6
|
126
|
+
comment [foo: 6]
|
127
|
+
7 + 7
|
128
|
+
comment [foo: "[" ]
|
129
|
+
8 + 8
|
130
|
+
comment [foo: {^{} ]
|
131
|
+
9 + 9
|
132
|
+
comment [foo: {boo} ]
|
133
|
+
10 + 10
|
134
|
+
comment 5-May-2014/11:17:34+2:00
|
135
|
+
11 + 11
|
136
|
+
|
137
|
+
|
138
|
+
to-integer foo
|
139
|
+
foo/(a + 1)/b
|
140
|
+
|
141
|
+
call/output reform ['which interpreter] path: copy ""
|
142
|
+
|
143
|
+
version-1.1: 00010001h
|
144
|
+
|
145
|
+
#if type = 'exe [
|
146
|
+
push system/stack/frame ;-- save previous frame pointer
|
147
|
+
system/stack/frame: system/stack/top ;-- @@ reposition frame pointer just after the catch flag
|
148
|
+
]
|
149
|
+
push CATCH_ALL ;-- exceptions root barrier
|
150
|
+
push 0 ;-- keep stack aligned on 64-bit
|