nano-clean-pkg 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/nano-clean-pkg.gemspec +11 -0
- data/rouge-5.0.0/Gemfile +48 -0
- data/rouge-5.0.0/LICENSE +187 -0
- data/rouge-5.0.0/bin/rougify +17 -0
- data/rouge-5.0.0/lib/rouge/cli.rb +527 -0
- data/rouge-5.0.0/lib/rouge/demos/abap +32 -0
- data/rouge-5.0.0/lib/rouge/demos/actionscript +4 -0
- data/rouge-5.0.0/lib/rouge/demos/ada +26 -0
- data/rouge-5.0.0/lib/rouge/demos/apache +21 -0
- data/rouge-5.0.0/lib/rouge/demos/apex +9 -0
- data/rouge-5.0.0/lib/rouge/demos/apiblueprint +33 -0
- data/rouge-5.0.0/lib/rouge/demos/applescript +2 -0
- data/rouge-5.0.0/lib/rouge/demos/armasm +12 -0
- data/rouge-5.0.0/lib/rouge/demos/augeas +16 -0
- data/rouge-5.0.0/lib/rouge/demos/awk +4 -0
- data/rouge-5.0.0/lib/rouge/demos/batchfile +3 -0
- data/rouge-5.0.0/lib/rouge/demos/bbcbasic +6 -0
- data/rouge-5.0.0/lib/rouge/demos/bibtex +12 -0
- data/rouge-5.0.0/lib/rouge/demos/bicep +10 -0
- data/rouge-5.0.0/lib/rouge/demos/biml +38 -0
- data/rouge-5.0.0/lib/rouge/demos/bpf +7 -0
- data/rouge-5.0.0/lib/rouge/demos/brainfuck +5 -0
- data/rouge-5.0.0/lib/rouge/demos/brightscript +6 -0
- data/rouge-5.0.0/lib/rouge/demos/bsl +7 -0
- data/rouge-5.0.0/lib/rouge/demos/c +8 -0
- data/rouge-5.0.0/lib/rouge/demos/ceylon +7 -0
- data/rouge-5.0.0/lib/rouge/demos/cfscript +18 -0
- data/rouge-5.0.0/lib/rouge/demos/cisco_ios +19 -0
- data/rouge-5.0.0/lib/rouge/demos/clean +6 -0
- data/rouge-5.0.0/lib/rouge/demos/clojure +5 -0
- data/rouge-5.0.0/lib/rouge/demos/cmake +7 -0
- data/rouge-5.0.0/lib/rouge/demos/cmhg +8 -0
- data/rouge-5.0.0/lib/rouge/demos/cobol +103 -0
- data/rouge-5.0.0/lib/rouge/demos/codeowners +6 -0
- data/rouge-5.0.0/lib/rouge/demos/coffeescript +5 -0
- data/rouge-5.0.0/lib/rouge/demos/common_lisp +1 -0
- data/rouge-5.0.0/lib/rouge/demos/conf +4 -0
- data/rouge-5.0.0/lib/rouge/demos/console +6 -0
- data/rouge-5.0.0/lib/rouge/demos/cpp +8 -0
- data/rouge-5.0.0/lib/rouge/demos/crystal +45 -0
- data/rouge-5.0.0/lib/rouge/demos/csharp +5 -0
- data/rouge-5.0.0/lib/rouge/demos/css +4 -0
- data/rouge-5.0.0/lib/rouge/demos/csvs +8 -0
- data/rouge-5.0.0/lib/rouge/demos/cuda +11 -0
- data/rouge-5.0.0/lib/rouge/demos/cypher +5 -0
- data/rouge-5.0.0/lib/rouge/demos/cython +6 -0
- data/rouge-5.0.0/lib/rouge/demos/d +16 -0
- data/rouge-5.0.0/lib/rouge/demos/dafny +16 -0
- data/rouge-5.0.0/lib/rouge/demos/dart +6 -0
- data/rouge-5.0.0/lib/rouge/demos/datastudio +20 -0
- data/rouge-5.0.0/lib/rouge/demos/diff +7 -0
- data/rouge-5.0.0/lib/rouge/demos/digdag +19 -0
- data/rouge-5.0.0/lib/rouge/demos/docker +9 -0
- data/rouge-5.0.0/lib/rouge/demos/dot +5 -0
- data/rouge-5.0.0/lib/rouge/demos/dylan +8 -0
- data/rouge-5.0.0/lib/rouge/demos/ecl +17 -0
- data/rouge-5.0.0/lib/rouge/demos/eex +1 -0
- data/rouge-5.0.0/lib/rouge/demos/eiffel +30 -0
- data/rouge-5.0.0/lib/rouge/demos/elixir +1 -0
- data/rouge-5.0.0/lib/rouge/demos/elm +4 -0
- data/rouge-5.0.0/lib/rouge/demos/email +11 -0
- data/rouge-5.0.0/lib/rouge/demos/epp +4 -0
- data/rouge-5.0.0/lib/rouge/demos/erb +1 -0
- data/rouge-5.0.0/lib/rouge/demos/erlang +7 -0
- data/rouge-5.0.0/lib/rouge/demos/escape +3 -0
- data/rouge-5.0.0/lib/rouge/demos/factor +5 -0
- data/rouge-5.0.0/lib/rouge/demos/fluent +13 -0
- data/rouge-5.0.0/lib/rouge/demos/fortran +22 -0
- data/rouge-5.0.0/lib/rouge/demos/freefem +16 -0
- data/rouge-5.0.0/lib/rouge/demos/fsharp +12 -0
- data/rouge-5.0.0/lib/rouge/demos/gdscript +18 -0
- data/rouge-5.0.0/lib/rouge/demos/ghc-cmm +23 -0
- data/rouge-5.0.0/lib/rouge/demos/ghc-core +26 -0
- data/rouge-5.0.0/lib/rouge/demos/gherkin +17 -0
- data/rouge-5.0.0/lib/rouge/demos/gjs +23 -0
- data/rouge-5.0.0/lib/rouge/demos/glsl +14 -0
- data/rouge-5.0.0/lib/rouge/demos/go +7 -0
- data/rouge-5.0.0/lib/rouge/demos/gradle +10 -0
- data/rouge-5.0.0/lib/rouge/demos/graphql +17 -0
- data/rouge-5.0.0/lib/rouge/demos/groovy +9 -0
- data/rouge-5.0.0/lib/rouge/demos/gts +36 -0
- data/rouge-5.0.0/lib/rouge/demos/hack +5 -0
- data/rouge-5.0.0/lib/rouge/demos/haml +5 -0
- data/rouge-5.0.0/lib/rouge/demos/handlebars +7 -0
- data/rouge-5.0.0/lib/rouge/demos/haskell +6 -0
- data/rouge-5.0.0/lib/rouge/demos/haxe +4 -0
- data/rouge-5.0.0/lib/rouge/demos/hcl +7 -0
- data/rouge-5.0.0/lib/rouge/demos/hlsl +20 -0
- data/rouge-5.0.0/lib/rouge/demos/hocon +8 -0
- data/rouge-5.0.0/lib/rouge/demos/hql +5 -0
- data/rouge-5.0.0/lib/rouge/demos/html +8 -0
- data/rouge-5.0.0/lib/rouge/demos/http +14 -0
- data/rouge-5.0.0/lib/rouge/demos/hylang +10 -0
- data/rouge-5.0.0/lib/rouge/demos/idlang +8 -0
- data/rouge-5.0.0/lib/rouge/demos/idris +13 -0
- data/rouge-5.0.0/lib/rouge/demos/iecst +21 -0
- data/rouge-5.0.0/lib/rouge/demos/igorpro +9 -0
- data/rouge-5.0.0/lib/rouge/demos/ini +4 -0
- data/rouge-5.0.0/lib/rouge/demos/io +11 -0
- data/rouge-5.0.0/lib/rouge/demos/irb +4 -0
- data/rouge-5.0.0/lib/rouge/demos/irb_output +2 -0
- data/rouge-5.0.0/lib/rouge/demos/isabelle +16 -0
- data/rouge-5.0.0/lib/rouge/demos/isbl +4 -0
- data/rouge-5.0.0/lib/rouge/demos/j +12 -0
- data/rouge-5.0.0/lib/rouge/demos/janet +3 -0
- data/rouge-5.0.0/lib/rouge/demos/java +5 -0
- data/rouge-5.0.0/lib/rouge/demos/javascript +1 -0
- data/rouge-5.0.0/lib/rouge/demos/jinja +9 -0
- data/rouge-5.0.0/lib/rouge/demos/jsl +3 -0
- data/rouge-5.0.0/lib/rouge/demos/json +1 -0
- data/rouge-5.0.0/lib/rouge/demos/json-doc +1 -0
- data/rouge-5.0.0/lib/rouge/demos/json5 +12 -0
- data/rouge-5.0.0/lib/rouge/demos/jsonnet +28 -0
- data/rouge-5.0.0/lib/rouge/demos/jsp +29 -0
- data/rouge-5.0.0/lib/rouge/demos/jsx +17 -0
- data/rouge-5.0.0/lib/rouge/demos/julia +11 -0
- data/rouge-5.0.0/lib/rouge/demos/kick_assembler +14 -0
- data/rouge-5.0.0/lib/rouge/demos/kotlin +3 -0
- data/rouge-5.0.0/lib/rouge/demos/lasso +12 -0
- data/rouge-5.0.0/lib/rouge/demos/lean +8 -0
- data/rouge-5.0.0/lib/rouge/demos/liquid +10 -0
- data/rouge-5.0.0/lib/rouge/demos/literate_coffeescript +3 -0
- data/rouge-5.0.0/lib/rouge/demos/literate_haskell +7 -0
- data/rouge-5.0.0/lib/rouge/demos/livescript +15 -0
- data/rouge-5.0.0/lib/rouge/demos/llvm +20 -0
- data/rouge-5.0.0/lib/rouge/demos/lua +12 -0
- data/rouge-5.0.0/lib/rouge/demos/lustre +6 -0
- data/rouge-5.0.0/lib/rouge/demos/lutin +18 -0
- data/rouge-5.0.0/lib/rouge/demos/m68k +16 -0
- data/rouge-5.0.0/lib/rouge/demos/magik +6 -0
- data/rouge-5.0.0/lib/rouge/demos/make +6 -0
- data/rouge-5.0.0/lib/rouge/demos/markdown +4 -0
- data/rouge-5.0.0/lib/rouge/demos/mason +22 -0
- data/rouge-5.0.0/lib/rouge/demos/mathematica +8 -0
- data/rouge-5.0.0/lib/rouge/demos/matlab +6 -0
- data/rouge-5.0.0/lib/rouge/demos/meson +10 -0
- data/rouge-5.0.0/lib/rouge/demos/minizinc +23 -0
- data/rouge-5.0.0/lib/rouge/demos/mojo +10 -0
- data/rouge-5.0.0/lib/rouge/demos/moonscript +16 -0
- data/rouge-5.0.0/lib/rouge/demos/mosel +10 -0
- data/rouge-5.0.0/lib/rouge/demos/msgtrans +4 -0
- data/rouge-5.0.0/lib/rouge/demos/mxml +22 -0
- data/rouge-5.0.0/lib/rouge/demos/nasm +26 -0
- data/rouge-5.0.0/lib/rouge/demos/nesasm +11 -0
- data/rouge-5.0.0/lib/rouge/demos/nginx +5 -0
- data/rouge-5.0.0/lib/rouge/demos/nial +35 -0
- data/rouge-5.0.0/lib/rouge/demos/nim +27 -0
- data/rouge-5.0.0/lib/rouge/demos/nix +19 -0
- data/rouge-5.0.0/lib/rouge/demos/objective_c +18 -0
- data/rouge-5.0.0/lib/rouge/demos/objective_cpp +17 -0
- data/rouge-5.0.0/lib/rouge/demos/ocaml +12 -0
- data/rouge-5.0.0/lib/rouge/demos/ocl +4 -0
- data/rouge-5.0.0/lib/rouge/demos/openedge +4 -0
- data/rouge-5.0.0/lib/rouge/demos/opentype_feature_file +5 -0
- data/rouge-5.0.0/lib/rouge/demos/p4 +99 -0
- data/rouge-5.0.0/lib/rouge/demos/pascal +14 -0
- data/rouge-5.0.0/lib/rouge/demos/pdf +29 -0
- data/rouge-5.0.0/lib/rouge/demos/perl +5 -0
- data/rouge-5.0.0/lib/rouge/demos/php +3 -0
- data/rouge-5.0.0/lib/rouge/demos/plaintext +1 -0
- data/rouge-5.0.0/lib/rouge/demos/plist +11 -0
- data/rouge-5.0.0/lib/rouge/demos/plsql +2 -0
- data/rouge-5.0.0/lib/rouge/demos/pony +17 -0
- data/rouge-5.0.0/lib/rouge/demos/postscript +9 -0
- data/rouge-5.0.0/lib/rouge/demos/powershell +13 -0
- data/rouge-5.0.0/lib/rouge/demos/praat +26 -0
- data/rouge-5.0.0/lib/rouge/demos/prolog +9 -0
- data/rouge-5.0.0/lib/rouge/demos/prometheus +9 -0
- data/rouge-5.0.0/lib/rouge/demos/properties +7 -0
- data/rouge-5.0.0/lib/rouge/demos/protobuf +5 -0
- data/rouge-5.0.0/lib/rouge/demos/puppet +6 -0
- data/rouge-5.0.0/lib/rouge/demos/python +6 -0
- data/rouge-5.0.0/lib/rouge/demos/q +8 -0
- data/rouge-5.0.0/lib/rouge/demos/qml +9 -0
- data/rouge-5.0.0/lib/rouge/demos/r +8 -0
- data/rouge-5.0.0/lib/rouge/demos/racket +24 -0
- data/rouge-5.0.0/lib/rouge/demos/reasonml +12 -0
- data/rouge-5.0.0/lib/rouge/demos/rego +8 -0
- data/rouge-5.0.0/lib/rouge/demos/rescript +26 -0
- data/rouge-5.0.0/lib/rouge/demos/rml +33 -0
- data/rouge-5.0.0/lib/rouge/demos/robot_framework +27 -0
- data/rouge-5.0.0/lib/rouge/demos/rocq +16 -0
- data/rouge-5.0.0/lib/rouge/demos/ruby +9 -0
- data/rouge-5.0.0/lib/rouge/demos/rust +12 -0
- data/rouge-5.0.0/lib/rouge/demos/sas +13 -0
- data/rouge-5.0.0/lib/rouge/demos/sass +3 -0
- data/rouge-5.0.0/lib/rouge/demos/scala +3 -0
- data/rouge-5.0.0/lib/rouge/demos/scheme +4 -0
- data/rouge-5.0.0/lib/rouge/demos/scss +5 -0
- data/rouge-5.0.0/lib/rouge/demos/sed +4 -0
- data/rouge-5.0.0/lib/rouge/demos/shell +2 -0
- data/rouge-5.0.0/lib/rouge/demos/sieve +10 -0
- data/rouge-5.0.0/lib/rouge/demos/slice +10 -0
- data/rouge-5.0.0/lib/rouge/demos/slim +17 -0
- data/rouge-5.0.0/lib/rouge/demos/smalltalk +6 -0
- data/rouge-5.0.0/lib/rouge/demos/smarty +11 -0
- data/rouge-5.0.0/lib/rouge/demos/sml +4 -0
- data/rouge-5.0.0/lib/rouge/demos/sparql +6 -0
- data/rouge-5.0.0/lib/rouge/demos/sqf +14 -0
- data/rouge-5.0.0/lib/rouge/demos/sql +1 -0
- data/rouge-5.0.0/lib/rouge/demos/ssh +4 -0
- data/rouge-5.0.0/lib/rouge/demos/stan +13 -0
- data/rouge-5.0.0/lib/rouge/demos/stata +14 -0
- data/rouge-5.0.0/lib/rouge/demos/supercollider +11 -0
- data/rouge-5.0.0/lib/rouge/demos/svelte +29 -0
- data/rouge-5.0.0/lib/rouge/demos/swift +5 -0
- data/rouge-5.0.0/lib/rouge/demos/systemd +4 -0
- data/rouge-5.0.0/lib/rouge/demos/syzlang +15 -0
- data/rouge-5.0.0/lib/rouge/demos/syzprog +8 -0
- data/rouge-5.0.0/lib/rouge/demos/tap +5 -0
- data/rouge-5.0.0/lib/rouge/demos/tcl +1 -0
- data/rouge-5.0.0/lib/rouge/demos/terraform +16 -0
- data/rouge-5.0.0/lib/rouge/demos/tex +1 -0
- data/rouge-5.0.0/lib/rouge/demos/thrift +15 -0
- data/rouge-5.0.0/lib/rouge/demos/toml +9 -0
- data/rouge-5.0.0/lib/rouge/demos/tsx +17 -0
- data/rouge-5.0.0/lib/rouge/demos/ttcn3 +6 -0
- data/rouge-5.0.0/lib/rouge/demos/tulip +13 -0
- data/rouge-5.0.0/lib/rouge/demos/turtle +26 -0
- data/rouge-5.0.0/lib/rouge/demos/twig +9 -0
- data/rouge-5.0.0/lib/rouge/demos/typescript +1 -0
- data/rouge-5.0.0/lib/rouge/demos/vala +8 -0
- data/rouge-5.0.0/lib/rouge/demos/vb +4 -0
- data/rouge-5.0.0/lib/rouge/demos/vcl +12 -0
- data/rouge-5.0.0/lib/rouge/demos/velocity +9 -0
- data/rouge-5.0.0/lib/rouge/demos/verilog +27 -0
- data/rouge-5.0.0/lib/rouge/demos/veryl +24 -0
- data/rouge-5.0.0/lib/rouge/demos/vhdl +23 -0
- data/rouge-5.0.0/lib/rouge/demos/viml +14 -0
- data/rouge-5.0.0/lib/rouge/demos/vue +11 -0
- data/rouge-5.0.0/lib/rouge/demos/wollok +11 -0
- data/rouge-5.0.0/lib/rouge/demos/xml +2 -0
- data/rouge-5.0.0/lib/rouge/demos/xojo +14 -0
- data/rouge-5.0.0/lib/rouge/demos/xpath +2 -0
- data/rouge-5.0.0/lib/rouge/demos/xquery +22 -0
- data/rouge-5.0.0/lib/rouge/demos/yaml +4 -0
- data/rouge-5.0.0/lib/rouge/demos/yang +17 -0
- data/rouge-5.0.0/lib/rouge/demos/zig +6 -0
- data/rouge-5.0.0/lib/rouge/eager.rb +3 -0
- data/rouge-5.0.0/lib/rouge/formatter.rb +112 -0
- data/rouge-5.0.0/lib/rouge/formatters/html.rb +64 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_debug.rb +16 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_inline.rb +30 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_legacy.rb +56 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_legacy_table.rb +57 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_line_highlighter.rb +31 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_line_table.rb +56 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_linewise.rb +31 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_pygments.rb +23 -0
- data/rouge-5.0.0/lib/rouge/formatters/html_table.rb +77 -0
- data/rouge-5.0.0/lib/rouge/formatters/null.rb +20 -0
- data/rouge-5.0.0/lib/rouge/formatters/terminal256.rb +198 -0
- data/rouge-5.0.0/lib/rouge/formatters/terminal_truecolor.rb +37 -0
- data/rouge-5.0.0/lib/rouge/formatters/tex.rb +92 -0
- data/rouge-5.0.0/lib/rouge/guesser.rb +57 -0
- data/rouge-5.0.0/lib/rouge/guessers/disambiguation.rb +172 -0
- data/rouge-5.0.0/lib/rouge/guessers/filename.rb +27 -0
- data/rouge-5.0.0/lib/rouge/guessers/glob_mapping.rb +45 -0
- data/rouge-5.0.0/lib/rouge/guessers/mimetype.rb +16 -0
- data/rouge-5.0.0/lib/rouge/guessers/modeline.rb +46 -0
- data/rouge-5.0.0/lib/rouge/guessers/source.rb +31 -0
- data/rouge-5.0.0/lib/rouge/guessers/util.rb +34 -0
- data/rouge-5.0.0/lib/rouge/lexer.rb +556 -0
- data/rouge-5.0.0/lib/rouge/lexers/abap/builtins.rb +187 -0
- data/rouge-5.0.0/lib/rouge/lexers/abap.rb +132 -0
- data/rouge-5.0.0/lib/rouge/lexers/actionscript.rb +196 -0
- data/rouge-5.0.0/lib/rouge/lexers/ada.rb +162 -0
- data/rouge-5.0.0/lib/rouge/lexers/apache/keywords.rb +16 -0
- data/rouge-5.0.0/lib/rouge/lexers/apache.rb +84 -0
- data/rouge-5.0.0/lib/rouge/lexers/apex.rb +128 -0
- data/rouge-5.0.0/lib/rouge/lexers/apiblueprint.rb +49 -0
- data/rouge-5.0.0/lib/rouge/lexers/apple_script.rb +370 -0
- data/rouge-5.0.0/lib/rouge/lexers/armasm.rb +145 -0
- data/rouge-5.0.0/lib/rouge/lexers/augeas.rb +93 -0
- data/rouge-5.0.0/lib/rouge/lexers/awk.rb +162 -0
- data/rouge-5.0.0/lib/rouge/lexers/batchfile.rb +165 -0
- data/rouge-5.0.0/lib/rouge/lexers/bbcbasic.rb +112 -0
- data/rouge-5.0.0/lib/rouge/lexers/bibtex.rb +115 -0
- data/rouge-5.0.0/lib/rouge/lexers/bicep.rb +111 -0
- data/rouge-5.0.0/lib/rouge/lexers/biml.rb +70 -0
- data/rouge-5.0.0/lib/rouge/lexers/bpf.rb +118 -0
- data/rouge-5.0.0/lib/rouge/lexers/brainfuck.rb +54 -0
- data/rouge-5.0.0/lib/rouge/lexers/brightscript.rb +146 -0
- data/rouge-5.0.0/lib/rouge/lexers/bsl.rb +82 -0
- data/rouge-5.0.0/lib/rouge/lexers/c.rb +204 -0
- data/rouge-5.0.0/lib/rouge/lexers/ceylon.rb +96 -0
- data/rouge-5.0.0/lib/rouge/lexers/cfscript.rb +154 -0
- data/rouge-5.0.0/lib/rouge/lexers/cisco_ios.rb +83 -0
- data/rouge-5.0.0/lib/rouge/lexers/clean.rb +156 -0
- data/rouge-5.0.0/lib/rouge/lexers/clojure.rb +113 -0
- data/rouge-5.0.0/lib/rouge/lexers/cmake.rb +218 -0
- data/rouge-5.0.0/lib/rouge/lexers/cmhg.rb +34 -0
- data/rouge-5.0.0/lib/rouge/lexers/cobol.rb +137 -0
- data/rouge-5.0.0/lib/rouge/lexers/codeowners.rb +30 -0
- data/rouge-5.0.0/lib/rouge/lexers/coffeescript.rb +215 -0
- data/rouge-5.0.0/lib/rouge/lexers/common_lisp.rb +346 -0
- data/rouge-5.0.0/lib/rouge/lexers/conf.rb +25 -0
- data/rouge-5.0.0/lib/rouge/lexers/console.rb +196 -0
- data/rouge-5.0.0/lib/rouge/lexers/cpp.rb +102 -0
- data/rouge-5.0.0/lib/rouge/lexers/crystal.rb +435 -0
- data/rouge-5.0.0/lib/rouge/lexers/csharp.rb +118 -0
- data/rouge-5.0.0/lib/rouge/lexers/css.rb +337 -0
- data/rouge-5.0.0/lib/rouge/lexers/csvs.rb +44 -0
- data/rouge-5.0.0/lib/rouge/lexers/cuda.rb +35 -0
- data/rouge-5.0.0/lib/rouge/lexers/cypher.rb +116 -0
- data/rouge-5.0.0/lib/rouge/lexers/cython.rb +127 -0
- data/rouge-5.0.0/lib/rouge/lexers/d.rb +177 -0
- data/rouge-5.0.0/lib/rouge/lexers/dafny.rb +128 -0
- data/rouge-5.0.0/lib/rouge/lexers/dart.rb +108 -0
- data/rouge-5.0.0/lib/rouge/lexers/datastudio.rb +138 -0
- data/rouge-5.0.0/lib/rouge/lexers/diff.rb +47 -0
- data/rouge-5.0.0/lib/rouge/lexers/digdag.rb +69 -0
- data/rouge-5.0.0/lib/rouge/lexers/docker.rb +55 -0
- data/rouge-5.0.0/lib/rouge/lexers/dot.rb +70 -0
- data/rouge-5.0.0/lib/rouge/lexers/dylan.rb +109 -0
- data/rouge-5.0.0/lib/rouge/lexers/ecl.rb +175 -0
- data/rouge-5.0.0/lib/rouge/lexers/eex.rb +52 -0
- data/rouge-5.0.0/lib/rouge/lexers/eiffel.rb +65 -0
- data/rouge-5.0.0/lib/rouge/lexers/elixir.rb +158 -0
- data/rouge-5.0.0/lib/rouge/lexers/elm.rb +90 -0
- data/rouge-5.0.0/lib/rouge/lexers/email.rb +39 -0
- data/rouge-5.0.0/lib/rouge/lexers/epp.rb +51 -0
- data/rouge-5.0.0/lib/rouge/lexers/erb.rb +53 -0
- data/rouge-5.0.0/lib/rouge/lexers/erlang.rb +115 -0
- data/rouge-5.0.0/lib/rouge/lexers/escape.rb +58 -0
- data/rouge-5.0.0/lib/rouge/lexers/factor.rb +303 -0
- data/rouge-5.0.0/lib/rouge/lexers/fluent.rb +74 -0
- data/rouge-5.0.0/lib/rouge/lexers/fortran.rb +178 -0
- data/rouge-5.0.0/lib/rouge/lexers/freefem.rb +240 -0
- data/rouge-5.0.0/lib/rouge/lexers/fsharp.rb +120 -0
- data/rouge-5.0.0/lib/rouge/lexers/gdscript.rb +171 -0
- data/rouge-5.0.0/lib/rouge/lexers/ghc_cmm.rb +340 -0
- data/rouge-5.0.0/lib/rouge/lexers/ghc_core.rb +152 -0
- data/rouge-5.0.0/lib/rouge/lexers/gherkin/keywords.rb +23 -0
- data/rouge-5.0.0/lib/rouge/lexers/gherkin.rb +142 -0
- data/rouge-5.0.0/lib/rouge/lexers/gjs.rb +39 -0
- data/rouge-5.0.0/lib/rouge/lexers/glsl/builtins.rb +17 -0
- data/rouge-5.0.0/lib/rouge/lexers/glsl.rb +69 -0
- data/rouge-5.0.0/lib/rouge/lexers/go.rb +177 -0
- data/rouge-5.0.0/lib/rouge/lexers/gradle.rb +38 -0
- data/rouge-5.0.0/lib/rouge/lexers/graphql.rb +261 -0
- data/rouge-5.0.0/lib/rouge/lexers/groovy.rb +119 -0
- data/rouge-5.0.0/lib/rouge/lexers/gts.rb +39 -0
- data/rouge-5.0.0/lib/rouge/lexers/hack.rb +47 -0
- data/rouge-5.0.0/lib/rouge/lexers/haml.rb +226 -0
- data/rouge-5.0.0/lib/rouge/lexers/handlebars.rb +91 -0
- data/rouge-5.0.0/lib/rouge/lexers/haskell.rb +207 -0
- data/rouge-5.0.0/lib/rouge/lexers/haxe.rb +265 -0
- data/rouge-5.0.0/lib/rouge/lexers/hcl.rb +166 -0
- data/rouge-5.0.0/lib/rouge/lexers/hlsl.rb +166 -0
- data/rouge-5.0.0/lib/rouge/lexers/hocon.rb +86 -0
- data/rouge-5.0.0/lib/rouge/lexers/hql.rb +135 -0
- data/rouge-5.0.0/lib/rouge/lexers/html.rb +141 -0
- data/rouge-5.0.0/lib/rouge/lexers/http.rb +87 -0
- data/rouge-5.0.0/lib/rouge/lexers/hylang.rb +93 -0
- data/rouge-5.0.0/lib/rouge/lexers/idlang.rb +312 -0
- data/rouge-5.0.0/lib/rouge/lexers/idris.rb +210 -0
- data/rouge-5.0.0/lib/rouge/lexers/iecst.rb +92 -0
- data/rouge-5.0.0/lib/rouge/lexers/igorpro/builtins.rb +1530 -0
- data/rouge-5.0.0/lib/rouge/lexers/igorpro.rb +193 -0
- data/rouge-5.0.0/lib/rouge/lexers/ini.rb +56 -0
- data/rouge-5.0.0/lib/rouge/lexers/io.rb +69 -0
- data/rouge-5.0.0/lib/rouge/lexers/irb.rb +73 -0
- data/rouge-5.0.0/lib/rouge/lexers/isabelle.rb +251 -0
- data/rouge-5.0.0/lib/rouge/lexers/isbl.rb +61 -0
- data/rouge-5.0.0/lib/rouge/lexers/j.rb +244 -0
- data/rouge-5.0.0/lib/rouge/lexers/janet.rb +218 -0
- data/rouge-5.0.0/lib/rouge/lexers/java.rb +92 -0
- data/rouge-5.0.0/lib/rouge/lexers/javascript.rb +315 -0
- data/rouge-5.0.0/lib/rouge/lexers/jinja.rb +169 -0
- data/rouge-5.0.0/lib/rouge/lexers/jsl.rb +66 -0
- data/rouge-5.0.0/lib/rouge/lexers/json.rb +72 -0
- data/rouge-5.0.0/lib/rouge/lexers/json5.rb +74 -0
- data/rouge-5.0.0/lib/rouge/lexers/json_doc.rb +26 -0
- data/rouge-5.0.0/lib/rouge/lexers/jsonnet.rb +153 -0
- data/rouge-5.0.0/lib/rouge/lexers/jsp.rb +119 -0
- data/rouge-5.0.0/lib/rouge/lexers/jsx.rb +91 -0
- data/rouge-5.0.0/lib/rouge/lexers/julia.rb +293 -0
- data/rouge-5.0.0/lib/rouge/lexers/kick_assembler.rb +100 -0
- data/rouge-5.0.0/lib/rouge/lexers/kotlin.rb +150 -0
- data/rouge-5.0.0/lib/rouge/lexers/lasso/keywords.rb +20 -0
- data/rouge-5.0.0/lib/rouge/lexers/lasso.rb +212 -0
- data/rouge-5.0.0/lib/rouge/lexers/lean.rb +164 -0
- data/rouge-5.0.0/lib/rouge/lexers/liquid.rb +284 -0
- data/rouge-5.0.0/lib/rouge/lexers/literate_coffeescript.rb +34 -0
- data/rouge-5.0.0/lib/rouge/lexers/literate_haskell.rb +37 -0
- data/rouge-5.0.0/lib/rouge/lexers/livescript.rb +310 -0
- data/rouge-5.0.0/lib/rouge/lexers/llvm/keywords.rb +16 -0
- data/rouge-5.0.0/lib/rouge/lexers/llvm.rb +59 -0
- data/rouge-5.0.0/lib/rouge/lexers/lua/keywords.rb +26 -0
- data/rouge-5.0.0/lib/rouge/lexers/lua.rb +186 -0
- data/rouge-5.0.0/lib/rouge/lexers/lustre.rb +79 -0
- data/rouge-5.0.0/lib/rouge/lexers/lutin.rb +34 -0
- data/rouge-5.0.0/lib/rouge/lexers/m68k.rb +143 -0
- data/rouge-5.0.0/lib/rouge/lexers/magik.rb +127 -0
- data/rouge-5.0.0/lib/rouge/lexers/make.rb +148 -0
- data/rouge-5.0.0/lib/rouge/lexers/markdown.rb +183 -0
- data/rouge-5.0.0/lib/rouge/lexers/mason.rb +110 -0
- data/rouge-5.0.0/lib/rouge/lexers/mathematica/keywords.rb +15 -0
- data/rouge-5.0.0/lib/rouge/lexers/mathematica.rb +95 -0
- data/rouge-5.0.0/lib/rouge/lexers/matlab/keywords.rb +15 -0
- data/rouge-5.0.0/lib/rouge/lexers/matlab.rb +81 -0
- data/rouge-5.0.0/lib/rouge/lexers/meson.rb +158 -0
- data/rouge-5.0.0/lib/rouge/lexers/minizinc.rb +87 -0
- data/rouge-5.0.0/lib/rouge/lexers/mojo.rb +39 -0
- data/rouge-5.0.0/lib/rouge/lexers/moonscript.rb +117 -0
- data/rouge-5.0.0/lib/rouge/lexers/mosel.rb +228 -0
- data/rouge-5.0.0/lib/rouge/lexers/msgtrans.rb +26 -0
- data/rouge-5.0.0/lib/rouge/lexers/mxml.rb +69 -0
- data/rouge-5.0.0/lib/rouge/lexers/nasm.rb +73 -0
- data/rouge-5.0.0/lib/rouge/lexers/nesasm.rb +78 -0
- data/rouge-5.0.0/lib/rouge/lexers/nginx.rb +73 -0
- data/rouge-5.0.0/lib/rouge/lexers/nial.rb +165 -0
- data/rouge-5.0.0/lib/rouge/lexers/nim.rb +154 -0
- data/rouge-5.0.0/lib/rouge/lexers/nix.rb +213 -0
- data/rouge-5.0.0/lib/rouge/lexers/objective_c/common.rb +182 -0
- data/rouge-5.0.0/lib/rouge/lexers/objective_c.rb +21 -0
- data/rouge-5.0.0/lib/rouge/lexers/objective_cpp.rb +32 -0
- data/rouge-5.0.0/lib/rouge/lexers/ocaml/common.rb +53 -0
- data/rouge-5.0.0/lib/rouge/lexers/ocaml.rb +65 -0
- data/rouge-5.0.0/lib/rouge/lexers/ocl.rb +84 -0
- data/rouge-5.0.0/lib/rouge/lexers/openedge.rb +632 -0
- data/rouge-5.0.0/lib/rouge/lexers/opentype_feature_file.rb +97 -0
- data/rouge-5.0.0/lib/rouge/lexers/p4.rb +81 -0
- data/rouge-5.0.0/lib/rouge/lexers/pascal.rb +68 -0
- data/rouge-5.0.0/lib/rouge/lexers/pdf.rb +109 -0
- data/rouge-5.0.0/lib/rouge/lexers/perl.rb +251 -0
- data/rouge-5.0.0/lib/rouge/lexers/php/keywords.rb +150 -0
- data/rouge-5.0.0/lib/rouge/lexers/php.rb +470 -0
- data/rouge-5.0.0/lib/rouge/lexers/plain_text.rb +27 -0
- data/rouge-5.0.0/lib/rouge/lexers/plist.rb +47 -0
- data/rouge-5.0.0/lib/rouge/lexers/plsql.rb +577 -0
- data/rouge-5.0.0/lib/rouge/lexers/pony.rb +94 -0
- data/rouge-5.0.0/lib/rouge/lexers/postscript.rb +93 -0
- data/rouge-5.0.0/lib/rouge/lexers/powershell.rb +248 -0
- data/rouge-5.0.0/lib/rouge/lexers/praat.rb +438 -0
- data/rouge-5.0.0/lib/rouge/lexers/prolog.rb +67 -0
- data/rouge-5.0.0/lib/rouge/lexers/prometheus.rb +122 -0
- data/rouge-5.0.0/lib/rouge/lexers/properties.rb +52 -0
- data/rouge-5.0.0/lib/rouge/lexers/protobuf.rb +71 -0
- data/rouge-5.0.0/lib/rouge/lexers/puppet.rb +129 -0
- data/rouge-5.0.0/lib/rouge/lexers/python.rb +340 -0
- data/rouge-5.0.0/lib/rouge/lexers/q.rb +125 -0
- data/rouge-5.0.0/lib/rouge/lexers/qml.rb +74 -0
- data/rouge-5.0.0/lib/rouge/lexers/r.rb +89 -0
- data/rouge-5.0.0/lib/rouge/lexers/racket.rb +568 -0
- data/rouge-5.0.0/lib/rouge/lexers/reasonml.rb +66 -0
- data/rouge-5.0.0/lib/rouge/lexers/rego.rb +60 -0
- data/rouge-5.0.0/lib/rouge/lexers/rescript.rb +119 -0
- data/rouge-5.0.0/lib/rouge/lexers/rml.rb +142 -0
- data/rouge-5.0.0/lib/rouge/lexers/robot_framework.rb +249 -0
- data/rouge-5.0.0/lib/rouge/lexers/rocq.rb +264 -0
- data/rouge-5.0.0/lib/rouge/lexers/ruby.rb +481 -0
- data/rouge-5.0.0/lib/rouge/lexers/rust.rb +261 -0
- data/rouge-5.0.0/lib/rouge/lexers/sas.rb +562 -0
- data/rouge-5.0.0/lib/rouge/lexers/sass/common.rb +182 -0
- data/rouge-5.0.0/lib/rouge/lexers/sass.rb +75 -0
- data/rouge-5.0.0/lib/rouge/lexers/scala.rb +172 -0
- data/rouge-5.0.0/lib/rouge/lexers/scheme.rb +113 -0
- data/rouge-5.0.0/lib/rouge/lexers/scss.rb +35 -0
- data/rouge-5.0.0/lib/rouge/lexers/sed.rb +173 -0
- data/rouge-5.0.0/lib/rouge/lexers/shell.rb +205 -0
- data/rouge-5.0.0/lib/rouge/lexers/sieve.rb +97 -0
- data/rouge-5.0.0/lib/rouge/lexers/slice.rb +32 -0
- data/rouge-5.0.0/lib/rouge/lexers/slim.rb +229 -0
- data/rouge-5.0.0/lib/rouge/lexers/smalltalk.rb +117 -0
- data/rouge-5.0.0/lib/rouge/lexers/smarty.rb +81 -0
- data/rouge-5.0.0/lib/rouge/lexers/sml.rb +345 -0
- data/rouge-5.0.0/lib/rouge/lexers/sparql.rb +131 -0
- data/rouge-5.0.0/lib/rouge/lexers/sqf/keywords.rb +14 -0
- data/rouge-5.0.0/lib/rouge/lexers/sqf.rb +108 -0
- data/rouge-5.0.0/lib/rouge/lexers/sql.rb +161 -0
- data/rouge-5.0.0/lib/rouge/lexers/ssh.rb +33 -0
- data/rouge-5.0.0/lib/rouge/lexers/stan.rb +445 -0
- data/rouge-5.0.0/lib/rouge/lexers/stata.rb +165 -0
- data/rouge-5.0.0/lib/rouge/lexers/supercollider.rb +115 -0
- data/rouge-5.0.0/lib/rouge/lexers/svelte.rb +91 -0
- data/rouge-5.0.0/lib/rouge/lexers/swift.rb +202 -0
- data/rouge-5.0.0/lib/rouge/lexers/systemd.rb +34 -0
- data/rouge-5.0.0/lib/rouge/lexers/syzlang.rb +316 -0
- data/rouge-5.0.0/lib/rouge/lexers/syzprog.rb +122 -0
- data/rouge-5.0.0/lib/rouge/lexers/tap.rb +88 -0
- data/rouge-5.0.0/lib/rouge/lexers/tcl.rb +198 -0
- data/rouge-5.0.0/lib/rouge/lexers/terraform.rb +121 -0
- data/rouge-5.0.0/lib/rouge/lexers/tex.rb +70 -0
- data/rouge-5.0.0/lib/rouge/lexers/thrift.rb +120 -0
- data/rouge-5.0.0/lib/rouge/lexers/toml.rb +124 -0
- data/rouge-5.0.0/lib/rouge/lexers/tsx.rb +33 -0
- data/rouge-5.0.0/lib/rouge/lexers/ttcn3.rb +117 -0
- data/rouge-5.0.0/lib/rouge/lexers/tulip.rb +107 -0
- data/rouge-5.0.0/lib/rouge/lexers/turtle.rb +61 -0
- data/rouge-5.0.0/lib/rouge/lexers/twig.rb +40 -0
- data/rouge-5.0.0/lib/rouge/lexers/typescript/common.rb +60 -0
- data/rouge-5.0.0/lib/rouge/lexers/typescript.rb +23 -0
- data/rouge-5.0.0/lib/rouge/lexers/vala.rb +78 -0
- data/rouge-5.0.0/lib/rouge/lexers/varnish.rb +168 -0
- data/rouge-5.0.0/lib/rouge/lexers/vb.rb +165 -0
- data/rouge-5.0.0/lib/rouge/lexers/velocity.rb +71 -0
- data/rouge-5.0.0/lib/rouge/lexers/verilog.rb +163 -0
- data/rouge-5.0.0/lib/rouge/lexers/veryl.rb +109 -0
- data/rouge-5.0.0/lib/rouge/lexers/vhdl.rb +98 -0
- data/rouge-5.0.0/lib/rouge/lexers/viml/keywords.rb +19 -0
- data/rouge-5.0.0/lib/rouge/lexers/viml.rb +68 -0
- data/rouge-5.0.0/lib/rouge/lexers/vue.rb +127 -0
- data/rouge-5.0.0/lib/rouge/lexers/wollok.rb +107 -0
- data/rouge-5.0.0/lib/rouge/lexers/xml.rb +56 -0
- data/rouge-5.0.0/lib/rouge/lexers/xojo.rb +61 -0
- data/rouge-5.0.0/lib/rouge/lexers/xpath.rb +332 -0
- data/rouge-5.0.0/lib/rouge/lexers/xquery.rb +146 -0
- data/rouge-5.0.0/lib/rouge/lexers/yaml.rb +388 -0
- data/rouge-5.0.0/lib/rouge/lexers/yang.rb +115 -0
- data/rouge-5.0.0/lib/rouge/lexers/zig.rb +139 -0
- data/rouge-5.0.0/lib/rouge/plugins/redcarpet.rb +38 -0
- data/rouge-5.0.0/lib/rouge/regex_lexer.rb +522 -0
- data/rouge-5.0.0/lib/rouge/template_lexer.rb +21 -0
- data/rouge-5.0.0/lib/rouge/tex_theme_renderer.rb +132 -0
- data/rouge-5.0.0/lib/rouge/text_analyzer.rb +50 -0
- data/rouge-5.0.0/lib/rouge/theme.rb +218 -0
- data/rouge-5.0.0/lib/rouge/themes/base16.rb +137 -0
- data/rouge-5.0.0/lib/rouge/themes/bw.rb +43 -0
- data/rouge-5.0.0/lib/rouge/themes/colorful.rb +70 -0
- data/rouge-5.0.0/lib/rouge/themes/github.rb +149 -0
- data/rouge-5.0.0/lib/rouge/themes/gruvbox.rb +176 -0
- data/rouge-5.0.0/lib/rouge/themes/igor_pro.rb +25 -0
- data/rouge-5.0.0/lib/rouge/themes/magritte.rb +80 -0
- data/rouge-5.0.0/lib/rouge/themes/molokai.rb +84 -0
- data/rouge-5.0.0/lib/rouge/themes/monokai.rb +95 -0
- data/rouge-5.0.0/lib/rouge/themes/monokai_sublime.rb +94 -0
- data/rouge-5.0.0/lib/rouge/themes/pastie.rb +72 -0
- data/rouge-5.0.0/lib/rouge/themes/thankful_eyes.rb +77 -0
- data/rouge-5.0.0/lib/rouge/themes/tulip.rb +72 -0
- data/rouge-5.0.0/lib/rouge/token.rb +192 -0
- data/rouge-5.0.0/lib/rouge/util.rb +102 -0
- data/rouge-5.0.0/lib/rouge/version.rb +8 -0
- data/rouge-5.0.0/lib/rouge.rb +117 -0
- data/rouge-5.0.0/lib/rubocop/cop/rouge/no_building_alternation_pattern_in_regexp.rb +71 -0
- data/rouge-5.0.0/lib/rubocop/cop/rouge/no_huge_collections.rb +37 -0
- data/rouge-5.0.0/rouge.gemspec +29 -0
- metadata +578 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*- #
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Rouge
|
|
5
|
+
module Lexers
|
|
6
|
+
class IgorPro < RegexLexer
|
|
7
|
+
tag 'igorpro'
|
|
8
|
+
filenames '*.ipf'
|
|
9
|
+
mimetypes 'text/x-igorpro'
|
|
10
|
+
|
|
11
|
+
title "IgorPro"
|
|
12
|
+
desc "WaveMetrics Igor Pro"
|
|
13
|
+
|
|
14
|
+
KEYWORDS = Set.new %w(
|
|
15
|
+
structure endstructure
|
|
16
|
+
threadsafe static
|
|
17
|
+
macro proc window menu function end
|
|
18
|
+
if else elseif endif switch strswitch endswitch
|
|
19
|
+
break return continue
|
|
20
|
+
for endfor do while
|
|
21
|
+
case default
|
|
22
|
+
try catch endtry
|
|
23
|
+
abortonrte abortonvalue
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
PREPROCESSOR_WORDS = Set.new %w(
|
|
27
|
+
pragma include
|
|
28
|
+
define ifdef ifndef undef
|
|
29
|
+
if elif else endif
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
DECLARATIONS = Set.new %w(
|
|
33
|
+
variable string wave strconstant constant
|
|
34
|
+
nvar svar dfref funcref struct
|
|
35
|
+
char uchar int16 uint16 int32 uint32 int64 uint64 float double
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
CONSTANTS = Set.new %w(nan inf)
|
|
39
|
+
|
|
40
|
+
lazy { require_relative 'igorpro/builtins' }
|
|
41
|
+
|
|
42
|
+
object = /[a-z][a-z0-9_\.]*/i
|
|
43
|
+
noLineBreak = /(?:[ \t]|(?:\\\s*[\r\n]))+/
|
|
44
|
+
operator = %r([\#$~!%^&*+=\|?:<>/-])
|
|
45
|
+
punctuation = /[{}()\[\],.;]/
|
|
46
|
+
number_float= /0x[a-f0-9]+/i
|
|
47
|
+
number_hex = /\d+\.\d+(e[\+\-]?\d+)?/
|
|
48
|
+
number_int = /[\d]+(?:_\d+)*/
|
|
49
|
+
|
|
50
|
+
state :root do
|
|
51
|
+
rule %r(//), Comment, :comments
|
|
52
|
+
|
|
53
|
+
rule object do |m|
|
|
54
|
+
obj = m[0].downcase
|
|
55
|
+
|
|
56
|
+
if obj.include?('function')
|
|
57
|
+
token Keyword::Declaration
|
|
58
|
+
push :parse_function
|
|
59
|
+
elsif DECLARATIONS.include?(obj)
|
|
60
|
+
token Keyword::Declaration
|
|
61
|
+
push :parse_variables
|
|
62
|
+
elsif KEYWORDS.include?(obj)
|
|
63
|
+
token Keyword
|
|
64
|
+
elsif CONSTANTS.include?(obj)
|
|
65
|
+
token Keyword::Constant
|
|
66
|
+
elsif FUNCTIONS.include?(obj)
|
|
67
|
+
token Name::Builtin
|
|
68
|
+
elsif OPERATIONS.include?(obj)
|
|
69
|
+
token Keyword::Reserved
|
|
70
|
+
push :operationFlags
|
|
71
|
+
elsif obj.match?(/\A(v|s|w)_[a-z]+[a-z0-9]*/o)
|
|
72
|
+
token Name::Constant
|
|
73
|
+
else
|
|
74
|
+
token Name
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
mixin :preprocessor
|
|
79
|
+
mixin :waveFlag
|
|
80
|
+
|
|
81
|
+
mixin :characters
|
|
82
|
+
mixin :numbers
|
|
83
|
+
mixin :whitespace
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
state :preprocessor do
|
|
87
|
+
rule %r((\#)(#{object})) do |m|
|
|
88
|
+
if PREPROCESSOR_WORDS.include? m[2].downcase
|
|
89
|
+
token Comment::Preproc
|
|
90
|
+
else
|
|
91
|
+
token Punctuation, m[1] #i.e. ModuleFunctions
|
|
92
|
+
token Name, m[2]
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
state :assignment do
|
|
98
|
+
mixin :whitespace
|
|
99
|
+
rule %r/\"/, Literal::String::Double, :string1 #punctuation for string
|
|
100
|
+
mixin :string2
|
|
101
|
+
rule number_float, Literal::Number::Float, :pop!
|
|
102
|
+
rule number_int, Literal::Number::Integer, :pop!
|
|
103
|
+
rule %r/[\(\[\{][^\)\]\}]+[\)\]\}]/, Generic, :pop!
|
|
104
|
+
rule %r/[^\s\/\(]+/, Generic, :pop!
|
|
105
|
+
rule(//) { pop! }
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
state :parse_variables do
|
|
109
|
+
mixin :whitespace
|
|
110
|
+
rule %r/[=]/, Punctuation, :assignment
|
|
111
|
+
rule object, Name::Variable
|
|
112
|
+
rule %r/[\[\]]/, Punctuation # optional variables in functions
|
|
113
|
+
rule %r/[,]/, Punctuation, :parse_variables
|
|
114
|
+
rule %r/\)/, Punctuation, :pop! # end of function
|
|
115
|
+
rule %r([/][a-z]+)i, Keyword::Pseudo, :parse_variables
|
|
116
|
+
rule(//) { pop! }
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
state :parse_function do
|
|
120
|
+
rule %r([/][a-z]+)i, Keyword::Pseudo # only one flag
|
|
121
|
+
mixin :whitespace
|
|
122
|
+
rule object, Name::Function
|
|
123
|
+
rule %r/[\(]/, Punctuation, :parse_variables
|
|
124
|
+
rule(//) { pop! }
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
state :operationFlags do
|
|
128
|
+
rule noLineBreak, Text
|
|
129
|
+
rule %r/[=]/, Punctuation, :assignment
|
|
130
|
+
rule %r([/][a-z]+)i, Keyword::Pseudo, :operationFlags
|
|
131
|
+
rule %r/(as)(\s*)(#{object})/i do
|
|
132
|
+
groups Keyword::Type, Text, Name::Label
|
|
133
|
+
end
|
|
134
|
+
rule(//) { pop! }
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# inline variable assignments (i.e. for Make) with strict syntax
|
|
138
|
+
state :waveFlag do
|
|
139
|
+
rule %r(
|
|
140
|
+
(/(?:wave|X|Y))
|
|
141
|
+
(\s*)(=)(\s*)
|
|
142
|
+
(#{object})
|
|
143
|
+
)ix do |m|
|
|
144
|
+
token Keyword::Pseudo, m[1]
|
|
145
|
+
token Text, m[2]
|
|
146
|
+
token Punctuation, m[3]
|
|
147
|
+
token Text, m[4]
|
|
148
|
+
token Name::Variable, m[5]
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
state :characters do
|
|
153
|
+
rule %r/\s/, Text
|
|
154
|
+
rule operator, Operator
|
|
155
|
+
rule punctuation, Punctuation
|
|
156
|
+
rule %r/\"/, Literal::String::Double, :string1 #punctuation for string
|
|
157
|
+
mixin :string2
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
state :numbers do
|
|
161
|
+
rule number_float, Literal::Number::Float
|
|
162
|
+
rule number_hex, Literal::Number::Hex
|
|
163
|
+
rule number_int, Literal::Number::Integer
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
state :whitespace do
|
|
167
|
+
rule noLineBreak, Text
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
state :string1 do
|
|
171
|
+
rule %r/%\w\b/, Literal::String::Other
|
|
172
|
+
rule %r/\\\\/, Literal::String::Escape
|
|
173
|
+
rule %r/\\\"/, Literal::String::Escape
|
|
174
|
+
rule %r/\\/, Literal::String::Escape
|
|
175
|
+
rule %r/[^"]/, Literal::String
|
|
176
|
+
rule %r/\"/, Literal::String::Double, :pop! #punctuation for string
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
state :string2 do
|
|
180
|
+
rule %r/\'[^']*\'/, Literal::String::Single
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
state :comments do
|
|
184
|
+
rule %r{([/]\s*)([@]\w+\b)}i do
|
|
185
|
+
# doxygen comments
|
|
186
|
+
groups Comment, Comment::Special
|
|
187
|
+
end
|
|
188
|
+
rule %r/[^\r\n]/, Comment
|
|
189
|
+
rule(//) { pop! }
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*- #
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Rouge
|
|
5
|
+
module Lexers
|
|
6
|
+
class INI < RegexLexer
|
|
7
|
+
title "INI"
|
|
8
|
+
desc 'the INI configuration format'
|
|
9
|
+
tag 'ini'
|
|
10
|
+
|
|
11
|
+
filenames '*.ini', '*.INI', '*.gitconfig', '*.cfg', '.editorconfig', '*.inf'
|
|
12
|
+
mimetypes 'text/x-ini', 'text/inf'
|
|
13
|
+
|
|
14
|
+
identifier = /[\w\-.]+/
|
|
15
|
+
|
|
16
|
+
state :basic do
|
|
17
|
+
rule %r/\s+/, Text::Whitespace
|
|
18
|
+
rule %r/[;#].*?\n/, Comment
|
|
19
|
+
rule %r/\\\n/, Str::Escape
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
state :root do
|
|
23
|
+
mixin :basic
|
|
24
|
+
|
|
25
|
+
rule %r/(#{identifier})(\s*)(=)/ do
|
|
26
|
+
groups Name::Property, Text::Whitespace, Punctuation
|
|
27
|
+
push :value
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
rule %r/\[.*?\]/, Name::Namespace
|
|
31
|
+
|
|
32
|
+
# standalone option, supported by some INI parsers
|
|
33
|
+
rule %r/(.+?)/, Name::Attribute
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
state :value do
|
|
37
|
+
rule %r/\n/, Text, :pop!
|
|
38
|
+
mixin :basic
|
|
39
|
+
rule %r/"/, Str, :dq
|
|
40
|
+
rule %r/'.*?'/, Str
|
|
41
|
+
mixin :esc_str
|
|
42
|
+
rule %r/[^\\\n]+/, Str
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
state :dq do
|
|
46
|
+
rule %r/"/, Str, :pop!
|
|
47
|
+
mixin :esc_str
|
|
48
|
+
rule %r/[^\\"]+/m, Str
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
state :esc_str do
|
|
52
|
+
rule %r/\\./m, Str::Escape
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*- #
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Rouge
|
|
5
|
+
module Lexers
|
|
6
|
+
class IO < RegexLexer
|
|
7
|
+
tag 'io'
|
|
8
|
+
title "Io"
|
|
9
|
+
desc 'The IO programming language (http://iolanguage.com)'
|
|
10
|
+
mimetypes 'text/x-iosrc'
|
|
11
|
+
filenames '*.io'
|
|
12
|
+
|
|
13
|
+
def self.detect?(text)
|
|
14
|
+
return true if text.shebang? 'io'
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.constants
|
|
18
|
+
@constants ||= Set.new %w(nil false true)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def self.builtins
|
|
22
|
+
@builtins ||= Set.new %w(
|
|
23
|
+
args call clone do doFile doString else elseif for if list
|
|
24
|
+
method return super then
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
state :root do
|
|
29
|
+
rule %r/\s+/m, Text
|
|
30
|
+
rule %r(//.*), Comment::Single
|
|
31
|
+
rule %r(#.*), Comment::Single
|
|
32
|
+
rule %r(/(\\\n)?[*].*?[*](\\\n)?/)m, Comment::Multiline
|
|
33
|
+
rule %r(/[+]), Comment::Multiline, :nested_comment
|
|
34
|
+
|
|
35
|
+
rule %r/"(\\\\|\\"|[^"])*"/, Str
|
|
36
|
+
|
|
37
|
+
rule %r(:?:=), Keyword
|
|
38
|
+
rule %r/[()]/, Punctuation
|
|
39
|
+
|
|
40
|
+
rule %r([-=;,*+><!/|^.%&\[\]{}]), Operator
|
|
41
|
+
|
|
42
|
+
rule %r/[A-Z]\w*/, Name::Class
|
|
43
|
+
|
|
44
|
+
rule %r/[a-z_]\w*/ do |m|
|
|
45
|
+
name = m[0]
|
|
46
|
+
|
|
47
|
+
if self.class.constants.include? name
|
|
48
|
+
token Keyword::Constant
|
|
49
|
+
elsif self.class.builtins.include? name
|
|
50
|
+
token Name::Builtin
|
|
51
|
+
else
|
|
52
|
+
token Name
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
rule %r((\d+[.]?\d*|\d*[.]\d+)(e[+-]?[0-9]+)?)i, Num::Float
|
|
57
|
+
rule %r/\d+/, Num::Integer
|
|
58
|
+
|
|
59
|
+
rule %r/@@?/, Keyword
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
state :nested_comment do
|
|
63
|
+
rule %r([^/+]+)m, Comment::Multiline
|
|
64
|
+
rule %r(/[+]), Comment::Multiline, :nested_comment
|
|
65
|
+
rule %r([+]/), Comment::Multiline, :pop!
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*- #
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require_relative 'console'
|
|
5
|
+
require_relative 'ruby'
|
|
6
|
+
|
|
7
|
+
module Rouge
|
|
8
|
+
module Lexers
|
|
9
|
+
class IRBLexer < ConsoleLexer
|
|
10
|
+
tag 'irb'
|
|
11
|
+
aliases 'pry'
|
|
12
|
+
|
|
13
|
+
desc 'Shell sessions in IRB or Pry'
|
|
14
|
+
|
|
15
|
+
# unlike the superclass, we do not accept any options
|
|
16
|
+
@option_docs = {}
|
|
17
|
+
|
|
18
|
+
def output_lexer
|
|
19
|
+
@output_lexer ||= IRBOutputLexer.new(@options)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def lang_lexer
|
|
23
|
+
@lang_lexer ||= Ruby.new(@options)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def prompt_regex
|
|
27
|
+
%r(
|
|
28
|
+
^.*?
|
|
29
|
+
(
|
|
30
|
+
(irb|pry).*?[>"*] |
|
|
31
|
+
[>"*]>
|
|
32
|
+
)
|
|
33
|
+
)x
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def allow_comments?
|
|
37
|
+
true
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
class IRBOutputLexer < Ruby
|
|
42
|
+
tag 'irb_output'
|
|
43
|
+
|
|
44
|
+
start do
|
|
45
|
+
push :stdout
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
state :has_irb_output do
|
|
49
|
+
rule %r(=>), Punctuation, :pop!
|
|
50
|
+
rule %r/.+?(\n|$)/, Generic::Output
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
state :irb_error do
|
|
54
|
+
rule %r/.+?(\n|$)/, Generic::Error
|
|
55
|
+
mixin :has_irb_output
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
state :stdout do
|
|
59
|
+
rule %r/\w+?(Error|Exception):.+?(\n|$)/, Generic::Error, :irb_error
|
|
60
|
+
mixin :has_irb_output
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
prepend :root do
|
|
64
|
+
rule %r/#</, Keyword::Type, :irb_object
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
state :irb_object do
|
|
68
|
+
rule %r/>/, Keyword::Type, :pop!
|
|
69
|
+
mixin :root
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*- #
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
# Lexer adapted from https://github.com/pygments/pygments/blob/ad55974ce83b85dbb333ab57764415ab84169461/pygments/lexers/theorem.py
|
|
4
|
+
|
|
5
|
+
module Rouge
|
|
6
|
+
module Lexers
|
|
7
|
+
class Isabelle < RegexLexer
|
|
8
|
+
title "Isabelle"
|
|
9
|
+
desc 'Isabelle theories (isabelle.in.tum.de)'
|
|
10
|
+
tag 'isabelle'
|
|
11
|
+
aliases 'isa', 'Isabelle'
|
|
12
|
+
filenames '*.thy'
|
|
13
|
+
mimetypes 'text/x-isabelle'
|
|
14
|
+
|
|
15
|
+
def self.keyword_minor
|
|
16
|
+
@keyword_minor ||= Set.new %w(
|
|
17
|
+
and assumes attach avoids binder checking
|
|
18
|
+
class_instance class_relation code_module congs
|
|
19
|
+
constant constrains datatypes defines file fixes
|
|
20
|
+
for functions hints identifier if imports in
|
|
21
|
+
includes infix infixl infixr is keywords lazy
|
|
22
|
+
module_name monos morphisms no_discs_sels notes
|
|
23
|
+
obtains open output overloaded parametric permissive
|
|
24
|
+
pervasive rep_compat shows structure type_class
|
|
25
|
+
type_constructor unchecked unsafe where
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.keyword_diag
|
|
30
|
+
@keyword_diag ||= Set.new %w(
|
|
31
|
+
ML_command ML_val class_deps code_deps code_thms
|
|
32
|
+
display_drafts find_consts find_theorems find_unused_assms
|
|
33
|
+
full_prf help locale_deps nitpick pr prf
|
|
34
|
+
print_abbrevs print_antiquotations print_attributes
|
|
35
|
+
print_binds print_bnfs print_bundles
|
|
36
|
+
print_case_translations print_cases print_claset
|
|
37
|
+
print_classes print_codeproc print_codesetup
|
|
38
|
+
print_coercions print_commands print_context
|
|
39
|
+
print_defn_rules print_dependencies print_facts
|
|
40
|
+
print_induct_rules print_inductives print_interps
|
|
41
|
+
print_locale print_locales print_methods print_options
|
|
42
|
+
print_orders print_quot_maps print_quotconsts
|
|
43
|
+
print_quotients print_quotientsQ3 print_quotmapsQ3
|
|
44
|
+
print_rules print_simpset print_state print_statement
|
|
45
|
+
print_syntax print_theorems print_theory print_trans_rules
|
|
46
|
+
prop pwd quickcheck refute sledgehammer smt_status
|
|
47
|
+
solve_direct spark_status term thm thm_deps thy_deps
|
|
48
|
+
try try0 typ unused_thms value values welcome
|
|
49
|
+
print_ML_antiquotations print_term_bindings values_prolog
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def self.keyword_thy
|
|
54
|
+
@keyword_thy ||= Set.new %w(theory begin end)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def self.keyword_section
|
|
58
|
+
@keyword_section ||= Set.new %w(header chapter)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def self.keyword_subsection
|
|
62
|
+
@keyword_subsection ||= Set.new %w(section subsection subsubsection sect subsect subsubsect)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def self.keyword_theory_decl
|
|
66
|
+
@keyword_theory_decl ||= Set.new %w(
|
|
67
|
+
ML ML_file abbreviation adhoc_overloading arities
|
|
68
|
+
atom_decl attribute_setup axiomatization bundle
|
|
69
|
+
case_of_simps class classes classrel codatatype
|
|
70
|
+
code_abort code_class code_const code_datatype
|
|
71
|
+
code_identifier code_include code_instance code_modulename
|
|
72
|
+
code_monad code_printing code_reflect code_reserved
|
|
73
|
+
code_type coinductive coinductive_set consts context
|
|
74
|
+
datatype datatype_new datatype_new_compat declaration
|
|
75
|
+
declare default_sort defer_recdef definition defs
|
|
76
|
+
domain domain_isomorphism domaindef equivariance
|
|
77
|
+
export_code extract extract_type fixrec fun
|
|
78
|
+
fun_cases hide_class hide_const hide_fact hide_type
|
|
79
|
+
import_const_map import_file import_tptp import_type_map
|
|
80
|
+
inductive inductive_set instantiation judgment lemmas
|
|
81
|
+
lifting_forget lifting_update local_setup locale
|
|
82
|
+
method_setup nitpick_params no_adhoc_overloading
|
|
83
|
+
no_notation no_syntax no_translations no_type_notation
|
|
84
|
+
nominal_datatype nonterminal notation notepad oracle
|
|
85
|
+
overloading parse_ast_translation parse_translation
|
|
86
|
+
partial_function primcorec primrec primrec_new
|
|
87
|
+
print_ast_translation print_translation quickcheck_generator
|
|
88
|
+
quickcheck_params realizability realizers recdef record
|
|
89
|
+
refute_params setup setup_lifting simproc_setup
|
|
90
|
+
simps_of_case sledgehammer_params spark_end spark_open
|
|
91
|
+
spark_open_siv spark_open_vcg spark_proof_functions
|
|
92
|
+
spark_types statespace syntax syntax_declaration text
|
|
93
|
+
text_raw theorems translations type_notation
|
|
94
|
+
type_synonym typed_print_translation typedecl hoarestate
|
|
95
|
+
install_C_file install_C_types wpc_setup c_defs c_types
|
|
96
|
+
memsafe SML_export SML_file SML_import approximate
|
|
97
|
+
bnf_axiomatization cartouche datatype_compat
|
|
98
|
+
free_constructors functor nominal_function
|
|
99
|
+
nominal_termination permanent_interpretation
|
|
100
|
+
binds defining smt2_status term_cartouche
|
|
101
|
+
boogie_file text_cartouche
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
def self.keyword_theory_script
|
|
106
|
+
@keyword_theory_script ||= Set.new %w(inductive_cases inductive_simps)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
def self.keyword_theory_goal
|
|
110
|
+
@keyword_theory_goal ||= Set.new %w(
|
|
111
|
+
ax_specification bnf code_pred corollary cpodef
|
|
112
|
+
crunch crunch_ignore
|
|
113
|
+
enriched_type function instance interpretation lemma
|
|
114
|
+
lift_definition nominal_inductive nominal_inductive2
|
|
115
|
+
nominal_primrec pcpodef primcorecursive
|
|
116
|
+
quotient_definition quotient_type recdef_tc rep_datatype
|
|
117
|
+
schematic_corollary schematic_lemma schematic_theorem
|
|
118
|
+
spark_vc specification subclass sublocale termination
|
|
119
|
+
theorem typedef wrap_free_constructors
|
|
120
|
+
)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def self.keyword_qed
|
|
124
|
+
@keyword_qed ||= Set.new %w(by done qed)
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
def self.keyword_abandon_proof
|
|
128
|
+
@keyword_abandon_proof ||= Set.new %w(sorry oops)
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
def self.keyword_proof_goal
|
|
132
|
+
@keyword_proof_goal ||= Set.new %w(have hence interpret)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
def self.keyword_proof_block
|
|
136
|
+
@keyword_proof_block ||= Set.new %w(next proof)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
def self.keyword_proof_chain
|
|
140
|
+
@keyword_proof_chain ||= Set.new %w(finally from then ultimately with)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
def self.keyword_proof_decl
|
|
144
|
+
@keyword_proof_decl ||= Set.new %w(
|
|
145
|
+
ML_prf also include including let moreover note
|
|
146
|
+
txt txt_raw unfolding using write
|
|
147
|
+
)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
def self.keyword_proof_asm
|
|
151
|
+
@keyword_proof_asm ||= Set.new %w(assume case def fix presume)
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
def self.keyword_proof_asm_goal
|
|
155
|
+
@keyword_proof_asm_goal ||= Set.new %w(guess obtain show thus)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
def self.keyword_proof_script
|
|
159
|
+
@keyword_proof_script ||= Set.new %w(apply apply_end apply_trace back defer prefer)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
state :root do
|
|
163
|
+
rule %r/\s+/, Text::Whitespace
|
|
164
|
+
rule %r/\(\*/, Comment, :comment
|
|
165
|
+
rule %r/\{\*|‹/, Text, :text
|
|
166
|
+
|
|
167
|
+
rule %r/::|\[|\]|-|[:()_=,|+!?]/, Operator
|
|
168
|
+
rule %r/[{}.]|\.\./, Operator::Word
|
|
169
|
+
|
|
170
|
+
def word(keywords)
|
|
171
|
+
return %r/\b(#{keywords.join('|')})\b/
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
rule %r/[a-zA-Z]\w*/ do |m|
|
|
175
|
+
sym = m[0]
|
|
176
|
+
|
|
177
|
+
if self.class.keyword_minor.include?(sym) ||
|
|
178
|
+
self.class.keyword_proof_script.include?(sym)
|
|
179
|
+
token Keyword::Pseudo
|
|
180
|
+
elsif self.class.keyword_diag.include?(sym)
|
|
181
|
+
token Keyword::Type
|
|
182
|
+
elsif self.class.keyword_thy.include?(sym) ||
|
|
183
|
+
self.class.keyword_theory_decl.include?(sym) ||
|
|
184
|
+
self.class.keyword_qed.include?(sym) ||
|
|
185
|
+
self.class.keyword_proof_goal.include?(sym) ||
|
|
186
|
+
self.class.keyword_proof_block.include?(sym) ||
|
|
187
|
+
self.class.keyword_proof_decl.include?(sym) ||
|
|
188
|
+
self.class.keyword_proof_chain.include?(sym) ||
|
|
189
|
+
self.class.keyword_proof_asm.include?(sym) ||
|
|
190
|
+
self.class.keyword_proof_asm_goal.include?(sym)
|
|
191
|
+
token Keyword
|
|
192
|
+
elsif self.class.keyword_section.include?(sym)
|
|
193
|
+
token Generic::Heading
|
|
194
|
+
elsif self.class.keyword_subsection.include?(sym)
|
|
195
|
+
token Generic::Subheading
|
|
196
|
+
elsif self.class.keyword_theory_goal.include?(sym) ||
|
|
197
|
+
self.class.keyword_theory_script.include?(sym)
|
|
198
|
+
token Keyword::Namespace
|
|
199
|
+
elsif self.class.keyword_abandon_proof.include?(sym)
|
|
200
|
+
token Generic::Error
|
|
201
|
+
else
|
|
202
|
+
token Name
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
rule %r/\\<\w*>/, Str::Symbol
|
|
207
|
+
|
|
208
|
+
rule %r/'[^\W\d][.\w']*/, Name::Variable
|
|
209
|
+
|
|
210
|
+
rule %r/0[xX][\da-fA-F][\da-fA-F_]*/, Num::Hex
|
|
211
|
+
rule %r/0[oO][0-7][0-7_]*/, Num::Oct
|
|
212
|
+
rule %r/0[bB][01][01_]*/, Num::Bin
|
|
213
|
+
|
|
214
|
+
rule %r/"/, Str, :string
|
|
215
|
+
rule %r/`/, Str::Other, :fact
|
|
216
|
+
# Everything except for (most) operators whitespaces may be name
|
|
217
|
+
rule %r/[^\s:|\[\]\-()=,+!?{}._][^\s:|\[\]\-()=,+!?{}]*/, Name
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
state :comment do
|
|
221
|
+
rule %r/[^(*)]+/, Comment
|
|
222
|
+
rule %r/\(\*/, Comment, :comment
|
|
223
|
+
rule %r/\*\)/, Comment, :pop!
|
|
224
|
+
rule %r/[(*)]/, Comment
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
state :text do
|
|
228
|
+
rule %r/[^{*}‹›]+/, Text
|
|
229
|
+
rule %r/\{\*|‹/, Text, :text
|
|
230
|
+
rule %r/\*\}|›/, Text, :pop!
|
|
231
|
+
rule %r/[{*}]/, Text
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
state :string do
|
|
235
|
+
rule %r/[^"\\]+/, Str
|
|
236
|
+
rule %r/\\<\w*>/, Str::Symbol
|
|
237
|
+
rule %r/\\"/, Str
|
|
238
|
+
rule %r/\\/, Str
|
|
239
|
+
rule %r/"/, Str, :pop!
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
state :fact do
|
|
243
|
+
rule %r/[^`\\]+/, Str::Other
|
|
244
|
+
rule %r/\\<\w*>/, Str::Symbol
|
|
245
|
+
rule %r/\\`/, Str::Other
|
|
246
|
+
rule %r/\\/, Str::Other
|
|
247
|
+
rule %r/`/, Str::Other, :pop!
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*- #
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Rouge
|
|
5
|
+
module Lexers
|
|
6
|
+
class ISBL < RegexLexer
|
|
7
|
+
title "ISBL"
|
|
8
|
+
desc "The ISBL programming language"
|
|
9
|
+
tag 'isbl'
|
|
10
|
+
filenames '*.isbl'
|
|
11
|
+
|
|
12
|
+
def self.keywords
|
|
13
|
+
@keywords = Set.new %w(
|
|
14
|
+
and и else иначе endexcept endfinally endforeach конецвсе endif конецесли endwhile
|
|
15
|
+
конецпока except exitfor finally foreach все if если in в not не or или try while пока
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
state :whitespace do
|
|
20
|
+
rule %r/\s+/m, Text
|
|
21
|
+
rule %r(//.*?$), Comment::Single
|
|
22
|
+
rule %r(/[*].*?[*]/)m, Comment::Multiline
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
state :dotted do
|
|
26
|
+
mixin :whitespace
|
|
27
|
+
rule %r/\p{Alnum}+/i do |m|
|
|
28
|
+
token(in_state?(:type) ? Keyword::Type : Name)
|
|
29
|
+
|
|
30
|
+
pop!
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
state :type do
|
|
35
|
+
mixin :whitespace
|
|
36
|
+
rule %r/\p{Word}+/, Name, :pop!
|
|
37
|
+
rule %r/[.]/, Punctuation, :dotted
|
|
38
|
+
rule(//) { pop! }
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
state :root do
|
|
42
|
+
mixin :whitespace
|
|
43
|
+
rule %r/[:]/, Punctuation, :type
|
|
44
|
+
rule %r/[.]/, Punctuation, :dotted
|
|
45
|
+
rule %r/[\[\]();]/, Punctuation
|
|
46
|
+
rule %r([&*+=<>/-]), Operator
|
|
47
|
+
rule %r/[\p{Alpha}_!]\p{Word}*(?=[(])/i, Name::Function
|
|
48
|
+
rule %r/[\p{Alpha}_!]\p{Word}*/i do |m|
|
|
49
|
+
if self.class.keywords.include?(m[0].downcase)
|
|
50
|
+
token Keyword
|
|
51
|
+
else
|
|
52
|
+
token Name::Variable
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
rule %r/\b(\d+(\.\d+)?)\b/, Literal::Number
|
|
56
|
+
rule %r(["].*?["])m, Literal::String::Double
|
|
57
|
+
rule %r(['].*?['])m, Literal::String::Single
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|