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,3339 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
"""
|
3
|
+
pygments.lexers.other
|
4
|
+
~~~~~~~~~~~~~~~~~~~~~
|
5
|
+
|
6
|
+
Lexers for other languages.
|
7
|
+
|
8
|
+
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
|
9
|
+
:license: BSD, see LICENSE for details.
|
10
|
+
"""
|
11
|
+
|
12
|
+
import re
|
13
|
+
|
14
|
+
from pygments.lexer import RegexLexer, include, bygroups, using, \
|
15
|
+
this, combined, ExtendedRegexLexer
|
16
|
+
from pygments.token import Error, Punctuation, Literal, Token, \
|
17
|
+
Text, Comment, Operator, Keyword, Name, String, Number, Generic
|
18
|
+
from pygments.lexers.web import HtmlLexer
|
19
|
+
|
20
|
+
|
21
|
+
# backwards compatibility
|
22
|
+
from pygments.lexers.sql import SqlLexer, MySqlLexer, SqliteConsoleLexer
|
23
|
+
from pygments.lexers.shell import BashLexer, BashSessionLexer, BatchLexer, \
|
24
|
+
TcshLexer
|
25
|
+
|
26
|
+
__all__ = ['BrainfuckLexer', 'BefungeLexer', 'RedcodeLexer', 'MOOCodeLexer',
|
27
|
+
'SmalltalkLexer', 'LogtalkLexer', 'GnuplotLexer', 'PovrayLexer',
|
28
|
+
'AppleScriptLexer', 'ModelicaLexer', 'RebolLexer', 'ABAPLexer',
|
29
|
+
'NewspeakLexer', 'GherkinLexer', 'AsymptoteLexer', 'PostScriptLexer',
|
30
|
+
'AutohotkeyLexer', 'GoodDataCLLexer', 'MaqlLexer', 'ProtoBufLexer',
|
31
|
+
'HybrisLexer', 'AwkLexer', 'Cfengine3Lexer', 'SnobolLexer',
|
32
|
+
'ECLLexer', 'UrbiscriptLexer', 'OpenEdgeLexer', 'BroLexer']
|
33
|
+
|
34
|
+
|
35
|
+
class ECLLexer(RegexLexer):
|
36
|
+
"""
|
37
|
+
Lexer for the declarative big-data `ECL
|
38
|
+
<http://hpccsystems.com/community/docs/ecl-language-reference/html>`_
|
39
|
+
language.
|
40
|
+
|
41
|
+
*New in Pygments 1.5.*
|
42
|
+
"""
|
43
|
+
|
44
|
+
name = 'ECL'
|
45
|
+
aliases = ['ecl']
|
46
|
+
filenames = ['*.ecl']
|
47
|
+
mimetypes = ['application/x-ecl']
|
48
|
+
|
49
|
+
flags = re.IGNORECASE | re.MULTILINE
|
50
|
+
|
51
|
+
tokens = {
|
52
|
+
'root': [
|
53
|
+
include('whitespace'),
|
54
|
+
include('statements'),
|
55
|
+
],
|
56
|
+
'whitespace': [
|
57
|
+
(r'\s+', Text),
|
58
|
+
(r'\/\/.*', Comment.Single),
|
59
|
+
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
|
60
|
+
],
|
61
|
+
'statements': [
|
62
|
+
include('types'),
|
63
|
+
include('keywords'),
|
64
|
+
include('functions'),
|
65
|
+
include('hash'),
|
66
|
+
(r'"', String, 'string'),
|
67
|
+
(r'\'', String, 'string'),
|
68
|
+
(r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float),
|
69
|
+
(r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
|
70
|
+
(r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex),
|
71
|
+
(r'0[0-7]+[LlUu]*', Number.Oct),
|
72
|
+
(r'\d+[LlUu]*', Number.Integer),
|
73
|
+
(r'\*/', Error),
|
74
|
+
(r'[~!%^&*+=|?:<>/-]+', Operator),
|
75
|
+
(r'[{}()\[\],.;]', Punctuation),
|
76
|
+
(r'[a-zA-Z_][a-zA-Z0-9_]*', Name),
|
77
|
+
],
|
78
|
+
'hash': [
|
79
|
+
(r'^#.*$', Comment.Preproc),
|
80
|
+
],
|
81
|
+
'types': [
|
82
|
+
(r'(RECORD|END)\D', Keyword.Declaration),
|
83
|
+
(r'((?:ASCII|BIG_ENDIAN|BOOLEAN|DATA|DECIMAL|EBCDIC|INTEGER|PATTERN|'
|
84
|
+
r'QSTRING|REAL|RECORD|RULE|SET OF|STRING|TOKEN|UDECIMAL|UNICODE|'
|
85
|
+
r'UNSIGNED|VARSTRING|VARUNICODE)\d*)(\s+)',
|
86
|
+
bygroups(Keyword.Type, Text)),
|
87
|
+
],
|
88
|
+
'keywords': [
|
89
|
+
(r'(APPLY|ASSERT|BUILD|BUILDINDEX|EVALUATE|FAIL|KEYDIFF|KEYPATCH|'
|
90
|
+
r'LOADXML|NOTHOR|NOTIFY|OUTPUT|PARALLEL|SEQUENTIAL|SOAPCALL|WAIT'
|
91
|
+
r'CHECKPOINT|DEPRECATED|FAILCODE|FAILMESSAGE|FAILURE|GLOBAL|'
|
92
|
+
r'INDEPENDENT|ONWARNING|PERSIST|PRIORITY|RECOVERY|STORED|SUCCESS|'
|
93
|
+
r'WAIT|WHEN)\b', Keyword.Reserved),
|
94
|
+
# These are classed differently, check later
|
95
|
+
(r'(ALL|AND|ANY|AS|ATMOST|BEFORE|BEGINC\+\+|BEST|BETWEEN|CASE|CONST|'
|
96
|
+
r'COUNTER|CSV|DESCEND|ENCRYPT|ENDC\+\+|ENDMACRO|EXCEPT|EXCLUSIVE|'
|
97
|
+
r'EXPIRE|EXPORT|EXTEND|FALSE|FEW|FIRST|FLAT|FULL|FUNCTION|GROUP|'
|
98
|
+
r'HEADER|HEADING|HOLE|IFBLOCK|IMPORT|IN|JOINED|KEEP|KEYED|LAST|'
|
99
|
+
r'LEFT|LIMIT|LOAD|LOCAL|LOCALE|LOOKUP|MACRO|MANY|MAXCOUNT|'
|
100
|
+
r'MAXLENGTH|MIN SKEW|MODULE|INTERFACE|NAMED|NOCASE|NOROOT|NOSCAN|'
|
101
|
+
r'NOSORT|NOT|OF|ONLY|OPT|OR|OUTER|OVERWRITE|PACKED|PARTITION|'
|
102
|
+
r'PENALTY|PHYSICALLENGTH|PIPE|QUOTE|RELATIONSHIP|REPEAT|RETURN|'
|
103
|
+
r'RIGHT|SCAN|SELF|SEPARATOR|SERVICE|SHARED|SKEW|SKIP|SQL|STORE|'
|
104
|
+
r'TERMINATOR|THOR|THRESHOLD|TOKEN|TRANSFORM|TRIM|TRUE|TYPE|'
|
105
|
+
r'UNICODEORDER|UNSORTED|VALIDATE|VIRTUAL|WHOLE|WILD|WITHIN|XML|'
|
106
|
+
r'XPATH|__COMPRESSED__)\b', Keyword.Reserved),
|
107
|
+
],
|
108
|
+
'functions': [
|
109
|
+
(r'(ABS|ACOS|ALLNODES|ASCII|ASIN|ASSTRING|ATAN|ATAN2|AVE|CASE|'
|
110
|
+
r'CHOOSE|CHOOSEN|CHOOSESETS|CLUSTERSIZE|COMBINE|CORRELATION|COS|'
|
111
|
+
r'COSH|COUNT|COVARIANCE|CRON|DATASET|DEDUP|DEFINE|DENORMALIZE|'
|
112
|
+
r'DISTRIBUTE|DISTRIBUTED|DISTRIBUTION|EBCDIC|ENTH|ERROR|EVALUATE|'
|
113
|
+
r'EVENT|EVENTEXTRA|EVENTNAME|EXISTS|EXP|FAILCODE|FAILMESSAGE|'
|
114
|
+
r'FETCH|FROMUNICODE|GETISVALID|GLOBAL|GRAPH|GROUP|HASH|HASH32|'
|
115
|
+
r'HASH64|HASHCRC|HASHMD5|HAVING|IF|INDEX|INTFORMAT|ISVALID|'
|
116
|
+
r'ITERATE|JOIN|KEYUNICODE|LENGTH|LIBRARY|LIMIT|LN|LOCAL|LOG|LOOP|'
|
117
|
+
r'MAP|MATCHED|MATCHLENGTH|MATCHPOSITION|MATCHTEXT|MATCHUNICODE|'
|
118
|
+
r'MAX|MERGE|MERGEJOIN|MIN|NOLOCAL|NONEMPTY|NORMALIZE|PARSE|PIPE|'
|
119
|
+
r'POWER|PRELOAD|PROCESS|PROJECT|PULL|RANDOM|RANGE|RANK|RANKED|'
|
120
|
+
r'REALFORMAT|RECORDOF|REGEXFIND|REGEXREPLACE|REGROUP|REJECTED|'
|
121
|
+
r'ROLLUP|ROUND|ROUNDUP|ROW|ROWDIFF|SAMPLE|SET|SIN|SINH|SIZEOF|'
|
122
|
+
r'SOAPCALL|SORT|SORTED|SQRT|STEPPED|STORED|SUM|TABLE|TAN|TANH|'
|
123
|
+
r'THISNODE|TOPN|TOUNICODE|TRANSFER|TRIM|TRUNCATE|TYPEOF|UNGROUP|'
|
124
|
+
r'UNICODEORDER|VARIANCE|WHICH|WORKUNIT|XMLDECODE|XMLENCODE|'
|
125
|
+
r'XMLTEXT|XMLUNICODE)\b', Name.Function),
|
126
|
+
],
|
127
|
+
'string': [
|
128
|
+
(r'"', String, '#pop'),
|
129
|
+
(r'\'', String, '#pop'),
|
130
|
+
(r'[^"\']+', String),
|
131
|
+
],
|
132
|
+
}
|
133
|
+
|
134
|
+
|
135
|
+
class BrainfuckLexer(RegexLexer):
|
136
|
+
"""
|
137
|
+
Lexer for the esoteric `BrainFuck <http://www.muppetlabs.com/~breadbox/bf/>`_
|
138
|
+
language.
|
139
|
+
"""
|
140
|
+
|
141
|
+
name = 'Brainfuck'
|
142
|
+
aliases = ['brainfuck', 'bf']
|
143
|
+
filenames = ['*.bf', '*.b']
|
144
|
+
mimetypes = ['application/x-brainfuck']
|
145
|
+
|
146
|
+
tokens = {
|
147
|
+
'common': [
|
148
|
+
# use different colors for different instruction types
|
149
|
+
(r'[.,]+', Name.Tag),
|
150
|
+
(r'[+-]+', Name.Builtin),
|
151
|
+
(r'[<>]+', Name.Variable),
|
152
|
+
(r'[^.,+\-<>\[\]]+', Comment),
|
153
|
+
],
|
154
|
+
'root': [
|
155
|
+
(r'\[', Keyword, 'loop'),
|
156
|
+
(r'\]', Error),
|
157
|
+
include('common'),
|
158
|
+
],
|
159
|
+
'loop': [
|
160
|
+
(r'\[', Keyword, '#push'),
|
161
|
+
(r'\]', Keyword, '#pop'),
|
162
|
+
include('common'),
|
163
|
+
]
|
164
|
+
}
|
165
|
+
|
166
|
+
|
167
|
+
class BefungeLexer(RegexLexer):
|
168
|
+
"""
|
169
|
+
Lexer for the esoteric `Befunge <http://en.wikipedia.org/wiki/Befunge>`_
|
170
|
+
language.
|
171
|
+
|
172
|
+
*New in Pygments 0.7.*
|
173
|
+
"""
|
174
|
+
name = 'Befunge'
|
175
|
+
aliases = ['befunge']
|
176
|
+
filenames = ['*.befunge']
|
177
|
+
mimetypes = ['application/x-befunge']
|
178
|
+
|
179
|
+
tokens = {
|
180
|
+
'root': [
|
181
|
+
(r'[0-9a-f]', Number),
|
182
|
+
(r'[\+\*/%!`-]', Operator), # Traditional math
|
183
|
+
(r'[<>^v?\[\]rxjk]', Name.Variable), # Move, imperatives
|
184
|
+
(r'[:\\$.,n]', Name.Builtin), # Stack ops, imperatives
|
185
|
+
(r'[|_mw]', Keyword),
|
186
|
+
(r'[{}]', Name.Tag), # Befunge-98 stack ops
|
187
|
+
(r'".*?"', String.Double), # Strings don't appear to allow escapes
|
188
|
+
(r'\'.', String.Single), # Single character
|
189
|
+
(r'[#;]', Comment), # Trampoline... depends on direction hit
|
190
|
+
(r'[pg&~=@iotsy]', Keyword), # Misc
|
191
|
+
(r'[()A-Z]', Comment), # Fingerprints
|
192
|
+
(r'\s+', Text), # Whitespace doesn't matter
|
193
|
+
],
|
194
|
+
}
|
195
|
+
|
196
|
+
|
197
|
+
class RedcodeLexer(RegexLexer):
|
198
|
+
"""
|
199
|
+
A simple Redcode lexer based on ICWS'94.
|
200
|
+
Contributed by Adam Blinkinsop <blinks@acm.org>.
|
201
|
+
|
202
|
+
*New in Pygments 0.8.*
|
203
|
+
"""
|
204
|
+
name = 'Redcode'
|
205
|
+
aliases = ['redcode']
|
206
|
+
filenames = ['*.cw']
|
207
|
+
|
208
|
+
opcodes = ['DAT','MOV','ADD','SUB','MUL','DIV','MOD',
|
209
|
+
'JMP','JMZ','JMN','DJN','CMP','SLT','SPL',
|
210
|
+
'ORG','EQU','END']
|
211
|
+
modifiers = ['A','B','AB','BA','F','X','I']
|
212
|
+
|
213
|
+
tokens = {
|
214
|
+
'root': [
|
215
|
+
# Whitespace:
|
216
|
+
(r'\s+', Text),
|
217
|
+
(r';.*$', Comment.Single),
|
218
|
+
# Lexemes:
|
219
|
+
# Identifiers
|
220
|
+
(r'\b(%s)\b' % '|'.join(opcodes), Name.Function),
|
221
|
+
(r'\b(%s)\b' % '|'.join(modifiers), Name.Decorator),
|
222
|
+
(r'[A-Za-z_][A-Za-z_0-9]+', Name),
|
223
|
+
# Operators
|
224
|
+
(r'[-+*/%]', Operator),
|
225
|
+
(r'[#$@<>]', Operator), # mode
|
226
|
+
(r'[.,]', Punctuation), # mode
|
227
|
+
# Numbers
|
228
|
+
(r'[-+]?\d+', Number.Integer),
|
229
|
+
],
|
230
|
+
}
|
231
|
+
|
232
|
+
|
233
|
+
class MOOCodeLexer(RegexLexer):
|
234
|
+
"""
|
235
|
+
For `MOOCode <http://www.moo.mud.org/>`_ (the MOO scripting
|
236
|
+
language).
|
237
|
+
|
238
|
+
*New in Pygments 0.9.*
|
239
|
+
"""
|
240
|
+
name = 'MOOCode'
|
241
|
+
filenames = ['*.moo']
|
242
|
+
aliases = ['moocode']
|
243
|
+
mimetypes = ['text/x-moocode']
|
244
|
+
|
245
|
+
tokens = {
|
246
|
+
'root' : [
|
247
|
+
# Numbers
|
248
|
+
(r'(0|[1-9][0-9_]*)', Number.Integer),
|
249
|
+
# Strings
|
250
|
+
(r'"(\\\\|\\"|[^"])*"', String),
|
251
|
+
# exceptions
|
252
|
+
(r'(E_PERM|E_DIV)', Name.Exception),
|
253
|
+
# db-refs
|
254
|
+
(r'((#[-0-9]+)|(\$[a-z_A-Z0-9]+))', Name.Entity),
|
255
|
+
# Keywords
|
256
|
+
(r'\b(if|else|elseif|endif|for|endfor|fork|endfork|while'
|
257
|
+
r'|endwhile|break|continue|return|try'
|
258
|
+
r'|except|endtry|finally|in)\b', Keyword),
|
259
|
+
# builtins
|
260
|
+
(r'(random|length)', Name.Builtin),
|
261
|
+
# special variables
|
262
|
+
(r'(player|caller|this|args)', Name.Variable.Instance),
|
263
|
+
# skip whitespace
|
264
|
+
(r'\s+', Text),
|
265
|
+
(r'\n', Text),
|
266
|
+
# other operators
|
267
|
+
(r'([!;=,{}&\|:\.\[\]@\(\)\<\>\?]+)', Operator),
|
268
|
+
# function call
|
269
|
+
(r'([a-z_A-Z0-9]+)(\()', bygroups(Name.Function, Operator)),
|
270
|
+
# variables
|
271
|
+
(r'([a-zA-Z_0-9]+)', Text),
|
272
|
+
]
|
273
|
+
}
|
274
|
+
|
275
|
+
|
276
|
+
class SmalltalkLexer(RegexLexer):
|
277
|
+
"""
|
278
|
+
For `Smalltalk <http://www.smalltalk.org/>`_ syntax.
|
279
|
+
Contributed by Stefan Matthias Aust.
|
280
|
+
Rewritten by Nils Winter.
|
281
|
+
|
282
|
+
*New in Pygments 0.10.*
|
283
|
+
"""
|
284
|
+
name = 'Smalltalk'
|
285
|
+
filenames = ['*.st']
|
286
|
+
aliases = ['smalltalk', 'squeak']
|
287
|
+
mimetypes = ['text/x-smalltalk']
|
288
|
+
|
289
|
+
tokens = {
|
290
|
+
'root' : [
|
291
|
+
(r'(<)(\w+:)(.*?)(>)', bygroups(Text, Keyword, Text, Text)),
|
292
|
+
include('squeak fileout'),
|
293
|
+
include('whitespaces'),
|
294
|
+
include('method definition'),
|
295
|
+
(r'(\|)([\w\s]*)(\|)', bygroups(Operator, Name.Variable, Operator)),
|
296
|
+
include('objects'),
|
297
|
+
(r'\^|\:=|\_', Operator),
|
298
|
+
# temporaries
|
299
|
+
(r'[\]({}.;!]', Text),
|
300
|
+
],
|
301
|
+
'method definition' : [
|
302
|
+
# Not perfect can't allow whitespaces at the beginning and the
|
303
|
+
# without breaking everything
|
304
|
+
(r'([a-zA-Z]+\w*:)(\s*)(\w+)',
|
305
|
+
bygroups(Name.Function, Text, Name.Variable)),
|
306
|
+
(r'^(\b[a-zA-Z]+\w*\b)(\s*)$', bygroups(Name.Function, Text)),
|
307
|
+
(r'^([-+*/\\~<>=|&!?,@%]+)(\s*)(\w+)(\s*)$',
|
308
|
+
bygroups(Name.Function, Text, Name.Variable, Text)),
|
309
|
+
],
|
310
|
+
'blockvariables' : [
|
311
|
+
include('whitespaces'),
|
312
|
+
(r'(:)(\s*)(\w+)',
|
313
|
+
bygroups(Operator, Text, Name.Variable)),
|
314
|
+
(r'\|', Operator, '#pop'),
|
315
|
+
(r'', Text, '#pop'), # else pop
|
316
|
+
],
|
317
|
+
'literals' : [
|
318
|
+
(r"'(''|[^'])*'", String, 'afterobject'),
|
319
|
+
(r'\$.', String.Char, 'afterobject'),
|
320
|
+
(r'#\(', String.Symbol, 'parenth'),
|
321
|
+
(r'\)', Text, 'afterobject'),
|
322
|
+
(r'(\d+r)?-?\d+(\.\d+)?(e-?\d+)?', Number, 'afterobject'),
|
323
|
+
],
|
324
|
+
'_parenth_helper' : [
|
325
|
+
include('whitespaces'),
|
326
|
+
(r'(\d+r)?-?\d+(\.\d+)?(e-?\d+)?', Number),
|
327
|
+
(r'[-+*/\\~<>=|&#!?,@%\w:]+', String.Symbol),
|
328
|
+
# literals
|
329
|
+
(r"'(''|[^'])*'", String),
|
330
|
+
(r'\$.', String.Char),
|
331
|
+
(r'#*\(', String.Symbol, 'inner_parenth'),
|
332
|
+
],
|
333
|
+
'parenth' : [
|
334
|
+
# This state is a bit tricky since
|
335
|
+
# we can't just pop this state
|
336
|
+
(r'\)', String.Symbol, ('root', 'afterobject')),
|
337
|
+
include('_parenth_helper'),
|
338
|
+
],
|
339
|
+
'inner_parenth': [
|
340
|
+
(r'\)', String.Symbol, '#pop'),
|
341
|
+
include('_parenth_helper'),
|
342
|
+
],
|
343
|
+
'whitespaces' : [
|
344
|
+
# skip whitespace and comments
|
345
|
+
(r'\s+', Text),
|
346
|
+
(r'"(""|[^"])*"', Comment),
|
347
|
+
],
|
348
|
+
'objects' : [
|
349
|
+
(r'\[', Text, 'blockvariables'),
|
350
|
+
(r'\]', Text, 'afterobject'),
|
351
|
+
(r'\b(self|super|true|false|nil|thisContext)\b',
|
352
|
+
Name.Builtin.Pseudo, 'afterobject'),
|
353
|
+
(r'\b[A-Z]\w*(?!:)\b', Name.Class, 'afterobject'),
|
354
|
+
(r'\b[a-z]\w*(?!:)\b', Name.Variable, 'afterobject'),
|
355
|
+
(r'#("(""|[^"])*"|[-+*/\\~<>=|&!?,@%]+|[\w:]+)',
|
356
|
+
String.Symbol, 'afterobject'),
|
357
|
+
include('literals'),
|
358
|
+
],
|
359
|
+
'afterobject' : [
|
360
|
+
(r'! !$', Keyword , '#pop'), # squeak chunk delimeter
|
361
|
+
include('whitespaces'),
|
362
|
+
(r'\b(ifTrue:|ifFalse:|whileTrue:|whileFalse:|timesRepeat:)',
|
363
|
+
Name.Builtin, '#pop'),
|
364
|
+
(r'\b(new\b(?!:))', Name.Builtin),
|
365
|
+
(r'\:=|\_', Operator, '#pop'),
|
366
|
+
(r'\b[a-zA-Z]+\w*:', Name.Function, '#pop'),
|
367
|
+
(r'\b[a-zA-Z]+\w*', Name.Function),
|
368
|
+
(r'\w+:?|[-+*/\\~<>=|&!?,@%]+', Name.Function, '#pop'),
|
369
|
+
(r'\.', Punctuation, '#pop'),
|
370
|
+
(r';', Punctuation),
|
371
|
+
(r'[\])}]', Text),
|
372
|
+
(r'[\[({]', Text, '#pop'),
|
373
|
+
],
|
374
|
+
'squeak fileout' : [
|
375
|
+
# Squeak fileout format (optional)
|
376
|
+
(r'^"(""|[^"])*"!', Keyword),
|
377
|
+
(r"^'(''|[^'])*'!", Keyword),
|
378
|
+
(r'^(!)(\w+)( commentStamp: )(.*?)( prior: .*?!\n)(.*?)(!)',
|
379
|
+
bygroups(Keyword, Name.Class, Keyword, String, Keyword, Text, Keyword)),
|
380
|
+
(r"^(!)(\w+(?: class)?)( methodsFor: )('(?:''|[^'])*')(.*?!)",
|
381
|
+
bygroups(Keyword, Name.Class, Keyword, String, Keyword)),
|
382
|
+
(r'^(\w+)( subclass: )(#\w+)'
|
383
|
+
r'(\s+instanceVariableNames: )(.*?)'
|
384
|
+
r'(\s+classVariableNames: )(.*?)'
|
385
|
+
r'(\s+poolDictionaries: )(.*?)'
|
386
|
+
r'(\s+category: )(.*?)(!)',
|
387
|
+
bygroups(Name.Class, Keyword, String.Symbol, Keyword, String, Keyword,
|
388
|
+
String, Keyword, String, Keyword, String, Keyword)),
|
389
|
+
(r'^(\w+(?: class)?)(\s+instanceVariableNames: )(.*?)(!)',
|
390
|
+
bygroups(Name.Class, Keyword, String, Keyword)),
|
391
|
+
(r'(!\n)(\].*)(! !)$', bygroups(Keyword, Text, Keyword)),
|
392
|
+
(r'! !$', Keyword),
|
393
|
+
],
|
394
|
+
}
|
395
|
+
|
396
|
+
|
397
|
+
class LogtalkLexer(RegexLexer):
|
398
|
+
"""
|
399
|
+
For `Logtalk <http://logtalk.org/>`_ source code.
|
400
|
+
|
401
|
+
*New in Pygments 0.10.*
|
402
|
+
"""
|
403
|
+
|
404
|
+
name = 'Logtalk'
|
405
|
+
aliases = ['logtalk']
|
406
|
+
filenames = ['*.lgt']
|
407
|
+
mimetypes = ['text/x-logtalk']
|
408
|
+
|
409
|
+
tokens = {
|
410
|
+
'root': [
|
411
|
+
# Directives
|
412
|
+
(r'^\s*:-\s',Punctuation,'directive'),
|
413
|
+
# Comments
|
414
|
+
(r'%.*?\n', Comment),
|
415
|
+
(r'/\*(.|\n)*?\*/',Comment),
|
416
|
+
# Whitespace
|
417
|
+
(r'\n', Text),
|
418
|
+
(r'\s+', Text),
|
419
|
+
# Numbers
|
420
|
+
(r"0'.", Number),
|
421
|
+
(r'0b[01]+', Number),
|
422
|
+
(r'0o[0-7]+', Number),
|
423
|
+
(r'0x[0-9a-fA-F]+', Number),
|
424
|
+
(r'\d+\.?\d*((e|E)(\+|-)?\d+)?', Number),
|
425
|
+
# Variables
|
426
|
+
(r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable),
|
427
|
+
# Event handlers
|
428
|
+
(r'(after|before)(?=[(])', Keyword),
|
429
|
+
# Execution-context methods
|
430
|
+
(r'(parameter|this|se(lf|nder))(?=[(])', Keyword),
|
431
|
+
# Reflection
|
432
|
+
(r'(current_predicate|predicate_property)(?=[(])', Keyword),
|
433
|
+
# DCGs and term expansion
|
434
|
+
(r'(expand_(goal|term)|(goal|term)_expansion|phrase)(?=[(])',
|
435
|
+
Keyword),
|
436
|
+
# Entity
|
437
|
+
(r'(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])',
|
438
|
+
Keyword),
|
439
|
+
(r'(object|protocol|category)_property(?=[(])', Keyword),
|
440
|
+
# Entity relations
|
441
|
+
(r'co(mplements_object|nforms_to_protocol)(?=[(])', Keyword),
|
442
|
+
(r'extends_(object|protocol|category)(?=[(])', Keyword),
|
443
|
+
(r'imp(lements_protocol|orts_category)(?=[(])', Keyword),
|
444
|
+
(r'(instantiat|specializ)es_class(?=[(])', Keyword),
|
445
|
+
# Events
|
446
|
+
(r'(current_event|(abolish|define)_events)(?=[(])', Keyword),
|
447
|
+
# Flags
|
448
|
+
(r'(current|set)_logtalk_flag(?=[(])', Keyword),
|
449
|
+
# Compiling, loading, and library paths
|
450
|
+
(r'logtalk_(compile|l(ibrary_path|oad_context|oad))(?=[(])',
|
451
|
+
Keyword),
|
452
|
+
# Database
|
453
|
+
(r'(clause|retract(all)?)(?=[(])', Keyword),
|
454
|
+
(r'a(bolish|ssert(a|z))(?=[(])', Keyword),
|
455
|
+
# Control constructs
|
456
|
+
(r'(ca(ll|tch)|throw)(?=[(])', Keyword),
|
457
|
+
(r'(fail|true)\b', Keyword),
|
458
|
+
# All solutions
|
459
|
+
(r'((bag|set)of|f(ind|or)all)(?=[(])', Keyword),
|
460
|
+
# Multi-threading meta-predicates
|
461
|
+
(r'threaded(_(call|once|ignore|exit|peek|wait|notify))?(?=[(])',
|
462
|
+
Keyword),
|
463
|
+
# Term unification
|
464
|
+
(r'unify_with_occurs_check(?=[(])', Keyword),
|
465
|
+
# Term creation and decomposition
|
466
|
+
(r'(functor|arg|copy_term|numbervars)(?=[(])', Keyword),
|
467
|
+
# Evaluable functors
|
468
|
+
(r'(rem|mod|abs|sign)(?=[(])', Keyword),
|
469
|
+
(r'float(_(integer|fractional)_part)?(?=[(])', Keyword),
|
470
|
+
(r'(floor|truncate|round|ceiling)(?=[(])', Keyword),
|
471
|
+
# Other arithmetic functors
|
472
|
+
(r'(cos|atan|exp|log|s(in|qrt))(?=[(])', Keyword),
|
473
|
+
# Term testing
|
474
|
+
(r'(var|atom(ic)?|integer|float|c(allable|ompound)|n(onvar|umber)|'
|
475
|
+
r'ground)(?=[(])', Keyword),
|
476
|
+
# Term comparison
|
477
|
+
(r'compare(?=[(])', Keyword),
|
478
|
+
# Stream selection and control
|
479
|
+
(r'(curren|se)t_(in|out)put(?=[(])', Keyword),
|
480
|
+
(r'(open|close)(?=[(])', Keyword),
|
481
|
+
(r'flush_output(?=[(])', Keyword),
|
482
|
+
(r'(at_end_of_stream|flush_output)\b', Keyword),
|
483
|
+
(r'(stream_property|at_end_of_stream|set_stream_position)(?=[(])',
|
484
|
+
Keyword),
|
485
|
+
# Character and byte input/output
|
486
|
+
(r'(nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])', Keyword),
|
487
|
+
(r'\bnl\b', Keyword),
|
488
|
+
# Term input/output
|
489
|
+
(r'read(_term)?(?=[(])', Keyword),
|
490
|
+
(r'write(q|_(canonical|term))?(?=[(])', Keyword),
|
491
|
+
(r'(current_)?op(?=[(])', Keyword),
|
492
|
+
(r'(current_)?char_conversion(?=[(])', Keyword),
|
493
|
+
# Atomic term processing
|
494
|
+
(r'atom_(length|c(hars|o(ncat|des)))(?=[(])', Keyword),
|
495
|
+
(r'(char_code|sub_atom)(?=[(])', Keyword),
|
496
|
+
(r'number_c(har|ode)s(?=[(])', Keyword),
|
497
|
+
# Implementation defined hooks functions
|
498
|
+
(r'(se|curren)t_prolog_flag(?=[(])', Keyword),
|
499
|
+
(r'\bhalt\b', Keyword),
|
500
|
+
(r'halt(?=[(])', Keyword),
|
501
|
+
# Message sending operators
|
502
|
+
(r'(::|:|\^\^)', Operator),
|
503
|
+
# External call
|
504
|
+
(r'[{}]', Keyword),
|
505
|
+
# Logic and control
|
506
|
+
(r'\b(ignore|once)(?=[(])', Keyword),
|
507
|
+
(r'\brepeat\b', Keyword),
|
508
|
+
# Sorting
|
509
|
+
(r'(key)?sort(?=[(])', Keyword),
|
510
|
+
# Bitwise functors
|
511
|
+
(r'(>>|<<|/\\|\\\\|\\)', Operator),
|
512
|
+
# Arithemtic evaluation
|
513
|
+
(r'\bis\b', Keyword),
|
514
|
+
# Arithemtic comparison
|
515
|
+
(r'(=:=|=\\=|<|=<|>=|>)', Operator),
|
516
|
+
# Term creation and decomposition
|
517
|
+
(r'=\.\.', Operator),
|
518
|
+
# Term unification
|
519
|
+
(r'(=|\\=)', Operator),
|
520
|
+
# Term comparison
|
521
|
+
(r'(==|\\==|@=<|@<|@>=|@>)', Operator),
|
522
|
+
# Evaluable functors
|
523
|
+
(r'(//|[-+*/])', Operator),
|
524
|
+
(r'\b(e|pi|mod|rem)\b', Operator),
|
525
|
+
# Other arithemtic functors
|
526
|
+
(r'\b\*\*\b', Operator),
|
527
|
+
# DCG rules
|
528
|
+
(r'-->', Operator),
|
529
|
+
# Control constructs
|
530
|
+
(r'([!;]|->)', Operator),
|
531
|
+
# Logic and control
|
532
|
+
(r'\\+', Operator),
|
533
|
+
# Mode operators
|
534
|
+
(r'[?@]', Operator),
|
535
|
+
# Existential quantifier
|
536
|
+
(r'\^', Operator),
|
537
|
+
# Strings
|
538
|
+
(r'"(\\\\|\\"|[^"])*"', String),
|
539
|
+
# Ponctuation
|
540
|
+
(r'[()\[\],.|]', Text),
|
541
|
+
# Atoms
|
542
|
+
(r"[a-z][a-zA-Z0-9_]*", Text),
|
543
|
+
(r"'", String, 'quoted_atom'),
|
544
|
+
],
|
545
|
+
|
546
|
+
'quoted_atom': [
|
547
|
+
(r"''", String),
|
548
|
+
(r"'", String, '#pop'),
|
549
|
+
(r'\\([\\abfnrtv"\']|(x[a-fA-F0-9]+|[0-7]+)\\)', String.Escape),
|
550
|
+
(r"[^\\'\n]+", String),
|
551
|
+
(r'\\', String),
|
552
|
+
],
|
553
|
+
|
554
|
+
'directive': [
|
555
|
+
# Conditional compilation directives
|
556
|
+
(r'(el)?if(?=[(])', Keyword, 'root'),
|
557
|
+
(r'(e(lse|ndif))[.]', Keyword, 'root'),
|
558
|
+
# Entity directives
|
559
|
+
(r'(category|object|protocol)(?=[(])', Keyword, 'entityrelations'),
|
560
|
+
(r'(end_(category|object|protocol))[.]',Keyword, 'root'),
|
561
|
+
# Predicate scope directives
|
562
|
+
(r'(public|protected|private)(?=[(])', Keyword, 'root'),
|
563
|
+
# Other directives
|
564
|
+
(r'e(n(coding|sure_loaded)|xport)(?=[(])', Keyword, 'root'),
|
565
|
+
(r'in(fo|itialization)(?=[(])', Keyword, 'root'),
|
566
|
+
(r'(dynamic|synchronized|threaded)[.]', Keyword, 'root'),
|
567
|
+
(r'(alias|d(ynamic|iscontiguous)|m(eta_predicate|ode|ultifile)|'
|
568
|
+
r's(et_(logtalk|prolog)_flag|ynchronized))(?=[(])',
|
569
|
+
Keyword, 'root'),
|
570
|
+
(r'op(?=[(])', Keyword, 'root'),
|
571
|
+
(r'(c(alls|oinductive)|reexport|use(s|_module))(?=[(])',
|
572
|
+
Keyword, 'root'),
|
573
|
+
(r'[a-z][a-zA-Z0-9_]*(?=[(])', Text, 'root'),
|
574
|
+
(r'[a-z][a-zA-Z0-9_]*[.]', Text, 'root'),
|
575
|
+
],
|
576
|
+
|
577
|
+
'entityrelations': [
|
578
|
+
(r'(complements|extends|i(nstantiates|mp(lements|orts))|specializes)'
|
579
|
+
r'(?=[(])', Keyword),
|
580
|
+
# Numbers
|
581
|
+
(r"0'.", Number),
|
582
|
+
(r'0b[01]+', Number),
|
583
|
+
(r'0o[0-7]+', Number),
|
584
|
+
(r'0x[0-9a-fA-F]+', Number),
|
585
|
+
(r'\d+\.?\d*((e|E)(\+|-)?\d+)?', Number),
|
586
|
+
# Variables
|
587
|
+
(r'([A-Z_][a-zA-Z0-9_]*)', Name.Variable),
|
588
|
+
# Atoms
|
589
|
+
(r"[a-z][a-zA-Z0-9_]*", Text),
|
590
|
+
(r"'", String, 'quoted_atom'),
|
591
|
+
# Strings
|
592
|
+
(r'"(\\\\|\\"|[^"])*"', String),
|
593
|
+
# End of entity-opening directive
|
594
|
+
(r'([)]\.)', Text, 'root'),
|
595
|
+
# Scope operator
|
596
|
+
(r'(::)', Operator),
|
597
|
+
# Ponctuation
|
598
|
+
(r'[()\[\],.|]', Text),
|
599
|
+
# Comments
|
600
|
+
(r'%.*?\n', Comment),
|
601
|
+
(r'/\*(.|\n)*?\*/',Comment),
|
602
|
+
# Whitespace
|
603
|
+
(r'\n', Text),
|
604
|
+
(r'\s+', Text),
|
605
|
+
]
|
606
|
+
}
|
607
|
+
|
608
|
+
def analyse_text(text):
|
609
|
+
if ':- object(' in text:
|
610
|
+
return True
|
611
|
+
if ':- protocol(' in text:
|
612
|
+
return True
|
613
|
+
if ':- category(' in text:
|
614
|
+
return True
|
615
|
+
return False
|
616
|
+
|
617
|
+
|
618
|
+
def _shortened(word):
|
619
|
+
dpos = word.find('$')
|
620
|
+
return '|'.join([word[:dpos] + word[dpos+1:i] + r'\b'
|
621
|
+
for i in range(len(word), dpos, -1)])
|
622
|
+
def _shortened_many(*words):
|
623
|
+
return '|'.join(map(_shortened, words))
|
624
|
+
|
625
|
+
class GnuplotLexer(RegexLexer):
|
626
|
+
"""
|
627
|
+
For `Gnuplot <http://gnuplot.info/>`_ plotting scripts.
|
628
|
+
|
629
|
+
*New in Pygments 0.11.*
|
630
|
+
"""
|
631
|
+
|
632
|
+
name = 'Gnuplot'
|
633
|
+
aliases = ['gnuplot']
|
634
|
+
filenames = ['*.plot', '*.plt']
|
635
|
+
mimetypes = ['text/x-gnuplot']
|
636
|
+
|
637
|
+
tokens = {
|
638
|
+
'root': [
|
639
|
+
include('whitespace'),
|
640
|
+
(_shortened('bi$nd'), Keyword, 'bind'),
|
641
|
+
(_shortened_many('ex$it', 'q$uit'), Keyword, 'quit'),
|
642
|
+
(_shortened('f$it'), Keyword, 'fit'),
|
643
|
+
(r'(if)(\s*)(\()', bygroups(Keyword, Text, Punctuation), 'if'),
|
644
|
+
(r'else\b', Keyword),
|
645
|
+
(_shortened('pa$use'), Keyword, 'pause'),
|
646
|
+
(_shortened_many('p$lot', 'rep$lot', 'sp$lot'), Keyword, 'plot'),
|
647
|
+
(_shortened('sa$ve'), Keyword, 'save'),
|
648
|
+
(_shortened('se$t'), Keyword, ('genericargs', 'optionarg')),
|
649
|
+
(_shortened_many('sh$ow', 'uns$et'),
|
650
|
+
Keyword, ('noargs', 'optionarg')),
|
651
|
+
(_shortened_many('low$er', 'ra$ise', 'ca$ll', 'cd$', 'cl$ear',
|
652
|
+
'h$elp', '\\?$', 'hi$story', 'l$oad', 'pr$int',
|
653
|
+
'pwd$', 're$read', 'res$et', 'scr$eendump',
|
654
|
+
'she$ll', 'sy$stem', 'up$date'),
|
655
|
+
Keyword, 'genericargs'),
|
656
|
+
(_shortened_many('pwd$', 're$read', 'res$et', 'scr$eendump',
|
657
|
+
'she$ll', 'test$'),
|
658
|
+
Keyword, 'noargs'),
|
659
|
+
('([a-zA-Z_][a-zA-Z0-9_]*)(\s*)(=)',
|
660
|
+
bygroups(Name.Variable, Text, Operator), 'genericargs'),
|
661
|
+
('([a-zA-Z_][a-zA-Z0-9_]*)(\s*\(.*?\)\s*)(=)',
|
662
|
+
bygroups(Name.Function, Text, Operator), 'genericargs'),
|
663
|
+
(r'@[a-zA-Z_][a-zA-Z0-9_]*', Name.Constant), # macros
|
664
|
+
(r';', Keyword),
|
665
|
+
],
|
666
|
+
'comment': [
|
667
|
+
(r'[^\\\n]', Comment),
|
668
|
+
(r'\\\n', Comment),
|
669
|
+
(r'\\', Comment),
|
670
|
+
# don't add the newline to the Comment token
|
671
|
+
('', Comment, '#pop'),
|
672
|
+
],
|
673
|
+
'whitespace': [
|
674
|
+
('#', Comment, 'comment'),
|
675
|
+
(r'[ \t\v\f]+', Text),
|
676
|
+
],
|
677
|
+
'noargs': [
|
678
|
+
include('whitespace'),
|
679
|
+
# semicolon and newline end the argument list
|
680
|
+
(r';', Punctuation, '#pop'),
|
681
|
+
(r'\n', Text, '#pop'),
|
682
|
+
],
|
683
|
+
'dqstring': [
|
684
|
+
(r'"', String, '#pop'),
|
685
|
+
(r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
|
686
|
+
(r'[^\\"\n]+', String), # all other characters
|
687
|
+
(r'\\\n', String), # line continuation
|
688
|
+
(r'\\', String), # stray backslash
|
689
|
+
(r'\n', String, '#pop'), # newline ends the string too
|
690
|
+
],
|
691
|
+
'sqstring': [
|
692
|
+
(r"''", String), # escaped single quote
|
693
|
+
(r"'", String, '#pop'),
|
694
|
+
(r"[^\\'\n]+", String), # all other characters
|
695
|
+
(r'\\\n', String), # line continuation
|
696
|
+
(r'\\', String), # normal backslash
|
697
|
+
(r'\n', String, '#pop'), # newline ends the string too
|
698
|
+
],
|
699
|
+
'genericargs': [
|
700
|
+
include('noargs'),
|
701
|
+
(r'"', String, 'dqstring'),
|
702
|
+
(r"'", String, 'sqstring'),
|
703
|
+
(r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+', Number.Float),
|
704
|
+
(r'(\d+\.\d*|\.\d+)', Number.Float),
|
705
|
+
(r'-?\d+', Number.Integer),
|
706
|
+
('[,.~!%^&*+=|?:<>/-]', Operator),
|
707
|
+
('[{}()\[\]]', Punctuation),
|
708
|
+
(r'(eq|ne)\b', Operator.Word),
|
709
|
+
(r'([a-zA-Z_][a-zA-Z0-9_]*)(\s*)(\()',
|
710
|
+
bygroups(Name.Function, Text, Punctuation)),
|
711
|
+
(r'[a-zA-Z_][a-zA-Z0-9_]*', Name),
|
712
|
+
(r'@[a-zA-Z_][a-zA-Z0-9_]*', Name.Constant), # macros
|
713
|
+
(r'\\\n', Text),
|
714
|
+
],
|
715
|
+
'optionarg': [
|
716
|
+
include('whitespace'),
|
717
|
+
(_shortened_many(
|
718
|
+
"a$ll","an$gles","ar$row","au$toscale","b$ars","bor$der",
|
719
|
+
"box$width","cl$abel","c$lip","cn$trparam","co$ntour","da$ta",
|
720
|
+
"data$file","dg$rid3d","du$mmy","enc$oding","dec$imalsign",
|
721
|
+
"fit$","font$path","fo$rmat","fu$nction","fu$nctions","g$rid",
|
722
|
+
"hid$den3d","his$torysize","is$osamples","k$ey","keyt$itle",
|
723
|
+
"la$bel","li$nestyle","ls$","loa$dpath","loc$ale","log$scale",
|
724
|
+
"mac$ros","map$ping","map$ping3d","mar$gin","lmar$gin",
|
725
|
+
"rmar$gin","tmar$gin","bmar$gin","mo$use","multi$plot",
|
726
|
+
"mxt$ics","nomxt$ics","mx2t$ics","nomx2t$ics","myt$ics",
|
727
|
+
"nomyt$ics","my2t$ics","nomy2t$ics","mzt$ics","nomzt$ics",
|
728
|
+
"mcbt$ics","nomcbt$ics","of$fsets","or$igin","o$utput",
|
729
|
+
"pa$rametric","pm$3d","pal$ette","colorb$ox","p$lot",
|
730
|
+
"poi$ntsize","pol$ar","pr$int","obj$ect","sa$mples","si$ze",
|
731
|
+
"st$yle","su$rface","table$","t$erminal","termo$ptions","ti$cs",
|
732
|
+
"ticsc$ale","ticsl$evel","timef$mt","tim$estamp","tit$le",
|
733
|
+
"v$ariables","ve$rsion","vi$ew","xyp$lane","xda$ta","x2da$ta",
|
734
|
+
"yda$ta","y2da$ta","zda$ta","cbda$ta","xl$abel","x2l$abel",
|
735
|
+
"yl$abel","y2l$abel","zl$abel","cbl$abel","xti$cs","noxti$cs",
|
736
|
+
"x2ti$cs","nox2ti$cs","yti$cs","noyti$cs","y2ti$cs","noy2ti$cs",
|
737
|
+
"zti$cs","nozti$cs","cbti$cs","nocbti$cs","xdti$cs","noxdti$cs",
|
738
|
+
"x2dti$cs","nox2dti$cs","ydti$cs","noydti$cs","y2dti$cs",
|
739
|
+
"noy2dti$cs","zdti$cs","nozdti$cs","cbdti$cs","nocbdti$cs",
|
740
|
+
"xmti$cs","noxmti$cs","x2mti$cs","nox2mti$cs","ymti$cs",
|
741
|
+
"noymti$cs","y2mti$cs","noy2mti$cs","zmti$cs","nozmti$cs",
|
742
|
+
"cbmti$cs","nocbmti$cs","xr$ange","x2r$ange","yr$ange",
|
743
|
+
"y2r$ange","zr$ange","cbr$ange","rr$ange","tr$ange","ur$ange",
|
744
|
+
"vr$ange","xzeroa$xis","x2zeroa$xis","yzeroa$xis","y2zeroa$xis",
|
745
|
+
"zzeroa$xis","zeroa$xis","z$ero"), Name.Builtin, '#pop'),
|
746
|
+
],
|
747
|
+
'bind': [
|
748
|
+
('!', Keyword, '#pop'),
|
749
|
+
(_shortened('all$windows'), Name.Builtin),
|
750
|
+
include('genericargs'),
|
751
|
+
],
|
752
|
+
'quit': [
|
753
|
+
(r'gnuplot\b', Keyword),
|
754
|
+
include('noargs'),
|
755
|
+
],
|
756
|
+
'fit': [
|
757
|
+
(r'via\b', Name.Builtin),
|
758
|
+
include('plot'),
|
759
|
+
],
|
760
|
+
'if': [
|
761
|
+
(r'\)', Punctuation, '#pop'),
|
762
|
+
include('genericargs'),
|
763
|
+
],
|
764
|
+
'pause': [
|
765
|
+
(r'(mouse|any|button1|button2|button3)\b', Name.Builtin),
|
766
|
+
(_shortened('key$press'), Name.Builtin),
|
767
|
+
include('genericargs'),
|
768
|
+
],
|
769
|
+
'plot': [
|
770
|
+
(_shortened_many('ax$es', 'axi$s', 'bin$ary', 'ev$ery', 'i$ndex',
|
771
|
+
'mat$rix', 's$mooth', 'thru$', 't$itle',
|
772
|
+
'not$itle', 'u$sing', 'w$ith'),
|
773
|
+
Name.Builtin),
|
774
|
+
include('genericargs'),
|
775
|
+
],
|
776
|
+
'save': [
|
777
|
+
(_shortened_many('f$unctions', 's$et', 't$erminal', 'v$ariables'),
|
778
|
+
Name.Builtin),
|
779
|
+
include('genericargs'),
|
780
|
+
],
|
781
|
+
}
|
782
|
+
|
783
|
+
|
784
|
+
class PovrayLexer(RegexLexer):
|
785
|
+
"""
|
786
|
+
For `Persistence of Vision Raytracer <http://www.povray.org/>`_ files.
|
787
|
+
|
788
|
+
*New in Pygments 0.11.*
|
789
|
+
"""
|
790
|
+
name = 'POVRay'
|
791
|
+
aliases = ['pov']
|
792
|
+
filenames = ['*.pov', '*.inc']
|
793
|
+
mimetypes = ['text/x-povray']
|
794
|
+
|
795
|
+
tokens = {
|
796
|
+
'root': [
|
797
|
+
(r'/\*[\w\W]*?\*/', Comment.Multiline),
|
798
|
+
(r'//.*\n', Comment.Single),
|
799
|
+
(r'(?s)"(?:\\.|[^"\\])+"', String.Double),
|
800
|
+
(r'#(debug|default|else|end|error|fclose|fopen|ifdef|ifndef|'
|
801
|
+
r'include|range|read|render|statistics|switch|undef|version|'
|
802
|
+
r'warning|while|write|define|macro|local|declare)\b',
|
803
|
+
Comment.Preproc),
|
804
|
+
(r'\b(aa_level|aa_threshold|abs|acos|acosh|adaptive|adc_bailout|'
|
805
|
+
r'agate|agate_turb|all|alpha|ambient|ambient_light|angle|'
|
806
|
+
r'aperture|arc_angle|area_light|asc|asin|asinh|assumed_gamma|'
|
807
|
+
r'atan|atan2|atanh|atmosphere|atmospheric_attenuation|'
|
808
|
+
r'attenuating|average|background|black_hole|blue|blur_samples|'
|
809
|
+
r'bounded_by|box_mapping|bozo|break|brick|brick_size|'
|
810
|
+
r'brightness|brilliance|bumps|bumpy1|bumpy2|bumpy3|bump_map|'
|
811
|
+
r'bump_size|case|caustics|ceil|checker|chr|clipped_by|clock|'
|
812
|
+
r'color|color_map|colour|colour_map|component|composite|concat|'
|
813
|
+
r'confidence|conic_sweep|constant|control0|control1|cos|cosh|'
|
814
|
+
r'count|crackle|crand|cube|cubic_spline|cylindrical_mapping|'
|
815
|
+
r'debug|declare|default|degrees|dents|diffuse|direction|'
|
816
|
+
r'distance|distance_maximum|div|dust|dust_type|eccentricity|'
|
817
|
+
r'else|emitting|end|error|error_bound|exp|exponent|'
|
818
|
+
r'fade_distance|fade_power|falloff|falloff_angle|false|'
|
819
|
+
r'file_exists|filter|finish|fisheye|flatness|flip|floor|'
|
820
|
+
r'focal_point|fog|fog_alt|fog_offset|fog_type|frequency|gif|'
|
821
|
+
r'global_settings|glowing|gradient|granite|gray_threshold|'
|
822
|
+
r'green|halo|hexagon|hf_gray_16|hierarchy|hollow|hypercomplex|'
|
823
|
+
r'if|ifdef|iff|image_map|incidence|include|int|interpolate|'
|
824
|
+
r'inverse|ior|irid|irid_wavelength|jitter|lambda|leopard|'
|
825
|
+
r'linear|linear_spline|linear_sweep|location|log|looks_like|'
|
826
|
+
r'look_at|low_error_factor|mandel|map_type|marble|material_map|'
|
827
|
+
r'matrix|max|max_intersections|max_iteration|max_trace_level|'
|
828
|
+
r'max_value|metallic|min|minimum_reuse|mod|mortar|'
|
829
|
+
r'nearest_count|no|normal|normal_map|no_shadow|number_of_waves|'
|
830
|
+
r'octaves|off|offset|omega|omnimax|on|once|onion|open|'
|
831
|
+
r'orthographic|panoramic|pattern1|pattern2|pattern3|'
|
832
|
+
r'perspective|pgm|phase|phong|phong_size|pi|pigment|'
|
833
|
+
r'pigment_map|planar_mapping|png|point_at|pot|pow|ppm|'
|
834
|
+
r'precision|pwr|quadratic_spline|quaternion|quick_color|'
|
835
|
+
r'quick_colour|quilted|radial|radians|radiosity|radius|rainbow|'
|
836
|
+
r'ramp_wave|rand|range|reciprocal|recursion_limit|red|'
|
837
|
+
r'reflection|refraction|render|repeat|rgb|rgbf|rgbft|rgbt|'
|
838
|
+
r'right|ripples|rotate|roughness|samples|scale|scallop_wave|'
|
839
|
+
r'scattering|seed|shadowless|sin|sine_wave|sinh|sky|sky_sphere|'
|
840
|
+
r'slice|slope_map|smooth|specular|spherical_mapping|spiral|'
|
841
|
+
r'spiral1|spiral2|spotlight|spotted|sqr|sqrt|statistics|str|'
|
842
|
+
r'strcmp|strength|strlen|strlwr|strupr|sturm|substr|switch|sys|'
|
843
|
+
r't|tan|tanh|test_camera_1|test_camera_2|test_camera_3|'
|
844
|
+
r'test_camera_4|texture|texture_map|tga|thickness|threshold|'
|
845
|
+
r'tightness|tile2|tiles|track|transform|translate|transmit|'
|
846
|
+
r'triangle_wave|true|ttf|turbulence|turb_depth|type|'
|
847
|
+
r'ultra_wide_angle|up|use_color|use_colour|use_index|u_steps|'
|
848
|
+
r'val|variance|vaxis_rotate|vcross|vdot|version|vlength|'
|
849
|
+
r'vnormalize|volume_object|volume_rendered|vol_with_light|'
|
850
|
+
r'vrotate|v_steps|warning|warp|water_level|waves|while|width|'
|
851
|
+
r'wood|wrinkles|yes)\b', Keyword),
|
852
|
+
(r'(bicubic_patch|blob|box|camera|cone|cubic|cylinder|difference|'
|
853
|
+
r'disc|height_field|intersection|julia_fractal|lathe|'
|
854
|
+
r'light_source|merge|mesh|object|plane|poly|polygon|prism|'
|
855
|
+
r'quadric|quartic|smooth_triangle|sor|sphere|superellipsoid|'
|
856
|
+
r'text|torus|triangle|union)\b', Name.Builtin),
|
857
|
+
# TODO: <=, etc
|
858
|
+
(r'[\[\](){}<>;,]', Punctuation),
|
859
|
+
(r'[-+*/=]', Operator),
|
860
|
+
(r'\b(x|y|z|u|v)\b', Name.Builtin.Pseudo),
|
861
|
+
(r'[a-zA-Z_][a-zA-Z_0-9]*', Name),
|
862
|
+
(r'[0-9]+\.[0-9]*', Number.Float),
|
863
|
+
(r'\.[0-9]+', Number.Float),
|
864
|
+
(r'[0-9]+', Number.Integer),
|
865
|
+
(r'\s+', Text),
|
866
|
+
]
|
867
|
+
}
|
868
|
+
|
869
|
+
|
870
|
+
class AppleScriptLexer(RegexLexer):
|
871
|
+
"""
|
872
|
+
For `AppleScript source code
|
873
|
+
<http://developer.apple.com/documentation/AppleScript/
|
874
|
+
Conceptual/AppleScriptLangGuide>`_,
|
875
|
+
including `AppleScript Studio
|
876
|
+
<http://developer.apple.com/documentation/AppleScript/
|
877
|
+
Reference/StudioReference>`_.
|
878
|
+
Contributed by Andreas Amann <aamann@mac.com>.
|
879
|
+
"""
|
880
|
+
|
881
|
+
name = 'AppleScript'
|
882
|
+
aliases = ['applescript']
|
883
|
+
filenames = ['*.applescript']
|
884
|
+
|
885
|
+
flags = re.MULTILINE | re.DOTALL
|
886
|
+
|
887
|
+
Identifiers = r'[a-zA-Z]\w*'
|
888
|
+
Literals = ['AppleScript', 'current application', 'false', 'linefeed',
|
889
|
+
'missing value', 'pi','quote', 'result', 'return', 'space',
|
890
|
+
'tab', 'text item delimiters', 'true', 'version']
|
891
|
+
Classes = ['alias ', 'application ', 'boolean ', 'class ', 'constant ',
|
892
|
+
'date ', 'file ', 'integer ', 'list ', 'number ', 'POSIX file ',
|
893
|
+
'real ', 'record ', 'reference ', 'RGB color ', 'script ',
|
894
|
+
'text ', 'unit types', '(?:Unicode )?text', 'string']
|
895
|
+
BuiltIn = ['attachment', 'attribute run', 'character', 'day', 'month',
|
896
|
+
'paragraph', 'word', 'year']
|
897
|
+
HandlerParams = ['about', 'above', 'against', 'apart from', 'around',
|
898
|
+
'aside from', 'at', 'below', 'beneath', 'beside',
|
899
|
+
'between', 'for', 'given', 'instead of', 'on', 'onto',
|
900
|
+
'out of', 'over', 'since']
|
901
|
+
Commands = ['ASCII (character|number)', 'activate', 'beep', 'choose URL',
|
902
|
+
'choose application', 'choose color', 'choose file( name)?',
|
903
|
+
'choose folder', 'choose from list',
|
904
|
+
'choose remote application', 'clipboard info',
|
905
|
+
'close( access)?', 'copy', 'count', 'current date', 'delay',
|
906
|
+
'delete', 'display (alert|dialog)', 'do shell script',
|
907
|
+
'duplicate', 'exists', 'get eof', 'get volume settings',
|
908
|
+
'info for', 'launch', 'list (disks|folder)', 'load script',
|
909
|
+
'log', 'make', 'mount volume', 'new', 'offset',
|
910
|
+
'open( (for access|location))?', 'path to', 'print', 'quit',
|
911
|
+
'random number', 'read', 'round', 'run( script)?',
|
912
|
+
'say', 'scripting components',
|
913
|
+
'set (eof|the clipboard to|volume)', 'store script',
|
914
|
+
'summarize', 'system attribute', 'system info',
|
915
|
+
'the clipboard', 'time to GMT', 'write', 'quoted form']
|
916
|
+
References = ['(in )?back of', '(in )?front of', '[0-9]+(st|nd|rd|th)',
|
917
|
+
'first', 'second', 'third', 'fourth', 'fifth', 'sixth',
|
918
|
+
'seventh', 'eighth', 'ninth', 'tenth', 'after', 'back',
|
919
|
+
'before', 'behind', 'every', 'front', 'index', 'last',
|
920
|
+
'middle', 'some', 'that', 'through', 'thru', 'where', 'whose']
|
921
|
+
Operators = ["and", "or", "is equal", "equals", "(is )?equal to", "is not",
|
922
|
+
"isn't", "isn't equal( to)?", "is not equal( to)?",
|
923
|
+
"doesn't equal", "does not equal", "(is )?greater than",
|
924
|
+
"comes after", "is not less than or equal( to)?",
|
925
|
+
"isn't less than or equal( to)?", "(is )?less than",
|
926
|
+
"comes before", "is not greater than or equal( to)?",
|
927
|
+
"isn't greater than or equal( to)?",
|
928
|
+
"(is )?greater than or equal( to)?", "is not less than",
|
929
|
+
"isn't less than", "does not come before",
|
930
|
+
"doesn't come before", "(is )?less than or equal( to)?",
|
931
|
+
"is not greater than", "isn't greater than",
|
932
|
+
"does not come after", "doesn't come after", "starts? with",
|
933
|
+
"begins? with", "ends? with", "contains?", "does not contain",
|
934
|
+
"doesn't contain", "is in", "is contained by", "is not in",
|
935
|
+
"is not contained by", "isn't contained by", "div", "mod",
|
936
|
+
"not", "(a )?(ref( to)?|reference to)", "is", "does"]
|
937
|
+
Control = ['considering', 'else', 'error', 'exit', 'from', 'if',
|
938
|
+
'ignoring', 'in', 'repeat', 'tell', 'then', 'times', 'to',
|
939
|
+
'try', 'until', 'using terms from', 'while', 'whith',
|
940
|
+
'with timeout( of)?', 'with transaction', 'by', 'continue',
|
941
|
+
'end', 'its?', 'me', 'my', 'return', 'of' , 'as']
|
942
|
+
Declarations = ['global', 'local', 'prop(erty)?', 'set', 'get']
|
943
|
+
Reserved = ['but', 'put', 'returning', 'the']
|
944
|
+
StudioClasses = ['action cell', 'alert reply', 'application', 'box',
|
945
|
+
'browser( cell)?', 'bundle', 'button( cell)?', 'cell',
|
946
|
+
'clip view', 'color well', 'color-panel',
|
947
|
+
'combo box( item)?', 'control',
|
948
|
+
'data( (cell|column|item|row|source))?', 'default entry',
|
949
|
+
'dialog reply', 'document', 'drag info', 'drawer',
|
950
|
+
'event', 'font(-panel)?', 'formatter',
|
951
|
+
'image( (cell|view))?', 'matrix', 'menu( item)?', 'item',
|
952
|
+
'movie( view)?', 'open-panel', 'outline view', 'panel',
|
953
|
+
'pasteboard', 'plugin', 'popup button',
|
954
|
+
'progress indicator', 'responder', 'save-panel',
|
955
|
+
'scroll view', 'secure text field( cell)?', 'slider',
|
956
|
+
'sound', 'split view', 'stepper', 'tab view( item)?',
|
957
|
+
'table( (column|header cell|header view|view))',
|
958
|
+
'text( (field( cell)?|view))?', 'toolbar( item)?',
|
959
|
+
'user-defaults', 'view', 'window']
|
960
|
+
StudioEvents = ['accept outline drop', 'accept table drop', 'action',
|
961
|
+
'activated', 'alert ended', 'awake from nib', 'became key',
|
962
|
+
'became main', 'begin editing', 'bounds changed',
|
963
|
+
'cell value', 'cell value changed', 'change cell value',
|
964
|
+
'change item value', 'changed', 'child of item',
|
965
|
+
'choose menu item', 'clicked', 'clicked toolbar item',
|
966
|
+
'closed', 'column clicked', 'column moved',
|
967
|
+
'column resized', 'conclude drop', 'data representation',
|
968
|
+
'deminiaturized', 'dialog ended', 'document nib name',
|
969
|
+
'double clicked', 'drag( (entered|exited|updated))?',
|
970
|
+
'drop', 'end editing', 'exposed', 'idle', 'item expandable',
|
971
|
+
'item value', 'item value changed', 'items changed',
|
972
|
+
'keyboard down', 'keyboard up', 'launched',
|
973
|
+
'load data representation', 'miniaturized', 'mouse down',
|
974
|
+
'mouse dragged', 'mouse entered', 'mouse exited',
|
975
|
+
'mouse moved', 'mouse up', 'moved',
|
976
|
+
'number of browser rows', 'number of items',
|
977
|
+
'number of rows', 'open untitled', 'opened', 'panel ended',
|
978
|
+
'parameters updated', 'plugin loaded', 'prepare drop',
|
979
|
+
'prepare outline drag', 'prepare outline drop',
|
980
|
+
'prepare table drag', 'prepare table drop',
|
981
|
+
'read from file', 'resigned active', 'resigned key',
|
982
|
+
'resigned main', 'resized( sub views)?',
|
983
|
+
'right mouse down', 'right mouse dragged',
|
984
|
+
'right mouse up', 'rows changed', 'scroll wheel',
|
985
|
+
'selected tab view item', 'selection changed',
|
986
|
+
'selection changing', 'should begin editing',
|
987
|
+
'should close', 'should collapse item',
|
988
|
+
'should end editing', 'should expand item',
|
989
|
+
'should open( untitled)?',
|
990
|
+
'should quit( after last window closed)?',
|
991
|
+
'should select column', 'should select item',
|
992
|
+
'should select row', 'should select tab view item',
|
993
|
+
'should selection change', 'should zoom', 'shown',
|
994
|
+
'update menu item', 'update parameters',
|
995
|
+
'update toolbar item', 'was hidden', 'was miniaturized',
|
996
|
+
'will become active', 'will close', 'will dismiss',
|
997
|
+
'will display browser cell', 'will display cell',
|
998
|
+
'will display item cell', 'will display outline cell',
|
999
|
+
'will finish launching', 'will hide', 'will miniaturize',
|
1000
|
+
'will move', 'will open', 'will pop up', 'will quit',
|
1001
|
+
'will resign active', 'will resize( sub views)?',
|
1002
|
+
'will select tab view item', 'will show', 'will zoom',
|
1003
|
+
'write to file', 'zoomed']
|
1004
|
+
StudioCommands = ['animate', 'append', 'call method', 'center',
|
1005
|
+
'close drawer', 'close panel', 'display',
|
1006
|
+
'display alert', 'display dialog', 'display panel', 'go',
|
1007
|
+
'hide', 'highlight', 'increment', 'item for',
|
1008
|
+
'load image', 'load movie', 'load nib', 'load panel',
|
1009
|
+
'load sound', 'localized string', 'lock focus', 'log',
|
1010
|
+
'open drawer', 'path for', 'pause', 'perform action',
|
1011
|
+
'play', 'register', 'resume', 'scroll', 'select( all)?',
|
1012
|
+
'show', 'size to fit', 'start', 'step back',
|
1013
|
+
'step forward', 'stop', 'synchronize', 'unlock focus',
|
1014
|
+
'update']
|
1015
|
+
StudioProperties = ['accepts arrow key', 'action method', 'active',
|
1016
|
+
'alignment', 'allowed identifiers',
|
1017
|
+
'allows branch selection', 'allows column reordering',
|
1018
|
+
'allows column resizing', 'allows column selection',
|
1019
|
+
'allows customization',
|
1020
|
+
'allows editing text attributes',
|
1021
|
+
'allows empty selection', 'allows mixed state',
|
1022
|
+
'allows multiple selection', 'allows reordering',
|
1023
|
+
'allows undo', 'alpha( value)?', 'alternate image',
|
1024
|
+
'alternate increment value', 'alternate title',
|
1025
|
+
'animation delay', 'associated file name',
|
1026
|
+
'associated object', 'auto completes', 'auto display',
|
1027
|
+
'auto enables items', 'auto repeat',
|
1028
|
+
'auto resizes( outline column)?',
|
1029
|
+
'auto save expanded items', 'auto save name',
|
1030
|
+
'auto save table columns', 'auto saves configuration',
|
1031
|
+
'auto scroll', 'auto sizes all columns to fit',
|
1032
|
+
'auto sizes cells', 'background color', 'bezel state',
|
1033
|
+
'bezel style', 'bezeled', 'border rect', 'border type',
|
1034
|
+
'bordered', 'bounds( rotation)?', 'box type',
|
1035
|
+
'button returned', 'button type',
|
1036
|
+
'can choose directories', 'can choose files',
|
1037
|
+
'can draw', 'can hide',
|
1038
|
+
'cell( (background color|size|type))?', 'characters',
|
1039
|
+
'class', 'click count', 'clicked( data)? column',
|
1040
|
+
'clicked data item', 'clicked( data)? row',
|
1041
|
+
'closeable', 'collating', 'color( (mode|panel))',
|
1042
|
+
'command key down', 'configuration',
|
1043
|
+
'content(s| (size|view( margins)?))?', 'context',
|
1044
|
+
'continuous', 'control key down', 'control size',
|
1045
|
+
'control tint', 'control view',
|
1046
|
+
'controller visible', 'coordinate system',
|
1047
|
+
'copies( on scroll)?', 'corner view', 'current cell',
|
1048
|
+
'current column', 'current( field)? editor',
|
1049
|
+
'current( menu)? item', 'current row',
|
1050
|
+
'current tab view item', 'data source',
|
1051
|
+
'default identifiers', 'delta (x|y|z)',
|
1052
|
+
'destination window', 'directory', 'display mode',
|
1053
|
+
'displayed cell', 'document( (edited|rect|view))?',
|
1054
|
+
'double value', 'dragged column', 'dragged distance',
|
1055
|
+
'dragged items', 'draws( cell)? background',
|
1056
|
+
'draws grid', 'dynamically scrolls', 'echos bullets',
|
1057
|
+
'edge', 'editable', 'edited( data)? column',
|
1058
|
+
'edited data item', 'edited( data)? row', 'enabled',
|
1059
|
+
'enclosing scroll view', 'ending page',
|
1060
|
+
'error handling', 'event number', 'event type',
|
1061
|
+
'excluded from windows menu', 'executable path',
|
1062
|
+
'expanded', 'fax number', 'field editor', 'file kind',
|
1063
|
+
'file name', 'file type', 'first responder',
|
1064
|
+
'first visible column', 'flipped', 'floating',
|
1065
|
+
'font( panel)?', 'formatter', 'frameworks path',
|
1066
|
+
'frontmost', 'gave up', 'grid color', 'has data items',
|
1067
|
+
'has horizontal ruler', 'has horizontal scroller',
|
1068
|
+
'has parent data item', 'has resize indicator',
|
1069
|
+
'has shadow', 'has sub menu', 'has vertical ruler',
|
1070
|
+
'has vertical scroller', 'header cell', 'header view',
|
1071
|
+
'hidden', 'hides when deactivated', 'highlights by',
|
1072
|
+
'horizontal line scroll', 'horizontal page scroll',
|
1073
|
+
'horizontal ruler view', 'horizontally resizable',
|
1074
|
+
'icon image', 'id', 'identifier',
|
1075
|
+
'ignores multiple clicks',
|
1076
|
+
'image( (alignment|dims when disabled|frame style|'
|
1077
|
+
'scaling))?',
|
1078
|
+
'imports graphics', 'increment value',
|
1079
|
+
'indentation per level', 'indeterminate', 'index',
|
1080
|
+
'integer value', 'intercell spacing', 'item height',
|
1081
|
+
'key( (code|equivalent( modifier)?|window))?',
|
1082
|
+
'knob thickness', 'label', 'last( visible)? column',
|
1083
|
+
'leading offset', 'leaf', 'level', 'line scroll',
|
1084
|
+
'loaded', 'localized sort', 'location', 'loop mode',
|
1085
|
+
'main( (bunde|menu|window))?', 'marker follows cell',
|
1086
|
+
'matrix mode', 'maximum( content)? size',
|
1087
|
+
'maximum visible columns',
|
1088
|
+
'menu( form representation)?', 'miniaturizable',
|
1089
|
+
'miniaturized', 'minimized image', 'minimized title',
|
1090
|
+
'minimum column width', 'minimum( content)? size',
|
1091
|
+
'modal', 'modified', 'mouse down state',
|
1092
|
+
'movie( (controller|file|rect))?', 'muted', 'name',
|
1093
|
+
'needs display', 'next state', 'next text',
|
1094
|
+
'number of tick marks', 'only tick mark values',
|
1095
|
+
'opaque', 'open panel', 'option key down',
|
1096
|
+
'outline table column', 'page scroll', 'pages across',
|
1097
|
+
'pages down', 'palette label', 'pane splitter',
|
1098
|
+
'parent data item', 'parent window', 'pasteboard',
|
1099
|
+
'path( (names|separator))?', 'playing',
|
1100
|
+
'plays every frame', 'plays selection only', 'position',
|
1101
|
+
'preferred edge', 'preferred type', 'pressure',
|
1102
|
+
'previous text', 'prompt', 'properties',
|
1103
|
+
'prototype cell', 'pulls down', 'rate',
|
1104
|
+
'released when closed', 'repeated',
|
1105
|
+
'requested print time', 'required file type',
|
1106
|
+
'resizable', 'resized column', 'resource path',
|
1107
|
+
'returns records', 'reuses columns', 'rich text',
|
1108
|
+
'roll over', 'row height', 'rulers visible',
|
1109
|
+
'save panel', 'scripts path', 'scrollable',
|
1110
|
+
'selectable( identifiers)?', 'selected cell',
|
1111
|
+
'selected( data)? columns?', 'selected data items?',
|
1112
|
+
'selected( data)? rows?', 'selected item identifier',
|
1113
|
+
'selection by rect', 'send action on arrow key',
|
1114
|
+
'sends action when done editing', 'separates columns',
|
1115
|
+
'separator item', 'sequence number', 'services menu',
|
1116
|
+
'shared frameworks path', 'shared support path',
|
1117
|
+
'sheet', 'shift key down', 'shows alpha',
|
1118
|
+
'shows state by', 'size( mode)?',
|
1119
|
+
'smart insert delete enabled', 'sort case sensitivity',
|
1120
|
+
'sort column', 'sort order', 'sort type',
|
1121
|
+
'sorted( data rows)?', 'sound', 'source( mask)?',
|
1122
|
+
'spell checking enabled', 'starting page', 'state',
|
1123
|
+
'string value', 'sub menu', 'super menu', 'super view',
|
1124
|
+
'tab key traverses cells', 'tab state', 'tab type',
|
1125
|
+
'tab view', 'table view', 'tag', 'target( printer)?',
|
1126
|
+
'text color', 'text container insert',
|
1127
|
+
'text container origin', 'text returned',
|
1128
|
+
'tick mark position', 'time stamp',
|
1129
|
+
'title(d| (cell|font|height|position|rect))?',
|
1130
|
+
'tool tip', 'toolbar', 'trailing offset', 'transparent',
|
1131
|
+
'treat packages as directories', 'truncated labels',
|
1132
|
+
'types', 'unmodified characters', 'update views',
|
1133
|
+
'use sort indicator', 'user defaults',
|
1134
|
+
'uses data source', 'uses ruler',
|
1135
|
+
'uses threaded animation',
|
1136
|
+
'uses title from previous column', 'value wraps',
|
1137
|
+
'version',
|
1138
|
+
'vertical( (line scroll|page scroll|ruler view))?',
|
1139
|
+
'vertically resizable', 'view',
|
1140
|
+
'visible( document rect)?', 'volume', 'width', 'window',
|
1141
|
+
'windows menu', 'wraps', 'zoomable', 'zoomed']
|
1142
|
+
|
1143
|
+
tokens = {
|
1144
|
+
'root': [
|
1145
|
+
(r'\s+', Text),
|
1146
|
+
(ur'¬\n', String.Escape),
|
1147
|
+
(r"'s\s+", Text), # This is a possessive, consider moving
|
1148
|
+
(r'(--|#).*?$', Comment),
|
1149
|
+
(r'\(\*', Comment.Multiline, 'comment'),
|
1150
|
+
(r'[\(\){}!,.:]', Punctuation),
|
1151
|
+
(ur'(«)([^»]+)(»)',
|
1152
|
+
bygroups(Text, Name.Builtin, Text)),
|
1153
|
+
(r'\b((?:considering|ignoring)\s*)'
|
1154
|
+
r'(application responses|case|diacriticals|hyphens|'
|
1155
|
+
r'numeric strings|punctuation|white space)',
|
1156
|
+
bygroups(Keyword, Name.Builtin)),
|
1157
|
+
(ur'(-|\*|\+|&|≠|>=?|<=?|=|≥|≤|/|÷|\^)', Operator),
|
1158
|
+
(r"\b(%s)\b" % '|'.join(Operators), Operator.Word),
|
1159
|
+
(r'^(\s*(?:on|end)\s+)'
|
1160
|
+
r'(%s)' % '|'.join(StudioEvents[::-1]),
|
1161
|
+
bygroups(Keyword, Name.Function)),
|
1162
|
+
(r'^(\s*)(in|on|script|to)(\s+)', bygroups(Text, Keyword, Text)),
|
1163
|
+
(r'\b(as )(%s)\b' % '|'.join(Classes),
|
1164
|
+
bygroups(Keyword, Name.Class)),
|
1165
|
+
(r'\b(%s)\b' % '|'.join(Literals), Name.Constant),
|
1166
|
+
(r'\b(%s)\b' % '|'.join(Commands), Name.Builtin),
|
1167
|
+
(r'\b(%s)\b' % '|'.join(Control), Keyword),
|
1168
|
+
(r'\b(%s)\b' % '|'.join(Declarations), Keyword),
|
1169
|
+
(r'\b(%s)\b' % '|'.join(Reserved), Name.Builtin),
|
1170
|
+
(r'\b(%s)s?\b' % '|'.join(BuiltIn), Name.Builtin),
|
1171
|
+
(r'\b(%s)\b' % '|'.join(HandlerParams), Name.Builtin),
|
1172
|
+
(r'\b(%s)\b' % '|'.join(StudioProperties), Name.Attribute),
|
1173
|
+
(r'\b(%s)s?\b' % '|'.join(StudioClasses), Name.Builtin),
|
1174
|
+
(r'\b(%s)\b' % '|'.join(StudioCommands), Name.Builtin),
|
1175
|
+
(r'\b(%s)\b' % '|'.join(References), Name.Builtin),
|
1176
|
+
(r'"(\\\\|\\"|[^"])*"', String.Double),
|
1177
|
+
(r'\b(%s)\b' % Identifiers, Name.Variable),
|
1178
|
+
(r'[-+]?(\d+\.\d*|\d*\.\d+)(E[-+][0-9]+)?', Number.Float),
|
1179
|
+
(r'[-+]?\d+', Number.Integer),
|
1180
|
+
],
|
1181
|
+
'comment': [
|
1182
|
+
('\(\*', Comment.Multiline, '#push'),
|
1183
|
+
('\*\)', Comment.Multiline, '#pop'),
|
1184
|
+
('[^*(]+', Comment.Multiline),
|
1185
|
+
('[*(]', Comment.Multiline),
|
1186
|
+
],
|
1187
|
+
}
|
1188
|
+
|
1189
|
+
|
1190
|
+
class ModelicaLexer(RegexLexer):
|
1191
|
+
"""
|
1192
|
+
For `Modelica <http://www.modelica.org/>`_ source code.
|
1193
|
+
|
1194
|
+
*New in Pygments 1.1.*
|
1195
|
+
"""
|
1196
|
+
name = 'Modelica'
|
1197
|
+
aliases = ['modelica']
|
1198
|
+
filenames = ['*.mo']
|
1199
|
+
mimetypes = ['text/x-modelica']
|
1200
|
+
|
1201
|
+
flags = re.IGNORECASE | re.DOTALL
|
1202
|
+
|
1203
|
+
tokens = {
|
1204
|
+
'whitespace': [
|
1205
|
+
(r'\n', Text),
|
1206
|
+
(r'\s+', Text),
|
1207
|
+
(r'\\\n', Text), # line continuation
|
1208
|
+
(r'//(\n|(.|\n)*?[^\\]\n)', Comment),
|
1209
|
+
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment),
|
1210
|
+
],
|
1211
|
+
'statements': [
|
1212
|
+
(r'"', String, 'string'),
|
1213
|
+
(r'(\d+\.\d*|\.\d+|\d+|\d.)[eE][+-]?\d+[lL]?', Number.Float),
|
1214
|
+
(r'(\d+\.\d*|\.\d+)', Number.Float),
|
1215
|
+
(r'\d+[Ll]?', Number.Integer),
|
1216
|
+
(r'[~!%^&*+=|?:<>/-]', Operator),
|
1217
|
+
(r'[()\[\]{},.;]', Punctuation),
|
1218
|
+
(r'(true|false|NULL|Real|Integer|Boolean)\b', Name.Builtin),
|
1219
|
+
(r"([a-zA-Z_][\w]*|'[a-zA-Z_\+\-\*\/\^][\w]*')"
|
1220
|
+
r"(\.([a-zA-Z_][\w]*|'[a-zA-Z_\+\-\*\/\^][\w]*'))+", Name.Class),
|
1221
|
+
(r"('[\w\+\-\*\/\^]+'|\w+)", Name) ],
|
1222
|
+
'root': [
|
1223
|
+
include('whitespace'),
|
1224
|
+
include('keywords'),
|
1225
|
+
include('functions'),
|
1226
|
+
include('operators'),
|
1227
|
+
include('classes'),
|
1228
|
+
(r'("<html>|<html>)', Name.Tag, 'html-content'),
|
1229
|
+
include('statements')
|
1230
|
+
],
|
1231
|
+
'keywords': [
|
1232
|
+
(r'(algorithm|annotation|break|connect|constant|constrainedby|'
|
1233
|
+
r'discrete|each|else|elseif|elsewhen|encapsulated|enumeration|'
|
1234
|
+
r'end|equation|exit|expandable|extends|'
|
1235
|
+
r'external|false|final|flow|for|if|import|in|inner|input|'
|
1236
|
+
r'loop|nondiscrete|outer|output|parameter|partial|'
|
1237
|
+
r'protected|public|redeclare|replaceable|stream|time|then|true|'
|
1238
|
+
r'when|while|within)\b', Keyword)
|
1239
|
+
],
|
1240
|
+
'functions': [
|
1241
|
+
(r'(abs|acos|acosh|asin|asinh|atan|atan2|atan3|ceil|cos|cosh|'
|
1242
|
+
r'cross|div|exp|floor|log|log10|mod|rem|semiLinear|sign|sin|'
|
1243
|
+
r'sinh|size|sqrt|tan|tanh|zeros)\b', Name.Function)
|
1244
|
+
],
|
1245
|
+
'operators': [
|
1246
|
+
(r'(and|assert|cardinality|change|delay|der|edge|homotopy|initial|'
|
1247
|
+
r'noEvent|not|or|pre|reinit|return|sample|smooth|'
|
1248
|
+
r'terminal|terminate)\b', Name.Builtin)
|
1249
|
+
],
|
1250
|
+
'classes': [
|
1251
|
+
(r'(block|class|connector|function|model|package|'
|
1252
|
+
r'record|type)\b', Name.Class)
|
1253
|
+
],
|
1254
|
+
'string': [
|
1255
|
+
(r'"', String, '#pop'),
|
1256
|
+
(r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})',
|
1257
|
+
String.Escape),
|
1258
|
+
(r'[^\\"\n]+', String), # all other characters
|
1259
|
+
(r'\\\n', String), # line continuation
|
1260
|
+
(r'\\', String) # stray backslash
|
1261
|
+
],
|
1262
|
+
'html-content': [
|
1263
|
+
(r'<\s*/\s*html\s*>', Name.Tag, '#pop'),
|
1264
|
+
(r'.+?(?=<\s*/\s*html\s*>)', using(HtmlLexer)),
|
1265
|
+
]
|
1266
|
+
}
|
1267
|
+
|
1268
|
+
|
1269
|
+
class RebolLexer(RegexLexer):
|
1270
|
+
"""
|
1271
|
+
A `REBOL <http://www.rebol.com/>`_ lexer.
|
1272
|
+
|
1273
|
+
*New in Pygments 1.1.*
|
1274
|
+
"""
|
1275
|
+
name = 'REBOL'
|
1276
|
+
aliases = ['rebol']
|
1277
|
+
filenames = ['*.r', '*.r3']
|
1278
|
+
mimetypes = ['text/x-rebol']
|
1279
|
+
|
1280
|
+
flags = re.IGNORECASE | re.MULTILINE
|
1281
|
+
|
1282
|
+
re.IGNORECASE
|
1283
|
+
|
1284
|
+
escape_re = r'(?:\^\([0-9a-fA-F]{1,4}\)*)'
|
1285
|
+
|
1286
|
+
def word_callback(lexer, match):
|
1287
|
+
word = match.group()
|
1288
|
+
|
1289
|
+
if re.match(".*:$", word):
|
1290
|
+
yield match.start(), Generic.Subheading, word
|
1291
|
+
elif re.match(
|
1292
|
+
r'(native|alias|all|any|as-string|as-binary|bind|bound\?|case|'
|
1293
|
+
r'catch|checksum|comment|debase|dehex|exclude|difference|disarm|'
|
1294
|
+
r'either|else|enbase|foreach|remove-each|form|free|get|get-env|if|'
|
1295
|
+
r'in|intersect|loop|minimum-of|maximum-of|mold|new-line|'
|
1296
|
+
r'new-line\?|not|now|prin|print|reduce|compose|construct|repeat|'
|
1297
|
+
r'reverse|save|script\?|set|shift|switch|throw|to-hex|trace|try|'
|
1298
|
+
r'type\?|union|unique|unless|unprotect|unset|until|use|value\?|'
|
1299
|
+
r'while|compress|decompress|secure|open|close|read|read-io|'
|
1300
|
+
r'write-io|write|update|query|wait|input\?|exp|log-10|log-2|'
|
1301
|
+
r'log-e|square-root|cosine|sine|tangent|arccosine|arcsine|'
|
1302
|
+
r'arctangent|protect|lowercase|uppercase|entab|detab|connected\?|'
|
1303
|
+
r'browse|launch|stats|get-modes|set-modes|to-local-file|'
|
1304
|
+
r'to-rebol-file|encloak|decloak|create-link|do-browser|bind\?|'
|
1305
|
+
r'hide|draw|show|size-text|textinfo|offset-to-caret|'
|
1306
|
+
r'caret-to-offset|local-request-file|rgb-to-hsv|hsv-to-rgb|'
|
1307
|
+
r'crypt-strength\?|dh-make-key|dh-generate-key|dh-compute-key|'
|
1308
|
+
r'dsa-make-key|dsa-generate-key|dsa-make-signature|'
|
1309
|
+
r'dsa-verify-signature|rsa-make-key|rsa-generate-key|'
|
1310
|
+
r'rsa-encrypt)$', word):
|
1311
|
+
yield match.start(), Name.Builtin, word
|
1312
|
+
elif re.match(
|
1313
|
+
r'(add|subtract|multiply|divide|remainder|power|and~|or~|xor~|'
|
1314
|
+
r'minimum|maximum|negate|complement|absolute|random|head|tail|'
|
1315
|
+
r'next|back|skip|at|pick|first|second|third|fourth|fifth|sixth|'
|
1316
|
+
r'seventh|eighth|ninth|tenth|last|path|find|select|make|to|copy\*|'
|
1317
|
+
r'insert|remove|change|poke|clear|trim|sort|min|max|abs|cp|'
|
1318
|
+
r'copy)$', word):
|
1319
|
+
yield match.start(), Name.Function, word
|
1320
|
+
elif re.match(
|
1321
|
+
r'(error|source|input|license|help|install|echo|Usage|with|func|'
|
1322
|
+
r'throw-on-error|function|does|has|context|probe|\?\?|as-pair|'
|
1323
|
+
r'mod|modulo|round|repend|about|set-net|append|join|rejoin|reform|'
|
1324
|
+
r'remold|charset|array|replace|move|extract|forskip|forall|alter|'
|
1325
|
+
r'first+|also|take|for|forever|dispatch|attempt|what-dir|'
|
1326
|
+
r'change-dir|clean-path|list-dir|dirize|rename|split-path|delete|'
|
1327
|
+
r'make-dir|delete-dir|in-dir|confirm|dump-obj|upgrade|what|'
|
1328
|
+
r'build-tag|process-source|build-markup|decode-cgi|read-cgi|'
|
1329
|
+
r'write-user|save-user|set-user-name|protect-system|parse-xml|'
|
1330
|
+
r'cvs-date|cvs-version|do-boot|get-net-info|desktop|layout|'
|
1331
|
+
r'scroll-para|get-face|alert|set-face|uninstall|unfocus|'
|
1332
|
+
r'request-dir|center-face|do-events|net-error|decode-url|'
|
1333
|
+
r'parse-header|parse-header-date|parse-email-addrs|import-email|'
|
1334
|
+
r'send|build-attach-body|resend|show-popup|hide-popup|open-events|'
|
1335
|
+
r'find-key-face|do-face|viewtop|confine|find-window|'
|
1336
|
+
r'insert-event-func|remove-event-func|inform|dump-pane|dump-face|'
|
1337
|
+
r'flag-face|deflag-face|clear-fields|read-net|vbug|path-thru|'
|
1338
|
+
r'read-thru|load-thru|do-thru|launch-thru|load-image|'
|
1339
|
+
r'request-download|do-face-alt|set-font|set-para|get-style|'
|
1340
|
+
r'set-style|make-face|stylize|choose|hilight-text|hilight-all|'
|
1341
|
+
r'unlight-text|focus|scroll-drag|clear-face|reset-face|scroll-face|'
|
1342
|
+
r'resize-face|load-stock|load-stock-block|notify|request|flash|'
|
1343
|
+
r'request-color|request-pass|request-text|request-list|'
|
1344
|
+
r'request-date|request-file|dbug|editor|link-relative-path|'
|
1345
|
+
r'emailer|parse-error)$', word):
|
1346
|
+
yield match.start(), Keyword.Namespace, word
|
1347
|
+
elif re.match(
|
1348
|
+
r'(halt|quit|do|load|q|recycle|call|run|ask|parse|view|unview|'
|
1349
|
+
r'return|exit|break)$', word):
|
1350
|
+
yield match.start(), Name.Exception, word
|
1351
|
+
elif re.match('REBOL$', word):
|
1352
|
+
yield match.start(), Generic.Heading, word
|
1353
|
+
elif re.match("to-.*", word):
|
1354
|
+
yield match.start(), Keyword, word
|
1355
|
+
elif re.match('(\+|-|\*|/|//|\*\*|and|or|xor|=\?|=|==|<>|<|>|<=|>=)$',
|
1356
|
+
word):
|
1357
|
+
yield match.start(), Operator, word
|
1358
|
+
elif re.match(".*\?$", word):
|
1359
|
+
yield match.start(), Keyword, word
|
1360
|
+
elif re.match(".*\!$", word):
|
1361
|
+
yield match.start(), Keyword.Type, word
|
1362
|
+
elif re.match("'.*", word):
|
1363
|
+
yield match.start(), Name.Variable.Instance, word # lit-word
|
1364
|
+
elif re.match("#.*", word):
|
1365
|
+
yield match.start(), Name.Label, word # issue
|
1366
|
+
elif re.match("%.*", word):
|
1367
|
+
yield match.start(), Name.Decorator, word # file
|
1368
|
+
else:
|
1369
|
+
yield match.start(), Name.Variable, word
|
1370
|
+
|
1371
|
+
tokens = {
|
1372
|
+
'root': [
|
1373
|
+
(r'\s+', Text),
|
1374
|
+
(r'#"', String.Char, 'char'),
|
1375
|
+
(r'#{[0-9a-fA-F]*}', Number.Hex),
|
1376
|
+
(r'2#{', Number.Hex, 'bin2'),
|
1377
|
+
(r'64#{[0-9a-zA-Z+/=\s]*}', Number.Hex),
|
1378
|
+
(r'"', String, 'string'),
|
1379
|
+
(r'{', String, 'string2'),
|
1380
|
+
(r';#+.*\n', Comment.Special),
|
1381
|
+
(r';\*+.*\n', Comment.Preproc),
|
1382
|
+
(r';.*\n', Comment),
|
1383
|
+
(r'%"', Name.Decorator, 'stringFile'),
|
1384
|
+
(r'%[^(\^{^")\s\[\]]+', Name.Decorator),
|
1385
|
+
(r'<[a-zA-Z0-9:._-]*>', Name.Tag),
|
1386
|
+
(r'<[^(<>\s")]+', Name.Tag, 'tag'),
|
1387
|
+
(r'[+-]?([a-zA-Z]{1,3})?\$\d+(\.\d+)?', Number.Float), # money
|
1388
|
+
(r'[+-]?\d+\:\d+(\:\d+)?(\.\d+)?', String.Other), # time
|
1389
|
+
(r'\d+\-[0-9a-zA-Z]+\-\d+(\/\d+\:\d+(\:\d+)?'
|
1390
|
+
r'([\.\d+]?([+-]?\d+:\d+)?)?)?', String.Other), # date
|
1391
|
+
(r'\d+(\.\d+)+\.\d+', Keyword.Constant), # tuple
|
1392
|
+
(r'\d+[xX]\d+', Keyword.Constant), # pair
|
1393
|
+
(r'[+-]?\d+(\'\d+)?([\.,]\d*)?[eE][+-]?\d+', Number.Float),
|
1394
|
+
(r'[+-]?\d+(\'\d+)?[\.,]\d*', Number.Float),
|
1395
|
+
(r'[+-]?\d+(\'\d+)?', Number),
|
1396
|
+
(r'[\[\]\(\)]', Generic.Strong),
|
1397
|
+
(r'[a-zA-Z]+[^(\^{"\s:)]*://[^(\^{"\s)]*', Name.Decorator), # url
|
1398
|
+
(r'mailto:[^(\^{"@\s)]+@[^(\^{"@\s)]+', Name.Decorator), # url
|
1399
|
+
(r'[^(\^{"@\s)]+@[^(\^{"@\s)]+', Name.Decorator), # email
|
1400
|
+
(r'comment\s', Comment, 'comment'),
|
1401
|
+
(r'/[^(\^{^")\s/[\]]*', Name.Attribute),
|
1402
|
+
(r'([^(\^{^")\s/[\]]+)(?=[:({"\s/\[\]])', word_callback),
|
1403
|
+
(r'([^(\^{^")\s]+)', Text),
|
1404
|
+
],
|
1405
|
+
'string': [
|
1406
|
+
(r'[^(\^")]+', String),
|
1407
|
+
(escape_re, String.Escape),
|
1408
|
+
(r'[\(|\)]+', String),
|
1409
|
+
(r'\^.', String.Escape),
|
1410
|
+
(r'"', String, '#pop'),
|
1411
|
+
],
|
1412
|
+
'string2': [
|
1413
|
+
(r'[^(\^{^})]+', String),
|
1414
|
+
(escape_re, String.Escape),
|
1415
|
+
(r'[\(|\)]+', String),
|
1416
|
+
(r'\^.', String.Escape),
|
1417
|
+
(r'{', String, '#push'),
|
1418
|
+
(r'}', String, '#pop'),
|
1419
|
+
],
|
1420
|
+
'stringFile': [
|
1421
|
+
(r'[^(\^")]+', Name.Decorator),
|
1422
|
+
(escape_re, Name.Decorator),
|
1423
|
+
(r'\^.', Name.Decorator),
|
1424
|
+
(r'"', Name.Decorator, '#pop'),
|
1425
|
+
],
|
1426
|
+
'char': [
|
1427
|
+
(escape_re + '"', String.Char, '#pop'),
|
1428
|
+
(r'\^."', String.Char, '#pop'),
|
1429
|
+
(r'."', String.Char, '#pop'),
|
1430
|
+
],
|
1431
|
+
'tag': [
|
1432
|
+
(escape_re, Name.Tag),
|
1433
|
+
(r'"', Name.Tag, 'tagString'),
|
1434
|
+
(r'[^(<>\r\n")]+', Name.Tag),
|
1435
|
+
(r'>', Name.Tag, '#pop'),
|
1436
|
+
],
|
1437
|
+
'tagString': [
|
1438
|
+
(r'[^(\^")]+', Name.Tag),
|
1439
|
+
(escape_re, Name.Tag),
|
1440
|
+
(r'[\(|\)]+', Name.Tag),
|
1441
|
+
(r'\^.', Name.Tag),
|
1442
|
+
(r'"', Name.Tag, '#pop'),
|
1443
|
+
],
|
1444
|
+
'tuple': [
|
1445
|
+
(r'(\d+\.)+', Keyword.Constant),
|
1446
|
+
(r'\d+', Keyword.Constant, '#pop'),
|
1447
|
+
],
|
1448
|
+
'bin2': [
|
1449
|
+
(r'\s+', Number.Hex),
|
1450
|
+
(r'([0-1]\s*){8}', Number.Hex),
|
1451
|
+
(r'}', Number.Hex, '#pop'),
|
1452
|
+
],
|
1453
|
+
'comment': [
|
1454
|
+
(r'"', Comment, 'commentString1'),
|
1455
|
+
(r'{', Comment, 'commentString2'),
|
1456
|
+
(r'\[', Comment, 'commentBlock'),
|
1457
|
+
(r'[^(\s{\"\[]+', Comment, '#pop'),
|
1458
|
+
],
|
1459
|
+
'commentString1': [
|
1460
|
+
(r'[^(\^")]+', Comment),
|
1461
|
+
(escape_re, Comment),
|
1462
|
+
(r'[\(|\)]+', Comment),
|
1463
|
+
(r'\^.', Comment),
|
1464
|
+
(r'"', Comment, '#pop'),
|
1465
|
+
],
|
1466
|
+
'commentString2': [
|
1467
|
+
(r'[^(\^{^})]+', Comment),
|
1468
|
+
(escape_re, Comment),
|
1469
|
+
(r'[\(|\)]+', Comment),
|
1470
|
+
(r'\^.', Comment),
|
1471
|
+
(r'{', Comment, '#push'),
|
1472
|
+
(r'}', Comment, '#pop'),
|
1473
|
+
],
|
1474
|
+
'commentBlock': [
|
1475
|
+
(r'\[',Comment, '#push'),
|
1476
|
+
(r'\]',Comment, '#pop'),
|
1477
|
+
(r'[^(\[\])]*', Comment),
|
1478
|
+
],
|
1479
|
+
}
|
1480
|
+
|
1481
|
+
|
1482
|
+
class ABAPLexer(RegexLexer):
|
1483
|
+
"""
|
1484
|
+
Lexer for ABAP, SAP's integrated language.
|
1485
|
+
|
1486
|
+
*New in Pygments 1.1.*
|
1487
|
+
"""
|
1488
|
+
name = 'ABAP'
|
1489
|
+
aliases = ['abap']
|
1490
|
+
filenames = ['*.abap']
|
1491
|
+
mimetypes = ['text/x-abap']
|
1492
|
+
|
1493
|
+
flags = re.IGNORECASE | re.MULTILINE
|
1494
|
+
|
1495
|
+
tokens = {
|
1496
|
+
'common': [
|
1497
|
+
(r'\s+', Text),
|
1498
|
+
(r'^\*.*$', Comment.Single),
|
1499
|
+
(r'\".*?\n', Comment.Single),
|
1500
|
+
],
|
1501
|
+
'variable-names': [
|
1502
|
+
(r'<[\S_]+>', Name.Variable),
|
1503
|
+
(r'\w[\w~]*(?:(\[\])|->\*)?', Name.Variable),
|
1504
|
+
],
|
1505
|
+
'root': [
|
1506
|
+
include('common'),
|
1507
|
+
#function calls
|
1508
|
+
(r'(CALL\s+(?:BADI|CUSTOMER-FUNCTION|FUNCTION))(\s+)(\'?\S+\'?)',
|
1509
|
+
bygroups(Keyword, Text, Name.Function)),
|
1510
|
+
(r'(CALL\s+(?:DIALOG|SCREEN|SUBSCREEN|SELECTION-SCREEN|'
|
1511
|
+
r'TRANSACTION|TRANSFORMATION))\b',
|
1512
|
+
Keyword),
|
1513
|
+
(r'(FORM|PERFORM)(\s+)(\w+)',
|
1514
|
+
bygroups(Keyword, Text, Name.Function)),
|
1515
|
+
(r'(PERFORM)(\s+)(\()(\w+)(\))',
|
1516
|
+
bygroups(Keyword, Text, Punctuation, Name.Variable, Punctuation )),
|
1517
|
+
(r'(MODULE)(\s+)(\S+)(\s+)(INPUT|OUTPUT)',
|
1518
|
+
bygroups(Keyword, Text, Name.Function, Text, Keyword)),
|
1519
|
+
|
1520
|
+
# method implementation
|
1521
|
+
(r'(METHOD)(\s+)([\w~]+)',
|
1522
|
+
bygroups(Keyword, Text, Name.Function)),
|
1523
|
+
# method calls
|
1524
|
+
(r'(\s+)([\w\-]+)([=\-]>)([\w\-~]+)',
|
1525
|
+
bygroups(Text, Name.Variable, Operator, Name.Function)),
|
1526
|
+
# call methodnames returning style
|
1527
|
+
(r'(?<=(=|-)>)([\w\-~]+)(?=\()', Name.Function),
|
1528
|
+
|
1529
|
+
# keywords with dashes in them.
|
1530
|
+
# these need to be first, because for instance the -ID part
|
1531
|
+
# of MESSAGE-ID wouldn't get highlighted if MESSAGE was
|
1532
|
+
# first in the list of keywords.
|
1533
|
+
(r'(ADD-CORRESPONDING|AUTHORITY-CHECK|'
|
1534
|
+
r'CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|'
|
1535
|
+
r'DELETE-ADJACENT|DIVIDE-CORRESPONDING|'
|
1536
|
+
r'EDITOR-CALL|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|EXIT-COMMAND|'
|
1537
|
+
r'FIELD-GROUPS|FIELD-SYMBOLS|FUNCTION-POOL|'
|
1538
|
+
r'INTERFACE-POOL|INVERTED-DATE|'
|
1539
|
+
r'LOAD-OF-PROGRAM|LOG-POINT|'
|
1540
|
+
r'MESSAGE-ID|MOVE-CORRESPONDING|MULTIPLY-CORRESPONDING|'
|
1541
|
+
r'NEW-LINE|NEW-PAGE|NEW-SECTION|NO-EXTENSION|'
|
1542
|
+
r'OUTPUT-LENGTH|PRINT-CONTROL|'
|
1543
|
+
r'SELECT-OPTIONS|START-OF-SELECTION|SUBTRACT-CORRESPONDING|'
|
1544
|
+
r'SYNTAX-CHECK|SYSTEM-EXCEPTIONS|'
|
1545
|
+
r'TYPE-POOL|TYPE-POOLS'
|
1546
|
+
r')\b', Keyword),
|
1547
|
+
|
1548
|
+
# keyword kombinations
|
1549
|
+
(r'CREATE\s+(PUBLIC|PRIVATE|DATA|OBJECT)|'
|
1550
|
+
r'((PUBLIC|PRIVATE|PROTECTED)\s+SECTION|'
|
1551
|
+
r'(TYPE|LIKE)(\s+(LINE\s+OF|REF\s+TO|'
|
1552
|
+
r'(SORTED|STANDARD|HASHED)\s+TABLE\s+OF))?|'
|
1553
|
+
r'FROM\s+(DATABASE|MEMORY)|CALL\s+METHOD|'
|
1554
|
+
r'(GROUP|ORDER) BY|HAVING|SEPARATED BY|'
|
1555
|
+
r'GET\s+(BADI|BIT|CURSOR|DATASET|LOCALE|PARAMETER|'
|
1556
|
+
r'PF-STATUS|(PROPERTY|REFERENCE)\s+OF|'
|
1557
|
+
r'RUN\s+TIME|TIME\s+(STAMP)?)?|'
|
1558
|
+
r'SET\s+(BIT|BLANK\s+LINES|COUNTRY|CURSOR|DATASET|EXTENDED\s+CHECK|'
|
1559
|
+
r'HANDLER|HOLD\s+DATA|LANGUAGE|LEFT\s+SCROLL-BOUNDARY|'
|
1560
|
+
r'LOCALE|MARGIN|PARAMETER|PF-STATUS|PROPERTY\s+OF|'
|
1561
|
+
r'RUN\s+TIME\s+(ANALYZER|CLOCK\s+RESOLUTION)|SCREEN|'
|
1562
|
+
r'TITLEBAR|UPADTE\s+TASK\s+LOCAL|USER-COMMAND)|'
|
1563
|
+
r'CONVERT\s+((INVERTED-)?DATE|TIME|TIME\s+STAMP|TEXT)|'
|
1564
|
+
r'(CLOSE|OPEN)\s+(DATASET|CURSOR)|'
|
1565
|
+
r'(TO|FROM)\s+(DATA BUFFER|INTERNAL TABLE|MEMORY ID|'
|
1566
|
+
r'DATABASE|SHARED\s+(MEMORY|BUFFER))|'
|
1567
|
+
r'DESCRIBE\s+(DISTANCE\s+BETWEEN|FIELD|LIST|TABLE)|'
|
1568
|
+
r'FREE\s(MEMORY|OBJECT)?|'
|
1569
|
+
r'PROCESS\s+(BEFORE\s+OUTPUT|AFTER\s+INPUT|'
|
1570
|
+
r'ON\s+(VALUE-REQUEST|HELP-REQUEST))|'
|
1571
|
+
r'AT\s+(LINE-SELECTION|USER-COMMAND|END\s+OF|NEW)|'
|
1572
|
+
r'AT\s+SELECTION-SCREEN(\s+(ON(\s+(BLOCK|(HELP|VALUE)-REQUEST\s+FOR|'
|
1573
|
+
r'END\s+OF|RADIOBUTTON\s+GROUP))?|OUTPUT))?|'
|
1574
|
+
r'SELECTION-SCREEN:?\s+((BEGIN|END)\s+OF\s+((TABBED\s+)?BLOCK|LINE|'
|
1575
|
+
r'SCREEN)|COMMENT|FUNCTION\s+KEY|'
|
1576
|
+
r'INCLUDE\s+BLOCKS|POSITION|PUSHBUTTON|'
|
1577
|
+
r'SKIP|ULINE)|'
|
1578
|
+
r'LEAVE\s+(LIST-PROCESSING|PROGRAM|SCREEN|'
|
1579
|
+
r'TO LIST-PROCESSING|TO TRANSACTION)'
|
1580
|
+
r'(ENDING|STARTING)\s+AT|'
|
1581
|
+
r'FORMAT\s+(COLOR|INTENSIFIED|INVERSE|HOTSPOT|INPUT|FRAMES|RESET)|'
|
1582
|
+
r'AS\s+(CHECKBOX|SUBSCREEN|WINDOW)|'
|
1583
|
+
r'WITH\s+(((NON-)?UNIQUE)?\s+KEY|FRAME)|'
|
1584
|
+
r'(BEGIN|END)\s+OF|'
|
1585
|
+
r'DELETE(\s+ADJACENT\s+DUPLICATES\sFROM)?|'
|
1586
|
+
r'COMPARING(\s+ALL\s+FIELDS)?|'
|
1587
|
+
r'INSERT(\s+INITIAL\s+LINE\s+INTO|\s+LINES\s+OF)?|'
|
1588
|
+
r'IN\s+((BYTE|CHARACTER)\s+MODE|PROGRAM)|'
|
1589
|
+
r'END-OF-(DEFINITION|PAGE|SELECTION)|'
|
1590
|
+
r'WITH\s+FRAME(\s+TITLE)|'
|
1591
|
+
|
1592
|
+
# simple kombinations
|
1593
|
+
r'AND\s+(MARK|RETURN)|CLIENT\s+SPECIFIED|CORRESPONDING\s+FIELDS\s+OF|'
|
1594
|
+
r'IF\s+FOUND|FOR\s+EVENT|INHERITING\s+FROM|LEAVE\s+TO\s+SCREEN|'
|
1595
|
+
r'LOOP\s+AT\s+(SCREEN)?|LOWER\s+CASE|MATCHCODE\s+OBJECT|MODIF\s+ID|'
|
1596
|
+
r'MODIFY\s+SCREEN|NESTING\s+LEVEL|NO\s+INTERVALS|OF\s+STRUCTURE|'
|
1597
|
+
r'RADIOBUTTON\s+GROUP|RANGE\s+OF|REF\s+TO|SUPPRESS DIALOG|'
|
1598
|
+
r'TABLE\s+OF|UPPER\s+CASE|TRANSPORTING\s+NO\s+FIELDS|'
|
1599
|
+
r'VALUE\s+CHECK|VISIBLE\s+LENGTH|HEADER\s+LINE)\b', Keyword),
|
1600
|
+
|
1601
|
+
# single word keywords.
|
1602
|
+
(r'(^|(?<=(\s|\.)))(ABBREVIATED|ADD|ALIASES|APPEND|ASSERT|'
|
1603
|
+
r'ASSIGN(ING)?|AT(\s+FIRST)?|'
|
1604
|
+
r'BACK|BLOCK|BREAK-POINT|'
|
1605
|
+
r'CASE|CATCH|CHANGING|CHECK|CLASS|CLEAR|COLLECT|COLOR|COMMIT|'
|
1606
|
+
r'CREATE|COMMUNICATION|COMPONENTS?|COMPUTE|CONCATENATE|CONDENSE|'
|
1607
|
+
r'CONSTANTS|CONTEXTS|CONTINUE|CONTROLS|'
|
1608
|
+
r'DATA|DECIMALS|DEFAULT|DEFINE|DEFINITION|DEFERRED|DEMAND|'
|
1609
|
+
r'DETAIL|DIRECTORY|DIVIDE|DO|'
|
1610
|
+
r'ELSE(IF)?|ENDAT|ENDCASE|ENDCLASS|ENDDO|ENDFORM|ENDFUNCTION|'
|
1611
|
+
r'ENDIF|ENDLOOP|ENDMETHOD|ENDMODULE|ENDSELECT|ENDTRY|'
|
1612
|
+
r'ENHANCEMENT|EVENTS|EXCEPTIONS|EXIT|EXPORT|EXPORTING|EXTRACT|'
|
1613
|
+
r'FETCH|FIELDS?|FIND|FOR|FORM|FORMAT|FREE|FROM|'
|
1614
|
+
r'HIDE|'
|
1615
|
+
r'ID|IF|IMPORT|IMPLEMENTATION|IMPORTING|IN|INCLUDE|INCLUDING|'
|
1616
|
+
r'INDEX|INFOTYPES|INITIALIZATION|INTERFACE|INTERFACES|INTO|'
|
1617
|
+
r'LENGTH|LINES|LOAD|LOCAL|'
|
1618
|
+
r'JOIN|'
|
1619
|
+
r'KEY|'
|
1620
|
+
r'MAXIMUM|MESSAGE|METHOD[S]?|MINIMUM|MODULE|MODIFY|MOVE|MULTIPLY|'
|
1621
|
+
r'NODES|'
|
1622
|
+
r'OBLIGATORY|OF|OFF|ON|OVERLAY|'
|
1623
|
+
r'PACK|PARAMETERS|PERCENTAGE|POSITION|PROGRAM|PROVIDE|PUBLIC|PUT|'
|
1624
|
+
r'RAISE|RAISING|RANGES|READ|RECEIVE|REFRESH|REJECT|REPORT|RESERVE|'
|
1625
|
+
r'RESUME|RETRY|RETURN|RETURNING|RIGHT|ROLLBACK|'
|
1626
|
+
r'SCROLL|SEARCH|SELECT|SHIFT|SINGLE|SKIP|SORT|SPLIT|STATICS|STOP|'
|
1627
|
+
r'SUBMIT|SUBTRACT|SUM|SUMMARY|SUMMING|SUPPLY|'
|
1628
|
+
r'TABLE|TABLES|TIMES|TITLE|TO|TOP-OF-PAGE|TRANSFER|TRANSLATE|TRY|TYPES|'
|
1629
|
+
r'ULINE|UNDER|UNPACK|UPDATE|USING|'
|
1630
|
+
r'VALUE|VALUES|VIA|'
|
1631
|
+
r'WAIT|WHEN|WHERE|WHILE|WITH|WINDOW|WRITE)\b', Keyword),
|
1632
|
+
|
1633
|
+
# builtins
|
1634
|
+
(r'(abs|acos|asin|atan|'
|
1635
|
+
r'boolc|boolx|bit_set|'
|
1636
|
+
r'char_off|charlen|ceil|cmax|cmin|condense|contains|'
|
1637
|
+
r'contains_any_of|contains_any_not_of|concat_lines_of|cos|cosh|'
|
1638
|
+
r'count|count_any_of|count_any_not_of|'
|
1639
|
+
r'dbmaxlen|distance|'
|
1640
|
+
r'escape|exp|'
|
1641
|
+
r'find|find_end|find_any_of|find_any_not_of|floor|frac|from_mixed|'
|
1642
|
+
r'insert|'
|
1643
|
+
r'lines|log|log10|'
|
1644
|
+
r'match|matches|'
|
1645
|
+
r'nmax|nmin|numofchar|'
|
1646
|
+
r'repeat|replace|rescale|reverse|round|'
|
1647
|
+
r'segment|shift_left|shift_right|sign|sin|sinh|sqrt|strlen|'
|
1648
|
+
r'substring|substring_after|substring_from|substring_before|substring_to|'
|
1649
|
+
r'tan|tanh|to_upper|to_lower|to_mixed|translate|trunc|'
|
1650
|
+
r'xstrlen)(\()\b', bygroups(Name.Builtin, Punctuation)),
|
1651
|
+
|
1652
|
+
(r'&[0-9]', Name),
|
1653
|
+
(r'[0-9]+', Number.Integer),
|
1654
|
+
|
1655
|
+
# operators which look like variable names before
|
1656
|
+
# parsing variable names.
|
1657
|
+
(r'(?<=(\s|.))(AND|EQ|NE|GT|LT|GE|LE|CO|CN|CA|NA|CS|NOT|NS|CP|NP|'
|
1658
|
+
r'BYTE-CO|BYTE-CN|BYTE-CA|BYTE-NA|BYTE-CS|BYTE-NS|'
|
1659
|
+
r'IS\s+(NOT\s+)?(INITIAL|ASSIGNED|REQUESTED|BOUND))\b', Operator),
|
1660
|
+
|
1661
|
+
include('variable-names'),
|
1662
|
+
|
1663
|
+
# standard oparators after variable names,
|
1664
|
+
# because < and > are part of field symbols.
|
1665
|
+
(r'[?*<>=\-+]', Operator),
|
1666
|
+
(r"'(''|[^'])*'", String.Single),
|
1667
|
+
(r'[/;:()\[\],\.]', Punctuation)
|
1668
|
+
],
|
1669
|
+
}
|
1670
|
+
|
1671
|
+
|
1672
|
+
class NewspeakLexer(RegexLexer):
|
1673
|
+
"""
|
1674
|
+
For `Newspeak <http://newspeaklanguage.org/>` syntax.
|
1675
|
+
"""
|
1676
|
+
name = 'Newspeak'
|
1677
|
+
filenames = ['*.ns2']
|
1678
|
+
aliases = ['newspeak', ]
|
1679
|
+
mimetypes = ['text/x-newspeak']
|
1680
|
+
|
1681
|
+
tokens = {
|
1682
|
+
'root' : [
|
1683
|
+
(r'\b(Newsqueak2)\b',Keyword.Declaration),
|
1684
|
+
(r"'[^']*'",String),
|
1685
|
+
(r'\b(class)(\s+)([a-zA-Z0-9_]+)(\s*)',
|
1686
|
+
bygroups(Keyword.Declaration,Text,Name.Class,Text)),
|
1687
|
+
(r'\b(mixin|self|super|private|public|protected|nil|true|false)\b',
|
1688
|
+
Keyword),
|
1689
|
+
(r'([a-zA-Z0-9_]+\:)(\s*)([a-zA-Z_]\w+)',
|
1690
|
+
bygroups(Name.Function,Text,Name.Variable)),
|
1691
|
+
(r'([a-zA-Z0-9_]+)(\s*)(=)',
|
1692
|
+
bygroups(Name.Attribute,Text,Operator)),
|
1693
|
+
(r'<[a-zA-Z0-9_]+>', Comment.Special),
|
1694
|
+
include('expressionstat'),
|
1695
|
+
include('whitespace')
|
1696
|
+
],
|
1697
|
+
|
1698
|
+
'expressionstat': [
|
1699
|
+
(r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
|
1700
|
+
(r'\d+', Number.Integer),
|
1701
|
+
(r':\w+',Name.Variable),
|
1702
|
+
(r'(\w+)(::)', bygroups(Name.Variable, Operator)),
|
1703
|
+
(r'\w+:', Name.Function),
|
1704
|
+
(r'\w+', Name.Variable),
|
1705
|
+
(r'\(|\)', Punctuation),
|
1706
|
+
(r'\[|\]', Punctuation),
|
1707
|
+
(r'\{|\}', Punctuation),
|
1708
|
+
|
1709
|
+
(r'(\^|\+|\/|~|\*|<|>|=|@|%|\||&|\?|!|,|-|:)', Operator),
|
1710
|
+
(r'\.|;', Punctuation),
|
1711
|
+
include('whitespace'),
|
1712
|
+
include('literals'),
|
1713
|
+
],
|
1714
|
+
'literals': [
|
1715
|
+
(r'\$.', String),
|
1716
|
+
(r"'[^']*'", String),
|
1717
|
+
(r"#'[^']*'", String.Symbol),
|
1718
|
+
(r"#\w+:?", String.Symbol),
|
1719
|
+
(r"#(\+|\/|~|\*|<|>|=|@|%|\||&|\?|!|,|-)+", String.Symbol)
|
1720
|
+
|
1721
|
+
],
|
1722
|
+
'whitespace' : [
|
1723
|
+
(r'\s+', Text),
|
1724
|
+
(r'"[^"]*"', Comment)
|
1725
|
+
]
|
1726
|
+
}
|
1727
|
+
|
1728
|
+
class GherkinLexer(RegexLexer):
|
1729
|
+
"""
|
1730
|
+
For `Gherkin <http://github.com/aslakhellesoy/gherkin/>` syntax.
|
1731
|
+
|
1732
|
+
*New in Pygments 1.2.*
|
1733
|
+
"""
|
1734
|
+
name = 'Gherkin'
|
1735
|
+
aliases = ['Cucumber', 'cucumber', 'Gherkin', 'gherkin']
|
1736
|
+
filenames = ['*.feature']
|
1737
|
+
mimetypes = ['text/x-gherkin']
|
1738
|
+
|
1739
|
+
feature_keywords = ur'^(기능|機能|功能|フィーチャ|خاصية|תכונה|Функціонал|Функционалност|Функционал|Фича|Особина|Могућност|Özellik|Właściwość|Tính năng|Trajto|Savybė|Požiadavka|Požadavek|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Fīča|Funzionalità|Funktionalität|Funkcionalnost|Funkcionalitāte|Funcționalitate|Functionaliteit|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Feature|Egenskap|Egenskab|Crikey|Característica|Arwedd)(:)(.*)$'
|
1740
|
+
feature_element_keywords = ur'^(\s*)(시나리오 개요|시나리오|배경|背景|場景大綱|場景|场景大纲|场景|劇本大綱|劇本|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|シナリオ|سيناريو مخطط|سيناريو|الخلفية|תרחיש|תבנית תרחיש|רקע|Тарих|Сценарій|Сценарио|Сценарий структураси|Сценарий|Структура сценарію|Структура сценарија|Структура сценария|Скица|Рамка на сценарий|Пример|Предыстория|Предистория|Позадина|Передумова|Основа|Концепт|Контекст|Założenia|Wharrimean is|Tình huống|The thing of it is|Tausta|Taust|Tapausaihio|Tapaus|Szenariogrundriss|Szenario|Szablon scenariusza|Stsenaarium|Struktura scenarija|Skica|Skenario konsep|Skenario|Situācija|Senaryo taslağı|Senaryo|Scénář|Scénario|Schema dello scenario|Scenārijs pēc parauga|Scenārijs|Scenár|Scenaro|Scenariusz|Scenariul de şablon|Scenariul de sablon|Scenariu|Scenario Outline|Scenario Amlinellol|Scenario|Scenarijus|Scenarijaus šablonas|Scenarij|Scenarie|Rerefons|Raamstsenaarium|Primer|Pozadí|Pozadina|Pozadie|Plan du scénario|Plan du Scénario|Osnova scénáře|Osnova|Náčrt Scénáře|Náčrt Scenáru|Mate|MISHUN SRSLY|MISHUN|Kịch bản|Konturo de la scenaro|Kontext|Konteksts|Kontekstas|Kontekst|Koncept|Khung tình huống|Khung kịch bản|Háttér|Grundlage|Geçmiş|Forgatókönyv vázlat|Forgatókönyv|Fono|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l\'escenari|Escenario|Escenari|Dis is what went down|Dasar|Contexto|Contexte|Contesto|Condiţii|Conditii|Cenário|Cenario|Cefndir|Bối cảnh|Blokes|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|All y\'all|Achtergrond|Abstrakt Scenario|Abstract Scenario)(:)(.*)$'
|
1741
|
+
examples_keywords = ur'^(\s*)(예|例子|例|サンプル|امثلة|דוגמאות|Сценарији|Примери|Приклади|Мисоллар|Значения|Örnekler|Voorbeelden|Variantai|Tapaukset|Scenarios|Scenariji|Scenarijai|Příklady|Példák|Príklady|Przykłady|Primjeri|Primeri|Piemēri|Pavyzdžiai|Paraugs|Juhtumid|Exemplos|Exemples|Exemplele|Exempel|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|EXAMPLZ|Dữ liệu|Contoh|Cobber|Beispiele)(:)(.*)$'
|
1742
|
+
step_keywords = ur'^(\s*)(하지만|조건|먼저|만일|만약|단|그리고|그러면|那麼|那么|而且|當|当|前提|假設|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|و |متى |لكن |عندما |ثم |بفرض |اذاً |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Унда |То |Припустимо, що |Припустимо |Онда |Но |Нехай |Лекин |Когато |Када |Кад |К тому же |И |Задато |Задати |Задате |Если |Допустим |Дадено |Ва |Бирок |Аммо |Али |Але |Агар |А |І |Și |És |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Youse know when youse got |Youse know like when |Yna |Ya know how |Ya gotta |Y |Wun |Wtedy |When y\'all |When |Wenn |WEN |Và |Ve |Und |Un |Thì |Then y\'all |Then |Tapi |Tak |Tada |Tad |Så |Stel |Soit |Siis |Si |Sed |Se |Quando |Quand |Quan |Pryd |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Når |När |Niin |Nhưng |N |Mutta |Men |Mas |Maka |Majd |Mais |Maar |Ma |Lorsque |Lorsqu\'|Kun |Kuid |Kui |Khi |Keď |Ketika |Když |Kaj |Kai |Kada |Kad |Jeżeli |Ja |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y\'all |Given |Gitt |Gegeven |Gegeben sei |Fakat |Eğer ki |Etant donné |Et |Então |Entonces |Entao |En |Eeldades |E |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Dengan |Den youse gotta |De |Dato |Dar |Dann |Dan |Dado |Dacă |Daca |DEN |Când |Cuando |Cho |Cept |Cand |Cal |But y\'all |But |Buh |Biết |Bet |BUT |Atès |Atunci |Atesa |Anrhegedig a |Angenommen |And y\'all |And |An |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Aber |AN |A také |A |\* )'
|
1743
|
+
|
1744
|
+
tokens = {
|
1745
|
+
'comments': [
|
1746
|
+
(r'#.*$', Comment),
|
1747
|
+
],
|
1748
|
+
'feature_elements' : [
|
1749
|
+
(step_keywords, Keyword, "step_content_stack"),
|
1750
|
+
include('comments'),
|
1751
|
+
(r"(\s|.)", Name.Function),
|
1752
|
+
],
|
1753
|
+
'feature_elements_on_stack' : [
|
1754
|
+
(step_keywords, Keyword, "#pop:2"),
|
1755
|
+
include('comments'),
|
1756
|
+
(r"(\s|.)", Name.Function),
|
1757
|
+
],
|
1758
|
+
'examples_table': [
|
1759
|
+
(r"\s+\|", Keyword, 'examples_table_header'),
|
1760
|
+
include('comments'),
|
1761
|
+
(r"(\s|.)", Name.Function),
|
1762
|
+
],
|
1763
|
+
'examples_table_header': [
|
1764
|
+
(r"\s+\|\s*$", Keyword, "#pop:2"),
|
1765
|
+
include('comments'),
|
1766
|
+
(r"\s*\|", Keyword),
|
1767
|
+
(r"[^\|]", Name.Variable),
|
1768
|
+
],
|
1769
|
+
'scenario_sections_on_stack': [
|
1770
|
+
(feature_element_keywords, bygroups(Name.Function, Keyword, Keyword, Name.Function), "feature_elements_on_stack"),
|
1771
|
+
],
|
1772
|
+
'narrative': [
|
1773
|
+
include('scenario_sections_on_stack'),
|
1774
|
+
(r"(\s|.)", Name.Function),
|
1775
|
+
],
|
1776
|
+
'table_vars': [
|
1777
|
+
(r'(<[^>]+>)', Name.Variable),
|
1778
|
+
],
|
1779
|
+
'numbers': [
|
1780
|
+
(r'(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', String),
|
1781
|
+
],
|
1782
|
+
'string': [
|
1783
|
+
include('table_vars'),
|
1784
|
+
(r'(\s|.)', String),
|
1785
|
+
],
|
1786
|
+
'py_string': [
|
1787
|
+
(r'"""', Keyword, "#pop"),
|
1788
|
+
include('string'),
|
1789
|
+
],
|
1790
|
+
'step_content_root':[
|
1791
|
+
(r"$", Keyword, "#pop"),
|
1792
|
+
include('step_content'),
|
1793
|
+
],
|
1794
|
+
'step_content_stack':[
|
1795
|
+
(r"$", Keyword, "#pop:2"),
|
1796
|
+
include('step_content'),
|
1797
|
+
],
|
1798
|
+
'step_content':[
|
1799
|
+
(r'"', Name.Function, "double_string"),
|
1800
|
+
include('table_vars'),
|
1801
|
+
include('numbers'),
|
1802
|
+
include('comments'),
|
1803
|
+
(r'(\s|.)', Name.Function),
|
1804
|
+
],
|
1805
|
+
'table_content': [
|
1806
|
+
(r"\s+\|\s*$", Keyword, "#pop"),
|
1807
|
+
include('comments'),
|
1808
|
+
(r"\s*\|", Keyword),
|
1809
|
+
include('string'),
|
1810
|
+
],
|
1811
|
+
'double_string': [
|
1812
|
+
(r'"', Name.Function, "#pop"),
|
1813
|
+
include('string'),
|
1814
|
+
],
|
1815
|
+
'root': [
|
1816
|
+
(r'\n', Name.Function),
|
1817
|
+
include('comments'),
|
1818
|
+
(r'"""', Keyword, "py_string"),
|
1819
|
+
(r'\s+\|', Keyword, 'table_content'),
|
1820
|
+
(r'"', Name.Function, "double_string"),
|
1821
|
+
include('table_vars'),
|
1822
|
+
include('numbers'),
|
1823
|
+
(r'(\s*)(@[^@\r\n\t ]+)', bygroups(Name.Function, Name.Tag)),
|
1824
|
+
(step_keywords, bygroups(Name.Function, Keyword), "step_content_root"),
|
1825
|
+
(feature_keywords, bygroups(Keyword, Keyword, Name.Function), 'narrative'),
|
1826
|
+
(feature_element_keywords, bygroups(Name.Function, Keyword, Keyword, Name.Function), "feature_elements"),
|
1827
|
+
(examples_keywords, bygroups(Name.Function, Keyword, Keyword, Name.Function), "examples_table"),
|
1828
|
+
(r'(\s|.)', Name.Function),
|
1829
|
+
]
|
1830
|
+
}
|
1831
|
+
|
1832
|
+
class AsymptoteLexer(RegexLexer):
|
1833
|
+
"""
|
1834
|
+
For `Asymptote <http://asymptote.sf.net/>`_ source code.
|
1835
|
+
|
1836
|
+
*New in Pygments 1.2.*
|
1837
|
+
"""
|
1838
|
+
name = 'Asymptote'
|
1839
|
+
aliases = ['asy', 'asymptote']
|
1840
|
+
filenames = ['*.asy']
|
1841
|
+
mimetypes = ['text/x-asymptote']
|
1842
|
+
|
1843
|
+
#: optional Comment or Whitespace
|
1844
|
+
_ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+'
|
1845
|
+
|
1846
|
+
tokens = {
|
1847
|
+
'whitespace': [
|
1848
|
+
(r'\n', Text),
|
1849
|
+
(r'\s+', Text),
|
1850
|
+
(r'\\\n', Text), # line continuation
|
1851
|
+
(r'//(\n|(.|\n)*?[^\\]\n)', Comment),
|
1852
|
+
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment),
|
1853
|
+
],
|
1854
|
+
'statements': [
|
1855
|
+
# simple string (TeX friendly)
|
1856
|
+
(r'"(\\\\|\\"|[^"])*"', String),
|
1857
|
+
# C style string (with character escapes)
|
1858
|
+
(r"'", String, 'string'),
|
1859
|
+
(r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?', Number.Float),
|
1860
|
+
(r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
|
1861
|
+
(r'0x[0-9a-fA-F]+[Ll]?', Number.Hex),
|
1862
|
+
(r'0[0-7]+[Ll]?', Number.Oct),
|
1863
|
+
(r'\d+[Ll]?', Number.Integer),
|
1864
|
+
(r'[~!%^&*+=|?:<>/-]', Operator),
|
1865
|
+
(r'[()\[\],.]', Punctuation),
|
1866
|
+
(r'\b(case)(.+?)(:)', bygroups(Keyword, using(this), Text)),
|
1867
|
+
(r'(and|controls|tension|atleast|curl|if|else|while|for|do|'
|
1868
|
+
r'return|break|continue|struct|typedef|new|access|import|'
|
1869
|
+
r'unravel|from|include|quote|static|public|private|restricted|'
|
1870
|
+
r'this|explicit|true|false|null|cycle|newframe|operator)\b', Keyword),
|
1871
|
+
# Since an asy-type-name can be also an asy-function-name,
|
1872
|
+
# in the following we test if the string " [a-zA-Z]" follows
|
1873
|
+
# the Keyword.Type.
|
1874
|
+
# Of course it is not perfect !
|
1875
|
+
(r'(Braid|FitResult|Label|Legend|TreeNode|abscissa|arc|arrowhead|'
|
1876
|
+
r'binarytree|binarytreeNode|block|bool|bool3|bounds|bqe|circle|'
|
1877
|
+
r'conic|coord|coordsys|cputime|ellipse|file|filltype|frame|grid3|'
|
1878
|
+
r'guide|horner|hsv|hyperbola|indexedTransform|int|inversion|key|'
|
1879
|
+
r'light|line|linefit|marginT|marker|mass|object|pair|parabola|path|'
|
1880
|
+
r'path3|pen|picture|point|position|projection|real|revolution|'
|
1881
|
+
r'scaleT|scientific|segment|side|slice|splitface|string|surface|'
|
1882
|
+
r'tensionSpecifier|ticklocate|ticksgridT|tickvalues|transform|'
|
1883
|
+
r'transformation|tree|triangle|trilinear|triple|vector|'
|
1884
|
+
r'vertex|void)(?=([ ]{1,}[a-zA-Z]))', Keyword.Type),
|
1885
|
+
# Now the asy-type-name which are not asy-function-name
|
1886
|
+
# except yours !
|
1887
|
+
# Perhaps useless
|
1888
|
+
(r'(Braid|FitResult|TreeNode|abscissa|arrowhead|block|bool|bool3|'
|
1889
|
+
r'bounds|coord|frame|guide|horner|int|linefit|marginT|pair|pen|'
|
1890
|
+
r'picture|position|real|revolution|slice|splitface|ticksgridT|'
|
1891
|
+
r'tickvalues|tree|triple|vertex|void)\b', Keyword.Type),
|
1892
|
+
('[a-zA-Z_][a-zA-Z0-9_]*:(?!:)', Name.Label),
|
1893
|
+
('[a-zA-Z_][a-zA-Z0-9_]*', Name),
|
1894
|
+
],
|
1895
|
+
'root': [
|
1896
|
+
include('whitespace'),
|
1897
|
+
# functions
|
1898
|
+
(r'((?:[a-zA-Z0-9_*\s])+?(?:\s|[*]))' # return arguments
|
1899
|
+
r'([a-zA-Z_][a-zA-Z0-9_]*)' # method name
|
1900
|
+
r'(\s*\([^;]*?\))' # signature
|
1901
|
+
r'(' + _ws + r')({)',
|
1902
|
+
bygroups(using(this), Name.Function, using(this), using(this),
|
1903
|
+
Punctuation),
|
1904
|
+
'function'),
|
1905
|
+
# function declarations
|
1906
|
+
(r'((?:[a-zA-Z0-9_*\s])+?(?:\s|[*]))' # return arguments
|
1907
|
+
r'([a-zA-Z_][a-zA-Z0-9_]*)' # method name
|
1908
|
+
r'(\s*\([^;]*?\))' # signature
|
1909
|
+
r'(' + _ws + r')(;)',
|
1910
|
+
bygroups(using(this), Name.Function, using(this), using(this),
|
1911
|
+
Punctuation)),
|
1912
|
+
('', Text, 'statement'),
|
1913
|
+
],
|
1914
|
+
'statement' : [
|
1915
|
+
include('whitespace'),
|
1916
|
+
include('statements'),
|
1917
|
+
('[{}]', Punctuation),
|
1918
|
+
(';', Punctuation, '#pop'),
|
1919
|
+
],
|
1920
|
+
'function': [
|
1921
|
+
include('whitespace'),
|
1922
|
+
include('statements'),
|
1923
|
+
(';', Punctuation),
|
1924
|
+
('{', Punctuation, '#push'),
|
1925
|
+
('}', Punctuation, '#pop'),
|
1926
|
+
],
|
1927
|
+
'string': [
|
1928
|
+
(r"'", String, '#pop'),
|
1929
|
+
(r'\\([\\abfnrtv"\'?]|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
|
1930
|
+
(r'\n', String),
|
1931
|
+
(r"[^\\'\n]+", String), # all other characters
|
1932
|
+
(r'\\\n', String),
|
1933
|
+
(r'\\n', String), # line continuation
|
1934
|
+
(r'\\', String), # stray backslash
|
1935
|
+
]
|
1936
|
+
}
|
1937
|
+
|
1938
|
+
def get_tokens_unprocessed(self, text):
|
1939
|
+
from pygments.lexers._asybuiltins import ASYFUNCNAME, ASYVARNAME
|
1940
|
+
for index, token, value in \
|
1941
|
+
RegexLexer.get_tokens_unprocessed(self, text):
|
1942
|
+
if token is Name and value in ASYFUNCNAME:
|
1943
|
+
token = Name.Function
|
1944
|
+
elif token is Name and value in ASYVARNAME:
|
1945
|
+
token = Name.Variable
|
1946
|
+
yield index, token, value
|
1947
|
+
|
1948
|
+
|
1949
|
+
class PostScriptLexer(RegexLexer):
|
1950
|
+
"""
|
1951
|
+
Lexer for PostScript files.
|
1952
|
+
|
1953
|
+
The PostScript Language Reference published by Adobe at
|
1954
|
+
<http://partners.adobe.com/public/developer/en/ps/PLRM.pdf>
|
1955
|
+
is the authority for this.
|
1956
|
+
|
1957
|
+
*New in Pygments 1.4.*
|
1958
|
+
"""
|
1959
|
+
name = 'PostScript'
|
1960
|
+
aliases = ['postscript']
|
1961
|
+
filenames = ['*.ps', '*.eps']
|
1962
|
+
mimetypes = ['application/postscript']
|
1963
|
+
|
1964
|
+
delimiter = r'\(\)\<\>\[\]\{\}\/\%\s'
|
1965
|
+
delimiter_end = r'(?=[%s])' % delimiter
|
1966
|
+
|
1967
|
+
valid_name_chars = r'[^%s]' % delimiter
|
1968
|
+
valid_name = r"%s+%s" % (valid_name_chars, delimiter_end)
|
1969
|
+
|
1970
|
+
tokens = {
|
1971
|
+
'root': [
|
1972
|
+
# All comment types
|
1973
|
+
(r'^%!.+\n', Comment.Preproc),
|
1974
|
+
(r'%%.*\n', Comment.Special),
|
1975
|
+
(r'(^%.*\n){2,}', Comment.Multiline),
|
1976
|
+
(r'%.*\n', Comment.Single),
|
1977
|
+
|
1978
|
+
# String literals are awkward; enter separate state.
|
1979
|
+
(r'\(', String, 'stringliteral'),
|
1980
|
+
|
1981
|
+
(r'[\{\}(\<\<)(\>\>)\[\]]', Punctuation),
|
1982
|
+
|
1983
|
+
# Numbers
|
1984
|
+
(r'<[0-9A-Fa-f]+>' + delimiter_end, Number.Hex),
|
1985
|
+
# Slight abuse: use Oct to signify any explicit base system
|
1986
|
+
(r'[0-9]+\#(\-|\+)?([0-9]+\.?|[0-9]*\.[0-9]+|[0-9]+\.[0-9]*)'
|
1987
|
+
r'((e|E)[0-9]+)?' + delimiter_end, Number.Oct),
|
1988
|
+
(r'(\-|\+)?([0-9]+\.?|[0-9]*\.[0-9]+|[0-9]+\.[0-9]*)((e|E)[0-9]+)?'
|
1989
|
+
+ delimiter_end, Number.Float),
|
1990
|
+
(r'(\-|\+)?[0-9]+' + delimiter_end, Number.Integer),
|
1991
|
+
|
1992
|
+
# References
|
1993
|
+
(r'\/%s' % valid_name, Name.Variable),
|
1994
|
+
|
1995
|
+
# Names
|
1996
|
+
(valid_name, Name.Function), # Anything else is executed
|
1997
|
+
|
1998
|
+
# These keywords taken from
|
1999
|
+
# <http://www.math.ubc.ca/~cass/graphics/manual/pdf/a1.pdf>
|
2000
|
+
# Is there an authoritative list anywhere that doesn't involve
|
2001
|
+
# trawling documentation?
|
2002
|
+
|
2003
|
+
(r'(false|true)' + delimiter_end, Keyword.Constant),
|
2004
|
+
|
2005
|
+
# Conditionals / flow control
|
2006
|
+
(r'(eq|ne|ge|gt|le|lt|and|or|not|if|ifelse|for|forall)'
|
2007
|
+
+ delimiter_end, Keyword.Reserved),
|
2008
|
+
|
2009
|
+
('(abs|add|aload|arc|arcn|array|atan|begin|bind|ceiling|charpath|'
|
2010
|
+
'clip|closepath|concat|concatmatrix|copy|cos|currentlinewidth|'
|
2011
|
+
'currentmatrix|currentpoint|curveto|cvi|cvs|def|defaultmatrix|'
|
2012
|
+
'dict|dictstackoverflow|div|dtransform|dup|end|exch|exec|exit|exp|'
|
2013
|
+
'fill|findfont|floor|get|getinterval|grestore|gsave|gt|'
|
2014
|
+
'identmatrix|idiv|idtransform|index|invertmatrix|itransform|'
|
2015
|
+
'length|lineto|ln|load|log|loop|matrix|mod|moveto|mul|neg|newpath|'
|
2016
|
+
'pathforall|pathbbox|pop|print|pstack|put|quit|rand|rangecheck|'
|
2017
|
+
'rcurveto|repeat|restore|rlineto|rmoveto|roll|rotate|round|run|'
|
2018
|
+
'save|scale|scalefont|setdash|setfont|setgray|setlinecap|'
|
2019
|
+
'setlinejoin|setlinewidth|setmatrix|setrgbcolor|shfill|show|'
|
2020
|
+
'showpage|sin|sqrt|stack|stringwidth|stroke|strokepath|sub|'
|
2021
|
+
'syntaxerror|transform|translate|truncate|typecheck|undefined|'
|
2022
|
+
'undefinedfilename|undefinedresult)' + delimiter_end,
|
2023
|
+
Name.Builtin),
|
2024
|
+
|
2025
|
+
(r'\s+', Text),
|
2026
|
+
],
|
2027
|
+
|
2028
|
+
'stringliteral': [
|
2029
|
+
(r'[^\(\)\\]+', String),
|
2030
|
+
(r'\\', String.Escape, 'escape'),
|
2031
|
+
(r'\(', String, '#push'),
|
2032
|
+
(r'\)', String, '#pop'),
|
2033
|
+
],
|
2034
|
+
|
2035
|
+
'escape': [
|
2036
|
+
(r'([0-8]{3}|n|r|t|b|f|\\|\(|\))?', String.Escape, '#pop'),
|
2037
|
+
],
|
2038
|
+
}
|
2039
|
+
|
2040
|
+
|
2041
|
+
class AutohotkeyLexer(RegexLexer):
|
2042
|
+
"""
|
2043
|
+
For `autohotkey <http://www.autohotkey.com/>`_ source code.
|
2044
|
+
|
2045
|
+
*New in Pygments 1.4.*
|
2046
|
+
"""
|
2047
|
+
name = 'autohotkey'
|
2048
|
+
aliases = ['ahk']
|
2049
|
+
filenames = ['*.ahk', '*.ahkl']
|
2050
|
+
mimetypes = ['text/x-autohotkey']
|
2051
|
+
|
2052
|
+
tokens = {
|
2053
|
+
'root': [
|
2054
|
+
(r'^(\s*)(/\*)', bygroups(Text, Comment.Multiline),
|
2055
|
+
'incomment'),
|
2056
|
+
(r'^(\s*)(\()', bygroups(Text, Generic), 'incontinuation'),
|
2057
|
+
(r'\s+;.*?$', Comment.Singleline),
|
2058
|
+
(r'^;.*?$', Comment.Singleline),
|
2059
|
+
(r'[]{}(),;[]', Punctuation),
|
2060
|
+
(r'(in|is|and|or|not)\b', Operator.Word),
|
2061
|
+
(r'\%[a-zA-Z_#@$][a-zA-Z0-9_#@$]*\%', Name.Variable),
|
2062
|
+
(r'!=|==|:=|\.=|<<|>>|[-~+/*%=<>&^|?:!.]', Operator),
|
2063
|
+
include('commands'),
|
2064
|
+
include('labels'),
|
2065
|
+
include('builtInFunctions'),
|
2066
|
+
include('builtInVariables'),
|
2067
|
+
(r'"', String, combined('stringescape', 'dqs')),
|
2068
|
+
include('numbers'),
|
2069
|
+
(r'[a-zA-Z_#@$][a-zA-Z0-9_#@$]*', Name),
|
2070
|
+
(r'\\|\'', Text),
|
2071
|
+
(r'\`([\,\%\`abfnrtv\-\+;])', String.Escape),
|
2072
|
+
include('garbage'),
|
2073
|
+
],
|
2074
|
+
'incomment': [
|
2075
|
+
(r'^\s*\*/', Comment.Multiline, '#pop'),
|
2076
|
+
(r'[^*/]', Comment.Multiline),
|
2077
|
+
(r'[*/]', Comment.Multiline)
|
2078
|
+
],
|
2079
|
+
'incontinuation': [
|
2080
|
+
(r'^\s*\)', Generic, '#pop'),
|
2081
|
+
(r'[^)]', Generic),
|
2082
|
+
(r'[)]', Generic),
|
2083
|
+
],
|
2084
|
+
'commands': [
|
2085
|
+
(r'(?i)^(\s*)(global|local|static|'
|
2086
|
+
r'#AllowSameLineComments|#ClipboardTimeout|#CommentFlag|'
|
2087
|
+
r'#ErrorStdOut|#EscapeChar|#HotkeyInterval|#HotkeyModifierTimeout|'
|
2088
|
+
r'#Hotstring|#IfWinActive|#IfWinExist|#IfWinNotActive|'
|
2089
|
+
r'#IfWinNotExist|#IncludeAgain|#Include|#InstallKeybdHook|'
|
2090
|
+
r'#InstallMouseHook|#KeyHistory|#LTrim|#MaxHotkeysPerInterval|'
|
2091
|
+
r'#MaxMem|#MaxThreads|#MaxThreadsBuffer|#MaxThreadsPerHotkey|'
|
2092
|
+
r'#NoEnv|#NoTrayIcon|#Persistent|#SingleInstance|#UseHook|'
|
2093
|
+
r'#WinActivateForce|AutoTrim|BlockInput|Break|Click|ClipWait|'
|
2094
|
+
r'Continue|Control|ControlClick|ControlFocus|ControlGetFocus|'
|
2095
|
+
r'ControlGetPos|ControlGetText|ControlGet|ControlMove|ControlSend|'
|
2096
|
+
r'ControlSendRaw|ControlSetText|CoordMode|Critical|'
|
2097
|
+
r'DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|'
|
2098
|
+
r'DriveSpaceFree|Edit|Else|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|'
|
2099
|
+
r'EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|'
|
2100
|
+
r'FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|'
|
2101
|
+
r'FileDelete|FileGetAttrib|FileGetShortcut|FileGetSize|'
|
2102
|
+
r'FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|'
|
2103
|
+
r'FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|'
|
2104
|
+
r'FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|'
|
2105
|
+
r'FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|'
|
2106
|
+
r'GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|'
|
2107
|
+
r'GuiControlGet|Hotkey|IfEqual|IfExist|IfGreaterOrEqual|IfGreater|'
|
2108
|
+
r'IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|'
|
2109
|
+
r'IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|'
|
2110
|
+
r'IfWinNotExist|If |ImageSearch|IniDelete|IniRead|IniWrite|'
|
2111
|
+
r'InputBox|Input|KeyHistory|KeyWait|ListHotkeys|ListLines|'
|
2112
|
+
r'ListVars|Loop|Menu|MouseClickDrag|MouseClick|MouseGetPos|'
|
2113
|
+
r'MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|'
|
2114
|
+
r'PixelSearch|PostMessage|Process|Progress|Random|RegDelete|'
|
2115
|
+
r'RegRead|RegWrite|Reload|Repeat|Return|RunAs|RunWait|Run|'
|
2116
|
+
r'SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|Send|'
|
2117
|
+
r'SetBatchLines|SetCapslockState|SetControlDelay|'
|
2118
|
+
r'SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|'
|
2119
|
+
r'SetMouseDelay|SetNumlockState|SetScrollLockState|'
|
2120
|
+
r'SetStoreCapslockMode|SetTimer|SetTitleMatchMode|'
|
2121
|
+
r'SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|'
|
2122
|
+
r'SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|'
|
2123
|
+
r'SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|'
|
2124
|
+
r'SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|'
|
2125
|
+
r'StringGetPos|StringLeft|StringLen|StringLower|StringMid|'
|
2126
|
+
r'StringReplace|StringRight|StringSplit|StringTrimLeft|'
|
2127
|
+
r'StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|'
|
2128
|
+
r'Transform|TrayTip|URLDownloadToFile|While|WinActivate|'
|
2129
|
+
r'WinActivateBottom|WinClose|WinGetActiveStats|WinGetActiveTitle|'
|
2130
|
+
r'WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinGet|WinHide|'
|
2131
|
+
r'WinKill|WinMaximize|WinMenuSelectItem|WinMinimizeAllUndo|'
|
2132
|
+
r'WinMinimizeAll|WinMinimize|WinMove|WinRestore|WinSetTitle|'
|
2133
|
+
r'WinSet|WinShow|WinWaitActive|WinWaitClose|WinWaitNotActive|'
|
2134
|
+
r'WinWait)\b', bygroups(Text, Name.Builtin)),
|
2135
|
+
],
|
2136
|
+
'builtInFunctions': [
|
2137
|
+
(r'(?i)(Abs|ACos|Asc|ASin|ATan|Ceil|Chr|Cos|DllCall|Exp|FileExist|'
|
2138
|
+
r'Floor|GetKeyState|IL_Add|IL_Create|IL_Destroy|InStr|IsFunc|'
|
2139
|
+
r'IsLabel|Ln|Log|LV_Add|LV_Delete|LV_DeleteCol|LV_GetCount|'
|
2140
|
+
r'LV_GetNext|LV_GetText|LV_Insert|LV_InsertCol|LV_Modify|'
|
2141
|
+
r'LV_ModifyCol|LV_SetImageList|Mod|NumGet|NumPut|OnMessage|'
|
2142
|
+
r'RegExMatch|RegExReplace|RegisterCallback|Round|SB_SetIcon|'
|
2143
|
+
r'SB_SetParts|SB_SetText|Sin|Sqrt|StrLen|SubStr|Tan|TV_Add|'
|
2144
|
+
r'TV_Delete|TV_GetChild|TV_GetCount|TV_GetNext|TV_Get|'
|
2145
|
+
r'TV_GetParent|TV_GetPrev|TV_GetSelection|TV_GetText|TV_Modify|'
|
2146
|
+
r'VarSetCapacity|WinActive|WinExist|Object|ComObjActive|'
|
2147
|
+
r'ComObjArray|ComObjEnwrap|ComObjUnwrap|ComObjParameter|'
|
2148
|
+
r'ComObjType|ComObjConnect|ComObjCreate|ComObjGet|ComObjError|'
|
2149
|
+
r'ComObjValue|Insert|MinIndex|MaxIndex|Remove|SetCapacity|'
|
2150
|
+
r'GetCapacity|GetAddress|_NewEnum|FileOpen|Read|Write|ReadLine|'
|
2151
|
+
r'WriteLine|ReadNumType|WriteNumType|RawRead|RawWrite|Seek|Tell|'
|
2152
|
+
r'Close|Next|IsObject|StrPut|StrGet|Trim|LTrim|RTrim)\b',
|
2153
|
+
Name.Function),
|
2154
|
+
],
|
2155
|
+
'builtInVariables': [
|
2156
|
+
(r'(?i)(A_AhkPath|A_AhkVersion|A_AppData|A_AppDataCommon|'
|
2157
|
+
r'A_AutoTrim|A_BatchLines|A_CaretX|A_CaretY|A_ComputerName|'
|
2158
|
+
r'A_ControlDelay|A_Cursor|A_DDDD|A_DDD|A_DD|A_DefaultMouseSpeed|'
|
2159
|
+
r'A_Desktop|A_DesktopCommon|A_DetectHiddenText|'
|
2160
|
+
r'A_DetectHiddenWindows|A_EndChar|A_EventInfo|A_ExitReason|'
|
2161
|
+
r'A_FormatFloat|A_FormatInteger|A_Gui|A_GuiEvent|A_GuiControl|'
|
2162
|
+
r'A_GuiControlEvent|A_GuiHeight|A_GuiWidth|A_GuiX|A_GuiY|A_Hour|'
|
2163
|
+
r'A_IconFile|A_IconHidden|A_IconNumber|A_IconTip|A_Index|'
|
2164
|
+
r'A_IPAddress1|A_IPAddress2|A_IPAddress3|A_IPAddress4|A_ISAdmin|'
|
2165
|
+
r'A_IsCompiled|A_IsCritical|A_IsPaused|A_IsSuspended|A_KeyDelay|'
|
2166
|
+
r'A_Language|A_LastError|A_LineFile|A_LineNumber|A_LoopField|'
|
2167
|
+
r'A_LoopFileAttrib|A_LoopFileDir|A_LoopFileExt|A_LoopFileFullPath|'
|
2168
|
+
r'A_LoopFileLongPath|A_LoopFileName|A_LoopFileShortName|'
|
2169
|
+
r'A_LoopFileShortPath|A_LoopFileSize|A_LoopFileSizeKB|'
|
2170
|
+
r'A_LoopFileSizeMB|A_LoopFileTimeAccessed|A_LoopFileTimeCreated|'
|
2171
|
+
r'A_LoopFileTimeModified|A_LoopReadLine|A_LoopRegKey|'
|
2172
|
+
r'A_LoopRegName|A_LoopRegSubkey|A_LoopRegTimeModified|'
|
2173
|
+
r'A_LoopRegType|A_MDAY|A_Min|A_MM|A_MMM|A_MMMM|A_Mon|A_MouseDelay|'
|
2174
|
+
r'A_MSec|A_MyDocuments|A_Now|A_NowUTC|A_NumBatchLines|A_OSType|'
|
2175
|
+
r'A_OSVersion|A_PriorHotkey|A_ProgramFiles|A_Programs|'
|
2176
|
+
r'A_ProgramsCommon|A_ScreenHeight|A_ScreenWidth|A_ScriptDir|'
|
2177
|
+
r'A_ScriptFullPath|A_ScriptName|A_Sec|A_Space|A_StartMenu|'
|
2178
|
+
r'A_StartMenuCommon|A_Startup|A_StartupCommon|A_StringCaseSense|'
|
2179
|
+
r'A_Tab|A_Temp|A_ThisFunc|A_ThisHotkey|A_ThisLabel|A_ThisMenu|'
|
2180
|
+
r'A_ThisMenuItem|A_ThisMenuItemPos|A_TickCount|A_TimeIdle|'
|
2181
|
+
r'A_TimeIdlePhysical|A_TimeSincePriorHotkey|A_TimeSinceThisHotkey|'
|
2182
|
+
r'A_TitleMatchMode|A_TitleMatchModeSpeed|A_UserName|A_WDay|'
|
2183
|
+
r'A_WinDelay|A_WinDir|A_WorkingDir|A_YDay|A_YEAR|A_YWeek|A_YYYY|'
|
2184
|
+
r'Clipboard|ClipboardAll|ComSpec|ErrorLevel|ProgramFiles|True|'
|
2185
|
+
r'False|A_IsUnicode|A_FileEncoding|A_OSVersion|A_PtrSize)\b',
|
2186
|
+
Name.Variable),
|
2187
|
+
],
|
2188
|
+
'labels': [
|
2189
|
+
# hotkeys and labels
|
2190
|
+
# technically, hotkey names are limited to named keys and buttons
|
2191
|
+
(r'(^\s*)([^:\s\(\"]+?:{1,2})', bygroups(Text, Name.Label)),
|
2192
|
+
(r'(^\s*)(::[^:\s]+?::)', bygroups(Text, Name.Label)),
|
2193
|
+
],
|
2194
|
+
'numbers': [
|
2195
|
+
(r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),
|
2196
|
+
(r'\d+[eE][+-]?[0-9]+', Number.Float),
|
2197
|
+
(r'0\d+', Number.Oct),
|
2198
|
+
(r'0[xX][a-fA-F0-9]+', Number.Hex),
|
2199
|
+
(r'\d+L', Number.Integer.Long),
|
2200
|
+
(r'\d+', Number.Integer)
|
2201
|
+
],
|
2202
|
+
'stringescape': [
|
2203
|
+
(r'\"\"|\`([\,\%\`abfnrtv])', String.Escape),
|
2204
|
+
],
|
2205
|
+
'strings': [
|
2206
|
+
(r'[^"\n]+', String),
|
2207
|
+
],
|
2208
|
+
'dqs': [
|
2209
|
+
(r'"', String, '#pop'),
|
2210
|
+
include('strings')
|
2211
|
+
],
|
2212
|
+
'garbage': [
|
2213
|
+
(r'[^\S\n]', Text),
|
2214
|
+
# (r'.', Text), # no cheating
|
2215
|
+
],
|
2216
|
+
}
|
2217
|
+
|
2218
|
+
|
2219
|
+
class MaqlLexer(RegexLexer):
|
2220
|
+
"""
|
2221
|
+
Lexer for `GoodData MAQL
|
2222
|
+
<https://secure.gooddata.com/docs/html/advanced.metric.tutorial.html>`_
|
2223
|
+
scripts.
|
2224
|
+
|
2225
|
+
*New in Pygments 1.4.*
|
2226
|
+
"""
|
2227
|
+
|
2228
|
+
name = 'MAQL'
|
2229
|
+
aliases = ['maql']
|
2230
|
+
filenames = ['*.maql']
|
2231
|
+
mimetypes = ['text/x-gooddata-maql','application/x-gooddata-maql']
|
2232
|
+
|
2233
|
+
flags = re.IGNORECASE
|
2234
|
+
tokens = {
|
2235
|
+
'root': [
|
2236
|
+
# IDENTITY
|
2237
|
+
(r'IDENTIFIER\b', Name.Builtin),
|
2238
|
+
# IDENTIFIER
|
2239
|
+
(r'\{[^}]+\}', Name.Variable),
|
2240
|
+
# NUMBER
|
2241
|
+
(r'[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]{1,3})?', Literal.Number),
|
2242
|
+
# STRING
|
2243
|
+
(r'"', Literal.String, 'string-literal'),
|
2244
|
+
# RELATION
|
2245
|
+
(r'\<\>|\!\=', Operator),
|
2246
|
+
(r'\=|\>\=|\>|\<\=|\<', Operator),
|
2247
|
+
# :=
|
2248
|
+
(r'\:\=', Operator),
|
2249
|
+
# OBJECT
|
2250
|
+
(r'\[[^]]+\]', Name.Variable.Class),
|
2251
|
+
# keywords
|
2252
|
+
(r'(DIMENSIONS?|BOTTOM|METRIC|COUNT|OTHER|FACT|WITH|TOP|OR|'
|
2253
|
+
r'ATTRIBUTE|CREATE|PARENT|FALSE|ROWS?|FROM|ALL|AS|PF|'
|
2254
|
+
r'COLUMNS?|DEFINE|REPORT|LIMIT|TABLE|LIKE|AND|BY|'
|
2255
|
+
r'BETWEEN|EXCEPT|SELECT|MATCH|WHERE|TRUE|FOR|IN|'
|
2256
|
+
r'WITHOUT|FILTER|ALIAS|ORDER|FACT|WHEN|NOT|ON|'
|
2257
|
+
r'KEYS|KEY|FULLSET|PRIMARY|LABELS|LABEL|VISUAL|'
|
2258
|
+
r'TITLE|DESCRIPTION|FOLDER|ALTER|DROP|ADD|DATASET|'
|
2259
|
+
r'DATATYPE|INT|BIGINT|DOUBLE|DATE|VARCHAR|DECIMAL|'
|
2260
|
+
r'SYNCHRONIZE|TYPE|DEFAULT|ORDER|ASC|DESC|HYPERLINK|'
|
2261
|
+
r'INCLUDE|TEMPLATE|MODIFY)\b', Keyword),
|
2262
|
+
# FUNCNAME
|
2263
|
+
(r'[a-zA-Z]\w*\b', Name.Function),
|
2264
|
+
# Comments
|
2265
|
+
(r'#.*', Comment.Single),
|
2266
|
+
# Punctuation
|
2267
|
+
(r'[,;\(\)]', Token.Punctuation),
|
2268
|
+
# Space is not significant
|
2269
|
+
(r'\s+', Text)
|
2270
|
+
],
|
2271
|
+
'string-literal': [
|
2272
|
+
(r'\\[tnrfbae"\\]', String.Escape),
|
2273
|
+
(r'"', Literal.String, '#pop'),
|
2274
|
+
(r'[^\\"]+', Literal.String)
|
2275
|
+
],
|
2276
|
+
}
|
2277
|
+
|
2278
|
+
|
2279
|
+
class GoodDataCLLexer(RegexLexer):
|
2280
|
+
"""
|
2281
|
+
Lexer for `GoodData-CL <http://github.com/gooddata/GoodData-CL/raw/master/cli/src/main/resources/com/gooddata/processor/COMMANDS.txt>`_
|
2282
|
+
script files.
|
2283
|
+
|
2284
|
+
*New in Pygments 1.4.*
|
2285
|
+
"""
|
2286
|
+
|
2287
|
+
name = 'GoodData-CL'
|
2288
|
+
aliases = ['gooddata-cl']
|
2289
|
+
filenames = ['*.gdc']
|
2290
|
+
mimetypes = ['text/x-gooddata-cl']
|
2291
|
+
|
2292
|
+
flags = re.IGNORECASE
|
2293
|
+
tokens = {
|
2294
|
+
'root': [
|
2295
|
+
# Comments
|
2296
|
+
(r'#.*', Comment.Single),
|
2297
|
+
# Function call
|
2298
|
+
(r'[a-zA-Z]\w*', Name.Function),
|
2299
|
+
# Argument list
|
2300
|
+
(r'\(', Token.Punctuation, 'args-list'),
|
2301
|
+
# Punctuation
|
2302
|
+
(r';', Token.Punctuation),
|
2303
|
+
# Space is not significant
|
2304
|
+
(r'\s+', Text)
|
2305
|
+
],
|
2306
|
+
'args-list': [
|
2307
|
+
(r'\)', Token.Punctuation, '#pop'),
|
2308
|
+
(r',', Token.Punctuation),
|
2309
|
+
(r'[a-zA-Z]\w*', Name.Variable),
|
2310
|
+
(r'=', Operator),
|
2311
|
+
(r'"', Literal.String, 'string-literal'),
|
2312
|
+
(r'[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]{1,3})?', Literal.Number),
|
2313
|
+
# Space is not significant
|
2314
|
+
(r'\s', Text)
|
2315
|
+
],
|
2316
|
+
'string-literal': [
|
2317
|
+
(r'\\[tnrfbae"\\]', String.Escape),
|
2318
|
+
(r'"', Literal.String, '#pop'),
|
2319
|
+
(r'[^\\"]+', Literal.String)
|
2320
|
+
]
|
2321
|
+
}
|
2322
|
+
|
2323
|
+
|
2324
|
+
class ProtoBufLexer(RegexLexer):
|
2325
|
+
"""
|
2326
|
+
Lexer for `Protocol Buffer <http://code.google.com/p/protobuf/>`_
|
2327
|
+
definition files.
|
2328
|
+
|
2329
|
+
*New in Pygments 1.4.*
|
2330
|
+
"""
|
2331
|
+
|
2332
|
+
name = 'Protocol Buffer'
|
2333
|
+
aliases = ['protobuf']
|
2334
|
+
filenames = ['*.proto']
|
2335
|
+
|
2336
|
+
tokens = {
|
2337
|
+
'root': [
|
2338
|
+
(r'[ \t]+', Text),
|
2339
|
+
(r'[,;{}\[\]\(\)]', Punctuation),
|
2340
|
+
(r'/(\\\n)?/(\n|(.|\n)*?[^\\]\n)', Comment.Single),
|
2341
|
+
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
|
2342
|
+
(r'\b(import|option|optional|required|repeated|default|packed|'
|
2343
|
+
r'ctype|extensions|to|max|rpc|returns)\b', Keyword),
|
2344
|
+
(r'(int32|int64|uint32|uint64|sint32|sint64|'
|
2345
|
+
r'fixed32|fixed64|sfixed32|sfixed64|'
|
2346
|
+
r'float|double|bool|string|bytes)\b', Keyword.Type),
|
2347
|
+
(r'(true|false)\b', Keyword.Constant),
|
2348
|
+
(r'(package)(\s+)', bygroups(Keyword.Namespace, Text), 'package'),
|
2349
|
+
(r'(message|extend)(\s+)',
|
2350
|
+
bygroups(Keyword.Declaration, Text), 'message'),
|
2351
|
+
(r'(enum|group|service)(\s+)',
|
2352
|
+
bygroups(Keyword.Declaration, Text), 'type'),
|
2353
|
+
(r'\".*\"', String),
|
2354
|
+
(r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float),
|
2355
|
+
(r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
|
2356
|
+
(r'(\-?(inf|nan))', Number.Float),
|
2357
|
+
(r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex),
|
2358
|
+
(r'0[0-7]+[LlUu]*', Number.Oct),
|
2359
|
+
(r'\d+[LlUu]*', Number.Integer),
|
2360
|
+
(r'[+-=]', Operator),
|
2361
|
+
(r'([a-zA-Z_][a-zA-Z0-9_\.]*)([ \t]*)(=)',
|
2362
|
+
bygroups(Name.Attribute, Text, Operator)),
|
2363
|
+
('[a-zA-Z_][a-zA-Z0-9_\.]*', Name),
|
2364
|
+
],
|
2365
|
+
'package': [
|
2366
|
+
(r'[a-zA-Z_][a-zA-Z0-9_]*', Name.Namespace, '#pop')
|
2367
|
+
],
|
2368
|
+
'message': [
|
2369
|
+
(r'[a-zA-Z_][a-zA-Z0-9_]*', Name.Class, '#pop')
|
2370
|
+
],
|
2371
|
+
'type': [
|
2372
|
+
(r'[a-zA-Z_][a-zA-Z0-9_]*', Name, '#pop')
|
2373
|
+
],
|
2374
|
+
}
|
2375
|
+
|
2376
|
+
|
2377
|
+
class HybrisLexer(RegexLexer):
|
2378
|
+
"""
|
2379
|
+
For `Hybris <http://www.hybris-lang.org>`_ source code.
|
2380
|
+
|
2381
|
+
*New in Pygments 1.4.*
|
2382
|
+
"""
|
2383
|
+
|
2384
|
+
name = 'Hybris'
|
2385
|
+
aliases = ['hybris', 'hy']
|
2386
|
+
filenames = ['*.hy', '*.hyb']
|
2387
|
+
mimetypes = ['text/x-hybris', 'application/x-hybris']
|
2388
|
+
|
2389
|
+
flags = re.MULTILINE | re.DOTALL
|
2390
|
+
|
2391
|
+
tokens = {
|
2392
|
+
'root': [
|
2393
|
+
# method names
|
2394
|
+
(r'^(\s*(?:function|method|operator\s+)+?)'
|
2395
|
+
r'([a-zA-Z_][a-zA-Z0-9_]*)'
|
2396
|
+
r'(\s*)(\()', bygroups(Keyword, Name.Function, Text, Operator)),
|
2397
|
+
(r'[^\S\n]+', Text),
|
2398
|
+
(r'//.*?\n', Comment.Single),
|
2399
|
+
(r'/\*.*?\*/', Comment.Multiline),
|
2400
|
+
(r'@[a-zA-Z_][a-zA-Z0-9_\.]*', Name.Decorator),
|
2401
|
+
(r'(break|case|catch|next|default|do|else|finally|for|foreach|of|'
|
2402
|
+
r'unless|if|new|return|switch|me|throw|try|while)\b', Keyword),
|
2403
|
+
(r'(extends|private|protected|public|static|throws|function|method|'
|
2404
|
+
r'operator)\b', Keyword.Declaration),
|
2405
|
+
(r'(true|false|null|__FILE__|__LINE__|__VERSION__|__LIB_PATH__|'
|
2406
|
+
r'__INC_PATH__)\b', Keyword.Constant),
|
2407
|
+
(r'(class|struct)(\s+)',
|
2408
|
+
bygroups(Keyword.Declaration, Text), 'class'),
|
2409
|
+
(r'(import|include)(\s+)',
|
2410
|
+
bygroups(Keyword.Namespace, Text), 'import'),
|
2411
|
+
(r'(gc_collect|gc_mm_items|gc_mm_usage|gc_collect_threshold|'
|
2412
|
+
r'urlencode|urldecode|base64encode|base64decode|sha1|crc32|sha2|'
|
2413
|
+
r'md5|md5_file|acos|asin|atan|atan2|ceil|cos|cosh|exp|fabs|floor|'
|
2414
|
+
r'fmod|log|log10|pow|sin|sinh|sqrt|tan|tanh|isint|isfloat|ischar|'
|
2415
|
+
r'isstring|isarray|ismap|isalias|typeof|sizeof|toint|tostring|'
|
2416
|
+
r'fromxml|toxml|binary|pack|load|eval|var_names|var_values|'
|
2417
|
+
r'user_functions|dyn_functions|methods|call|call_method|mknod|'
|
2418
|
+
r'mkfifo|mount|umount2|umount|ticks|usleep|sleep|time|strtime|'
|
2419
|
+
r'strdate|dllopen|dlllink|dllcall|dllcall_argv|dllclose|env|exec|'
|
2420
|
+
r'fork|getpid|wait|popen|pclose|exit|kill|pthread_create|'
|
2421
|
+
r'pthread_create_argv|pthread_exit|pthread_join|pthread_kill|'
|
2422
|
+
r'smtp_send|http_get|http_post|http_download|socket|bind|listen|'
|
2423
|
+
r'accept|getsockname|getpeername|settimeout|connect|server|recv|'
|
2424
|
+
r'send|close|print|println|printf|input|readline|serial_open|'
|
2425
|
+
r'serial_fcntl|serial_get_attr|serial_get_ispeed|serial_get_ospeed|'
|
2426
|
+
r'serial_set_attr|serial_set_ispeed|serial_set_ospeed|serial_write|'
|
2427
|
+
r'serial_read|serial_close|xml_load|xml_parse|fopen|fseek|ftell|'
|
2428
|
+
r'fsize|fread|fwrite|fgets|fclose|file|readdir|pcre_replace|size|'
|
2429
|
+
r'pop|unmap|has|keys|values|length|find|substr|replace|split|trim|'
|
2430
|
+
r'remove|contains|join)\b', Name.Builtin),
|
2431
|
+
(r'(MethodReference|Runner|Dll|Thread|Pipe|Process|Runnable|'
|
2432
|
+
r'CGI|ClientSocket|Socket|ServerSocket|File|Console|Directory|'
|
2433
|
+
r'Exception)\b', Keyword.Type),
|
2434
|
+
(r'"(\\\\|\\"|[^"])*"', String),
|
2435
|
+
(r"'\\.'|'[^\\]'|'\\u[0-9a-f]{4}'", String.Char),
|
2436
|
+
(r'(\.)([a-zA-Z_][a-zA-Z0-9_]*)',
|
2437
|
+
bygroups(Operator, Name.Attribute)),
|
2438
|
+
(r'[a-zA-Z_][a-zA-Z0-9_]*:', Name.Label),
|
2439
|
+
(r'[a-zA-Z_\$][a-zA-Z0-9_]*', Name),
|
2440
|
+
(r'[~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?\-@]+', Operator),
|
2441
|
+
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
|
2442
|
+
(r'0x[0-9a-f]+', Number.Hex),
|
2443
|
+
(r'[0-9]+L?', Number.Integer),
|
2444
|
+
(r'\n', Text),
|
2445
|
+
],
|
2446
|
+
'class': [
|
2447
|
+
(r'[a-zA-Z_][a-zA-Z0-9_]*', Name.Class, '#pop')
|
2448
|
+
],
|
2449
|
+
'import': [
|
2450
|
+
(r'[a-zA-Z0-9_.]+\*?', Name.Namespace, '#pop')
|
2451
|
+
],
|
2452
|
+
}
|
2453
|
+
|
2454
|
+
|
2455
|
+
class AwkLexer(RegexLexer):
|
2456
|
+
"""
|
2457
|
+
For Awk scripts.
|
2458
|
+
|
2459
|
+
*New in Pygments 1.5.*
|
2460
|
+
"""
|
2461
|
+
|
2462
|
+
name = 'Awk'
|
2463
|
+
aliases = ['awk', 'gawk', 'mawk', 'nawk']
|
2464
|
+
filenames = ['*.awk']
|
2465
|
+
mimetypes = ['application/x-awk']
|
2466
|
+
|
2467
|
+
tokens = {
|
2468
|
+
'commentsandwhitespace': [
|
2469
|
+
(r'\s+', Text),
|
2470
|
+
(r'#.*$', Comment.Single)
|
2471
|
+
],
|
2472
|
+
'slashstartsregex': [
|
2473
|
+
include('commentsandwhitespace'),
|
2474
|
+
(r'/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/'
|
2475
|
+
r'\B', String.Regex, '#pop'),
|
2476
|
+
(r'(?=/)', Text, ('#pop', 'badregex')),
|
2477
|
+
(r'', Text, '#pop')
|
2478
|
+
],
|
2479
|
+
'badregex': [
|
2480
|
+
(r'\n', Text, '#pop')
|
2481
|
+
],
|
2482
|
+
'root': [
|
2483
|
+
(r'^(?=\s|/)', Text, 'slashstartsregex'),
|
2484
|
+
include('commentsandwhitespace'),
|
2485
|
+
(r'\+\+|--|\|\||&&|in|\$|!?~|'
|
2486
|
+
r'(\*\*|[-<>+*%\^/!=])=?', Operator, 'slashstartsregex'),
|
2487
|
+
(r'[{(\[;,]', Punctuation, 'slashstartsregex'),
|
2488
|
+
(r'[})\].]', Punctuation),
|
2489
|
+
(r'(break|continue|do|while|exit|for|if|'
|
2490
|
+
r'return)\b', Keyword, 'slashstartsregex'),
|
2491
|
+
(r'function\b', Keyword.Declaration, 'slashstartsregex'),
|
2492
|
+
(r'(atan2|cos|exp|int|log|rand|sin|sqrt|srand|gensub|gsub|index|'
|
2493
|
+
r'length|match|split|sprintf|sub|substr|tolower|toupper|close|'
|
2494
|
+
r'fflush|getline|next|nextfile|print|printf|strftime|systime|'
|
2495
|
+
r'delete|system)\b', Keyword.Reserved),
|
2496
|
+
(r'(ARGC|ARGIND|ARGV|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS|FILENAME|FNR|FS|'
|
2497
|
+
r'IGNORECASE|NF|NR|OFMT|OFS|ORFS|RLENGTH|RS|RSTART|RT|'
|
2498
|
+
r'SUBSEP)\b', Name.Builtin),
|
2499
|
+
(r'[$a-zA-Z_][a-zA-Z0-9_]*', Name.Other),
|
2500
|
+
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
|
2501
|
+
(r'0x[0-9a-fA-F]+', Number.Hex),
|
2502
|
+
(r'[0-9]+', Number.Integer),
|
2503
|
+
(r'"(\\\\|\\"|[^"])*"', String.Double),
|
2504
|
+
(r"'(\\\\|\\'|[^'])*'", String.Single),
|
2505
|
+
]
|
2506
|
+
}
|
2507
|
+
|
2508
|
+
|
2509
|
+
class Cfengine3Lexer(RegexLexer):
|
2510
|
+
"""
|
2511
|
+
Lexer for `CFEngine3 <http://cfengine.org>`_ policy files.
|
2512
|
+
|
2513
|
+
*New in Pygments 1.5.*
|
2514
|
+
"""
|
2515
|
+
|
2516
|
+
name = 'CFEngine3'
|
2517
|
+
aliases = ['cfengine3', 'cf3']
|
2518
|
+
filenames = ['*.cf']
|
2519
|
+
mimetypes = []
|
2520
|
+
|
2521
|
+
tokens = {
|
2522
|
+
'root': [
|
2523
|
+
(r'#.*?\n', Comment),
|
2524
|
+
(r'(body)(\s+)(\S+)(\s+)(control)',
|
2525
|
+
bygroups(Keyword, Text, Keyword, Text, Keyword)),
|
2526
|
+
(r'(body|bundle)(\s+)(\S+)(\s+)(\w+)(\()',
|
2527
|
+
bygroups(Keyword, Text, Keyword, Text, Name.Function, Punctuation),
|
2528
|
+
'arglist'),
|
2529
|
+
(r'(body|bundle)(\s+)(\S+)(\s+)(\w+)',
|
2530
|
+
bygroups(Keyword, Text, Keyword, Text, Name.Function)),
|
2531
|
+
(r'(")([^"]+)(")(\s+)(string|slist|int|real)(\s*)(=>)(\s*)',
|
2532
|
+
bygroups(Punctuation,Name.Variable,Punctuation,
|
2533
|
+
Text,Keyword.Type,Text,Operator,Text)),
|
2534
|
+
(r'(\S+)(\s*)(=>)(\s*)',
|
2535
|
+
bygroups(Keyword.Reserved,Text,Operator,Text)),
|
2536
|
+
(r'"', String, 'string'),
|
2537
|
+
(r'(\w+)(\()', bygroups(Name.Function, Punctuation)),
|
2538
|
+
(r'([\w.!&|\(\)]+)(::)', bygroups(Name.Class, Punctuation)),
|
2539
|
+
(r'(\w+)(:)', bygroups(Keyword.Declaration,Punctuation)),
|
2540
|
+
(r'@[\{\(][^\)\}]+[\}\)]', Name.Variable),
|
2541
|
+
(r'[(){},;]', Punctuation),
|
2542
|
+
(r'=>', Operator),
|
2543
|
+
(r'->', Operator),
|
2544
|
+
(r'\d+\.\d+', Number.Float),
|
2545
|
+
(r'\d+', Number.Integer),
|
2546
|
+
(r'\w+', Name.Function),
|
2547
|
+
(r'\s+', Text),
|
2548
|
+
],
|
2549
|
+
'string': [
|
2550
|
+
(r'\$[\{\(]', String.Interpol, 'interpol'),
|
2551
|
+
(r'\\.', String.Escape),
|
2552
|
+
(r'"', String, '#pop'),
|
2553
|
+
(r'\n', String),
|
2554
|
+
(r'.', String),
|
2555
|
+
],
|
2556
|
+
'interpol': [
|
2557
|
+
(r'\$[\{\(]', String.Interpol, '#push'),
|
2558
|
+
(r'[\}\)]', String.Interpol, '#pop'),
|
2559
|
+
(r'[^\$\{\(\)\}]+', String.Interpol),
|
2560
|
+
],
|
2561
|
+
'arglist': [
|
2562
|
+
(r'\)', Punctuation, '#pop'),
|
2563
|
+
(r',', Punctuation),
|
2564
|
+
(r'\w+', Name.Variable),
|
2565
|
+
(r'\s+', Text),
|
2566
|
+
],
|
2567
|
+
}
|
2568
|
+
|
2569
|
+
|
2570
|
+
class SnobolLexer(RegexLexer):
|
2571
|
+
"""
|
2572
|
+
Lexer for the SNOBOL4 programming language.
|
2573
|
+
|
2574
|
+
Recognizes the common ASCII equivalents of the original SNOBOL4 operators.
|
2575
|
+
Does not require spaces around binary operators.
|
2576
|
+
|
2577
|
+
*New in Pygments 1.5.*
|
2578
|
+
"""
|
2579
|
+
|
2580
|
+
name = "Snobol"
|
2581
|
+
aliases = ["snobol"]
|
2582
|
+
filenames = ['*.snobol']
|
2583
|
+
mimetypes = ['text/x-snobol']
|
2584
|
+
|
2585
|
+
tokens = {
|
2586
|
+
# root state, start of line
|
2587
|
+
# comments, continuation lines, and directives start in column 1
|
2588
|
+
# as do labels
|
2589
|
+
'root': [
|
2590
|
+
(r'\*.*\n', Comment),
|
2591
|
+
(r'[\+\.] ', Punctuation, 'statement'),
|
2592
|
+
(r'-.*\n', Comment),
|
2593
|
+
(r'END\s*\n', Name.Label, 'heredoc'),
|
2594
|
+
(r'[A-Za-z\$][\w$]*', Name.Label, 'statement'),
|
2595
|
+
(r'\s+', Text, 'statement'),
|
2596
|
+
],
|
2597
|
+
# statement state, line after continuation or label
|
2598
|
+
'statement': [
|
2599
|
+
(r'\s*\n', Text, '#pop'),
|
2600
|
+
(r'\s+', Text),
|
2601
|
+
(r'(?<=[^\w.])(LT|LE|EQ|NE|GE|GT|INTEGER|IDENT|DIFFER|LGT|SIZE|'
|
2602
|
+
r'REPLACE|TRIM|DUPL|REMDR|DATE|TIME|EVAL|APPLY|OPSYN|LOAD|UNLOAD|'
|
2603
|
+
r'LEN|SPAN|BREAK|ANY|NOTANY|TAB|RTAB|REM|POS|RPOS|FAIL|FENCE|'
|
2604
|
+
r'ABORT|ARB|ARBNO|BAL|SUCCEED|INPUT|OUTPUT|TERMINAL)(?=[^\w.])',
|
2605
|
+
Name.Builtin),
|
2606
|
+
(r'[A-Za-z][\w\.]*', Name),
|
2607
|
+
# ASCII equivalents of original operators
|
2608
|
+
# | for the EBCDIC equivalent, ! likewise
|
2609
|
+
# \ for EBCDIC negation
|
2610
|
+
(r'\*\*|[\?\$\.!%\*/#+\-@\|&\\=]', Operator),
|
2611
|
+
(r'"[^"]*"', String),
|
2612
|
+
(r"'[^']*'", String),
|
2613
|
+
# Accept SPITBOL syntax for real numbers
|
2614
|
+
# as well as Macro SNOBOL4
|
2615
|
+
(r'[0-9]+(?=[^\.EeDd])', Number.Integer),
|
2616
|
+
(r'[0-9]+(\.[0-9]*)?([EDed][-+]?[0-9]+)?', Number.Float),
|
2617
|
+
# Goto
|
2618
|
+
(r':', Punctuation, 'goto'),
|
2619
|
+
(r'[\(\)<>,;]', Punctuation),
|
2620
|
+
],
|
2621
|
+
# Goto block
|
2622
|
+
'goto': [
|
2623
|
+
(r'\s*\n', Text, "#pop:2"),
|
2624
|
+
(r'\s+', Text),
|
2625
|
+
(r'F|S', Keyword),
|
2626
|
+
(r'(\()([A-Za-z][\w.]*)(\))',
|
2627
|
+
bygroups(Punctuation, Name.Label, Punctuation))
|
2628
|
+
],
|
2629
|
+
# everything after the END statement is basically one
|
2630
|
+
# big heredoc.
|
2631
|
+
'heredoc': [
|
2632
|
+
(r'.*\n', String.Heredoc)
|
2633
|
+
]
|
2634
|
+
}
|
2635
|
+
|
2636
|
+
|
2637
|
+
class UrbiscriptLexer(ExtendedRegexLexer):
|
2638
|
+
"""
|
2639
|
+
For UrbiScript source code.
|
2640
|
+
|
2641
|
+
*New in Pygments 1.5.*
|
2642
|
+
"""
|
2643
|
+
|
2644
|
+
name = 'UrbiScript'
|
2645
|
+
aliases = ['urbiscript']
|
2646
|
+
filenames = ['*.u']
|
2647
|
+
mimetypes = ['application/x-urbiscript']
|
2648
|
+
|
2649
|
+
flags = re.DOTALL
|
2650
|
+
|
2651
|
+
## TODO
|
2652
|
+
# - handle Experimental and deprecated tags with specific tokens
|
2653
|
+
# - handle Angles and Durations with specific tokens
|
2654
|
+
|
2655
|
+
def blob_callback(lexer, match, ctx):
|
2656
|
+
text_before_blob = match.group(1)
|
2657
|
+
blob_start = match.group(2)
|
2658
|
+
blob_size_str = match.group(3)
|
2659
|
+
blob_size = int(blob_size_str)
|
2660
|
+
yield match.start(), String, text_before_blob
|
2661
|
+
ctx.pos += len(text_before_blob)
|
2662
|
+
|
2663
|
+
# if blob size doesn't match blob format (example : "\B(2)(aaa)")
|
2664
|
+
# yield blob as a string
|
2665
|
+
if ctx.text[match.end() + blob_size] != ")":
|
2666
|
+
result = "\\B(" + blob_size_str + ")("
|
2667
|
+
yield match.start(), String, result
|
2668
|
+
ctx.pos += len(result)
|
2669
|
+
return
|
2670
|
+
|
2671
|
+
# if blob is well formated, yield as Escape
|
2672
|
+
blob_text = blob_start + ctx.text[match.end():match.end()+blob_size] + ")"
|
2673
|
+
yield match.start(), String.Escape, blob_text
|
2674
|
+
ctx.pos = match.end() + blob_size + 1 # +1 is the ending ")"
|
2675
|
+
|
2676
|
+
tokens = {
|
2677
|
+
'root': [
|
2678
|
+
(r'\s+', Text),
|
2679
|
+
# comments
|
2680
|
+
(r'//.*?\n', Comment),
|
2681
|
+
(r'/\*', Comment.Multiline, 'comment'),
|
2682
|
+
(r'(?:every|for|loop|while)(?:;|&|\||,)',Keyword),
|
2683
|
+
(r'(?:assert|at|break|case|catch|closure|compl|continue|'
|
2684
|
+
r'default|else|enum|every|external|finally|for|freezeif|if|new|'
|
2685
|
+
r'onleave|return|stopif|switch|this|throw|timeout|try|'
|
2686
|
+
r'waituntil|whenever|while)\b', Keyword),
|
2687
|
+
(r'(?:asm|auto|bool|char|const_cast|delete|double|dynamic_cast|'
|
2688
|
+
r'explicit|export|extern|float|friend|goto|inline|int|'
|
2689
|
+
r'long|mutable|namespace|register|reinterpret_cast|short|'
|
2690
|
+
r'signed|sizeof|static_cast|struct|template|typedef|typeid|'
|
2691
|
+
r'typename|union|unsigned|using|virtual|volatile|'
|
2692
|
+
r'wchar_t)\b', Keyword.Reserved),
|
2693
|
+
# deprecated keywords, use a meaningfull token when available
|
2694
|
+
(r'(?:emit|foreach|internal|loopn|static)\b', Keyword),
|
2695
|
+
# ignored keywords, use a meaningfull token when available
|
2696
|
+
(r'(?:private|protected|public)\b', Keyword),
|
2697
|
+
(r'(?:var|do|const|function|class)\b', Keyword.Declaration),
|
2698
|
+
(r'(?:true|false|nil|void)\b', Keyword.Constant),
|
2699
|
+
(r'(?:Barrier|Binary|Boolean|CallMessage|Channel|Code|'
|
2700
|
+
r'Comparable|Container|Control|Date|Dictionary|Directory|'
|
2701
|
+
r'Duration|Enumeration|Event|Exception|Executable|File|Finalizable|'
|
2702
|
+
r'Float|FormatInfo|Formatter|Global|Group|Hash|InputStream|'
|
2703
|
+
r'IoService|Job|Kernel|Lazy|List|Loadable|Lobby|Location|Logger|Math|'
|
2704
|
+
r'Mutex|nil|Object|Orderable|OutputStream|Pair|Path|Pattern|Position|'
|
2705
|
+
r'Primitive|Process|Profile|PseudoLazy|PubSub|RangeIterable|Regexp|'
|
2706
|
+
r'Semaphore|Server|Singleton|Socket|StackFrame|Stream|String|System|'
|
2707
|
+
r'Tag|Timeout|Traceable|TrajectoryGenerator|Triplet|Tuple'
|
2708
|
+
r'|UObject|UValue|UVar)\b', Name.Builtin),
|
2709
|
+
(r'(?:this)\b', Name.Builtin.Pseudo),
|
2710
|
+
# don't match single | and &
|
2711
|
+
(r'(?:[-=+*%/<>~^:]+|\.&?|\|\||&&)', Operator),
|
2712
|
+
(r'(?:and_eq|and|bitand|bitor|in|not|not_eq|or_eq|or|xor_eq|xor)\b',
|
2713
|
+
Operator.Word),
|
2714
|
+
(r'[{}\[\]()]+', Punctuation),
|
2715
|
+
(r'(?:;|\||,|&|\?|!)+', Punctuation),
|
2716
|
+
(r'[$a-zA-Z_][a-zA-Z0-9_]*', Name.Other),
|
2717
|
+
(r'0x[0-9a-fA-F]+', Number.Hex),
|
2718
|
+
# Float, Integer, Angle and Duration
|
2719
|
+
(r'(?:[0-9]+(?:(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?)?'
|
2720
|
+
r'((?:rad|deg|grad)|(?:ms|s|min|h|d))?)\b', Number.Float),
|
2721
|
+
# handle binary blob in strings
|
2722
|
+
(r'"', String.Double, "string.double"),
|
2723
|
+
(r"'", String.Single, "string.single"),
|
2724
|
+
],
|
2725
|
+
'string.double': [
|
2726
|
+
(r'((?:\\\\|\\"|[^"])*?)(\\B\((\d+)\)\()', blob_callback),
|
2727
|
+
(r'(\\\\|\\"|[^"])*?"', String.Double, '#pop'),
|
2728
|
+
],
|
2729
|
+
'string.single': [
|
2730
|
+
(r"((?:\\\\|\\'|[^'])*?)(\\B\((\d+)\)\()", blob_callback),
|
2731
|
+
(r"(\\\\|\\'|[^'])*?'", String.Single, '#pop'),
|
2732
|
+
],
|
2733
|
+
# from http://pygments.org/docs/lexerdevelopment/#changing-states
|
2734
|
+
'comment': [
|
2735
|
+
(r'[^*/]', Comment.Multiline),
|
2736
|
+
(r'/\*', Comment.Multiline, '#push'),
|
2737
|
+
(r'\*/', Comment.Multiline, '#pop'),
|
2738
|
+
(r'[*/]', Comment.Multiline),
|
2739
|
+
]
|
2740
|
+
}
|
2741
|
+
|
2742
|
+
|
2743
|
+
class OpenEdgeLexer(RegexLexer):
|
2744
|
+
"""
|
2745
|
+
Lexer for `OpenEdge ABL (formerly Progress)
|
2746
|
+
<http://web.progress.com/en/openedge/abl.html>`_ source code.
|
2747
|
+
|
2748
|
+
*New in Pygments 1.5.*
|
2749
|
+
"""
|
2750
|
+
name = 'OpenEdge ABL'
|
2751
|
+
aliases = ['openedge', 'abl', 'progress']
|
2752
|
+
filenames = ['*.p', '*.cls']
|
2753
|
+
mimetypes = ['text/x-openedge', 'application/x-openedge']
|
2754
|
+
|
2755
|
+
types = (r'(?i)(^|(?<=[^0-9a-z_\-]))(CHARACTER|CHAR|CHARA|CHARAC|CHARACT|CHARACTE|'
|
2756
|
+
r'COM-HANDLE|DATE|DATETIME|DATETIME-TZ|'
|
2757
|
+
r'DECIMAL|DEC|DECI|DECIM|DECIMA|HANDLE|'
|
2758
|
+
r'INT64|INTEGER|INT|INTE|INTEG|INTEGE|'
|
2759
|
+
r'LOGICAL|LONGCHAR|MEMPTR|RAW|RECID|ROWID)\s*($|(?=[^0-9a-z_\-]))')
|
2760
|
+
|
2761
|
+
keywords = (r'(?i)(^|(?<=[^0-9a-z_\-]))(ABSOLUTE|ABS|ABSO|ABSOL|ABSOLU|ABSOLUT|ACCELERATOR|'
|
2762
|
+
r'ACCUM|ACCUMULATE|ACCUM|ACCUMU|ACCUMUL|ACCUMULA|ACCUMULAT|'
|
2763
|
+
r'ACTIVE-FORM|ACTIVE-WINDOW|ADD|ADD-BUFFER|'
|
2764
|
+
r'ADD-CALC-COLUMN|ADD-COLUMNS-FROM|ADD-EVENTS-PROCEDURE|'
|
2765
|
+
r'ADD-FIELDS-FROM|ADD-FIRST|ADD-INDEX-FIELD|ADD-LAST|'
|
2766
|
+
r'ADD-LIKE-COLUMN|ADD-LIKE-FIELD|ADD-LIKE-INDEX|'
|
2767
|
+
r'ADD-NEW-FIELD|ADD-NEW-INDEX|ADD-SCHEMA-LOCATION|ADD-SUPER-PROCEDURE|'
|
2768
|
+
r'ADM-DATA|ADVISE|ALERT-BOX|ALIAS|ALL|ALLOW-COLUMN-SEARCHING|'
|
2769
|
+
r'ALLOW-REPLICATION|ALTER|ALWAYS-ON-TOP|AMBIGUOUS|AMBIG|AMBIGU|AMBIGUO|AMBIGUOU|'
|
2770
|
+
r'ANALYZE|ANALYZ|AND|ANSI-ONLY|ANY|ANYWHERE|APPEND|APPL-ALERT-BOXES|'
|
2771
|
+
r'APPL-ALERT|APPL-ALERT-|APPL-ALERT-B|APPL-ALERT-BO|APPL-ALERT-BOX|APPL-ALERT-BOXE|'
|
2772
|
+
r'APPL-CONTEXT-ID|APPLICATION|APPLY|APPSERVER-INFO|APPSERVER-PASSWORD|'
|
2773
|
+
r'APPSERVER-USERID|ARRAY-MESSAGE|AS|ASC|ASCENDING|ASCE|ASCEN|'
|
2774
|
+
r'ASCEND|ASCENDI|ASCENDIN|ASK-OVERWRITE|ASSEMBLY|ASSIGN|'
|
2775
|
+
r'ASYNCHRONOUS|ASYNC-REQUEST-COUNT|ASYNC-REQUEST-HANDLE|AT|'
|
2776
|
+
r'ATTACHED-PAIRLIST|ATTR-SPACE|ATTR|ATTRI|ATTRIB|ATTRIBU|ATTRIBUT|'
|
2777
|
+
r'AUDIT-CONTROL|AUDIT-ENABLED|AUDIT-EVENT-CONTEXT|AUDIT-POLICY|'
|
2778
|
+
r'AUTHENTICATION-FAILED|AUTHORIZATION|AUTO-COMPLETION|AUTO-COMP|'
|
2779
|
+
r'AUTO-COMPL|AUTO-COMPLE|AUTO-COMPLET|AUTO-COMPLETI|AUTO-COMPLETIO|'
|
2780
|
+
r'AUTO-ENDKEY|AUTO-END-KEY|AUTO-GO|AUTO-INDENT|AUTO-IND|'
|
2781
|
+
r'AUTO-INDE|AUTO-INDEN|AUTOMATIC|AUTO-RESIZE|AUTO-RETURN|AUTO-RET|'
|
2782
|
+
r'AUTO-RETU|AUTO-RETUR|AUTO-SYNCHRONIZE|AUTO-ZAP|AUTO-Z|AUTO-ZA|'
|
2783
|
+
r'AVAILABLE|AVAIL|AVAILA|AVAILAB|AVAILABL|AVAILABLE-FORMATS|'
|
2784
|
+
r'AVERAGE|AVE|AVER|AVERA|AVERAG|AVG|BACKGROUND|BACK|BACKG|'
|
2785
|
+
r'BACKGR|BACKGRO|BACKGROU|BACKGROUN|BACKWARDS|BACKWARD|'
|
2786
|
+
r'BASE64-DECODE|BASE64-ENCODE|BASE-ADE|BASE-KEY|BATCH-MODE|BATCH|'
|
2787
|
+
r'BATCH-|BATCH-M|BATCH-MO|BATCH-MOD|BATCH-SIZE|BEFORE-HIDE|BEFORE-H|'
|
2788
|
+
r'BEFORE-HI|BEFORE-HID|BEGIN-EVENT-GROUP|BEGINS|BELL|BETWEEN|'
|
2789
|
+
r'BGCOLOR|BGC|BGCO|BGCOL|BGCOLO|BIG-ENDIAN|BINARY|BIND|BIND-WHERE|'
|
2790
|
+
r'BLANK|BLOCK-ITERATION-DISPLAY|BORDER-BOTTOM-CHARS|BORDER-B|'
|
2791
|
+
r'BORDER-BO|BORDER-BOT|BORDER-BOTT|BORDER-BOTTO|BORDER-BOTTOM-PIXELS|'
|
2792
|
+
r'BORDER-BOTTOM-P|BORDER-BOTTOM-PI|BORDER-BOTTOM-PIX|'
|
2793
|
+
r'BORDER-BOTTOM-PIXE|BORDER-BOTTOM-PIXEL|BORDER-LEFT-CHARS|BORDER-L|'
|
2794
|
+
r'BORDER-LE|BORDER-LEF|BORDER-LEFT|BORDER-LEFT-|BORDER-LEFT-C|'
|
2795
|
+
r'BORDER-LEFT-CH|BORDER-LEFT-CHA|BORDER-LEFT-CHAR|BORDER-LEFT-PIXELS|'
|
2796
|
+
r'BORDER-LEFT-P|BORDER-LEFT-PI|BORDER-LEFT-PIX|BORDER-LEFT-PIXE|'
|
2797
|
+
r'BORDER-LEFT-PIXEL|BORDER-RIGHT-CHARS|BORDER-R|BORDER-RI|BORDER-RIG|'
|
2798
|
+
r'BORDER-RIGH|BORDER-RIGHT|BORDER-RIGHT-|BORDER-RIGHT-C|BORDER-RIGHT-CH|'
|
2799
|
+
r'BORDER-RIGHT-CHA|BORDER-RIGHT-CHAR|BORDER-RIGHT-PIXELS|BORDER-RIGHT-P|'
|
2800
|
+
r'BORDER-RIGHT-PI|BORDER-RIGHT-PIX|BORDER-RIGHT-PIXE|BORDER-RIGHT-PIXEL|'
|
2801
|
+
r'BORDER-TOP-CHARS|BORDER-T|BORDER-TO|BORDER-TOP|BORDER-TOP-|BORDER-TOP-C|'
|
2802
|
+
r'BORDER-TOP-CH|BORDER-TOP-CHA|BORDER-TOP-CHAR|BORDER-TOP-PIXELS|'
|
2803
|
+
r'BORDER-TOP-P|BORDER-TOP-PI|BORDER-TOP-PIX|BORDER-TOP-PIXE|BORDER-TOP-PIXEL|'
|
2804
|
+
r'BOX|BOX-SELECTABLE|BOX-SELECT|BOX-SELECTA|BOX-SELECTAB|BOX-SELECTABL|'
|
2805
|
+
r'BREAK|BROWSE|BUFFER|BUFFER-CHARS|BUFFER-COMPARE|BUFFER-COPY|BUFFER-CREATE|'
|
2806
|
+
r'BUFFER-DELETE|BUFFER-FIELD|BUFFER-HANDLE|BUFFER-LINES|BUFFER-NAME|'
|
2807
|
+
r'BUFFER-RELEASE|BUFFER-VALUE|BUTTON|BUTTONS|BUTTON|BY|BY-POINTER|'
|
2808
|
+
r'BY-VARIANT-POINTER|CACHE|CACHE-SIZE|CALL|CALL-NAME|CALL-TYPE|CANCEL-BREAK|'
|
2809
|
+
r'CANCEL-BUTTON|CAN-CREATE|CAN-DELETE|CAN-DO|CAN-FIND|CAN-QUERY|CAN-READ|'
|
2810
|
+
r'CAN-SET|CAN-WRITE|CAPS|CAREFUL-PAINT|CASE|CASE-SENSITIVE|CASE-SEN|'
|
2811
|
+
r'CASE-SENS|CASE-SENSI|CASE-SENSIT|CASE-SENSITI|CASE-SENSITIV|'
|
2812
|
+
r'CAST|CATCH|CDECL|CENTERED|CENTER|CENTERE|CHAINED|CHARACTER_LENGTH|'
|
2813
|
+
r'CHARSET|CHECK|CHECKED|CHOOSE|CHR|CLASS|CLASS-TYPE|CLEAR|'
|
2814
|
+
r'CLEAR-APPL-CONTEXT|CLEAR-LOG|CLEAR-SELECTION|CLEAR-SELECT|'
|
2815
|
+
r'CLEAR-SELECTI|CLEAR-SELECTIO|CLEAR-SORT-ARROWS|CLEAR-SORT-ARROW|'
|
2816
|
+
r'CLIENT-CONNECTION-ID|CLIENT-PRINCIPAL|CLIENT-TTY|CLIENT-TYPE|'
|
2817
|
+
r'CLIENT-WORKSTATION|CLIPBOARD|CLOSE|CLOSE-LOG|CODE|CODEBASE-LOCATOR|'
|
2818
|
+
r'CODEPAGE|CODEPAGE-CONVERT|COLLATE|COL-OF|COLON|COLON-ALIGNED|'
|
2819
|
+
r'COLON-ALIGN|COLON-ALIGNE|COLOR|COLOR-TABLE|COLUMN|COL|COLU|COLUM|'
|
2820
|
+
r'COLUMN-BGCOLOR|COLUMN-DCOLOR|COLUMN-FGCOLOR|COLUMN-FONT|COLUMN-LABEL|'
|
2821
|
+
r'COLUMN-LAB|COLUMN-LABE|COLUMN-MOVABLE|COLUMN-OF|COLUMN-PFCOLOR|'
|
2822
|
+
r'COLUMN-READ-ONLY|COLUMN-RESIZABLE|COLUMNS|COLUMN-SCROLLING|'
|
2823
|
+
r'COMBO-BOX|COMMAND|COMPARES|COMPILE|COMPILER|COMPLETE|COM-SELF|'
|
2824
|
+
r'CONFIG-NAME|CONNECT|CONNECTED|CONSTRUCTOR|CONTAINS|CONTENTS|CONTEXT|'
|
2825
|
+
r'CONTEXT-HELP|CONTEXT-HELP-FILE|CONTEXT-HELP-ID|CONTEXT-POPUP|'
|
2826
|
+
r'CONTROL|CONTROL-BOX|CONTROL-FRAME|CONVERT|CONVERT-3D-COLORS|'
|
2827
|
+
r'CONVERT-TO-OFFSET|CONVERT-TO-OFFS|CONVERT-TO-OFFSE|COPY-DATASET|'
|
2828
|
+
r'COPY-LOB|COPY-SAX-ATTRIBUTES|COPY-TEMP-TABLE|COUNT|COUNT-OF|'
|
2829
|
+
r'CPCASE|CPCOLL|CPINTERNAL|CPLOG|CPPRINT|CPRCODEIN|CPRCODEOUT|'
|
2830
|
+
r'CPSTREAM|CPTERM|CRC-VALUE|CREATE|CREATE-LIKE|CREATE-LIKE-SEQUENTIAL|'
|
2831
|
+
r'CREATE-NODE-NAMESPACE|CREATE-RESULT-LIST-ENTRY|CREATE-TEST-FILE|'
|
2832
|
+
r'CURRENT|CURRENT_DATE|CURRENT_DATE|CURRENT-CHANGED|CURRENT-COLUMN|'
|
2833
|
+
r'CURRENT-ENVIRONMENT|CURRENT-ENV|CURRENT-ENVI|CURRENT-ENVIR|'
|
2834
|
+
r'CURRENT-ENVIRO|CURRENT-ENVIRON|CURRENT-ENVIRONM|CURRENT-ENVIRONME|'
|
2835
|
+
r'CURRENT-ENVIRONMEN|CURRENT-ITERATION|CURRENT-LANGUAGE|CURRENT-LANG|'
|
2836
|
+
r'CURRENT-LANGU|CURRENT-LANGUA|CURRENT-LANGUAG|CURRENT-QUERY|'
|
2837
|
+
r'CURRENT-RESULT-ROW|CURRENT-ROW-MODIFIED|CURRENT-VALUE|CURRENT-WINDOW|'
|
2838
|
+
r'CURSOR|CURS|CURSO|CURSOR-CHAR|CURSOR-LINE|CURSOR-OFFSET|DATABASE|'
|
2839
|
+
r'DATA-BIND|DATA-ENTRY-RETURN|DATA-ENTRY-RET|DATA-ENTRY-RETU|'
|
2840
|
+
r'DATA-ENTRY-RETUR|DATA-RELATION|DATA-REL|DATA-RELA|DATA-RELAT|'
|
2841
|
+
r'DATA-RELATI|DATA-RELATIO|DATASERVERS|DATASET|DATASET-HANDLE|DATA-SOURCE|'
|
2842
|
+
r'DATA-SOURCE-COMPLETE-MAP|DATA-SOURCE-MODIFIED|DATA-SOURCE-ROWID|'
|
2843
|
+
r'DATA-TYPE|DATA-T|DATA-TY|DATA-TYP|DATE-FORMAT|DATE-F|DATE-FO|'
|
2844
|
+
r'DATE-FOR|DATE-FORM|DATE-FORMA|DAY|DBCODEPAGE|DBCOLLATION|DBNAME|'
|
2845
|
+
r'DBPARAM|DB-REFERENCES|DBRESTRICTIONS|DBREST|DBRESTR|DBRESTRI|'
|
2846
|
+
r'DBRESTRIC|DBRESTRICT|DBRESTRICTI|DBRESTRICTIO|DBRESTRICTION|'
|
2847
|
+
r'DBTASKID|DBTYPE|DBVERSION|DBVERS|DBVERSI|DBVERSIO|DCOLOR|'
|
2848
|
+
r'DDE|DDE-ERROR|DDE-ID|DDE-I|DDE-ITEM|DDE-NAME|DDE-TOPIC|DEBLANK|'
|
2849
|
+
r'DEBUG|DEBU|DEBUG-ALERT|DEBUGGER|DEBUG-LIST|DECIMALS|DECLARE|'
|
2850
|
+
r'DECLARE-NAMESPACE|DECRYPT|DEFAULT|DEFAULT-BUFFER-HANDLE|'
|
2851
|
+
r'DEFAULT-BUTTON|DEFAUT-B|DEFAUT-BU|DEFAUT-BUT|DEFAUT-BUTT|DEFAUT-BUTTO|'
|
2852
|
+
r'DEFAULT-COMMIT|DEFAULT-EXTENSION|DEFAULT-EX|DEFAULT-EXT|DEFAULT-EXTE|'
|
2853
|
+
r'DEFAULT-EXTEN|DEFAULT-EXTENS|DEFAULT-EXTENSI|DEFAULT-EXTENSIO|'
|
2854
|
+
r'DEFAULT-NOXLATE|DEFAULT-NOXL|DEFAULT-NOXLA|DEFAULT-NOXLAT|'
|
2855
|
+
r'DEFAULT-VALUE|DEFAULT-WINDOW|DEFINED|'
|
2856
|
+
r'DEFINE-USER-EVENT-MANAGER|DELETE|DEL|DELE|DELET|DELETE-CHARACTER|'
|
2857
|
+
r'DELETE-CHAR|DELETE-CHARA|DELETE-CHARAC|DELETE-CHARACT|DELETE-CHARACTE|'
|
2858
|
+
r'DELETE-CURRENT-ROW|DELETE-LINE|DELETE-RESULT-LIST-ENTRY|DELETE-SELECTED-ROW|'
|
2859
|
+
r'DELETE-SELECTED-ROWS|DELIMITER|DESC|DESCENDING|DESC|DESCE|DESCEN|'
|
2860
|
+
r'DESCEND|DESCENDI|DESCENDIN|DESELECT-FOCUSED-ROW|DESELECTION|'
|
2861
|
+
r'DESELECT-ROWS|DESELECT-SELECTED-ROW|DESTRUCTOR|DIALOG-BOX|'
|
2862
|
+
r'DICTIONARY|DICT|DICTI|DICTIO|DICTION|DICTIONA|DICTIONAR|'
|
2863
|
+
r'DIR|DISABLE|DISABLE-AUTO-ZAP|DISABLED|DISABLE-DUMP-TRIGGERS|'
|
2864
|
+
r'DISABLE-LOAD-TRIGGERS|DISCONNECT|DISCON|DISCONN|DISCONNE|DISCONNEC|'
|
2865
|
+
r'DISP|DISPLAY|DISP|DISPL|DISPLA|DISPLAY-MESSAGE|DISPLAY-TYPE|'
|
2866
|
+
r'DISPLAY-T|DISPLAY-TY|DISPLAY-TYP|DISTINCT|DO|DOMAIN-DESCRIPTION|'
|
2867
|
+
r'DOMAIN-NAME|DOMAIN-TYPE|DOS|DOUBLE|DOWN|DRAG-ENABLED|DROP|DROP-DOWN|'
|
2868
|
+
r'DROP-DOWN-LIST|DROP-FILE-NOTIFY|DROP-TARGET|DUMP|DYNAMIC|'
|
2869
|
+
r'DYNAMIC-FUNCTION|EACH|ECHO|EDGE-CHARS|EDGE|EDGE-|EDGE-C|'
|
2870
|
+
r'EDGE-CH|EDGE-CHA|EDGE-CHAR|EDGE-PIXELS|EDGE-P|EDGE-PI|EDGE-PIX|'
|
2871
|
+
r'EDGE-PIXE|EDGE-PIXEL|EDIT-CAN-PASTE|EDIT-CAN-UNDO|EDIT-CLEAR|'
|
2872
|
+
r'EDIT-COPY|EDIT-CUT|EDITING|EDITOR|EDIT-PASTE|EDIT-UNDO|ELSE|'
|
2873
|
+
r'EMPTY|EMPTY-TEMP-TABLE|ENABLE|ENABLED-FIELDS|ENCODE|ENCRYPT|'
|
2874
|
+
r'ENCRYPT-AUDIT-MAC-KEY|ENCRYPTION-SALT|END|END-DOCUMENT|'
|
2875
|
+
r'END-ELEMENT|END-EVENT-GROUP|END-FILE-DROP|ENDKEY|END-KEY|'
|
2876
|
+
r'END-MOVE|END-RESIZE|END-ROW-RESIZE|END-USER-PROMPT|ENTERED|'
|
2877
|
+
r'ENTRY|EQ|ERROR|ERROR-COLUMN|ERROR-COL|ERROR-COLU|ERROR-COLUM|'
|
2878
|
+
r'ERROR-ROW|ERROR-STACK-TRACE|ERROR-STATUS|ERROR-STAT|ERROR-STATU|'
|
2879
|
+
r'ESCAPE|ETIME|EVENT-GROUP-ID|EVENT-PROCEDURE|EVENT-PROCEDURE-CONTEXT|'
|
2880
|
+
r'EVENTS|EVENT|EVENT-TYPE|EVENT-T|EVENT-TY|EVENT-TYP|EXCEPT|'
|
2881
|
+
r'EXCLUSIVE-ID|EXCLUSIVE-LOCK|EXCLUSIVE|EXCLUSIVE-|EXCLUSIVE-L|'
|
2882
|
+
r'EXCLUSIVE-LO|EXCLUSIVE-LOC|EXCLUSIVE-WEB-USER|EXECUTE|EXISTS|'
|
2883
|
+
r'EXP|EXPAND|EXPANDABLE|EXPLICIT|EXPORT|EXPORT-PRINCIPAL|EXTENDED|'
|
2884
|
+
r'EXTENT|EXTERNAL|FALSE|FETCH|FETCH-SELECTED-ROW|FGCOLOR|FGC|FGCO|'
|
2885
|
+
r'FGCOL|FGCOLO|FIELD|FIELDS|FIELD|FILE|FILE-CREATE-DATE|'
|
2886
|
+
r'FILE-CREATE-TIME|FILE-INFORMATION|FILE-INFO|FILE-INFOR|FILE-INFORM|'
|
2887
|
+
r'FILE-INFORMA|FILE-INFORMAT|FILE-INFORMATI|FILE-INFORMATIO|FILE-MOD-DATE|'
|
2888
|
+
r'FILE-MOD-TIME|FILENAME|FILE-NAME|FILE-OFFSET|FILE-OFF|FILE-OFFS|FILE-OFFSE|'
|
2889
|
+
r'FILE-SIZE|FILE-TYPE|FILL|FILLED|FILL-IN|FILTERS|FINAL|FINALLY|FIND|'
|
2890
|
+
r'FIND-BY-ROWID|FIND-CASE-SENSITIVE|FIND-CURRENT|FINDER|FIND-FIRST|'
|
2891
|
+
r'FIND-GLOBAL|FIND-LAST|FIND-NEXT-OCCURRENCE|FIND-PREV-OCCURRENCE|'
|
2892
|
+
r'FIND-SELECT|FIND-UNIQUE|FIND-WRAP-AROUND|FIRST|FIRST-ASYNCH-REQUEST|'
|
2893
|
+
r'FIRST-CHILD|FIRST-COLUMN|FIRST-FORM|FIRST-OBJECT|FIRST-OF|'
|
2894
|
+
r'FIRST-PROCEDURE|FIRST-PROC|FIRST-PROCE|FIRST-PROCED|FIRST-PROCEDU|FIRST-PROCEDUR|'
|
2895
|
+
r'FIRST-SERVER|FIRST-TAB-ITEM|FIRST-TAB-I|FIRST-TAB-IT|FIRST-TAB-ITE|'
|
2896
|
+
r'FIT-LAST-COLUMN|FIXED-ONLY|FLAT-BUTTON|FLOAT|FOCUS|FOCUSED-ROW|'
|
2897
|
+
r'FOCUSED-ROW-SELECTED|FONT|FONT-TABLE|FOR|FORCE-FILE|'
|
2898
|
+
r'FOREGROUND|FORE|FOREG|FOREGR|FOREGRO|FOREGROU|FOREGROUN|'
|
2899
|
+
r'FORM|FORMAT|FORM|FORMA|FORMATTED|FORMATTE|FORM-LONG-INPUT|'
|
2900
|
+
r'FORWARD|FORWARDS|FORWARD|FRAGMENT|FRAGMEN|FRAME|FRAM|'
|
2901
|
+
r'FRAME-COL|FRAME-DB|FRAME-DOWN|FRAME-FIELD|FRAME-FILE|'
|
2902
|
+
r'FRAME-INDEX|FRAME-INDE|FRAME-LINE|FRAME-NAME|FRAME-ROW|'
|
2903
|
+
r'FRAME-SPACING|FRAME-SPA|FRAME-SPAC|FRAME-SPACI|FRAME-SPACIN|'
|
2904
|
+
r'FRAME-VALUE|FRAME-VAL|FRAME-VALU|FRAME-X|FRAME-Y|FREQUENCY|FROM|'
|
2905
|
+
r'FROM-CHARS|FROM-C|FROM-CH|FROM-CHA|FROM-CHAR|'
|
2906
|
+
r'FROM-CURRENT|FROM-CUR|FROM-CURR|FROM-CURRE|FROM-CURREN|'
|
2907
|
+
r'FROM-PIXELS|FROM-P|FROM-PI|FROM-PIX|FROM-PIXE|FROM-PIXEL|'
|
2908
|
+
r'FULL-HEIGHT-CHARS|FULL-HEIGHT|FULL-HEIGHT-|FULL-HEIGHT-C|FULL-HEIGHT-CH|FULL-HEIGHT-CHA|FULL-HEIGHT-CHAR|'
|
2909
|
+
r'FULL-HEIGHT-PIXELS|FULL-HEIGHT-P|FULL-HEIGHT-PI|FULL-HEIGHT-PIX|FULL-HEIGHT-PIXE|FULL-HEIGHT-PIXEL|'
|
2910
|
+
r'FULL-PATHNAME|FULL-PATHN|FULL-PATHNA|FULL-PATHNAM|'
|
2911
|
+
r'FULL-WIDTH-CHARS|FULL-WIDTH|FULL-WIDTH-|FULL-WIDTH-C|FULL-WIDTH-CH|FULL-WIDTH-CHA|FULL-WIDTH-CHAR|'
|
2912
|
+
r'FULL-WIDTH-PIXELS|FULL-WIDTH-P|FULL-WIDTH-PI|FULL-WIDTH-PIX|FULL-WIDTH-PIXE|FULL-WIDTH-PIXEL|'
|
2913
|
+
r'FUNCTION|FUNCTION-CALL-TYPE|GATEWAYS|GATEWAY|GE|GENERATE-MD5|'
|
2914
|
+
r'GENERATE-PBE-KEY|GENERATE-PBE-SALT|GENERATE-RANDOM-KEY|GENERATE-UUID|GET|'
|
2915
|
+
r'GET-ATTR-CALL-TYPE|GET-ATTRIBUTE-NODE|GET-BINARY-DATA|'
|
2916
|
+
r'GET-BLUE-VALUE|GET-BLUE|GET-BLUE-|GET-BLUE-V|GET-BLUE-VA|GET-BLUE-VAL|GET-BLUE-VALU|'
|
2917
|
+
r'GET-BROWSE-COLUMN|GET-BUFFER-HANDLEGETBYTE|GET-BYTE|GET-CALLBACK-PROC-CONTEXT|'
|
2918
|
+
r'GET-CALLBACK-PROC-NAME|GET-CGI-LIST|GET-CGI-LONG-VALUE|GET-CGI-VALUE|'
|
2919
|
+
r'GET-CODEPAGES|GET-COLLATIONS|GET-CONFIG-VALUE|GET-CURRENT|GET-DOUBLE|'
|
2920
|
+
r'GET-DROPPED-FILE|GET-DYNAMIC|GET-ERROR-COLUMN|GET-ERROR-ROW|GET-FILE|'
|
2921
|
+
r'GET-FILE-NAME|GET-FILE-OFFSET|GET-FILE-OFFSE|GET-FIRST|GET-FLOAT|'
|
2922
|
+
r'GET-GREEN-VALUE|GET-GREEN|GET-GREEN-|GET-GREEN-V|GET-GREEN-VA|GET-GREEN-VAL|GET-GREEN-VALU|'
|
2923
|
+
r'GET-INDEX-BY-NAMESPACE-NAME|GET-INDEX-BY-QNAME|GET-INT64|GET-ITERATION|'
|
2924
|
+
r'GET-KEY-VALUE|GET-KEY-VAL|GET-KEY-VALU|GET-LAST|GET-LOCALNAME-BY-INDEX|'
|
2925
|
+
r'GET-LONG|GET-MESSAGE|GET-NEXT|GET-NUMBER|GET-POINTER-VALUE|'
|
2926
|
+
r'GET-PREV|GET-PRINTERS|GET-PROPERTY|GET-QNAME-BY-INDEX|'
|
2927
|
+
r'GET-RED-VALUE|GET-RED|GET-RED-|GET-RED-V|GET-RED-VA|GET-RED-VAL|GET-RED-VALU|'
|
2928
|
+
r'GET-REPOSITIONED-ROW|GET-RGB-VALUE|'
|
2929
|
+
r'GET-SELECTED-WIDGET|GET-SELECTED|GET-SELECTED-|GET-SELECTED-W|GET-SELECTED-WI|GET-SELECTED-WID|GET-SELECTED-WIDG|GET-SELECTED-WIDGE|'
|
2930
|
+
r'GET-SHORT|GET-SIGNATURE|GET-SIZE|GET-STRING|GET-TAB-ITEM|'
|
2931
|
+
r'GET-TEXT-HEIGHT-CHARS|GET-TEXT-HEIGHT|GET-TEXT-HEIGHT-|GET-TEXT-HEIGHT-C|GET-TEXT-HEIGHT-CH|GET-TEXT-HEIGHT-CHA|GET-TEXT-HEIGHT-CHAR|'
|
2932
|
+
r'GET-TEXT-HEIGHT-PIXELS|GET-TEXT-HEIGHT-P|GET-TEXT-HEIGHT-PI|GET-TEXT-HEIGHT-PIX|GET-TEXT-HEIGHT-PIXE|GET-TEXT-HEIGHT-PIXEL|'
|
2933
|
+
r'GET-TEXT-WIDTH-CHARS|GET-TEXT-WIDTH|GET-TEXT-WIDTH-|GET-TEXT-WIDTH-C|GET-TEXT-WIDTH-CH|GET-TEXT-WIDTH-CHA|GET-TEXT-WIDTH-CHAR|'
|
2934
|
+
r'GET-TEXT-WIDTH-PIXELS|GET-TEXT-WIDTH-P|GET-TEXT-WIDTH-PI|GET-TEXT-WIDTH-PIX|GET-TEXT-WIDTH-PIXE|GET-TEXT-WIDTH-PIXEL|'
|
2935
|
+
r'GET-TYPE-BY-INDEX|GET-TYPE-BY-NAMESPACE-NAME|GET-TYPE-BY-QNAME|GET-UNSIGNED-LONG|'
|
2936
|
+
r'GET-UNSIGNED-SHORT|GET-URI-BY-INDEX|GET-VALUE-BY-INDEX|GET-VALUE-BY-NAMESPACE-NAME|'
|
2937
|
+
r'GET-VALUE-BY-QNAME|GET-WAIT-STATE|GLOBAL|GO-ON|'
|
2938
|
+
r'GO-PENDING|GO-PEND|GO-PENDI|GO-PENDIN|GRANT|'
|
2939
|
+
r'GRAPHIC-EDGE|GRAPHIC-E|GRAPHIC-ED|GRAPHIC-EDG|'
|
2940
|
+
r'GRID-FACTOR-HORIZONTAL|GRID-FACTOR-H|GRID-FACTOR-HO|GRID-FACTOR-HOR|GRID-FACTOR-HORI|GRID-FACTOR-HORIZ|GRID-FACTOR-HORIZO|GRID-FACTOR-HORIZON|GRID-FACTOR-HORIZONT|GRID-FACTOR-HORIZONTA|'
|
2941
|
+
r'GRID-FACTOR-VERTICAL|GRID-FACTOR-V|GRID-FACTOR-VE|GRID-FACTOR-VER|GRID-FACTOR-VERT|GRID-FACTOR-VERT|GRID-FACTOR-VERTI|GRID-FACTOR-VERTIC|GRID-FACTOR-VERTICA|'
|
2942
|
+
r'GRID-SNAP|'
|
2943
|
+
r'GRID-UNIT-HEIGHT-CHARS|GRID-UNIT-HEIGHT|GRID-UNIT-HEIGHT-|GRID-UNIT-HEIGHT-C|GRID-UNIT-HEIGHT-CH|GRID-UNIT-HEIGHT-CHA|'
|
2944
|
+
r'GRID-UNIT-HEIGHT-PIXELS|GRID-UNIT-HEIGHT-P|GRID-UNIT-HEIGHT-PI|GRID-UNIT-HEIGHT-PIX|GRID-UNIT-HEIGHT-PIXE|GRID-UNIT-HEIGHT-PIXEL|'
|
2945
|
+
r'GRID-UNIT-WIDTH-CHARS|GRID-UNIT-WIDTH|GRID-UNIT-WIDTH-|GRID-UNIT-WIDTH-C|GRID-UNIT-WIDTH-CH|GRID-UNIT-WIDTH-CHA|GRID-UNIT-WIDTH-CHAR|'
|
2946
|
+
r'GRID-UNIT-WIDTH-PIXELS|GRID-UNIT-WIDTH-P|GRID-UNIT-WIDTH-PI|GRID-UNIT-WIDTH-PIX|GRID-UNIT-WIDTH-PIXE|GRID-UNIT-WIDTH-PIXEL|'
|
2947
|
+
r'GRID-VISIBLE|GROUP|GT|GUID|HANDLER|HAS-RECORDS|HAVING|HEADER|'
|
2948
|
+
r'HEIGHT-CHARS|HEIGHT|HEIGHT-|HEIGHT-C|HEIGHT-CH|HEIGHT-CHA|HEIGHT-CHAR|'
|
2949
|
+
r'HEIGHT-PIXELS|HEIGHT-P|HEIGHT-PI|HEIGHT-PIX|HEIGHT-PIXE|HEIGHT-PIXEL|'
|
2950
|
+
r'HELP|HEX-DECODE|HEX-ENCODE|HIDDEN|HIDE|'
|
2951
|
+
r'HORIZONTAL|HORI|HORIZ|HORIZO|HORIZON|HORIZONT|HORIZONTA|'
|
2952
|
+
r'HOST-BYTE-ORDER|HTML-CHARSET|HTML-END-OF-LINE|HTML-END-OF-PAGE|'
|
2953
|
+
r'HTML-FRAME-BEGIN|HTML-FRAME-END|HTML-HEADER-BEGIN|HTML-HEADER-END|'
|
2954
|
+
r'HTML-TITLE-BEGIN|HTML-TITLE-END|HWND|ICON|IF|'
|
2955
|
+
r'IMAGE|IMAGE-DOWN|IMAGE-INSENSITIVE|IMAGE-SIZE|'
|
2956
|
+
r'IMAGE-SIZE-CHARS|IMAGE-SIZE-C|IMAGE-SIZE-CH|IMAGE-SIZE-CHA|IMAGE-SIZE-CHAR|'
|
2957
|
+
r'IMAGE-SIZE-PIXELS|IMAGE-SIZE-P|IMAGE-SIZE-PI|IMAGE-SIZE-PIX|IMAGE-SIZE-PIXE|IMAGE-SIZE-PIXEL|'
|
2958
|
+
r'IMAGE-UP|IMMEDIATE-DISPLAY|IMPLEMENTS|IMPORT|IMPORT-PRINCIPAL|'
|
2959
|
+
r'IN|INCREMENT-EXCLUSIVE-ID|INDEX|INDEXED-REPOSITION|INDEX-HINT|'
|
2960
|
+
r'INDEX-INFORMATION|INDICATOR|'
|
2961
|
+
r'INFORMATION|INFO|INFOR|INFORM|INFORMA|INFORMAT|INFORMATI|INFORMATIO|'
|
2962
|
+
r'IN-HANDLE|'
|
2963
|
+
r'INHERIT-BGCOLOR|INHERIT-BGC|INHERIT-BGCO|INHERIT-BGCOL|INHERIT-BGCOLO|'
|
2964
|
+
r'INHERIT-FGCOLOR|INHERIT-FGC|INHERIT-FGCO|INHERIT-FGCOL|INHERIT-FGCOLO|'
|
2965
|
+
r'INHERITS|INITIAL|INIT|INITI|INITIA|INITIAL-DIR|INITIAL-FILTER|'
|
2966
|
+
r'INITIALIZE-DOCUMENT-TYPE|INITIATE|INNER-CHARS|INNER-LINES|INPUT|'
|
2967
|
+
r'INPUT-OUTPUT|INPUT-O|INPUT-OU|INPUT-OUT|INPUT-OUTP|INPUT-OUTPU|'
|
2968
|
+
r'INPUT-VALUE|INSERT|INSERT-ATTRIBUTE|'
|
2969
|
+
r'INSERT-BACKTAB|INSERT-B|INSERT-BA|INSERT-BAC|INSERT-BACK|INSERT-BACKT|INSERT-BACKTA|'
|
2970
|
+
r'INSERT-FILE|INSERT-ROW|INSERT-STRING|INSERT-TAB|INSERT-T|INSERT-TA|'
|
2971
|
+
r'INTERFACE|INTERNAL-ENTRIES|INTO|INVOKE|IS|'
|
2972
|
+
r'IS-ATTR-SPACE|IS-ATTR|IS-ATTR-|IS-ATTR-S|IS-ATTR-SP|IS-ATTR-SPA|IS-ATTR-SPAC|'
|
2973
|
+
r'IS-CLASS|IS-CLAS|IS-LEAD-BYTE|IS-ATTR|IS-OPEN|IS-PARAMETER-SET|IS-ROW-SELECTED|'
|
2974
|
+
r'IS-SELECTED|ITEM|ITEMS-PER-ROW|JOIN|JOIN-BY-SQLDB|KBLABEL|KEEP-CONNECTION-OPEN|'
|
2975
|
+
r'KEEP-FRAME-Z-ORDER|KEEP-FRAME-Z|KEEP-FRAME-Z-|KEEP-FRAME-Z-O|KEEP-FRAME-Z-OR|KEEP-FRAME-Z-ORD|KEEP-FRAME-Z-ORDE|'
|
2976
|
+
r'KEEP-MESSAGES|KEEP-SECURITY-CACHE|KEEP-TAB-ORDER|KEY|KEYCODE|KEY-CODE|'
|
2977
|
+
r'KEYFUNCTION|KEYFUNC|KEYFUNCT|KEYFUNCTI|KEYFUNCTIO|'
|
2978
|
+
r'KEY-FUNCTION|KEY-FUNC|KEY-FUNCT|KEY-FUNCTI|KEY-FUNCTIO|'
|
2979
|
+
r'KEYLABEL|KEY-LABEL|KEYS|KEYWORD|KEYWORD-ALL|LABEL|'
|
2980
|
+
r'LABEL-BGCOLOR|LABEL-BGC|LABEL-BGCO|LABEL-BGCOL|LABEL-BGCOLO|'
|
2981
|
+
r'LABEL-DCOLOR|LABEL-DC|LABEL-DCO|LABEL-DCOL|LABEL-DCOLO|'
|
2982
|
+
r'LABEL-FGCOLOR|LABEL-FGC|LABEL-FGCO|LABEL-FGCOL|LABEL-FGCOLO|'
|
2983
|
+
r'LABEL-FONT|'
|
2984
|
+
r'LABEL-PFCOLOR|LABEL-PFC|LABEL-PFCO|LABEL-PFCOL|LABEL-PFCOLO|'
|
2985
|
+
r'LABELS|LANDSCAPE|LANGUAGES|LANGUAGE|LARGE|LARGE-TO-SMALL|LAST|'
|
2986
|
+
r'LAST-ASYNCH-REQUEST|LAST-BATCH|LAST-CHILD|LAST-EVENT|LAST-EVEN|LAST-FORM|'
|
2987
|
+
r'LASTKEY|LAST-KEY|LAST-OBJECT|LAST-OF|'
|
2988
|
+
r'LAST-PROCEDURE|LAST-PROCE|LAST-PROCED|LAST-PROCEDU|LAST-PROCEDUR|'
|
2989
|
+
r'LAST-SERVER|LAST-TAB-ITEM|LAST-TAB-I|LAST-TAB-IT|LAST-TAB-ITE|'
|
2990
|
+
r'LC|LDBNAME|LE|LEAVE|LEFT-ALIGNED|LEFT-ALIGN|LEFT-ALIGNE|LEFT-TRIM|'
|
2991
|
+
r'LENGTH|LIBRARY|LIKE|LIKE-SEQUENTIAL|LINE|LINE-COUNTER|LINE-COUNT|LINE-COUNTE|'
|
2992
|
+
r'LIST-EVENTS|LISTING|LISTI|LISTIN|LIST-ITEM-PAIRS|LIST-ITEMS|'
|
2993
|
+
r'LIST-PROPERTY-NAMES|LIST-QUERY-ATTRS|LIST-SET-ATTRS|LIST-WIDGETS|'
|
2994
|
+
r'LITERAL-QUESTION|LITTLE-ENDIAN|LOAD|LOAD-DOMAINS|LOAD-ICON|'
|
2995
|
+
r'LOAD-IMAGE|LOAD-IMAGE-DOWN|LOAD-IMAGE-INSENSITIVE|LOAD-IMAGE-UP|'
|
2996
|
+
r'LOAD-MOUSE-POINTER|LOAD-MOUSE-P|LOAD-MOUSE-PO|LOAD-MOUSE-POI|LOAD-MOUSE-POIN|LOAD-MOUSE-POINT|LOAD-MOUSE-POINTE|'
|
2997
|
+
r'LOAD-PICTURE|LOAD-SMALL-ICON|LOCAL-NAME|LOCATOR-COLUMN-NUMBER|'
|
2998
|
+
r'LOCATOR-LINE-NUMBER|LOCATOR-PUBLIC-ID|LOCATOR-SYSTEM-ID|LOCATOR-TYPE|'
|
2999
|
+
r'LOCKED|LOCK-REGISTRATION|LOG|LOG-AUDIT-EVENT|LOGIN-EXPIRATION-TIMESTAMP|'
|
3000
|
+
r'LOGIN-HOST|LOGIN-STATE|LOG-MANAGER|LOGOUT|LOOKAHEAD|LOOKUP|LT|'
|
3001
|
+
r'MACHINE-CLASS|MANDATORY|MANUAL-HIGHLIGHT|MAP|MARGIN-EXTRA|'
|
3002
|
+
r'MARGIN-HEIGHT-CHARS|MARGIN-HEIGHT|MARGIN-HEIGHT-|MARGIN-HEIGHT-C|MARGIN-HEIGHT-CH|MARGIN-HEIGHT-CHA|MARGIN-HEIGHT-CHAR|'
|
3003
|
+
r'MARGIN-HEIGHT-PIXELS|MARGIN-HEIGHT-P|MARGIN-HEIGHT-PI|MARGIN-HEIGHT-PIX|MARGIN-HEIGHT-PIXE|MARGIN-HEIGHT-PIXEL|'
|
3004
|
+
r'MARGIN-WIDTH-CHARS|MARGIN-WIDTH|MARGIN-WIDTH-|MARGIN-WIDTH-C|MARGIN-WIDTH-CH|MARGIN-WIDTH-CHA|MARGIN-WIDTH-CHAR|'
|
3005
|
+
r'MARGIN-WIDTH-PIXELS|MARGIN-WIDTH-P|MARGIN-WIDTH-PI|MARGIN-WIDTH-PIX|MARGIN-WIDTH-PIXE|MARGIN-WIDTH-PIXEL|'
|
3006
|
+
r'MARK-NEW|MARK-ROW-STATE|MATCHES|MAX|MAX-BUTTON|'
|
3007
|
+
r'MAX-CHARS|MAX-DATA-GUESS|MAX-HEIGHT|'
|
3008
|
+
r'MAX-HEIGHT-CHARS|MAX-HEIGHT-C|MAX-HEIGHT-CH|MAX-HEIGHT-CHA|MAX-HEIGHT-CHAR|'
|
3009
|
+
r'MAX-HEIGHT-PIXELS|MAX-HEIGHT-P|MAX-HEIGHT-PI|MAX-HEIGHT-PIX|MAX-HEIGHT-PIXE|MAX-HEIGHT-PIXEL|'
|
3010
|
+
r'MAXIMIZE|MAXIMUM|MAX|MAXI|MAXIM|MAXIMU|MAXIMUM-LEVEL|MAX-ROWS|'
|
3011
|
+
r'MAX-SIZE|MAX-VALUE|MAX-VAL|MAX-VALU|MAX-WIDTH|'
|
3012
|
+
r'MAX-WIDTH-CHARS|MAX-WIDTH|MAX-WIDTH-|MAX-WIDTH-C|MAX-WIDTH-CH|MAX-WIDTH-CHA|MAX-WIDTH-CHAR|'
|
3013
|
+
r'MAX-WIDTH-PIXELS|MAX-WIDTH-P|MAX-WIDTH-PI|MAX-WIDTH-PIX|MAX-WIDTH-PIXE|MAX-WIDTH-PIXEL|'
|
3014
|
+
r'MD5-DIGEST|MEMBER|MEMPTR-TO-NODE-VALUE|MENU|MENUBAR|MENU-BAR|MENU-ITEM|'
|
3015
|
+
r'MENU-KEY|MENU-K|MENU-KE|MENU-MOUSE|MENU-M|MENU-MO|MENU-MOU|MENU-MOUS|'
|
3016
|
+
r'MERGE-BY-FIELD|MESSAGE|MESSAGE-AREA|MESSAGE-AREA-FONT|MESSAGE-LINES|'
|
3017
|
+
r'METHOD|MIN|MIN-BUTTON|'
|
3018
|
+
r'MIN-COLUMN-WIDTH-CHARS|MIN-COLUMN-WIDTH-C|MIN-COLUMN-WIDTH-CH|MIN-COLUMN-WIDTH-CHA|MIN-COLUMN-WIDTH-CHAR|'
|
3019
|
+
r'MIN-COLUMN-WIDTH-PIXELS|MIN-COLUMN-WIDTH-P|MIN-COLUMN-WIDTH-PI|MIN-COLUMN-WIDTH-PIX|MIN-COLUMN-WIDTH-PIXE|MIN-COLUMN-WIDTH-PIXEL|'
|
3020
|
+
r'MIN-HEIGHT-CHARS|MIN-HEIGHT|MIN-HEIGHT-|MIN-HEIGHT-C|MIN-HEIGHT-CH|MIN-HEIGHT-CHA|MIN-HEIGHT-CHAR|'
|
3021
|
+
r'MIN-HEIGHT-PIXELS|MIN-HEIGHT-P|MIN-HEIGHT-PI|MIN-HEIGHT-PIX|MIN-HEIGHT-PIXE|MIN-HEIGHT-PIXEL|'
|
3022
|
+
r'MINIMUM|MIN|MINI|MINIM|MINIMU|MIN-SIZE|'
|
3023
|
+
r'MIN-VALUE|MIN-VAL|MIN-VALU|'
|
3024
|
+
r'MIN-WIDTH-CHARS|MIN-WIDTH|MIN-WIDTH-|MIN-WIDTH-C|MIN-WIDTH-CH|MIN-WIDTH-CHA|MIN-WIDTH-CHAR|'
|
3025
|
+
r'MIN-WIDTH-PIXELS|MIN-WIDTH-P|MIN-WIDTH-PI|MIN-WIDTH-PIX|MIN-WIDTH-PIXE|MIN-WIDTH-PIXEL|'
|
3026
|
+
r'MODIFIED|MODULO|MOD|MODU|MODUL|MONTH|MOUSE|'
|
3027
|
+
r'MOUSE-POINTER|MOUSE-P|MOUSE-PO|MOUSE-POI|MOUSE-POIN|MOUSE-POINT|MOUSE-POINTE|'
|
3028
|
+
r'MOVABLE|'
|
3029
|
+
r'MOVE-AFTER-TAB-ITEM|MOVE-AFTER|MOVE-AFTER-|MOVE-AFTER-T|MOVE-AFTER-TA|MOVE-AFTER-TAB|MOVE-AFTER-TAB-|MOVE-AFTER-TAB-I|MOVE-AFTER-TAB-IT|MOVE-AFTER-TAB-ITE|'
|
3030
|
+
r'MOVE-BEFORE-TAB-ITEM|MOVE-BEFOR|MOVE-BEFORE|MOVE-BEFORE-|MOVE-BEFORE-T|MOVE-BEFORE-TA|MOVE-BEFORE-TAB|MOVE-BEFORE-TAB-|MOVE-BEFORE-TAB-I|MOVE-BEFORE-TAB-IT|MOVE-BEFORE-TAB-ITE|'
|
3031
|
+
r'MOVE-COLUMN|MOVE-COL|MOVE-COLU|MOVE-COLUM|'
|
3032
|
+
r'MOVE-TO-BOTTOM|MOVE-TO-B|MOVE-TO-BO|MOVE-TO-BOT|MOVE-TO-BOTT|MOVE-TO-BOTTO|'
|
3033
|
+
r'MOVE-TO-EOF|MOVE-TO-TOP|MOVE-TO-T|MOVE-TO-TO|MPE|MULTI-COMPILE|MULTIPLE|'
|
3034
|
+
r'MULTIPLE-KEY|MULTITASKING-INTERVAL|MUST-EXIST|NAME|NAMESPACE-PREFIX|'
|
3035
|
+
r'NAMESPACE-URI|NATIVE|NE|NEEDS-APPSERVER-PROMPT|NEEDS-PROMPT|NEW|'
|
3036
|
+
r'NEW-INSTANCE|NEW-ROW|NEXT|NEXT-COLUMN|NEXT-PROMPT|NEXT-ROWID|'
|
3037
|
+
r'NEXT-SIBLING|NEXT-TAB-ITEM|NEXT-TAB-I|NEXT-TAB-IT|NEXT-TAB-ITE|'
|
3038
|
+
r'NEXT-VALUE|NO|NO-APPLY|NO-ARRAY-MESSAGE|NO-ASSIGN|'
|
3039
|
+
r'NO-ATTR-LIST|NO-ATTR|NO-ATTR-|NO-ATTR-L|NO-ATTR-LI|NO-ATTR-LIS|'
|
3040
|
+
r'NO-ATTR-SPACE|NO-ATTR|NO-ATTR-|NO-ATTR-S|NO-ATTR-SP|NO-ATTR-SPA|NO-ATTR-SPAC|'
|
3041
|
+
r'NO-AUTO-VALIDATE|NO-BIND-WHERE|NO-BOX|NO-CONSOLE|NO-CONVERT|'
|
3042
|
+
r'NO-CONVERT-3D-COLORS|NO-CURRENT-VALUE|NO-DEBUG|NODE-VALUE-TO-MEMPTR|'
|
3043
|
+
r'NO-DRAG|NO-ECHO|NO-EMPTY-SPACE|NO-ERROR|NO-FILL|NO-F|NO-FI|'
|
3044
|
+
r'NO-FIL|NO-FOCUS|NO-HELP|NO-HIDE|NO-INDEX-HINT|'
|
3045
|
+
r'NO-INHERIT-BGCOLOR|NO-INHERIT-BGC|NO-INHERIT-BGCO|LABEL-BGCOL|LABEL-BGCOLO|'
|
3046
|
+
r'NO-INHERIT-FGCOLOR|NO-INHERIT-FGC|NO-INHERIT-FGCO|NO-INHERIT-FGCOL|NO-INHERIT-FGCOLO|'
|
3047
|
+
r'NO-JOIN-BY-SQLDB|NO-LABELS|NO-LABE|NO-LOBS|NO-LOCK|'
|
3048
|
+
r'NO-LOOKAHEAD|NO-MAP|'
|
3049
|
+
r'NO-MESSAGE|NO-MES|NO-MESS|NO-MESSA|NO-MESSAG|'
|
3050
|
+
r'NONAMESPACE-SCHEMA-LOCATION|NONE|NO-PAUSE|'
|
3051
|
+
r'NO-PREFETCH|NO-PREFE|NO-PREFET|NO-PREFETC|NORMALIZE|'
|
3052
|
+
r'NO-ROW-MARKERS|NO-SCROLLBAR-VERTICAL|NO-SEPARATE-CONNECTION|'
|
3053
|
+
r'NO-SEPARATORS|NOT|NO-TAB-STOP|NOT-ACTIVE|'
|
3054
|
+
r'NO-UNDERLINE|NO-UND|NO-UNDE|NO-UNDER|NO-UNDERL|NO-UNDERLI|NO-UNDERLIN|'
|
3055
|
+
r'NO-UNDO|'
|
3056
|
+
r'NO-VALIDATE|NO-VAL|NO-VALI|NO-VALID|NO-VALIDA|NO-VALIDAT|NOW|'
|
3057
|
+
r'NO-WAIT|NO-WORD-WRAP|NULL|NUM-ALIASES|NUM-ALI|NUM-ALIA|NUM-ALIAS|NUM-ALIASE|'
|
3058
|
+
r'NUM-BUFFERS|NUM-BUTTONS|NUM-BUT|NUM-BUTT|NUM-BUTTO|NUM-BUTTON|'
|
3059
|
+
r'NUM-COLUMNS|NUM-COL|NUM-COLU|NUM-COLUM|NUM-COLUMN|NUM-COPIES|'
|
3060
|
+
r'NUM-DBS|NUM-DROPPED-FILES|NUM-ENTRIES|NUMERIC|'
|
3061
|
+
r'NUMERIC-FORMAT|NUMERIC-F|NUMERIC-FO|NUMERIC-FOR|NUMERIC-FORM|NUMERIC-FORMA|'
|
3062
|
+
r'NUM-FIELDS|NUM-FORMATS|NUM-ITEMS|NUM-ITERATIONS|NUM-LINES|'
|
3063
|
+
r'NUM-LOCKED-COLUMNS|NUM-LOCKED-COL|NUM-LOCKED-COLU|NUM-LOCKED-COLUM|NUM-LOCKED-COLUMN|'
|
3064
|
+
r'NUM-MESSAGES|NUM-PARAMETERS|NUM-REFERENCES|NUM-REPLACED|NUM-RESULTS|NUM-SELECTED-ROWS|'
|
3065
|
+
r'NUM-SELECTED-WIDGETS|NUM-SELECTED|NUM-SELECTED-|NUM-SELECTED-W|NUM-SELECTED-WI|NUM-SELECTED-WID|NUM-SELECTED-WIDG|NUM-SELECTED-WIDGE|NUM-SELECTED-WIDGET|'
|
3066
|
+
r'NUM-TABS|NUM-TO-RETAIN|NUM-VISIBLE-COLUMNS|OCTET-LENGTH|OF|'
|
3067
|
+
r'OFF|OK|OK-CANCEL|OLD|ON|'
|
3068
|
+
r'ON-FRAME-BORDER|ON-FRAME|ON-FRAME-|ON-FRAME-B|ON-FRAME-BO|ON-FRAME-BOR|ON-FRAME-BORD|ON-FRAME-BORDE|'
|
3069
|
+
r'OPEN|OPSYS|OPTION|OR|ORDERED-JOIN|ORDINAL|'
|
3070
|
+
r'OS-APPEND|OS-COMMAND|OS-COPY|OS-CREATE-DIR|OS-DELETE|OS-DIR|'
|
3071
|
+
r'OS-DRIVES|OS-DRIVE|OS-ERROR|OS-GETENV|OS-RENAME|OTHERWISE|'
|
3072
|
+
r'OUTPUT|OVERLAY|OVERRIDE|OWNER|PAGE|'
|
3073
|
+
r'PAGE-BOTTOM|PAGE-BOT|PAGE-BOTT|PAGE-BOTTO|PAGED|'
|
3074
|
+
r'PAGE-NUMBER|PAGE-NUM|PAGE-NUMB|PAGE-NUMBE|PAGE-SIZE|'
|
3075
|
+
r'PAGE-TOP|PAGE-WIDTH|PAGE-WID|PAGE-WIDT|'
|
3076
|
+
r'PARAMETER|PARAM|PARAME|PARAMET|PARAMETE|'
|
3077
|
+
r'PARENT|PARSE-STATUS|PARTIAL-KEY|PASCAL|PASSWORD-FIELD|PATHNAME|PAUSE|'
|
3078
|
+
r'PBE-HASH-ALGORITHM|PBE-HASH-ALG|PBE-HASH-ALGO|PBE-HASH-ALGOR|PBE-HASH-ALGORI|PBE-HASH-ALGORIT|PBE-HASH-ALGORITH|'
|
3079
|
+
r'PBE-KEY-ROUNDS|PDBNAME|PERSISTENT|PERSIST|PERSISTE|PERSISTEN|'
|
3080
|
+
r'PERSISTENT-CACHE-DISABLED|PFCOLOR|PFC|PFCO|PFCOL|PFCOLO|PIXELS|'
|
3081
|
+
r'PIXELS-PER-COLUMN|PIXELS-PER-COL|PIXELS-PER-COLU|PIXELS-PER-COLUM|'
|
3082
|
+
r'PIXELS-PER-ROW|POPUP-MENU|POPUP-M|POPUP-ME|POPUP-MEN|'
|
3083
|
+
r'POPUP-ONLY|POPUP-O|POPUP-ON|POPUP-ONL|PORTRAIT|POSITION|'
|
3084
|
+
r'PRECISION|PREFER-DATASET|PREPARED|PREPARE-STRING|'
|
3085
|
+
r'PREPROCESS|PREPROC|PREPROCE|PREPROCES|'
|
3086
|
+
r'PRESELECT|PRESEL|PRESELE|PRESELEC|PREV|PREV-COLUMN|'
|
3087
|
+
r'PREV-SIBLING|'
|
3088
|
+
r'PREV-TAB-ITEM|PREV-TAB-I|PREV-TAB-IT|PREV-TAB-ITE|'
|
3089
|
+
r'PRIMARY|PRINTER|PRINTER-CONTROL-HANDLE|PRINTER-HDC|'
|
3090
|
+
r'PRINTER-NAME|PRINTER-PORT|PRINTER-SETUP|PRIVATE|'
|
3091
|
+
r'PRIVATE-DATA|PRIVATE-D|PRIVATE-DA|PRIVATE-DAT|'
|
3092
|
+
r'PRIVILEGES|'
|
3093
|
+
r'PROCEDURE|PROCE|PROCED|PROCEDU|PROCEDUR|'
|
3094
|
+
r'PROCEDURE-CALL-TYPE|'
|
3095
|
+
r'PROCESS|'
|
3096
|
+
r'PROC-HANDLE|PROC-HA|PROC-HAN|PROC-HAND|PROC-HANDL|'
|
3097
|
+
r'PROC-STATUS|PROC-ST|PROC-STA|PROC-STAT|PROC-STATU|'
|
3098
|
+
r'proc-text|proc-text-buffer|'
|
3099
|
+
r'PROFILER|PROGRAM-NAME|PROGRESS|'
|
3100
|
+
r'PROGRESS-SOURCE|PROGRESS-S|PROGRESS-SO|PROGRESS-SOU|PROGRESS-SOUR|PROGRESS-SOURC|'
|
3101
|
+
r'PROMPT|PROMPT-FOR|PROMPT-F|PROMPT-FO|PROMSGS|PROPATH|'
|
3102
|
+
r'PROPERTY|PROTECTED|PROVERSION|PROVERS|PROVERSI|PROVERSIO|'
|
3103
|
+
r'PROXY|PROXY-PASSWORD|PROXY-USERID|PUBLIC|PUBLIC-ID|'
|
3104
|
+
r'PUBLISH|PUBLISHED-EVENTS|PUT|PUTBYTE|PUT-BYTE|PUT-DOUBLE|'
|
3105
|
+
r'PUT-FLOAT|PUT-INT64|PUT-KEY-VALUE|PUT-KEY-VAL|PUT-KEY-VALU|PUT-LONG|'
|
3106
|
+
r'PUT-SHORT|PUT-STRING|PUT-UNSIGNED-LONG|QUERY|QUERY-CLOSE|QUERY-OFF-END|'
|
3107
|
+
r'QUERY-OPEN|QUERY-PREPARE|QUERY-TUNING|QUESTION|QUIT|QUOTER|'
|
3108
|
+
r'RADIO-BUTTONS|RADIO-SET|RANDOM|RAW-TRANSFER|'
|
3109
|
+
r'RCODE-INFORMATION|RCODE-INFO|RCODE-INFOR|RCODE-INFORM|RCODE-INFORMA|RCODE-INFORMAT|RCODE-INFORMATI|RCODE-INFORMATIO|'
|
3110
|
+
r'READ-AVAILABLE|READ-EXACT-NUM|READ-FILE|READKEY|READ-ONLY|READ-XML|READ-XMLSCHEMA|'
|
3111
|
+
r'REAL|RECORD-LENGTH|RECTANGLE|RECT|RECTA|RECTAN|RECTANG|RECTANGL|'
|
3112
|
+
r'RECURSIVE|REFERENCE-ONLY|REFRESH|REFRESHABLE|REFRESH-AUDIT-POLICY|'
|
3113
|
+
r'REGISTER-DOMAIN|RELEASE|REMOTE|REMOVE-EVENTS-PROCEDURE|REMOVE-SUPER-PROCEDURE|'
|
3114
|
+
r'REPEAT|REPLACE|REPLACE-SELECTION-TEXT|REPOSITION|REPOSITION-BACKWARD|'
|
3115
|
+
r'REPOSITION-FORWARD|REPOSITION-MODE|REPOSITION-TO-ROW|REPOSITION-TO-ROWID|'
|
3116
|
+
r'REQUEST|RESET|RESIZABLE|RESIZA|RESIZAB|RESIZABL|RESIZE|RESTART-ROW|'
|
3117
|
+
r'RESTART-ROWID|RETAIN|RETAIN-SHAPE|RETRY|RETRY-CANCEL|RETURN|'
|
3118
|
+
r'RETURN-INSERTED|RETURN-INS|RETURN-INSE|RETURN-INSER|RETURN-INSERT|RETURN-INSERTE|'
|
3119
|
+
r'RETURNS|RETURN-TO-START-DIR|RETURN-TO-START-DI|'
|
3120
|
+
r'RETURN-VALUE|RETURN-VAL|RETURN-VALU|'
|
3121
|
+
r'RETURN-VALUE-DATA-TYPE|REVERSE-FROM|REVERT|'
|
3122
|
+
r'REVOKE|RGB-VALUE|RIGHT-ALIGNED|RETURN-ALIGN|RETURN-ALIGNE|'
|
3123
|
+
r'RIGHT-TRIM|R-INDEX|ROLES|ROUND|ROUTINE-LEVEL|ROW|'
|
3124
|
+
r'ROW-HEIGHT-CHARS|HEIGHT|ROW-HEIGHT-PIXELS|HEIGHT-P|ROW-MARKERS|'
|
3125
|
+
r'ROW-OF|ROW-RESIZABLE|RULE|RUN|RUN-PROCEDURE|SAVE|SAVE-AS|'
|
3126
|
+
r'SAVE-FILE|SAX-COMPLETE|SAX-COMPLE|SAX-COMPLET|SAX-PARSE|SAX-PARSE-FIRST|'
|
3127
|
+
r'SAX-PARSE-NEXT|SAX-PARSER-ERROR|SAX-RUNNING|SAX-UNINITIALIZED|'
|
3128
|
+
r'SAX-WRITE-BEGIN|SAX-WRITE-COMPLETE|SAX-WRITE-CONTENT|SAX-WRITE-ELEMENT|'
|
3129
|
+
r'SAX-WRITE-ERROR|SAX-WRITE-IDLE|SAX-WRITER|SAX-WRITE-TAG|SCHEMA|'
|
3130
|
+
r'SCHEMA-LOCATION|SCHEMA-MARSHAL|SCHEMA-PATH|SCREEN|SCREEN-IO|'
|
3131
|
+
r'SCREEN-LINES|SCREEN-VALUE|SCREEN-VAL|SCREEN-VALU|SCROLL|SCROLLABLE|'
|
3132
|
+
r'SCROLLBAR-HORIZONTAL|SCROLLBAR-H|SCROLLBAR-HO|SCROLLBAR-HOR|SCROLLBAR-HORI|SCROLLBAR-HORIZ|SCROLLBAR-HORIZO|SCROLLBAR-HORIZON|SCROLLBAR-HORIZONT|SCROLLBAR-HORIZONTA|'
|
3133
|
+
r'SCROLL-BARS|'
|
3134
|
+
r'SCROLLBAR-VERTICAL|SCROLLBAR-V|SCROLLBAR-VE|SCROLLBAR-VER|SCROLLBAR-VERT|SCROLLBAR-VERTI|SCROLLBAR-VERTIC|SCROLLBAR-VERTICA|'
|
3135
|
+
r'SCROLL-DELTA|'
|
3136
|
+
r'SCROLLED-ROW-POSITION|SCROLLED-ROW-POS|SCROLLED-ROW-POSI|SCROLLED-ROW-POSIT|SCROLLED-ROW-POSITI|SCROLLED-ROW-POSITIO|'
|
3137
|
+
r'SCROLLING|SCROLL-OFFSET|SCROLL-TO-CURRENT-ROW|SCROLL-TO-ITEM|SCROLL-TO-I|SCROLL-TO-IT|SCROLL-TO-ITE|'
|
3138
|
+
r'SCROLL-TO-SELECTED-ROW|SDBNAME|SEAL|SEAL-TIMESTAMP|SEARCH|SEARCH-SELF|SEARCH-TARGET|'
|
3139
|
+
r'SECTION|SECURITY-POLICY|SEEK|SELECT|SELECTABLE|SELECT-ALL|'
|
3140
|
+
r'SELECTED|SELECT-FOCUSED-ROW|SELECTION|SELECTION-END|SELECTION-LIST|'
|
3141
|
+
r'SELECTION-START|SELECTION-TEXT|SELECT-NEXT-ROW|SELECT-PREV-ROW|'
|
3142
|
+
r'SELECT-ROW|SELF|SEND|send-sql-statement|send-sql|SENSITIVE|'
|
3143
|
+
r'SEPARATE-CONNECTION|SEPARATOR-FGCOLOR|SEPARATORS|SERVER|'
|
3144
|
+
r'SERVER-CONNECTION-BOUND|SERVER-CONNECTION-BOUND-REQUEST|'
|
3145
|
+
r'SERVER-CONNECTION-CONTEXT|SERVER-CONNECTION-ID|SERVER-OPERATING-MODE|'
|
3146
|
+
r'SESSION|SESSION-ID|SET|SET-APPL-CONTEXT|SET-ATTR-CALL-TYPE|SET-ATTRIBUTE-NODE|'
|
3147
|
+
r'SET-BLUE-VALUE|SET-BLUE|SET-BLUE-|SET-BLUE-V|SET-BLUE-VA|SET-BLUE-VAL|SET-BLUE-VALU|'
|
3148
|
+
r'SET-BREAK|SET-BUFFERS|SET-CALLBACK|SET-CLIENT|SET-COMMIT|SET-CONTENTS|'
|
3149
|
+
r'SET-CURRENT-VALUE|SET-DB-CLIENT|SET-DYNAMIC|SET-EVENT-MANAGER-OPTION|'
|
3150
|
+
r'SET-GREEN-VALUE|SET-GREEN|SET-GREEN-|SET-GREEN-V|SET-GREEN-VA|SET-GREEN-VAL|SET-GREEN-VALU|'
|
3151
|
+
r'SET-INPUT-SOURCE|SET-OPTION|SET-OUTPUT-DESTINATION|SET-PARAMETER|SET-POINTER-VALUE|'
|
3152
|
+
r'SET-PROPERTY|SET-RED-VALUE|SET-RED|SET-RED-|SET-RED-V|SET-RED-VA|SET-RED-VAL|SET-RED-VALU|'
|
3153
|
+
r'SET-REPOSITIONED-ROW|SET-RGB-VALUE|SET-ROLLBACK|SET-SELECTION|SET-SIZE|'
|
3154
|
+
r'SET-SORT-ARROW|SETUSERID|SETUSER|SETUSERI|SET-WAIT-STATE|SHA1-DIGEST|SHARED|'
|
3155
|
+
r'SHARE-LOCK|SHARE|SHARE-|SHARE-L|SHARE-LO|SHARE-LOC|SHOW-IN-TASKBAR|SHOW-STATS|SHOW-STAT|'
|
3156
|
+
r'SIDE-LABEL-HANDLE|SIDE-LABEL-H|SIDE-LABEL-HA|SIDE-LABEL-HAN|SIDE-LABEL-HAND|SIDE-LABEL-HANDL|'
|
3157
|
+
r'SIDE-LABELS|SIDE-LAB|SIDE-LABE|SIDE-LABEL|'
|
3158
|
+
r'SILENT|SIMPLE|SINGLE|SIZE|'
|
3159
|
+
r'SIZE-CHARS|SIZE-C|SIZE-CH|SIZE-CHA|SIZE-CHAR|'
|
3160
|
+
r'SIZE-PIXELS|SIZE-P|SIZE-PI|SIZE-PIX|SIZE-PIXE|SIZE-PIXEL|SKIP|'
|
3161
|
+
r'SKIP-DELETED-RECORD|SLIDER|SMALL-ICON|SMALLINT|SMALL-TITLE|SOME|SORT|'
|
3162
|
+
r'SORT-ASCENDING|SORT-NUMBER|SOURCE|SOURCE-PROCEDURE|SPACE|SQL|SQRT|'
|
3163
|
+
r'SSL-SERVER-NAME|STANDALONE|START|START-DOCUMENT|START-ELEMENT|START-MOVE|'
|
3164
|
+
r'START-RESIZE|START-ROW-RESIZE|STATE-DETAIL|STATIC|STATUS|STATUS-AREA|STATUS-AREA-FONT|'
|
3165
|
+
r'STDCALL|STOP|STOP-PARSING|STOPPED|STOPPE|'
|
3166
|
+
r'STORED-PROCEDURE|STORED-PROC|STORED-PROCE|STORED-PROCED|STORED-PROCEDU|STORED-PROCEDUR|'
|
3167
|
+
r'STREAM|STREAM-HANDLE|STREAM-IO|STRETCH-TO-FIT|STRICT|STRING|STRING-VALUE|STRING-XREF|'
|
3168
|
+
r'SUB-AVERAGE|SUB-AVE|SUB-AVER|SUB-AVERA|SUB-AVERAG|'
|
3169
|
+
r'SUB-COUNT|SUB-MAXIMUM|SUM-MAX|SUM-MAXI|SUM-MAXIM|SUM-MAXIMU|SUB-MENU|SUBSUB-|'
|
3170
|
+
r'MINIMUM|SUB-MIN|SUBSCRIBE|SUBSTITUTE|SUBST|SUBSTI|SUBSTIT|SUBSTITU|SUBSTITUT|'
|
3171
|
+
r'SUBSTRING|SUBSTR|SUBSTRI|SUBSTRIN|SUB-TOTAL|SUBTYPE|SUM|SUPER|SUPER-PROCEDURES|'
|
3172
|
+
r'SUPPRESS-NAMESPACE-PROCESSING|'
|
3173
|
+
r'SUPPRESS-WARNINGS|SUPPRESS-W|SUPPRESS-WA|SUPPRESS-WAR|SUPPRESS-WARN|SUPPRESS-WARNI|SUPPRESS-WARNIN|SUPPRESS-WARNING|'
|
3174
|
+
r'SYMMETRIC-ENCRYPTION-ALGORITHM|SYMMETRIC-ENCRYPTION-IV|SYMMETRIC-ENCRYPTION-KEY|SYMMETRIC-SUPPORT|'
|
3175
|
+
r'SYSTEM-ALERT-BOXES|SYSTEM-ALERT|SYSTEM-ALERT-|SYSTEM-ALERT-B|SYSTEM-ALERT-BO|SYSTEM-ALERT-BOX|SYSTEM-ALERT-BOXE|'
|
3176
|
+
r'SYSTEM-DIALOG|SYSTEM-HELP|SYSTEM-ID|TABLE|TABLE-HANDLE|TABLE-NUMBER|TAB-POSITION|'
|
3177
|
+
r'TAB-STOP|TARGET|TARGET-PROCEDURE|'
|
3178
|
+
r'TEMP-DIRECTORY|TEMP-DIR|TEMP-DIRE|TEMP-DIREC|TEMP-DIRECT|TEMP-DIRECTO|TEMP-DIRECTOR|'
|
3179
|
+
r'TEMP-TABLE|TEMP-TABLE-PREPARE|TERM|TERMINAL|TERM|TERMI|TERMIN|TERMINA|'
|
3180
|
+
r'TERMINATE|TEXT|TEXT-CURSOR|TEXT-SEG-GROW|TEXT-SELECTED|THEN|'
|
3181
|
+
r'THIS-OBJECT|THIS-PROCEDURE|THREE-D|THROW|THROUGH|THRU|TIC-MARKS|TIME|'
|
3182
|
+
r'TIME-SOURCE|TITLE|'
|
3183
|
+
r'TITLE-BGCOLOR|TITLE-BGC|TITLE-BGCO|TITLE-BGCOL|TITLE-BGCOLO|'
|
3184
|
+
r'TITLE-DCOLOR|TITLE-DC|TITLE-DCO|TITLE-DCOL|TITLE-DCOLO|'
|
3185
|
+
r'TITLE-FGCOLOR|TITLE-FGC|TITLE-FGCO|TITLE-FGCOL|TITLE-FGCOLO|'
|
3186
|
+
r'TITLE-FONT|TITLE-FO|TITLE-FON|'
|
3187
|
+
r'TO|TODAY|TOGGLE-BOX|TOOLTIP|TOOLTIPS|TOPIC|TOP-NAV-QUERY|TOP-ONLY|'
|
3188
|
+
r'TO-ROWID|TOTAL|TRAILING|TRANS|TRANSACTION|TRANSACTION-MODE|'
|
3189
|
+
r'TRANS-INIT-PROCEDURE|TRANSPARENT|TRIGGER|TRIGGERS|TRIM|'
|
3190
|
+
r'TRUE|TRUNCATE|TRUNC|TRUNCA|TRUNCAT|TYPE|TYPE-OF|'
|
3191
|
+
r'UNBOX|UNBUFFERED|UNBUFF|UNBUFFE|UNBUFFER|UNBUFFERE|'
|
3192
|
+
r'UNDERLINE|UNDERL|UNDERLI|UNDERLIN|UNDO|'
|
3193
|
+
r'UNFORMATTED|UNFORM|UNFORMA|UNFORMAT|UNFORMATT|UNFORMATTE|UNION|'
|
3194
|
+
r'UNIQUE|UNIQUE-ID|UNIQUE-MATCH|UNIX|UNLESS-HIDDEN|UNLOAD|'
|
3195
|
+
r'UNSIGNED-LONG|UNSUBSCRIBE|UP|UPDATE|UPDATE-ATTRIBUTE|'
|
3196
|
+
r'URL|URL-DECODE|URL-ENCODE|URL-PASSWORD|URL-USERID|USE|'
|
3197
|
+
r'USE-DICT-EXPS|USE-FILENAME|USE-INDEX|USER|USE-REVVIDEO|'
|
3198
|
+
r'USERID|USER-ID|USE-TEXT|USE-UNDERLINE|USE-WIDGET-POOL|'
|
3199
|
+
r'USING|V6DISPLAY|V6FRAME|VALIDATE|VALIDATE-EXPRESSION|'
|
3200
|
+
r'VALIDATE-MESSAGE|VALIDATE-SEAL|VALIDATION-ENABLED|VALID-EVENT|'
|
3201
|
+
r'VALID-HANDLE|VALID-OBJECT|VALUE|VALUE-CHANGED|VALUES|'
|
3202
|
+
r'VARIABLE|VAR|VARI|VARIA|VARIAB|VARIABL|VERBOSE|'
|
3203
|
+
r'VERSION|VERTICAL|VERT|VERTI|VERTIC|VERTICA|'
|
3204
|
+
r'VIEW|VIEW-AS|VIEW-FIRST-COLUMN-ON-REOPEN|'
|
3205
|
+
r'VIRTUAL-HEIGHT-CHARS|VIRTUAL-HEIGHT|VIRTUAL-HEIGHT-|VIRTUAL-HEIGHT-C|VIRTUAL-HEIGHT-CH|VIRTUAL-HEIGHT-CHA|VIRTUAL-HEIGHT-CHAR|'
|
3206
|
+
r'VIRTUAL-HEIGHT-PIXELS|VIRTUAL-HEIGHT-P|VIRTUAL-HEIGHT-PI|VIRTUAL-HEIGHT-PIX|VIRTUAL-HEIGHT-PIXE|VIRTUAL-HEIGHT-PIXEL|'
|
3207
|
+
r'VIRTUAL-WIDTH-CHARS|VIRTUAL-WIDTH|VIRTUAL-WIDTH-|VIRTUAL-WIDTH-C|VIRTUAL-WIDTH-CH|VIRTUAL-WIDTH-CHA|VIRTUAL-WIDTH-CHAR|'
|
3208
|
+
r'VIRTUAL-WIDTH-PIXELS|VIRTUAL-WIDTH-P|VIRTUAL-WIDTH-PI|VIRTUAL-WIDTH-PIX|VIRTUAL-WIDTH-PIXE|VIRTUAL-WIDTH-PIXEL|'
|
3209
|
+
r'VISIBLE|VOID|WAIT|WAIT-FOR|WARNING|WEB-CONTEXT|WEEKDAY|WHEN|'
|
3210
|
+
r'WHERE|WHILE|WIDGET|'
|
3211
|
+
r'WIDGET-ENTER|WIDGET-E|WIDGET-EN|WIDGET-ENT|WIDGET-ENTE|'
|
3212
|
+
r'WIDGET-ID|'
|
3213
|
+
r'WIDGET-LEAVE|WIDGET-L|WIDGET-LE|WIDGET-LEA|WIDGET-LEAV|'
|
3214
|
+
r'WIDGET-POOL|WIDTH|'
|
3215
|
+
r'WIDTH-CHARS|WIDTH|WIDTH-|WIDTH-C|WIDTH-CH|WIDTH-CHA|WIDTH-CHAR|'
|
3216
|
+
r'WIDTH-PIXELS|WIDTH-P|WIDTH-PI|WIDTH-PIX|WIDTH-PIXE|WIDTH-PIXEL|'
|
3217
|
+
r'WINDOW|'
|
3218
|
+
r'WINDOW-MAXIMIZED|WINDOW-MAXIM|WINDOW-MAXIMI|WINDOW-MAXIMIZ|WINDOW-MAXIMIZE|'
|
3219
|
+
r'WINDOW-MINIMIZED|WINDOW-MINIM|WINDOW-MINIMI|WINDOW-MINIMIZ|WINDOW-MINIMIZE|'
|
3220
|
+
r'WINDOW-NAME|WINDOW-NORMAL|WINDOW-STATE|WINDOW-STA|WINDOW-STAT|'
|
3221
|
+
r'WINDOW-SYSTEM|WITH|WORD-INDEX|WORD-WRAP|WORK-AREA-HEIGHT-PIXELS|'
|
3222
|
+
r'WORK-AREA-WIDTH-PIXELS|WORK-AREA-X|WORK-AREA-Y|WORKFILE|'
|
3223
|
+
r'WORK-TABLE|WORK-TAB|WORK-TABL|WRITE|WRITE-CDATA|WRITE-CHARACTERS|'
|
3224
|
+
r'WRITE-COMMENT|WRITE-DATA-ELEMENT|WRITE-EMPTY-ELEMENT|WRITE-ENTITY-REF|'
|
3225
|
+
r'WRITE-EXTERNAL-DTD|WRITE-FRAGMENT|WRITE-MESSAGE|'
|
3226
|
+
r'WRITE-PROCESSING-INSTRUCTION|WRITE-STATUS|WRITE-XML|WRITE-XMLSCHEMA|'
|
3227
|
+
r'X|XCODE|XML-DATA-TYPE|XML-NODE-TYPE|XML-SCHEMA-PATH|'
|
3228
|
+
r'XML-SUPPRESS-NAMESPACE-PROCESSING|X-OF|XREF|'
|
3229
|
+
r'XREF-XML|Y|YEAR|YEAR-OFFSET|YES|YES-NO|'
|
3230
|
+
r'YES-NO-CANCEL|Y-OF)\s*($|(?=[^0-9a-z_\-]))')
|
3231
|
+
|
3232
|
+
tokens = {
|
3233
|
+
'root': [
|
3234
|
+
(r'/\*', Comment.Multiline, 'comment'),
|
3235
|
+
(r'\{', Comment.Preproc, 'preprocessor'),
|
3236
|
+
(r'\s*&.*', Comment.Preproc),
|
3237
|
+
(r'0[xX][0-9a-fA-F]+[LlUu]*', Number.Hex),
|
3238
|
+
(r'(?i)(DEFINE|DEF|DEFI|DEFIN)\b', Keyword.Declaration),
|
3239
|
+
(types, Keyword.Type),
|
3240
|
+
(keywords, Name.Builtin),
|
3241
|
+
(r'"(\\\\|\\"|[^"])*"', String.Double),
|
3242
|
+
(r"'(\\\\|\\'|[^'])*'", String.Single),
|
3243
|
+
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
|
3244
|
+
(r'[0-9]+', Number.Integer),
|
3245
|
+
(r'\s+', Text),
|
3246
|
+
(r'[+*/=-]', Operator),
|
3247
|
+
(r'[.:()]', Punctuation),
|
3248
|
+
(r'.', Name.Variable), # Lazy catch-all
|
3249
|
+
],
|
3250
|
+
'comment': [
|
3251
|
+
(r'[^*/]', Comment.Multiline),
|
3252
|
+
(r'/\*', Comment.Multiline, '#push'),
|
3253
|
+
(r'\*/', Comment.Multiline, '#pop'),
|
3254
|
+
(r'[*/]', Comment.Multiline)
|
3255
|
+
],
|
3256
|
+
'preprocessor': [
|
3257
|
+
(r'[^{}]', Comment.Preproc),
|
3258
|
+
(r'{', Comment.Preproc, '#push'),
|
3259
|
+
(r'}', Comment.Preproc, '#pop'),
|
3260
|
+
],
|
3261
|
+
}
|
3262
|
+
|
3263
|
+
|
3264
|
+
class BroLexer(RegexLexer):
|
3265
|
+
"""
|
3266
|
+
For `Bro <http://bro-ids.org/>`_ scripts.
|
3267
|
+
|
3268
|
+
*New in Pygments 1.5.*
|
3269
|
+
"""
|
3270
|
+
name = 'Bro'
|
3271
|
+
aliases = ['bro']
|
3272
|
+
filenames = ['*.bro']
|
3273
|
+
|
3274
|
+
_hex = r'[0-9a-fA-F_]+'
|
3275
|
+
_float = r'((\d*\.?\d+)|(\d+\.?\d*))([eE][-+]?\d+)?'
|
3276
|
+
_h = r'[A-Za-z0-9][-A-Za-z0-9]*'
|
3277
|
+
|
3278
|
+
tokens = {
|
3279
|
+
'root': [
|
3280
|
+
# Whitespace
|
3281
|
+
(r'^@.*?\n', Comment.Preproc),
|
3282
|
+
(r'#.*?\n', Comment.Single),
|
3283
|
+
(r'\n', Text),
|
3284
|
+
(r'\s+', Text),
|
3285
|
+
(r'\\\n', Text),
|
3286
|
+
# Keywords
|
3287
|
+
(r'(add|alarm|break|case|const|continue|delete|do|else|enum|event'
|
3288
|
+
r'|export|for|function|if|global|local|module|next'
|
3289
|
+
r'|of|print|redef|return|schedule|type|when|while)\b', Keyword),
|
3290
|
+
(r'(addr|any|bool|count|counter|double|file|int|interval|net'
|
3291
|
+
r'|pattern|port|record|set|string|subnet|table|time|timer'
|
3292
|
+
r'|vector)\b', Keyword.Type),
|
3293
|
+
(r'(T|F)\b', Keyword.Constant),
|
3294
|
+
(r'(&)((?:add|delete|expire)_func|attr|(create|read|write)_expire'
|
3295
|
+
r'|default|disable_print_hook|raw_output|encrypt|group|log'
|
3296
|
+
r'|mergeable|optional|persistent|priority|redef'
|
3297
|
+
r'|rotate_(?:interval|size)|synchronized)\b', bygroups(Punctuation,
|
3298
|
+
Keyword)),
|
3299
|
+
(r'\s+module\b', Keyword.Namespace),
|
3300
|
+
# Addresses, ports and networks
|
3301
|
+
(r'\d+/(tcp|udp|icmp|unknown)\b', Number),
|
3302
|
+
(r'(\d+\.){3}\d+', Number),
|
3303
|
+
(r'(' + _hex + r'){7}' + _hex, Number),
|
3304
|
+
(r'0x' + _hex + r'(' + _hex + r'|:)*::(' + _hex + r'|:)*', Number),
|
3305
|
+
(r'((\d+|:)(' + _hex + r'|:)*)?::(' + _hex + r'|:)*', Number),
|
3306
|
+
(r'(\d+\.\d+\.|(\d+\.){2}\d+)', Number),
|
3307
|
+
# Hostnames
|
3308
|
+
(_h + r'(\.' + _h + r')+', String),
|
3309
|
+
# Numeric
|
3310
|
+
(_float + r'\s+(day|hr|min|sec|msec|usec)s?\b', Literal.Date),
|
3311
|
+
(r'0[xX]' + _hex, Number.Hex),
|
3312
|
+
(_float, Number.Float),
|
3313
|
+
(r'\d+', Number.Integer),
|
3314
|
+
(r'/', String.Regex, 'regex'),
|
3315
|
+
(r'"', String, 'string'),
|
3316
|
+
# Operators
|
3317
|
+
(r'[!%*/+:<=>?~|-]', Operator),
|
3318
|
+
(r'([-+=&|]{2}|[+=!><-]=)', Operator),
|
3319
|
+
(r'(in|match)\b', Operator.Word),
|
3320
|
+
(r'[{}()\[\]$.,;]', Punctuation),
|
3321
|
+
# Identfier
|
3322
|
+
(r'([_a-zA-Z]\w*)(::)', bygroups(Name, Name.Namespace)),
|
3323
|
+
(r'[a-zA-Z_][a-zA-Z_0-9]*', Name)
|
3324
|
+
],
|
3325
|
+
'string': [
|
3326
|
+
(r'"', String, '#pop'),
|
3327
|
+
(r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
|
3328
|
+
(r'[^\\"\n]+', String),
|
3329
|
+
(r'\\\n', String),
|
3330
|
+
(r'\\', String)
|
3331
|
+
],
|
3332
|
+
'regex': [
|
3333
|
+
(r'/', String.Regex, '#pop'),
|
3334
|
+
(r'\\[\\nt/]', String.Regex), # String.Escape is too intense here.
|
3335
|
+
(r'[^\\/\n]+', String.Regex),
|
3336
|
+
(r'\\\n', String.Regex),
|
3337
|
+
(r'\\', String.Regex)
|
3338
|
+
]
|
3339
|
+
}
|