gitlab-pygments.rb 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/Gemfile +2 -0
- data/README.md +91 -0
- data/Rakefile +78 -0
- data/bench.rb +22 -0
- data/cache-lexers.rb +8 -0
- data/lexers +0 -0
- data/lib/pygments/lexer.rb +148 -0
- data/lib/pygments/mentos.py +344 -0
- data/lib/pygments/popen.rb +389 -0
- data/lib/pygments/version.rb +3 -0
- data/lib/pygments.rb +8 -0
- data/pygments.rb.gemspec +24 -0
- data/test/test_data.c +2581 -0
- data/test/test_data.py +514 -0
- data/test/test_data_generated +2582 -0
- data/test/test_pygments.rb +276 -0
- data/vendor/custom_formatters/gitlab.py +171 -0
- data/vendor/custom_lexers/github.py +362 -0
- data/vendor/pygments-main/AUTHORS +115 -0
- data/vendor/pygments-main/CHANGES +762 -0
- data/vendor/pygments-main/LICENSE +25 -0
- data/vendor/pygments-main/MANIFEST.in +6 -0
- data/vendor/pygments-main/Makefile +59 -0
- data/vendor/pygments-main/REVISION +1 -0
- data/vendor/pygments-main/TODO +15 -0
- data/vendor/pygments-main/docs/generate.py +472 -0
- data/vendor/pygments-main/docs/pygmentize.1 +94 -0
- data/vendor/pygments-main/docs/src/api.txt +270 -0
- data/vendor/pygments-main/docs/src/authors.txt +5 -0
- data/vendor/pygments-main/docs/src/changelog.txt +5 -0
- data/vendor/pygments-main/docs/src/cmdline.txt +147 -0
- data/vendor/pygments-main/docs/src/filterdevelopment.txt +70 -0
- data/vendor/pygments-main/docs/src/filters.txt +42 -0
- data/vendor/pygments-main/docs/src/formatterdevelopment.txt +169 -0
- data/vendor/pygments-main/docs/src/formatters.txt +48 -0
- data/vendor/pygments-main/docs/src/index.txt +69 -0
- data/vendor/pygments-main/docs/src/installation.txt +71 -0
- data/vendor/pygments-main/docs/src/integrate.txt +43 -0
- data/vendor/pygments-main/docs/src/lexerdevelopment.txt +551 -0
- data/vendor/pygments-main/docs/src/lexers.txt +67 -0
- data/vendor/pygments-main/docs/src/moinmoin.txt +39 -0
- data/vendor/pygments-main/docs/src/plugins.txt +93 -0
- data/vendor/pygments-main/docs/src/quickstart.txt +202 -0
- data/vendor/pygments-main/docs/src/rstdirective.txt +22 -0
- data/vendor/pygments-main/docs/src/styles.txt +143 -0
- data/vendor/pygments-main/docs/src/tokens.txt +349 -0
- data/vendor/pygments-main/docs/src/unicode.txt +49 -0
- data/vendor/pygments-main/external/markdown-processor.py +67 -0
- data/vendor/pygments-main/external/moin-parser.py +112 -0
- data/vendor/pygments-main/external/pygments.bashcomp +38 -0
- data/vendor/pygments-main/external/rst-directive-old.py +77 -0
- data/vendor/pygments-main/external/rst-directive.py +83 -0
- data/vendor/pygments-main/ez_setup.py +276 -0
- data/vendor/pygments-main/pygmentize +7 -0
- data/vendor/pygments-main/pygments/__init__.py +91 -0
- data/vendor/pygments-main/pygments/cmdline.py +433 -0
- data/vendor/pygments-main/pygments/console.py +74 -0
- data/vendor/pygments-main/pygments/filter.py +74 -0
- data/vendor/pygments-main/pygments/filters/__init__.py +357 -0
- data/vendor/pygments-main/pygments/formatter.py +92 -0
- data/vendor/pygments-main/pygments/formatters/__init__.py +68 -0
- data/vendor/pygments-main/pygments/formatters/_mapping.py +94 -0
- data/vendor/pygments-main/pygments/formatters/bbcode.py +109 -0
- data/vendor/pygments-main/pygments/formatters/gitlab.py +171 -0
- data/vendor/pygments-main/pygments/formatters/html.py +750 -0
- data/vendor/pygments-main/pygments/formatters/img.py +553 -0
- data/vendor/pygments-main/pygments/formatters/latex.py +378 -0
- data/vendor/pygments-main/pygments/formatters/other.py +117 -0
- data/vendor/pygments-main/pygments/formatters/rtf.py +136 -0
- data/vendor/pygments-main/pygments/formatters/svg.py +154 -0
- data/vendor/pygments-main/pygments/formatters/terminal.py +112 -0
- data/vendor/pygments-main/pygments/formatters/terminal256.py +222 -0
- data/vendor/pygments-main/pygments/lexer.py +697 -0
- data/vendor/pygments-main/pygments/lexers/__init__.py +229 -0
- data/vendor/pygments-main/pygments/lexers/_asybuiltins.py +1645 -0
- data/vendor/pygments-main/pygments/lexers/_clbuiltins.py +232 -0
- data/vendor/pygments-main/pygments/lexers/_luabuiltins.py +249 -0
- data/vendor/pygments-main/pygments/lexers/_mapping.py +298 -0
- data/vendor/pygments-main/pygments/lexers/_phpbuiltins.py +3787 -0
- data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +232 -0
- data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +29 -0
- data/vendor/pygments-main/pygments/lexers/_vimbuiltins.py +3 -0
- data/vendor/pygments-main/pygments/lexers/agile.py +1803 -0
- data/vendor/pygments-main/pygments/lexers/asm.py +360 -0
- data/vendor/pygments-main/pygments/lexers/compiled.py +2891 -0
- data/vendor/pygments-main/pygments/lexers/dotnet.py +636 -0
- data/vendor/pygments-main/pygments/lexers/functional.py +1832 -0
- data/vendor/pygments-main/pygments/lexers/github.py +362 -0
- data/vendor/pygments-main/pygments/lexers/hdl.py +356 -0
- data/vendor/pygments-main/pygments/lexers/jvm.py +847 -0
- data/vendor/pygments-main/pygments/lexers/math.py +1072 -0
- data/vendor/pygments-main/pygments/lexers/other.py +3339 -0
- data/vendor/pygments-main/pygments/lexers/parsers.py +695 -0
- data/vendor/pygments-main/pygments/lexers/shell.py +361 -0
- data/vendor/pygments-main/pygments/lexers/special.py +100 -0
- data/vendor/pygments-main/pygments/lexers/sql.py +559 -0
- data/vendor/pygments-main/pygments/lexers/templates.py +1631 -0
- data/vendor/pygments-main/pygments/lexers/text.py +1753 -0
- data/vendor/pygments-main/pygments/lexers/web.py +2864 -0
- data/vendor/pygments-main/pygments/plugin.py +74 -0
- data/vendor/pygments-main/pygments/scanner.py +104 -0
- data/vendor/pygments-main/pygments/style.py +117 -0
- data/vendor/pygments-main/pygments/styles/__init__.py +70 -0
- data/vendor/pygments-main/pygments/styles/autumn.py +65 -0
- data/vendor/pygments-main/pygments/styles/borland.py +51 -0
- data/vendor/pygments-main/pygments/styles/bw.py +49 -0
- data/vendor/pygments-main/pygments/styles/colorful.py +81 -0
- data/vendor/pygments-main/pygments/styles/default.py +73 -0
- data/vendor/pygments-main/pygments/styles/emacs.py +72 -0
- data/vendor/pygments-main/pygments/styles/friendly.py +72 -0
- data/vendor/pygments-main/pygments/styles/fruity.py +42 -0
- data/vendor/pygments-main/pygments/styles/manni.py +75 -0
- data/vendor/pygments-main/pygments/styles/monokai.py +106 -0
- data/vendor/pygments-main/pygments/styles/murphy.py +80 -0
- data/vendor/pygments-main/pygments/styles/native.py +65 -0
- data/vendor/pygments-main/pygments/styles/pastie.py +75 -0
- data/vendor/pygments-main/pygments/styles/perldoc.py +69 -0
- data/vendor/pygments-main/pygments/styles/rrt.py +33 -0
- data/vendor/pygments-main/pygments/styles/tango.py +141 -0
- data/vendor/pygments-main/pygments/styles/trac.py +63 -0
- data/vendor/pygments-main/pygments/styles/vim.py +63 -0
- data/vendor/pygments-main/pygments/styles/vs.py +38 -0
- data/vendor/pygments-main/pygments/token.py +195 -0
- data/vendor/pygments-main/pygments/unistring.py +130 -0
- data/vendor/pygments-main/pygments/util.py +232 -0
- data/vendor/pygments-main/scripts/check_sources.py +242 -0
- data/vendor/pygments-main/scripts/detect_missing_analyse_text.py +30 -0
- data/vendor/pygments-main/scripts/epydoc.css +280 -0
- data/vendor/pygments-main/scripts/find_codetags.py +205 -0
- data/vendor/pygments-main/scripts/find_error.py +171 -0
- data/vendor/pygments-main/scripts/get_vimkw.py +43 -0
- data/vendor/pygments-main/scripts/pylintrc +301 -0
- data/vendor/pygments-main/scripts/reindent.py +291 -0
- data/vendor/pygments-main/scripts/vim2pygments.py +933 -0
- data/vendor/pygments-main/setup.cfg +6 -0
- data/vendor/pygments-main/setup.py +88 -0
- data/vendor/pygments-main/tests/dtds/HTML4-f.dtd +37 -0
- data/vendor/pygments-main/tests/dtds/HTML4-s.dtd +869 -0
- data/vendor/pygments-main/tests/dtds/HTML4.dcl +88 -0
- data/vendor/pygments-main/tests/dtds/HTML4.dtd +1092 -0
- data/vendor/pygments-main/tests/dtds/HTML4.soc +9 -0
- data/vendor/pygments-main/tests/dtds/HTMLlat1.ent +195 -0
- data/vendor/pygments-main/tests/dtds/HTMLspec.ent +77 -0
- data/vendor/pygments-main/tests/dtds/HTMLsym.ent +241 -0
- data/vendor/pygments-main/tests/examplefiles/ANTLRv3.g +608 -0
- data/vendor/pygments-main/tests/examplefiles/AcidStateAdvanced.hs +209 -0
- data/vendor/pygments-main/tests/examplefiles/AlternatingGroup.mu +102 -0
- data/vendor/pygments-main/tests/examplefiles/CPDictionary.j +611 -0
- data/vendor/pygments-main/tests/examplefiles/Constants.mo +158 -0
- data/vendor/pygments-main/tests/examplefiles/DancingSudoku.lhs +411 -0
- data/vendor/pygments-main/tests/examplefiles/Errors.scala +18 -0
- data/vendor/pygments-main/tests/examplefiles/File.hy +174 -0
- data/vendor/pygments-main/tests/examplefiles/Intro.java +1660 -0
- data/vendor/pygments-main/tests/examplefiles/Makefile +1131 -0
- data/vendor/pygments-main/tests/examplefiles/Object.st +4394 -0
- data/vendor/pygments-main/tests/examplefiles/OrderedMap.hx +584 -0
- data/vendor/pygments-main/tests/examplefiles/SmallCheck.hs +378 -0
- data/vendor/pygments-main/tests/examplefiles/Sorting.mod +470 -0
- data/vendor/pygments-main/tests/examplefiles/Sudoku.lhs +382 -0
- data/vendor/pygments-main/tests/examplefiles/addressbook.proto +30 -0
- data/vendor/pygments-main/tests/examplefiles/antlr_throws +1 -0
- data/vendor/pygments-main/tests/examplefiles/apache2.conf +393 -0
- data/vendor/pygments-main/tests/examplefiles/as3_test.as +143 -0
- data/vendor/pygments-main/tests/examplefiles/as3_test2.as +46 -0
- data/vendor/pygments-main/tests/examplefiles/as3_test3.as +3 -0
- data/vendor/pygments-main/tests/examplefiles/aspx-cs_example +27 -0
- data/vendor/pygments-main/tests/examplefiles/badcase.java +2 -0
- data/vendor/pygments-main/tests/examplefiles/batchfile.bat +49 -0
- data/vendor/pygments-main/tests/examplefiles/boot-9.scm +1557 -0
- data/vendor/pygments-main/tests/examplefiles/cells.ps +515 -0
- data/vendor/pygments-main/tests/examplefiles/ceval.c +2604 -0
- data/vendor/pygments-main/tests/examplefiles/cheetah_example.html +13 -0
- data/vendor/pygments-main/tests/examplefiles/classes.dylan +40 -0
- data/vendor/pygments-main/tests/examplefiles/condensed_ruby.rb +10 -0
- data/vendor/pygments-main/tests/examplefiles/coq_RelationClasses +447 -0
- data/vendor/pygments-main/tests/examplefiles/database.pytb +20 -0
- data/vendor/pygments-main/tests/examplefiles/de.MoinMoin.po +2461 -0
- data/vendor/pygments-main/tests/examplefiles/demo.ahk +181 -0
- data/vendor/pygments-main/tests/examplefiles/demo.cfm +38 -0
- data/vendor/pygments-main/tests/examplefiles/django_sample.html+django +68 -0
- data/vendor/pygments-main/tests/examplefiles/dwarf.cw +17 -0
- data/vendor/pygments-main/tests/examplefiles/erl_session +10 -0
- data/vendor/pygments-main/tests/examplefiles/escape_semicolon.clj +1 -0
- data/vendor/pygments-main/tests/examplefiles/evil_regex.js +48 -0
- data/vendor/pygments-main/tests/examplefiles/example.c +2080 -0
- data/vendor/pygments-main/tests/examplefiles/example.cls +15 -0
- data/vendor/pygments-main/tests/examplefiles/example.cpp +2363 -0
- data/vendor/pygments-main/tests/examplefiles/example.gs +106 -0
- data/vendor/pygments-main/tests/examplefiles/example.gst +7 -0
- data/vendor/pygments-main/tests/examplefiles/example.kt +47 -0
- data/vendor/pygments-main/tests/examplefiles/example.lua +250 -0
- data/vendor/pygments-main/tests/examplefiles/example.moo +26 -0
- data/vendor/pygments-main/tests/examplefiles/example.moon +629 -0
- data/vendor/pygments-main/tests/examplefiles/example.nim +1010 -0
- data/vendor/pygments-main/tests/examplefiles/example.ns2 +69 -0
- data/vendor/pygments-main/tests/examplefiles/example.p +34 -0
- data/vendor/pygments-main/tests/examplefiles/example.pas +2708 -0
- data/vendor/pygments-main/tests/examplefiles/example.rb +1852 -0
- data/vendor/pygments-main/tests/examplefiles/example.rhtml +561 -0
- data/vendor/pygments-main/tests/examplefiles/example.sh-session +19 -0
- data/vendor/pygments-main/tests/examplefiles/example.sml +156 -0
- data/vendor/pygments-main/tests/examplefiles/example.snobol +15 -0
- data/vendor/pygments-main/tests/examplefiles/example.tea +34 -0
- data/vendor/pygments-main/tests/examplefiles/example.u +548 -0
- data/vendor/pygments-main/tests/examplefiles/example.weechatlog +9 -0
- data/vendor/pygments-main/tests/examplefiles/example.xhtml +376 -0
- data/vendor/pygments-main/tests/examplefiles/example.yaml +302 -0
- data/vendor/pygments-main/tests/examplefiles/example2.aspx +29 -0
- data/vendor/pygments-main/tests/examplefiles/example_elixir.ex +363 -0
- data/vendor/pygments-main/tests/examplefiles/example_file.fy +128 -0
- data/vendor/pygments-main/tests/examplefiles/firefox.mak +586 -0
- data/vendor/pygments-main/tests/examplefiles/flipflop.sv +19 -0
- data/vendor/pygments-main/tests/examplefiles/foo.sce +6 -0
- data/vendor/pygments-main/tests/examplefiles/format.ml +1213 -0
- data/vendor/pygments-main/tests/examplefiles/fucked_up.rb +77 -0
- data/vendor/pygments-main/tests/examplefiles/function.mu +1 -0
- data/vendor/pygments-main/tests/examplefiles/functional.rst +1472 -0
- data/vendor/pygments-main/tests/examplefiles/genclass.clj +510 -0
- data/vendor/pygments-main/tests/examplefiles/genshi_example.xml+genshi +193 -0
- data/vendor/pygments-main/tests/examplefiles/genshitext_example.genshitext +33 -0
- data/vendor/pygments-main/tests/examplefiles/glsl.frag +7 -0
- data/vendor/pygments-main/tests/examplefiles/glsl.vert +13 -0
- data/vendor/pygments-main/tests/examplefiles/html+php_faulty.php +1 -0
- data/vendor/pygments-main/tests/examplefiles/http_request_example +14 -0
- data/vendor/pygments-main/tests/examplefiles/http_response_example +27 -0
- data/vendor/pygments-main/tests/examplefiles/import.hs +4 -0
- data/vendor/pygments-main/tests/examplefiles/intro.ik +24 -0
- data/vendor/pygments-main/tests/examplefiles/ints.php +10 -0
- data/vendor/pygments-main/tests/examplefiles/intsyn.fun +675 -0
- data/vendor/pygments-main/tests/examplefiles/intsyn.sig +286 -0
- data/vendor/pygments-main/tests/examplefiles/irb_heredoc +8 -0
- data/vendor/pygments-main/tests/examplefiles/irc.lsp +214 -0
- data/vendor/pygments-main/tests/examplefiles/java.properties +16 -0
- data/vendor/pygments-main/tests/examplefiles/jbst_example1.jbst +28 -0
- data/vendor/pygments-main/tests/examplefiles/jbst_example2.jbst +45 -0
- data/vendor/pygments-main/tests/examplefiles/jinjadesignerdoc.rst +713 -0
- data/vendor/pygments-main/tests/examplefiles/lighttpd_config.conf +13 -0
- data/vendor/pygments-main/tests/examplefiles/linecontinuation.py +47 -0
- data/vendor/pygments-main/tests/examplefiles/ltmain.sh +2849 -0
- data/vendor/pygments-main/tests/examplefiles/main.cmake +42 -0
- data/vendor/pygments-main/tests/examplefiles/markdown.lsp +679 -0
- data/vendor/pygments-main/tests/examplefiles/matlab_noreturn +3 -0
- data/vendor/pygments-main/tests/examplefiles/matlab_sample +27 -0
- data/vendor/pygments-main/tests/examplefiles/matlabsession_sample.txt +37 -0
- data/vendor/pygments-main/tests/examplefiles/minimal.ns2 +4 -0
- data/vendor/pygments-main/tests/examplefiles/moin_SyntaxReference.txt +340 -0
- data/vendor/pygments-main/tests/examplefiles/multiline_regexes.rb +38 -0
- data/vendor/pygments-main/tests/examplefiles/nasm_aoutso.asm +96 -0
- data/vendor/pygments-main/tests/examplefiles/nasm_objexe.asm +30 -0
- data/vendor/pygments-main/tests/examplefiles/nemerle_sample.n +87 -0
- data/vendor/pygments-main/tests/examplefiles/nginx_nginx.conf +118 -0
- data/vendor/pygments-main/tests/examplefiles/numbers.c +12 -0
- data/vendor/pygments-main/tests/examplefiles/objc_example.m +25 -0
- data/vendor/pygments-main/tests/examplefiles/objc_example2.m +24 -0
- data/vendor/pygments-main/tests/examplefiles/perl_misc +62 -0
- data/vendor/pygments-main/tests/examplefiles/perl_perl5db +998 -0
- data/vendor/pygments-main/tests/examplefiles/perl_regex-delims +120 -0
- data/vendor/pygments-main/tests/examplefiles/perlfunc.1 +856 -0
- data/vendor/pygments-main/tests/examplefiles/phpcomplete.vim +567 -0
- data/vendor/pygments-main/tests/examplefiles/pleac.in.rb +1223 -0
- data/vendor/pygments-main/tests/examplefiles/postgresql_test.txt +47 -0
- data/vendor/pygments-main/tests/examplefiles/pppoe.applescript +10 -0
- data/vendor/pygments-main/tests/examplefiles/psql_session.txt +122 -0
- data/vendor/pygments-main/tests/examplefiles/py3_test.txt +2 -0
- data/vendor/pygments-main/tests/examplefiles/pycon_test.pycon +14 -0
- data/vendor/pygments-main/tests/examplefiles/pytb_test2.pytb +2 -0
- data/vendor/pygments-main/tests/examplefiles/python25-bsd.mak +234 -0
- data/vendor/pygments-main/tests/examplefiles/qsort.prolog +13 -0
- data/vendor/pygments-main/tests/examplefiles/r-console-transcript.Rout +38 -0
- data/vendor/pygments-main/tests/examplefiles/ragel-cpp_rlscan +280 -0
- data/vendor/pygments-main/tests/examplefiles/ragel-cpp_snippet +2 -0
- data/vendor/pygments-main/tests/examplefiles/regex.js +22 -0
- data/vendor/pygments-main/tests/examplefiles/reversi.lsp +427 -0
- data/vendor/pygments-main/tests/examplefiles/ruby_func_def.rb +11 -0
- data/vendor/pygments-main/tests/examplefiles/scilab.sci +30 -0
- data/vendor/pygments-main/tests/examplefiles/sibling.prolog +19 -0
- data/vendor/pygments-main/tests/examplefiles/simple.md +747 -0
- data/vendor/pygments-main/tests/examplefiles/smarty_example.html +209 -0
- data/vendor/pygments-main/tests/examplefiles/source.lgt +343 -0
- data/vendor/pygments-main/tests/examplefiles/sources.list +62 -0
- data/vendor/pygments-main/tests/examplefiles/sphere.pov +18 -0
- data/vendor/pygments-main/tests/examplefiles/sqlite3.sqlite3-console +27 -0
- data/vendor/pygments-main/tests/examplefiles/squid.conf +30 -0
- data/vendor/pygments-main/tests/examplefiles/string.jl +1031 -0
- data/vendor/pygments-main/tests/examplefiles/string_delimiters.d +21 -0
- data/vendor/pygments-main/tests/examplefiles/stripheredoc.sh +3 -0
- data/vendor/pygments-main/tests/examplefiles/test.R +119 -0
- data/vendor/pygments-main/tests/examplefiles/test.adb +211 -0
- data/vendor/pygments-main/tests/examplefiles/test.asy +131 -0
- data/vendor/pygments-main/tests/examplefiles/test.awk +121 -0
- data/vendor/pygments-main/tests/examplefiles/test.bas +29 -0
- data/vendor/pygments-main/tests/examplefiles/test.bmx +145 -0
- data/vendor/pygments-main/tests/examplefiles/test.boo +39 -0
- data/vendor/pygments-main/tests/examplefiles/test.bro +250 -0
- data/vendor/pygments-main/tests/examplefiles/test.cs +374 -0
- data/vendor/pygments-main/tests/examplefiles/test.css +54 -0
- data/vendor/pygments-main/tests/examplefiles/test.d +135 -0
- data/vendor/pygments-main/tests/examplefiles/test.dart +23 -0
- data/vendor/pygments-main/tests/examplefiles/test.dtd +89 -0
- data/vendor/pygments-main/tests/examplefiles/test.ec +605 -0
- data/vendor/pygments-main/tests/examplefiles/test.ecl +58 -0
- data/vendor/pygments-main/tests/examplefiles/test.eh +315 -0
- data/vendor/pygments-main/tests/examplefiles/test.erl +169 -0
- data/vendor/pygments-main/tests/examplefiles/test.evoque +33 -0
- data/vendor/pygments-main/tests/examplefiles/test.fan +818 -0
- data/vendor/pygments-main/tests/examplefiles/test.flx +57 -0
- data/vendor/pygments-main/tests/examplefiles/test.gdc +13 -0
- data/vendor/pygments-main/tests/examplefiles/test.groovy +97 -0
- data/vendor/pygments-main/tests/examplefiles/test.html +339 -0
- data/vendor/pygments-main/tests/examplefiles/test.ini +10 -0
- data/vendor/pygments-main/tests/examplefiles/test.java +653 -0
- data/vendor/pygments-main/tests/examplefiles/test.jsp +24 -0
- data/vendor/pygments-main/tests/examplefiles/test.maql +45 -0
- data/vendor/pygments-main/tests/examplefiles/test.mod +374 -0
- data/vendor/pygments-main/tests/examplefiles/test.moo +51 -0
- data/vendor/pygments-main/tests/examplefiles/test.myt +166 -0
- data/vendor/pygments-main/tests/examplefiles/test.nim +93 -0
- data/vendor/pygments-main/tests/examplefiles/test.pas +743 -0
- data/vendor/pygments-main/tests/examplefiles/test.php +505 -0
- data/vendor/pygments-main/tests/examplefiles/test.plot +333 -0
- data/vendor/pygments-main/tests/examplefiles/test.ps1 +108 -0
- data/vendor/pygments-main/tests/examplefiles/test.pypylog +1839 -0
- data/vendor/pygments-main/tests/examplefiles/test.r3 +94 -0
- data/vendor/pygments-main/tests/examplefiles/test.rb +177 -0
- data/vendor/pygments-main/tests/examplefiles/test.rhtml +43 -0
- data/vendor/pygments-main/tests/examplefiles/test.scaml +8 -0
- data/vendor/pygments-main/tests/examplefiles/test.ssp +12 -0
- data/vendor/pygments-main/tests/examplefiles/test.tcsh +830 -0
- data/vendor/pygments-main/tests/examplefiles/test.vb +407 -0
- data/vendor/pygments-main/tests/examplefiles/test.vhdl +161 -0
- data/vendor/pygments-main/tests/examplefiles/test.xqy +138 -0
- data/vendor/pygments-main/tests/examplefiles/test.xsl +23 -0
- data/vendor/pygments-main/tests/examplefiles/truncated.pytb +15 -0
- data/vendor/pygments-main/tests/examplefiles/type.lisp +1202 -0
- data/vendor/pygments-main/tests/examplefiles/underscore.coffee +603 -0
- data/vendor/pygments-main/tests/examplefiles/unicode.applescript +5 -0
- data/vendor/pygments-main/tests/examplefiles/unicodedoc.py +11 -0
- data/vendor/pygments-main/tests/examplefiles/webkit-transition.css +3 -0
- data/vendor/pygments-main/tests/examplefiles/while.pov +13 -0
- data/vendor/pygments-main/tests/examplefiles/wiki.factor +384 -0
- data/vendor/pygments-main/tests/examplefiles/xml_example +1897 -0
- data/vendor/pygments-main/tests/examplefiles/zmlrpc.f90 +798 -0
- data/vendor/pygments-main/tests/old_run.py +138 -0
- data/vendor/pygments-main/tests/run.py +48 -0
- data/vendor/pygments-main/tests/support.py +15 -0
- data/vendor/pygments-main/tests/test_basic_api.py +294 -0
- data/vendor/pygments-main/tests/test_clexer.py +31 -0
- data/vendor/pygments-main/tests/test_cmdline.py +105 -0
- data/vendor/pygments-main/tests/test_examplefiles.py +97 -0
- data/vendor/pygments-main/tests/test_html_formatter.py +162 -0
- data/vendor/pygments-main/tests/test_latex_formatter.py +55 -0
- data/vendor/pygments-main/tests/test_perllexer.py +137 -0
- data/vendor/pygments-main/tests/test_regexlexer.py +47 -0
- data/vendor/pygments-main/tests/test_token.py +46 -0
- data/vendor/pygments-main/tests/test_using_api.py +40 -0
- data/vendor/pygments-main/tests/test_util.py +116 -0
- data/vendor/simplejson/.gitignore +10 -0
- data/vendor/simplejson/.travis.yml +5 -0
- data/vendor/simplejson/CHANGES.txt +291 -0
- data/vendor/simplejson/LICENSE.txt +19 -0
- data/vendor/simplejson/MANIFEST.in +5 -0
- data/vendor/simplejson/README.rst +19 -0
- data/vendor/simplejson/conf.py +179 -0
- data/vendor/simplejson/index.rst +628 -0
- data/vendor/simplejson/scripts/make_docs.py +18 -0
- data/vendor/simplejson/setup.py +104 -0
- data/vendor/simplejson/simplejson/__init__.py +510 -0
- data/vendor/simplejson/simplejson/_speedups.c +2745 -0
- data/vendor/simplejson/simplejson/decoder.py +425 -0
- data/vendor/simplejson/simplejson/encoder.py +567 -0
- data/vendor/simplejson/simplejson/ordered_dict.py +119 -0
- data/vendor/simplejson/simplejson/scanner.py +77 -0
- data/vendor/simplejson/simplejson/tests/__init__.py +67 -0
- data/vendor/simplejson/simplejson/tests/test_bigint_as_string.py +55 -0
- data/vendor/simplejson/simplejson/tests/test_check_circular.py +30 -0
- data/vendor/simplejson/simplejson/tests/test_decimal.py +66 -0
- data/vendor/simplejson/simplejson/tests/test_decode.py +83 -0
- data/vendor/simplejson/simplejson/tests/test_default.py +9 -0
- data/vendor/simplejson/simplejson/tests/test_dump.py +67 -0
- data/vendor/simplejson/simplejson/tests/test_encode_basestring_ascii.py +46 -0
- data/vendor/simplejson/simplejson/tests/test_encode_for_html.py +32 -0
- data/vendor/simplejson/simplejson/tests/test_errors.py +34 -0
- data/vendor/simplejson/simplejson/tests/test_fail.py +91 -0
- data/vendor/simplejson/simplejson/tests/test_float.py +19 -0
- data/vendor/simplejson/simplejson/tests/test_indent.py +86 -0
- data/vendor/simplejson/simplejson/tests/test_item_sort_key.py +20 -0
- data/vendor/simplejson/simplejson/tests/test_namedtuple.py +121 -0
- data/vendor/simplejson/simplejson/tests/test_pass1.py +76 -0
- data/vendor/simplejson/simplejson/tests/test_pass2.py +14 -0
- data/vendor/simplejson/simplejson/tests/test_pass3.py +20 -0
- data/vendor/simplejson/simplejson/tests/test_recursion.py +67 -0
- data/vendor/simplejson/simplejson/tests/test_scanstring.py +117 -0
- data/vendor/simplejson/simplejson/tests/test_separators.py +42 -0
- data/vendor/simplejson/simplejson/tests/test_speedups.py +20 -0
- data/vendor/simplejson/simplejson/tests/test_tuple.py +49 -0
- data/vendor/simplejson/simplejson/tests/test_unicode.py +109 -0
- data/vendor/simplejson/simplejson/tool.py +39 -0
- metadata +492 -0
@@ -0,0 +1,209 @@
|
|
1
|
+
{php}
|
2
|
+
include "some/php/file.php";
|
3
|
+
|
4
|
+
foreach ($rows as $row) {
|
5
|
+
echo $row;
|
6
|
+
}
|
7
|
+
{/php}
|
8
|
+
|
9
|
+
{* smarty comment *}
|
10
|
+
<!-- ENTRIES START -->
|
11
|
+
{serendipity_hookPlugin hook="entries_header" addData="$entry_id"}
|
12
|
+
|
13
|
+
{foreach from=$entries item="dategroup"}
|
14
|
+
<div class="serendipity_Entry_Date">
|
15
|
+
{if $dategroup.is_sticky}
|
16
|
+
<h3 class="serendipity_date">{$CONST.STICKY_POSTINGS}</h3>
|
17
|
+
{else}
|
18
|
+
<h3 class="serendipity_date">{$dategroup.date|@formatTime:DATE_FORMAT_BARSINISTER}</h3>
|
19
|
+
{/if}
|
20
|
+
|
21
|
+
{foreach from=$dategroup.entries item="entry"}
|
22
|
+
<h4 class="serendipity_title"><a href="{$entry.link}">{$entry.title}</a></h4>
|
23
|
+
|
24
|
+
<div class="serendipity_entry serendipity_entry_author_{$entry.author|@makeFilename} {if $entry.is_entry_owner}serendipity_entry_author_self{/if}">
|
25
|
+
{if $entry.categories}
|
26
|
+
<span class="serendipity_entryIcon">
|
27
|
+
{foreach from=$entry.categories item="category"}
|
28
|
+
{if $category.category_icon}
|
29
|
+
<a href="{$category.category_link}"><img class="serendipity_entryIcon" title="{$category.category_name|@escape}{$category.category_description|@emptyPrefix}" alt="{$category.category_name|@escape}" src="{$category.category_icon}" /></a>
|
30
|
+
{/if}
|
31
|
+
{/foreach}
|
32
|
+
</span>
|
33
|
+
{/if}
|
34
|
+
|
35
|
+
<div class="serendipity_entry_body">
|
36
|
+
{$entry.body}
|
37
|
+
</div>
|
38
|
+
|
39
|
+
{if $entry.is_extended}
|
40
|
+
<div class="serendipity_entry_extended"><a id="extended"></a>{$entry.extended}</div>
|
41
|
+
{/if}
|
42
|
+
|
43
|
+
{if $entry.has_extended and not $is_single_entry and not $entry.is_extended}<br />
|
44
|
+
<p class="continue_reading"><a href="{$entry.link}#extended">{$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title}</a></p><br />
|
45
|
+
{/if}
|
46
|
+
|
47
|
+
<div class='serendipity_entryFooter'>
|
48
|
+
{$CONST.POSTED_BY} <a href="{$entry.link_author}">{$entry.author}</a>
|
49
|
+
{if $entry.categories}
|
50
|
+
{$CONST.IN} {foreach from=$entry.categories item="category" name="categories"}<a href="{$category.category_link}">{$category.category_name|@escape}</a>{if not $smarty.foreach.categories.last}, {/if}{/foreach}
|
51
|
+
{/if}
|
52
|
+
|
53
|
+
{if $entry.has_comments}
|
54
|
+
{if $use_popups}
|
55
|
+
| <a href="{$entry.link_popup_comments}" onclick="window.open(this.href, 'comments', 'width=480,height=480,scrollbars=yes'); return false;">{$entry.label_comments} ({$entry.comments})</a>
|
56
|
+
{else}
|
57
|
+
| <a href="{$entry.link}#comments">{$entry.label_comments} ({$entry.comments})</a>
|
58
|
+
{/if}
|
59
|
+
{/if}
|
60
|
+
|
61
|
+
{if $entry.has_trackbacks}
|
62
|
+
{if $use_popups}
|
63
|
+
| <a href="{$entry.link_popup_trackbacks}" onclick="window.open(this.href, 'comments', 'width=480,height=480,scrollbars=yes'); return false;">{$entry.label_trackbacks} ({$entry.trackbacks})</a>
|
64
|
+
{else}
|
65
|
+
| <a href="{$entry.link}#trackbacks">{$entry.label_trackbacks} ({$entry.trackbacks})</a>
|
66
|
+
{/if}
|
67
|
+
{/if}
|
68
|
+
|
69
|
+
{if $entry.is_entry_owner and not $is_preview}
|
70
|
+
| <a href="{$entry.link_edit}">{$CONST.EDIT_ENTRY}</a>
|
71
|
+
{/if}
|
72
|
+
|
73
|
+
{$entry.add_footer}
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
<!--
|
77
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
78
|
+
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
|
79
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
80
|
+
<rdf:Description
|
81
|
+
rdf:about="{$entry.link_rdf}"
|
82
|
+
trackback:ping="{$entry.link_trackback}"
|
83
|
+
dc:title="{$entry.title}"
|
84
|
+
dc:identifier="{$entry.rdf_ident}" />
|
85
|
+
</rdf:RDF>
|
86
|
+
-->
|
87
|
+
{$entry.plugin_display_dat}
|
88
|
+
|
89
|
+
{if $is_single_entry and not $use_popups and not $is_preview}
|
90
|
+
{if $CONST.DATA_UNSUBSCRIBED}
|
91
|
+
<br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_UNSUBSCRIBED|@sprintf:$CONST.UNSUBSCRIBE_OK}</div><br />
|
92
|
+
{/if}
|
93
|
+
|
94
|
+
{if $CONST.DATA_TRACKBACK_DELETED}
|
95
|
+
<br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_TRACKBACK_DELETED|@sprintf:$CONST.TRACKBACK_DELETED}</div><br />
|
96
|
+
{/if}
|
97
|
+
|
98
|
+
{if $CONST.DATA_TRACKBACK_APPROVED}
|
99
|
+
<br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_TRACKBACK_APPROVED|@sprintf:$CONST.TRACKBACK_APPROVED}</div><br />
|
100
|
+
{/if}
|
101
|
+
|
102
|
+
{if $CONST.DATA_COMMENT_DELETED}
|
103
|
+
<br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_COMMENT_DELETED|@sprintf:$CONST.COMMENT_DELETED}</div><br />
|
104
|
+
{/if}
|
105
|
+
|
106
|
+
{if $CONST.DATA_COMMENT_APPROVED}
|
107
|
+
<br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_COMMENT_APPROVED|@sprintf:$CONST.COMMENT_APPROVED}</div><br />
|
108
|
+
{/if}
|
109
|
+
|
110
|
+
{/if}
|
111
|
+
|
112
|
+
{if $is_single_entry and not $is_preview}
|
113
|
+
<div class="serendipity_comments">
|
114
|
+
<br />
|
115
|
+
<a id="trackbacks"></a>
|
116
|
+
<div class="serendipity_commentsTitle">{$CONST.TRACKBACKS}</div>
|
117
|
+
<div class="serendipity_center">
|
118
|
+
<a rel="nofollow" style="font-weight: normal" href="{$entry.link_trackback}" onclick="alert('{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape:htmlall}'); return false;" title="{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape}">{$CONST.TRACKBACK_SPECIFIC}</a>
|
119
|
+
</div>
|
120
|
+
<br />
|
121
|
+
{serendipity_printTrackbacks entry=$entry.id}
|
122
|
+
</div>
|
123
|
+
<div class="serendipity_comments">
|
124
|
+
<br />
|
125
|
+
<a id="comments"></a>
|
126
|
+
<div class="serendipity_commentsTitle">{$CONST.COMMENTS}</div>
|
127
|
+
<div class="serendipity_center">{$CONST.DISPLAY_COMMENTS_AS}
|
128
|
+
{if $entry.viewmode eq $CONST.VIEWMODE_LINEAR}
|
129
|
+
({$CONST.COMMENTS_VIEWMODE_LINEAR} | <a href="{$entry.link_viewmode_threaded}#comments">{$CONST.COMMENTS_VIEWMODE_THREADED}</a>)
|
130
|
+
{else}
|
131
|
+
(<a href="{$entry.link_viewmode_linear}#comments">{$CONST.COMMENTS_VIEWMODE_LINEAR}</a> | {$CONST.COMMENTS_VIEWMODE_THREADED})
|
132
|
+
{/if}
|
133
|
+
</div>
|
134
|
+
<br />
|
135
|
+
{serendipity_printComments entry=$entry.id mode=$entry.viewmode}
|
136
|
+
|
137
|
+
{if $entry.is_entry_owner}
|
138
|
+
{if $entry.allow_comments}
|
139
|
+
<div class="serendipity_center">(<a href="{$entry.link_deny_comments}">{$CONST.COMMENTS_DISABLE}</a>)</div>
|
140
|
+
{else}
|
141
|
+
<div class="serendipity_center">(<a href="{$entry.link_allow_comments}">{$CONST.COMMENTS_ENABLE}</a>)</div>
|
142
|
+
{/if}
|
143
|
+
{/if}
|
144
|
+
<a id="feedback"></a>
|
145
|
+
|
146
|
+
{foreach from=$comments_messagestack item="message"}
|
147
|
+
<div class="serendipity_center serendipity_msg_important">{$message}</div>
|
148
|
+
{/foreach}
|
149
|
+
|
150
|
+
{if $is_comment_added}
|
151
|
+
|
152
|
+
<br />
|
153
|
+
<div class="serendipity_center serendipity_msg_notice">{$CONST.COMMENT_ADDED}</div>
|
154
|
+
|
155
|
+
{elseif $is_comment_moderate}
|
156
|
+
|
157
|
+
<br />
|
158
|
+
<div class="serendipity_center serendipity_msg_notice">{$CONST.COMMENT_ADDED}<br />{$CONST.THIS_COMMENT_NEEDS_REVIEW}</div>
|
159
|
+
|
160
|
+
{elseif not $entry.allow_comments}
|
161
|
+
|
162
|
+
<br />
|
163
|
+
<div class="serendipity_center serendipity_msg_important">{$CONST.COMMENTS_CLOSED}</div>
|
164
|
+
|
165
|
+
{else}
|
166
|
+
|
167
|
+
<br />
|
168
|
+
<div class="serendipity_commentsTitle">{$CONST.ADD_COMMENT}</div>
|
169
|
+
{$COMMENTFORM}
|
170
|
+
|
171
|
+
{/if}
|
172
|
+
</div>
|
173
|
+
{/if}
|
174
|
+
|
175
|
+
{$entry.backend_preview}
|
176
|
+
{/foreach}
|
177
|
+
</div>
|
178
|
+
{foreachelse}
|
179
|
+
{if not $plugin_clean_page}
|
180
|
+
{$CONST.NO_ENTRIES_TO_PRINT}
|
181
|
+
{/if}
|
182
|
+
{/foreach}
|
183
|
+
|
184
|
+
{if $footer_info}
|
185
|
+
<div class="serendipity_pageFooter">
|
186
|
+
{if $footer_info}
|
187
|
+
{if $footer_prev_page}
|
188
|
+
<span class="previous"><a href="{$footer_prev_page}">« {$CONST.PREVIOUS_PAGE}</a></span>
|
189
|
+
{else}
|
190
|
+
<span class="previous"> </span>
|
191
|
+
{/if}
|
192
|
+
{else}
|
193
|
+
{/if}
|
194
|
+
|
195
|
+
{if $footer_info}
|
196
|
+
<span class="entries_info">({$footer_info})</span>
|
197
|
+
{/if}
|
198
|
+
|
199
|
+
{if $footer_info}
|
200
|
+
{if $footer_next_page}
|
201
|
+
<span class="next"><a href="{$footer_next_page}">{$CONST.NEXT_PAGE} »</a></span>
|
202
|
+
{else}
|
203
|
+
<span class="next"> </span>
|
204
|
+
{/if}
|
205
|
+
{else}
|
206
|
+
{/if}
|
207
|
+
</div>{/if}
|
208
|
+
{serendipity_hookPlugin hook="entries_footer"}
|
209
|
+
<!-- ENTRIES END -->
|
@@ -0,0 +1,343 @@
|
|
1
|
+
|
2
|
+
% this is a single-line comment
|
3
|
+
|
4
|
+
/*
|
5
|
+
this is
|
6
|
+
a block
|
7
|
+
comment
|
8
|
+
*/
|
9
|
+
|
10
|
+
|
11
|
+
:- encoding(some_encoding).
|
12
|
+
:- op(Precedence, Associativity, Operator).
|
13
|
+
|
14
|
+
|
15
|
+
:- object(prototype,
|
16
|
+
implements(protocol),
|
17
|
+
imports(category),
|
18
|
+
extends(parent)).
|
19
|
+
|
20
|
+
:- info([
|
21
|
+
version is 1.0,
|
22
|
+
author is 'Paulo Moura',
|
23
|
+
date is 2008/5/1,
|
24
|
+
comment is 'Sample prototype for testing syntax coloring.']).
|
25
|
+
:- threaded.
|
26
|
+
:- synchronized.
|
27
|
+
:- dynamic.
|
28
|
+
:- initialization(some_goal(X, Y)).
|
29
|
+
:- calls(some_other_protocol).
|
30
|
+
:- uses(another_object).
|
31
|
+
|
32
|
+
:- alias(set, member/2, set_member/2).
|
33
|
+
:- alias(words, singular//0, peculiar//0).
|
34
|
+
|
35
|
+
:- uses(list, [append/3, member/2]).
|
36
|
+
:- uses(queues, [new/1::new_queue/1]).
|
37
|
+
|
38
|
+
:- public(aaa/2).
|
39
|
+
:- meta_predicate(aaa(::, *)).
|
40
|
+
:- discontiguous(aaa/2).
|
41
|
+
:- mode(aaa(+callable, ?integer), zero_or_one).
|
42
|
+
:- info(position/2, [
|
43
|
+
comment is 'Predicate brief description.',
|
44
|
+
arguments is ['Arg1'-'Arg1 description', 'Arg2'-'Arg2 description']]).
|
45
|
+
|
46
|
+
:- protected(bbb/2).
|
47
|
+
:- synchronized(bbb/2).
|
48
|
+
:- mode(bbb(+integer, -float), one).
|
49
|
+
:- info(bbb/2, [
|
50
|
+
comment is 'Predicate brief description.',
|
51
|
+
argnames is ['Arg1', 'Arg2']]).
|
52
|
+
|
53
|
+
:- private(ccc/2).
|
54
|
+
:- dynamic(ccc/2).
|
55
|
+
:- mode(ccc(@atom, ?atom), one_or_more).
|
56
|
+
:- info(ccc/2, [
|
57
|
+
comment is 'Predicate brief description.',
|
58
|
+
argnames is ['Arg1', 'Arg2']]).
|
59
|
+
|
60
|
+
enumerating_entities(Object, Protocol, Category) :-
|
61
|
+
current_category(Category),
|
62
|
+
current_object(Object),
|
63
|
+
current_protocol(Protocol).
|
64
|
+
|
65
|
+
enumerating_properties :-
|
66
|
+
category_property(Category, Property),
|
67
|
+
object_property(Object, Property),
|
68
|
+
protocol_property(Protocol, Property).
|
69
|
+
|
70
|
+
creating_entities(Object, Protocol, Category) :-
|
71
|
+
create_category(Category, Relations, Directives, Clauses),
|
72
|
+
create_object(Object, Relations, Directives, Clauses),
|
73
|
+
create_protocol(Protocol, Relations, Directives).
|
74
|
+
|
75
|
+
abolishing_entities(Object, Protocol, Category) :-
|
76
|
+
abolish_category(Category),
|
77
|
+
abolish_object(Object),
|
78
|
+
abolish_protocol(Protocol).
|
79
|
+
|
80
|
+
entity_relations :-
|
81
|
+
extends_object(Prototype, Parent, Scope),
|
82
|
+
extends_protocol(Protocol1, Protocol2, Scope),
|
83
|
+
extends_category(Category1, Category2, Scope),
|
84
|
+
implements_protocol(Object, Protocol, Scope),
|
85
|
+
imports_category(Object, Category, Scope),
|
86
|
+
instantiates_class(Instance, Class, Scope),
|
87
|
+
specializes_class(Class, Superclass, Scope),
|
88
|
+
complements_object(Category, Object).
|
89
|
+
|
90
|
+
event_handling :-
|
91
|
+
abolish_events(Event, Object, Message, Sender, Monitor),
|
92
|
+
current_event(Event, Object, Message, Sender, Monitor),
|
93
|
+
define_events(Event, Object, Message, Sender, Monitor).
|
94
|
+
|
95
|
+
multi_threading :-
|
96
|
+
threaded(Goals),
|
97
|
+
threaded_call(Goal),
|
98
|
+
threaded_once(Goal),
|
99
|
+
threaded_ignore(Goal),
|
100
|
+
threaded_exit(Goal),
|
101
|
+
threaded_peek(Goal),
|
102
|
+
threaded_wait(Goal),
|
103
|
+
threaded_notify(Notification).
|
104
|
+
|
105
|
+
compiling_and_loading :-
|
106
|
+
logtalk_compile(File, Options),
|
107
|
+
logtalk_load(File, Options),
|
108
|
+
logtalk_library_path(Library, Path).
|
109
|
+
|
110
|
+
flags :-
|
111
|
+
current_logtalk_flag(Flag, Value),
|
112
|
+
set_logtalk_flag(Flag, Value).
|
113
|
+
|
114
|
+
execution_context_methods :-
|
115
|
+
parameter(N, Parameter),
|
116
|
+
self(Self),
|
117
|
+
sender(Sender),
|
118
|
+
this(This).
|
119
|
+
|
120
|
+
reflection_methods :-
|
121
|
+
current_predicate(Predicate),
|
122
|
+
predicate_property(Predicate, Property).
|
123
|
+
|
124
|
+
database_methods :-
|
125
|
+
abolish(Functor/Arity),
|
126
|
+
asserta(Clause),
|
127
|
+
assertz(Clause),
|
128
|
+
clause(Head, Body),
|
129
|
+
retract(Clause),
|
130
|
+
retractall(Head).
|
131
|
+
|
132
|
+
meta_call_methods :-
|
133
|
+
call(Goal).
|
134
|
+
|
135
|
+
all_solutions_methods :-
|
136
|
+
bagof(Term, Goal, List),
|
137
|
+
findall(Term, Goal, List),
|
138
|
+
forall(Generate, Test),
|
139
|
+
setof(Term, Goal, List).
|
140
|
+
|
141
|
+
event_handler_methods :-
|
142
|
+
before(Object, Message, Sender),
|
143
|
+
after(Object, Message, Sender).
|
144
|
+
|
145
|
+
dcg_rules_parsing_methods :-
|
146
|
+
phrase(NonTerminal, Input, Rest).
|
147
|
+
|
148
|
+
term_expansion_methods :-
|
149
|
+
expand_term(Term, Expanded),
|
150
|
+
term_expansion(Term, Expanded),
|
151
|
+
goal_expansion(Goal, Expanded).
|
152
|
+
|
153
|
+
message_sending :-
|
154
|
+
Object::Message,
|
155
|
+
::Message,
|
156
|
+
^^Message.
|
157
|
+
|
158
|
+
calling_external_code :-
|
159
|
+
{goal1, goal2, goal3}.
|
160
|
+
|
161
|
+
context_switching_calls :-
|
162
|
+
Object<<Goal.
|
163
|
+
|
164
|
+
direct_calls_of_category_predicates :-
|
165
|
+
:Goal.
|
166
|
+
|
167
|
+
if_then_else :-
|
168
|
+
( If ->
|
169
|
+
Then
|
170
|
+
; Else
|
171
|
+
).
|
172
|
+
|
173
|
+
numbers :-
|
174
|
+
X is 13,
|
175
|
+
Y is 13.13,
|
176
|
+
Z is 13.13e-23,
|
177
|
+
C1 is 0'A, C2 is 0'', C3 is 0'",
|
178
|
+
B is 0b1011101,
|
179
|
+
O is 0o1234560,
|
180
|
+
H is 0x1234567890abcDEF.
|
181
|
+
|
182
|
+
functions :-
|
183
|
+
A is atan(3.14) + sin(0.77) - cos(123.23),
|
184
|
+
B is sign(-12) * abs(35/78),
|
185
|
+
C is truncate(3.14) + round(-7.8) - ceiling(111.88),
|
186
|
+
D is exp(3.8) - log(123.98) / sqrt(33) * 23 ** 4,
|
187
|
+
E is rem(3, 2) + mod(5, 3) * 2 rem 2 // 5 mod 3,
|
188
|
+
F is float_fractional_part(3.14) + float_integer_part(3.14),
|
189
|
+
G is float(33) + floor(99.99).
|
190
|
+
|
191
|
+
bitwise :-
|
192
|
+
A is 16 >> 2,
|
193
|
+
B is 16 << 2,
|
194
|
+
C is 10 /\ 12,
|
195
|
+
D is 10 \/ 12,
|
196
|
+
E is \ 10.
|
197
|
+
|
198
|
+
term_unification :-
|
199
|
+
Term1 = Term2,
|
200
|
+
Term1 \= Term2,
|
201
|
+
unify_with_occurs_check(Term1, Term2).
|
202
|
+
|
203
|
+
term_testing :-
|
204
|
+
atom(Atom),
|
205
|
+
atomic(Atomic),
|
206
|
+
integer(Integer),
|
207
|
+
float(Float),
|
208
|
+
compound(Term),
|
209
|
+
nonvar(Term),
|
210
|
+
var(Term),
|
211
|
+
number(Number).
|
212
|
+
|
213
|
+
term_comparison :-
|
214
|
+
Term1 == Term2,
|
215
|
+
Term1 \== Term2,
|
216
|
+
Term1 @< Term2,
|
217
|
+
Term1 @=< Term2,
|
218
|
+
Term1 @>= Term2,
|
219
|
+
Term1 @> Term2.
|
220
|
+
|
221
|
+
term_creation_and_decomposition :-
|
222
|
+
functor(Term, Functor, Arity),
|
223
|
+
arg(N, Term, Arg),
|
224
|
+
Term =.. [Functor| Args],
|
225
|
+
copy_term(Term, Copy).
|
226
|
+
|
227
|
+
arithemtic_evaluation :-
|
228
|
+
X is Expression.
|
229
|
+
|
230
|
+
arithemtic_comparison :-
|
231
|
+
Exp1 =:= Exp2,
|
232
|
+
Exp1 =\= Exp2,
|
233
|
+
Exp1 < Exp2,
|
234
|
+
Exp1 =< Exp2,
|
235
|
+
Exp1 > Exp2,
|
236
|
+
Exp1 >= Exp2.
|
237
|
+
|
238
|
+
stream_selection_and_control :-
|
239
|
+
current_input(Stream),
|
240
|
+
current_output(Stream),
|
241
|
+
set_input(Stream),
|
242
|
+
set_output(Stream),
|
243
|
+
open(Source, Mode, Stream, Options),
|
244
|
+
close(Stream),
|
245
|
+
flush_output(Stream),
|
246
|
+
stream_property(Stream, Property),
|
247
|
+
at_end_of_stream(Stream),
|
248
|
+
set_stream_position(Stream, Position),
|
249
|
+
flush_output,
|
250
|
+
at_end_of_stream.
|
251
|
+
|
252
|
+
character_input_output :-
|
253
|
+
get_char(Char),
|
254
|
+
get_code(Code),
|
255
|
+
peek_char(Char),
|
256
|
+
peek_code(Code),
|
257
|
+
put_char(Char),
|
258
|
+
put_code(Code),
|
259
|
+
nl(Stream),
|
260
|
+
nl.
|
261
|
+
|
262
|
+
byte_input_output :-
|
263
|
+
get_byte(Byte),
|
264
|
+
peek_byte(Byte),
|
265
|
+
put_byte(Byte).
|
266
|
+
|
267
|
+
term_input_output :-
|
268
|
+
read(Term),
|
269
|
+
read_term(Term),
|
270
|
+
write(Term),
|
271
|
+
write(Term),
|
272
|
+
write_canonical(Term),
|
273
|
+
write_term(Stream, Term, Options),
|
274
|
+
current_op(Precedence, Associativity, Operator),
|
275
|
+
op(Precedence, Associativity, Operator),
|
276
|
+
current_char_conversion(InChar, OutChar),
|
277
|
+
char_conversion(InChar, OutChar).
|
278
|
+
|
279
|
+
logic_and_control :-
|
280
|
+
\+ Goal,
|
281
|
+
once(Goal),
|
282
|
+
repeat,
|
283
|
+
!.
|
284
|
+
|
285
|
+
atomic_term_processing :-
|
286
|
+
atom_length(Atom, Length),
|
287
|
+
atom_chars(Atom, Chars),
|
288
|
+
atom_codes(Atom, Codes),
|
289
|
+
atom_concat(Atom1, Atom2, Atom),
|
290
|
+
sub_atom(Atom, Before, Length, After, SubAtom),
|
291
|
+
char_code(Char, Code),
|
292
|
+
number_chars(Number, Chars),
|
293
|
+
number_codes(Number, Codes).
|
294
|
+
|
295
|
+
implementation_defined_hooks :-
|
296
|
+
current_prolog_flag(Flag, Value),
|
297
|
+
set_prolog_flag(Flag, Value),
|
298
|
+
halt(ExitCode),
|
299
|
+
halt.
|
300
|
+
|
301
|
+
number(C) --> "+", number(C).
|
302
|
+
number(C) --> "-", number(X), {C is -X}.
|
303
|
+
number(X) --> [C], {0'0 =< C, C =< 0'9, X is C - 0'0}.
|
304
|
+
|
305
|
+
:- end_object.
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
:- object(class,
|
310
|
+
implements(protocol),
|
311
|
+
imports(category),
|
312
|
+
instantiates(metaclass),
|
313
|
+
specializes(superclass)).
|
314
|
+
|
315
|
+
|
316
|
+
:- end_object.
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
:- object(parametric(_Par1, _Par2),
|
321
|
+
implements(protocol),
|
322
|
+
imports(category),
|
323
|
+
extends(parent(_Par))).
|
324
|
+
|
325
|
+
|
326
|
+
:- end_object.
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
:- category(category,
|
331
|
+
implements(protocol),
|
332
|
+
extends(other_category)).
|
333
|
+
|
334
|
+
|
335
|
+
:- end_category.
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
:- protocol(extended,
|
340
|
+
extends(minimal)).
|
341
|
+
|
342
|
+
|
343
|
+
:- end_protocol.
|