gitlab-pygments.rb 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,96 @@
|
|
|
1
|
+
; test source file for assembling to NetBSD/FreeBSD a.out shared library
|
|
2
|
+
; build with:
|
|
3
|
+
; nasm -f aoutb aoutso.asm
|
|
4
|
+
; ld -Bshareable -o aoutso.so aoutso.o
|
|
5
|
+
; test with:
|
|
6
|
+
; cc -o aoutso aouttest.c aoutso.so
|
|
7
|
+
; ./aoutso
|
|
8
|
+
|
|
9
|
+
; This file should test the following:
|
|
10
|
+
; [1] Define and export a global text-section symbol
|
|
11
|
+
; [2] Define and export a global data-section symbol
|
|
12
|
+
; [3] Define and export a global BSS-section symbol
|
|
13
|
+
; [4] Define a non-global text-section symbol
|
|
14
|
+
; [5] Define a non-global data-section symbol
|
|
15
|
+
; [6] Define a non-global BSS-section symbol
|
|
16
|
+
; [7] Define a COMMON symbol
|
|
17
|
+
; [8] Define a NASM local label
|
|
18
|
+
; [9] Reference a NASM local label
|
|
19
|
+
; [10] Import an external symbol
|
|
20
|
+
; [11] Make a PC-relative call to an external symbol
|
|
21
|
+
; [12] Reference a text-section symbol in the text section
|
|
22
|
+
; [13] Reference a data-section symbol in the text section
|
|
23
|
+
; [14] Reference a BSS-section symbol in the text section
|
|
24
|
+
; [15] Reference a text-section symbol in the data section
|
|
25
|
+
; [16] Reference a data-section symbol in the data section
|
|
26
|
+
; [17] Reference a BSS-section symbol in the data section
|
|
27
|
+
|
|
28
|
+
BITS 32
|
|
29
|
+
EXTERN __GLOBAL_OFFSET_TABLE_
|
|
30
|
+
GLOBAL _lrotate:function ; [1]
|
|
31
|
+
GLOBAL _greet:function ; [1]
|
|
32
|
+
GLOBAL _asmstr:data _asmstr.end-_asmstr ; [2]
|
|
33
|
+
GLOBAL _textptr:data 4 ; [2]
|
|
34
|
+
GLOBAL _selfptr:data 4 ; [2]
|
|
35
|
+
GLOBAL _integer:data 4 ; [3]
|
|
36
|
+
EXTERN _printf ; [10]
|
|
37
|
+
COMMON _commvar 4 ; [7]
|
|
38
|
+
|
|
39
|
+
SECTION .text
|
|
40
|
+
|
|
41
|
+
; prototype: long lrotate(long x, int num);
|
|
42
|
+
_lrotate: ; [1]
|
|
43
|
+
push ebp
|
|
44
|
+
mov ebp,esp
|
|
45
|
+
mov eax,[ebp+8]
|
|
46
|
+
mov ecx,[ebp+12]
|
|
47
|
+
.label rol eax,1 ; [4] [8]
|
|
48
|
+
loop .label ; [9] [12]
|
|
49
|
+
mov esp,ebp
|
|
50
|
+
pop ebp
|
|
51
|
+
ret
|
|
52
|
+
|
|
53
|
+
; prototype: void greet(void);
|
|
54
|
+
_greet push ebx ; we'll use EBX for GOT, so save it
|
|
55
|
+
call .getgot
|
|
56
|
+
.getgot: pop ebx
|
|
57
|
+
add ebx,__GLOBAL_OFFSET_TABLE_ + $$ - .getgot wrt ..gotpc
|
|
58
|
+
mov eax,[ebx+_integer wrt ..got] ; [14]
|
|
59
|
+
mov eax,[eax]
|
|
60
|
+
inc eax
|
|
61
|
+
mov [ebx+localint wrt ..gotoff],eax ; [14]
|
|
62
|
+
mov eax,[ebx+_commvar wrt ..got]
|
|
63
|
+
push dword [eax]
|
|
64
|
+
mov eax,[ebx+localptr wrt ..gotoff] ; [13]
|
|
65
|
+
push dword [eax]
|
|
66
|
+
mov eax,[ebx+_integer wrt ..got] ; [1] [14]
|
|
67
|
+
push dword [eax]
|
|
68
|
+
lea eax,[ebx+_printfstr wrt ..gotoff]
|
|
69
|
+
push eax ; [13]
|
|
70
|
+
call _printf wrt ..plt ; [11]
|
|
71
|
+
add esp,16
|
|
72
|
+
pop ebx
|
|
73
|
+
ret
|
|
74
|
+
|
|
75
|
+
SECTION .data
|
|
76
|
+
|
|
77
|
+
; a string
|
|
78
|
+
_asmstr db 'hello, world', 0 ; [2]
|
|
79
|
+
.end
|
|
80
|
+
|
|
81
|
+
; a string for Printf
|
|
82
|
+
_printfstr db "integer==%d, localint==%d, commvar=%d"
|
|
83
|
+
db 10, 0
|
|
84
|
+
|
|
85
|
+
; some pointers
|
|
86
|
+
localptr dd localint ; [5] [17]
|
|
87
|
+
_textptr dd _greet wrt ..sym ; [15]
|
|
88
|
+
_selfptr dd _selfptr wrt ..sym ; [16]
|
|
89
|
+
|
|
90
|
+
SECTION .bss
|
|
91
|
+
|
|
92
|
+
; an integer
|
|
93
|
+
_integer resd 1 ; [3]
|
|
94
|
+
|
|
95
|
+
; a local integer
|
|
96
|
+
localint resd 1 ; [6]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
; Demonstration of how to write an entire .EXE format program as a .OBJ
|
|
2
|
+
; file to be linked. Tested with the VAL free linker.
|
|
3
|
+
; To build:
|
|
4
|
+
; nasm -fobj objexe.asm
|
|
5
|
+
; val objexe.obj,objexe.exe;
|
|
6
|
+
; To test:
|
|
7
|
+
; objexe
|
|
8
|
+
; (should print `hello, world')
|
|
9
|
+
|
|
10
|
+
segment code
|
|
11
|
+
|
|
12
|
+
..start: mov ax,data
|
|
13
|
+
mov ds,ax
|
|
14
|
+
mov ax,stack
|
|
15
|
+
mov ss,ax
|
|
16
|
+
mov sp,stacktop
|
|
17
|
+
|
|
18
|
+
mov dx,hello
|
|
19
|
+
mov ah,9
|
|
20
|
+
int 0x21
|
|
21
|
+
|
|
22
|
+
mov ax,0x4c00
|
|
23
|
+
int 0x21
|
|
24
|
+
|
|
25
|
+
segment data
|
|
26
|
+
hello: db 'hello, world', 13, 10, '$'
|
|
27
|
+
|
|
28
|
+
segment stack stack
|
|
29
|
+
resb 64
|
|
30
|
+
stacktop:
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
|
|
3
|
+
namespace Demo.Ns
|
|
4
|
+
{
|
|
5
|
+
/// sample class
|
|
6
|
+
public class ClassSample : Base
|
|
7
|
+
{
|
|
8
|
+
/* sample multiline comment */
|
|
9
|
+
#region region sample
|
|
10
|
+
fieldSample : int;
|
|
11
|
+
#endregion
|
|
12
|
+
|
|
13
|
+
public virtual someMethod(str : string) : list[double]
|
|
14
|
+
{
|
|
15
|
+
def x = "simple string";
|
|
16
|
+
def x = $"simple $splice string $(spliceMethod() + 1)";
|
|
17
|
+
def x = <#
|
|
18
|
+
recursive <# string #> sample
|
|
19
|
+
#>;
|
|
20
|
+
def x = $<#
|
|
21
|
+
recursive $splice <# string #> sample
|
|
22
|
+
..$(lst; "; "; x => $"x * 2 = $(x * 2)") str
|
|
23
|
+
#>;
|
|
24
|
+
def x = @"somestring \";
|
|
25
|
+
|
|
26
|
+
def localFunc(arg)
|
|
27
|
+
{
|
|
28
|
+
arg + 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
match (localFunc(2))
|
|
32
|
+
{
|
|
33
|
+
| 3 => "ok";
|
|
34
|
+
| _ => "fail";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
using (x = SomeObject())
|
|
38
|
+
{
|
|
39
|
+
foreach (item in someCollection)
|
|
40
|
+
{
|
|
41
|
+
def i = try
|
|
42
|
+
{
|
|
43
|
+
int.Parse(item)
|
|
44
|
+
}
|
|
45
|
+
catch
|
|
46
|
+
{
|
|
47
|
+
| _ is FormatException => 0;
|
|
48
|
+
}
|
|
49
|
+
when (i > 0xff)
|
|
50
|
+
unless (i < 555L)
|
|
51
|
+
WriteLine(i);
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
protected override overrideSample() : void
|
|
56
|
+
{}
|
|
57
|
+
|
|
58
|
+
private privateSample() : void
|
|
59
|
+
{}
|
|
60
|
+
|
|
61
|
+
public abstract abstractSample() : void
|
|
62
|
+
{}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
module ModuleSample
|
|
68
|
+
{
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
variant RgbColor {
|
|
72
|
+
| Red
|
|
73
|
+
| Yellow
|
|
74
|
+
| Green
|
|
75
|
+
| Different {
|
|
76
|
+
red : float;
|
|
77
|
+
green : float;
|
|
78
|
+
blue : float;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
macro sampleMacro(expr)
|
|
83
|
+
syntax ("write", expr)
|
|
84
|
+
{
|
|
85
|
+
<[ WriteLine($(expr : dyn)) ]>
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
|
|
2
|
+
#user nobody;
|
|
3
|
+
worker_processes 1;
|
|
4
|
+
|
|
5
|
+
#error_log logs/error.log;
|
|
6
|
+
#error_log logs/error.log notice;
|
|
7
|
+
#error_log logs/error.log info;
|
|
8
|
+
|
|
9
|
+
#pid logs/nginx.pid;
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
events {
|
|
13
|
+
worker_connections 1024;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
http {
|
|
18
|
+
include mime.types;
|
|
19
|
+
default_type application/octet-stream;
|
|
20
|
+
|
|
21
|
+
log_format main '$remote_addr - $remote_user [$time_local] $request '
|
|
22
|
+
'"$status" $body_bytes_sent "$http_referer" '
|
|
23
|
+
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
24
|
+
|
|
25
|
+
#access_log logs/access.log main;
|
|
26
|
+
|
|
27
|
+
sendfile on;
|
|
28
|
+
#tcp_nopush on;
|
|
29
|
+
|
|
30
|
+
#keepalive_timeout 0;
|
|
31
|
+
keepalive_timeout 65;
|
|
32
|
+
|
|
33
|
+
#gzip on;
|
|
34
|
+
|
|
35
|
+
server {
|
|
36
|
+
listen 80;
|
|
37
|
+
server_name localhost;
|
|
38
|
+
|
|
39
|
+
charset koi8-r;
|
|
40
|
+
|
|
41
|
+
#access_log logs/host.access.log main;
|
|
42
|
+
|
|
43
|
+
location / {
|
|
44
|
+
root html;
|
|
45
|
+
index index.html index.htm;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
#error_page 404 /404.html;
|
|
49
|
+
|
|
50
|
+
# redirect server error pages to the static page /50x.html
|
|
51
|
+
#
|
|
52
|
+
error_page 500 502 503 504 /50x.html;
|
|
53
|
+
location = /50x.html {
|
|
54
|
+
root html;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
|
58
|
+
#
|
|
59
|
+
location ~ \.php$ {
|
|
60
|
+
proxy_pass http://127.0.0.1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
|
64
|
+
#
|
|
65
|
+
location ~ \.php$ {
|
|
66
|
+
root html;
|
|
67
|
+
fastcgi_pass 127.0.0.1:9000;
|
|
68
|
+
fastcgi_index index.php;
|
|
69
|
+
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
|
70
|
+
include fastcgi_params;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
# deny access to .htaccess files, if Apache's document root
|
|
74
|
+
# concurs with nginx's one
|
|
75
|
+
#
|
|
76
|
+
location ~ /\.ht {
|
|
77
|
+
deny all;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
# another virtual host using mix of IP-, name-, and port-based configuration
|
|
83
|
+
#
|
|
84
|
+
server {
|
|
85
|
+
listen 8000;
|
|
86
|
+
listen somename:8080;
|
|
87
|
+
server_name somename alias another.alias;
|
|
88
|
+
|
|
89
|
+
location / {
|
|
90
|
+
root html;
|
|
91
|
+
index index.html index.htm;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# HTTPS server
|
|
97
|
+
#
|
|
98
|
+
server {
|
|
99
|
+
listen 443;
|
|
100
|
+
server_name localhost;
|
|
101
|
+
|
|
102
|
+
ssl on;
|
|
103
|
+
ssl_certificate cert.pem;
|
|
104
|
+
ssl_certificate_key cert.key;
|
|
105
|
+
|
|
106
|
+
ssl_session_timeout 5m;
|
|
107
|
+
|
|
108
|
+
ssl_protocols SSLv2 SSLv3 TLSv1;
|
|
109
|
+
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
|
|
110
|
+
ssl_prefer_server_ciphers on;
|
|
111
|
+
|
|
112
|
+
location / {
|
|
113
|
+
root html;
|
|
114
|
+
index index.html index.htm;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#import "Somefile.h"
|
|
2
|
+
|
|
3
|
+
@implementation ABC
|
|
4
|
+
|
|
5
|
+
- (id)a:(B)b {
|
|
6
|
+
return 1;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@end
|
|
10
|
+
|
|
11
|
+
@implementation ABC
|
|
12
|
+
|
|
13
|
+
- (void)xyz;
|
|
14
|
+
|
|
15
|
+
@end
|
|
16
|
+
|
|
17
|
+
NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:
|
|
18
|
+
@"quattuor", @"four", @"quinque", @"five", @"sex", @"six", nil];
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
NSString *key;
|
|
22
|
+
for (key in dictionary) {
|
|
23
|
+
NSLog(@"English: %@, Latin: %@", key, [dictionary valueForKey:key]);
|
|
24
|
+
}
|
|
25
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// MyClass.h
|
|
2
|
+
@interface MyClass : NSObject
|
|
3
|
+
{
|
|
4
|
+
NSString *value;
|
|
5
|
+
NSTextField *textField;
|
|
6
|
+
@private
|
|
7
|
+
NSDate *lastModifiedDate;
|
|
8
|
+
}
|
|
9
|
+
@property(copy, readwrite) NSString *value;
|
|
10
|
+
@property(retain) IBOutlet NSTextField *textField;
|
|
11
|
+
@end
|
|
12
|
+
|
|
13
|
+
// MyClass.m
|
|
14
|
+
// Class extension to declare private property
|
|
15
|
+
@interface MyClass ()
|
|
16
|
+
@property(retain) NSDate *lastModifiedDate;
|
|
17
|
+
@end
|
|
18
|
+
|
|
19
|
+
@implementation MyClass
|
|
20
|
+
@synthesize value;
|
|
21
|
+
@synthesize textField;
|
|
22
|
+
@synthesize lastModifiedDate;
|
|
23
|
+
// implementation continues
|
|
24
|
+
@end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/perl
|
|
2
|
+
|
|
3
|
+
# from http://gist.github.com/485595
|
|
4
|
+
use strict;
|
|
5
|
+
use warnings;
|
|
6
|
+
use Time::HiRes 'usleep';
|
|
7
|
+
|
|
8
|
+
for (1..5) {
|
|
9
|
+
open my $in, '<', '/proc/sys/kernel/random/entropy_avail' or die;
|
|
10
|
+
print <$in>;
|
|
11
|
+
close $in;
|
|
12
|
+
usleep 100_000;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
# other miscellaneous tests of numbers separated by _
|
|
16
|
+
#usleep 100_000;
|
|
17
|
+
100_000_000;
|
|
18
|
+
my $nichts = 0.005_006;
|
|
19
|
+
print "$nichts\n";
|
|
20
|
+
my $nichts2 = 0.005_006_007;
|
|
21
|
+
print 900_800_700.005_006_007, $/;
|
|
22
|
+
|
|
23
|
+
# numbers from `man 1 perlnumber`
|
|
24
|
+
my $n;
|
|
25
|
+
$n = 1234; # decimal integer
|
|
26
|
+
$n = 0b1110011; # binary integer
|
|
27
|
+
$n = 01234; # octal integer
|
|
28
|
+
$n = 0x1234; # hexadecimal integer
|
|
29
|
+
$n = 12.34e-56; # exponential notation
|
|
30
|
+
$n = "-12.34e56"; # number specified as a string
|
|
31
|
+
$n = "1234"; # number specified as a string
|
|
32
|
+
|
|
33
|
+
# other numbers
|
|
34
|
+
for (
|
|
35
|
+
-9876,
|
|
36
|
+
+8765,
|
|
37
|
+
-9876.02,
|
|
38
|
+
-9876.02e+10,
|
|
39
|
+
+765_432e30,
|
|
40
|
+
2002.,
|
|
41
|
+
.2002,
|
|
42
|
+
) {
|
|
43
|
+
print $_, "\n";
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
# operators on numbers
|
|
47
|
+
for (
|
|
48
|
+
$n + 300,
|
|
49
|
+
$n - 300,
|
|
50
|
+
$n / 300 + 10,
|
|
51
|
+
$n * 250 / 2.0,
|
|
52
|
+
$n == 100,
|
|
53
|
+
$n != 100,
|
|
54
|
+
$n > 100,
|
|
55
|
+
$n >= 100,
|
|
56
|
+
$n < 100,
|
|
57
|
+
$n <= 100,
|
|
58
|
+
$n % 2,
|
|
59
|
+
abs $n,
|
|
60
|
+
) {
|
|
61
|
+
print $_, "\n";
|
|
62
|
+
}
|