pax_global_header00006660000000000000000000000064141741725530014523gustar00rootroot0000000000000052 comment=cb51ad79b70c3f1bba8eb167d4fb525b7becf6d7 rouge-3.28.0/000077500000000000000000000000001417417255300127365ustar00rootroot00000000000000rouge-3.28.0/.github/000077500000000000000000000000001417417255300142765ustar00rootroot00000000000000rouge-3.28.0/.github/ISSUE_TEMPLATE/000077500000000000000000000000001417417255300164615ustar00rootroot00000000000000rouge-3.28.0/.github/ISSUE_TEMPLATE/documentation-error.md000066400000000000000000000005011417417255300227770ustar00rootroot00000000000000--- name: Documentation error about: Tell us about the documentation error title: '' labels: docs-request assignees: '' --- **Describe the error** A clear and concise description of the error. **Affected document** A link to the affected document. **Additional context** Add any other context about the problem here. rouge-3.28.0/.github/ISSUE_TEMPLATE/enhancement-request.md000066400000000000000000000007371417417255300227650ustar00rootroot00000000000000--- name: Enhancement request about: Suggest an idea to enhance Rouge title: '' labels: enhancement-request assignees: '' --- **Is your enhancement request related to a problem? Please describe.** A clear and concise description of the problem. Eg. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Additional context** Add any other context or screenshots about the enhancement request here. rouge-3.28.0/.github/ISSUE_TEMPLATE/lexer-bug.md000066400000000000000000000006731417417255300207030ustar00rootroot00000000000000--- name: Lexer bug about: Tell us about the lexer bug title: '' labels: bugfix-request assignees: '' --- **Name of the lexer** The name of the lexer with the bug. **Code sample** A sample of the code that produces the bug. ``` ``` It also helps if you can provide a link to a code sample on [rouge.jneen.net][dingus]. **Additional context** Add any other context about the problem here. [dingus]: http://rouge.jneen.net/ rouge-3.28.0/.github/ISSUE_TEMPLATE/lexer-request.md000066400000000000000000000012761417417255300216160ustar00rootroot00000000000000--- name: Lexer request about: Suggest a new lexer title: '' labels: lexer-request assignees: '' --- _Please note: New lexers are contributed to Rouge from the community. Your request will help the community in developing a lexer but it does not mean that anyone **will** develop the lexer._ **The name of the language** If possible, include a link to documentation explaining the syntax of the language. **Implementation in other libraries** If possible, include links to implementations in [Pygments](http://pygments.org/), [Chroma](https://github.com/alecthomas/chroma), [Highlight.js](https://highlightjs.org/), etc. **Additional context** Add any other context about the lexer request here. rouge-3.28.0/.github/ISSUE_TEMPLATE/library-bug.md000066400000000000000000000013411417417255300212210ustar00rootroot00000000000000--- name: Library bug about: Tell us about the library bug title: '' labels: bugfix-request assignees: '' --- _Please note: This is for non-lexer bugs._ **Describe the bug** A clear and concise description of the bug. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **System (please complete the following information):** - OS: [e.g. Ubuntu 18.04 LTS] - Ruby version [e.g. Ruby 2.6.0] - Rouge version [e.g. Rouge 3.0.0] **Additional context** Add any other context about the problem here. rouge-3.28.0/.github/stale.yml000066400000000000000000000015201417417255300161270ustar00rootroot00000000000000# Number of days of inactivity before an issue becomes stale daysUntilStale: 365 # Number of days of inactivity before a stale issue is closed daysUntilClose: 14 # Issues with these labels will never be considered stale exemptLabels: - lexer-request - pr-open - security # Label to use when marking an issue as stale staleLabel: stale-issue # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > This issue has been automatically marked as stale because it has not had any activity for more than a year. It will be closed if no additional activity occurs within the next 14 days. If you would like this issue to remain open, please reply and let us know if the issue is still reproducible. # Comment to post when closing a stale issue. Set to `false` to disable closeComment: false only: issues rouge-3.28.0/.github/workflows/000077500000000000000000000000001417417255300163335ustar00rootroot00000000000000rouge-3.28.0/.github/workflows/ruby.yml000066400000000000000000000017731417417255300200470ustar00rootroot00000000000000name: CI on: push: # The `github-workflow-test` can be used to test changes without making a PR branches: [ master, github-workflow-test ] pull_request: branches: [ master ] jobs: test: runs-on: ubuntu-latest strategy: matrix: ruby-version: [ '2.5', '2.6', '2.7', '3.0'] steps: - uses: actions/checkout@v2 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} # runs 'bundle install' and caches installed gems automatically bundler-cache: true - name: Run tests run: bundle exec rake # Those are only run with the latest supported version # Make sure to update the `if` when changing supported versions - name: Profile Memory Allocation if: matrix.ruby-version == '3.0' run: bundle exec rake check:memory - name: Interpreter Warnings Test if: matrix.ruby-version == '3.0' env: RUBYOPT: '-w' run: bundle exec rake check:specs rouge-3.28.0/.gitignore000066400000000000000000000002561417417255300147310ustar00rootroot00000000000000# it's a gem, ignore the lockfile Gemfile.lock # build artifacts *.gem .bundle /vendor # docs /.yardoc /doc # tmp /tmp rouge-memory.tmp # IntelliJ IDEA / RubyMine .idea/ rouge-3.28.0/.rubocop.yml000066400000000000000000000011531417417255300152100ustar00rootroot00000000000000AllCops: TargetRubyVersion: 2.0 DisplayCopNames: true Exclude: - "tasks/**/*" - "vendor/**/*" Style: Enabled: false Layout: Enabled: false Metrics: Enabled: false Bundler: Enabled: false Performance/RedundantBlockCall: Enabled: false Lint/UselessAssignment: Enabled: false Lint/AssignmentInCondition: AllowSafeAssignment: true Lint/UnusedMethodArgument: Enabled: false Lint/UnusedBlockArgument: Enabled: false Lint/EndAlignment: Enabled: false Lint/EmptyWhen: Enabled: false Lint/UnneededSplatExpansion: Enabled: false Lint/IneffectiveAccessModifier: Enabled: false rouge-3.28.0/.yardopts000066400000000000000000000001221417417255300145770ustar00rootroot00000000000000--no-private --protected --markup-provider=redcarpet --markup=markdown - docs/*.* rouge-3.28.0/CHANGELOG.md000066400000000000000000003004121417417255300145470ustar00rootroot00000000000000# Changelog This log summarizes the changes in each released version of Rouge. Rouge follows [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html). ## version 3.28.0: 2022-01-26 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.27.0...v3.28.0) - C Lexer - Fix highlight of #include statement ([#1770](https://github.com/rouge-ruby/rouge/pull/1770) by cdown) - Console Lexer - Fix issue with console line ends with backlash ([#1779](https://github.com/rouge-ruby/rouge/pull/1779) by mojavelinux) - CPP Lexer - Add keywords and operators introduced in C++20 ([#1784](https://github.com/rouge-ruby/rouge/pull/1784) by tchaikov) - Cypher Lexer - Support multi-line comments ([#1710](https://github.com/rouge-ruby/rouge/pull/1710) by Mogztter) - Dart Lexer - Add new keywords and types ([#1691](https://github.com/rouge-ruby/rouge/pull/1691) by parlough) - Fluent Lexer (**NEW**) - Add Fluent lexer ([#1697](https://github.com/rouge-ruby/rouge/pull/1697) by rkh) - HCL Lexer - Add new file extensions ([#1769](https://github.com/rouge-ruby/rouge/pull/1769) by maximd) - JSX Lexer - Allow dashes in attribute names ([#1650](https://github.com/rouge-ruby/rouge/pull/1650) by bpl) - Kotlin Lexer - Fix highlight of interface, nullable type and generic property ([#1762](https://github.com/rouge-ruby/rouge/pull/1762) by vidarh) - Rust Lexer - Update keywords for a new version ([#1649](https://github.com/rouge-ruby/rouge/pull/1649) by nsfisis) - SPARQL Lexer - Support unicode names ([#1654](https://github.com/rouge-ruby/rouge/pull/1654) by jakubklimek) - Stan Lexer (**NEW**) - Add Stan lexer ([#1735](https://github.com/rouge-ruby/rouge/pull/1735) by jgaeb) - Stata Lexer (**NEW**) - Add Stata lexer ([#1637](https://github.com/rouge-ruby/rouge/pull/1658) by reifjulian) - TOML Lexer - Support quoted keys ([#1777](https://github.com/rouge-ruby/rouge/pull/1777) by tancnle) - Fix visual test app on Ruby 3.0 ([#1696](https://github.com/rouge-ruby/rouge/pull/1696) by rkh) ## version 3.27.0: 2021-12-15 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.26.1...v3.27.0) - Ceylon Lexer - Backtracking fix in interpolation regex ([#1773](https://github.com/rouge-ruby/rouge/pull/1773) by thewoolleyman) - Dafny Lexer - Add Dafny Lexer ([#1647](https://github.com/rouge-ruby/rouge/pull/1647/) by davidcok, mschlaipfer) - Elixir Lexer - Add support for HEEX templates ([#1736](https://github.com/rouge-ruby/rouge/pull/1736) by sineed - Rust Lexer - Fix lexing of integers, escapes, identifiers, unicode idents, keywords and builtins, byte strings and multiline and doc comments ([#1711](https://github.com/rouge-ruby/rouge/pull/1711/commits) by thomcc) - SQL Lexer - Curly brace support ([#1714](https://github.com/rouge-ruby/rouge/pull/1714) by hawkfish) - Add more SQL dialects in visual samples ([#1751](https://github.com/rouge-ruby/rouge/pull/1751) by tancnle) - Windowing keywords support ([#1754](https://github.com/rouge-ruby/rouge/pull/1754) by hawkfish) - Swift Lexer - Add 5.5 keywords ([#1715](https://github.com/rouge-ruby/rouge/pull/1715) by johnfairh)) - Rouge CI - Migrate from Travis CI to GitHub ([#1728](https://github.com/rouge-ruby/rouge/pull/1728) by Geod24) - Documentation - Full list of supported languages ([#1739](https://github.com/rouge-ruby/rouge/pull/1739) by gdubicki) - Various fixes and improvements ([#1741](https://github.com/rouge-ruby/rouge/pull/1741), [#1745](https://github.com/rouge-ruby/rouge/pull/1745), [#1747](https://github.com/rouge-ruby/rouge/pull/1747), [#1748](https://github.com/rouge-ruby/rouge/pull/1748), [#1749](https://github.com/rouge-ruby/rouge/pull/1749), [#1756](https://github.com/rouge-ruby/rouge/pull/1756) by tancnle) ## version 3.26.1: 2021-09-17 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.26.0...v3.26.1) - CPP Lexer - Add year and date chrono literals, add std::complex literals, fix chrono literals with digit separator ([#1665](https://github.com/rouge-ruby/rouge/pull/1665/) by swheaton) - Factor and GHC Core Lexer - Fix catastrophic backtrack ([#1690](https://github.com/rouge-ruby/rouge/pull/1690) by Ravlen) - JSL Lexer - Fix single line block comments, scoped variables and functions ([#1663](https://github.com/rouge-ruby/rouge/pull/1663) by BenPH) - YAML Lexer - Fix YAML key containing special character ([#1667](https://github.com/rouge-ruby/rouge/pull/1667) by tancnle) - Fix Ruby 2.7 keyword parameter deprecation warning ([#1597](https://github.com/rouge-ruby/rouge/pull/1597) by stanhu) - Updated README ([#1666](https://github.com/rouge-ruby/rouge/pull/1666) by dchacke) ## version 3.26.0: 2020-12-09 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.25.0...v3.26.0) - CMake Lexer - Add missing CMake commands to CMake lexer ([#1630](https://github.com/rouge-ruby/rouge/pull/1630/) by gnaggnoyil) - Crystal Lexer - Improve visual sample and macro support for Crystal lexer ([#1644](https://github.com/rouge-ruby/rouge/pull/1644/) by Michael Camilleri) - Support floor division operator in Crystal lexer ([#1639](https://github.com/rouge-ruby/rouge/pull/1639/) by Rymiel) - JSL Lexer - Fix lexing of messages, nested comments, missing operators and decimals in JSL lexer ([#1638](https://github.com/rouge-ruby/rouge/pull/1638/) by Ben Peachey Higdon) - OCL Lexer (**NEW**) - Add OCL lexer ([#1637](https://github.com/rouge-ruby/rouge/pull/1637/) by Gerson Sunyé) - Python Lexer - Use String::Affix token for string prefixes in Python lexer ([#1635](https://github.com/rouge-ruby/rouge/pull/1635/) by Tan Le) - ReasonML Lexer - Improve support for comments in ReasonML lexer ([#1641](https://github.com/rouge-ruby/rouge/pull/1641/) by Amirali Esmaeili) - ReScript Lexer (**NEW**) - Add ReScript lexer ([#1633](https://github.com/rouge-ruby/rouge/pull/1633/) by Amirali Esmaeili) - Rust Lexer - Add support for octal literals to Rust lexer ([#1643](https://github.com/rouge-ruby/rouge/pull/1643/) by nsfisis) ## version 3.25.0: 2020-11-11 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.24.0...v3.25.0) - General - Use `Enumerator#with_index` to detect line numbers ([#1615](https://github.com/rouge-ruby/rouge/pull/1615/) by takafumi.suzuki) - Batchfile Lexer - Add support for long options to Batchfile lexer ([#1626](https://github.com/rouge-ruby/rouge/pull/1626/) by Michael Camilleri) - C++ Lexer - Fix binary literal digit separator in C++ lexer ([#1620](https://github.com/rouge-ruby/rouge/pull/1620/) by swheaton) - Docker Lexer - Add `Dockerfile` as an alias for the Docker lexer ([#1609](https://github.com/rouge-ruby/rouge/pull/1609/) by Konnor Rogers) - JavaScript Lexer - Fix template string lexing in JavaScript lexer ([#1623](https://github.com/rouge-ruby/rouge/pull/1623/) by Michael Camilleri) - Kotlin Lexer - Ensure word break follows keywords in Kotlin lexer ([#1621](https://github.com/rouge-ruby/rouge/pull/1621/) by Michael Camilleri) - Perl Lexer - Improve support for sigils in Perl lexer ([#1625](https://github.com/rouge-ruby/rouge/pull/1625/) by Michael Camilleri) - PowerShell Lexer - Improve lexing of nested data structures in PowerShell lexer ([#1622](https://github.com/rouge-ruby/rouge/pull/1622/) by Michael Camilleri) - Improve handling of data structure literals in PowerShell lexer ([#1595](https://github.com/rouge-ruby/rouge/pull/1595/) by Jeanine Adkisson) - Ruby Lexer - Revert empty patterns in Ruby lexer ([#1624](https://github.com/rouge-ruby/rouge/pull/1624/) by Michael Camilleri) - Rust Lexer - Add continue to keywords in Rust lexer ([#1617](https://github.com/rouge-ruby/rouge/pull/1617/) by Aleksey Kladov) - Velocity Lexer - Fix lexing of brackets in Velocity lexer ([#1605](https://github.com/rouge-ruby/rouge/pull/1605/) by domRowan) ## version 3.24.0: 2020-10-14 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.23.0...v3.24.0) - General - Fix errors from new empty regex requirements ([#1606](https://github.com/rouge-ruby/rouge/pull/1606/) by Michael Camilleri) - Restrict the use of empty-matching regular expressions ([#1548](https://github.com/rouge-ruby/rouge/pull/1548/) by Jeanine Adkisson) - Add a CLI debug command that provides reasonable defaults ([#1593](https://github.com/rouge-ruby/rouge/pull/1593/) by Jeanine Adkisson) - Update documentation to use bundle config set path ([#1583](https://github.com/rouge-ruby/rouge/pull/1583/) by ComFreek) - Add line highlighting option ([#1426](https://github.com/rouge-ruby/rouge/pull/1426/) by Dan Allen) - Add Lexer#with and Lexer.lookup_fancy ([#1565](https://github.com/rouge-ruby/rouge/pull/1565/) by Jeanine Adkisson) - Apex Lexer - Fix invalid use of String#casecmp in Apex lexer ([#1596](https://github.com/rouge-ruby/rouge/pull/1596/) by Jeanine Adkisson) - E-mail Lexer (**NEW**) - Add e-mail lexer ([#1567](https://github.com/rouge-ruby/rouge/pull/1567/) by Steve Mokris) - HTTP Lexer - Add a :content option to HTTP lexer ([#1592](https://github.com/rouge-ruby/rouge/pull/1592/) by Jeanine Adkisson) - J Lexer (**NEW**) - Add J lexer ([#1584](https://github.com/rouge-ruby/rouge/pull/1584/) by unsigned-wrong-wrong-int) - Janet Lexer - Improve handling of quoted forms in Janet lexer ([#1586](https://github.com/rouge-ruby/rouge/pull/1586/) by Michael Camilleri) - JavaScript Lexer - Improve optional chaining in JavaScript lexer ([#1594](https://github.com/rouge-ruby/rouge/pull/1594/) by Jeanine Adkisson) - Rust Lexer - Fix lexing of await in Rust lexer ([#1587](https://github.com/rouge-ruby/rouge/pull/1587/) by nsfisis) ## version 3.23.0: 2020-09-09 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.22.0...v3.23.0) - Kotlin Lexer - Fix handling of ::class in Kotlin lexer ([#1572](https://github.com/rouge-ruby/rouge/pull/1572/) by Manuel Dossinger) - PostScript Lexer (**NEW**) - Add PostScript lexer ([#1578](https://github.com/rouge-ruby/rouge/pull/1578/) by Liam Cooke) - Ruby Lexer - Handle % like / in Ruby lexer ([#1563](https://github.com/rouge-ruby/rouge/pull/1563/) by Jeanine Adkisson) - Rust Lexer - Support tuple index expressions in Rust lexer ([#1580](https://github.com/rouge-ruby/rouge/pull/1580/) by Hugo Peixoto) - Fix floating point separators in Rust lexer ([#1581](https://github.com/rouge-ruby/rouge/pull/1581/) by Hugo Peixoto) - systemd Lexer (**NEW**) - Add systemd lexer ([#1568](https://github.com/rouge-ruby/rouge/pull/1568/) by Jean-Louis Jouannic) ## version 3.22.0: 2020-08-12 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.21.0...v3.22.0) - PHP Lexer - Rewrite PHP lexer to support use statements, function declarations and type declarations ([#1489](https://github.com/rouge-ruby/rouge/pull/1489/) by Michael Camilleri) ## version 3.21.0: 2020-07-15 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.20.0...v3.21.0) - General - Improve support for Unicode identifiers in various lexers ([#1537](https://github.com/rouge-ruby/rouge/pull/1537/) by Benjamin Galliot) - Fix YARD error when parsing LiveScript lexer ([#1541](https://github.com/rouge-ruby/rouge/pull/1541/) by Michael Camilleri) - Batchfile Lexer - Allow @ before REM in Batchfile lexer ([#1545](https://github.com/rouge-ruby/rouge/pull/1545/) by Konrad Borowski) - BrightScript Lexer (**NEW**) - Add BrightScript lexer ([#1544](https://github.com/rouge-ruby/rouge/pull/1544/) by domRowan) - C++ Lexer - Support template parameter packs in C++ lexer ([#1555](https://github.com/rouge-ruby/rouge/pull/1555/) by Michael Camilleri) - Docker Lexer - Remove docker_ file glob from Docker lexer ([#1550](https://github.com/rouge-ruby/rouge/pull/1550/) by Michael Camilleri) - Janet Lexer (**NEW**) - Add Janet lexer ([#1558](https://github.com/rouge-ruby/rouge/pull/1558/) by sogaiu) - Jinja Lexer - Fix nesting of raw and verbatim tags in Jinja/Twig lexers ([#1552](https://github.com/rouge-ruby/rouge/pull/1552/) by Michael Camilleri) - Perl Lexer - Support fat comma in Perl lexer ([#1553](https://github.com/rouge-ruby/rouge/pull/1553/) by Michael Camilleri) - Fix character escaping in Perl lexer ([#1549](https://github.com/rouge-ruby/rouge/pull/1549/) by Michael Camilleri) - PowerShell Lexer - Support ? in PowerShell lexer ([#1559](https://github.com/rouge-ruby/rouge/pull/1559/) by Michael Camilleri) - Support using grave character to escape characters in PowerShell lexer ([#1551](https://github.com/rouge-ruby/rouge/pull/1551/) by Michael Camilleri) - Rego Lexer - Fix identifier matching in Rego lexer ([#1556](https://github.com/rouge-ruby/rouge/pull/1556/) by Michael Camilleri) - Sass Lexer - Fix & selector matching in Sass/SCSS lexer ([#1554](https://github.com/rouge-ruby/rouge/pull/1554/) by Michael Camilleri) - SCSS Lexer - Fix & selector matching in Sass/SCSS lexer ([#1554](https://github.com/rouge-ruby/rouge/pull/1554/) by Michael Camilleri) - SSH Config Lexer (**NEW**) - Add SSH config lexer ([#1543](https://github.com/rouge-ruby/rouge/pull/1543/) by Chris Buckley) - Twig Lexer - Fix nesting of raw and verbatim tags in Jinja/Twig lexers ([#1552](https://github.com/rouge-ruby/rouge/pull/1552/) by Michael Camilleri) ## version 3.20.0: 2020-06-10 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.19.0...v3.20.0) - Augeas Lexer (**NEW**) - Add Augeas lexer ([#1521](https://github.com/rouge-ruby/rouge/pull/1521/) by Raphaël Pinson) - BibTeX Lexer (**NEW**) - Add BibTeX lexer ([#1360](https://github.com/rouge-ruby/rouge/pull/1360/) by alexlihengwang) - C++ Lexer - Support scope resolution operator in C++ lexer ([#1523](https://github.com/rouge-ruby/rouge/pull/1523/) by Michael Camilleri) - Diff Lexer - Fix erroneous detection in Diff lexer ([#1532](https://github.com/rouge-ruby/rouge/pull/1532/) by Catalin) - Haskell Lexer - Improve support for single quotes in Haskell lexer ([#1524](https://github.com/rouge-ruby/rouge/pull/1524/) by Michael Camilleri) - HLSL Lexer (**NEW**) - Add HLSL lexer ([#1520](https://github.com/rouge-ruby/rouge/pull/1520/) by Mitch McClellan) - HTML Lexer - Add `*.cshtml` file glob to HTML lexer ([#1522](https://github.com/rouge-ruby/rouge/pull/1522/) by Michael Camilleri) - JavaScript Lexer - Fix erroneous brace matching rule in JavaScript lexer ([#1526](https://github.com/rouge-ruby/rouge/pull/1526/) by Michael Camilleri) - JSX Lexer - Simplify JSX and TSX lexers ([#1492](https://github.com/rouge-ruby/rouge/pull/1492/) by Michael Camilleri) - LiveScript Lexer (**NEW**) - Add LiveScript lexer ([#650](https://github.com/rouge-ruby/rouge/pull/650/) by FuriousBoar) - OpenType Feature File Lexer - Add new keywords to and fix bugs in OpenType feature file lexer ([#1519](https://github.com/rouge-ruby/rouge/pull/1519/) by Zachary Quinn Scheuren) - PowerShell Lexer - Fix incorrect predicate usage in PowerShell lexer ([#1536](https://github.com/rouge-ruby/rouge/pull/1536/) by Michael Camilleri) - TSX Lexer - Permit use of trailing comma in generics in TSX lexer ([#1528](https://github.com/rouge-ruby/rouge/pull/1528/) by Michael Camilleri) - Simplify JSX and TSX lexers ([#1492](https://github.com/rouge-ruby/rouge/pull/1492/) by Michael Camilleri) - Change the way common methods are mixed in to TypeScript-based lexers ([#1527](https://github.com/rouge-ruby/rouge/pull/1527/) by Michael Camilleri) - TypeScript Lexer - Support nullish coalescing operator in TypeScript lexer ([#1529](https://github.com/rouge-ruby/rouge/pull/1529/) by Michael Camilleri) - Move rules from TypeScript lexer to TypeScript common module ([#1530](https://github.com/rouge-ruby/rouge/pull/1530/) by Michael Camilleri) - Change the way common methods are mixed in to TypeScript-based lexers ([#1527](https://github.com/rouge-ruby/rouge/pull/1527/) by Michael Camilleri) - Velocity Lexer (**NEW**) - Add Velocity lexer ([#1518](https://github.com/rouge-ruby/rouge/pull/1518/) by Michael Camilleri) - Zig Lexer (**NEW**) - Add Zig lexer ([#1533](https://github.com/rouge-ruby/rouge/pull/1533/) by Timmy Jose) ## version 3.19.0: 2020-05-13 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.18.0...v3.19.0) - General - Use qualified method name for calls to Kernel#load ([#1503](https://github.com/rouge-ruby/rouge/pull/1503/) by Michael Camilleri) - Update keyword-generation Rake tasks ([#1500](https://github.com/rouge-ruby/rouge/pull/1500/) by Michael Camilleri) - Add Rake task to generate keywords for LLVM lexer ([#1505](https://github.com/rouge-ruby/rouge/pull/1505/) by Michael Camilleri) - JavaScript Lexer - Add CommonJS file glob to JavaScript lexer ([#1511](https://github.com/rouge-ruby/rouge/pull/1511/) by Andrew) - Kotlin Lexer - Improve handling of numbers in Kotlin lexer ([#1509](https://github.com/rouge-ruby/rouge/pull/1509/) by Jen) - Add generic parameter keywords to Kotlin lexer ([#1504](https://github.com/rouge-ruby/rouge/pull/1504/) by Jen) - Python Lexer - Fix RuboCop grouped expression warning in Python lexer ([#1513](https://github.com/rouge-ruby/rouge/pull/1513/) by Michael Camilleri) - Allow Unicode in Python identifiers ([#1510](https://github.com/rouge-ruby/rouge/pull/1510/) by Niko Strijbol) - Fix escape sequences in Python's strings ([#1508](https://github.com/rouge-ruby/rouge/pull/1508/) by Michael Camilleri) - SPARQL Lexer - Support the 'a' keyword in SPARQL lexer ([#1493](https://github.com/rouge-ruby/rouge/pull/1493/) by Michael Camilleri) - Turtle Lexer - Allow empty prefix in Turtle lexer ([#1494](https://github.com/rouge-ruby/rouge/pull/1494/) by Michael Camilleri) ## version 3.18.0: 2020-04-15 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.17.0...v3.18.0) - General - Use plain Ruby files for built-in keyword lists ([#1418](https://github.com/rouge-ruby/rouge/pull/1418/) by Ashwin Maroli) - Load Rouge files using methods scoped to the Rouge module ([#1481](https://github.com/rouge-ruby/rouge/pull/1481/) by Michael Camilleri) - Use module constants to store directory paths for file loading ([#1416](https://github.com/rouge-ruby/rouge/pull/1416/) by Ashwin Maroli) - Fix Ruby keyword warning in check:memory Rake task ([#1431](https://github.com/rouge-ruby/rouge/pull/1431/) by Ashwin Maroli) - Revert Rubocop splat expansion cop ([#1461](https://github.com/rouge-ruby/rouge/pull/1461/) by Michael Camilleri) - C++ Lexer - Make lexing of class-like identifiers more consistent in C++ lexer ([#1495](https://github.com/rouge-ruby/rouge/pull/1495/) by Michael Camilleri) - CMake Lexer - Fix handling of escaped quotes in CMake lexer ([#1473](https://github.com/rouge-ruby/rouge/pull/1473/) by Michael Camilleri) - Console Lexer - Add option to tokenise error messages in Console lexer ([#1498](https://github.com/rouge-ruby/rouge/pull/1498/) by Gavin Lock) - Cypher Lexer (**NEW**) - Add Cypher lexer ([#1423](https://github.com/rouge-ruby/rouge/pull/1423/) by Guillaume Grossetie) - Datastudio Lexer (**NEW**) - Add Datastudio lexer ([#1453](https://github.com/rouge-ruby/rouge/pull/1453/) by Bastien Durel) - F# Lexer - Support dictionary indexers on nested properties in F# lexer ([#1482](https://github.com/rouge-ruby/rouge/pull/1482/) by Michael Camilleri) - GHC Cmm Lexer (**NEW**) - Add GHC Cmm lexer ([#1387](https://github.com/rouge-ruby/rouge/pull/1387/) by Sven Tennie) - ISBL Lexer (**NEW**) - Add ISBL lexer ([#891](https://github.com/rouge-ruby/rouge/pull/891/) by Dmitriy Tarasov) - JSON Lexer - Allow unmatched braces and brackets in JSON lexer ([#1497](https://github.com/rouge-ruby/rouge/pull/1497/) by Michael Camilleri) - JSONDOC Lexer - Add jsonc alias to JSONDOC lexer ([#1440](https://github.com/rouge-ruby/rouge/pull/1440/) by Michael Camilleri) - Kotlin Lexer - Support labels in Kotlin lexer ([#1496](https://github.com/rouge-ruby/rouge/pull/1496/) by Jen) - Markdown Lexer - Add support for multi-line links in Markdown lexer ([#1465](https://github.com/rouge-ruby/rouge/pull/1465/) by Marcel Amirault) - Pascal Lexer - Add Lazarus program file glob to Pascal lexer ([#1466](https://github.com/rouge-ruby/rouge/pull/1466/) by Morabaraba) - PHP Lexer - Separate ? from other operators in PHP lexer ([#1478](https://github.com/rouge-ruby/rouge/pull/1478/) by Michael Camilleri) - Fix bugs, and better support v7.4.0 features, in PHP lexer ([#1397](https://github.com/rouge-ruby/rouge/pull/1397/) by julp) - Python Lexer - Use generic string states in Python lexer ([#1477](https://github.com/rouge-ruby/rouge/pull/1477/) by Michael Camilleri) - Remove . as a operator in Python lexer ([#1375](https://github.com/rouge-ruby/rouge/pull/1375/) by Andrew Nisbet) - Racket Lexer - Improve support for # in Racket lexer ([#1472](https://github.com/rouge-ruby/rouge/pull/1472/) by Michael Camilleri) - Rego Lexer (**NEW**) - Add Rego lexer ([#1468](https://github.com/rouge-ruby/rouge/pull/1468/) by David Ashby) - Ruby Lexer - Improve lexing of ternaries that include symbols in Ruby lexer ([#1476](https://github.com/rouge-ruby/rouge/pull/1476/) by Michael Camilleri) - Fix tokenization of compact class names in Ruby lexer ([#1470](https://github.com/rouge-ruby/rouge/pull/1470/) by Ashwin Maroli) - Solidity Lexer (**NEW**) - Add Solidity lexer ([#760](https://github.com/rouge-ruby/rouge/pull/760/) by Noel Maersk) - Terraform Lexer - Support regular expressions in Terraform lexer ([#1490](https://github.com/rouge-ruby/rouge/pull/1490/) by Michael Camilleri) - TypeScript Lexer - Add support for optional chaining operator to TypeScript lexer ([#1475](https://github.com/rouge-ruby/rouge/pull/1475/) by Michael Camilleri) - Vue Lexer - Support slot shorthand syntax to Vue lexer ([#1483](https://github.com/rouge-ruby/rouge/pull/1483/) by Michael Camilleri) - YANG Lexer (**NEW**) - Remove duplicate identity keyword in YANG Lexer ([#1499](https://github.com/rouge-ruby/rouge/pull/1499/) by GRIBOK) - Make default rule more permissive in YANG lexer ([#1488](https://github.com/rouge-ruby/rouge/pull/1488/) by GRIBOK) - Update URL in YANG visual sample ([#1474](https://github.com/rouge-ruby/rouge/pull/1474/) by GRIBOK) - Add YANG lexer ([#1458](https://github.com/rouge-ruby/rouge/pull/1458/) by GRIBOK) ## version 3.17.0: 2020-03-11 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.16.0...v3.17.0) - General - Fix name of splat expansion Rubocop rule ([#1451](https://github.com/rouge-ruby/rouge/pull/1451/) by Hiroki Noda) - CoffeeScript Lexer - Improve regex and string lexing in CoffeeScript lexer ([#1441](https://github.com/rouge-ruby/rouge/pull/1441/) by Michael Camilleri) - ECL Lexer (**NEW**) - Add ECL lexer ([#1396](https://github.com/rouge-ruby/rouge/pull/1396/) by David de Hilster) - Markdown Lexer - Fix brackets in links in Markdown lexer ([#1445](https://github.com/rouge-ruby/rouge/pull/1445/) by Marcel Amirault) - Fix fenced code blocks in Markdown lexer ([#1442](https://github.com/rouge-ruby/rouge/pull/1442/) by Michael Camilleri) - NASM Lexer - Rewrite NASM lexer ([#1428](https://github.com/rouge-ruby/rouge/pull/1428/) by Michael Camilleri) - Ruby Lexer - Support additional number literals in the Ruby lexer ([#1456](https://github.com/rouge-ruby/rouge/pull/1456/) by FUJI Goro) - Scala Lexer - Fix symbol lexing in Scala lexer ([#1438](https://github.com/rouge-ruby/rouge/pull/1438/) by Michael Camilleri) - Varnish Lexer - Add support for Fastly extensions to Varnish lexer ([#1454](https://github.com/rouge-ruby/rouge/pull/1454/) by FUJI Goro) ## version 3.16.0: 2020-02-12 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.15.0...v3.16.0) - General - Update GitHub Issues settings ([#1436](https://github.com/rouge-ruby/rouge/pull/1436/) by Michael Camilleri) - Add information about custom HTML formatters to README ([#1415](https://github.com/rouge-ruby/rouge/pull/1415/) by Jeanine Adkisson) - Fix memoisation of Lexer.detectable? ([#1425](https://github.com/rouge-ruby/rouge/pull/1425/) by Ashwin Maroli) - Update latest Ruby checked by Travis to 2.7 ([#1422](https://github.com/rouge-ruby/rouge/pull/1422/) by Michael Camilleri) - Add TerminalTruecolor formatter ([#1413](https://github.com/rouge-ruby/rouge/pull/1413/) by Jeanine Adkisson) - Fix escaping of term codes in Terminal256 formatter ([#1404](https://github.com/rouge-ruby/rouge/pull/1404/) by Jeanine Adkisson) - Fix crash in Terminal256 formatter with escaped tokens ([#1402](https://github.com/rouge-ruby/rouge/pull/1402/) by Jeanine Adkisson) - D Lexer - Add __FILE_FULL_PATH__ keyword to D lexer ([#1394](https://github.com/rouge-ruby/rouge/pull/1394/) by Hiroki Noda) - Java Lexer - Support Unicode identifiers in Java lexer ([#1414](https://github.com/rouge-ruby/rouge/pull/1414/) by Michael Camilleri) - Combine import and package rules in Java lexer ([#1389](https://github.com/rouge-ruby/rouge/pull/1389/) by Michael Camilleri) - Lua Lexer - Add regex support to Lua lexer ([#1403](https://github.com/rouge-ruby/rouge/pull/1403/) by Michael Camilleri) - NASM Lexer - Improve the NASM visual sample ([#1421](https://github.com/rouge-ruby/rouge/pull/1421/) by Bernardo Sulzbach) - Objective-C Lexer - Add @autoreleasepool keyword to Objective-C lexer ([#1424](https://github.com/rouge-ruby/rouge/pull/1424/) by Nicolas Bouilleaud) - Fix Error token in common Objective-C module ([#1406](https://github.com/rouge-ruby/rouge/pull/1406/) by Masataka Pocke Kuwabara) - PowerShell Lexer - Fix array access priority in PowerShell lexer ([#1429](https://github.com/rouge-ruby/rouge/pull/1429/) by Michael Camilleri) - Rust Lexer - Support raw strings in Rust lexer ([#1399](https://github.com/rouge-ruby/rouge/pull/1399/) by Konrad Borowski) - Remove sprintf-style format parsing from Rust lexer ([#1400](https://github.com/rouge-ruby/rouge/pull/1400/) by Konrad Borowski) - Shell Lexer - Support using '"' to identify heredoc delimiters in Shell lexer ([#1411](https://github.com/rouge-ruby/rouge/pull/1411/) by Michael Camilleri) - TOML Lexer - Improve string syntax support in TOML lexer ([#1419](https://github.com/rouge-ruby/rouge/pull/1419/) by Jeanine Adkisson) - TypeScript Lexer - Support optional props in TypeScript lexer ([#1393](https://github.com/rouge-ruby/rouge/pull/1393/) by Michael Camilleri) - Varnish Lexer (**NEW**) - Add Varnish lexer ([#365](https://github.com/rouge-ruby/rouge/pull/365/) by julp) - Clean up Varnish lexer ([#1433](https://github.com/rouge-ruby/rouge/pull/1433/) by Michael Camilleri) ## version 3.15.0: 2020-01-15 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.14.0...v3.15.0) - General - Fix parsing of 'false' as Boolean option value ([#1382](https://github.com/rouge-ruby/rouge/pull/1382/) by Michael Camilleri) - Console Lexer - Fix comment parsing in Console lexer ([#1379](https://github.com/rouge-ruby/rouge/pull/1379/) by Michael Camilleri) - FreeFEM Lexer (**NEW**) - Add FreeFEM lexer ([#1356](https://github.com/rouge-ruby/rouge/pull/1356/) by Simon Garnotel) - GHC Lexer (**NEW**) - Add GHC Core lexer ([#1377](https://github.com/rouge-ruby/rouge/pull/1377/) by Sven Tennie) - Jinja Lexer - Improve comments in Jinja lexer ([#1386](https://github.com/rouge-ruby/rouge/pull/1386/) by Rick Sherman) - Allow spaces after filter pipes in Jinja lexer ([#1385](https://github.com/rouge-ruby/rouge/pull/1385/) by Rick Sherman) - LLVM Lexer - Add addrspacecast keyword, change keyword matching system in LLVM lexer ([#1376](https://github.com/rouge-ruby/rouge/pull/1376/) by Michael Camilleri) - Objective-C++ Lexer (**NEW**) - Add Objective-C++ lexer ([#1378](https://github.com/rouge-ruby/rouge/pull/1378/) by Saagar Jha) - Python Lexer - Add Starlark support to Python lexer ([#1369](https://github.com/rouge-ruby/rouge/pull/1369/) by zoidbergwill) - Rust Lexer - Add division operator to Rust lexer ([#1384](https://github.com/rouge-ruby/rouge/pull/1384/) by Hugo Peixoto) - Swift Lexer - Add some keyword and key-path syntax to Swift lexer ([#1332](https://github.com/rouge-ruby/rouge/pull/1332/) by Jim Dovey) ## version 3.14.0: 2019-12-11 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.13.0...v3.14.0) - General - Fix lexing of comments at the EOF ([#1371](https://github.com/rouge-ruby/rouge/pull/1371/) by Maxime Kjaer) - Fix typo in README.md ([#1367](https://github.com/rouge-ruby/rouge/pull/1367/) by Sven Tennie) - JSONDOC Lexer - Update state names in json-doc lexer ([#1364](https://github.com/rouge-ruby/rouge/pull/1364/) by Maxime Kjaer) - Liquid Lexer - Add pattern for matching filenames to the Liquid lexer ([#1351](https://github.com/rouge-ruby/rouge/pull/1351/) by Eric Knibbe) - Magik Lexer - Add `_finally` keyword to Magik lexer ([#1365](https://github.com/rouge-ruby/rouge/pull/1365/) by Steven Looman) - NES Assembly Lexer (**NEW**) - Add NES Assembly lexer ([#1354](https://github.com/rouge-ruby/rouge/pull/1354/) by Yury Sinev) - Slice Lexer (**NEW**) - Add Slice lexer ([#867](https://github.com/rouge-ruby/rouge/pull/867/) by jolkdarr) - TOML Lexer - Add support for inline tables to TOML lexer ([#1359](https://github.com/rouge-ruby/rouge/pull/1359/) by Michael Camilleri) ## version 3.13.0: 2019-11-13 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.12.0...v3.13.0) - BPF Lexer - Support disassembler output in BPF lexer ([#1346](https://github.com/rouge-ruby/rouge/pull/1346/) by Paul Chaignon) - Q Lexer - Fix quote escaping in Q lexer ([#1355](https://github.com/rouge-ruby/rouge/pull/1355/) by AngusWilson) - TTCN-3 Lexer (**NEW**) - Add TTCN-3 testing language lexer ([#1337](https://github.com/rouge-ruby/rouge/pull/1337/) by Garcia) ## version 3.12.0: 2019-10-16 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.11.1...v3.12.0) - General - Handle Guesser::Ambiguous in Markdown context ([#1349](https://github.com/rouge-ruby/rouge/pull/1349/) by John Fairhurst) - Ensure XML lexer handles unknown DOCTYPEs ([#1348](https://github.com/rouge-ruby/rouge/pull/1348/) by John Fairhurst) - Remove note about GitHub Pages' version of Rouge ([#1344](https://github.com/rouge-ruby/rouge/pull/1344/) by Andrew Petz) - Embedded Elixir Lexer - Add Phoenix Live View file glob to Embedded Elixir lexer ([#1347](https://github.com/rouge-ruby/rouge/pull/1347/) by Maksym Verbovyi) - Minizinc Lexer (**NEW**) - Add MiniZinc lexer ([#1329](https://github.com/rouge-ruby/rouge/pull/1329/) by Abe Voelker) ## version 3.11.1: 2019-10-02 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.11.0...v3.11.1) - Perl Lexer - Fix overeager quoting constructs in Perl lexer ([#1335](https://github.com/rouge-ruby/rouge/pull/1335/) by Brent Laabs) ## version 3.11.0: 2019-09-18 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.10.0...v3.11.0) - Apex Lexer (**NEW**) - Add Apex lexer ([#1103](https://github.com/rouge-ruby/rouge/pull/1103/) by Jefersson Nathan) - Coq Lexer - Tokenise commonly used logical symbols in Coq lexer - CSV Schema Lexer (**NEW**) - Add CSV Schema lexer ([#1039](https://github.com/rouge-ruby/rouge/pull/1039/) by Filipe Garcia) - JSON Lexer - Fix pattern for values incorporating backslashes in JSON lexer ([#1331](https://github.com/rouge-ruby/rouge/pull/1331/) by Michael Camilleri) - Kotlin Lexer - Improve support for Gradle plugin names in Kotlin lexer ([#1323](https://github.com/rouge-ruby/rouge/pull/1323/) by Andrew Lord) - Simplify regular expressions used in Kotlin lexer ([#1326](https://github.com/rouge-ruby/rouge/pull/1326/) by Andrew Lord) - Highlight constructors/functions in Kotlin lexer ([#1321](https://github.com/rouge-ruby/rouge/pull/1321/) by Andrew Lord) - Fix type highlighting (including nested generics) in Kotlin lexer ([#1322](https://github.com/rouge-ruby/rouge/pull/1322/) by Andrew Lord) - Liquid Lexer - Rewrite large portion of Liquid lexer ([#1327](https://github.com/rouge-ruby/rouge/pull/1327/) by Eric Knibbe) - Robot Framework Lexer (**NEW**) - Add Robot Framework lexer ([#611](https://github.com/rouge-ruby/rouge/pull/611/) by Iakov Gan) - Shell Lexer - Add MIME types and file globs to Shell lexer ([#716](https://github.com/rouge-ruby/rouge/pull/716/) by Jan Chren) - Swift Lexer - Improve attribute formatting in Swift lexer ([#806](https://github.com/rouge-ruby/rouge/pull/806/) by John Fairhurst) ## version 3.10.0: 2019-09-04 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.9.0...v3.10.0) - General - Remove link to online dingus ([#1317](https://github.com/rouge-ruby/rouge/pull/1317/) by Michael Camilleri) - Clean Lexer (**NEW**) - Add Clean lexer ([#1305](https://github.com/rouge-ruby/rouge/pull/1305/) by Camil Staps) - Common Lisp Lexer - Add 'lisp' alias to Common Lisp lexer ([#1315](https://github.com/rouge-ruby/rouge/pull/1315/) by Bonnie Eisenman) - HTTP Lexer - Permit an empty reason-phrase element in HTTP lexer ([#1313](https://github.com/rouge-ruby/rouge/pull/1313/) by Michael Camilleri) - JSL Lexer (**NEW**) - Add JSL lexer ([#871](https://github.com/rouge-ruby/rouge/pull/871/) by justinc11) - Lustre Lexer(**NEW**) - Correct minor errors in the Lustre lexer ([#1316](https://github.com/rouge-ruby/rouge/pull/1316/) by Michael Camilleri) - Add Lustre lexer ([#905](https://github.com/rouge-ruby/rouge/pull/905/) by Erwan Jahier) - Lutin Lexer(**NEW**) - Add Lutin lexer ([#1307](https://github.com/rouge-ruby/rouge/pull/1307/) by Erwan Jahier) - SPARQL Lexer (**NEW**) - Add SPARQL lexer ([#872](https://github.com/rouge-ruby/rouge/pull/872/) by Stefan Daschek) ## version 3.9.0: 2019-08-21 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.8.0...v3.9.0) - EEX Lexer (**NEW**) - Add EEX lexer ([#874](https://github.com/rouge-ruby/rouge/pull/874/) by julp) - Elixir Lexer - Fix escaping/interpolating in string and charlist literals in Elixir lexer ([#1308](https://github.com/rouge-ruby/rouge/pull/1308/) by Michael Camilleri) - Haxe Lexer (**NEW**) - Add Haxe lexer ([#815](https://github.com/rouge-ruby/rouge/pull/815/) by Josu Igoa) - HQL Lexer (**NEW**) - Add HQL lexer and add types to SQL lexer ([#880](https://github.com/rouge-ruby/rouge/pull/880/) by tkluck-booking) - HTTP Lexer - Add support for HTTP/2 to HTTP lexer ([#1296](https://github.com/rouge-ruby/rouge/pull/1296/) by Michael Camilleri) - JavaScript Lexer - Add new regex flags to JavaScript lexer ([#875](https://github.com/rouge-ruby/rouge/pull/875/) by Brad) - MATLAB Lexer - Change method of saving MatLab built-in keywords ([#1300](https://github.com/rouge-ruby/rouge/pull/1300/) by Michael Camilleri) - Q Lexer - Fix use of preceding whitespace in comments in Q lexer ([#858](https://github.com/rouge-ruby/rouge/pull/858/) by Mark) - SQL Lexer - Add HQL lexer and add types to SQL lexer ([#880](https://github.com/rouge-ruby/rouge/pull/880/) by tkluck-booking) - Terraform Lexer - Add support for first-class expressions to Terraform lexer ([#1303](https://github.com/rouge-ruby/rouge/pull/1303/) by Michael Camilleri) ## version 3.8.0: 2019-08-07 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.7.0...v3.8.0) - General - Update README ([#1271](https://github.com/rouge-ruby/rouge/pull/1271/) by Michael Camilleri) - Disable selection in HTML generated by HTMLLineTable formatter ([#1276](https://github.com/rouge-ruby/rouge/pull/1276/) by Ashwin Maroli) - Remove sudo: false configuration from Travis settings ([#1281](https://github.com/rouge-ruby/rouge/pull/1281/) by Olle Jonsson) - Improve escaping of TeX formatter ([#1277](https://github.com/rouge-ruby/rouge/pull/1277/) by Jeanine Adkisson) - Change Generic::Output in Magritte theme ([#1278](https://github.com/rouge-ruby/rouge/pull/1278/) by Jeanine Adkisson) - Add a Rake task to check warnings output by Ruby ([#1272](https://github.com/rouge-ruby/rouge/pull/1272/) by Michael Camilleri) - Move to self-hosted documentation ([#1270](https://github.com/rouge-ruby/rouge/pull/1270/) by Michael Camilleri) - ARM Assembly Lexer (**NEW**) - Fix preprocessor tokens in ARM Assembly lexer ([#1289](https://github.com/rouge-ruby/rouge/pull/1289/) by Michael Camilleri) - Add ARM assembly lexer ([#1057](https://github.com/rouge-ruby/rouge/pull/1057/) by bavison) - Batchfile Lexer (**NEW**) - Add Batchfile lexer ([#1286](https://github.com/rouge-ruby/rouge/pull/1286/) by Carlos Montiers A) - BBC Basic Lexer (**NEW**) - Add BBC Basic lexer ([#1280](https://github.com/rouge-ruby/rouge/pull/1280/) by bavison) - C++ Lexer - Add syntax to C++ lexer ([#565](https://github.com/rouge-ruby/rouge/pull/565/) by Loo Rong Jie) - Add disambiguation for C++ header files ([#1269](https://github.com/rouge-ruby/rouge/pull/1269/) by Michael Camilleri) - CMHG Lexer (**NEW**) - Add CMHG lexer ([#1282](https://github.com/rouge-ruby/rouge/pull/1282/) by bavison) - Console Lexer - Use Text::Whitespace token in Console lexer ([#894](https://github.com/rouge-ruby/rouge/pull/894/) by Alexander Weiss) - Cython Lexer (**NEW**) - Add Cython lexer ([#1287](https://github.com/rouge-ruby/rouge/pull/1287/) by Mark Waddoups) - EPP Lexer (**NEW**) - Add EPP lexer ([#903](https://github.com/rouge-ruby/rouge/pull/903/) by Alexander "Ananace" Olofsson) - JSON Lexer - Fix escape quoting in JSON lexer ([#1297](https://github.com/rouge-ruby/rouge/pull/1297/) by Michael Camilleri) - Julia Lexer - Fix duplicating capture groups in Julia lexer ([#1292](https://github.com/rouge-ruby/rouge/pull/1292/) by Michael Camilleri) - Make Lexer - Improve Make lexer ([#1285](https://github.com/rouge-ruby/rouge/pull/1285/) by bavison) - MessageTrans Lexer (**NEW**) - Add a MessageTrans lexer ([#1283](https://github.com/rouge-ruby/rouge/pull/1283/) by bavison) - Plist Lexer - Simplify Plist demo and visual sample ([#1275](https://github.com/rouge-ruby/rouge/pull/1275/) by Jeanine Adkisson) - Puppet Lexer - Fix unmatched characters in Puppet lexer ([#1288](https://github.com/rouge-ruby/rouge/pull/1288/) by Michael Camilleri) - R Lexer - Fix lexing of names in R lexer ([#896](https://github.com/rouge-ruby/rouge/pull/896/) by François Michonneau) - sed Lexer - Fix custom delimiter rule in sed lexer ([#893](https://github.com/rouge-ruby/rouge/pull/893/) by Valentin Vălciu) ## version 3.7.0: 2019-07-24 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.6.0...v3.7.0) - General - Rationalise Rake tasks ([#1267](https://github.com/rouge-ruby/rouge/pull/1267/) by Michael Camilleri) - Remove italics from preprocessor style rules ([#1264](https://github.com/rouge-ruby/rouge/pull/1264/) by Michael Camilleri) - Remove rubyforge_project property from gemspec ([#1263](https://github.com/rouge-ruby/rouge/pull/1263/) by Olle Jonsson) - Add missing magic comments ([#1258](https://github.com/rouge-ruby/rouge/pull/1258/) by Ashwin Maroli) - Replace tabs with spaces in some lexers ([#1257](https://github.com/rouge-ruby/rouge/pull/1257/) by Ashwin Maroli) - Profile memory usage of Rouge::Lexer.find_fancy ([#1256](https://github.com/rouge-ruby/rouge/pull/1256/) by Ashwin Maroli) - Add juxtaposing support to visual test app ([#1168](https://github.com/rouge-ruby/rouge/pull/1168/) by Ashwin Maroli) - Ada Lexer (**NEW**) - Add Ada lexer ([#1255](https://github.com/rouge-ruby/rouge/pull/1255/) by Jakob Stoklund Olesen) - CUDA Lexer (**NEW**) - Add CUDA lexer ([#963](https://github.com/rouge-ruby/rouge/pull/963/) by Yuma Hiramatsu) - GDScript Lexer (**NEW**) - Add GDScript lexer ([#1036](https://github.com/rouge-ruby/rouge/pull/1036/) by Leonid Boykov) - Gherkin Lexer - Fix placeholder lexing in Gherkin lexer ([#952](https://github.com/rouge-ruby/rouge/pull/952/) by Jamis Buck) - GraphQL Lexer - Add keywords and improve frontmatter lexing in GraphQL lexer ([#1261](https://github.com/rouge-ruby/rouge/pull/1261/) by Emile Bosch) - Handlebars Lexer - Fix Handlebars lexing with HTML attributes and whitespace ([#899](https://github.com/rouge-ruby/rouge/pull/899/) by Jasper Maes) - HOCON Lexer (**NEW**) - Add HOCON lexer ([#1253](https://github.com/rouge-ruby/rouge/pull/1253/) by David Wood) - HTML Lexer - Add support for Angular-style attributes to HTML lexer ([#907](https://github.com/rouge-ruby/rouge/pull/907/) by Runinho) - Simplify HTML visual sample ([#1265](https://github.com/rouge-ruby/rouge/pull/1265/) by Michael Camilleri) - JSON Lexer - Add key/value highlighting to JSON lexer ([#1029](https://github.com/rouge-ruby/rouge/pull/1029/) by María Inés Parnisari) - Mason Lexer (**NEW**) - Remove mistaken keywords in Mason lexer ([#1268](https://github.com/rouge-ruby/rouge/pull/1268/) by Michael Camilleri) - Add Mason lexer ([#838](https://github.com/rouge-ruby/rouge/pull/838/) by María Inés Parnisari) - OpenType Feature File Lexer (**NEW**) - Add OpenType Feature File lexer ([#864](https://github.com/rouge-ruby/rouge/pull/864/) by Thom Janssen) - PHP Lexer - Update keywords and fix comment bug in PHP lexer ([#973](https://github.com/rouge-ruby/rouge/pull/973/) by Fred Cox) - ReasonML Lexer (**NEW**) - Add ReasonML lexer ([#1248](https://github.com/rouge-ruby/rouge/pull/1248/) by Sergei Azarkin) - Rust Lexer - Fix lexing of attributes and doc comments in Rust lexer ([#957](https://github.com/rouge-ruby/rouge/pull/957/) by djrenren) - Add async & await keywords to Rust lexer ([#1259](https://github.com/rouge-ruby/rouge/pull/1259/) by Edward Andrews-Hodgson) - SAS Lexer (**NEW**) - Add SAS lexer ([#1107](https://github.com/rouge-ruby/rouge/pull/1107/) by tomsutch) ## version 3.6.0: 2019-07-10 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.5.1...v3.6.0) * General - Add HTMLLineTable formatter ([#1211](https://github.com/rouge-ruby/rouge/pull/1211/) by Ashwin Maroli) - Avoid unnecessary String duplication in HTML formatter ([#1244](https://github.com/rouge-ruby/rouge/pull/1244/) by Ashwin Maroli) - Remove trailing whitespace ([#1245](https://github.com/rouge-ruby/rouge/pull/1245/) by Ashwin Maroli) - Avoid allocating block parameters unnecessarily ([#1246](https://github.com/rouge-ruby/rouge/pull/1246/) by Ashwin Maroli) - Update profile_memory task ([#1243](https://github.com/rouge-ruby/rouge/pull/1243/) by Ashwin Maroli) - Clarify instructions for running a single test ([#1238](https://github.com/rouge-ruby/rouge/pull/1238/) by Ashwin Maroli) - Configure Bundler to validate task dependencies ([#1242](https://github.com/rouge-ruby/rouge/pull/1242/) by Ashwin Maroli) - Improve readability of lexer debug output ([#1240](https://github.com/rouge-ruby/rouge/pull/1240/) by Ashwin Maroli) - Add documentation on using Docker for development ([#1214](https://github.com/rouge-ruby/rouge/pull/1214/) by Nicolas Guillaumin) - Add ability to evaluate lexer similarity ([#1206](https://github.com/rouge-ruby/rouge/pull/1206/) by Jeanine Adkisson) - Fix empty color bug in TeX rendering ([#1224](https://github.com/rouge-ruby/rouge/pull/1224/) by Jeanine Adkisson) - Add a global 'require' option for rougify CLI tool ([#1215](https://github.com/rouge-ruby/rouge/pull/1215/) by Jeanine Adkisson) - Add background colour for monokai.sublime theme ([#1204](https://github.com/rouge-ruby/rouge/pull/1204/) by Ashwin Maroli) * Elixir Lexer - Improve tokenising of numbers in Elixir lexer ([#1225](https://github.com/rouge-ruby/rouge/pull/1225/) by Michael Camilleri) * JSON Lexer - Add Pipfile filename globs to JSON and TOML lexers ([#975](https://github.com/rouge-ruby/rouge/pull/975/) by Remco Haszing) * Liquid Lexer - Improve highlighting of for tags in Liquid lexer ([#1196](https://github.com/rouge-ruby/rouge/pull/1196/) by Ashwin Maroli) * Make Lexer - Simplify Make visual sample ([#1227](https://github.com/rouge-ruby/rouge/pull/1227/) by Michael Camilleri) * Magik Lexer - Add `_class` and `_while` keywords to Magik lexer ([#1251](https://github.com/rouge-ruby/rouge/pull/1251/) by Steven Looman) * OpenEdge ABL Lexer (**NEW**) - Add OpenEdge ABL lexer ([#1200](https://github.com/rouge-ruby/rouge/pull/1200/) by Michael Camilleri) * Perl Lexer - Add improvements (eg. transliteration) to Perl lexer ([#1250](https://github.com/rouge-ruby/rouge/pull/1250/) by Brent Laabs) * PowerShell Lexer - Fix file paths in PowerShell lexer ([#1232](https://github.com/rouge-ruby/rouge/pull/1232/) by Michael Camilleri) - Reimplement PowerShell lexer ([#1213](https://github.com/rouge-ruby/rouge/pull/1213/) by Aaron) * Ruby Lexer - Fix tokenizing of `defined?` in Ruby lexer ([#1247](https://github.com/rouge-ruby/rouge/pull/1247/) by Ashwin Maroli) - Add Fastlane filename globs to Ruby lexer ([#976](https://github.com/rouge-ruby/rouge/pull/976/) by Remco Haszing) * TOML Lexer - Add Pipfile filename globs to JSON and TOML lexers ([#975](https://github.com/rouge-ruby/rouge/pull/975/) by Remco Haszing) * XPath Lexer (**NEW**) - Add XPath and XQuery lexers ([#1089](https://github.com/rouge-ruby/rouge/pull/1089/) by Maxime Kjaer) * XQuery Lexer (**NEW**) - Add XPath and XQuery lexers ([#1089](https://github.com/rouge-ruby/rouge/pull/1089/) by Maxime Kjaer) * Xojo Lexer - Improve comment support in Xojo lexer ([#1229](https://github.com/rouge-ruby/rouge/pull/1229/) by Jim McKay) * YAML Lexer - Fix tokenization of block strings in YAML lexer ([#1235](https://github.com/rouge-ruby/rouge/pull/1235/) by Ashwin Maroli) - Fix block chomping syntax in YAML lexer ([#1234](https://github.com/rouge-ruby/rouge/pull/1234/) by Ashwin Maroli) - Fix tokenization of number literals in YAML lexer ([#1239](https://github.com/rouge-ruby/rouge/pull/1239/) by Ashwin Maroli) ## version 3.5.1: 2019-06-26 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.5.0...v3.5.1) * PowerShell Lexer - Fix invalid parenthesis state in PowerShell lexer ([#1222](https://github.com/rouge-ruby/rouge/pull/1222/) by Michael Camilleri) ## version 3.5.0: 2019-06-26 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.4.1...v3.5.0) * General - Correct typo in lexer development guide ([#1219](https://github.com/rouge-ruby/rouge/pull/1219/) by Michael Camilleri) - Add support for TeX rendering ([#1183](https://github.com/rouge-ruby/rouge/pull/1183/) by Jeanine Adkisson) - Fix deprecation of argument to Lexer.continue ([#1187](https://github.com/rouge-ruby/rouge/pull/1187/) by Jeanine Adkisson) - Add development environment documentation ([#1212](https://github.com/rouge-ruby/rouge/pull/1212/) by Michael Camilleri) - Correct lexer development guide ([#1145](https://github.com/rouge-ruby/rouge/pull/1145/) by Michael Camilleri) - Remove unnecessary variables and fix duplicate ranges ([#1197](https://github.com/rouge-ruby/rouge/pull/1197/) by Masataka Pocke Kuwabara) - Optimise creation of directory names ([#1207](https://github.com/rouge-ruby/rouge/pull/1207/) by Ashwin Maroli) - Add reference to semantic versioning to README ([#1205](https://github.com/rouge-ruby/rouge/pull/1205/) by Michael Camilleri) - Add pr-open to Probot's exempt labels ([#1203](https://github.com/rouge-ruby/rouge/pull/1203/) by Michael Camilleri) - Adjust wording of stale issue message ([#1202](https://github.com/rouge-ruby/rouge/pull/1202/) by Michael Camilleri) - Configure Probot to close stale issues ([#1199](https://github.com/rouge-ruby/rouge/pull/1199/) by Michael Camilleri) - Add theme switcher to visual test app ([#1198](https://github.com/rouge-ruby/rouge/pull/1198/) by Ashwin Maroli) - Add the magritte theme ([#1182](https://github.com/rouge-ruby/rouge/pull/1182/) by Jeanine Adkisson) - Reduce duplicated range warnings ([#1189](https://github.com/rouge-ruby/rouge/pull/1189/) by Ashwin Maroli) - Improve display of visual samples ([#1181](https://github.com/rouge-ruby/rouge/pull/1181/) by Ashwin Maroli) - Remove duplicate issue templates ([#1193](https://github.com/rouge-ruby/rouge/pull/1193/) by Michael Camilleri) - Add issue templates ([#1190](https://github.com/rouge-ruby/rouge/pull/1190/) by Michael Camilleri) - Enable Rubocop ambiguity warnings ([#1180](https://github.com/rouge-ruby/rouge/pull/1180/) by Michael Camilleri) - Allow Rake tasks to be run with warnings ([#1177](https://github.com/rouge-ruby/rouge/pull/1177/) by Ashwin Maroli) - Reset instance variable only if it is defined ([#1184](https://github.com/rouge-ruby/rouge/pull/1184/) by Ashwin Maroli) - Fix `escape_enabled?` predicate method ([#1174](https://github.com/rouge-ruby/rouge/pull/1174/) by Dan Allen) - Fix removal of `@debug_enabled` ([#1173](https://github.com/rouge-ruby/rouge/pull/1173/) by Dan Allen) - Fix wording and indentation in changelog Rake task ([#1171](https://github.com/rouge-ruby/rouge/pull/1171/) by Michael Camilleri) * BPF Lexer (**NEW**) - Add BPF lexer ([#1191](https://github.com/rouge-ruby/rouge/pull/1191/) by Paul Chaignon) * Brainfuck Lexer (**NEW**) - Add Brainfuck lexer ([#1037](https://github.com/rouge-ruby/rouge/pull/1037/) by Andrea Esposito) * Haskell Lexer - Support promoted data constructors in Haskell lexer ([#1027](https://github.com/rouge-ruby/rouge/pull/1027/) by Ben Gamari) - Add `*.hs-boot` glob to Haskell lexer ([#1060](https://github.com/rouge-ruby/rouge/pull/1060/) by Ben Gamari) * JSON Lexer - Add extra mimetypes to JSON lexer ([#1030](https://github.com/rouge-ruby/rouge/pull/1030/) by duncangodwin) * Jsonnet Lexer - Add `*.libsonnet` glob to Jsonnet lexer ([#972](https://github.com/rouge-ruby/rouge/pull/972/) by Tomas Virgl) * Liquid Lexer - Fix debug errors in Liquid lexer ([#1192](https://github.com/rouge-ruby/rouge/pull/1192/) by Michael Camilleri) * LLVM Lexer - Fix various issues in LLVM lexer ([#986](https://github.com/rouge-ruby/rouge/pull/986/) by Robin Dupret) * Magik Lexer (**NEW**) - Add (Smallworld) Magik lexer ([#1044](https://github.com/rouge-ruby/rouge/pull/1044/) by Steven Looman) * Prolog Lexer - Fix comment character in Prolog lexer ([#830](https://github.com/rouge-ruby/rouge/pull/830/) by Darius Foo) * Python Lexer - Fix shebang regex in Python lexer ([#1172](https://github.com/rouge-ruby/rouge/pull/1172/) by Michael Camilleri) * Rust Lexer - Add support for integer literal separators in Rust lexer ([#984](https://github.com/rouge-ruby/rouge/pull/984/) by Linda_pp) * Shell Lexer - Fix interpolation and escaped backslash bugs in Shell lexer ([#1216](https://github.com/rouge-ruby/rouge/pull/1216/) by Jeanine Adkisson) * Swift Lexer - Fix Swift lexer to support Swift 4.2 ([#1035](https://github.com/rouge-ruby/rouge/pull/1035/) by Mattt) ## version 3.4.1: 2019-06-13 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.4.0...v3.4.1) * General - Restore support for opts to Lexer.lex ([#1178](https://github.com/rouge-ruby/rouge/pull/1178/) by Michael Camilleri) - Use predefined string in `bool_option` ([#1159](https://github.com/rouge-ruby/rouge/pull/1159/) by Ashwin Maroli) - Expand list of files ignored by Git ([#1157](https://github.com/rouge-ruby/rouge/pull/1157/) by Michael Camilleri) ## version 3.4.0: 2019-06-12 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.3.0...v3.4.0). * General - Add Rake task for generating changelog entries ([#1167](https://github.com/rouge-ruby/rouge/pull/1167/) by Michael Camilleri) - Tidy up changelog ([#1169](https://github.com/rouge-ruby/rouge/pull/1169/) by Michael Camilleri) - Improve functionality of HTMLLinewise formatter ([#1156](https://github.com/rouge-ruby/rouge/pull/1156/) by Dan Allen) - Avoid creating array on every `Lexer.all` call ([#1140](https://github.com/rouge-ruby/rouge/pull/1140/) by Ashwin Maroli) - Add clearer tests for `Lexer.detectable?` ([#1153](https://github.com/rouge-ruby/rouge/pull/1153/) by Ashwin Maroli) - Replace the `:continue` option with a `#continue_lex` method ([#1151](https://github.com/rouge-ruby/rouge/pull/1151/) by Jeanine Adkisson) - Introduce `:detectable?` singleton method for lexers ([#1149](https://github.com/rouge-ruby/rouge/pull/1149/) by Ashwin Maroli) - Update HTMLTable formatter to delegate to inner formatter ([#1083](https://github.com/rouge-ruby/rouge/pull/1083/) by Dan Allen) - Add basic memory usage profile ([#1137](https://github.com/rouge-ruby/rouge/pull/1137/) by Ashwin Maroli) - Avoid array creation when checking if source is UTF-8 ([#1141](https://github.com/rouge-ruby/rouge/pull/1141/) by Ashwin Maroli) - Add lexer development documentation ([#1111](https://github.com/rouge-ruby/rouge/pull/1111/) by Michael Camilleri) - Coerce state names into symbols rather than strings ([#1138](https://github.com/rouge-ruby/rouge/pull/1138/) by Ashwin Maroli) - Configure YARD to document protected code ([#1133](https://github.com/rouge-ruby/rouge/pull/1133/) by Michael Camilleri) - Add missing tokens from Pygments 2.2.0 ([#1034](https://github.com/rouge-ruby/rouge/pull/1034/) by Leonid Boykov) - Fix undefined instance variable warning in lexer ([#1087](https://github.com/rouge-ruby/rouge/pull/1087/) by Dan Allen) - Port black and white style from Pygments ([#1086](https://github.com/rouge-ruby/rouge/pull/1086/) by Dan Allen) - Reduce allocations from just loading the gem ([#1104](https://github.com/rouge-ruby/rouge/pull/1104/) by Ashwin Maroli) - Update Travis to check Ruby 2.6 ([#1128](https://github.com/rouge-ruby/rouge/pull/1128/) by Michael Camilleri) - Update GitHub URL in README ([#1127](https://github.com/rouge-ruby/rouge/pull/1127/) by Dan Allen) - Remove bundler from the Gemfile ([#1110](https://github.com/rouge-ruby/rouge/pull/1110/) by Dan Allen) * C / C++ Lexers - Fix various issues with highlighting in C and C++ lexers ([#1069](https://github.com/rouge-ruby/rouge/pull/1069/) by Vidar Hokstad) * C# Lexer - Fix rendering of C# attributes ([#1117](https://github.com/rouge-ruby/rouge/pull/1117/) by Michael Camilleri) * CoffeeScript Lexer - Add operators, keywords and reserved words to CoffeeScript lexer ([#1061](https://github.com/rouge-ruby/rouge/pull/1061/) by Erik Demaine) - Fix comments in CoffeeScript lexer ([#1123](https://github.com/rouge-ruby/rouge/pull/1123/) by Michael Camilleri) * Common Lisp Lexer - Fix unbalanced parenthesis crash in Common Lisp lexer ([#1129](https://github.com/rouge-ruby/rouge/pull/1129/) by Michael Camilleri) * Coq Lexer - Fix string parsing in Coq lexer ([#1116](https://github.com/rouge-ruby/rouge/pull/1116/) by Michael Camilleri) * Diff Lexer - Add support for non-unified diffs to Diff lexer ([#1068](https://github.com/rouge-ruby/rouge/pull/1068/) by Vidar Hokstad) * Docker Lexer - Add filename extensions to Docker lexer ([#1059](https://github.com/rouge-ruby/rouge/pull/1059/) by webmaster777) * Escape Lexer (**NEW**) - Add escaping within lexed content ([#1152](https://github.com/rouge-ruby/rouge/pull/1152/) by Jeanine Adkisson) * Go Lexer - Fix whitespace tokenisation in Go lexer ([#1122](https://github.com/rouge-ruby/rouge/pull/1122/) by Michael Camilleri) * GraphQL Lexer - Add support for Markdown descriptions ([#1012](https://github.com/rouge-ruby/rouge/pull/1012) by Drew Blessing) - Add support for multiline strings ([#1012](https://github.com/rouge-ruby/rouge/pull/1012) by Drew Blessing) * Java Lexer - Improve specificity of tokens in Java lexer ([#1124](https://github.com/rouge-ruby/rouge/pull/1124/) by Michael Camilleri) * JavaScript Lexer - Fix escaping backslashes in Javascript lexer ([#1165](https://github.com/rouge-ruby/rouge/pull/1165/) by Ashwin Maroli) - Update keywords in JavaScript lexer ([#1126](https://github.com/rouge-ruby/rouge/pull/1126/) by Masa-Shin) * Jinja / Twig Lexers - Add support for raw/verbatim blocks in Jinja/Twig lexers ([#1003](https://github.com/rouge-ruby/rouge/pull/1003/) by Robin Dupret) - Add `=` to Jinja operators ([#1011](https://github.com/rouge-ruby/rouge/pull/1011/) by Drew Blessing) * Julia Lexer - Recognize more Julia types and constants ([#1024](https://github.com/rouge-ruby/rouge/pull/1024/) by Alex Arslan) * Kotlin Lexer - Add suspend keyword to Kotlin lexer ([#1055](https://github.com/rouge-ruby/rouge/pull/1055/) by Ing. Jan Kaláb) - Fix nested block comments in Kotlin lexer ([#1121](https://github.com/rouge-ruby/rouge/pull/1121/) by Michael Camilleri) * Markdown Lexer - Fix code blocks in Markdown lexer ([#1053](https://github.com/rouge-ruby/rouge/pull/1053/) by Vidar Hokstad) * Matlab Lexer - Add Matlab2017a strings to Matlab lexer ([#1048](https://github.com/rouge-ruby/rouge/pull/1048/) by Benjamin Buch) * Objective-C Lexer - Fix untyped methods ([#1118](https://github.com/rouge-ruby/rouge/pull/1118/) by Michael Camilleri) * Perl Lexer - Rationalise visual sample for Perl ([#1162](https://github.com/rouge-ruby/rouge/pull/1162/) by Michael Camilleri) - Fix backtracking issues, add string interpolation in Perl lexer ([#1161](https://github.com/rouge-ruby/rouge/pull/1161/) by Michael Camilleri) - Fix arbitrary delimiter regular expressions in Perl lexer ([#1160](https://github.com/rouge-ruby/rouge/pull/1160/) by Michael Camilleri) * Plist Lexer - Restore support for highlighting XML-encoded plists ([#1026](https://github.com/rouge-ruby/rouge/pull/1026/) by Dan Mendoza) * PowerShell Lexer - Add 'microsoftshell' and 'msshell' as aliases for PowerShell lexer ([#1077](https://github.com/rouge-ruby/rouge/pull/1077/) by Robin Schneider) * Rust Lexer - Fix escape sequences in Rust lexer ([#1120](https://github.com/rouge-ruby/rouge/pull/1120/) by Michael Camilleri) * Scala Lexer - Output more differentiated tokens in Scala lexer ([#1040](https://github.com/rouge-ruby/rouge/pull/1040/) by Alan Thomas) * Shell Lexer - Add APKBUILD filename glob to Shell lexer ([#1099](https://github.com/rouge-ruby/rouge/pull/1099/) by Oliver Smith) * Slim Lexer - Fix multiline Ruby code in Slim lexer ([#1130](https://github.com/rouge-ruby/rouge/pull/1130/) by René Klačan) * SuperCollider Lexer (**NEW**) - Add SuperCollider lexer ([#749](https://github.com/rouge-ruby/rouge/pull/749/) by Brian Heim) * XML Lexer - Fix `` tag breaking detection of XML files ([#1031](https://github.com/rouge-ruby/rouge/pull/1031/) by María Inés Parnisari) * Xojo Lexer (**NEW**) - Add Xojo lexer ([#1131](https://github.com/rouge-ruby/rouge/pull/1131/) by Jim McKay) ## version 3.3.0: 2018-10-01 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.2.1...v3.3.0) > **Release Highlight**: Due to #883 with the introduction of frozen string literals, Rouge memory usage and total objects dropped quite dramatically. See [#883](https://github.com/rouge-ruby/rouge/pull/883) for more details. Thanks @ashmaroli for this PR. * General * Add frozen_string_literal ([#883](https://github.com/rouge-ruby/rouge/pull/883) ashmaroli) * Mathematica Lexer (NEW) * Support for Mathematic/Wolfram ([#854](https://github.com/rouge-ruby/rouge/pull/854) by halirutan) * Motorola 68k Lexer (NEW) * Add m68k assembly lexer ([#909](https://github.com/rouge-ruby/rouge/pull/909) by nguillaumin) * SQF Lexer (NEW) * Add SQF Lexer ([#761](https://github.com/rouge-ruby/rouge/pull/761) by BaerMitUmlaut) * Minor changes to SQF ([#970](https://github.com/rouge-ruby/rouge/pull/970) by dblessing) * JSP Lexer (NEW) * Add Java Server Pages lexer ([#915](https://github.com/rouge-ruby/rouge/pull/915) by miparnisari) * Elixir Lexer * Add `defstruct` and `defguardp` ([#960](https://github.com/rouge-ruby/rouge/pull/960) by bjfish) * F# / FSharp Lexer * Add `.fsi` extension ([#1002](https://github.com/rouge-ruby/rouge/pull/1002) by adam-becker) * Kotlin Lexer * Recognise annotations and map to decorator ([#995](https://github.com/rouge-ruby/rouge/pull/995) by lordcodes) * Function names ([#996](https://github.com/rouge-ruby/rouge/pull/996) by lordcodes) * Recognizing function parameters and return type ([#999](https://github.com/rouge-ruby/rouge/pull/999) by lordcodes) * Recognize destructuring assignment ([#1001](https://github.com/rouge-ruby/rouge/pull/1001) by lordcodes) * Objective-C Lexer * Add `objectivec` as tag/alias ([#951](https://github.com/rouge-ruby/rouge/pull/951) by revolter) * Prolog Lexer * Add % as single-line comment ([#898](https://github.com/rouge-ruby/rouge/pull/898) by jamesnvc) * Puppet Lexer * Add = as Operator in Puppet lexer ([#980](https://github.com/rouge-ruby/rouge/pull/980) by alexharv074) * Python Lexer * Improve #-style comments ([#959](https://github.com/rouge-ruby/rouge/pull/959) by 1orenz0) * Improvements for builtins, literals and operators ([#940](https://github.com/rouge-ruby/rouge/pull/940) by aldanor) * Ruby Lexer * Add `Dangerfile` as Ruby filename ([#1004](https://github.com/rouge-ruby/rouge/pull/1004) by leipert) * Rust Lexer * Add additional aliases for Rust ([#988](https://github.com/rouge-ruby/rouge/pull/988) by LegNeato) * Swift Lexer * Add `convenience` method ([#950](https://github.com/rouge-ruby/rouge/pull/950) by damian-rzeszot) ## version 3.2.1: 2018-08-16 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.2.0...v3.2.1) * Perl Lexer * Allow any non-whitespace character to delimit regexes ([#974](https://github.com/rouge-ruby/rouge/pull/974) by dblessing) * Details: In specific cases where a previously unsupported regex delimiter was used, a later rule could cause a backtrack in the regex system. This resulted in Rouge hanging for an unspecified amount of time. ## version 3.2.0: 2018-08-02 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.1.1...v3.2.0) * General * Load pastie theme ([#809](https://github.com/rouge-ruby/rouge/pull/809) by rramsden) * Fix build failures ([#892](https://github.com/rouge-ruby/rouge/pull/892) by olleolleolle) * Update CLI style help text ([#923](https://github.com/rouge-ruby/rouge/pull/923) by nixpulvis) * Fix HTMLLinewise formatter documentation in README.md ([#910](https://github.com/rouge-ruby/rouge/pull/910) by rohitpaulk) * Terraform Lexer (NEW - [#917](https://github.com/rouge-ruby/rouge/pull/917) by lowjoel) * Crystal Lexer (NEW - [#441](https://github.com/rouge-ruby/rouge/pull/441) by splattael) * Scheme Lexer * Allow square brackets ([#849](https://github.com/rouge-ruby/rouge/pull/849) by EFanZh) * Haskell Lexer * Support for Quasiquotations ([#868](https://github.com/rouge-ruby/rouge/pull/868) by enolan) * Java Lexer * Support for Java 10 `var` keyword ([#888](https://github.com/rouge-ruby/rouge/pull/888) by lc-soft) * VHDL Lexer * Fix `time_vector` keyword typo ([#911](https://github.com/rouge-ruby/rouge/pull/911) by ttobsen) * Perl Lexer * Recognize `.t` as valid file extension ([#918](https://github.com/rouge-ruby/rouge/pull/918) by miparnisari) * Nix Lexer * Improved escaping sequences for indented strings ([#926](https://github.com/rouge-ruby/rouge/pull/926) by veprbl) * Fortran Lexer * Recognize `.f` as valid file extension ([#931](https://github.com/rouge-ruby/rouge/pull/931) by veprbl) * Igor Pro Lexer * Update functions and operations for Igor Pro 8 ([#921](https://github.com/rouge-ruby/rouge/pull/921) by t-b) * Julia Lexer * Various improvements and fixes ([#912](https://github.com/rouge-ruby/rouge/pull/912) by ararslan) * Kotlin Lexer * Recognize `.kts` as valid file extension ([#908](https://github.com/rouge-ruby/rouge/pull/908) by mkobit) * CSS Lexer * Minor fixes ([#916](https://github.com/rouge-ruby/rouge/pull/916) by miparnisari) * HTML Lexer * Minor fixes ([#916](https://github.com/rouge-ruby/rouge/pull/916) by miparnisari) * Javascript Lexer * Minor fixes ([#916](https://github.com/rouge-ruby/rouge/pull/916) by miparnisari) * Markdown Lexer * Images may not have alt text ([#904](https://github.com/rouge-ruby/rouge/pull/904) by Himura2la) * ERB Lexer * Fix greedy comment matching ([#902](https://github.com/rouge-ruby/rouge/pull/902) by ananace) ## version 3.1.1: 2018-01-31 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.1.0...v3.1.1) * Perl * [Fix \#851: error on modulo operato in Perl by miparnisari · Pull Request \#853 · rouge-ruby/rouge](https://github.com/rouge-ruby/rouge/pull/853) * JavaScript * [Detect \*\.mjs files as being JavaScript by Kovensky · Pull Request \#866 · rouge-ruby/rouge](https://github.com/rouge-ruby/rouge/pull/866) * Swift [\[Swift\] Undo parsing function calls with trailing closure by dan\-zheng · Pull Request \#862 · rouge-ruby/rouge](https://github.com/rouge-ruby/rouge/pull/862) * Vue * [Fix load SCSS in Vue by purecaptain · Pull Request \#842 · rouge-ruby/rouge](https://github.com/rouge-ruby/rouge/pull/842) ## version 3.1.0: 2017-12-21 Thanks a lot for contributions; not only for the code, but also for the issues and review comments, which are vitally helpful. [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v3.0.0...v3.1.0) * gemspec * Add source code and changelog links to gemspec [#785](https://github.com/rouge-ruby/rouge/pull/785) by @timrogers * General * Fix #796: comments not followed by a newline are not highlighted [#797](https://github.com/rouge-ruby/rouge/pull/797) by @tyxchen * Elem * Add Elm language support [#744](https://github.com/rouge-ruby/rouge/pull/744) by @dmitryrogozhny * Ruby * Add the .erb file extension to ruby highlighting [#713](https://github.com/rouge-ruby/rouge/pull/713) by @jstumbaugh * Hack * Add basic Hack support [#712](https://github.com/rouge-ruby/rouge/pull/712) by @fredemmott * F# * Allow double backtick F# identifiers [#793](https://github.com/rouge-ruby/rouge/pull/793) by @nickbabcock * Swift * Swift support for backticks and keypath syntax [#794](https://github.com/rouge-ruby/rouge/pull/794) by @johnfairh * [Swift] Tuple destructuring, function call with lambda argument [#837](https://github.com/rouge-ruby/rouge/pull/837) by @dan-zheng * Python * Add async and await keywords to Python lexer [#799](https://github.com/rouge-ruby/rouge/pull/799) by @BigChief45 * Shell * Add missing shell commands and missing GNU coreutils executables [#798](https://github.com/rouge-ruby/rouge/pull/798) by @kernhanda * PowerShell * Add JEA file extensions to powershell [#807](https://github.com/rouge-ruby/rouge/pull/807) by @michaeltlombardi * SASS / SCSS * Don't treat `[` as a part of an attribute name in SCSS [#839](https://github.com/rouge-ruby/rouge/pull/839) by @hibariya * Haskell * Don't treat `error` specially in Haskell [#834](https://github.com/rouge-ruby/rouge/pull/834) by @enolan * Rust * Rust: highlight the "where" keyword [#823](https://github.com/rouge-ruby/rouge/pull/823) by @lvillani ## version 3.0.0: 2017-09-21 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v2.2.1...v3.0.0) There is no breaking change in the public API, but internals' is changed. * general: * dropped support for Ruby 1.9, requireing Ruby v2.0.0 (#775 by gfx) * [Internal API changes] refactored disaambiguators to removes the use of analyze_text's numeric score interface (#763 by jneen) * See https://github.com/rouge-ruby/rouge/pull/763 for details * added `rouge guess $file` sub-command to test guessers (#773 by gfx) * added `Rouge::Lexer.guess { fallback }` interface (#777 by gfx) * removes BOM and normalizes newlines in input sources before lexing (#776 by gfx) * kotlin: * fix errors in generic functions (#782 by gfx; thanks to @rongi for reporting it) * haskell: * fix escapes in char literals (#780 by gfx; thanks to @Tosainu for reporting it) ## version 2.2.1: 2017-08-22 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v2.2.0...v2.2.1) * powershell: * Adding PowerShell builtin commands for version 5 (#757 thanks JacodeWeerd) * general: * Rouge::Guessers::Modeline#filter: reduce object allocations (#756 thanks @parkr) ## version 2.2.0: 2017-08-09 [Comparison with the previous version](https://github.com/rouge-ruby/rouge/compare/v2.1.1...v2.2.0) * rougify: * trap PIPE only when platform supports it (#700 thanks @maverickwoo) * support null formatter (`-f tokens`) (#719 thanks @abalkin) * kotlin: * update for companion object rename (#702 thanks @stkent) * igorpro: * fix igorpro lexer errrors (#706 thanks @ukos-git) * nix: * support nix expression language (#732 thanks @vidbina) * q: * fix rules for numeric literals (#717 thanks @abalkin) * fortran: * add missing Fortran keywords and intrinsics (#739 thanks @pbregener) * javascript: * Fix lexer on `<` in `` (#727 thanks @cpallares) * general: * speed up `shebang?` check (#738 thanks @schneems) * don't default to a hash in Lexer.format (#729) * use the token's qualname in null formatter (#730) * formatter: * fix "unknown formatter: terminal256" (#735 thanks @cuihq) * gemspec: * fix licenses to rubygems standard (#714 thanks @nomoon) ## version 2.1.1: 2017-06-21 * rougify: display help when called with no arguments * console: bugfix for line continuations dropping characters * make: properly handle code that doesn't end in a newline * fix some warnings with -w, add a rubocop configuration ## version 2.1.0: 2017-06-06 * javascript: - fix for newlines in template expressions (#570 thanks @Kovensky!) - update keywords to ES2017 (#594 thanks @Kovensky!) - add ES6 binary and octal literals (#619 thanks @beaufortfrancois!) * ruby: - require an `=` on the `=end` block comment terminator - bugfix for numeric ranges (#579 thanks @kjcpaas!) - bugfix for constants following class/module declarations * shell: support based numbers in math mode * html-inline formatter: - now accepts a search string, an instance, or aliases for the theme argument * ocaml: - highlight variant tags - fixes for operators vs punctuation - fix polymorphic variants, support local open expressions, fix keywords (#643 thanks @emillon!) * thankful-eyes theme: - bold operators, to distinguish between punctuation * rust: - add support for range operators and type variables (#591 thanks @whitequark!) - support rustdoc hidden lines that start with # (#652 thanks @seanmonstar!) * html: allow template languages to interpolate within script or style tags * clojure: - finally add support for `@` - associate `*.edn` * new lexer: lasso (#584 thanks @EricFromCanada!) * ruby 1.9 support: Fix unescaped `@` in regex (#588 thanks @jiphex!) * fix comments at end of files in F# and R (#590 thanks @nickbabcock!) * elixir: implement ruby-style sigil strings and regexes (#530 thanks @k3rni!) * docker: add missing keywords * add ruby 2.4 support * coffeescript: bugfix for improper multiline comments (#604 thanks @dblessing!) * json: make exponent signs optional (#597 thanks @HerrFolgreich!) * terminal256 formatter: put reset characters at the end of each line (#603 thanks @deivid-rodriguez!) * csharp: - actually highlight interface names - highlight splice literals `$""` and `@$""` (#600 thanks @jmarianer!) - recognize `nameof` as a keyword (#626 thanks @drovani!) * new lexer: mosel (#606 thanks @germanriano!) * php: - more robust ident regex that supports unicode idents - add heuristics to determine whether to start inline * new lexer: q (kdb+) (#655 thanks @abalkin!) * new lexer: pony (#651 thanks @katafrakt!) * new lexer: igor-pro (#648 thanks @ukos-git!) * new lexer: wollok (#647 thanks @mumuki!) * new lexer: graphql (#634 thanks @hibariya!) * properties: allow hyphens in key names (#629 thanks @cezariuszmarek!) * HTMLPygments formatter: (breaking) wrap tokens with div.highlight * new lexer: console (replaces old `shell_session` lexer) - properly detects prompts and continuations - fully configurable prompt string with `?prompt=...` - optional root-level comments with `?comments` * new lexer: irb * xml: allow newlines in attribute values (#663 thanks @mojavelinux!) * windows fix: use `YAML.load_file` to load apache keywords * new lexer: dot (graphviz) (#627 thanks @kAworu) * overhaul options handling, and treat options as untrusted user content * add global opt-in to debug mode (`Rouge::Lexer.enable_debug!`) to prevent debug mode from being activated by users * shell: more strict builtins (don't highlight `cd-hello`) (#684 thanks @alex-felix!) * new lexer: sieve (#682 thanks @kAworu!) * new lexer: TSX (#669 thanks @timothykang!) * fortran: update to 2008 (#667 thanks @pbregener!) * powershell: use backtick as escape instead of backslash (#660 thanks @gmckeown!) * new lexer: awk (#607 thanks @kAworu) * new lexer: hylang (#623 thanks @profitware!) * new lexer: plist (#622 thanks @segiddins!) * groovy: support shebangs (#608 thanks @hwdegroot!) * new lexer: pastie (#576 thanks @mojavelinux) * sed: bugfix for dropped characters from regexes * sml: - bugfix for dropped keywords - bugfix for mishighlighted keywords * gherkin, php, lua, vim, matlab: update keyword files * new lexer: digdag (#674 thanks @gfx!) * json-doc: highlight bare keys * HTMLTable: don't output a newline after the closing tag (#659 thanks @gpakosz!) ## version 2.0.7: 2016-11-18 * haml: fix balanced braces in attribute curlies * clojure: - allow comments at EOF - detect for `build.boot` (thanks @pandeiro) * ruby 1.9.1 compat: escape @ signs (thanks @pille1842) * c++ - add `*.tpp` as an extension (thanks @vser1) - add more C++11 keywords * new lexer: ABAP (thanks @mlaggner) * rougify: properly handle SIGPIPE for downstream pipe closing (thanks @maverickwoo) * tex: add `*.sty` and `*.cls` extensions * html: bugfix for multiple style tags - was too greedy * new lexer: vue * perl: fix lexing of POD comments (thanks @kgoess) * coq: better string escape handling * javascript: - add support for ES decorators - fix multiline template strings with curlies (thanks @Kovensky) * json: stop guessing based on curlies * rust: support the `?` operator ## version 2.0.6: 2016-09-07 * actionscript: emit correct tokens for positive numbers (thanks @JoeRobich!) * json: bottom-up rewrite, massively improve string performance * markdown: don't terminate code blocks unless there's a newline before the terminator * tulip: rewrite lexer with updated features * swift: update for swift 3 (thanks @radex!) * fortran: correctly lex exponent floats (thanks @jschwab!) * bugfix: escape `\@` for ruby 1.9.x * verilog: recognize underscores and question marks (thanks @whitequark!) * common lisp: recognize .asd files for ASDF * new lexer: mxml (thanks @JoeRobich!) * new lexer: 1c (thanks @karnilaev!) * new lexer: turtle/trig (thanks @jakubklimek!) * new lexer: vhdl (thanks @ttobsen!) * new lexer: jsx * new lexer: prometheus (thanks @dblessing!) ## version 2.0.5: 2016-07-19 * bugfix: don't spam stdout from the yaml lexer ## version 2.0.4: 2016-07-19 (yanked) * new lexer: docker (thanks @KitaitiMakoto!) * new lexer: fsharp (thanks @raymens!) * python: improve string escapes (thanks @di!) * yaml: highlight keys differently than values ## version 2.0.3: 2016-07-14 * guessing: ambiguous guesses now raise `Rouge::Guesser::Ambiguous` instead of a mysterious class inside a metaclass. * praat: various fixes for unconventional names (thanks @jjatria!) * workaround for rdoc parsing bug that should fix `gem install` with rdoc parsing on. * ruby: - best effort colon handling - fix for heredocs with method calls at the end * tulip: rewrite from the ground up * markdown: fix improper greediness of backticks * tooling: improve the debug output, and properly highlight the legend ## version 2.0.2: 2016-06-27 * liquid: support variables ending in question marks (thanks @brettg!) * new lexer: IDL (thanks @sappjw!) * javascript: - fix bug causing `:` error tokens (#497) - support for ES6 string interpolation with backticks (thanks @iRath96!) * csharp: allow comments at EOF * java: allow underscored numeric literals (thanks @vandiedakaf!) * terminal formatter: theme changes had broken this formatter, this is fixed. * shell: support "ansi strings" - `$'some-string\n'` ## version 2.0.1: 2016-06-15 * Bugfix for `Formatter#token_lines` without a block ## version 2.0.0: 2016-06-14 * new formatters! see README.md for documentation, use `Rouge::Formatters::HTMLLegacy` for the old behavior. ## version 1.11.1: 2016-06-14 * new guesser infrastructure, support for emacs and vim modelines (#489) * javascript bugfix for nested objects with quoted keys (#496) * new theme: Gruvbox (thanks @jamietanna!) * praat: lots of improvements (thanks @jjatria) * fix for rougify error when highlighting from stdin (#493) * new lexer: kotlin (thanks @meleyal!) * new lexer: cfscript (thanks @mjclemente!) ## version 1.11.0: 2016-06-06 * groovy: - remove pathological regexes and add basic support for triple-quoted strings (#485) - add the "trait" keyword and fix project url (thanks @glaforge! #378) * new lexer: coq (thanks @gmalecha! #389) * gemspec license now more accurate (thanks @connorshea! #484) * swift: - properly support nested comments (thanks @dblessing! #479) - support swift 2.2 features (thanks @radex #376 and @wokalski #442) - add indirect declaration (thanks @nRewik! #326) * new lexer: verilog (thanks @Razer6! #317) * new lexer: typescript (thanks @Seikho! #400) * new lexers: jinja and twig (thanks @robin850! #402) * new lexer: pascal (thanks @alexcu!) * css: support attribute selectors (thanks @skoji! #426) * new lexer: shell session (thanks @sio4! #481) * ruby: add support for <<~ heredocs (thanks @tinci! #362) * recognize comments at EOF in SQL, Apache, and CMake (thanks @julp! #360) * new lexer: phtml (thanks @Igloczek #366) * recognize comments at EOF in CoffeeScript (thanks @rdavila! #370) * c/c++: - support c11/c++11 features (thanks @Tosainu! #371) - Allow underscores in identifiers (thanks @coverify! #333) * rust: add more builtin types (thanks @RalfJung! #372) * ini: allow hyphen keys (thanks @KrzysiekJ! #380) * r: massively improve lexing quality (thanks @klmr! #383) * c#: - add missing keywords (thanks @BenVlodgi #384 and @SLaks #447) * diff: do not require newlines at the ends (thanks @AaronLasseigne! #387) * new lexer: ceylon (thanks @bjansen! #414) * new lexer: biml (thanks @japj! #415) * new lexer: TAP - the test anything protocol (thanks @mblayman! #409) * rougify bugfix: treat input as utf8 (thanks @japj! #417) * new lexer: jsonnet (thanks @davidzchen! #420) * clojure: associate `*.cljc` for cross-platform clojure (thanks @alesguzik! #423) * new lexer: D (thanks @nikibobi! #435) * new lexer: smarty (thanks @tringenbach! #427) * apache: - add directives for v2.4 (thanks @stanhu!) - various improvements (thanks @julp! #301) - faster keyword lookups - fix nil error on unknown directive (cf #246, #300) - properly manage case-insensitive names (cf #246) - properly handle windows CRLF * objective-c: - support literal dictionaries and block arguments (thanks @BenV! #443 and #444) - Fix error tokens when defining interfaces (thanks @meleyal! #477) * new lexer: NASM (thanks @sraboy! #457) * new lexer: gradle (thanks @nerro! #468) * new lexer: API Blueprint (thanks @kylef! #261) * new lexer: ActionScript (thanks @honzabrecka! #241) * terminal256 formatter: stop confusing token names (thanks @julp! #367) * new lexer: julia (thanks @mpeteuil! #331) * new lexer: cmake (thanks @julp! #302) * new lexer: eiffel (thanks @Conaclos! #323) * new lexer: protobuf (thanks @fqqb! #327) * new lexer: fortran (thanks @CruzR! #328) * php: associate `*.phpt` files (thanks @Razer6!) * python: support `raise from` and `yield from` (thanks @mordervomubel! #324) * new VimL example (thanks @tpope! #315) ## version 1.10.1: 2015-09-10 * diff: fix deleted lines which were not being highlighted (thanks @DouweM) ## version 1.10.0: 2015-09-10 * fix warnings on files being loaded multiple times * swift: (thanks @radex) - new keywords - support all `@`-prefixed attributes - add support for `try!` and `#available(...)` * bugfix: Properly manage `#style_for` precedence for terminal and inline formatters (thanks @mojavelinux) * visual basic: recognize `*.vb` files (thanks @naotaco) * common-lisp: - add `elisp` as an alias (todo: make a real elisp lexer) (thanks @tejasbubane) - bugfix: fix crash on array and structure literals * new lexer: praat (thanks @jjatria) * rust: stop recognizing `*.rc` (thanks @maximd) * matlab: correctly highlight `'` (thanks @miicha) ## version 1.9.1: 2015-07-13 * new lexer: powershell (thanks @aaroneg!) * new lexer: tulip * bugfix: pass opts through so lex(continue: true) retains them (thanks @stanhu!) * c#: bugfix: don't error on unknown states in the C# lexer * php: match drupal file extensions (thanks @rumpelsepp!) * prolog: allow camelCase atoms (thanks @mumuki!) * c: bugfix: was dropping text in function declarations (thanks @JonathonReinhart!) * groovy: bugfix: allow comments at eof without newline ## version 1.9.0: 2015-05-19 * objc: add array literals (thanks @mehowte) * slim: reset ruby and html lexers, be less eager with guessing, detect html entities (thanks @elstgav) * js: add `yield` as a keyword (thanks @honzabrecka) * elixir: add alias `exs` (thanks @ismaelga) * json: lex object keys as `Name::Tag` (thanks @morganjbruce) * swift: add support for `@noescape` and `@autoclosure(escaping)` (thanks @radex) and make `as?` and `as!` look better * sass/scss: add support for `@each`, `@return`, `@media`, and `@function` (thanks @i-like-robots) * diff: make the whole thing more forgiving and less buggy (thanks @rumpelsepp) * c++: add arduino file mappings and also Berksfile (thanks @Razer6) * liquid: fix #237 which was dropping content (thanks @RadLikeWhoa) * json: add json-api mime type (thanks @brettchalupa) * new lexer: glsl (thanks @sriharshachilakapati) * new lexer: json-doc, which is like JSON but supports comments and ellipsis (thanks @textshell) * add documentation to the `--formatter` option in `rougify help` (thanks @mjbshaw) * new website! http://rouge.jneen.net/ (thanks @edwardloveall!) ## version 1.8.0: 2015-02-01 * css: fix "empty range in char class" bug and improve id/class name matches (#227/#228). Thanks @elstgav! * swift: add `@objc_block` and fix eof comments (#226). Thanks @radex! * new lexer: liquid (#224). Thanks @RadLikeWhoa! * cli: add `-v` flag to print version (#225). Thanks @RadLikeWhoa! * ruby: add `alias_method` as a builtin (#223). Thanks @kochd! * more conservative guessing for R, eliminate the `.S` extension * new theme: molokai (#220). Thanks @kochd! * allow literate haskell that doesn't end in eof * add human-readable "title" attribute to lexers (#215). Thanks @edwardloveall! * swift: add support for preprocessor macros (#201). Thanks @mipsitan! ## version 1.7.7: 2014-12-24 * fix previous bad release: actually add yaml files to the gem ## version 1.7.5: 2014-12-24 lexer fixes and tweaks: * javascript: fix function literals in object literals (reported by @taye) * css: fix for percentage values and add more units (thanks @taye) * ruby: highlight `require_relative` as a builtin (thanks @NARKOZ) new lexers: * nim (thanks @singularperturbation) * apache (thanks @iiska) new filetype associations: * highlight PKGBUILD as shell (thanks @rumpelsepp) * highlight Podspec files as ruby (thanks @NARKOZ) other: * lots of doc work in the README (thanks @rumpelsepp) ## version 1.7.4: 2014-11-23 * clojure: hotfix for namespaced keywords with `::` * background fix: add css class to pre tag instead of code tag (#191) * new name in readme and license * new contributor code of conduct ## version 1.7.3: 2014-11-15 * ruby: hotfix for symbols in method calling position (rubyyyyy.......) * http: add PATCH as a verb * new lexer: Dart (thanks @R1der!) * null formatter now prints token names and values ## version 1.7.2: 2014-10-04 * ruby: hotfix for division with no space ## version 1.7.1: 2014-09-18 * ruby: hotfix for the `/=` operator ## version 1.7.0: 2014-09-18 * ruby: give up on trying to highlight capitalized builtin methods * swift: updates for beta 6 (thanks @radex!) (#174, #172) * support ASCII-8BIT encoding found on macs, as it's a subset of UTF-8 (#178) * redcarpet plugin [BREAKING]: change `#rouge_formatter`'s override pattern - it is now a method that takes a lexer and returns a formatter, instead of a hash of generated options. (thanks @vince-styling!) * java: stop erroneously highlighting keywords within words (thanks @koron!) (#177) * html: dash is allowed in tag names (thanks @tjgrathwell!) (#173) ## version 1.6.2: 2014-08-16 * swift: updates for beta 5 (thanks @radex!) ## version 1.6.1: 2014-07-26 * hotfix release for common lisp, php, objective c, and qml lexers ## version 1.6.0: 2014-07-26 * haml: balance braces in interpolation * new lexer: slim (thanks @knutaldrin and @greggroth!) * javascript: inner tokens in regexes are now lexed, as well as improvments to the block / object distinction. ## version 1.5.1: 2014-07-13 * ruby bugfixes for symbol edgecases and one-letter constants * utf-8 all of the things * update all builtins * rust: add `box` keyword and associated builtins ## version 1.5.0: 2014-07-11 * new lexer: swift (thanks @totocaster!) * update elixir for new upstream features (thanks @splattael!) * ruby bugfixes: - add support for method calls with trailing dots - fix for `foo[bar] / baz` being highlighted as a regex * terminal256 formatter: re-style each line - some platforms reset on each line ## version 1.4.0: 2014-05-28 * breaking: wrap code in `
...
` if `:wrap` is not overridden (thanks @Arcovion) * Allow passing a theme name as a string to `:inline_theme` (thanks @Arcovion) * Add `:start_line` option for html line numbers (thanks @sencer) * List available themes in `rougify help style` ## version 1.3.4: 2014-05-03 * New lexers: - QML (thanks @seanchas116) - Applescript (thanks @joshhepworth) - Properties (thanks @pkuczynski) * Ruby bugfix for `{ key: /regex/ }` (#134) * JSON bugfix: properly highlight null (thanks @zsalzbank) * Implement a noop formatter for perf testing (thanks @splattael) ## version 1.3.3: 2014-03-02 * prolog bugfix: was raising an error on some inputs (#126) * python bugfix: was inconsistently highlighting keywords/builtins mid-word (#127) * html formatter: always end output with a newline (#125) ## version 1.3.2: 2014-01-13 * Now tested in Ruby 2.1 * C family bugfix: allow exponential floats without decimals (`1e-2`) * cpp: allow single quotes as digit separators (`100'000'000`) * ruby: highlight `%=` as an operator in the right context ## version 1.3.1: 2013-12-23 * fill in some lexer descriptions and add the behat alias for gherkin ## version 1.3.0: 2013-12-23 * assorted CLI bugfixes: better error handling, CGI-style options, no loadpath munging * html: support multiline doctypes * ocaml: bugfix for OO code: allows `#` as an operator * inline some styles in tableized output instead of relying on the theme * redcarpet: add overrideable `#rouge_formatter` for custom formatting options ## version 1.2.0: 2013-11-26 * New lexers: - MATLAB (thanks @adambard!) - Scala (thanks @sgrif!) - Standard ML (sml) - OCaml * Major performance overhaul, now ~2x faster (see [#114][]) (thanks @korny!) * Deprecate `RegexLexer#group` (internal). Use `#groups` instead. * Updated PHP builtins * CLI now responds to `rougify --version` [#114]: https://github.com/rouge-ruby/rouge/pull/114 ## version 1.1.0: 2013-11-04 * For tableized line numbers, the table is no longer surrounded by a `
`
    tag, which is invalid HTML.  This was previously causing issues with HTML
    post-processors such as loofah.  This may break some stylesheets, as it
    changes the generated markup, but stylesheets only referring to the scope
    passed to the formatter should be unaffected.
  * New lexer: moonscript (thanks @nilnor!)
  * New theme: monokai, for real this time! (thanks @3100!)
  * Fix intermittent loading errors for good with `Lexer.load_const`, which
    closes the long-standing #66

## version 1.0.0: 2013-09-28

  * lua: encoding bugfix, and a performance tweak for string literals
  * The Big 1.0!  From now on, strict semver will apply, and new lexers and
    features will be introduced in minor releases, reserving patch releases
    for bugfixes.

## version 0.5.4: 2013-09-21

  * Cleaned up stray invalid error tokens
  * Fix C++/objc loading bug in `rougify`
  * Guessing alg tweaks: don't give up if no filename or mimetype matches
  * Rebuilt the CLI without thor (removed the thor dependency)
  * objc: Bugfix for `:forward_classname` error tokens

## version 0.5.3: 2013-09-15

  * Critical bugfixes (#98 and #99) for Ruby and Markdown. Some inputs
    would throw errors. (thanks @hrysd!)

## version 0.5.2: 2013-09-15

  * Bugfixes for C/C++
  * Major bugfix: YAML was in a broken state :\ (thanks @hrysd!)
  * Implement lexer subclassing, with `append` and `prepend`
  * new lexer: objective c (!)

## version 0.5.1: 2013-09-15

  * Fix non-default themes (thanks @tiroc!)
  * Minor lexing bugfixes in ruby

## version 0.5.0: 2013-09-02

  * [Various performance optimizations][perf-0.5]
  * javascript:
    - quoted object keys were not being highlighted correctly
    - multiline comments were not being highlighted
  * common lisp: fix commented forms
  * golang: performance bump
  * ruby: fix edge case for `def-@`
  * c: fix a pathological performance case
  * fix line number alignment on non-newline-terminated code (#91)

### Breaking API Changes in v0.5.0

  * `Rouge::Lexers::Text` renamed to `Rouge::Lexers::PlainText`
  * Tokens are now constants, rather than strings.  This only affects
    you if you've written a custom lexer, formatter, or theme.

[perf-0.5]: https://github.com/rouge-ruby/rouge/pull/41#issuecomment-23561787

## version 0.4.0: 2013-08-14

  * Add the `:inline_theme` option to `Formatters::HTML` for environments
    that don't support stylesheets (like super-old email clients)
  * Improve documentation of `Formatters::HTML` options
  * bugfix: don't include subsequent whitespace in an elixir keyword.
    In certain fonts/themes, this can cause inconsistent indentation if
    bold spaces are wider than non-bold spaces.  (thanks @splattael!)

## version 0.3.10: 2013-07-31

  * Add the `license` key in the gemspec
  * new lexer: R

## version 0.3.9: 2013-07-19

  * new lexers:
    - elixir (thanks @splattael!)
    - racket (thanks @greghendershott!)

## version 0.3.8: 2013-07-02

  * new lexers:
    - erlang! (thanks @potomak!)
    - http (with content-type based delegation)
  * bugfix: highlight true and false in JSON

## version 0.3.7: 2013-06-07

  * bugfix: Add the local lib dir to the path in ./bin/rougify
    so the internal `require` works properly.
  * php: Properly lex variables in double-quoted strings and provide the
    correct token for heredocs (thanks @hrysd!)
  * Add a `:wrap` option to the html formatter (default true) to provide
    the `
` wrapper.  This allows skipping the wrapper entirely for
    postprocessing.  (thanks @cjohansen!)

## version 0.3.6: 2013-05-27

  * fixed bad release that included unfinished D and wdiff lexers :\

## version 0.3.5: 2013-05-24

  * Added a github theme (thanks @simonc!) (#75)
  * Correctly highlight ruby 1.9-style symbols and %i() syntax
    (thanks @simonc!) (#74)
  * Fixed a performance bug in the C++ lexer (#73)
    reported by @jeffgran

## version 0.3.4: 2013-05-02

  * New lexer: go (thanks @hashmal!)
  * Clojure bugfix: allow # in keywords and symbols

## version 0.3.3: 2013-04-09

  * Basic prompt support in the shell lexer
  * Add CSS3 attributes to CSS/Sass/SCSS lexers
  * Bugfix for a crash in the vim lexer

## version 0.3.2: 2013-03-11

  * Another hotfix release for the Sass/SCSS lexers, because I am being dumb

## version 0.3.1: 2013-03-11

  * Hotfix release: fix errors loading the SCSS lexer on some systems.

## version 0.3.0: 2013-03-06

  * Refactor source guessing to return fewer false positives, and
    to be better at disambiguating between filename matches (such as
    `nginx.conf` vs. `*.conf`, or `*.pl` for both prolog and perl)
  * Added `Lexer.guesses` which can return multiple or zero results for a
    guess.
  * Fix number literals in C#
  * New lexers:
    - Gherkin (cucumber)
    - Prolog (@coffeejunk)
    - LLVM (@coffeejunk)

## version 0.2.15: 2013-03-03

  * New lexer: lua (thanks, @nathany!)
  * Add extra filetypes that map to Ruby (`Capfile`, `Vagrantfile`,
    `*.ru` and `*.prawn`) (@nathany)
  * Bugfix: add demos for ini and toml
  * The `thankful_eyes` theme now colors `Literal.Date`
  * No more gigantic load list in `lib/rouge.rb`

## version 0.2.14: 2013-02-28

  * New lexers:
    - puppet
    - literate coffeescript
    - literate haskell
    - ini
    - toml (@coffeejunk)
  * clojure: `cljs` alias, and make it more visually balanced by using
    `Name` instead of `Name.Variable`.
  * Stop trying to read /etc/bash.bashrc in the specs (@coffeejunk)

## version 0.2.13: 2013-02-12

  * Highlight ClojureScipt files (`*.cljs`) as Clojure (@blom)
  * README and doc enhancements (plus an actual wiki!) (@robin850)
  * Don't open `Regexp`, especially if we're not adding anything to it.

## version 0.2.12: 2013-02-07

  * Python: bugfix for lone quotes in triple-quoted strings
  * Ruby: bugfix for `#` in `%`-delimited strings

## version 0.2.11: 2013-02-04

  * New lexer: C# (csharp)
  * rust: better macro handling
  * Python bugfix for "'" and '"' (@garybernhardt)

## version 0.2.10: 2013-01-14

  * New lexer: rust (rust-lang.org)
  * Include rouge.gemspec with the built gem
  * Update the PHP builtins

## version 0.2.9: 2012-11-28

  * New lexers: io, sed, conf, and nginx
  * fixed an error on numbers in the shell lexer
  * performance bumps for shell and ruby by prioritizing more
    common patterns
  * (@korny) Future-proofed the regexes in the Perl lexer
  * `rougify` now streams the formatted text to stdout as it's
    available instead of waiting for the lex to be done.

## version 0.2.8: 2012-10-30

  * Bugfix for tableized line numbers when the code doesn't end
    with a newline.

## version 0.2.7: 2012-10-22

  * Major performance improvements.  80% running time reduction for
    some files since v0.2.5 (thanks again @korny!)
  * Deprecated `postprocess` for performance reasons - it wasn't that
    useful in the first place.
  * The shell lexer should now recognize .bashrc, .profile and friends

## version 0.2.6: 2012-10-21
  * coffeescript: don't yield error tokens for keywords as attributes
  * add the `--scope=SELECTOR` option to `rougify style`
  * Add the `:line_numbers` option to the HTML formatter to get line
    numbers!  The styling for the line numbers is determined by
    the theme's styling for `'Generic.Lineno'`
  * Massive performance improvements by reducing calls to `option`
    and to `Regexp#source` (@korny)

## version 0.2.5: 2012-10-20
  * hotfix: ship the demos with the gem.

## version 0.2.4: 2012-10-20

  * Several improvements to the javasript and scheme lexers
  * Lexer.demo, with small demos for each lexer
  * Rouge.highlight takes a string for the formatter
  * Formatter.format delegates to the instance
  * sass: Support the @extend syntax, fix new-style attributes, and
    support 3.2 placeholder syntax

## version 0.2.3: 2012-10-16

  * Fixed several postprocessing-related bugs
  * New lexers: coffeescript, sass, smalltalk, handlebars/mustache

## version 0.2.2: 2012-10-13

  * In terminal256, stop highlighting backgrounds of text-like tokens
  * Fix a bug which was breaking guessing with filenames beginning with .
  * Fix the require path for redcarpet in the README (@JustinCampbell)
  * New lexers: clojure, groovy, sass, scss
  * YAML: detect files with the %YAML directive
  * Fail fast for non-UTF-8 strings
  * Formatter#render deprecated, renamed to Formatter#format.
    To be removed in v0.3.
  * Lexer#tag delegates to the class
  * Better keyword/builtin highlighting for CSS
  * Add the `:token` option to the text lexer

## version 0.2.1: 2012-10-11

  * Began the changelog
  * Removed several unused methods and features from Lexer and RegexLexer
  * Added a lexer for SQL
  * Added a lexer for VimL, along with `rake builtins:vim`
  * Added documentation for RegexLexer, TextAnalyzer, and the formatters
  * Refactored `rake phpbuiltins` - renamed to `rake builtins:php`
  * Fixed a major bug in the Ruby lexer that prevented highlighting the
    `module` keyword.
  * Changed the default formatter for the `rougify` executable to
    `terminal256`.
  * Implemented `rougify list`, and added short descriptions to all of
    the lexers.
  * Fixed a bug in the C lexer that was yielding error tokens in case
    statements.
rouge-3.28.0/CODE_OF_CONDUCT.md000066400000000000000000000024411417417255300155360ustar00rootroot00000000000000# Contributor Code of Conduct
## Version 1.0

(from [Coraline's awesome covenant](https://github.com/Bantik/contributor_covenant))

As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harrasment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, nationality, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual langauge or imagery, derogatory comments or
personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
rouge-3.28.0/Gemfile000066400000000000000000000013471417417255300142360ustar00rootroot00000000000000# frozen_string_literal: true

source 'http://rubygems.org'

gemspec

gem 'rake'

gem 'minitest', '>= 5.0'
gem 'minitest-power_assert'
gem 'power_assert', '~> 1.2'

gem 'parallel', '~> 1.13.0' if RUBY_VERSION < '2.2.0'
gem 'rubocop', '~> 0.49.1'

# don't try to install redcarpet under jruby
gem 'redcarpet', :platforms => :ruby

# Profiling
if RUBY_VERSION >= '2.3.0'
  gem 'memory_profiler', :require => false
end

# Needed for a Rake task
gem 'git'
gem 'yard'

group :development do
  gem 'pry'

  # docs
  gem 'github-markup'

  # for visual tests
  if RUBY_VERSION < '2.2.0'
    gem 'sinatra', '~> 1.4.8'
  else
    gem 'sinatra'
  end

  # Ruby 3 no longer ships with a web server
  gem 'puma' if RUBY_VERSION >= '3'
  gem 'shotgun'
end
rouge-3.28.0/Guardfile000066400000000000000000000001171417417255300145620ustar00rootroot00000000000000# frozen_string_literal: true

guard :shell do
  watch(/\.rb$/) { `rake` }
end
rouge-3.28.0/LICENSE000066400000000000000000000157761417417255300137630ustar00rootroot00000000000000# MIT license.  See http://www.opensource.org/licenses/mit-license.php

Copyright (c) 2012 Jeanine Adkisson.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

# SPECIAL NOTE:
Many of the lexers in this project are adaptations of those in Pygments
(pygments.org).  The license for Pygments is as follows:

# BEGIN pygments/LICENSE #

Copyright (c) 2006-2012 by the respective authors (see AUTHORS file).
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in the
  documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# END pygments/LICENSE #

The contents of the AUTHORS file at the time of porting was:

# BEGIN pygments/AUTHORS #

Pygments is written and maintained by Georg Brandl .

Major developers are Tim Hatch  and Armin Ronacher
.

Other contributors, listed alphabetically, are:

* Sam Aaron -- Ioke lexer
* Kumar Appaiah -- Debian control lexer
* Ali Afshar -- image formatter
* Andreas Amann -- AppleScript lexer
* Jeffrey Arnold -- R/S lexer, BUGS lexers
* Jeremy Ashkenas -- CoffeeScript lexer
* Stefan Matthias Aust -- Smalltalk lexer
* Ben Bangert -- Mako lexers
* Max Battcher -- Darcs patch lexer
* Paul Baumgart, 280 North, Inc. -- Objective-J lexer
* Michael Bayer -- Myghty lexers
* John Benediktsson -- Factor lexer
* Christopher Bertels -- Fancy lexer
* Jarrett Billingsley -- MiniD lexer
* Adam Blinkinsop -- Haskell, Redcode lexers
* Frits van Bommel -- assembler lexers
* Pierre Bourdon -- bugfixes
* Hiram Chirino -- Scaml and Jade lexers
* Leaf Corcoran -- MoonScript lexer
* Christopher Creutzig -- MuPAD lexer
* Pete Curry -- bugfixes
* Owen Durni -- haXe lexer
* Nick Efford -- Python 3 lexer
* Sven Efftinge -- Xtend lexer
* Artem Egorkine -- terminal256 formatter
* James H. Fisher -- PostScript lexer
* Carlos Galdino -- Elixir and Elixir Console lexers
* Naveen Garg -- Autohotkey lexer
* Laurent Gautier -- R/S lexer
* Alex Gaynor -- PyPy log lexer
* Bertrand Goetzmann -- Groovy lexer
* Krzysiek Goj -- Scala lexer
* Matt Good -- Genshi, Cheetah lexers
* Patrick Gotthardt -- PHP namespaces support
* Olivier Guibe -- Asymptote lexer
* Martin Harriman -- SNOBOL lexer
* Matthew Harrison -- SVG formatter
* Steven Hazel -- Tcl lexer
* Aslak Hellesøy -- Gherkin lexer
* Greg Hendershott -- Racket lexer
* Jordi Gutiérrez Hermoso -- Octave lexer
* David Hess, Fish Software, Inc. -- Objective-J lexer
* Varun Hiremath -- Debian control lexer
* Doug Hogan -- Mscgen lexer
* Ben Hollis -- Mason lexer
* Tim Howard -- BlitzMax lexer
* Ivan Inozemtsev -- Fantom lexer
* Brian R. Jackson -- Tea lexer
* Dennis Kaarsemaker -- sources.list lexer
* Igor Kalnitsky -- vhdl lexer
* Eric Knibbe -- Lasso lexer
* Adam Koprowski -- Opa lexer
* Benjamin Kowarsch -- Modula-2 lexer
* Alexander Kriegisch -- Kconfig and AspectJ lexers
* Marek Kubica -- Scheme lexer
* Jochen Kupperschmidt -- Markdown processor
* Gerd Kurzbach -- Modelica lexer
* Olov Lassus -- Dart lexer
* Sylvestre Ledru -- Scilab lexer
* Mark Lee -- Vala lexer
* Ben Mabey -- Gherkin lexer
* Simone Margaritelli -- Hybris lexer
* Kirk McDonald -- D lexer
* Gordon McGregor -- SystemVerilog lexer
* Stephen McKamey -- Duel/JBST lexer
* Brian McKenna -- F# lexer
* Lukas Meuser -- BBCode formatter, Lua lexer
* Paul Miller -- LiveScript lexer
* Hong Minhee -- HTTP lexer
* Michael Mior -- Awk lexer
* Jon Morton -- Rust lexer
* Paulo Moura -- Logtalk lexer
* Mher Movsisyan -- DTD lexer
* Ana Nelson -- Ragel, ANTLR, R console lexers
* Nam T. Nguyen -- Monokai style
* Jesper Noehr -- HTML formatter "anchorlinenos"
* Mike Nolta -- Julia lexer
* Jonas Obrist -- BBCode lexer
* David Oliva -- Rebol lexer
* Jon Parise -- Protocol buffers lexer
* Ronny Pfannschmidt -- BBCode lexer
* Benjamin Peterson -- Test suite refactoring
* Dominik Picheta -- Nimrod lexer
* Clément Prévost -- UrbiScript lexer
* Kashif Rasul -- CUDA lexer
* Justin Reidy -- MXML lexer
* Norman Richards -- JSON lexer
* Lubomir Rintel -- GoodData MAQL and CL lexers
* Andre Roberge -- Tango style
* Konrad Rudolph -- LaTeX formatter enhancements
* Mario Ruggier -- Evoque lexers
* Stou Sandalski -- NumPy, FORTRAN, tcsh and XSLT lexers
* Matteo Sasso -- Common Lisp lexer
* Joe Schafer -- Ada lexer
* Ken Schutte -- Matlab lexers
* Tassilo Schweyer -- Io, MOOCode lexers
* Joerg Sieker -- ABAP lexer
* Robert Simmons -- Standard ML lexer
* Kirill Simonov -- YAML lexer
* Steve Spigarelli -- XQuery lexer
* Jerome St-Louis -- eC lexer
* James Strachan -- Kotlin lexer
* Tiberius Teng -- default style overhaul
* Jeremy Thurgood -- Erlang, Squid config lexers
* Erick Tryzelaar -- Felix lexer
* Daniele Varrazzo -- PostgreSQL lexers
* Abe Voelker -- OpenEdge ABL lexer
* Whitney Young -- ObjectiveC lexer
* Matthias Vallentin -- Bro lexer
* Nathan Weizenbaum -- Haml and Sass lexers
* Dietmar Winkler -- Modelica lexer
* Nils Winter -- Smalltalk lexer
* Davy Wybiral -- Clojure lexer
* Diego Zamboni -- CFengine3 lexer
* Alex Zimin -- Nemerle lexer

Many thanks for all contributions!

# END pygments/AUTHORS #
rouge-3.28.0/README.md000066400000000000000000000244351417417255300142250ustar00rootroot00000000000000# Rouge

![Build Status](https://github.com/rouge-ruby/rouge/actions/workflows/ruby.yml/badge.svg)
[![Gem Version](https://badge.fury.io/rb/rouge.svg)](https://rubygems.org/gems/rouge)
[![YARD Docs](http://img.shields.io/badge/yard-docs-blue.svg)](https://rouge-ruby.github.io/docs/)

[Rouge][] is a pure Ruby syntax highlighter. It can highlight
[over 200 different languages][languages-doc], and output HTML
or ANSI 256-color text. Its HTML output is compatible with
stylesheets designed for [Pygments][].

[rouge]: http://rouge.jneen.net/ "Rouge"
[languages-doc]: docs/Languages.md "Languages"
[pygments]: http://pygments.org "Pygments"

## Installation

In your Gemfile, add:

```ruby
gem 'rouge'
```

or

```sh
gem install rouge
```

## Usage

Rouge's most common uses are as a Ruby library, as part of Jekyll and as a
command line tool.

### Library

Here's a quick example of using Rouge as you would any other regular Ruby
library:

```ruby
require 'rouge'

# make some nice lexed html
source = File.read('/etc/bashrc')
formatter = Rouge::Formatters::HTML.new
lexer = Rouge::Lexers::Shell.new
formatter.format(lexer.lex(source))

# Get some CSS
Rouge::Themes::Base16.mode(:light).render(scope: '.highlight')
# Or use Theme#find with string input
Rouge::Theme.find('base16.light').render(scope: '.highlight')
```

### Jekyll

Rouge is Jekyll's default syntax highlighter. Out of the box, Rouge will be
used to highlight text wrapped in the `{% highlight %}` template tags. The
`{% highlight %}` tag provides minimal options: you can specify the language to
use and whether to enable line numbers or not. More information is available in
[the Jekyll docs][j-docs].

[j-docs]: https://jekyllrb.com/docs/liquid/tags/#code-snippet-highlighting "Code snippet highlighting in the Jekyll documentation"

### Command Line

Rouge ships with a `rougify` command which allows you to easily highlight files
in your terminal:

```sh
rougify foo.rb
rougify style monokai.sublime > syntax.css
```

## Configuration

### Formatters

Rouge comes with a number of formatters built-in but as of Rouge 2.0, you are
encouraged to write your own formatter if you need something custom.

The built-in formatters are:

- `Rouge::Formatters::HTML.new` will render your code with standard class names
  for tokens, with no div-wrapping or other bells or whistles.

- `Rouge::Formatters::HTMLInline.new(theme)` will render your code with no class
  names, but instead inline the styling options into the `style=` attribute.
  This is good for emails and other systems where CSS support is minimal.

- `Rouge::Formatters::HTMLLinewise.new(formatter, class: 'line-%i')` will split
  your code into lines, each contained in its own div. The `class` option will
  be used to add a class name to the div, given the line number.

- `Rouge::Formatters::HTMLLineHighlighter.new(formatter, highlight_lines: [3, 5])`
  will split your code into lines and wrap the lines specified by the
  `highlight_lines` option in a span with a class name specified by the
  `highlight_line_class` option (default: `hll`).

- `Rouge::Formatters::HTMLLineTable.new(formatter, opts={})` will output an HTML
  table containing numbered lines, each contained in its own table-row. Options
  are:

  - `start_line: 1` - the number of the first row
  - `line_id: 'line-%i'` - a `sprintf` template for `id` attribute with
    current line number
  - `line_class: 'lineno'` - a CSS class for each table-row
  - `table_class: 'rouge-line-table'` - a CSS class for the table
  - `gutter_class: 'rouge-gutter'` - a CSS class for the line-number cell
  - `code_class: 'rouge-code'` - a CSS class for the code cell

- `Rouge::Formatters::HTMLPygments.new(formatter, css_class='codehilite')` wraps
  the given formatter with div wrappers generally expected by stylesheets
  designed for Pygments.

- `Rouge::Formatters::HTMLTable.new(formatter, opts={})` will output an HTML
  table containing numbered lines similar to `Rouge::Formatters::HTMLLineTable`,
  except that the table from this formatter has just a single table-row.
  Therefore, while the table is more DOM-friendly for JavaScript scripting, long
  code lines will mess with the column alignment. Options are:

  - `start_line: 1` - the number of the first line
  - `line_format: '%i'` - a `sprintf` template for the line number itself
  - `table_class: 'rouge-table'` - a CSS class for the table
  - `gutter_class: 'rouge-gutter'` - a CSS class for the gutter
  - `code_class: 'rouge-code'` - a CSS class for the code column

- `Rouge::Formatters::HTMLLegacy.new(opts={})` is a backwards-compatibility
  class intended for users of Rouge 1.x, with options that were supported then.
  Options are:

  - `inline_theme: nil` - use an HTMLInline formatter with the given theme
  - `line_numbers: false` - use an HTMLTable formatter
  - `wrap: true` - use an HTMLPygments wrapper
  - `css_class: 'codehilite'` - a CSS class to use for the Pygments wrapper

- `Rouge::Formatters::Terminal256.new(theme)` is a formatter for generating
  highlighted text for use in the terminal. `theme` must be an instance of
  `Rouge::Theme`, or a `Hash` structure with `:theme` entry.

#### Writing your own HTML formatter

If the above formatters are not sufficient, and you wish to customize the layout
of the HTML document, we suggest writing your own HTML formatter. This can be
accomplished by subclassing `Rouge::Formatters::HTML` and overriding specific
methods:

```ruby
class MyFormatter < Rouge::Formatters::HTML

  # this is the main entry method. override this to customize the behavior of
  # the HTML blob as a whole. it should receive an Enumerable of (token, value)
  # pairs and yield out fragments of the resulting html string. see the docs
  # for the methods available on Token.
  def stream(tokens, &block)
    yield "
" tokens.each do |token, value| # for every token in the output, we render a span yield span(token, value) end yield "
" end # or, if you need linewise processing, try: def stream(tokens, &block) token_lines(tokens).each do |line_tokens| yield "
" line_tokens.each do |token, value| yield span(token, value) end yield "
" end end # Override this method to control how individual spans are rendered. # The value `safe_value` will already be HTML-escaped. def safe_span(token, safe_value) # in this case, "text" tokens don't get surrounded by a span if token == Token::Tokens::Text safe_value else "#{safe_value}" end end end ``` ### Lexer Options - `debug: false` will print a trace of the lex on stdout. - `parent: ''` allows you to specify which language the template is inside. ### CSS Options - `scope: '.highlight'` sets the CSS selector to which styles are applied, e.g.: ```ruby Rouge::Themes::MonokaiSublime.render(scope: 'code') ``` ## Documentation Rouge's documentation is available at [rouge-ruby.github.io/docs/][docs]. [docs]: https://rouge-ruby.github.io/docs "Rouge's official documentation" ## Requirements ### Ruby Rouge is compatible with all versions of Ruby from 2.0.0 onwards. It has no external dependencies. ### Encodings Rouge only supports UTF-8 strings. If you'd like to highlight a string with a different encoding, please convert it to UTF-8 first. ## Integrations - Middleman: - [middleman-syntax][] (@bhollis) - [middleman-rouge][] (@Linuus) - RDoc: [rdoc-rouge][] (@zzak) - Rails: [Rouge::Rails][] (@jacobsimeon) [middleman-syntax]: https://github.com/middleman/middleman-syntax [middleman-rouge]: https://github.com/Linuus/middleman-rouge [rdoc-rouge]: https://github.com/zzak/rdoc-rouge [rouge::rails]: https://github.com/jacobsimeon/rouge-rails ## Contributing We're always excited to welcome new contributors to Rouge. By it's nature, a syntax highlighter relies for its success on submissions from users of the languages being highlighted. You can help Rouge by filing bug reports or developing new lexers. ### Bug Reports Rouge uses GitHub's Issues to report bugs. You can [choose][issue-chooser] from one of our templates or create a custom issue. Issues that have not been active for a year are automatically closed by GitHub's [Probot][]. [issue-chooser]: https://github.com/rouge-ruby/rouge/issues/new/choose "Choose an issue from the templates" [probot]: https://probot.github.io "Read more about GitHub's Probot" ### Developing Lexers **NOTE**: Please don't submit lexers that are copy-pasted from other files. These submission will be rejected and we don't want you to waste your time. We want to make it as easy as we can for anyone to contribute a lexer to Rouge. To help get you started, we have [a shiny new guide][lexer-dev-doc] on lexer development in the documentation. The best place is to start there. [lexer-dev-doc]: https://rouge-ruby.github.io/docs/file.LexerDevelopment.html "Rouge's lexer development guide" If you get stuck and need help, submit a pull request with what you have and make it clear in your submission that the lexer isn't finished yet. We'll do our best to answer any questions you have and sometimes the best way to do that is with actual code. ### Testing Rouge Once you've cloned the repository from GitHub, you can test the core of Rouge simply by running `rake` (no `bundle exec` required). You can also run a single test file by setting the `TEST` environment variable to the path of the desired test. For example, to test just the _`ruby` lexer_ (located at path `spec/lexers/ruby_spec.rb`) simply run the following: ```sh TEST=spec/lexers/ruby_spec.rb rake ``` To test a lexer visually, run `rackup` from the top-level working directory and you should have a web server running and ready to go. Visit to see the full list of Rouge's lexers. Once you've selected a particular lexer, you can add `?debug=1` to your URL string to see a lot of helpful debugging info printed on stdout. ## Versioning Rouge uses [Semantic Versioning 2.0.0][sv2]. [sv2]: http://semver.org/ ## Maintainers Rouge is largely the result of the hard work of unpaid volunteers. It was originally developed by Jeanine Adkisson (@jneen) and is currently maintained by Jeanine Adkisson, Drew Blessing (@dblessing), Goro Fuji (@gfx) and Tan Le (@tancnle). ## License Rouge is released under the MIT license. Please see the `LICENSE` file for more information. rouge-3.28.0/Rakefile000066400000000000000000000021451417417255300144050ustar00rootroot00000000000000# frozen_string_literal: true require "bundler/setup" require "bundler/gem_tasks" # Adds the :build, :install and :release tasks require "rake/clean" # Adds the :clean and :clobber tasks require "rake/testtask" require "rubocop/rake_task" require "yard" # Add tasks task :check => ["check:specs", "check:style"] task :default => [:check] task :test => [:check] # Add pre-requisites task :build => [:clean, :check, "generate:docs"] # Add utility tasks task :newline do puts end # Load tasks Dir.glob(Pathname.new(__FILE__).dirname.join('tasks/**/*.rake')).each do |f| load f end # Legacy task names (for preserving backwards compatibility) def alias_task(aliases) aliases.each do |alias_name,task_name| t = Rake::Task[task_name] task alias_name, *t.arg_names do |_, args| args = t.arg_names.map { |a| args[a] } t.invoke(args) end end end alias_task "changelog:insert" => "update:changelog" alias_task :lex => "generate:lexer" alias_task :profile_memory => "check:memory" alias_task :similarity => "check:similarity" alias_task :spec => "check:specs" rouge-3.28.0/bin/000077500000000000000000000000001417417255300135065ustar00rootroot00000000000000rouge-3.28.0/bin/rougify000077500000000000000000000006751417417255300151300ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true require 'pathname' ROOT_DIR = Pathname.new(__FILE__).dirname.parent Kernel::load ROOT_DIR.join('lib/rouge.rb') Kernel::load ROOT_DIR.join('lib/rouge/cli.rb') Signal.trap('PIPE', 'SYSTEM_DEFAULT') if Signal.list.include? 'PIPE' begin Rouge::CLI.parse(ARGV).run rescue Rouge::CLI::Error => e puts e.message exit e.status rescue Interrupt $stderr.puts "\nrouge: interrupted" exit 2 end rouge-3.28.0/config.ru000066400000000000000000000002211417417255300145460ustar00rootroot00000000000000# frozen_string_literal: true require 'pathname' here = Pathname.new(__FILE__).dirname load here.join('spec/visual/app.rb') run VisualTestApp rouge-3.28.0/docs/000077500000000000000000000000001417417255300136665ustar00rootroot00000000000000rouge-3.28.0/docs/DevEnvironment.md000066400000000000000000000162661417417255300171660ustar00rootroot00000000000000 # Development Environment ## Introduction Rouge is written in Ruby and has a number of development dependencies. To develop new features for Rouge (like a lexer for a new syntax) or to fix bugs, you need to set up a development environment. Please note that this guide is about how to configure a development environment on your local machine. If you want to isolate your Rouge development environment using Docker, take a gander at our [guide][docker-docs]. [docker-docs]: Docker.md ### Ruby and Git First things first. This guide is _not_ a guide to installing Ruby and Git. There are a number of excellent resources out there explaining how to do these things. For Ruby, we recommend [the official documentation][rb-inst-docs] and for Git, [GitHub's documentation][gh-inst-docs]. [rb-inst-docs]: https://www.ruby-lang.org/en/documentation/installation/ [gh-inst-docs]: https://help.github.com/en/articles/set-up-git ### Terminal Emulators This guide assumes you are familiar with the _command line_. The command line is accessed through a _terminal emulator_. - In **macOS**, the default emulator is called "Terminal" and can be found by searching for "Terminal" in Spotlight. - In **Windows**, you can open a command line by running "Command Prompt". You can start this by typing `cmd.exe` at the Start Menu. - In **Linux**, well, you're probably reading this at the command line. ### GitHub The official Rouge repository is on GitHub and we use GitHub to coordinate development. While you don't _need_ a GitHub account to hack on Rouge, you're going to need one to contribute your improvements back to the Rouge community. Creating [an account][gh-make-acc] is free of charge. And just think how awesome it'll be when you take your collaboration to the "next level". [gh-make-acc]: https://github.com/join ## Getting Rouge ### Forking the Repository To develop Rouge, we're going to create a "fork" of Rouge where we can make our changes. These will be happily isolated from everyone else and then—through the magic of Git—mergeable back into the main project later. First, visit [the front page][rouge-fp] of Rouge's repo on GitHub. Unless you're crazy and are trying to develop code on your phone (like perhaps I am doing right now), you'll see a button near the top right of your browser window that will say "Fork". Click this and GitHub will ask where you want to create your fork. Select your account and—boom!—you've just forked Rouge. [rouge-fp]: https://github.com/rouge-ruby/rouge ### Cloning Your Fork The next thing to do is to get your fork onto your computer. Git makes this easy. In the directory you want to hold your repository, type: ```shell git clone git@github.com:/rouge.git ``` Git will reach out to GitHub, grab the code and put it in a directory called `rouge/`. ### Adding Upstream By default, the clone of the repository you've made will contain a reference to GitHub. That's great for syncing back to your fork but what if you want to sync your fork back up with the official repository. If you spend a sufficient amount of time developing Rouge, this is something you'll want to do. Fortunately, it's easy to add additional remote repositories. To add the official Rouge repository (with the name `upstream`), type the following: ```shell git remote add upstream https://github.com/rouge-ruby/rouge.git ``` Now you'll be able to fetch changes from the official repository and merge them back into your code. For more information, check out [the documentation][gh-fork-docs] on GitHub. [gh-fork-docs]: https://help.github.com/en/articles/configuring-a-remote-for-a-fork ## Installing Development Dependencies Ruby provides support for using external "packages" of Ruby code. These packages are called _gems_. While Rouge does not depend on any gems to perform syntax highlighting, it does have a number of dependencies that you need to install to _develop_ Rouge. These are the development dependencies. ### Installing Bundler The easiest way to install Rouge's development dependencies is using [Bundler][]. Bundler is itself a gem but we'll install it differently to how we install the other dependencies. [bundler]: https://bundler.io/ If you already develop with Ruby, you no doubt have Bundler installed. You can check if you do by typing `bundle -v` at the command line. If you don't see the version number then you need to install Bundler. To do this, type: ```shell gem install bundler ``` Ruby's `gem` tool will grab the latest Bundler package and install it. Once that's complete, you're ready to rock. ### Installing the Dependencies Rouge comes with a list of gems it depends upon called a _Gemfile_. Make sure you're at the top level of your clone of your repository and type: ```shell bundle config set path 'vendor' bundle install ``` This first command tells Bundler to register the directory `vendor/` as the project-specific install location for dependencies, and the second command installs all dependencies. This has one drawback (explained below) but means the gems we use for Rouge are isolated from the other gems we may have installed on our system. This will be tremendously helpful in avoiding conflicts that arise because of the use of incompatible versions of a gem. The one drawback is that we will need to tell Ruby every time we run our Rouge code that it needs to look for the gems in `vendor/`. Bundler makes this easy by providing the command `bundle exec`. So if we want to run our Rake tests, we type `bundle exec rake` rather than just `rake`. ## Using Branches It's best to develop in a _branch_. You can create a branch by typing: ```shell git checkout -b ``` You don't need to do it this way but Rouge maintainers often use the format `feature.` for features and `bugfix.` for bug fixes. Using branches will make it easier for others to collaborate with you and make it easier for you to start fresh if you screw things up from your last stable state. You can read more about branches on [GitHub][gh-branch-docs]. [gh-branch-docs]: https://help.github.com/en/articles/about-branches ## Next Steps You're now ready to roll. Here are the things you can do from the top level of your cloned repository: 1. **Run the Visual Test App**: Rouge includes a little web app you can run to display highlighted code. You can run this by typing `bundle exec rackup`. By default, this will start a web server on port 9292. You can access it by going to with Rack running. If everything is working, you'll see little snippets of code for each lexer in the repository. You can look at the full visual sample for a lexer by clicking on the name of the lexer. 2. **Run the Tests**: Rouge comes with a test suite you can run to check for errors in your code. You can run this using Rake. Just type `bundle exec rake` and you'll (hopefully) be greeted by a series of dots that indicate a successful test. 3. **Check Code Quality**: Rouge uses the popular library [RuboCop][] for checking code quality. You can run RuboCop by—you guessed it—typing `bundle exec rubocop`. [rubocop]: https://github.com/rubocop/rubocop You're all set up! Have fun hacking on Rouge! rouge-3.28.0/docs/Docker.md000066400000000000000000000064741417417255300154320ustar00rootroot00000000000000 # Using Docker Do you want to help with Rouge development but aren't too keen on needing to install Ruby and whatever dependencies are required by Rouge? [Docker](https://www.docker.com/) to the rescue! Docker can be used as a way install Ruby, Rouge and the development dependencies in a self-contained environment for development. In addition to providing an alternative for users who don't want to install Ruby, it's also a good choice for users with an existing installation of Ruby with which they don't want to interfere. ## Prerequisites This guide assumes you have Docker and Git installed. For a guide on installing Docker, we recommend [Docker's official documentation][dk-inst-docs]. For a guide on installing Git, take a look at [GitHub's documentation][gh-inst-docs]. [dk-inst-docs]: https://docs.docker.com/get-started/ [gh-inst-docs]: https://help.github.com/en/articles/set-up-git ## Installing ### Downloading Rouge Clone the project first, and navigate into your clone: ```bash git clone https://github.com/rouge-ruby/rouge.git cd rouge ``` ### Configuring the Container The following line of code sets up Docker with Ruby and Rouge's development dependencies: ```bash docker run -t -v $PWD:/app -v /tmp/vendor:/vendor -w /app -e BUNDLE_PATH=/vendor ruby bundle ``` Pretty sweet. Let's unpack this: - `docker run -it`: Runs the command in a new container. `-t` is not strictly necessary but allows nice colors in the output. - `-v $PWD:app`: Maps the current folder into the `/app` path within the container. Used in conjunction with `-w` (see below), this allows the container to run as if it were inside this directory. - `-v /tmp/vendor:/vendor`: Maps an arbitrary `vendor` folder into the `/vendor` path within the container. This is to persist the installed dependencies across Docker commands, otherwise you would have to re-install each time as containers are ephemeral by nature. - `-e BUNDLE_PATH=/vendor`: Sets an environment variable inside the container that tells Bundler to lookup the dependencies from the `/vendor` path (that we've mapped to our host machine with the previous line) - `ruby`: Tells Docker which image to use for the container. The `ruby` image is part of the official library of "base" Docker images. - `bundle`: Runs the `bundle` command within the container. ## Executing Commands ### Running Rake Just replace the `bundle` command with `rake`: ```bash docker run -t -v $PWD:/app -v /tmp/vendor:/vendor -w /app -e BUNDLE_PATH=/vendor ruby rake ``` ### Running Rack Similarly, we can run Rack by replacing `bundle` with `rackup`: ```bash docker run -t -v $PWD:/app -v /tmp/vendor:/vendor -w /app -e BUNDLE_PATH=/vendor -p 9292:9292 ruby bundle exec rackup --host 0.0.0.0 ``` The additional command line flags are: - `-p 9292:9292`: Exposes port 9292 of the container to the same port on the host. - `bundle exec rackup --host 0.0.0.0`: Runs Rack and asks it to listen on all addresses. Without this it will only listen on the `localhost` of the container and we won't be able to access the server from the host machine. You should be able to visit at this point. ## Conclusion Now that you've got Docker set up, perhaps you'd like to work on a lexer by following our [guide][lexer-docs]. [lexer-docs]: LexerDevelopment.md rouge-3.28.0/docs/Languages.md000066400000000000000000000101741417417255300161210ustar00rootroot00000000000000 # Languages - ABAP (`abap`) - ActionScript (`actionscript`) - Ada (`ada`) - Apache (`apache`) - Apex (`apex`) - API Blueprint (`apiblueprint`) - AppleScript (`applescript`) - ArmAsm (`armasm`) - Augeas (`augeas`) - Awk (`awk`) - Batchfile (`batchfile`) - BBCBASIC (`bbcbasic`) - BibTeX (`bibtex`) - BIML (`biml`) - BPF (`bpf`) - Brainfuck (`brainfuck`) - BrightScript (`brightscript`) - 1C (BSL) (`bsl`) - C (`c`) - Ceylon (`ceylon`) - CFScript (`cfscript`) - Clean (`clean`) - Clojure (`clojure`) - CMake (`cmake`) - CMHG (`cmhg`) - CoffeeScript (`coffeescript`) - Common Lisp (`common_lisp`) - Config File (`conf`) - Console (`console`) - Coq (`coq`) - C++ (`cpp`) - Crystal (`crystal`) - C# (`csharp`) - CSS (`css`) - csvs (`csvs`) - CUDA (`cuda`) - Cypher (`cypher`) - Cython (`cython`) - D (`d`) - Dafny (`dafny`) - Dart (`dart`) - Datastudio (`datastudio`) - diff (`diff`) - digdag (`digdag`) - Docker (`docker`) - DOT (`dot`) - ECL (`ecl`) - EEX (`eex`) - Eiffel (`eiffel`) - Elixir (`elixir`) - Elm (`elm`) - Email (`email`) - EPP (`epp`) - ERB (`erb`) - Erlang (`erlang`) - Escape (`escape`) - Factor (`factor`) - Fortran (`fortran`) - FreeFEM (`freefem`) - FSharp (`fsharp`) - GDScript (`gdscript`) - GHC Cmm (C--) (`ghc-cmm`) - GHC Core (`ghc-core`) - Gherkin (`gherkin`) - GLSL (`glsl`) - Go (`go`) - Gradle (`gradle`) - Graphql (`graphql`) - Groovy (`groovy`) - Hack (`hack`) - Haml (`haml`) - Handlebars (`handlebars`) - Haskell (`haskell`) - Haxe (`haxe`) - Hashicorp Configuration Language (`hcl`) - HLSL (`hlsl`) - HOCON (`hocon`) - HQL (`hql`) - HTML (`html`) - HTTP (`http`) - HyLang (`hylang`) - IDL (`idlang`) - IgorPro (`igorpro`) - INI (`ini`) - Io (`io`) - Irb (`irb`) - Irb_output (`irb_output`) - ISBL (`isbl`) - J (`j`) - Janet (`janet`) - Java (`java`) - JavaScript (`javascript`) - Jinja (`jinja`) - JSL (`jsl`) - JSON (`json`) - Json-doc (`json-doc`) - Jsonnet (`jsonnet`) - Jsp (`jsp`) - JSX (`jsx`) - Julia (`julia`) - Kotlin (`kotlin`) - Lasso (`lasso`) - Liquid (`liquid`) - Literate CoffeeScript (`literate_coffeescript`) - Literate Haskell (`literate_haskell`) - LiveScript (`livescript`) - LLVM (`llvm`) - Lua (`lua`) - Lustre (`lustre`) - Lutin (`lutin`) - M68k (`m68k`) - Magik (`magik`) - Make (`make`) - Markdown (`markdown`) - Mason (`mason`) - Mathematica (`mathematica`) - MATLAB (`matlab`) - MiniZinc (`minizinc`) - MoonScript (`moonscript`) - Mosel (`mosel`) - MessageTrans (`msgtrans`) - MXML (`mxml`) - Nasm (`nasm`) - NesAsm (`nesasm`) - nginx (`nginx`) - Nim (`nim`) - Nix (`nix`) - Objective-C (`objective_c`) - Objective-C++ (`objective_cpp`) - OCaml (`ocaml`) - OCL (`ocl`) - OpenEdge ABL (`openedge`) - OpenType Feature File (`opentype_feature_file`) - Pascal (`pascal`) - Perl (`perl`) - PHP (`php`) - Plain Text (`plaintext`) - Plist (`plist`) - Pony (`pony`) - PostScript (`postscript`) - powershell (`powershell`) - Praat (`praat`) - Prolog (`prolog`) - Prometheus (`prometheus`) - .properties (`properties`) - Protobuf (`protobuf`) - Puppet (`puppet`) - Python (`python`) - Q (`q`) - QML (`qml`) - R (`r`) - Racket (`racket`) - ReasonML (`reasonml`) - Rego (`rego`) - ReScript (`rescript`) - Robot Framework (`robot_framework`) - Ruby (`ruby`) - Rust (`rust`) - SAS (`sas`) - Sass (`sass`) - Scala (`scala`) - Scheme (`scheme`) - SCSS (`scss`) - sed (`sed`) - shell (`shell`) - Sieve (`sieve`) - Slice (`slice`) - Slim (`slim`) - Smalltalk (`smalltalk`) - Smarty (`smarty`) - SML (`sml`) - Solidity (`solidity`) - SPARQL (`sparql`) - SQF (`sqf`) - SQL (`sql`) - SSH Config File (`ssh`) - Stan (`stan`) - Stata (`stata`) - SuperCollider (`supercollider`) - Swift (`swift`) - Systemd (`systemd`) - TAP (`tap`) - Tcl (`tcl`) - Terraform (`terraform`) - TeX (`tex`) - TOML (`toml`) - TSX (`tsx`) - TTCN3 (`ttcn3`) - Tulip (`tulip`) - Turtle/TriG (`turtle`) - Twig (`twig`) - TypeScript (`typescript`) - Vala (`vala`) - Visual Basic (`vb`) - VCL: Varnish Configuration Language (`vcl`) - Velocity (`velocity`) - Verilog and System Verilog (`verilog`) - VHDL 2008 (`vhdl`) - VimL (`viml`) - Vue (`vue`) - Wollok (`wollok`) - XML (`xml`) - Xojo (`xojo`) - XPath (`xpath`) - XQuery (`xquery`) - YAML (`yaml`) - YANG (`yang`) - Zig (`zig`) rouge-3.28.0/docs/LexerDevelopment.md000066400000000000000000000422531417417255300175000ustar00rootroot00000000000000 # Lexer Development ## Overview A critical concept in the design of Rouge is the "lexer". A lexer converts ordinary text into a series of tokens that Rouge can then process. Rouge supports the languages it does by having a separate lexer for each language. Lexer development is important both for fixing Rouge when syntax isn't being highlighted properly and for adding languages that Rouge doesn't support. The remainder of this document explains how to develop a lexer for Rouge. > Please don't submit lexers that are largely copy-pasted from other files. > These submissions will be rejected. ## Getting Started ### Development Environment To develop a lexer, you need to have set up a development environment. If you haven't done that yet, we've got a [guide][dev-environment-docs] that can help. [dev-environment-docs]: DevEnvironment.md The rest of this guide assumes that you have set up such an environment and, importantly, that you have installed the gems on which Rouge depends to a directory within the repository (we recommend `vendor/`). ### File Location Rouge automatically loads lexers saved in the `lib/rouge/lexers/` directory and so if you're submitting a new lexer, that's the right place to put it. The filename should match the name of your lexer, with the Ruby filename extension `.rb` appended. If the name of your language is `Example`, the lexer would be saved as `lib/rouge/lexers/example.rb`. ### Subclassing `RegexLexer` Your lexer needs to be a subclass of the {Rouge::Lexer} abstract class. Most lexers are in fact subclassed from {Rouge::RegexLexer} as the simplest way to define the states of a lexer is to use rules consisting of regular expressions. The remainder of this guide assumes your lexer is subclassed from {Rouge::RegexLexer}. ## How to Structure Basically, a lexer consists of two parts: 1. a series of properties that are usually declared at the top of the lexer; and 2. a collection of one or more states, each of which has one or more rules. There are some additional features that a lexer can implement and we'll cover those at the end. For the remainder of this guide, we'll use [the JSON lexer][json-lexer] as an example. The lexer is relatively simple and is for a language with which many people will at least have some level of familiarity. [json-lexer]: https://github.com/rouge-ruby/rouge/blob/master/lib/rouge/lexers/json.rb ### Lexer Properties To be usable by Rouge, a lexer should declare a **title**, a **description**, a **tag**, any **aliases**, associated **filenames** and associated **mimetypes**. #### Title ```rb title "JSON" ``` The title of the lexer. It is declared using the {Rouge::Lexer.title} method. Note: As a subclass of {Rouge::RegexLexer}, the JSON lexer inherits this method (and its inherited methods) into its namespace and can call those methods without needing to prefix each with `Rouge::Lexer`. This is the case with all of the property defining methods. #### Description ```rb desc "JavaScript Object Notation (json.org)" ``` The description of the lexer. It is declared using the {Rouge::Lexer.desc} method. #### Tag ```rb tag "json" ``` The tag associated with the lexer. It is declared using the {Rouge::Lexer.tag} method. A tag provides a way to specify the lexer that should apply to text within a given code block. In various flavours of Markdown, it's used after the opening of a code block, such as in the following example: ```ruby puts "This is some Ruby" ``` The `ruby` tag is defined in [the Ruby lexer][ruby-lexer]. [ruby-lexer]: https://github.com/rouge-ruby/rouge/blob/master/lib/rouge/lexers/ruby.rb #### Aliases The aliases associated with a lexer. These are declared using the {Rouge::Lexer.aliases} method. Aliases are alternative ways that the lexer can be identified. The JSON lexer does not define any aliases but [the Ruby one][ruby-lexer] does. We can see how it could be used by looking at another example in Markdown. This time, instead of specifying the tag after the opening of the code block, we'll use an alias instead: ```rb puts "This is still some Ruby" ``` #### Filenames ```rb filenames "*.json" ``` The filename(s) associated with a lexer. These are declared using the {Rouge::Lexer.filenames} method. Filenames are declared as "globs" that will match a particular pattern. A "glob" may be merely the specific name of a file (eg. `Rakefile`) or it could include one or more wildcards (eg. `*.json`). #### Mimetypes ```rb mimetypes "application/json", "application/vnd.api+json", "application/hal+json" ``` The mimetype(s) associated with a lexer. These are declared using the {Rouge::Lexer.mimetypes} method. ### Lexer States The other major element of a lexer is the collection of one or more states. For lexers that subclass {Rouge::RegexLexer}, a state will consist of one or more rules with a rule consisting of a regular expression and an action. The action yields tokens and manipulates the _state stack_. #### The State Stack The state stack represents an ordered sequence of states the lexer is currently processing. States are added and removed from the "top" of the stack. The oldest state is on the bottom of the stack and the newest state is on the top. The initial (and therefore bottommost) state is the `:root` state. The lexer works by looking at the rules that are in the state that is on top of the stack. These are tried _in order_ until a match is found. At this point, the action defined in the rule is run, the head of the input stream is advanced and the process is repeated with the state that is now on top of the stack. Now that we've explained the concepts, let's look at how you actually define these elements in your lexer. #### States ```rb state :root do ... # do some stuff end ``` A state is defined using the {Rouge::RegexLexer.state} method. The method consists of the name of the state as a `Symbol` and a block specifying the rules that Rouge will try to match as it parses the text. #### Rules A rule is defined using the {Rouge::RegexLexer::StateDSL#rule} method. The `rule` method can define either "simple" rules or "complex" rules. ##### Simple Rules ```rb rule /\s+/m, Text::Whitespace rule /"/, Str::Double, :string ``` A simple rule takes: 1. a regular expression to match against; 2. a token to yield if the regular expression matches; and 3. an optional new state to push onto the state stack if the regular expression matches. In the above example, there are two rules. The first rule yields the token `Text::Whitespace` but does not do anything to the state stack. The second rule yields the token `Str::Double` and adds the new state `:string` to the top of the state stack. The text being parsed after this point will now be processed by the rules in the `:string` state. The following code shows the definition for this state and the rules that are defined within it: ```rb state :string do rule /[^\\"]+/, Str::Double rule /\\./, Str::Escape rule /"/, Str::Double, :pop! end ``` The last rule features the "special state" `:pop!`. This is not really a state, rather it is an instruction to the lexer to remove the current state from the top of the state stack. In the JSON lexer, when we encounter the double quotation mark `"` we enter into the state of being "in a string" and when we next encounter the double quotation mark, we leave the string and return to the previous state (in this case, the `:root` state). ##### Complex Rules It is possible to define more complex rules for a lexer by calling `rule` with: 1. a regular expression to match against; and 2. a block to call if the regular expression matches. The block called can take one argument, usually written as `m`, that contains the regular expression match object. These kind of rules allow for more fine-grained control of the state stack. Inside a complex rule's block, it's possible to call {Rouge::RegexLexer#push}, {Rouge::RegexLexer#pop!}, {Rouge::RegexLexer#token} and {Rouge::RegexLexer#delegate}. You can see an example of these more complex rules in [the Ruby lexer][ruby-lexer]. ### Additional Features While the properties and states are the minimum elements of a lexer that need to be implemented, a lexer can include additional features. #### Source Detection ```rb def self.detect?(text) return true if text.shebang? 'ruby' end ``` Rouge will attempt to guess the appropriate lexer if it is not otherwise clear. If Rouge is unable to do this on the basis of any tag, associated filename or associated mimetype, it will try to detect the appropriate lexer on the basis of the text itself (the source). This is done by calling `self.detect?` on the possible lexer (a default `self.detect?` method is defined in {Rouge::Lexer} and simply returns `false`). A lexer can implement its own `self.detect?` method that takes a {Rouge::TextAnalyzer} object as a parameter. If the `self.detect?` method returns true, the lexer will be selected as the appropriate lexer. It is important to note that `self.detect?` should _only_ return `true` if it is 100% sure that the language is detected. The most common ways for source code to identify the language it's written in is with a shebang or a doctype and Rouge provides the {Rouge::TextAnalyzer#shebang} method and the {Rouge::TextAnalyzer#doctype} method specifically for use with `self.detect?` to make these checks easy to perform. For more general disambiguation between different lexers, see [Conflicting Filename Globs][conflict-globs] below. [conflict-globs]: #conflicting-filename-globs #### Special Words Every programming language reserves certain words for use as identifiers that have a special meaning in the language. To make regular expressions that search for these words easier, many lexers will put the applicable keywords in an array and make them available in a particular way (be it as a local variable, an instance variable or what have you). For performance and safety, we strongly recommend lexers use a class method: ```rb module Rouge module Lexers class YetAnotherLanguage < RegexLexer ... def self.keywords @keywords ||= Set.new %w(key words used in this language) end ... end end ``` These keywords can then be used like so: ```rb rule /\w+/ do |m| if self.class.keywords.include?(m[0]) token Keyword elsif token Name end end ``` In some cases, you may want to interpolate your keywords into a regular expression. **We strongly recommend you avoid doing this.** Having a large number of rules that are searching for particular words is not as performant as a rule with a generic pattern with a block that checks whether the pattern is a member of a predefined set and assigns tokens, pushes new states, etc. If you do need to use interpolation, be careful to use the `\b` anchor to avoid inadvertently matching part of a longer word (eg. `if` matching `iff`):: ```rb rule /\b(#{keywords.join('|')})\b/, Keyword ``` #### Startup ```rb start do push :expr_start @heredoc_queue = [] end ``` The {Rouge::RegexLexer.start} method can take a block that will be called when the lexer commences lexing. This provides a way to enter into a special state "before" entering into the `:root` state (the `:root` state is still the bottommost state in the state stack; the state pushed by `start` sits "on top" but is the state in which the lexer begins. Why would you want to do this? In some languages, there may be language structures that can appear at the beginning of a file. {Rouge::RegexLexer.start} provides a way to parse these structures without needing a special rule in your `:root` state that has to keep track of whether you are processing things for the first time. ### Subclassing If a lexer is for a language that is very similar to a language with an existing lexer, it's possible to subclass the existing lexer. See [the C++ lexer][cpp-lexer] and [the JSX lexer][jsx-lexer] for examples. [cpp-lexer]: https://github.com/rouge-ruby/rouge/blob/master/lib/rouge/lexers/cpp.rb [jsx-lexer]: https://github.com/rouge-ruby/rouge/blob/master/lib/rouge/lexers/jsx.rb ### Gotchas #### Conflicting Filename Globs If two or more lexers define the same filename glob, this will cause an {Rouge::Guesser::Ambiguous} error to be raised by certain guessing methods (including the one used by the `assert_guess` method used in your spec). The solution to this is to define a disambiguation procedure in the {Rouge::Guessers::Disambiguation} class. Here's the procedure for the `*.pl` filename glob as an example: ```rb disambiguate "*.pl" do next Perl if contains?("my $") next Prolog if contains?(":-") next Prolog if matches?(/\A\w+(\(\w+\,\s*\w+\))*\./) end ``` Then, in [your spec][specs], include a `:source` parameter when calling `assert_guess`: [specs]: #specs ```rb it "guesses by filename" do # *.pl needs source hints because it's also used by Prolog assert_guess :filename => "foo.pl", :source => "my $foo = 1" end ``` ## How to Test When developing a lexer, it is important to have ways to test it. Rouge provides support for three types of test files: 1. a **spec** that will run as part of Rouge's test suite; 2. a **demo** that will be tested as part of Rouge's test suite; and; 3. a **visual sample** of the various language constructs. When you submit a lexer, you must also include these test files. Before we look at how to run these tests, let's look at the files themselves. ### Specs A spec is a list of expectations that are tested as part of the test suite. Rouge uses the Minitest library for defining these expectations. For more information about Minitest, refer to [the documentation][minitest-docs]. [minitest-docs]: http://docs.seattlerb.org/minitest/ Your spec should at a minimum test how your lexer interacts with Rouge's guessing algorithm. In particular, you should check: - the associated filenames; - the associated mimetypes; and - the associated sources (if any). Your spec must be saved to `spec/lexers/_spec.rb`. #### Filenames ```rb it "guesses by filename" do assert_guess :filename => "foo.rb" end ``` Each of the filename globs that are declared in the lexer should be tested in the spec. [As discussed above][conflict-globs], if the associated filename glob conflicts with a filename glob defined in another lexer, you will need to write a disambiguation. #### Mimetypes ```rb it "guesses by mimetype" do assert_guess :mimetype => "text/x-ruby" end ``` Each of the mimetypes that are declared in the lexer should be tested in the spec. #### Sources ```rb it "guesses by source" do assert_guess :source => "#!/usr/local/bin/ruby" end ``` If the lexer implements the `self.detect?` method, then each predicate that returns true should be tested. ### Demos The demo file is tested automatically as part of Rouge's test suite. The file should be able to be parsed without producing any `Error` tokens. The demo is also used on [rouge.jneen.net][hp] as the default text to display when a lexer is chosen. It should be short (less than 20 lines if possible). [hp]: http://rouge.jneen.net/ Your demo must be saved to `lib/rouge/demos/`. Please note that there is no file extension. ### Visual Samples A visual sample is a file that includes a representive sample of the syntax of your language. The sample should be long enough to reasonably demonstrate the correct lexing of the language but does not need to offer complete coverage. While it can be tempting to copy and paste code found online, please refrain from doing this. If you need to copy code, indicate in a comment (using the appropriate syntax for your lexer's language) the source of the code. Avoid including code that is duplicative of the other code in the sample. If you are adding or fixing rules in the lexer, please add some examples of the expressions that will be highlighted differently to the visual sample if they're not already present. This greatly assists in reviewing your lexer submission. Your visual sample must be saved to `spec/visual/sample/`. As with the demo file, there is no file extension. ### Running the Tests The spec and the demo can be run using the `rake` command. You can run this by typing `bundle exec rake` at the command line. If everything works, you should see a series of dots. If you have an error, this will appear here, too. To see your visual sample, launch Rouge's visual test app by running `bundle exec rackup`. You can choose your sample from the complete list by going to . ## How to Submit So you've developed a lexer (or fixed an existing one)—that's great! The basic workflow for a lexer to be submitted is: 1. you make a pull request; 2. a maintainer reviews the lexer; 3. the maintainer suggests any changes that need to be made; 4. you make the necessary changes; 5. the maintainer accepts the request and merges in the code; and 6. the lexer is included in a future release of the Rouge gem. Now you're on your way to fame and glory! (Maybe.) If you haven't submitted a pull request before, GitHub has [excellent documentation][gh-pr] that will help you get accustomed to the workflow. [gh-pr]: https://help.github.com/en/articles/about-pull-requests We're looking forward to seeing your code! You can learn a lot by reading through some of the existing lexers. A good example that's not too long is [the JSON lexer][json-lexer]. rouge-3.28.0/lib/000077500000000000000000000000001417417255300135045ustar00rootroot00000000000000rouge-3.28.0/lib/rouge.rb000066400000000000000000000061511417417255300151550ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # stdlib require 'pathname' # The containing module for Rouge module Rouge # cache value in a constant since `__dir__` allocates a new string # on every call. LIB_DIR = __dir__.freeze class << self def reload! Object::send :remove_const, :Rouge Kernel::load __FILE__ end # Highlight some text with a given lexer and formatter. # # @example # Rouge.highlight('@foo = 1', 'ruby', 'html') # Rouge.highlight('var foo = 1;', 'js', 'terminal256') # # # streaming - chunks become available as they are lexed # Rouge.highlight(large_string, 'ruby', 'html') do |chunk| # $stdout.print chunk # end def highlight(text, lexer, formatter, &b) lexer = Lexer.find(lexer) unless lexer.respond_to? :lex raise "unknown lexer #{lexer}" unless lexer formatter = Formatter.find(formatter) unless formatter.respond_to? :format raise "unknown formatter #{formatter}" unless formatter formatter.format(lexer.lex(text), &b) end # Load a file relative to the `lib/rouge` path. # # @api private def load_file(path) Kernel::load File.join(LIB_DIR, "rouge/#{path}.rb") end # Load the lexers in the `lib/rouge/lexers` directory. # # @api private def load_lexers # The trailing slash is necessary to avoid lexers being loaded multiple # times by `Lexers.load_lexer` lexer_dir = File.join(LIB_DIR, "rouge/lexers/") Dir.glob(File.join(lexer_dir, '*.rb')).each do |f| Lexers.load_lexer(f.sub(lexer_dir, '')) end end end end Rouge.load_file 'version' Rouge.load_file 'util' Rouge.load_file 'text_analyzer' Rouge.load_file 'token' Rouge.load_file 'lexer' Rouge.load_file 'regex_lexer' Rouge.load_file 'template_lexer' Rouge.load_lexers Rouge.load_file 'guesser' Rouge.load_file 'guessers/util' Rouge.load_file 'guessers/glob_mapping' Rouge.load_file 'guessers/modeline' Rouge.load_file 'guessers/filename' Rouge.load_file 'guessers/mimetype' Rouge.load_file 'guessers/source' Rouge.load_file 'guessers/disambiguation' Rouge.load_file 'formatter' Rouge.load_file 'formatters/html' Rouge.load_file 'formatters/html_table' Rouge.load_file 'formatters/html_pygments' Rouge.load_file 'formatters/html_legacy' Rouge.load_file 'formatters/html_linewise' Rouge.load_file 'formatters/html_line_highlighter' Rouge.load_file 'formatters/html_line_table' Rouge.load_file 'formatters/html_inline' Rouge.load_file 'formatters/terminal256' Rouge.load_file 'formatters/terminal_truecolor' Rouge.load_file 'formatters/tex' Rouge.load_file 'formatters/null' Rouge.load_file 'theme' Rouge.load_file 'tex_theme_renderer' Rouge.load_file 'themes/thankful_eyes' Rouge.load_file 'themes/colorful' Rouge.load_file 'themes/base16' Rouge.load_file 'themes/github' Rouge.load_file 'themes/igor_pro' Rouge.load_file 'themes/monokai' Rouge.load_file 'themes/molokai' Rouge.load_file 'themes/monokai_sublime' Rouge.load_file 'themes/gruvbox' Rouge.load_file 'themes/tulip' Rouge.load_file 'themes/pastie' Rouge.load_file 'themes/bw' Rouge.load_file 'themes/magritte' rouge-3.28.0/lib/rouge/000077500000000000000000000000001417417255300146255ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/cli.rb000066400000000000000000000334171417417255300157310ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # not required by the main lib. # to use this module, require 'rouge/cli'. require 'rbconfig' module Rouge class FileReader attr_reader :input def initialize(input) @input = input end def file case input when '-' IO.new($stdin.fileno, 'rt:bom|utf-8') when String File.new(input, 'rt:bom|utf-8') when ->(i){ i.respond_to? :read } input end end def read @read ||= begin file.read rescue => e $stderr.puts "unable to open #{input}: #{e.message}" exit 1 ensure file.close end end end class CLI def self.doc return enum_for(:doc) unless block_given? yield %|usage: rougify {global options} [command] [args...]| yield %|| yield %|where is one of:| yield %| highlight #{Highlight.desc}| yield %| debug #{Debug.desc}| yield %| help #{Help.desc}| yield %| style #{Style.desc}| yield %| list #{List.desc}| yield %| guess #{Guess.desc}| yield %| version #{Version.desc}| yield %|| yield %|global options:| yield %[ --require|-r require after loading rouge] yield %|| yield %|See `rougify help ` for more info.| end class Error < StandardError attr_reader :message, :status def initialize(message, status=1) @message = message @status = status end end def self.parse(argv=ARGV) argv = normalize_syntax(argv) while (head = argv.shift) case head when '-h', '--help', 'help', '-help' return Help.parse(argv) when '--require', '-r' require argv.shift else break end end klass = class_from_arg(head) return klass.parse(argv) if klass argv.unshift(head) if head Highlight.parse(argv) end def initialize(options={}) end def self.error!(msg, status=1) raise Error.new(msg, status) end def error!(*a) self.class.error!(*a) end def self.class_from_arg(arg) case arg when 'version', '--version', '-v' Version when 'help', nil Help when 'highlight', 'hi' Highlight when 'debug' Debug when 'style' Style when 'list' List when 'guess' Guess end end class Version < CLI def self.desc "print the rouge version number" end def self.parse(*); new; end def run puts Rouge.version end end class Help < CLI def self.desc "print help info" end def self.doc return enum_for(:doc) unless block_given? yield %|usage: rougify help | yield %|| yield %|print help info for .| end def self.parse(argv) opts = { :mode => CLI } until argv.empty? arg = argv.shift klass = class_from_arg(arg) if klass opts[:mode] = klass next end end new(opts) end def initialize(opts={}) @mode = opts[:mode] end def run @mode.doc.each(&method(:puts)) end end class Highlight < CLI def self.desc "highlight code" end def self.doc return enum_for(:doc) unless block_given? yield %[usage: rougify highlight [options...]] yield %[ rougify highlight [options...]] yield %[] yield %[--input-file|-i specify a file to read, or - to use stdin] yield %[] yield %[--lexer|-l specify the lexer to use.] yield %[ If not provided, rougify will try to guess] yield %[ based on --mimetype, the filename, and the] yield %[ file contents.] yield %[] yield %[--formatter|-f specify the output formatter to use.] yield %[ If not provided, rougify will default to] yield %[ terminal256.] yield %[] yield %[--theme|-t specify the theme to use for highlighting] yield %[ the file. (only applies to some formatters)] yield %[] yield %[--mimetype|-m specify a mimetype for lexer guessing] yield %[] yield %[--lexer-opts|-L specify lexer options in CGI format] yield %[ (opt1=val1&opt2=val2)] yield %[] yield %[--formatter-opts|-F specify formatter options in CGI format] yield %[ (opt1=val1&opt2=val2)] yield %[] yield %[--require|-r require a filename or library before] yield %[ highlighting] yield %[] yield %[--escape allow the use of escapes between ] yield %[] yield %[--escape-with allow the use of escapes between custom] yield %[ delimiters. implies --escape] end # There is no consistent way to do this, but this is used elsewhere, # and we provide explicit opt-in and opt-out with $COLORTERM def self.supports_truecolor? return true if %w(24bit truecolor).include?(ENV['COLORTERM']) return false if ENV['COLORTERM'] && ENV['COLORTERM'] =~ /256/ if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ENV['ConEmuANSI'] == 'ON' && !ENV['ANSICON'] else ENV['TERM'] !~ /(^rxvt)|(-color$)/ end end def self.parse_opts(argv) opts = { :formatter => supports_truecolor? ? 'terminal-truecolor' : 'terminal256', :theme => 'thankful_eyes', :css_class => 'codehilite', :input_file => '-', :lexer_opts => {}, :formatter_opts => {}, :requires => [], } until argv.empty? arg = argv.shift case arg when '-r', '--require' opts[:requires] << argv.shift when '--input-file', '-i' opts[:input_file] = argv.shift when '--mimetype', '-m' opts[:mimetype] = argv.shift when '--lexer', '-l' opts[:lexer] = argv.shift when '--formatter-preset', '-f' opts[:formatter] = argv.shift when '--theme', '-t' opts[:theme] = argv.shift when '--css-class', '-c' opts[:css_class] = argv.shift when '--lexer-opts', '-L' opts[:lexer_opts] = parse_cgi(argv.shift) when '--escape' opts[:escape] = [''] when '--escape-with' opts[:escape] = [argv.shift, argv.shift] when /^--/ error! "unknown option #{arg.inspect}" else opts[:input_file] = arg end end opts end def self.parse(argv) new(parse_opts(argv)) end def input_stream @input_stream ||= FileReader.new(@input_file) end def input @input ||= input_stream.read end def lexer_class @lexer_class ||= Lexer.guess( :filename => @input_file, :mimetype => @mimetype, :source => input_stream, ) end def raw_lexer lexer_class.new(@lexer_opts) end def escape_lexer Rouge::Lexers::Escape.new( start: @escape[0], end: @escape[1], lang: raw_lexer, ) end def lexer @lexer ||= @escape ? escape_lexer : raw_lexer end attr_reader :input_file, :lexer_name, :mimetype, :formatter, :escape def initialize(opts={}) Rouge::Lexer.enable_debug! opts[:requires].each do |r| require r end @input_file = opts[:input_file] if opts[:lexer] @lexer_class = Lexer.find(opts[:lexer]) \ or error! "unknown lexer #{opts[:lexer].inspect}" else @lexer_name = opts[:lexer] @mimetype = opts[:mimetype] end @lexer_opts = opts[:lexer_opts] theme = Theme.find(opts[:theme]).new or error! "unknown theme #{opts[:theme]}" # TODO: document this in --help @formatter = case opts[:formatter] when 'terminal256' then Formatters::Terminal256.new(theme) when 'terminal-truecolor' then Formatters::TerminalTruecolor.new(theme) when 'html' then Formatters::HTML.new when 'html-pygments' then Formatters::HTMLPygments.new(Formatters::HTML.new, opts[:css_class]) when 'html-inline' then Formatters::HTMLInline.new(theme) when 'html-line-table' then Formatters::HTMLLineTable.new(Formatters::HTML.new) when 'html-table' then Formatters::HTMLTable.new(Formatters::HTML.new) when 'null', 'raw', 'tokens' then Formatters::Null.new when 'tex' then Formatters::Tex.new else error! "unknown formatter preset #{opts[:formatter]}" end @escape = opts[:escape] end def run Formatter.enable_escape! if @escape formatter.format(lexer.lex(input), &method(:print)) end private_class_method def self.parse_cgi(str) pairs = CGI.parse(str).map { |k, v| [k.to_sym, v.first] } Hash[pairs] end end class Debug < Highlight def self.desc end def self.doc return enum_for(:doc) unless block_given? yield %|usage: rougify debug []| yield %|| yield %|Debug a lexer. Similar options to `rougify highlight`, but| yield %|defaults to the `null` formatter, and ensures the `debug`| yield %|option is enabled, to print debugging information to stdout.| end def self.parse_opts(argv) out = super(argv) out[:lexer_opts]['debug'] = '1' out[:formatter] = 'null' out end end class Style < CLI def self.desc "print CSS styles" end def self.doc return enum_for(:doc) unless block_given? yield %|usage: rougify style [] []| yield %|| yield %|Print CSS styles for the given theme. Extra options are| yield %|passed to the theme. To select a mode (light/dark) for the| yield %|theme, append '.light' or '.dark' to the | yield %|respectively. Theme defaults to thankful_eyes.| yield %|| yield %|options:| yield %| --scope (default: .highlight) a css selector to scope by| yield %| --tex (default: false) render as TeX| yield %| --tex-prefix (default: RG) a command prefix for TeX| yield %| implies --tex if specified| yield %|| yield %|available themes:| yield %| #{Theme.registry.keys.sort.join(', ')}| end def self.parse(argv) opts = { :theme_name => 'thankful_eyes', :tex => false, :tex_prefix => 'RG' } until argv.empty? arg = argv.shift case arg when '--tex' opts[:tex] = true when '--tex-prefix' opts[:tex] = true opts[:tex_prefix] = argv.shift when /--(\w+)/ opts[$1.tr('-', '_').to_sym] = argv.shift else opts[:theme_name] = arg end end new(opts) end def initialize(opts) theme_name = opts.delete(:theme_name) theme_class = Theme.find(theme_name) \ or error! "unknown theme: #{theme_name}" @theme = theme_class.new(opts) if opts[:tex] tex_prefix = opts[:tex_prefix] @theme = TexThemeRenderer.new(@theme, prefix: tex_prefix) end end def run @theme.render(&method(:puts)) end end class List < CLI def self.desc "list available lexers" end def self.doc return enum_for(:doc) unless block_given? yield %|usage: rouge list| yield %|| yield %|print a list of all available lexers with their descriptions.| end def self.parse(argv) new end def run puts "== Available Lexers ==" Lexer.all.sort_by(&:tag).each do |lexer| desc = String.new("#{lexer.desc}") if lexer.aliases.any? desc << " [aliases: #{lexer.aliases.join(',')}]" end puts "%s: %s" % [lexer.tag, desc] lexer.option_docs.keys.sort.each do |option| puts " ?#{option}= #{lexer.option_docs[option]}" end puts end end end class Guess < CLI def self.desc "guess the languages of file" end def self.parse(args) new(input_file: args.shift) end attr_reader :input_file, :input_source def initialize(opts) @input_file = opts[:input_file] || '-' @input_source = FileReader.new(@input_file).read end def lexers Lexer.guesses( filename: input_file, source: input_source, ) end def run lexers.each do |l| puts "{ tag: #{l.tag.inspect}, title: #{l.title.inspect}, desc: #{l.desc.inspect} }" end end end private_class_method def self.normalize_syntax(argv) out = [] argv.each do |arg| case arg when /^(--\w+)=(.*)$/ out << $1 << $2 when /^(-\w)(.+)$/ out << $1 << $2 else out << arg end end out end end end rouge-3.28.0/lib/rouge/demos/000077500000000000000000000000001417417255300157345ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/demos/abap000066400000000000000000000002771417417255300165700ustar00rootroot00000000000000lo_obj ?= lo_obj->do_nothing( 'Char' && ` String` ). SELECT SINGLE * FROM mara INTO ls_mara WHERE matkl EQ '1324'. LOOP AT lt_mara ASSIGNING . CHECK -mtart EQ '0001'. ENDLOOP. rouge-3.28.0/lib/rouge/demos/actionscript000066400000000000000000000000761417417255300203640ustar00rootroot00000000000000function hello(name:String):void { trace("hello " + name); } rouge-3.28.0/lib/rouge/demos/ada000066400000000000000000000012011417417255300163760ustar00rootroot00000000000000with Ada.Directories; with Ada.Direct_IO; with Ada.Text_IO; procedure Extra_IO.Read_File (Name : String) is package Dirs renames Ada.Directories; package Text_IO renames Ada.Text_IO; -- Get the size of the file for a new string. Size : Natural := Natural (Dirs.Size (Name)); subtype File_String is String (1 .. Size); -- Instantiate Direct_IO for our file type. package FIO is new Ada.Direct_IO (File_String); File : FIO.File_Type; Contents : File_String; begin FIO.Open (File, FIO.In_File, Name); FIO.Read (File, Contents); FIO.Close (File); Text_IO.Put (Contents); end Extra_IO.Read_File; rouge-3.28.0/lib/rouge/demos/apache000066400000000000000000000010231417417255300170740ustar00rootroot00000000000000AddDefaultCharset UTF-8 RewriteEngine On # Serve gzipped version if available and accepted AddEncoding x-gzip .gz RewriteCond %{HTTP:Accept-Encoding} gzip RewriteCond %{REQUEST_FILENAME}.gz -f RewriteRule ^(.*)$ $1.gz [QSA,L] ForceType text/css Header append Vary Accept-Encoding ForceType application/javascript Header append Vary Accept-Encoding ForceType text/html Header append Vary Accept-Encoding rouge-3.28.0/lib/rouge/demos/apex000066400000000000000000000003301417417255300166100ustar00rootroot00000000000000public class with sharing Trigger { @Deprecated public void resolveSum(int x, int y) { System.debug('x is ' + x); System.debug('y is ' + y); System.debug('x + y = ' + (x+y)); } } rouge-3.28.0/lib/rouge/demos/apiblueprint000066400000000000000000000014171417417255300203600ustar00rootroot00000000000000FORMAT: 1A HOST: http://polls.apiblueprint.org/ # Polls Polls is a simple API allowing consumers to view polls and vote in them. # Polls API Root [/] ## Group Question Resources related to questions in the API. ## Question [/questions/{question_id}] + Parameters + question_id: 1 (number, required) - ID of the Question in form of an integer + Attributes + question: `Favourite programming language?` (required) + published_at: `2014-11-11T08:40:51.620Z` - An ISO8601 date when the question was published + choices (array[Choice], required) - An array of Choice objects + url: /questions/1 ### View a Questions Detail [GET] + Response 200 (application/json) + Attributes (Question) ### Delete a Question [DELETE] + Relation: delete + Response 204 rouge-3.28.0/lib/rouge/demos/applescript000066400000000000000000000001261417417255300202040ustar00rootroot00000000000000-- AppleScript playing with iTunes tell application "iTunes" to get current selection rouge-3.28.0/lib/rouge/demos/armasm000066400000000000000000000004141417417255300171360ustar00rootroot00000000000000 GET common.s RetVal * 0x123 :SHL: 4 AREA |Area$$Name|, CODE, READONLY MyFunction ROUT ; This is a comment ASSERT RetVal <> 0 1 MOVW r0, #RetVal BX lr END rouge-3.28.0/lib/rouge/demos/augeas000066400000000000000000000003651417417255300171300ustar00rootroot00000000000000(* This is a comment *) module Foo = autoload xfm let a = b | c . d let lns = a* let filter = incl "/path/to/file" . incl "/path/to/other_file" . Util.stdexcl (* xmf is the transform *) let xmf = transform lns filter rouge-3.28.0/lib/rouge/demos/awk000066400000000000000000000001651417417255300164430ustar00rootroot00000000000000BEGIN { # Simulate echo(1) for (i = 1; i < ARGC; i++) printf "%s ", ARGV[i] printf "\n" exit } rouge-3.28.0/lib/rouge/demos/batchfile000066400000000000000000000001711417417255300175770ustar00rootroot00000000000000@echo off setlocal enableextensions enabledelayedexpansion for /f "tokens=*" %%a in ("hello !username! hi") do echo %%~a rouge-3.28.0/lib/rouge/demos/bbcbasic000066400000000000000000000002101417417255300174000ustar00rootroot00000000000000REM > DefaultFilename REM Ordinary comment FOR n=1 TO 10 PRINTTAB(n)"Hello there ";FNnumber(n)DIV3+1 NEXT:END DEFFNnumber(x%)=ABS(x%-4) rouge-3.28.0/lib/rouge/demos/bibtex000066400000000000000000000007201417417255300171330ustar00rootroot00000000000000@article{Witten:1988hf, author = "Witten, Edward", title = "{Quantum Field Theory and the Jones Polynomial}", journal = "Commun. Math. Phys.", volume = "121", year = "1989", pages = "351-399", doi = "10.1007/BF01217730", note = "[,233(1988)]", reportNumber = "IASSNS-HEP-88-33", SLACcitation = "%%CITATION = CMPHA,121,351;%%" } rouge-3.28.0/lib/rouge/demos/biml000066400000000000000000000032021417417255300165770ustar00rootroot00000000000000<#@ template language="C#" #> <#@ import namespace="System.Data" #> EXEC usp_StoredProc <# foreach (var table in RootNode.Tables) { #> SELECT * FROM <#=table.Name#> <# } #> rouge-3.28.0/lib/rouge/demos/bpf000066400000000000000000000002271417417255300164270ustar00rootroot00000000000000r0 = *(u8 *)skb[23] *(u32 *)(r10 - 4) = r0 r1 = *(u32 *)(r6 + 4) r1 = 0 ll call 1 /* lookup */ if r0 == 0 goto +2 lock *(u64 *)(r0 + 0) += r1 rouge-3.28.0/lib/rouge/demos/brainfuck000066400000000000000000000000511417417255300176170ustar00rootroot00000000000000[ This is a sample comment. ] .[>+<-]>,rouge-3.28.0/lib/rouge/demos/brightscript000066400000000000000000000003231417417255300203610ustar00rootroot00000000000000function main(args as dynamic) as void screen = CreateObject("roSGScreen") 'Create a scene and load /components/helloworld.xml' scene = screen.CreateScene("HelloWorld") screen.show() end functionrouge-3.28.0/lib/rouge/demos/bsl000066400000000000000000000003251417417255300164370ustar00rootroot00000000000000#Область ПрограммныйИнтерфейс Процедура ПриветМир() Экспорт Сообщить("Привет мир"); КонецПроцедуры #КонецОбластиrouge-3.28.0/lib/rouge/demos/c000066400000000000000000000003101417417255300160730ustar00rootroot00000000000000#include "ruby/ruby.h" static int clone_method_i(st_data_t key, st_data_t value, st_data_t data) { clone_method((VALUE)data, (ID)key, (const rb_method_entry_t *)value); return ST_CONTINUE; } rouge-3.28.0/lib/rouge/demos/ceylon000066400000000000000000000002431417417255300171470ustar00rootroot00000000000000shared class CeylonClass() given Parameter satisfies Object { shared String name => "CeylonClass"; } shared void run() => CeylonClass(); rouge-3.28.0/lib/rouge/demos/cfscript000066400000000000000000000005451417417255300175000ustar00rootroot00000000000000component accessors="true" { property type="string" name="firstName" default=""; property string username; function init(){ return this; } public any function submitOrder( required product, coupon="", boolean results=true ){ var foo = function( required string baz, x=true, y=false ){ return "bar!"; }; return foo; } }rouge-3.28.0/lib/rouge/demos/clean000066400000000000000000000002751417417255300167450ustar00rootroot00000000000000delete :: !a !.(Set a) -> Set a | < a delete x Tip = Tip delete x (Bin _ y l r) | x < y = balanceR y (delete x l) r | x > y = balanceL y l (delete x r) | otherwise = glue l r rouge-3.28.0/lib/rouge/demos/clojure000066400000000000000000000001341417417255300173200ustar00rootroot00000000000000(defn make-adder [x] (let [y x] (fn [z] (+ y z)))) (def add2 (make-adder 2)) (add2 4) rouge-3.28.0/lib/rouge/demos/cmake000066400000000000000000000002171417417255300167370ustar00rootroot00000000000000cmake_minimum_required(VERSION 2.8.3) project(foo C) # some note add_executable(foo utils.c "foo.c") target_link_libraries(foo ${LIBRARIES}) rouge-3.28.0/lib/rouge/demos/cmhg000066400000000000000000000004201417417255300165710ustar00rootroot00000000000000; Header comments #include "definitions.h" command-keyword-table: command_handler foo(min-args:0, max-args:0,; comment international:, invalid-syntax: "syntaxtoken" help-text: "helptoken") rouge-3.28.0/lib/rouge/demos/coffeescript000066400000000000000000000001251417417255300203310ustar00rootroot00000000000000# Objects: math = root: Math.sqrt square: square cube: (x) -> x * square x rouge-3.28.0/lib/rouge/demos/common_lisp000066400000000000000000000000331417417255300201720ustar00rootroot00000000000000(defun square (x) (* x x)) rouge-3.28.0/lib/rouge/demos/conf000066400000000000000000000001101417417255300165740ustar00rootroot00000000000000# A generic configuration file option1 "val1" option2 23 option3 'val3' rouge-3.28.0/lib/rouge/demos/console000066400000000000000000000001711417417255300173200ustar00rootroot00000000000000# prints "hello, world" to the screen ~# echo Hello, World Hello, World # don't run this ~# rm -rf --no-preserve-root / rouge-3.28.0/lib/rouge/demos/coq000066400000000000000000000003561417417255300164450ustar00rootroot00000000000000Require Import Coq.Lists.List. Section with_T. Context {T : Type}. Fixpoint length (ls : list T) : nat := match ls with | nil => 0 | _ :: ls => S (length ls) end. End with_T. Definition a_string := "hello \" world".rouge-3.28.0/lib/rouge/demos/cpp000066400000000000000000000001341417417255300164370ustar00rootroot00000000000000#include using namespace std; int main() { cout << "Hello World" << endl; } rouge-3.28.0/lib/rouge/demos/crystal000066400000000000000000000013151417417255300173400ustar00rootroot00000000000000lib LibC WNOHANG = 0x00000001 @[ReturnsTwice] fun fork : PidT fun getpgid(pid : PidT) : PidT fun kill(pid : PidT, signal : Int) : Int fun getpid : PidT fun getppid : PidT fun exit(status : Int) : NoReturn ifdef x86_64 alias ClockT = UInt64 else alias ClockT = UInt32 end SC_CLK_TCK = 3 struct Tms utime : ClockT stime : ClockT cutime : ClockT cstime : ClockT end fun times(buffer : Tms*) : ClockT fun sysconf(name : Int) : Long end class Process def self.exit(status = 0) LibC.exit(status) end def self.pid LibC.getpid end def self.getpgid(pid : Int32) ret = LibC.getpgid(pid) raise Errno.new(ret) if ret < 0 ret end end rouge-3.28.0/lib/rouge/demos/csharp000066400000000000000000000002251417417255300171360ustar00rootroot00000000000000// reverse byte order (16-bit) public static UInt16 ReverseBytes(UInt16 value) { return (UInt16)((value & 0xFFU) << 8 | (value & 0xFF00U) >> 8); } rouge-3.28.0/lib/rouge/demos/css000066400000000000000000000001251417417255300164450ustar00rootroot00000000000000body { font-size: 12pt; background: #fff url(temp.png) top left no-repeat; } rouge-3.28.0/lib/rouge/demos/csvs000066400000000000000000000002661417417255300166410ustar00rootroot00000000000000version 1.1 @totalColumns 5 @separator ',' Transaction_Date: xDate Transaction_ID: notEmpty Originator_Name: notEmpty Originator_Address: any("yes","no") Originator_Country: notEmptyrouge-3.28.0/lib/rouge/demos/cuda000066400000000000000000000002661417417255300165770ustar00rootroot00000000000000#include __global__ void helloFromGPU() { std::printf("Hello World\n"); __syncthreads(); } int main() { dim3 block(1, 10); helloFromGPU<<<1, block>>>(); } rouge-3.28.0/lib/rouge/demos/cypher000066400000000000000000000003301417417255300171450ustar00rootroot00000000000000// Cypher Mode for Rouge CREATE (john:Person {name: 'John'}) MATCH (user)-[:friend]->(follower) WHERE user.name IN ['Joe', 'John', 'Sara', 'Maria', 'Steve'] AND follower.name =~ 'S.*' RETURN user.name, follower.name rouge-3.28.0/lib/rouge/demos/cython000066400000000000000000000001411417417255300171570ustar00rootroot00000000000000cdef extern from 'foo.h': int foo_int struct foo_struct: pass ctypedef int word rouge-3.28.0/lib/rouge/demos/d000066400000000000000000000007031417417255300161020ustar00rootroot00000000000000import std.algorithm, std.conv, std.functional, std.math, std.regex, std.stdio; alias round = pipe!(to!real, std.math.round, to!string); static reFloatingPoint = ctRegex!`[0-9]+\.[0-9]+`; void main() { // Replace anything that looks like a real // number with the rounded equivalent. stdin .byLine .map!(l => l.replaceAll!(c => c.hit.round) (reFloatingPoint)) .each!writeln; } rouge-3.28.0/lib/rouge/demos/dafny000066400000000000000000000003571417417255300167650ustar00rootroot00000000000000module A { const i: int := 56_78 } method m(b: bool, s: string) { var x: string; var i: int; if b then i := 1; else i := 2; i := if b 1 else 2; assert b; assume b; print s; expect b; } function f(i: int): int { i + 1 } rouge-3.28.0/lib/rouge/demos/dart000066400000000000000000000001341417417255300166070ustar00rootroot00000000000000void main() { var collection=[1,2,3,4,5]; for(var a in collection){ print(a); } } rouge-3.28.0/lib/rouge/demos/datastudio000066400000000000000000000013001417417255300200120ustar00rootroot00000000000000 Get_Variable("EUSER","ENV","USERNAME"); Message("Le Login Windows est : %EUSER%"); Get_Variable("st","JOB","FOLDER1.date_err.SYSTEM.STATUS"); AFFECT("filter1", '%%/"t"'); AFFECT("filter2", '%%/"pi"'); JSONTOSQL("%{jsonpath}%/file.json", "", " JSONPATH like '%filter1%' ", "a = JSONVALUE", " JSONPATH like '%filter2%' ", "b = JSONVALUE; output(json_data, a, b)"); Affect(VAR1,'%TEST%'); //Créer et affecter la variable VAR1 avec une chaîne select * from TABLE1 where COL1 like %VAR1%; //utiliser la variable VAR1 dans une requête select * from TEST_TABLE; //exécution d'une requête Select pour ramener des valeurs Affect_LastColumns("TEST1"); //création du paramètre TEST1 rouge-3.28.0/lib/rouge/demos/diff000066400000000000000000000002101417417255300165600ustar00rootroot00000000000000--- file1 2012-10-16 15:07:58.086886874 +0100 +++ file2 2012-10-16 15:08:07.642887236 +0100 @@ -1,3 +1,3 @@ a b c -d e f +D E F g h i rouge-3.28.0/lib/rouge/demos/digdag000066400000000000000000000005471417417255300171040ustar00rootroot00000000000000# this is digdag task definitions timezone: UTC +setup: echo>: start ${session_time} +disp_current_date: echo>: ${moment(session_time).utc().format('YYYY-MM-DD HH:mm:ss Z')} +repeat: for_each>: order: [first, second, third] animal: [dog, cat] _do: echo>: ${order} ${animal} _parallel: true +teardown: echo>: finish ${session_time} rouge-3.28.0/lib/rouge/demos/docker000066400000000000000000000001741417417255300171300ustar00rootroot00000000000000maintainer First O'Last run echo \ 123 $bar # comment onbuild add . /app/src onbuild run echo \ 123 $bar CMD /bin/bash rouge-3.28.0/lib/rouge/demos/dot000066400000000000000000000001251417417255300164430ustar00rootroot00000000000000// The graph name and the semicolons are optional graph G { a -- b -- c; b -- d; } rouge-3.28.0/lib/rouge/demos/ecl000066400000000000000000000005611417417255300164240ustar00rootroot00000000000000/* Example code - use without restriction. */ Layout_Person := RECORD UNSIGNED1 PersonID; STRING15 FirstName; STRING25 LastName; END; allPeople := DATASET([ {1,'Fred','Smith'}, {2,'Joe','Blow'}, {3,'Jane','Smith'}],Layout_Person); somePeople := allPeople(LastName = 'Smith'); // Outputs --- somePeople; rouge-3.28.0/lib/rouge/demos/eex000066400000000000000000000000351417417255300164360ustar00rootroot00000000000000<%= @title %> rouge-3.28.0/lib/rouge/demos/eiffel000066400000000000000000000006271417417255300171160ustar00rootroot00000000000000note description: "Represents a person." class PERSON create make, make_unknown feature {NONE} -- Creation make (a_name: like name) -- Create a person with `a_name' as `name'. do name := a_name ensure name = a_name end make_unknown do ensure name = Void end feature -- Access name: detachable STRING -- Full name or Void if unknown. end rouge-3.28.0/lib/rouge/demos/elixir000066400000000000000000000000461417417255300171530ustar00rootroot00000000000000Enum.map([1,2,3], fn(x) -> x * 2 end) rouge-3.28.0/lib/rouge/demos/elm000066400000000000000000000000731417417255300164340ustar00rootroot00000000000000import Html exposing (text) main = text "Hello, World!" rouge-3.28.0/lib/rouge/demos/email000066400000000000000000000003661417417255300167530ustar00rootroot00000000000000From: Me To: You Date: Tue, 21 Jul 2020 15:14:03 +0000 Subject: A very important message > Please investigate. Thank you. I have investigated. -- This message is highly confidential and will self-destruct. rouge-3.28.0/lib/rouge/demos/epp000066400000000000000000000001061417417255300164400ustar00rootroot00000000000000<%- | Optional[String] $title, | -%> <%= $title %> rouge-3.28.0/lib/rouge/demos/erb000066400000000000000000000000351417417255300164250ustar00rootroot00000000000000<%= @title %> rouge-3.28.0/lib/rouge/demos/erlang000066400000000000000000000002761417417255300171340ustar00rootroot00000000000000%%% Geometry module. -module(geometry). -export([area/1]). %% Compute rectangle and circle area. area({rectangle, Width, Ht}) -> Width * Ht; area({circle, R}) -> 3.14159 * R * R.rouge-3.28.0/lib/rouge/demos/escape000066400000000000000000000003131417417255300171140ustar00rootroot00000000000000If Formatter.enable_escape! is called, this allows escaping into html or the parent format with a special delimiter. For example: !>underlined text!!> rouge-3.28.0/lib/rouge/demos/factor000066400000000000000000000001531417417255300171340ustar00rootroot00000000000000USING: io kernel sequences ; 4 iota [ "Happy Birthday " write 2 = "dear NAME" "to You" ? print ] each rouge-3.28.0/lib/rouge/demos/fluent000066400000000000000000000005171417417255300171570ustar00rootroot00000000000000# Simple things are simple. hello-user = Hello, {$userName}! # Complex things are possible. shared-photos = {$userName} {$photoCount -> [one] added a new photo *[other] added {$photoCount} new photos } to {$userGender -> [male] his stream [female] her stream *[other] their stream }. rouge-3.28.0/lib/rouge/demos/fortran000066400000000000000000000010201417417255300173230ustar00rootroot00000000000000program bottles implicit none integer :: nbottles do nbottles = 99, 1, -1 call print_bottles(nbottles) end do contains subroutine print_bottles(n) implicit none integer, intent(in) :: n write(*, "(I0, 1X, 'bottles of beer on the wall,')") n write(*, "(I0, 1X, 'bottles of beer.')") n write(*, "('Take one down, pass it around,')") write(*, "(I0, 1X, 'bottles of beer on the wall.', /)") n - 1 end subroutine print_bottles end program bottles rouge-3.28.0/lib/rouge/demos/freefem000066400000000000000000000003331417417255300172670ustar00rootroot00000000000000include "MUMPS" // Parameters func f = 1.; // Mesh int nn = 25; //Mesh quality mesh Th = square(nn, nn); // Fespace func Pk = P2; fespace Uh(Th, Pk); Uh u; // Plot plot(u, nbiso=30, fill=true, value=true, cmm="A"); rouge-3.28.0/lib/rouge/demos/fsharp000066400000000000000000000004741417417255300171470ustar00rootroot00000000000000(* Binary tree with leaves car­rying an integer. *) type Tree = Leaf of int | Node of Tree * Tree let rec existsLeaf test tree = match tree with | Leaf v -> test v | Node (left, right) -> existsLeaf test left || existsLeaf test right let hasEvenLeaf tree = existsLeaf (fun n -> n % 2 = 0) treerouge-3.28.0/lib/rouge/demos/gdscript000066400000000000000000000003631417417255300175000ustar00rootroot00000000000000extends Node # Variables & Built-in Types var a = 5 var b = true var s = "Hello" var arr = [1, 2, 3] # Constants & Enums const ANSWER = 42 enum { UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALLY } # Functions func _ready(): print("Hello, World") rouge-3.28.0/lib/rouge/demos/ghc-cmm000066400000000000000000000014441417417255300171750ustar00rootroot00000000000000[lvl_s4t3_entry() // [R1] { info_tbls: [(c4uB, label: lvl_s4t3_info rep: HeapRep 1 ptrs { Thunk } srt: Nothing)] stack_info: arg_space: 8 updfr_space: Just 8 } {offset c4uB: // global if ((Sp + -32) < SpLim) (likely: False) goto c4uC; else goto c4uD; c4uC: // global R1 = R1; call (stg_gc_enter_1)(R1) args: 8, res: 0, upd: 8; c4uD: // global I64[Sp - 16] = stg_upd_frame_info; P64[Sp - 8] = R1; R2 = P64[R1 + 16]; I64[Sp - 32] = stg_ap_p_info; P64[Sp - 24] = Main.fib3_closure+1; Sp = Sp - 32; call GHC.Num.fromInteger_info(R2) args: 40, res: 0, upd: 24; } } rouge-3.28.0/lib/rouge/demos/ghc-core000066400000000000000000000016031417417255300173460ustar00rootroot00000000000000Rec { -- RHS size: {terms: 24, types: 3, coercions: 0, joins: 0/0} Main.fib_fib [Occ=LoopBreaker] :: Integer -> Integer [GblId, Arity=1, Str=, Unf=OtherCon []] Main.fib_fib = \ (ds_d2OU :: Integer) -> case integer-gmp-1.0.2.0:GHC.Integer.Type.eqInteger# ds_d2OU Main.fib1 of { __DEFAULT -> case integer-gmp-1.0.2.0:GHC.Integer.Type.eqInteger# ds_d2OU Main.fib3 of { __DEFAULT -> integer-gmp-1.0.2.0:GHC.Integer.Type.plusInteger (Main.fib_fib (integer-gmp-1.0.2.0:GHC.Integer.Type.minusInteger ds_d2OU Main.fib3)) (Main.fib_fib (integer-gmp-1.0.2.0:GHC.Integer.Type.minusInteger ds_d2OU Main.fib2)); 1# -> Main.fib3 }; 1# -> Main.fib1 } end Rec } rouge-3.28.0/lib/rouge/demos/gherkin000066400000000000000000000010721417417255300173060ustar00rootroot00000000000000# language: en Feature: Addition In order to avoid silly mistakes As someone who has trouble with mental math I want to be told the sum of two numbers Scenario Outline: Add two numbers Given I have entered into the calculator And I have entered into the calculator When I press } } rouge-3.28.0/lib/rouge/demos/robot_framework000066400000000000000000000020131417417255300210550ustar00rootroot00000000000000*** Settings *** Document Example taken from http://robotframework.org/ Suite Setup Open Browser To Login Page Suite Teardown Close Browser Test Setup Go To Login Page Test Template Login With Invalid Credentials Should Fail Resource resource.txt *** Test Cases *** User Name Password Invalid Username invalid ${VALID PASSWORD} Invalid Password ${VALID USER} invalid Invalid Username And Password invalid whatever Empty Username ${EMPTY} ${VALID PASSWORD} Empty Password ${VALID USER} ${EMPTY} Empty Username And Password ${EMPTY} ${EMPTY} *** Keywords *** Login With Invalid Credentials Should Fail [Arguments] ${username} ${password} Input Username ${username} Input Password ${password} Submit Credentials Login Should Have Failed Login Should Have Failed Location Should Be ${ERROR URL} Title Should Be Error Page rouge-3.28.0/lib/rouge/demos/ruby000066400000000000000000000001641417417255300166410ustar00rootroot00000000000000class Greeter def initialize(name="World") @name = name end def say_hi puts "Hi #{@name}!" end end rouge-3.28.0/lib/rouge/demos/rust000066400000000000000000000004261417417255300166560ustar00rootroot00000000000000use core::*; fn main() { for ["Alice", "Bob", "Carol"].each |&name| { do task::spawn { let v = rand::Rng().shuffle([1, 2, 3]); for v.each |&num| { io::print(fmt!("%s says: '%d'\n", name, num)) } } } } rouge-3.28.0/lib/rouge/demos/sas000066400000000000000000000003541417417255300164470ustar00rootroot00000000000000data sim; do i = 1 to 100; x1 = rand("Normal"); x2 = rand("Binomial", 0.5, 100); output; end; run; proc means data=sashelp.class; class sex; var height weight; output out = mean_by_sex; run; rouge-3.28.0/lib/rouge/demos/sass000066400000000000000000000000731417417255300166300ustar00rootroot00000000000000@for $i from 1 through 3 .item-#{$i} width: 2em * $i rouge-3.28.0/lib/rouge/demos/scala000066400000000000000000000001301417417255300167340ustar00rootroot00000000000000class Greeter(name: String = "World") { def sayHi() { println("Hi " + name + "!") } } rouge-3.28.0/lib/rouge/demos/scheme000066400000000000000000000001651417417255300171250ustar00rootroot00000000000000(define Y (lambda (m) ((lambda (f) (m (lambda (a) ((f f) a)))) (lambda (f) (m (lambda (a) ((f f) a))))))) rouge-3.28.0/lib/rouge/demos/scss000066400000000000000000000001061417417255300166270ustar00rootroot00000000000000@for $i from 1 through 3 { .item-#{$i} { width: 2em * $i; } } rouge-3.28.0/lib/rouge/demos/sed000066400000000000000000000001261417417255300164310ustar00rootroot00000000000000/begin/,/end/ { /begin/n # skip over the line that has "begin" on it s/old/new/ } rouge-3.28.0/lib/rouge/demos/shell000066400000000000000000000001141417417255300167620ustar00rootroot00000000000000# If not running interactively, don't do anything [[ -z "$PS1" ]] && return rouge-3.28.0/lib/rouge/demos/sieve000066400000000000000000000003011417417255300167640ustar00rootroot00000000000000require "fileinto"; require "imap4flags"; if header :is "X-Spam" "Yes" { fileinto "Junk"; setflag "\\seen"; stop; } /* Other messages get filed into Inbox or to user's scripts */ rouge-3.28.0/lib/rouge/demos/slice000066400000000000000000000003211417417255300167520ustar00rootroot00000000000000// Printer.ice module Demo { interface Printer { // A client can invoke this operation on a server. // In this example we print the string s void printString(string s); } } rouge-3.28.0/lib/rouge/demos/slim000066400000000000000000000005641417417255300166300ustar00rootroot00000000000000doctype html html body h1 Markup examples #content p | Slim can have #{ruby_code} interpolated! /[if IE] javascript: alert('Slim supports embedded javascript!') - unless items.empty? table - for item in items do tr td.name = item.name td.price = item.price rouge-3.28.0/lib/rouge/demos/smalltalk000066400000000000000000000002351417417255300176430ustar00rootroot00000000000000quadMultiply: i1 and: i2 "This method multiplies the given numbers by each other and the result by 4." | mul | mul := i1 * i2. ^mul * 4 rouge-3.28.0/lib/rouge/demos/smarty000066400000000000000000000004001417417255300171700ustar00rootroot00000000000000{foo bar='single quotes' baz="double quotes" test3=$test3}
    {foreach from=$myvariable item=data}
  • {$data.field}
  • {foreachelse}
  • No Data
  • {/foreach}
{$foo.bar.baz}
rouge-3.28.0/lib/rouge/demos/sml000066400000000000000000000003161417417255300164520ustar00rootroot00000000000000datatype shape = Circle of loc * real (* center and radius *) | Square of loc * real (* upper-left corner and side length; axis-aligned *) | Triangle of loc * loc * loc (* corners *) rouge-3.28.0/lib/rouge/demos/solidity000066400000000000000000000004611417417255300175200ustar00rootroot00000000000000pragma solidity ~0.4.15; interface IMirror { function reflect() external payable returns(bool /* ain't I pretty?.. */); } contract Mirror is IMirror { event logMessage(address indexed sender, uint256 value, uint256 gas, bytes data); function () { // no funny stuff revert(); } } rouge-3.28.0/lib/rouge/demos/sparql000066400000000000000000000002201417417255300171530ustar00rootroot00000000000000SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q146. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } rouge-3.28.0/lib/rouge/demos/sqf000066400000000000000000000005661417417255300164570ustar00rootroot00000000000000// Creates a dot marker at the given position #include "script_component.hpp" params ["_pos", "_txt"]; if (isNil QGVAR(markerID)) then { GVAR(markerID) = 0; }; _markerstr = createMarker [QGVAR(marker) + str GVAR(markerID), _pos]; _markerstr setMarkerShape "ICON"; _markerstr setMarkerType "hd_dot"; _markerstr setMarkerText _txt; GVAR(markerID) = GVAR(markerID) + 1; rouge-3.28.0/lib/rouge/demos/sql000066400000000000000000000000541417417255300164550ustar00rootroot00000000000000SELECT * FROM `users` WHERE `user`.`id` = 1 rouge-3.28.0/lib/rouge/demos/ssh000066400000000000000000000001021417417255300164450ustar00rootroot00000000000000Host example Hostname example.com User user Port 1234 rouge-3.28.0/lib/rouge/demos/stan000066400000000000000000000002531417417255300166240ustar00rootroot00000000000000data { int N; vector[N] x; vector[N] y; } parameters { real alpha; real beta; real sigma; } model { y ~ normal(alpha + beta * x, sigma); } rouge-3.28.0/lib/rouge/demos/stata000066400000000000000000000004751417417255300170010ustar00rootroot00000000000000* Run a series of linear regressions sysuse auto, clear foreach v of varlist mpg weight-turn { regress price `v', robust } regress price i.foreign local num_obs = e(N) global myglobal = 4 * Generate and manipulate variables generate newvar1 = "string" generate newvar2 = 34 - `num_obs' replace newvar2 = $myglobal rouge-3.28.0/lib/rouge/demos/supercollider000066400000000000000000000005211417417255300205310ustar00rootroot00000000000000// modulate a sine frequency and a noise amplitude with another sine // whose frequency depends on the horizontal mouse pointer position ~myFunction = { var x = SinOsc.ar(MouseX.kr(1, 100)); SinOsc.ar(300 * x + 800, 0, 0.1) + PinkNoise.ar(0.1 * x + 0.1) }; ~myFunction.play; "that's all, folks!".postln; rouge-3.28.0/lib/rouge/demos/swift000066400000000000000000000002131417417255300170070ustar00rootroot00000000000000// Say hello to poeple func sayHello(personName: String) -> String { let greeting = "Hello, " + personName + "!" return greeting } rouge-3.28.0/lib/rouge/demos/systemd000066400000000000000000000001251417417255300173450ustar00rootroot00000000000000[Unit] Description=Snap Daemon Requires=snapd.socket OnFailure=snapd.failure.service rouge-3.28.0/lib/rouge/demos/tap000066400000000000000000000002371417417255300164450ustar00rootroot00000000000000ok 1 - Input file opened not ok 2 - First line of the input valid ok 3 - Read the rest of the file not ok 4 - Summarized correctly # TODO Not written yet 1..4 rouge-3.28.0/lib/rouge/demos/tcl000066400000000000000000000000611417417255300164360ustar00rootroot00000000000000proc cross_sum {s} {expr [join [split $s ""] +]} rouge-3.28.0/lib/rouge/demos/terraform000066400000000000000000000006231417417255300176610ustar00rootroot00000000000000resource "aws_elb" "web" { name = "terraform-example-elb" # The same availability zone as our instances availability_zones = ["${aws_instance.web.*.availability_zone}"] listener { instance_port = 80 instance_protocol = "http" lb_port = 80 lb_protocol = "http" } # The instances are registered automatically instances = ["${aws_instance.web.*.id}"] } rouge-3.28.0/lib/rouge/demos/tex000066400000000000000000000000571417417255300164610ustar00rootroot00000000000000To write \LaTeX\ you would type \verb:\LaTeX:. rouge-3.28.0/lib/rouge/demos/toml000066400000000000000000000003521417417255300166320ustar00rootroot00000000000000# This is a TOML document. Boom. title = "TOML Example" [owner] name = "Tom Preston-Werner" organization = "GitHub" bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." dob = 1979-05-27T07:32:00Z # First class dates? Why not? rouge-3.28.0/lib/rouge/demos/tsx000066400000000000000000000005651417417255300165030ustar00rootroot00000000000000class HelloWorld extends React.Component<{date: Date}, void> { render() { return (

Hello, ! It is {this.props.date.toTimeString()}

); } } setInterval(function() { ReactDOM.render( , document.getElementById('example') ); }, 500); rouge-3.28.0/lib/rouge/demos/ttcn3000066400000000000000000000002761417417255300167170ustar00rootroot00000000000000module DNSTester { type integer Identification( 0..65535 ); // 16-bit integer type enumerated MessageKind {e_Question, e_Answer}; type charstring Question; type charstring Answer; } rouge-3.28.0/lib/rouge/demos/tulip000066400000000000000000000003751417417255300170210ustar00rootroot00000000000000@module ref ref value = Ref (spawn [ ! => loop value ]) loop value = receive [ .set new-value => loop new-value p, id, .get => { send p (id, value); loop value } ] @object Ref pid [ set val = .set val > send pid get! = .get > send-wait pid ] rouge-3.28.0/lib/rouge/demos/turtle000066400000000000000000000015561417417255300172050ustar00rootroot00000000000000@prefix xsd: @prefix dcat: . @prefix dcterms: . @prefix foaf: . @base . PREFIX test: PrEfIx insensitive: GRAPH { a dcat:Dataset ; #-----Mandatory-----# dcterms:title 'Test title'@cs, "Test title"@en ; dcterms:description """Multiline string"""@cs, '''Another multiline string '''@en ; #-----Recommended-----# dcat:contactPoint [ a foaf:Person ] ; test:list ( 1 1.1 +1 -1 1.2E+4 "Test" "\"Quote\"" ) ; test:datatype "2016-07-20"^^xsd:date ; test:text """next multiline"""; . } rouge-3.28.0/lib/rouge/demos/twig000066400000000000000000000002321417417255300166260ustar00rootroot00000000000000{% include 'header.html' %} {% for user in users %} * {{ user.name }} {% else %} No users have been found. {% endfor %} {% include 'footer.html' %} rouge-3.28.0/lib/rouge/demos/typescript000066400000000000000000000000641417417255300200650ustar00rootroot00000000000000$(document).ready(function() { alert('ready!'); }); rouge-3.28.0/lib/rouge/demos/vala000066400000000000000000000002311417417255300165760ustar00rootroot00000000000000class Demo.HelloWorld : GLib.Object { public static int main (String[] args) { stdout.printf("Hello World\n"); return 0; } } rouge-3.28.0/lib/rouge/demos/vb000066400000000000000000000001701417417255300162640ustar00rootroot00000000000000Private Sub Form_Load() ' Execute a simple message box that says "Hello, World!" MsgBox "Hello, World!" End Sub rouge-3.28.0/lib/rouge/demos/vcl000066400000000000000000000003521417417255300164430ustar00rootroot00000000000000vcl 4.0; backend server1 { .host = "server1.example.com"; .probe = { .url = "/"; .timeout = 1s; .interval = 5s; .window = 5; .threshold = 3; } } rouge-3.28.0/lib/rouge/demos/velocity000066400000000000000000000003051417417255300175130ustar00rootroot00000000000000#* There is multi-line comment. see this text because the Velocity Templating Engine will ignore it. *#

List

## This is a single line comment. #if( $allProducts )

not found.

#end rouge-3.28.0/lib/rouge/demos/verilog000066400000000000000000000006441417417255300173320ustar00rootroot00000000000000/** * Verilog Lexer */ module Foo( input logic Clk_CI, input logic Rst_RBI, input logic A, input logic B, output logic C ); logic C_DN, C_DP; assign C = C_DP; always_comb begin : proc_next_state C_DN = A + B; end // Clocked process always_ff @(posedge Clk_CI, negedge Rst_RBI) begin if(~Rst_RBI) begin C_DP <= 1'b0; end else begin C_DP <= C_DN; end end endmodule rouge-3.28.0/lib/rouge/demos/vhdl000066400000000000000000000006211417417255300166130ustar00rootroot00000000000000entity toggle_demo is port ( clk_in : in std_logic; -- System Clock data_q : out std_logic -- Toggling Port ); end entity toggle_demo; architecture RTL of toggle_demo is signal data : std_logic := '0'; begin data_q <= data; data_proc : process (clk_in) begin if (rising_edge(clk_in)) then data <= not data; end if; end process; end architecture RTL; rouge-3.28.0/lib/rouge/demos/viml000066400000000000000000000010461417417255300166270ustar00rootroot00000000000000function! s:Make(dir, make, format, name) abort let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd' : 'cd' let cwd = getcwd() let [mp, efm, cc] = [&l:mp, &l:efm, get(b:, 'current_compiler', '')] try execute cd fnameescape(dir) let [&l:mp, &l:efm, b:current_compiler] = [a:make, a:format, a:compiler] execute (exists(':Make') == 2 ? 'Make' : 'make') finally let [&l:mp, &l:efm, b:current_compiler] = [mp, efm, cc] if empty(cc) | unlet! b:current_compiler | endif execute cd fnameescape(cwd) endtry endfunction rouge-3.28.0/lib/rouge/demos/vue000066400000000000000000000002461417417255300164600ustar00rootroot00000000000000 rouge-3.28.0/lib/rouge/demos/wollok000066400000000000000000000002501417417255300171630ustar00rootroot00000000000000object pepita { var energy = 100 method energy() = energy method fly(kilometers) { energy -= kilometers + 10 } method sayHi() = "Coo!" } rouge-3.28.0/lib/rouge/demos/xml000066400000000000000000000001171417417255300164560ustar00rootroot00000000000000 rouge-3.28.0/lib/rouge/demos/xojo000066400000000000000000000006341417417255300166410ustar00rootroot00000000000000Dim f As FolderItem f = GetOpenFolderItem(FileTypes1.jpeg) // defined in the File Type Set editor rem - we should check for nil! If not f.Exists Then Beep 'Just for fun MsgBox("The file " + f.NativePath + "doesn't ""exist.""") Else // document exists ImageWell1.image=Picture.Open(f) End If if f isa folderitem then msgbox(f.name) end if Exception err As NilObjectException MsgBox("Invalid pathname!") rouge-3.28.0/lib/rouge/demos/xpath000066400000000000000000000002131417417255300167770ustar00rootroot00000000000000(: Authors named Bob Joe who didn't graduate from Harvard :) //author[first-name = "Joe" and last-name = "Bob"][degree/@from != "Harvard"] rouge-3.28.0/lib/rouge/demos/xquery000066400000000000000000000010761417417255300172200ustar00rootroot00000000000000declare namespace html = "http://www.w3.org/1999/xhtml"; declare function local:test-function($catalog as document-node()) { XQuery example for the Rouge highlighter

List

    {for $product in $catalog/items/product[@sell-by > current-date()] return
    • {data($product/name)}
    • {$product/price * (1 + $product/tax)}$
  • }
}; rouge-3.28.0/lib/rouge/demos/yaml000066400000000000000000000000711417417255300166170ustar00rootroot00000000000000--- one: Mark McGwire two: Sammy Sosa three: Ken Griffey rouge-3.28.0/lib/rouge/demos/yang000066400000000000000000000004611417417255300166160ustar00rootroot00000000000000module petstore { namespace "http://autlan.dt/gribok/yang/example"; prefix ex; revision 2020-04-01 { description "Example yang"; } container pets { list dogs { key name; leaf name { type string; } } } } rouge-3.28.0/lib/rouge/demos/zig000066400000000000000000000001621417417255300164470ustar00rootroot00000000000000const std = @import("std"); const warn = std.debug.warn; fn add_floats(x: f16, y: f16) f16 { return x + y; } rouge-3.28.0/lib/rouge/formatter.rb000066400000000000000000000046731417417255300171670ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge # A Formatter takes a token stream and formats it for human viewing. class Formatter # @private REGISTRY = {} # Specify or get the unique tag for this formatter. This is used # for specifying a formatter in `rougify`. def self.tag(tag=nil) return @tag unless tag REGISTRY[tag] = self @tag = tag end # Find a formatter class given a unique tag. def self.find(tag) REGISTRY[tag] end def self.with_escape Thread.current[:'rouge/with-escape'] = true yield ensure Thread.current[:'rouge/with-escape'] = false end def self.escape_enabled? !!(((defined? @escape_enabled) && @escape_enabled) || Thread.current[:'rouge/with-escape']) end def self.enable_escape! @escape_enabled = true end def self.disable_escape! @escape_enabled = false Thread.current[:'rouge/with-escape'] = false end # Format a token stream. Delegates to {#format}. def self.format(tokens, *args, **kwargs, &b) new(*args, **kwargs).format(tokens, &b) end def initialize(opts={}) # pass end def escape?(tok) tok == Token::Tokens::Escape end def filter_escapes(tokens) tokens.each do |t, v| if t == Token::Tokens::Escape yield Token::Tokens::Error, v else yield t, v end end end # Format a token stream. def format(tokens, &b) tokens = enum_for(:filter_escapes, tokens) unless Formatter.escape_enabled? return stream(tokens, &b) if block_given? out = String.new('') stream(tokens) { |piece| out << piece } out end # @deprecated Use {#format} instead. def render(tokens) warn 'Formatter#render is deprecated, use #format instead.' format(tokens) end # @abstract # yield strings that, when concatenated, form the formatted output def stream(tokens, &b) raise 'abstract' end protected def token_lines(tokens, &b) return enum_for(:token_lines, tokens) unless block_given? out = [] tokens.each do |tok, val| val.scan %r/\n|[^\n]+/ do |s| if s == "\n" yield out out = [] else out << [tok, s] end end end # for inputs not ending in a newline yield out if out.any? end end end rouge-3.28.0/lib/rouge/formatters/000077500000000000000000000000001417417255300170135ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/formatters/html.rb000066400000000000000000000030501417417255300203020ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Formatters # Transforms a token stream into HTML output. class HTML < Formatter tag 'html' # @yield the html output. def stream(tokens, &b) tokens.each { |tok, val| yield span(tok, val) } end def span(tok, val) return val if escape?(tok) safe_span(tok, escape_special_html_chars(val)) end def safe_span(tok, safe_val) if tok == Token::Tokens::Text safe_val else shortname = tok.shortname \ or raise "unknown token: #{tok.inspect} for #{safe_val.inspect}" "#{safe_val}" end end TABLE_FOR_ESCAPE_HTML = { '&' => '&', '<' => '<', '>' => '>', } private # A performance-oriented helper method to escape `&`, `<` and `>` for the rendered # HTML from this formatter. # # `String#gsub` will always return a new string instance irrespective of whether # a substitution occurs. This method however invokes `String#gsub` only if # a substitution is imminent. # # Returns either the given `value` argument string as is or a new string with the # special characters replaced with their escaped counterparts. def escape_special_html_chars(value) escape_regex = /[&<>]/ return value unless value =~ escape_regex value.gsub(escape_regex, TABLE_FOR_ESCAPE_HTML) end end end end rouge-3.28.0/lib/rouge/formatters/html_inline.rb000066400000000000000000000013501417417255300216410ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Formatters class HTMLInline < HTML tag 'html_inline' def initialize(theme) if theme.is_a?(Class) && theme < Rouge::Theme @theme = theme.new elsif theme.is_a?(Rouge::Theme) @theme = theme elsif theme.is_a?(String) @theme = Rouge::Theme.find(theme).new else raise ArgumentError, "invalid theme: #{theme.inspect}" end end def safe_span(tok, safe_val) return safe_val if tok == Token::Tokens::Text rules = @theme.style_for(tok).rendered_rules "#{safe_val}" end end end end rouge-3.28.0/lib/rouge/formatters/html_legacy.rb000066400000000000000000000026051417417255300216330ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # stdlib require 'cgi' module Rouge module Formatters # Transforms a token stream into HTML output. class HTMLLegacy < Formatter tag 'html_legacy' # @option opts [String] :css_class ('highlight') # @option opts [true/false] :line_numbers (false) # @option opts [Rouge::CSSTheme] :inline_theme (nil) # @option opts [true/false] :wrap (true) # # Initialize with options. # # If `:inline_theme` is given, then instead of rendering the # tokens as tags with CSS classes, the styles according to # the given theme will be inlined in "style" attributes. This is # useful for formats in which stylesheets are not available. # # Content will be wrapped in a tag (`div` if tableized, `pre` if # not) with the given `:css_class` unless `:wrap` is set to `false`. def initialize(opts={}) @formatter = opts[:inline_theme] ? HTMLInline.new(opts[:inline_theme]) : HTML.new @formatter = HTMLTable.new(@formatter, opts) if opts[:line_numbers] if opts.fetch(:wrap, true) @formatter = HTMLPygments.new(@formatter, opts.fetch(:css_class, 'codehilite')) end end # @yield the html output. def stream(tokens, &b) @formatter.stream(tokens, &b) end end end end rouge-3.28.0/lib/rouge/formatters/html_line_highlighter.rb000066400000000000000000000012701417417255300236710ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Formatters class HTMLLineHighlighter < Formatter tag 'html_line_highlighter' def initialize(delegate, opts = {}) @delegate = delegate @highlight_line_class = opts.fetch(:highlight_line_class, 'hll') @highlight_lines = opts[:highlight_lines] || [] end def stream(tokens) token_lines(tokens).with_index(1) do |line_tokens, lineno| line = %(#{@delegate.format(line_tokens)}\n) line = %(#{line}) if @highlight_lines.include? lineno yield line end end end end end rouge-3.28.0/lib/rouge/formatters/html_line_table.rb000066400000000000000000000044341417417255300224670ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Formatters class HTMLLineTable < Formatter tag 'html_line_table' # @param [Rouge::Formatters::Formatter] formatter An instance of a # `Rouge::Formatters::HTML` or `Rouge::Formatters::HTMLInline` # @param [Hash] opts options for HTMLLineTable instance. # @option opts [Integer] :start_line line number to start from. Defaults to `1`. # @option opts [String] :table_class Class name for the table. # Defaults to `"rouge-line-table"`. # @option opts [String] :line_id a `sprintf` template for generating an `id` # attribute for each table row corresponding to current line number. # Defaults to `"line-%i"`. # @option opts [String] :line_class Class name for each table row. # Defaults to `"lineno"`. # @option opts [String] :gutter_class Class name for rendered line-number cell. # Defaults to `"rouge-gutter"`. # @option opts [String] :code_class Class name for rendered code cell. # Defaults to `"rouge-code"`. def initialize(formatter, opts={}) @formatter = formatter @start_line = opts.fetch :start_line, 1 @table_class = opts.fetch :table_class, 'rouge-line-table' @gutter_class = opts.fetch :gutter_class, 'rouge-gutter' @code_class = opts.fetch :code_class, 'rouge-code' @line_class = opts.fetch :line_class, 'lineno' @line_id = opts.fetch :line_id, 'line-%i' end def stream(tokens, &b) buffer = [%()] token_lines(tokens).with_index(@start_line) do |line_tokens, lineno| buffer << %() buffer << %() buffer << %(" end buffer << %(
) buffer << %(
#{lineno}
)
          @formatter.stream(line_tokens) { |formatted| buffer << formatted }
          buffer << "\n
) yield buffer.join end end end end rouge-3.28.0/lib/rouge/formatters/html_linewise.rb000066400000000000000000000011671417417255300222100ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Formatters class HTMLLinewise < Formatter def initialize(formatter, opts={}) @formatter = formatter @tag_name = opts.fetch(:tag_name, 'div') @class_format = opts.fetch(:class, 'line-%i') end def stream(tokens, &b) token_lines(tokens).with_index(1) do |line_tokens, lineno| yield %(<#{@tag_name} class="#{sprintf @class_format, lineno}">) @formatter.stream(line_tokens) {|formatted| yield formatted } yield %(\n) end end end end end rouge-3.28.0/lib/rouge/formatters/html_pygments.rb000066400000000000000000000006411417417255300222330ustar00rootroot00000000000000# frozen_string_literal: true module Rouge module Formatters class HTMLPygments < Formatter def initialize(inner, css_class='codehilite') @inner = inner @css_class = css_class end def stream(tokens, &b) yield %(
)
        @inner.stream(tokens, &b)
        yield "
" end end end end rouge-3.28.0/lib/rouge/formatters/html_table.rb000066400000000000000000000032271417417255300214570ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Formatters class HTMLTable < Formatter tag 'html_table' def initialize(inner, opts={}) @inner = inner @start_line = opts.fetch(:start_line, 1) @line_format = opts.fetch(:line_format, '%i') @table_class = opts.fetch(:table_class, 'rouge-table') @gutter_class = opts.fetch(:gutter_class, 'rouge-gutter') @code_class = opts.fetch(:code_class, 'rouge-code') end def style(scope) yield %(#{scope} .rouge-table { border-spacing: 0 }) yield %(#{scope} .rouge-gutter { text-align: right }) end def stream(tokens, &b) last_val = nil num_lines = tokens.reduce(0) {|count, (_, val)| count + (last_val = val).count(?\n) } formatted = @inner.format(tokens) unless last_val && last_val.end_with?(?\n) num_lines += 1 formatted << ?\n end # generate a string of newline-separated line numbers for the gutter> formatted_line_numbers = (@start_line..(@start_line + num_lines - 1)).map do |i| sprintf(@line_format, i) end.join(?\n) << ?\n buffer = [%()] # the "gl" class applies the style for Generic.Lineno buffer << %(' buffer << %(' buffer << '
) buffer << %(
#{formatted_line_numbers}
) buffer << '
)
        buffer << formatted
        buffer << '
' yield buffer.join end end end end rouge-3.28.0/lib/rouge/formatters/null.rb000066400000000000000000000005551417417255300203170ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Formatters # A formatter which renders nothing. class Null < Formatter tag 'null' def initialize(*) end def stream(tokens, &b) tokens.each do |tok, val| yield "#{tok.qualname} #{val.inspect}\n" end end end end end rouge-3.28.0/lib/rouge/formatters/terminal256.rb000066400000000000000000000123671417417255300214210ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Formatters # A formatter for 256-color terminals class Terminal256 < Formatter tag 'terminal256' # @private attr_reader :theme # @param [Hash,Rouge::Theme] theme # the theme to render with. def initialize(theme = Themes::ThankfulEyes.new) if theme.is_a?(Rouge::Theme) @theme = theme elsif theme.is_a?(Hash) @theme = theme[:theme] || Themes::ThankfulEyes.new else raise ArgumentError, "invalid theme: #{theme.inspect}" end end def stream(tokens, &b) tokens.each do |tok, val| escape_sequence(tok).stream_value(val, &b) end end class EscapeSequence attr_reader :style def initialize(style) @style = style end def self.xterm_colors @xterm_colors ||= [].tap do |out| # colors 0..15: 16 basic colors out << [0x00, 0x00, 0x00] # 0 out << [0xcd, 0x00, 0x00] # 1 out << [0x00, 0xcd, 0x00] # 2 out << [0xcd, 0xcd, 0x00] # 3 out << [0x00, 0x00, 0xee] # 4 out << [0xcd, 0x00, 0xcd] # 5 out << [0x00, 0xcd, 0xcd] # 6 out << [0xe5, 0xe5, 0xe5] # 7 out << [0x7f, 0x7f, 0x7f] # 8 out << [0xff, 0x00, 0x00] # 9 out << [0x00, 0xff, 0x00] # 10 out << [0xff, 0xff, 0x00] # 11 out << [0x5c, 0x5c, 0xff] # 12 out << [0xff, 0x00, 0xff] # 13 out << [0x00, 0xff, 0xff] # 14 out << [0xff, 0xff, 0xff] # 15 # colors 16..232: the 6x6x6 color cube valuerange = [0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff] 217.times do |i| r = valuerange[(i / 36) % 6] g = valuerange[(i / 6) % 6] b = valuerange[i % 6] out << [r, g, b] end # colors 233..253: grayscale 1.upto 22 do |i| v = 8 + i * 10 out << [v, v, v] end end end def fg return @fg if instance_variable_defined? :@fg @fg = style.fg && self.class.color_index(style.fg) end def bg return @bg if instance_variable_defined? :@bg @bg = style.bg && self.class.color_index(style.bg) end def stream_value(val, &b) yield style_string yield val.gsub("\e", "\\e") .gsub("\n", "#{reset_string}\n#{style_string}") yield reset_string end def style_string @style_string ||= begin attrs = [] attrs << ['38', '5', fg.to_s] if fg attrs << ['48', '5', bg.to_s] if bg attrs << '01' if style[:bold] attrs << '04' if style[:italic] # underline, but hey, whatevs escape(attrs) end end def reset_string @reset_string ||= begin attrs = [] attrs << '39' if fg # fg reset attrs << '49' if bg # bg reset attrs << '00' if style[:bold] || style[:italic] escape(attrs) end end private def escape(attrs) return '' if attrs.empty? "\e[#{attrs.join(';')}m" end def self.color_index(color) @color_index_cache ||= {} @color_index_cache[color] ||= closest_color(*get_rgb(color)) end def self.get_rgb(color) color = $1 if color =~ /#([0-9a-f]+)/i hexes = case color.size when 3 color.chars.map { |c| "#{c}#{c}" } when 6 color.scan(/../) else raise "invalid color: #{color}" end hexes.map { |h| h.to_i(16) } end # max distance between two colors, #000000 to #ffffff MAX_DISTANCE = 257 * 257 * 3 def self.closest_color(r, g, b) @@colors_cache ||= {} key = (r << 16) + (g << 8) + b @@colors_cache.fetch(key) do distance = MAX_DISTANCE match = 0 xterm_colors.each_with_index do |(cr, cg, cb), i| d = (r - cr)**2 + (g - cg)**2 + (b - cb)**2 next if d >= distance match = i distance = d end match end end end class Unescape < EscapeSequence def initialize(*) end def style_string(*) '' end def reset_string(*) '' end def stream_value(val) yield val end end # private def escape_sequence(token) return Unescape.new if escape?(token) @escape_sequences ||= {} @escape_sequences[token.qualname] ||= make_escape_sequence(get_style(token)) end def make_escape_sequence(style) EscapeSequence.new(style) end def get_style(token) return text_style if token.ancestors.include? Token::Tokens::Text theme.get_own_style(token) || text_style end def text_style style = theme.get_style(Token['Text']) # don't highlight text backgrounds style.delete :bg style end end end end rouge-3.28.0/lib/rouge/formatters/terminal_truecolor.rb000066400000000000000000000020011417417255300232420ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Formatters class TerminalTruecolor < Terminal256 tag 'terminal_truecolor' class TruecolorEscapeSequence < Terminal256::EscapeSequence def style_string @style_string ||= begin out = String.new('') out << escape(['48', '2', *get_rgb(style.bg)]) if style.bg out << escape(['38', '2', *get_rgb(style.fg)]) if style.fg out << escape(['1']) if style[:bold] || style[:italic] out end end def get_rgb(color) color = $1 if color =~ /#(\h+)/ case color.size when 3 then color.chars.map { |c| c.to_i(16) * 2 } when 6 then color.scan(/../).map { |cc| cc.to_i(16) } else raise "invalid color: #{color.inspect}" end end end # @override def make_escape_sequence(style) TruecolorEscapeSequence.new(style) end end end end rouge-3.28.0/lib/rouge/formatters/tex.rb000066400000000000000000000046101417417255300201410ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Formatters class Tex < Formatter tag 'tex' # A map of TeX escape characters. # Newlines are handled specially by using #token_lines # spaces are preserved as long as they aren't at the beginning # of a line. see #tag_first for our initial-space strategy ESCAPE = { '&' => '\&', '%' => '\%', '$' => '\$', '#' => '\#', '_' => '\_', '{' => '\{', '}' => '\}', '~' => '{\textasciitilde}', '^' => '{\textasciicircum}', '|' => '{\textbar}', '\\' => '{\textbackslash}', '`' => '{\textasciigrave}', "'" => "'{}", '"' => '"{}', "\t" => '{\tab}', } ESCAPE_REGEX = /[#{ESCAPE.keys.map(&Regexp.method(:escape)).join}]/om def initialize(opts={}) @prefix = opts.fetch(:prefix) { 'RG' } end def escape_tex(str) str.gsub(ESCAPE_REGEX, ESCAPE) end def stream(tokens, &b) # surround the output with \begin{RG*}...\end{RG*} yield "\\begin{#{@prefix}*}%\n" # we strip the newline off the last line to avoid # an extra line being rendered. we do this by yielding # the \newline tag *before* every line group except # the first. first = true token_lines tokens do |line| if first first = false else yield "\\newline%\n" end render_line(line, &b) end yield "%\n\\end{#{@prefix}*}%\n" end def render_line(line, &b) line.each do |(tok, val)| hphantom_tag(tok, val, &b) end end # Special handling for leading spaces, since they may be gobbled # by a previous command. We replace all initial spaces with # \hphantom{xxxx}, which renders an empty space equal to the size # of the x's. def hphantom_tag(tok, val) leading = nil val.sub!(/^[ ]+/) { leading = $&.size; '' } yield "\\hphantom{#{'x' * leading}}" if leading yield tag(tok, val) unless val.empty? end def tag(tok, val) if escape?(tok) val elsif tok == Token::Tokens::Text escape_tex(val) else "\\#@prefix{#{tok.shortname}}{#{escape_tex(val)}}" end end end end end rouge-3.28.0/lib/rouge/guesser.rb000066400000000000000000000024741417417255300166360ustar00rootroot00000000000000# frozen_string_literal: true module Rouge class Guesser class Ambiguous < StandardError attr_reader :alternatives def initialize(alternatives); @alternatives = alternatives; end def message "Ambiguous guess: can't decide between #{alternatives.map(&:tag).inspect}" end end def self.guess(guessers, lexers) original_size = lexers.size guessers.each do |g| new_lexers = case g when Guesser then g.filter(lexers) when proc { |x| x.respond_to? :call } then g.call(lexers) else raise "bad guesser: #{g}" end lexers = new_lexers && new_lexers.any? ? new_lexers : lexers end # if we haven't filtered the input at *all*, # then we have no idea what language it is, # so we bail and return []. lexers.size < original_size ? lexers : [] end def collect_best(lexers, opts={}, &scorer) best = [] best_score = opts[:threshold] lexers.each do |lexer| score = scorer.call(lexer) next if score.nil? if best_score.nil? || score > best_score best_score = score best = [lexer] elsif score == best_score best << lexer end end best end def filter(lexers) raise 'abstract' end end end rouge-3.28.0/lib/rouge/guessers/000077500000000000000000000000001417417255300164655ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/guessers/disambiguation.rb000066400000000000000000000063211417417255300220130ustar00rootroot00000000000000# frozen_string_literal: true module Rouge module Guessers class Disambiguation < Guesser include Util include Lexers def initialize(filename, source) @filename = File.basename(filename) @source = source end def filter(lexers) return lexers if lexers.size == 1 return lexers if lexers.size == Lexer.all.size @analyzer = TextAnalyzer.new(get_source(@source)) self.class.disambiguators.each do |disambiguator| next unless disambiguator.match?(@filename) filtered = disambiguator.decide!(self) return filtered if filtered end return lexers end def contains?(text) return @analyzer.include?(text) end def matches?(re) return !!(@analyzer =~ re) end @disambiguators = [] def self.disambiguate(*patterns, &decider) @disambiguators << Disambiguator.new(patterns, &decider) end def self.disambiguators @disambiguators end class Disambiguator include Util def initialize(patterns, &decider) @patterns = patterns @decider = decider end def decide!(guesser) out = guesser.instance_eval(&@decider) case out when Array then out when nil then nil else [out] end end def match?(filename) @patterns.any? { |p| test_glob(p, filename) } end end disambiguate '*.pl' do next Perl if contains?('my $') next Prolog if contains?(':-') next Prolog if matches?(/\A\w+(\(\w+\,\s*\w+\))*\./) end disambiguate '*.h' do next ObjectiveC if matches?(/@(end|implementation|protocol|property)\b/) next ObjectiveC if contains?('@"') next Cpp if matches?(/^\s*(?:catch|class|constexpr|namespace|private| protected|public|template|throw|try|using)\b/x) C end disambiguate '*.m' do next ObjectiveC if matches?(/@(end|implementation|protocol|property)\b/) next ObjectiveC if contains?('@"') next Mathematica if contains?('(*') next Mathematica if contains?(':=') next Mason if matches?(/<%(def|method|text|doc|args|flags|attr|init|once|shared|perl|cleanup|filter)([^>]*)(>)/) next Matlab if matches?(/^\s*?%/) next Mason if matches? %r!( lexer name mappings class GlobMapping < Guesser include Util def self.by_pairs(mapping, filename) glob_map = {} mapping.each do |(glob, lexer_name)| lexer = Lexer.find(lexer_name) # ignore unknown lexers next unless lexer glob_map[lexer.name] ||= [] glob_map[lexer.name] << glob end new(glob_map, filename) end attr_reader :glob_map, :filename def initialize(glob_map, filename) @glob_map = glob_map @filename = filename end def filter(lexers) basename = File.basename(filename) collect_best(lexers) do |lexer| (@glob_map[lexer.name] || []).map do |pattern| if test_glob(pattern, basename) # specificity is better the fewer wildcards there are -pattern.scan(/[*?\[]/).size end end.compact.min end end end end end rouge-3.28.0/lib/rouge/guessers/mimetype.rb000066400000000000000000000004701417417255300206440ustar00rootroot00000000000000# frozen_string_literal: true module Rouge module Guessers class Mimetype < Guesser attr_reader :mimetype def initialize(mimetype) @mimetype = mimetype end def filter(lexers) lexers.select { |lexer| lexer.mimetypes.include? @mimetype } end end end end rouge-3.28.0/lib/rouge/guessers/modeline.rb000066400000000000000000000030161417417255300206060ustar00rootroot00000000000000# frozen_string_literal: true module Rouge module Guessers class Modeline < Guesser include Util # [jneen] regexen stolen from linguist EMACS_MODELINE = /-\*-\s*(?:(?!mode)[\w-]+\s*:\s*(?:[\w+-]+)\s*;?\s*)*(?:mode\s*:)?\s*([\w+-]+)\s*(?:;\s*(?!mode)[\w-]+\s*:\s*[\w+-]+\s*)*;?\s*-\*-/i # First form vim modeline # [text]{white}{vi:|vim:|ex:}[white]{options} # ex: 'vim: syntax=ruby' VIM_MODELINE_1 = /(?:vim|vi|ex):\s*(?:ft|filetype|syntax)=(\w+)\s?/i # Second form vim modeline (compatible with some versions of Vi) # [text]{white}{vi:|vim:|Vim:|ex:}[white]se[t] {options}:[text] # ex: 'vim set syntax=ruby:' VIM_MODELINE_2 = /(?:vim|vi|Vim|ex):\s*se(?:t)?.*\s(?:ft|filetype|syntax)=(\w+)\s?.*:/i MODELINES = [EMACS_MODELINE, VIM_MODELINE_1, VIM_MODELINE_2] def initialize(source, opts={}) @source = source @lines = opts[:lines] || 5 end def filter(lexers) # don't bother reading the stream if we've already decided return lexers if lexers.size == 1 source_text = get_source(@source) lines = source_text.split(/\n/) search_space = (lines.first(@lines) + lines.last(@lines)).join("\n") matches = MODELINES.map { |re| re.match(search_space) }.compact return lexers unless matches.any? match_set = Set.new(matches.map { |m| m[1] }) lexers.select { |l| match_set.include?(l.tag) || l.aliases.any? { |a| match_set.include?(a) } } end end end end rouge-3.28.0/lib/rouge/guessers/source.rb000066400000000000000000000012161417417255300203120ustar00rootroot00000000000000# frozen_string_literal: true module Rouge module Guessers class Source < Guesser include Util attr_reader :source def initialize(source) @source = source end def filter(lexers) # don't bother reading the input if # we've already filtered to 1 return lexers if lexers.size == 1 source_text = get_source(@source) Lexer.assert_utf8!(source_text) source_text = TextAnalyzer.new(source_text) collect_best(lexers) do |lexer| next unless lexer.detectable? lexer.detect?(source_text) ? 1 : nil end end end end end rouge-3.28.0/lib/rouge/guessers/util.rb000066400000000000000000000015551417417255300177750ustar00rootroot00000000000000# frozen_string_literal: true module Rouge module Guessers module Util module SourceNormalizer UTF8_BOM = "\xEF\xBB\xBF" UTF8_BOM_RE = /\A#{UTF8_BOM}/ # @param [String,nil] source # @return [String,nil] def self.normalize(source) source.sub(UTF8_BOM_RE, '').gsub(/\r\n/, "\n") end end def test_glob(pattern, path) File.fnmatch?(pattern, path, File::FNM_DOTMATCH | File::FNM_CASEFOLD) end # @param [String,IO] source # @return [String] def get_source(source) if source.respond_to?(:to_str) SourceNormalizer.normalize(source.to_str) elsif source.respond_to?(:read) SourceNormalizer.normalize(source.read) else raise ArgumentError, "Invalid source: #{source.inspect}" end end end end end rouge-3.28.0/lib/rouge/lexer.rb000066400000000000000000000347651417417255300163100ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # stdlib require 'strscan' require 'cgi' require 'set' module Rouge # @abstract # A lexer transforms text into a stream of `[token, chunk]` pairs. class Lexer include Token::Tokens @option_docs = {} class << self # Lexes `stream` with the given options. The lex is delegated to a # new instance. # # @see #lex def lex(stream, opts={}, &b) new(opts).lex(stream, &b) end # In case #continue_lex is called statically, we simply # begin a new lex from the beginning, since there is no state. # # @see #continue_lex def continue_lex(*a, &b) lex(*a, &b) end # Given a name in string, return the correct lexer class. # @param [String] name # @return [Class,nil] def find(name) registry[name.to_s] end # Same as ::find_fancy, except instead of returning an instantiated # lexer, returns a pair of [lexer_class, options], so that you can # modify or provide additional options to the lexer. # # Please note: the lexer class might be nil! def lookup_fancy(str, code=nil, default_options={}) if str && !str.include?('?') && str != 'guess' lexer_class = find(str) return [lexer_class, default_options] end name, opts = str ? str.split('?', 2) : [nil, ''] # parse the options hash from a cgi-style string opts = CGI.parse(opts || '').map do |k, vals| val = case vals.size when 0 then true when 1 then vals[0] else vals end [ k.to_s, val ] end opts = default_options.merge(Hash[opts]) lexer_class = case name when 'guess', nil self.guess(:source => code, :mimetype => opts['mimetype']) when String self.find(name) end [lexer_class, opts] end # Find a lexer, with fancy shiny features. # # * The string you pass can include CGI-style options # # Lexer.find_fancy('erb?parent=tex') # # * You can pass the special name 'guess' so we guess for you, # and you can pass a second argument of the code to guess by # # Lexer.find_fancy('guess', "#!/bin/bash\necho Hello, world") # # If the code matches more than one lexer then Guesser::Ambiguous # is raised. # # This is used in the Redcarpet plugin as well as Rouge's own # markdown lexer for highlighting internal code blocks. # def find_fancy(str, code=nil, default_options={}) lexer_class, opts = lookup_fancy(str, code, default_options) lexer_class && lexer_class.new(opts) end # Specify or get this lexer's title. Meant to be human-readable. def title(t=nil) if t.nil? t = tag.capitalize end @title ||= t end # Specify or get this lexer's description. def desc(arg=:absent) if arg == :absent @desc else @desc = arg end end def option_docs @option_docs ||= InheritableHash.new(superclass.option_docs) end def option(name, desc) option_docs[name.to_s] = desc end # Specify or get the path name containing a small demo for # this lexer (can be overriden by {demo}). def demo_file(arg=:absent) return @demo_file = Pathname.new(arg) unless arg == :absent @demo_file = Pathname.new(File.join(__dir__, 'demos', tag)) end # Specify or get a small demo string for this lexer def demo(arg=:absent) return @demo = arg unless arg == :absent @demo = File.read(demo_file, mode: 'rt:bom|utf-8') end # @return a list of all lexers. def all @all ||= registry.values.uniq end # Guess which lexer to use based on a hash of info. # # This accepts the same arguments as Lexer.guess, but will never throw # an error. It will return a (possibly empty) list of potential lexers # to use. def guesses(info={}) mimetype, filename, source = info.values_at(:mimetype, :filename, :source) custom_globs = info[:custom_globs] guessers = (info[:guessers] || []).dup guessers << Guessers::Mimetype.new(mimetype) if mimetype guessers << Guessers::GlobMapping.by_pairs(custom_globs, filename) if custom_globs && filename guessers << Guessers::Filename.new(filename) if filename guessers << Guessers::Modeline.new(source) if source guessers << Guessers::Source.new(source) if source guessers << Guessers::Disambiguation.new(filename, source) if source && filename Guesser.guess(guessers, Lexer.all) end # Guess which lexer to use based on a hash of info. # # @option info :mimetype # A mimetype to guess by # @option info :filename # A filename to guess by # @option info :source # The source itself, which, if guessing by mimetype or filename # fails, will be searched for shebangs, tags, and # other hints. # @param [Proc] fallback called if multiple lexers are detected. # If omitted, Guesser::Ambiguous is raised. # # @see Lexer.detect? # @see Lexer.guesses # @return [Class] def guess(info={}, &fallback) lexers = guesses(info) return Lexers::PlainText if lexers.empty? return lexers[0] if lexers.size == 1 if fallback fallback.call(lexers) else raise Guesser::Ambiguous.new(lexers) end end def guess_by_mimetype(mt) guess :mimetype => mt end def guess_by_filename(fname) guess :filename => fname end def guess_by_source(source) guess :source => source end def enable_debug! @debug_enabled = true end def disable_debug! remove_instance_variable :@debug_enabled if defined? @debug_enabled end def debug_enabled? (defined? @debug_enabled) ? true : false end # Determine if a lexer has a method named +:detect?+ defined in its # singleton class. def detectable? return @detectable if defined?(@detectable) @detectable = singleton_methods(false).include?(:detect?) end protected # @private def register(name, lexer) # reset an existing list of lexers @all = nil if defined?(@all) registry[name.to_s] = lexer end public # Used to specify or get the canonical name of this lexer class. # # @example # class MyLexer < Lexer # tag 'foo' # end # # MyLexer.tag # => 'foo' # # Lexer.find('foo') # => MyLexer def tag(t=nil) return @tag if t.nil? @tag = t.to_s Lexer.register(@tag, self) end # Used to specify alternate names this lexer class may be found by. # # @example # class Erb < Lexer # tag 'erb' # aliases 'eruby', 'rhtml' # end # # Lexer.find('eruby') # => Erb def aliases(*args) args.map!(&:to_s) args.each { |arg| Lexer.register(arg, self) } (@aliases ||= []).concat(args) end # Specify a list of filename globs associated with this lexer. # # If a filename glob is associated with more than one lexer, this can # cause a Guesser::Ambiguous error to be raised in various guessing # methods. These errors can be avoided by disambiguation. Filename globs # are disambiguated in one of two ways. Either the lexer will define a # `self.detect?` method (intended for use with shebangs and doctypes) or a # manual rule will be specified in Guessers::Disambiguation. # # @example # class Ruby < Lexer # filenames '*.rb', '*.ruby', 'Gemfile', 'Rakefile' # end def filenames(*fnames) (@filenames ||= []).concat(fnames) end # Specify a list of mimetypes associated with this lexer. # # @example # class Html < Lexer # mimetypes 'text/html', 'application/xhtml+xml' # end def mimetypes(*mts) (@mimetypes ||= []).concat(mts) end # @private def assert_utf8!(str) encoding = str.encoding.name return if encoding == 'US-ASCII' || encoding == 'UTF-8' || encoding == 'ASCII-8BIT' raise EncodingError.new( "Bad encoding: #{str.encoding.names.join(',')}. " + "Please convert your string to UTF-8." ) end private def registry @registry ||= {} end end # -*- instance methods -*- # attr_reader :options # Create a new lexer with the given options. Individual lexers may # specify extra options. The only current globally accepted option # is `:debug`. # # @option opts :debug # Prints debug information to stdout. The particular info depends # on the lexer in question. In regex lexers, this will log the # state stack at the beginning of each step, along with each regex # tried and each stream consumed. Try it, it's pretty useful. def initialize(opts={}) @options = {} opts.each { |k, v| @options[k.to_s] = v } @debug = Lexer.debug_enabled? && bool_option('debug') end # Returns a new lexer with the given options set. Useful for e.g. setting # debug flags post hoc, or providing global overrides for certain options def with(opts={}) new_options = @options.dup opts.each { |k, v| new_options[k.to_s] = v } self.class.new(new_options) end def as_bool(val) case val when nil, false, 0, '0', 'false', 'off' false when Array val.empty? ? true : as_bool(val.last) else true end end def as_string(val) return as_string(val.last) if val.is_a?(Array) val ? val.to_s : nil end def as_list(val) case val when Array val.flat_map { |v| as_list(v) } when String val.split(',') else [] end end def as_lexer(val) return as_lexer(val.last) if val.is_a?(Array) return val.new(@options) if val.is_a?(Class) && val < Lexer case val when Lexer val when String lexer_class = Lexer.find(val) lexer_class && lexer_class.new(@options) end end def as_token(val) return as_token(val.last) if val.is_a?(Array) case val when Token val else Token[val] end end def bool_option(name, &default) name_str = name.to_s if @options.key?(name_str) as_bool(@options[name_str]) else default ? default.call : false end end def string_option(name, &default) as_string(@options.delete(name.to_s, &default)) end def lexer_option(name, &default) as_lexer(@options.delete(name.to_s, &default)) end def list_option(name, &default) as_list(@options.delete(name.to_s, &default)) end def token_option(name, &default) as_token(@options.delete(name.to_s, &default)) end def hash_option(name, defaults, &val_cast) name = name.to_s out = defaults.dup base = @options.delete(name.to_s) base = {} unless base.is_a?(Hash) base.each { |k, v| out[k.to_s] = val_cast ? val_cast.call(v) : v } @options.keys.each do |key| next unless key =~ /(\w+)\[(\w+)\]/ and $1 == name value = @options.delete(key) out[$2] = val_cast ? val_cast.call(value) : value end out end # @abstract # # Called after each lex is finished. The default implementation # is a noop. def reset! end # Given a string, yield [token, chunk] pairs. If no block is given, # an enumerator is returned. # # @option opts :continue # Continue the lex from the previous state (i.e. don't call #reset!) # # @note The use of :continue => true has been deprecated. A warning is # issued if run with `$VERBOSE` set to true. # # @note The use of arbitrary `opts` has never been supported, but we # previously ignored them with no error. We now warn unconditionally. def lex(string, opts=nil, &b) if opts if (opts.keys - [:continue]).size > 0 # improper use of options hash warn('Improper use of Lexer#lex - this method does not receive options.' + ' This will become an error in a future version.') end if opts[:continue] warn '`lex :continue => true` is deprecated, please use #continue_lex instead' return continue_lex(string, &b) end end return enum_for(:lex, string) unless block_given? Lexer.assert_utf8!(string) reset! continue_lex(string, &b) end # Continue the lex from the the current state without resetting def continue_lex(string, &b) return enum_for(:continue_lex, string, &b) unless block_given? # consolidate consecutive tokens of the same type last_token = nil last_val = nil stream_tokens(string) do |tok, val| next if val.empty? if tok == last_token last_val << val next end b.call(last_token, last_val) if last_token last_token = tok last_val = val end b.call(last_token, last_val) if last_token end # delegated to {Lexer.tag} def tag self.class.tag end # @abstract # # Yield `[token, chunk]` pairs, given a prepared input stream. This # must be implemented. # # @param [StringScanner] stream # the stream def stream_tokens(stream, &b) raise 'abstract' end # @abstract # # Return true if there is an in-text indication (such as a shebang # or DOCTYPE declaration) that this lexer should be used. # # @param [TextAnalyzer] text # the text to be analyzed, with a couple of handy methods on it, # like {TextAnalyzer#shebang?} and {TextAnalyzer#doctype?} def self.detect?(text) false end end module Lexers BASE_DIR = "#{__dir__}/lexers".freeze @_loaded_lexers = {} def self.load_lexer(relpath) return if @_loaded_lexers.key?(relpath) @_loaded_lexers[relpath] = true Kernel::load File.join(BASE_DIR, relpath) end end end rouge-3.28.0/lib/rouge/lexers/000077500000000000000000000000001417417255300161275ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/lexers/abap.rb000066400000000000000000000313741417417255300173670ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # ABAP elements taken from http://help.sap.com/abapdocu_750/en/index.htm?file=abapdo.htm module Rouge module Lexers class ABAP < RegexLexer title "ABAP" desc "SAP - Advanced Business Application Programming" tag 'abap' filenames '*.abap' mimetypes 'text/x-abap' def self.keywords @keywords = Set.new %w( *-INPUT ?TO ABAP-SOURCE ABBREVIATED ABS ABSTRACT ACCEPT ACCEPTING ACCORDING ACCP ACTIVATION ACTUAL ADD ADD-CORRESPONDING ADJACENT AFTER ALIAS ALIASES ALIGN ALL ALLOCATE ALPHA ANALYSIS ANALYZER AND ANY APPEND APPENDAGE APPENDING APPLICATION ARCHIVE AREA ARITHMETIC AS ASCENDING ASPECT ASSERT ASSIGN ASSIGNED ASSIGNING ASSOCIATION ASYNCHRONOUS AT ATTRIBUTES AUTHORITY AUTHORITY-CHECK AVG BACK BACKGROUND BACKUP BACKWARD BADI BASE BEFORE BEGIN BETWEEN BIG BINARY BINTOHEX BIT BIT-AND BIT-NOT BIT-OR BIT-XOR BLACK BLANK BLANKS BLOB BLOCK BLOCKS BLUE BOUND BOUNDARIES BOUNDS BOXED BREAK-POINT BT BUFFER BY BYPASSING BYTE BYTE-CA BYTE-CN BYTE-CO BYTE-CS BYTE-NA BYTE-NS BYTE-ORDER CA CALL CALLING CASE CAST CASTING CATCH CEIL CENTER CENTERED CHAIN CHAIN-INPUT CHAIN-REQUEST CHANGE CHANGING CHANNELS CHAR CHAR-TO-HEX CHARACTER CHECK CHECKBOX CIRCULAR CLASS CLASS-CODING CLASS-DATA CLASS-EVENTS CLASS-METHODS CLASS-POOL CLEANUP CLEAR CLIENT CLNT CLOB CLOCK CLOSE CN CO COALESCE CODE CODING COLLECT COLOR COLUMN COLUMNS COL_BACKGROUND COL_GROUP COL_HEADING COL_KEY COL_NEGATIVE COL_NORMAL COL_POSITIVE COL_TOTAL COMMENT COMMENTS COMMIT COMMON COMMUNICATION COMPARING COMPONENT COMPONENTS COMPRESSION COMPUTE CONCAT CONCATENATE CONCAT_WITH_SPACE COND CONDENSE CONDITION CONNECT CONNECTION CONSTANTS CONTEXT CONTEXTS CONTINUE CONTROL CONTROLS CONV CONVERSION CONVERT COPIES COPY CORRESPONDING COUNT COUNTRY COVER CP CPI CREATE CREATING CRITICAL CS CUKY CURR CURRENCY CURRENCY_CONVERSION CURRENT CURSOR CURSOR-SELECTION CUSTOMER CUSTOMER-FUNCTION CX_DYNAMIC_CHECK CX_NO_CHECK CX_ROOT CX_SQL_EXCEPTION CX_STATIC_CHECK DANGEROUS DATA DATABASE DATAINFO DATASET DATE DATS DATS_ADD_DAYS DATS_ADD_MONTHS DATS_DAYS_BETWEEN DATS_IS_VALID DAYLIGHT DD/MM/YY DD/MM/YYYY DDMMYY DEALLOCATE DEC DECIMALS DECIMAL_SHIFT DECLARATIONS DEEP DEFAULT DEFERRED DEFINE DEFINING DEFINITION DELETE DELETING DEMAND DEPARTMENT DESCENDING DESCRIBE DESTINATION DETAIL DF16_DEC DF16_RAW DF16_SCL DF34_DEC DF34_RAW DF34_SCL DIALOG DIRECTORY DISCONNECT DISPLAY DISPLAY-MODE DISTANCE DISTINCT DIV DIVIDE DIVIDE-CORRESPONDING DIVISION DO DUMMY DUPLICATE DUPLICATES DURATION DURING DYNAMIC DYNPRO E EDIT EDITOR-CALL ELSE ELSEIF EMPTY ENABLED ENABLING ENCODING END END-ENHANCEMENT-SECTION END-LINES END-OF-DEFINITION END-OF-FILE END-OF-PAGE END-OF-SELECTION END-TEST-INJECTION END-TEST-SEAM ENDAT ENDCASE ENDCATCH ENDCHAIN ENDCLASS ENDDO ENDENHANCEMENT ENDEXEC ENDFORM ENDFUNCTION ENDIAN ENDIF ENDING ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDTRY ENDWHILE ENDWITH ENGINEERING ENHANCEMENT ENHANCEMENT-POINT ENHANCEMENT-SECTION ENHANCEMENTS ENTRIES ENTRY ENVIRONMENT EQ EQUIV ERRORMESSAGE ERRORS ESCAPE ESCAPING EVENT EVENTS EXACT EXCEPT EXCEPTION EXCEPTION-TABLE EXCEPTIONS EXCLUDE EXCLUDING EXEC EXECUTE EXISTS EXIT EXIT-COMMAND EXPAND EXPANDING EXPIRATION EXPLICIT EXPONENT EXPORT EXPORTING EXTEND EXTENDED EXTENSION EXTRACT FAIL FETCH FIELD FIELD-GROUPS FIELD-SYMBOL FIELD-SYMBOLS FIELDS FILE FILTER FILTER-TABLE FILTERS FINAL FIND FIRST FIRST-LINE FIXED-POINT FKEQ FKGE FLOOR FLTP FLUSH FONT FOR FORM FORMAT FORWARD FOUND FRAME FRAMES FREE FRIENDS FROM FUNCTION FUNCTION-POOL FUNCTIONALITY FURTHER GAPS GE GENERATE GET GET_PRINT_PARAMETERS GIVING GKEQ GKGE GLOBAL GRANT GREEN GROUP GROUPS GT HANDLE HANDLER HARMLESS HASHED HAVING HDB HEAD-LINES HEADER HEADERS HEADING HELP-ID HELP-REQUEST HEXTOBIN HIDE HIGH HINT HOLD HOTSPOT I ICON ID IDENTIFICATION IDENTIFIER IDS IF IF_ABAP_CLOSE_RESOURCE IF_ABAP_CODEPAGE IF_ABAP_DB_BLOB_HANDLE IF_ABAP_DB_CLOB_HANDLE IF_ABAP_DB_LOB_HANDLE IF_ABAP_DB_READER IF_ABAP_DB_WRITER IF_ABAP_READER IF_ABAP_WRITER IF_MESSAGE IF_OS_CA_INSTANCE IF_OS_CA_PERSISTENCY IF_OS_FACTORY IF_OS_QUERY IF_OS_QUERY_MANAGER IF_OS_QUERY_OPTIONS IF_OS_STATE IF_OS_TRANSACTION IF_OS_TRANSACTION_MANAGER IF_SERIALIZABLE_OBJECT IF_SHM_BUILD_INSTANCE IF_SYSTEM_UUID IF_T100_DYN_MSG IF_T100_MESSAGE IGNORE IGNORING IMMEDIATELY IMPLEMENTATION IMPLEMENTATIONS IMPLEMENTED IMPLICIT IMPORT IMPORTING IN INACTIVE INCL INCLUDE INCLUDES INCLUDING INCREMENT INDEX INDEX-LINE INFOTYPES INHERITING INIT INITIAL INITIALIZATION INNER INOUT INPUT INSERT INSTANCE INSTANCES INSTR INT1 INT2 INT4 INT8 INTENSIFIED INTERFACE INTERFACE-POOL INTERFACES INTERNAL INTERVALS INTO INVERSE INVERTED-DATE IS ISO ITNO JOB JOIN KEEP KEEPING KERNEL KEY KEYS KEYWORDS KIND LANG LANGUAGE LAST LATE LAYOUT LCHR LDB_PROCESS LE LEADING LEAVE LEFT LEFT-JUSTIFIED LEFTPLUS LEFTSPACE LEGACY LENGTH LET LEVEL LEVELS LIKE LINE LINE-COUNT LINE-SELECTION LINE-SIZE LINEFEED LINES LIST LIST-PROCESSING LISTBOX LITTLE LLANG LOAD LOAD-OF-PROGRAM LOB LOCAL LOCALE LOCATOR LOG-POINT LOGFILE LOGICAL LONG LOOP LOW LOWER LPAD LPI LRAW LT LTRIM M MAIL MAIN MAJOR-ID MAPPING MARGIN MARK MASK MATCH MATCHCODE MAX MAXIMUM MEDIUM MEMBERS MEMORY MESH MESSAGE MESSAGE-ID MESSAGES MESSAGING METHOD METHODS MIN MINIMUM MINOR-ID MM/DD/YY MM/DD/YYYY MMDDYY MOD MODE MODIF MODIFIER MODIFY MODULE MOVE MOVE-CORRESPONDING MULTIPLY MULTIPLY-CORRESPONDING NA NAME NAMETAB NATIVE NB NE NESTED NESTING NEW NEW-LINE NEW-PAGE NEW-SECTION NEXT NO NO-DISPLAY NO-EXTENSION NO-GAP NO-GAPS NO-GROUPING NO-HEADING NO-SCROLLING NO-SIGN NO-TITLE NO-TOPOFPAGE NO-ZERO NODE NODES NON-UNICODE NON-UNIQUE NOT NP NS NULL NUMBER NUMC O OBJECT OBJECTS OBLIGATORY OCCURRENCE OCCURRENCES OCCURS OF OFF OFFSET ON ONLY OPEN OPTION OPTIONAL OPTIONS OR ORDER OTHER OTHERS OUT OUTER OUTPUT OUTPUT-LENGTH OVERFLOW OVERLAY PACK PACKAGE PAD PADDING PAGE PAGES PARAMETER PARAMETER-TABLE PARAMETERS PART PARTIALLY PATTERN PERCENTAGE PERFORM PERFORMING PERSON PF PF-STATUS PINK PLACES POOL POSITION POS_HIGH POS_LOW PRAGMAS PREC PRECOMPILED PREFERRED PRESERVING PRIMARY PRINT PRINT-CONTROL PRIORITY PRIVATE PROCEDURE PROCESS PROGRAM PROPERTY PROTECTED PROVIDE PUBLIC PUSH PUSHBUTTON PUT QUAN QUEUE-ONLY QUICKINFO RADIOBUTTON RAISE RAISING RANGE RANGES RAW RAWSTRING READ READ-ONLY READER RECEIVE RECEIVED RECEIVER RECEIVING RED REDEFINITION REDUCE REDUCED REF REFERENCE REFRESH REGEX REJECT REMOTE RENAMING REPLACE REPLACEMENT REPLACING REPORT REQUEST REQUESTED RESERVE RESET RESOLUTION RESPECTING RESPONSIBLE RESULT RESULTS RESUMABLE RESUME RETRY RETURN RETURNCODE RETURNING RETURNS RIGHT RIGHT-JUSTIFIED RIGHTPLUS RIGHTSPACE RISK RMC_COMMUNICATION_FAILURE RMC_INVALID_STATUS RMC_SYSTEM_FAILURE ROLE ROLLBACK ROUND ROWS RPAD RTRIM RUN SAP SAP-SPOOL SAVING SCALE_PRESERVING SCALE_PRESERVING_SCIENTIFIC SCAN SCIENTIFIC SCIENTIFIC_WITH_LEADING_ZERO SCREEN SCROLL SCROLL-BOUNDARY SCROLLING SEARCH SECONDARY SECONDS SECTION SELECT SELECT-OPTIONS SELECTION SELECTION-SCREEN SELECTION-SET SELECTION-SETS SELECTION-TABLE SELECTIONS SEND SEPARATE SEPARATED SET SHARED SHIFT SHORT SHORTDUMP-ID SIGN SIGN_AS_POSTFIX SIMPLE SINGLE SIZE SKIP SKIPPING SMART SOME SORT SORTABLE SORTED SOURCE SPACE SPECIFIED SPLIT SPOOL SPOTS SQL SQLSCRIPT SSTRING STABLE STAMP STANDARD START-OF-SELECTION STARTING STATE STATEMENT STATEMENTS STATIC STATICS STATUSINFO STEP-LOOP STOP STRING STRUCTURE STRUCTURES STYLE SUBKEY SUBMATCHES SUBMIT SUBROUTINE SUBSCREEN SUBSTRING SUBTRACT SUBTRACT-CORRESPONDING SUFFIX SUM SUMMARY SUMMING SUPPLIED SUPPLY SUPPRESS SWITCH SWITCHSTATES SYMBOL SYNCPOINTS SYNTAX SYNTAX-CHECK SYNTAX-TRACE SYST SYSTEM-CALL SYSTEM-EXCEPTIONS SYSTEM-EXIT TAB TABBED TABLE TABLES TABLEVIEW TABSTRIP TARGET TASK TASKS TEST TEST-INJECTION TEST-SEAM TESTING TEXT TEXTPOOL THEN THROW TIME TIMES TIMESTAMP TIMEZONE TIMS TIMS_IS_VALID TITLE TITLE-LINES TITLEBAR TO TOKENIZATION TOKENS TOP-LINES TOP-OF-PAGE TRACE-FILE TRACE-TABLE TRAILING TRANSACTION TRANSFER TRANSFORMATION TRANSLATE TRANSPORTING TRMAC TRUNCATE TRUNCATION TRY TSTMP_ADD_SECONDS TSTMP_CURRENT_UTCTIMESTAMP TSTMP_IS_VALID TSTMP_SECONDS_BETWEEN TYPE TYPE-POOL TYPE-POOLS TYPES ULINE UNASSIGN UNDER UNICODE UNION UNIQUE UNIT UNIT_CONVERSION UNIX UNPACK UNTIL UNWIND UP UPDATE UPPER USER USER-COMMAND USING UTF-8 VALID VALUE VALUE-REQUEST VALUES VARC VARY VARYING VERIFICATION-MESSAGE VERSION VIA VIEW VISIBLE WAIT WARNING WHEN WHENEVER WHERE WHILE WIDTH WINDOW WINDOWS WITH WITH-HEADING WITH-TITLE WITHOUT WORD WORK WRITE WRITER XML XSD YELLOW YES YYMMDD Z ZERO ZONE ) end def self.builtins @keywords = Set.new %w( acos apply asin assign atan attribute bit-set boolc boolx call call-method cast ceil cfunc charlen char_off class_constructor clear cluster cmax cmin cnt communication_failure concat_lines_of cond cond-var condense constructor contains contains_any_not_of contains_any_of copy cos cosh count count_any_not_of count_any_of create cursor data dbmaxlen dbtab deserialize destructor distance empty error_message escape exp extensible find find_any_not_of find_any_of find_end floor frac from_mixed group hashed header idx include index insert ipow itab key lax lines line_exists line_index log log10 loop loop_key match matches me mesh_path namespace nmax nmin node numeric numofchar object parameter primary_key read ref repeat replace rescale resource_failure reverse root round segment sender serialize shift_left shift_right sign simple sin sinh skip sorted space sqrt standard strlen substring substring_after substring_before substring_from substring_to sum switch switch-var system_failure table table_line tan tanh template text to_lower to_mixed to_upper transform translate trunc type value variable write xsdbool xsequence xstrlen ) end def self.types @types = Set.new %w( b c d decfloat16 decfloat34 f i int8 n p s t x clike csequence decfloat string xstring ) end def self.new_keywords @types = Set.new %w( DATA FIELD-SYMBOL ) end state :root do rule %r/\s+/m, Text rule %r/".*/, Comment::Single rule %r(^\*.*), Comment::Multiline rule %r/\d+/, Num::Integer rule %r/('|`)/, Str::Single, :single_string rule %r/[\[\]\(\)\{\}\.,:\|]/, Punctuation # builtins / new ABAP 7.40 keywords (@DATA(), ...) rule %r/(->|=>)?([A-Za-z][A-Za-z0-9_\-]*)(\()/ do |m| if m[1] != '' token Operator, m[1] end if (self.class.new_keywords.include? m[2].upcase) && m[1].nil? token Keyword, m[2] elsif (self.class.builtins.include? m[2].downcase) && m[1].nil? token Name::Builtin, m[2] else token Name, m[2] end token Punctuation, m[3] end # keywords, types and normal text rule %r/\w\w*/ do |m| if self.class.keywords.include? m[0].upcase token Keyword elsif self.class.types.include? m[0].downcase token Keyword::Type else token Name end end # operators rule %r((->|->>|=>)), Operator rule %r([-\*\+%/~=&\?<>!#\@\^]+), Operator end state :operators do rule %r((->|->>|=>)), Operator rule %r([-\*\+%/~=&\?<>!#\@\^]+), Operator end state :single_string do rule %r/\\./, Str::Escape rule %r/(''|``)/, Str::Escape rule %r/['`]/, Str::Single, :pop! rule %r/[^\\'`]+/, Str::Single end end end end rouge-3.28.0/lib/rouge/lexers/actionscript.rb000066400000000000000000000117571417417255300211710ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Actionscript < RegexLexer title "ActionScript" desc "ActionScript" tag 'actionscript' aliases 'as', 'as3' filenames '*.as' mimetypes 'application/x-actionscript' state :comments_and_whitespace do rule %r/\s+/, Text rule %r(//.*?$), Comment::Single rule %r(/\*.*?\*/)m, Comment::Multiline end state :expr_start do mixin :comments_and_whitespace rule %r(/) do token Str::Regex goto :regex end rule %r/[{]/, Punctuation, :object rule %r//, Text, :pop! end state :regex do rule %r(/) do token Str::Regex goto :regex_end end rule %r([^/]\n), Error, :pop! rule %r/\n/, Error, :pop! rule %r/\[\^/, Str::Escape, :regex_group rule %r/\[/, Str::Escape, :regex_group rule %r/\\./, Str::Escape rule %r{[(][?][:=>>? | === | !== )x, Operator, :expr_start rule %r([:-<>+*%&|\^/!=]=?), Operator, :expr_start rule %r/[(\[,]/, Punctuation, :expr_start rule %r/;/, Punctuation, :statement rule %r/[)\].]/, Punctuation rule %r/[?]/ do token Punctuation push :ternary push :expr_start end rule %r/[{}]/, Punctuation, :statement rule id do |m| if self.class.keywords.include? m[0] token Keyword push :expr_start elsif self.class.declarations.include? m[0] token Keyword::Declaration push :expr_start elsif self.class.reserved.include? m[0] token Keyword::Reserved elsif self.class.constants.include? m[0] token Keyword::Constant elsif self.class.builtins.include? m[0] token Name::Builtin else token Name::Other end end rule %r/\-?[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?/, Num::Float rule %r/0x[0-9a-fA-F]+/, Num::Hex rule %r/\-?[0-9]+/, Num::Integer rule %r/"(\\\\|\\"|[^"])*"/, Str::Double rule %r/'(\\\\|\\'|[^'])*'/, Str::Single end # braced parts that aren't object literals state :statement do rule %r/(#{id})(\s*)(:)/ do groups Name::Label, Text, Punctuation end rule %r/[{}]/, Punctuation mixin :expr_start end # object literals state :object do mixin :comments_and_whitespace rule %r/[}]/ do token Punctuation goto :statement end rule %r/(#{id})(\s*)(:)/ do groups Name::Attribute, Text, Punctuation push :expr_start end rule %r/:/, Punctuation mixin :root end # ternary expressions, where : is not a label! state :ternary do rule %r/:/ do token Punctuation goto :expr_start end mixin :root end end end end rouge-3.28.0/lib/rouge/lexers/ada.rb000066400000000000000000000126241417417255300172060ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Ada < RegexLexer tag 'ada' filenames '*.ada', '*.ads', '*.adb', '*.gpr' mimetypes 'text/x-ada' title 'Ada' desc 'The Ada 2012 programming language' # Ada identifiers are Unicode with underscores only allowed as separators. ID = /\b[[:alpha:]](?:\p{Pc}?[[:alnum:]])*\b/ # Numerals can also contain underscores. NUM = /\d(_?\d)*/ XNUM = /\h(_?\h)*/ EXP = /(E[-+]?#{NUM})?/i # Return a hash mapping lower-case identifiers to token classes. def self.idents @idents ||= Hash.new(Name).tap do |h| %w( abort abstract accept access aliased all array at begin body case constant declare delay delta digits do else elsif end exception exit for generic goto if in interface is limited loop new null of others out overriding pragma private protected raise range record renames requeue return reverse select separate some synchronized tagged task terminate then until use when while with ).each {|w| h[w] = Keyword} %w(abs and mod not or rem xor).each {|w| h[w] = Operator::Word} %w( entry function package procedure subtype type ).each {|w| h[w] = Keyword::Declaration} %w( boolean character constraint_error duration float integer natural positive long_float long_integer long_long_float long_long_integer program_error short_float short_integer short_short_integer storage_error string tasking_error wide_character wide_string wide_wide_character wide_wide_string ).each {|w| h[w] = Name::Builtin} end end state :whitespace do rule %r{\s+}m, Text rule %r{--.*$}, Comment::Single end state :dquote_string do rule %r{[^"\n]+}, Literal::String::Double rule %r{""}, Literal::String::Escape rule %r{"}, Literal::String::Double, :pop! rule %r{\n}, Error, :pop! end state :attr do mixin :whitespace rule ID, Name::Attribute, :pop! rule %r{}, Text, :pop! end # Handle a dotted name immediately following a declaration keyword. state :decl_name do mixin :whitespace rule %r{body\b}i, Keyword::Declaration # package body Foo.Bar is... rule %r{(#{ID})(\.)} do groups Name::Namespace, Punctuation end # function "<=" (Left, Right: Type) is ... rule %r{#{ID}|"(and|or|xor|/?=|<=?|>=?|\+|–|&\|/|mod|rem|\*?\*|abs|not)"}, Name::Function, :pop! rule %r{}, Text, :pop! end # Handle a sequence of library unit names: with Ada.Foo, Ada.Bar; # # There's a chance we entered this state mistakenly since 'with' # has multiple other uses in Ada (none of which are likely to # appear at the beginning of a line). Try to bail as soon as # possible if we see something suspicious like keywords. # # See ada_spec.rb for some examples. state :libunit_name do mixin :whitespace rule ID do |m| t = self.class.idents[m[0].downcase] if t <= Name # Convert all kinds of Name to namespaces in this context. token Name::Namespace else # Yikes, we're not supposed to get a keyword in a library unit name! # We probably entered this state by mistake, so try to fix it. token t if t == Keyword::Declaration goto :decl_name else pop! end end end rule %r{[.,]}, Punctuation rule %r{}, Text, :pop! end state :root do mixin :whitespace # String literals. rule %r{'.'}, Literal::String::Char rule %r{"[^"\n]*}, Literal::String::Double, :dquote_string # Real literals. rule %r{#{NUM}\.#{NUM}#{EXP}}, Literal::Number::Float rule %r{#{NUM}##{XNUM}\.#{XNUM}##{EXP}}, Literal::Number::Float # Integer literals. rule %r{2#[01](_?[01])*##{EXP}}, Literal::Number::Bin rule %r{8#[0-7](_?[0-7])*##{EXP}}, Literal::Number::Oct rule %r{16##{XNUM}*##{EXP}}, Literal::Number::Hex rule %r{#{NUM}##{XNUM}##{EXP}}, Literal::Number::Integer rule %r{#{NUM}#\w+#}, Error rule %r{#{NUM}#{EXP}}, Literal::Number::Integer # Special constructs. rule %r{'}, Punctuation, :attr rule %r{<<#{ID}>>}, Name::Label # Context clauses are tricky because the 'with' keyword is used # for many purposes. Detect at beginning of the line only. rule %r{^(?:(limited)(\s+))?(?:(private)(\s+))?(with)\b}i do groups Keyword::Namespace, Text, Keyword::Namespace, Text, Keyword::Namespace push :libunit_name end # Operators and punctuation characters. rule %r{[+*/&<=>|]|-|=>|\.\.|\*\*|[:>>|<>}, Operator rule %r{[.,:;()]}, Punctuation rule ID do |m| t = self.class.idents[m[0].downcase] token t if t == Keyword::Declaration push :decl_name end end # Flag word-like things that don't match the ID pattern. rule %r{\b(\p{Pc}|[[alpha]])\p{Word}*}, Error end end end end rouge-3.28.0/lib/rouge/lexers/apache.rb000066400000000000000000000036451417417255300177050ustar00rootroot00000000000000# frozen_string_literal: true require 'yaml' module Rouge module Lexers class Apache < RegexLexer title "Apache" desc 'configuration files for Apache web server' tag 'apache' mimetypes 'text/x-httpd-conf', 'text/x-apache-conf' filenames '.htaccess', 'httpd.conf' # self-modifying method that loads the keywords file def self.directives Kernel::load File.join(Lexers::BASE_DIR, 'apache/keywords.rb') directives end def self.sections Kernel::load File.join(Lexers::BASE_DIR, 'apache/keywords.rb') sections end def self.values Kernel::load File.join(Lexers::BASE_DIR, 'apache/keywords.rb') values end def name_for_token(token, tktype) if self.class.sections.include? token tktype elsif self.class.directives.include? token tktype elsif self.class.values.include? token tktype else Text end end state :whitespace do rule %r/\#.*/, Comment rule %r/\s+/m, Text end state :root do mixin :whitespace rule %r/(<\/?)(\w+)/ do |m| groups Punctuation, name_for_token(m[2].downcase, Name::Label) push :section end rule %r/\w+/ do |m| token name_for_token(m[0].downcase, Name::Class) push :directive end end state :section do # Match section arguments rule %r/([^>]+)?(>(?:\r\n?|\n)?)/ do groups Literal::String::Regex, Punctuation pop! end mixin :whitespace end state :directive do # Match value literals and other directive arguments rule %r/\r\n?|\n/, Text, :pop! mixin :whitespace rule %r/\S+/ do |m| token name_for_token(m[0].downcase, Literal::String::Symbol) end end end end end rouge-3.28.0/lib/rouge/lexers/apache/000077500000000000000000000000001417417255300173505ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/lexers/apache/keywords.rb000066400000000000000000000423051417417255300215500ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # DO NOT EDIT # This file is automatically generated by `rake builtins:apache`. # See tasks/builtins/apache.rake for more info. module Rouge module Lexers class Apache def self.directives @directives ||= Set.new ["acceptfilter", "acceptpathinfo", "accessfilename", "action", "addalt", "addaltbyencoding", "addaltbytype", "addcharset", "adddefaultcharset", "adddescription", "addencoding", "addhandler", "addicon", "addiconbyencoding", "addiconbytype", "addinputfilter", "addlanguage", "addmoduleinfo", "addoutputfilter", "addoutputfilterbytype", "addtype", "alias", "aliasmatch", "allow", "allowconnect", "allowencodedslashes", "allowmethods", "allowoverride", "allowoverridelist", "anonymous", "anonymous_logemail", "anonymous_mustgiveemail", "anonymous_nouserid", "anonymous_verifyemail", "asyncrequestworkerfactor", "authbasicauthoritative", "authbasicfake", "authbasicprovider", "authbasicusedigestalgorithm", "authdbduserpwquery", "authdbduserrealmquery", "authdbmgroupfile", "authdbmtype", "authdbmuserfile", "authdigestalgorithm", "authdigestdomain", "authdigestnoncelifetime", "authdigestprovider", "authdigestqop", "authdigestshmemsize", "authformauthoritative", "authformbody", "authformdisablenostore", "authformfakebasicauth", "authformlocation", "authformloginrequiredlocation", "authformloginsuccesslocation", "authformlogoutlocation", "authformmethod", "authformmimetype", "authformpassword", "authformprovider", "authformsitepassphrase", "authformsize", "authformusername", "authgroupfile", "authldapauthorizeprefix", "authldapbindauthoritative", "authldapbinddn", "authldapbindpassword", "authldapcharsetconfig", "authldapcompareasuser", "authldapcomparednonserver", "authldapdereferencealiases", "authldapgroupattribute", "authldapgroupattributeisdn", "authldapinitialbindasuser", "authldapinitialbindpattern", "authldapmaxsubgroupdepth", "authldapremoteuserattribute", "authldapremoteuserisdn", "authldapsearchasuser", "authldapsubgroupattribute", "authldapsubgroupclass", "authldapurl", "authmerging", "authname", "authncachecontext", "authncacheenable", "authncacheprovidefor", "authncachesocache", "authncachetimeout", "authnzfcgicheckauthnprovider", "authnzfcgidefineprovider", "authtype", "authuserfile", "authzdbdlogintoreferer", "authzdbdquery", "authzdbdredirectquery", "authzdbmtype", "authzsendforbiddenonfailure", "balancergrowth", "balancerinherit", "balancermember", "balancerpersist", "brotlialteretag", "brotlicompressionmaxinputblock", "brotlicompressionquality", "brotlicompressionwindow", "brotlifilternote", "browsermatch", "browsermatchnocase", "bufferedlogs", "buffersize", "cachedefaultexpire", "cachedetailheader", "cachedirlength", "cachedirlevels", "cachedisable", "cacheenable", "cachefile", "cacheheader", "cacheignorecachecontrol", "cacheignoreheaders", "cacheignorenolastmod", "cacheignorequerystring", "cacheignoreurlsessionidentifiers", "cachekeybaseurl", "cachelastmodifiedfactor", "cachelock", "cachelockmaxage", "cachelockpath", "cachemaxexpire", "cachemaxfilesize", "cacheminexpire", "cacheminfilesize", "cachenegotiateddocs", "cachequickhandler", "cachereadsize", "cachereadtime", "cacheroot", "cachesocache", "cachesocachemaxsize", "cachesocachemaxtime", "cachesocachemintime", "cachesocachereadsize", "cachesocachereadtime", "cachestaleonerror", "cachestoreexpired", "cachestorenostore", "cachestoreprivate", "cgidscripttimeout", "cgimapextension", "cgipassauth", "cgivar", "charsetdefault", "charsetoptions", "charsetsourceenc", "checkcaseonly", "checkspelling", "chrootdir", "contentdigest", "cookiedomain", "cookieexpires", "cookiename", "cookiestyle", "cookietracking", "coredumpdirectory", "customlog", "dav", "davdepthinfinity", "davgenericlockdb", "davlockdb", "davmintimeout", "dbdexptime", "dbdinitsql", "dbdkeep", "dbdmax", "dbdmin", "dbdparams", "dbdpersist", "dbdpreparesql", "dbdriver", "defaulticon", "defaultlanguage", "defaultruntimedir", "defaulttype", "define", "deflatebuffersize", "deflatecompressionlevel", "deflatefilternote", "deflateinflatelimitrequestbody", "deflateinflateratioburst", "deflateinflateratiolimit", "deflatememlevel", "deflatewindowsize", "deny", "directorycheckhandler", "directoryindex", "directoryindexredirect", "directoryslash", "documentroot", "dtraceprivileges", "dumpioinput", "dumpiooutput", "enableexceptionhook", "enablemmap", "enablesendfile", "error", "errordocument", "errorlog", "errorlogformat", "example", "expiresactive", "expiresbytype", "expiresdefault", "extendedstatus", "extfilterdefine", "extfilteroptions", "fallbackresource", "fileetag", "filterchain", "filterdeclare", "filterprotocol", "filterprovider", "filtertrace", "forcelanguagepriority", "forcetype", "forensiclog", "globallog", "gprofdir", "gracefulshutdowntimeout", "group", "h2copyfiles", "h2direct", "h2earlyhints", "h2maxsessionstreams", "h2maxworkeridleseconds", "h2maxworkers", "h2minworkers", "h2moderntlsonly", "h2push", "h2pushdiarysize", "h2pushpriority", "h2pushresource", "h2serializeheaders", "h2streammaxmemsize", "h2tlscooldownsecs", "h2tlswarmupsize", "h2upgrade", "h2windowsize", "header", "headername", "heartbeataddress", "heartbeatlisten", "heartbeatmaxservers", "heartbeatstorage", "heartbeatstorage", "hostnamelookups", "httpprotocoloptions", "identitycheck", "identitychecktimeout", "imapbase", "imapdefault", "imapmenu", "include", "includeoptional", "indexheadinsert", "indexignore", "indexignorereset", "indexoptions", "indexorderdefault", "indexstylesheet", "inputsed", "isapiappendlogtoerrors", "isapiappendlogtoquery", "isapicachefile", "isapifakeasync", "isapilognotsupported", "isapireadaheadbuffer", "keepalive", "keepalivetimeout", "keptbodysize", "languagepriority", "ldapcacheentries", "ldapcachettl", "ldapconnectionpoolttl", "ldapconnectiontimeout", "ldaplibrarydebug", "ldapopcacheentries", "ldapopcachettl", "ldapreferralhoplimit", "ldapreferrals", "ldapretries", "ldapretrydelay", "ldapsharedcachefile", "ldapsharedcachesize", "ldaptimeout", "ldaptrustedclientcert", "ldaptrustedglobalcert", "ldaptrustedmode", "ldapverifyservercert", "limitinternalrecursion", "limitrequestbody", "limitrequestfields", "limitrequestfieldsize", "limitrequestline", "limitxmlrequestbody", "listen", "listenbacklog", "listencoresbucketsratio", "loadfile", "loadmodule", "logformat", "logiotrackttfb", "loglevel", "logmessage", "luaauthzprovider", "luacodecache", "luahookaccesschecker", "luahookauthchecker", "luahookcheckuserid", "luahookfixups", "luahookinsertfilter", "luahooklog", "luahookmaptostorage", "luahooktranslatename", "luahooktypechecker", "luainherit", "luainputfilter", "luamaphandler", "luaoutputfilter", "luapackagecpath", "luapackagepath", "luaquickhandler", "luaroot", "luascope", "maxconnectionsperchild", "maxkeepaliverequests", "maxmemfree", "maxrangeoverlaps", "maxrangereversals", "maxranges", "maxrequestworkers", "maxspareservers", "maxsparethreads", "maxthreads", "mdbaseserver", "mdcachallenges", "mdcertificateagreement", "mdcertificateauthority", "mdcertificateprotocol", "mddrivemode", "mdhttpproxy", "mdmember", "mdmembers", "mdmuststaple", "mdnotifycmd", "mdomain", "mdportmap", "mdprivatekeys", "mdrenewwindow", "mdrequirehttps", "mdstoredir", "memcacheconnttl", "mergetrailers", "metadir", "metafiles", "metasuffix", "mimemagicfile", "minspareservers", "minsparethreads", "mmapfile", "modemstandard", "modmimeusepathinfo", "multiviewsmatch", "mutex", "namevirtualhost", "noproxy", "nwssltrustedcerts", "nwsslupgradeable", "options", "order", "outputsed", "passenv", "pidfile", "privilegesmode", "protocol", "protocolecho", "protocols", "protocolshonororder", "proxyaddheaders", "proxybadheader", "proxyblock", "proxydomain", "proxyerroroverride", "proxyexpressdbmfile", "proxyexpressdbmtype", "proxyexpressenable", "proxyfcgibackendtype", "proxyfcgisetenvif", "proxyftpdircharset", "proxyftpescapewildcards", "proxyftplistonwildcard", "proxyhcexpr", "proxyhctemplate", "proxyhctpsize", "proxyhtmlbufsize", "proxyhtmlcharsetout", "proxyhtmldoctype", "proxyhtmlenable", "proxyhtmlevents", "proxyhtmlextended", "proxyhtmlfixups", "proxyhtmlinterp", "proxyhtmllinks", "proxyhtmlmeta", "proxyhtmlstripcomments", "proxyhtmlurlmap", "proxyiobuffersize", "proxymaxforwards", "proxypass", "proxypassinherit", "proxypassinterpolateenv", "proxypassmatch", "proxypassreverse", "proxypassreversecookiedomain", "proxypassreversecookiepath", "proxypreservehost", "proxyreceivebuffersize", "proxyremote", "proxyremotematch", "proxyrequests", "proxyscgiinternalredirect", "proxyscgisendfile", "proxyset", "proxysourceaddress", "proxystatus", "proxytimeout", "proxyvia", "qualifyredirecturl", "readmename", "receivebuffersize", "redirect", "redirectmatch", "redirectpermanent", "redirecttemp", "reflectorheader", "registerhttpmethod", "remoteipheader", "remoteipinternalproxy", "remoteipinternalproxylist", "remoteipproxiesheader", "remoteipproxyprotocol", "remoteipproxyprotocolexceptions", "remoteiptrustedproxy", "remoteiptrustedproxylist", "removecharset", "removeencoding", "removehandler", "removeinputfilter", "removelanguage", "removeoutputfilter", "removetype", "requestheader", "requestreadtimeout", "require", "rewritebase", "rewritecond", "rewriteengine", "rewritemap", "rewriteoptions", "rewriterule", "rlimitcpu", "rlimitmem", "rlimitnproc", "satisfy", "scoreboardfile", "script", "scriptalias", "scriptaliasmatch", "scriptinterpretersource", "scriptlog", "scriptlogbuffer", "scriptloglength", "scriptsock", "securelisten", "seerequesttail", "sendbuffersize", "serveradmin", "serveralias", "serverlimit", "servername", "serverpath", "serverroot", "serversignature", "servertokens", "session", "sessioncookiename", "sessioncookiename2", "sessioncookieremove", "sessioncryptocipher", "sessioncryptodriver", "sessioncryptopassphrase", "sessioncryptopassphrasefile", "sessiondbdcookiename", "sessiondbdcookiename2", "sessiondbdcookieremove", "sessiondbddeletelabel", "sessiondbdinsertlabel", "sessiondbdperuser", "sessiondbdselectlabel", "sessiondbdupdatelabel", "sessionenv", "sessionexclude", "sessionheader", "sessioninclude", "sessionmaxage", "setenv", "setenvif", "setenvifexpr", "setenvifnocase", "sethandler", "setinputfilter", "setoutputfilter", "ssiendtag", "ssierrormsg", "ssietag", "ssilastmodified", "ssilegacyexprparser", "ssistarttag", "ssitimeformat", "ssiundefinedecho", "sslcacertificatefile", "sslcacertificatepath", "sslcadnrequestfile", "sslcadnrequestpath", "sslcarevocationcheck", "sslcarevocationfile", "sslcarevocationpath", "sslcertificatechainfile", "sslcertificatefile", "sslcertificatekeyfile", "sslciphersuite", "sslcompression", "sslcryptodevice", "sslengine", "sslfips", "sslhonorcipherorder", "sslinsecurerenegotiation", "sslocspdefaultresponder", "sslocspenable", "sslocspnoverify", "sslocspoverrideresponder", "sslocspproxyurl", "sslocsprespondercertificatefile", "sslocsprespondertimeout", "sslocspresponsemaxage", "sslocspresponsetimeskew", "sslocspuserequestnonce", "sslopensslconfcmd", "ssloptions", "sslpassphrasedialog", "sslprotocol", "sslproxycacertificatefile", "sslproxycacertificatepath", "sslproxycarevocationcheck", "sslproxycarevocationfile", "sslproxycarevocationpath", "sslproxycheckpeercn", "sslproxycheckpeerexpire", "sslproxycheckpeername", "sslproxyciphersuite", "sslproxyengine", "sslproxymachinecertificatechainfile", "sslproxymachinecertificatefile", "sslproxymachinecertificatepath", "sslproxyprotocol", "sslproxyverify", "sslproxyverifydepth", "sslrandomseed", "sslrenegbuffersize", "sslrequire", "sslrequiressl", "sslsessioncache", "sslsessioncachetimeout", "sslsessionticketkeyfile", "sslsessiontickets", "sslsrpunknownuserseed", "sslsrpverifierfile", "sslstaplingcache", "sslstaplingerrorcachetimeout", "sslstaplingfaketrylater", "sslstaplingforceurl", "sslstaplingrespondertimeout", "sslstaplingresponsemaxage", "sslstaplingresponsetimeskew", "sslstaplingreturnrespondererrors", "sslstaplingstandardcachetimeout", "sslstrictsnivhostcheck", "sslusername", "sslusestapling", "sslverifyclient", "sslverifydepth", "startservers", "startthreads", "substitute", "substituteinheritbefore", "substitutemaxlinelength", "suexec", "suexecusergroup", "threadlimit", "threadsperchild", "threadstacksize", "timeout", "traceenable", "transferlog", "typesconfig", "undefine", "undefmacro", "unsetenv", "use", "usecanonicalname", "usecanonicalphysicalport", "user", "userdir", "vhostcgimode", "vhostcgiprivs", "vhostgroup", "vhostprivs", "vhostsecure", "vhostuser", "virtualdocumentroot", "virtualdocumentrootip", "virtualscriptalias", "virtualscriptaliasip", "watchdoginterval", "xbithack", "xml2encalias", "xml2encdefault", "xml2startparse"] end def self.sections @sections ||= Set.new ["authnprovideralias", "authzprovideralias", "directory", "directorymatch", "else", "elseif", "files", "filesmatch", "if", "ifdefine", "ifmodule", "ifversion", "limit", "limitexcept", "location", "locationmatch", "macro", "mdomainset", "proxy", "proxymatch", "requireall", "requireany", "requirenone", "virtualhost"] end def self.values @values ||= Set.new ["add", "addaltclass", "addsuffix", "alias", "all", "allow", "allowanyuri", "allownoslash", "always", "and", "any", "ap_auth_internal_per_uri", "api_version", "append", "ascending", "attribute", "auth", "auth-int", "authconfig", "auto", "backend-address", "balancer_name", "balancer_route_changed", "balancer_session_route", "balancer_session_sticky", "balancer_worker_name", "balancer_worker_route", "base", "basedn", "basic", "before", "block", "boolean", "byte", "byteranges", "cache", "cache-hit", "cache-invalidate", "cache-miss", "cache-revalidate", "cgi", "chain", "change", "charset", "circle", "cmd", "conditional-expression", "condpattern", "conn", "conn_remote_addr", "cookie", "cookie2", "current-uri", "date", "date_gmt", "date_local", "db", "dbm", "decoding", "default", "deny", "descending", "description", "descriptionwidth", "digest", "disabled", "disableenv", "dns", "document_args", "document_name", "document_root", "document_uri", "domain", "double", "duration", "early", "echo", "echomsg", "edit", "edit*", "email", "enableenv", "encoding", "env", "environment-variable-name", "errmsg", "error", "errorlog", "errorlogformat", "execcgi", "expr", "fallback", "fancyindexing", "fast", "file", "file-group", "file-owner", "fileinfo", "filename", "filter", "filter-name", "filter_name", "filters", "finding", "first-dot", "foldersfirst", "followsymlinks", "forever", "form", "formatted", "fpm", "from", "ftype", "full", "function_name", "gdbm", "generic", "gone", "handlers", "hit", "hook_function_name", "host", "hostname", "hse_append_log_parameter", "hse_req_done_with_session", "hse_req_is_connected", "hse_req_is_keep_conn", "hse_req_map_url_to_path", "hse_req_send_response_header", "hse_req_send_response_header_ex", "hse_req_send_url", "hse_req_send_url_redirect_resp", "html", "htmltable", "https", "iconheight", "iconsarelinks", "iconwidth", "ignore", "ignorecase", "ignoreclient", "ignorecontextinfo", "ignoreinherit", "imal", "in", "includes", "includesnoexec", "indexes", "inherit", "inheritbefore", "inheritdown", "inheritdownbefore", "inode", "input", "int", "integer", "intype", "ipaddr", "is_subreq", "iserror", "last-dot", "last_modified", "ldap", "leaf", "legacyprefixdocroot", "level", "limit", "log_function_name", "major", "manual", "map", "map1", "map2", "max", "md5", "md5-sess", "menu", "merge", "mergebase", "minor", "miss", "mod_cache_disk", "mod_cache_socache", "mode", "mtime", "multiviews", "mutual-failure", "mysql", "name", "namewidth", "ndbm", "negotiatedonly", "never", "no", "nochange", "nocontent", "nodecode", "none", "nonfatal", "note", "number-of-ranges", "odbc", "off", "on", "once", "onerror", "onfail", "option", "optional", "options", "or", "oracle", "order", "original-uri", "os", "output", "outtype", "parent-first", "parent-last", "path", "path_info", "permanent", "pipe", "point", "poly", "postgresql", "prefer", "preservescontentlength", "prg", "protocol", "provider-name", "provider_name", "proxy", "proxy-chain-auth", "proxy-fcgi-pathinfo", "proxy-initial-not-pooled", "proxy-interim-response", "proxy-nokeepalive", "proxy-scgi-pathinfo", "proxy-sendcl", "proxy-sendextracrlf", "proxy-source-port", "proxy-status", "qs", "query_string_unescaped", "range", "ratio", "rect", "referer", "regex", "registry", "registry-strict", "remote_addr", "remote_host", "remote_ident", "remote_user", "remove", "request", "request_filename", "request_rec", "request_scheme", "request_uri", "reset", "revalidate", "rewritecond", "rfc2109", "rnd", "scanhtmltitles", "scope", "script", "sdbm", "searching", "secure", "seeother", "selective", "semiformatted", "server", "server_addr", "server_admin", "server_name", "set", "setifempty", "showforbidden", "size", "sizefmt", "sqlite2", "sqlite3", "ssl", "ssl-access-forbidden", "ssl-secure-reneg", "startbody", "stat", "string", "string1", "subnet", "suppresscolumnsorting", "suppressdescription", "suppresshtmlpreamble", "suppressicon", "suppresslastmodified", "suppressrules", "suppresssize", "symlinksifownermatch", "temp", "temporary", "test_condition1", "the_request", "thread", "timefmt", "tls", "to-pattern", "trackmodified", "transform", "txt", "type", "uctonly", "uid", "unescape", "unformatted", "unlimited", "unset", "uri-pattern", "url", "url-of-terms-of-service", "url-path", "useolddateformat", "value", "value-expression", "var", "versionsort", "virtual", "x-forwarded-for", "x-forwarded-host", "x-forwarded-server", "xhtml"] end end end endrouge-3.28.0/lib/rouge/lexers/apex.rb000066400000000000000000000072001417417255300174100ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Apex < RegexLexer title "Apex" desc "The Apex programming language (provided by salesforce)" tag 'apex' filenames '*.cls' mimetypes 'text/x-apex' def self.keywords @keywords ||= Set.new %w( assert break case catch continue default do else finally for if goto instanceof new return switch this throw try while insert update delete ) end def self.declarations @declarations ||= Set.new %w( abstract const enum extends final implements native private protected public static super synchronized throws transient volatile with sharing without inherited virtual global testmethod ) end def self.soql @soql ||= Set.new %w( SELECT FROM WHERE UPDATE LIKE TYPEOF END USING SCOPE WITH DATA CATEGORY GROUP BY ROLLUP CUBE HAVING ORDER BY ASC DESC NULLS FIRST LAST LIMIT OFFSET FOR VIEW REFERENCE UPDATE TRACKING VIEWSTAT OR AND ) end def self.types @types ||= Set.new %w( String boolean byte char double float int long short var void ) end def self.constants @constants ||= Set.new %w(true false null) end id = /[a-z_][a-z0-9_]*/i state :root do rule %r/\s+/m, Text rule %r(//.*?$), Comment::Single rule %r(/\*.*?\*/)m, Comment::Multiline rule %r/(?:class|interface)\b/, Keyword::Declaration, :class rule %r/import\b/, Keyword::Namespace, :import rule %r/([@$.]?)(#{id})([:(]?)/io do |m| lowercased = m[0].downcase uppercased = m[0].upcase if self.class.keywords.include? lowercased token Keyword elsif self.class.soql.include? uppercased token Keyword elsif self.class.declarations.include? lowercased token Keyword::Declaration elsif self.class.types.include? lowercased token Keyword::Type elsif self.class.constants.include? lowercased token Keyword::Constant elsif lowercased == 'package' token Keyword::Namespace elsif m[1] == "@" token Name::Decorator elsif m[3] == ":" groups Operator, Name::Label, Punctuation elsif m[3] == "(" groups Operator, Name::Function, Punctuation elsif m[1] == "." groups Operator, Name::Property, Punctuation else token Name end end rule %r/"/, Str::Double, :dq rule %r/'/, Str::Single, :sq digit = /[0-9]_+[0-9]|[0-9]/ rule %r/#{digit}+\.#{digit}+([eE]#{digit}+)?[fd]?/, Num::Float rule %r/0b(?:[01]_+[01]|[01])+/i, Num::Bin rule %r/0x(?:\h_+\h|\h)+/i, Num::Hex rule %r/0(?:[0-7]_+[0-7]|[0-7])+/, Num::Oct rule %r/#{digit}+L?/, Num::Integer rule %r/[-+\/*~^!%&<>|=.?]/, Operator rule %r/[\[\](){},:;]/, Punctuation; end state :class do rule %r/\s+/m, Text rule id, Name::Class, :pop! end state :import do rule %r/\s+/m, Text rule %r/[a-z0-9_.]+\*?/i, Name::Namespace, :pop! end state :escape do rule %r/\\[btnfr\\"']/, Str::Escape end state :dq do mixin :escape rule %r/[^\\"]+/, Str::Double rule %r/"/, Str::Double, :pop! end state :sq do mixin :escape rule %r/[^\\']+/, Str::Double rule %r/'/, Str::Double, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/apiblueprint.rb000066400000000000000000000023601417417255300211530ustar00rootroot00000000000000# frozen_string_literal: true module Rouge module Lexers load_lexer 'markdown.rb' class APIBlueprint < Markdown title 'API Blueprint' desc 'Markdown based API description language.' tag 'apiblueprint' aliases 'apiblueprint', 'apib' filenames '*.apib' mimetypes 'text/vnd.apiblueprint' prepend :root do # Metadata rule(/(\S+)(:\s*)(.*)$/) do groups Name::Variable, Punctuation, Literal::String end # Resource Group rule(/^(#+)(\s*Group\s+)(.*)$/) do groups Punctuation, Keyword, Generic::Heading end # Resource \ Action rule(/^(#+)(.*)(\[.*\])$/) do groups Punctuation, Generic::Heading, Literal::String end # Relation rule(/^([\+\-\*])(\s*Relation:)(\s*.*)$/) do groups Punctuation, Keyword, Literal::String end # MSON rule(/^(\s+[\+\-\*]\s*)(Attributes|Parameters)(.*)$/) do groups Punctuation, Keyword, Literal::String end # Request/Response rule(/^([\+\-\*]\s*)(Request|Response)(\s+\d\d\d)?(.*)$/) do groups Punctuation, Keyword, Literal::Number, Literal::String end end end end end rouge-3.28.0/lib/rouge/lexers/apple_script.rb000066400000000000000000000517111417417255300211460ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class AppleScript < RegexLexer title "AppleScript" desc "The AppleScript scripting language by Apple Inc. (http://developer.apple.com/applescript/)" tag 'applescript' aliases 'applescript' filenames '*.applescript', '*.scpt' mimetypes 'application/x-applescript' def self.literals @literals ||= ['AppleScript', 'current application', 'false', 'linefeed', 'missing value', 'pi','quote', 'result', 'return', 'space', 'tab', 'text item delimiters', 'true', 'version'] end def self.classes @classes ||= ['alias ', 'application ', 'boolean ', 'class ', 'constant ', 'date ', 'file ', 'integer ', 'list ', 'number ', 'POSIX file ', 'real ', 'record ', 'reference ', 'RGB color ', 'script ', 'text ', 'unit types', '(?:Unicode )?text', 'string'] end def self.builtins @builtins ||= ['attachment', 'attribute run', 'character', 'day', 'month', 'paragraph', 'word', 'year'] end def self.handler_params @handler_params ||= ['about', 'above', 'against', 'apart from', 'around', 'aside from', 'at', 'below', 'beneath', 'beside', 'between', 'for', 'given', 'instead of', 'on', 'onto', 'out of', 'over', 'since'] end def self.commands @commands ||= ['ASCII (character|number)', 'activate', 'beep', 'choose URL', 'choose application', 'choose color', 'choose file( name)?', 'choose folder', 'choose from list', 'choose remote application', 'clipboard info', 'close( access)?', 'copy', 'count', 'current date', 'delay', 'delete', 'display (alert|dialog)', 'do shell script', 'duplicate', 'exists', 'get eof', 'get volume settings', 'info for', 'launch', 'list (disks|folder)', 'load script', 'log', 'make', 'mount volume', 'new', 'offset', 'open( (for access|location))?', 'path to', 'print', 'quit', 'random number', 'read', 'round', 'run( script)?', 'say', 'scripting components', 'set (eof|the clipboard to|volume)', 'store script', 'summarize', 'system attribute', 'system info', 'the clipboard', 'time to GMT', 'write', 'quoted form'] end def self.references @references ||= ['(in )?back of', '(in )?front of', '[0-9]+(st|nd|rd|th)', 'first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eighth', 'ninth', 'tenth', 'after', 'back', 'before', 'behind', 'every', 'front', 'index', 'last', 'middle', 'some', 'that', 'through', 'thru', 'where', 'whose'] end def self.operators @operators ||= ["and", "or", "is equal", "equals", "(is )?equal to", "is not", "isn't", "isn't equal( to)?", "is not equal( to)?", "doesn't equal", "does not equal", "(is )?greater than", "comes after", "is not less than or equal( to)?", "isn't less than or equal( to)?", "(is )?less than", "comes before", "is not greater than or equal( to)?", "isn't greater than or equal( to)?", "(is )?greater than or equal( to)?", "is not less than", "isn't less than", "does not come before", "doesn't come before", "(is )?less than or equal( to)?", "is not greater than", "isn't greater than", "does not come after", "doesn't come after", "starts? with", "begins? with", "ends? with", "contains?", "does not contain", "doesn't contain", "is in", "is contained by", "is not in", "is not contained by", "isn't contained by", "div", "mod", "not", "(a )?(ref( to)?|reference to)", "is", "does"] end def self.controls @controls ||= ['considering', 'else', 'error', 'exit', 'from', 'if', 'ignoring', 'in', 'repeat', 'tell', 'then', 'times', 'to', 'try', 'until', 'using terms from', 'while', 'whith', 'with timeout( of)?', 'with transaction', 'by', 'continue', 'end', 'its?', 'me', 'my', 'return', 'of' , 'as'] end def self.declarations @declarations ||= ['global', 'local', 'prop(erty)?', 'set', 'get'] end def self.reserved @reserved ||= ['but', 'put', 'returning', 'the'] end def self.studio_classes @studio_classes ||= ['action cell', 'alert reply', 'application', 'box', 'browser( cell)?', 'bundle', 'button( cell)?', 'cell', 'clip view', 'color well', 'color-panel', 'combo box( item)?', 'control', 'data( (cell|column|item|row|source))?', 'default entry', 'dialog reply', 'document', 'drag info', 'drawer', 'event', 'font(-panel)?', 'formatter', 'image( (cell|view))?', 'matrix', 'menu( item)?', 'item', 'movie( view)?', 'open-panel', 'outline view', 'panel', 'pasteboard', 'plugin', 'popup button', 'progress indicator', 'responder', 'save-panel', 'scroll view', 'secure text field( cell)?', 'slider', 'sound', 'split view', 'stepper', 'tab view( item)?', 'table( (column|header cell|header view|view))', 'text( (field( cell)?|view))?', 'toolbar( item)?', 'user-defaults', 'view', 'window'] end def self.studio_events @studio_events ||= ['accept outline drop', 'accept table drop', 'action', 'activated', 'alert ended', 'awake from nib', 'became key', 'became main', 'begin editing', 'bounds changed', 'cell value', 'cell value changed', 'change cell value', 'change item value', 'changed', 'child of item', 'choose menu item', 'clicked', 'clicked toolbar item', 'closed', 'column clicked', 'column moved', 'column resized', 'conclude drop', 'data representation', 'deminiaturized', 'dialog ended', 'document nib name', 'double clicked', 'drag( (entered|exited|updated))?', 'drop', 'end editing', 'exposed', 'idle', 'item expandable', 'item value', 'item value changed', 'items changed', 'keyboard down', 'keyboard up', 'launched', 'load data representation', 'miniaturized', 'mouse down', 'mouse dragged', 'mouse entered', 'mouse exited', 'mouse moved', 'mouse up', 'moved', 'number of browser rows', 'number of items', 'number of rows', 'open untitled', 'opened', 'panel ended', 'parameters updated', 'plugin loaded', 'prepare drop', 'prepare outline drag', 'prepare outline drop', 'prepare table drag', 'prepare table drop', 'read from file', 'resigned active', 'resigned key', 'resigned main', 'resized( sub views)?', 'right mouse down', 'right mouse dragged', 'right mouse up', 'rows changed', 'scroll wheel', 'selected tab view item', 'selection changed', 'selection changing', 'should begin editing', 'should close', 'should collapse item', 'should end editing', 'should expand item', 'should open( untitled)?', 'should quit( after last window closed)?', 'should select column', 'should select item', 'should select row', 'should select tab view item', 'should selection change', 'should zoom', 'shown', 'update menu item', 'update parameters', 'update toolbar item', 'was hidden', 'was miniaturized', 'will become active', 'will close', 'will dismiss', 'will display browser cell', 'will display cell', 'will display item cell', 'will display outline cell', 'will finish launching', 'will hide', 'will miniaturize', 'will move', 'will open', 'will pop up', 'will quit', 'will resign active', 'will resize( sub views)?', 'will select tab view item', 'will show', 'will zoom', 'write to file', 'zoomed'] end def self.studio_commands @studio_commands ||= ['animate', 'append', 'call method', 'center', 'close drawer', 'close panel', 'display', 'display alert', 'display dialog', 'display panel', 'go', 'hide', 'highlight', 'increment', 'item for', 'load image', 'load movie', 'load nib', 'load panel', 'load sound', 'localized string', 'lock focus', 'log', 'open drawer', 'path for', 'pause', 'perform action', 'play', 'register', 'resume', 'scroll', 'select( all)?', 'show', 'size to fit', 'start', 'step back', 'step forward', 'stop', 'synchronize', 'unlock focus', 'update'] end def self.studio_properties @studio_properties ||= ['accepts arrow key', 'action method', 'active', 'alignment', 'allowed identifiers', 'allows branch selection', 'allows column reordering', 'allows column resizing', 'allows column selection', 'allows customization', 'allows editing text attributes', 'allows empty selection', 'allows mixed state', 'allows multiple selection', 'allows reordering', 'allows undo', 'alpha( value)?', 'alternate image', 'alternate increment value', 'alternate title', 'animation delay', 'associated file name', 'associated object', 'auto completes', 'auto display', 'auto enables items', 'auto repeat', 'auto resizes( outline column)?', 'auto save expanded items', 'auto save name', 'auto save table columns', 'auto saves configuration', 'auto scroll', 'auto sizes all columns to fit', 'auto sizes cells', 'background color', 'bezel state', 'bezel style', 'bezeled', 'border rect', 'border type', 'bordered', 'bounds( rotation)?', 'box type', 'button returned', 'button type', 'can choose directories', 'can choose files', 'can draw', 'can hide', 'cell( (background color|size|type))?', 'characters', 'class', 'click count', 'clicked( data)? column', 'clicked data item', 'clicked( data)? row', 'closeable', 'collating', 'color( (mode|panel))', 'command key down', 'configuration', 'content(s| (size|view( margins)?))?', 'context', 'continuous', 'control key down', 'control size', 'control tint', 'control view', 'controller visible', 'coordinate system', 'copies( on scroll)?', 'corner view', 'current cell', 'current column', 'current( field)? editor', 'current( menu)? item', 'current row', 'current tab view item', 'data source', 'default identifiers', 'delta (x|y|z)', 'destination window', 'directory', 'display mode', 'displayed cell', 'document( (edited|rect|view))?', 'double value', 'dragged column', 'dragged distance', 'dragged items', 'draws( cell)? background', 'draws grid', 'dynamically scrolls', 'echos bullets', 'edge', 'editable', 'edited( data)? column', 'edited data item', 'edited( data)? row', 'enabled', 'enclosing scroll view', 'ending page', 'error handling', 'event number', 'event type', 'excluded from windows menu', 'executable path', 'expanded', 'fax number', 'field editor', 'file kind', 'file name', 'file type', 'first responder', 'first visible column', 'flipped', 'floating', 'font( panel)?', 'formatter', 'frameworks path', 'frontmost', 'gave up', 'grid color', 'has data items', 'has horizontal ruler', 'has horizontal scroller', 'has parent data item', 'has resize indicator', 'has shadow', 'has sub menu', 'has vertical ruler', 'has vertical scroller', 'header cell', 'header view', 'hidden', 'hides when deactivated', 'highlights by', 'horizontal line scroll', 'horizontal page scroll', 'horizontal ruler view', 'horizontally resizable', 'icon image', 'id', 'identifier', 'ignores multiple clicks', 'image( (alignment|dims when disabled|frame style|scaling))?', 'imports graphics', 'increment value', 'indentation per level', 'indeterminate', 'index', 'integer value', 'intercell spacing', 'item height', 'key( (code|equivalent( modifier)?|window))?', 'knob thickness', 'label', 'last( visible)? column', 'leading offset', 'leaf', 'level', 'line scroll', 'loaded', 'localized sort', 'location', 'loop mode', 'main( (bunde|menu|window))?', 'marker follows cell', 'matrix mode', 'maximum( content)? size', 'maximum visible columns', 'menu( form representation)?', 'miniaturizable', 'miniaturized', 'minimized image', 'minimized title', 'minimum column width', 'minimum( content)? size', 'modal', 'modified', 'mouse down state', 'movie( (controller|file|rect))?', 'muted', 'name', 'needs display', 'next state', 'next text', 'number of tick marks', 'only tick mark values', 'opaque', 'open panel', 'option key down', 'outline table column', 'page scroll', 'pages across', 'pages down', 'palette label', 'pane splitter', 'parent data item', 'parent window', 'pasteboard', 'path( (names|separator))?', 'playing', 'plays every frame', 'plays selection only', 'position', 'preferred edge', 'preferred type', 'pressure', 'previous text', 'prompt', 'properties', 'prototype cell', 'pulls down', 'rate', 'released when closed', 'repeated', 'requested print time', 'required file type', 'resizable', 'resized column', 'resource path', 'returns records', 'reuses columns', 'rich text', 'roll over', 'row height', 'rulers visible', 'save panel', 'scripts path', 'scrollable', 'selectable( identifiers)?', 'selected cell', 'selected( data)? columns?', 'selected data items?', 'selected( data)? rows?', 'selected item identifier', 'selection by rect', 'send action on arrow key', 'sends action when done editing', 'separates columns', 'separator item', 'sequence number', 'services menu', 'shared frameworks path', 'shared support path', 'sheet', 'shift key down', 'shows alpha', 'shows state by', 'size( mode)?', 'smart insert delete enabled', 'sort case sensitivity', 'sort column', 'sort order', 'sort type', 'sorted( data rows)?', 'sound', 'source( mask)?', 'spell checking enabled', 'starting page', 'state', 'string value', 'sub menu', 'super menu', 'super view', 'tab key traverses cells', 'tab state', 'tab type', 'tab view', 'table view', 'tag', 'target( printer)?', 'text color', 'text container insert', 'text container origin', 'text returned', 'tick mark position', 'time stamp', 'title(d| (cell|font|height|position|rect))?', 'tool tip', 'toolbar', 'trailing offset', 'transparent', 'treat packages as directories', 'truncated labels', 'types', 'unmodified characters', 'update views', 'use sort indicator', 'user defaults', 'uses data source', 'uses ruler', 'uses threaded animation', 'uses title from previous column', 'value wraps', 'version', 'vertical( (line scroll|page scroll|ruler view))?', 'vertically resizable', 'view', 'visible( document rect)?', 'volume', 'width', 'window', 'windows menu', 'wraps', 'zoomable', 'zoomed'] end operators = %r(\b(#{self.operators.to_a.join('|')})\b) classes = %r(\b(as )(#{self.classes.to_a.join('|')})\b) literals = %r(\b(#{self.literals.to_a.join('|')})\b) commands = %r(\b(#{self.commands.to_a.join('|')})\b) controls = %r(\b(#{self.controls.to_a.join('|')})\b) declarations = %r(\b(#{self.declarations.to_a.join('|')})\b) reserved = %r(\b(#{self.reserved.to_a.join('|')})\b) builtins = %r(\b(#{self.builtins.to_a.join('|')})s?\b) handler_params = %r(\b(#{self.handler_params.to_a.join('|')})\b) references = %r(\b(#{self.references.to_a.join('|')})\b) studio_properties = %r(\b(#{self.studio_properties.to_a.join('|')})\b) studio_classes = %r(\b(#{self.studio_classes.to_a.join('|')})s?\b) studio_commands = %r(\b(#{self.studio_commands.to_a.join('|')})\b) identifiers = %r(\b([a-zA-Z]\w*)\b) state :root do rule %r/\s+/, Text::Whitespace rule %r/¬\n/, Literal::String::Escape rule %r/'s\s+/, Text rule %r/(--|#).*?$/, Comment::Single rule %r/\(\*/, Comment::Multiline rule %r/[\(\){}!,.:]/, Punctuation rule %r/(«)([^»]+)(»)/ do |match| token Text, match[1] token Name::Builtin, match[2] token Text, match[3] end rule %r/\b((?:considering|ignoring)\s*)(application responses|case|diacriticals|hyphens|numeric strings|punctuation|white space)/ do |match| token Keyword, match[1] token Name::Builtin, match[2] end rule %r/(-|\*|\+|&|≠|>=?|<=?|=|≥|≤|\/|÷|\^)/, Operator rule operators, Operator::Word rule %r/^(\s*(?:on|end)\s+)'r'(%s)/ do |match| token Keyword, match[1] token Name::Function, match[2] end rule %r/^(\s*)(in|on|script|to)(\s+)/ do |match| token Text, match[1] token Keyword, match[2] token Text, match[3] end rule classes do |match| token Keyword, match[1] token Name::Class, match[2] end rule literals, Name::Builtin rule commands, Name::Builtin rule controls, Keyword rule declarations, Keyword rule reserved, Name::Builtin rule builtins, Name::Builtin rule handler_params, Name::Builtin rule studio_properties, Name::Attribute rule studio_classes, Name::Builtin rule studio_commands, Name::Builtin rule references, Name::Builtin rule %r/"(\\\\|\\"|[^"])*"/, Literal::String::Double rule identifiers, Name::Variable rule %r/[-+]?(\d+\.\d*|\d*\.\d+)(E[-+][0-9]+)?/, Literal::Number::Float rule %r/[-+]?\d+/, Literal::Number::Integer end end end end rouge-3.28.0/lib/rouge/lexers/armasm.rb000066400000000000000000000125301417417255300177350ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class ArmAsm < RegexLexer title "ArmAsm" desc "Arm assembly syntax" tag 'armasm' filenames '*.s' def self.preproc_keyword @preproc_keyword ||= %w( define elif else endif error if ifdef ifndef include line pragma undef warning ) end def self.file_directive @file_directive ||= %w( BIN GET INCBIN INCLUDE LNK ) end def self.general_directive @general_directive ||= %w( ALIAS ALIGN AOF AOUT AREA ARM ASSERT ATTR CN CODE16 CODE32 COMMON CP DATA DCB DCD DCDO DCDU DCFD DCFDU DCFH DCFHU DCFS DCFSU DCI DCI.N DCI.W DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FN FRAME FUNCTION GBLA GBLL GBLS GLOBAL IF IMPORT INFO KEEP LCLA LCLL LCLS LEADR LEAF LTORG MACRO MAP MEND MEXIT NOFP OPT ORG PRESERVE8 PROC QN RELOC REQUIRE REQUIRE8 RLIST RN ROUT SETA SETL SETS SN SPACE STRONG SUBT THUMB THUMBX TTL WEND WHILE \[ \] [|!#*=%&^] ) end def self.shift_or_condition @shift_or_condition ||= %w( ASR LSL LSR ROR RRX AL CC CS EQ GE GT HI HS LE LO LS LT MI NE PL VC VS asr lsl lsr ror rrx al cc cs eq ge gt hi hs le lo ls lt mi ne pl vc vs ) end def self.builtin @builtin ||= %w( ARCHITECTURE AREANAME ARMASM_VERSION CODESIZE COMMANDLINE CONFIG CPU ENDIAN FALSE FPIC FPU INPUTFILE INTER LINENUM LINENUMUP LINENUMUPPER OBJASM_VERSION OPT PC PCSTOREOFFSET REENTRANT ROPI RWPI TRUE VAR ) end def self.operator @operator ||= %w( AND BASE CC CC_ENCODING CHR DEF EOR FATTR FEXEC FLOAD FSIZE INDEX LAND LEFT LEN LEOR LNOT LOR LOWERCASE MOD NOT OR RCONST REVERSE_CC RIGHT ROL ROR SHL SHR STR TARGET_ARCH_[0-9A-Z_]+ TARGET_FEATURE_[0-9A-Z_]+ TARGET_FPU_[A-Z_] TARGET_PROFILE_[ARM] UAL UPPERCASE ) end state :root do rule %r/\n/, Text rule %r/^([ \t]*)(#[ \t]*(?:(?:#{ArmAsm.preproc_keyword.join('|')})(?:[ \t].*)?)?)(\n)/ do groups Text, Comment::Preproc, Text end rule %r/[ \t]+/, Text, :command rule %r/;.*/, Comment rule %r/\$[a-z_]\w*\.?/i, Name::Namespace # variable substitution or macro argument rule %r/\w+|\|[^|\n]+\|/, Name::Label end state :command do rule %r/\n/, Text, :pop! rule %r/[ \t]+/ do |m| token Text goto :args end rule %r/;.*/, Comment, :pop! rule %r/(?:#{ArmAsm.file_directive.join('|')})\b/ do |m| token Keyword goto :filespec end rule %r/(?:#{ArmAsm.general_directive.join('|')})(?=[; \t\n])/, Keyword rule %r/(?:[A-Z][\dA-Z]*|[a-z][\da-z]*)(?:\.[NWnw])?(?:\.[DFIPSUdfipsu]?(?:8|16|32|64)?){,3}\b/, Name::Builtin # rather than attempt to list all opcodes, rely on all-uppercase or all-lowercase rule rule %r/[a-z_]\w*|\|[^|\n]+\|/i, Name::Function # probably a macro name rule %r/\$[a-z]\w*\.?/i, Name::Namespace end state :args do rule %r/\n/, Text, :pop! rule %r/[ \t]+/, Text rule %r/;.*/, Comment, :pop! rule %r/(?:#{ArmAsm.shift_or_condition.join('|')})\b/, Name::Builtin rule %r/[a-z_]\w*|\|[^|\n]+\|/i, Name::Variable # various types of symbol rule %r/%[bf]?[at]?\d+(?:[a-z_]\w*)?/i, Name::Label rule %r/(?:&|0x)\h+(?!p)/i, Literal::Number::Hex rule %r/(?:&|0x)[.\h]+(?:p[-+]?\d+)?/i, Literal::Number::Float rule %r/0f_\h{8}|0d_\h{16}/i, Literal::Number::Float rule %r/(?:2_[01]+|3_[0-2]+|4_[0-3]+|5_[0-4]+|6_[0-5]+|7_[0-6]+|8_[0-7]+|9_[0-8]+|\d+)(?!e)/i, Literal::Number::Integer rule %r/(?:2_[.01]+|3_[.0-2]+|4_[.0-3]+|5_[.0-4]+|6_[.0-5]+|7_[.0-6]+|8_[.0-7]+|9_[.0-8]+|[.\d]+)(?:e[-+]?\d+)?/i, Literal::Number::Float rule %r/[@:](?=[ \t]*(?:8|16|32|64|128|256)[^\d])/, Operator rule %r/[.@]|\{(?:#{ArmAsm.builtin.join('|')})\}/, Name::Constant rule %r/[-!#%&()*+,\/<=>?^{|}]|\[|\]|!=|&&|\/=|<<|<=|<>|==|><|>=|>>|\|\||:(?:#{ArmAsm.operator.join('|')}):/, Operator rule %r/\$[a-z]\w*\.?/i, Name::Namespace rule %r/'/ do |m| token Literal::String::Char goto :singlequoted end rule %r/"/ do |m| token Literal::String::Double goto :doublequoted end end state :singlequoted do rule %r/\n/, Text, :pop! rule %r/\$\$/, Literal::String::Char rule %r/\$[a-z]\w*\.?/i, Name::Namespace rule %r/'/ do |m| token Literal::String::Char goto :args end rule %r/[^$'\n]+/, Literal::String::Char end state :doublequoted do rule %r/\n/, Text, :pop! rule %r/\$\$/, Literal::String::Double rule %r/\$[a-z]\w*\.?/i, Name::Namespace rule %r/"/ do |m| token Literal::String::Double goto :args end rule %r/[^$"\n]+/, Literal::String::Double end state :filespec do rule %r/\n/, Text, :pop! rule %r/\$\$/, Literal::String::Other rule %r/\$[a-z]\w*\.?/i, Name::Namespace rule %r/[^$\n]+/, Literal::String::Other end end end end rouge-3.28.0/lib/rouge/lexers/augeas.rb000066400000000000000000000046221417417255300177250ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Augeas < RegexLexer title "Augeas" desc "The Augeas programming language (augeas.net)" tag 'augeas' aliases 'aug' filenames '*.aug' mimetypes 'text/x-augeas' def self.reserved @reserved ||= Set.new %w( _ let del store value counter seq key label autoload incl excl transform test get put in after set clear insa insb print_string print_regexp print_endline print_tree lens_ctype lens_atype lens_ktype lens_vtype lens_format_atype regexp_match ) end state :basic do rule %r/\s+/m, Text rule %r/\(\*/, Comment::Multiline, :comment end state :comment do rule %r/\*\)/, Comment::Multiline, :pop! rule %r/\(\*/, Comment::Multiline, :comment rule %r/[^*)]+/, Comment::Multiline rule %r/[*)]/, Comment::Multiline end state :root do mixin :basic rule %r/(:)(\w\w*)/ do groups Punctuation, Keyword::Type end rule %r/\w[\w']*/ do |m| name = m[0] if name == "module" token Keyword::Reserved push :module elsif self.class.reserved.include? name token Keyword::Reserved elsif name =~ /\A[A-Z]/ token Keyword::Namespace else token Name end end rule %r/"/, Str, :string rule %r/\//, Str, :regexp rule %r([-*+.=?\|]+), Operator rule %r/[\[\](){}:;]/, Punctuation end state :module do rule %r/\s+/, Text rule %r/[A-Z][a-zA-Z0-9_.]*/, Name::Namespace, :pop! end state :regexp do rule %r/\//, Str::Regex, :pop! rule %r/[^\\\/]+/, Str::Regex rule %r/\\[\\\/]/, Str::Regex rule %r/\\/, Str::Regex end state :string do rule %r/"/, Str, :pop! rule %r/\\/, Str::Escape, :escape rule %r/[^\\"]+/, Str end state :escape do rule %r/[abfnrtv"'&\\]/, Str::Escape, :pop! rule %r/\^[\]\[A-Z@\^_]/, Str::Escape, :pop! rule %r/o[0-7]+/i, Str::Escape, :pop! rule %r/x[\da-f]+/i, Str::Escape, :pop! rule %r/\d+/, Str::Escape, :pop! rule %r/\s+/, Str::Escape, :pop! rule %r/./, Str, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/awk.rb000066400000000000000000000076441417417255300172510ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Awk < RegexLexer title "Awk" desc "pattern-directed scanning and processing language" tag 'awk' filenames '*.awk' mimetypes 'application/x-awk' def self.detect?(text) return true if text.shebang?('awk') end id = /[$a-zA-Z_][a-zA-Z0-9_]*/ def self.keywords @keywords ||= Set.new %w( if else while for do break continue return next nextfile delete exit print printf getline ) end def self.declarations @declarations ||= Set.new %w(function) end def self.reserved @reserved ||= Set.new %w(BEGIN END) end def self.constants @constants ||= Set.new %w( CONVFMT FS NF NR FNR FILENAME RS OFS ORS OFMT SUBSEP ARGC ARGV ENVIRON ) end def self.builtins @builtins ||= %w( exp log sqrt sin cos atan2 length rand srand int substr index match split sub gsub sprintf system tolower toupper ) end state :comments_and_whitespace do rule %r/\s+/, Text rule %r(#.*?$), Comment::Single end state :expr_start do mixin :comments_and_whitespace rule %r(/) do token Str::Regex goto :regex end rule %r//, Text, :pop! end state :regex do rule %r(/) do token Str::Regex goto :regex_end end rule %r([^/]\n), Error, :pop! rule %r/\n/, Error, :pop! rule %r/\[\^/, Str::Escape, :regex_group rule %r/\[/, Str::Escape, :regex_group rule %r/\\./, Str::Escape rule %r{[(][?][:=+*/%\^!=]=?|in\b|\+\+|--|\|), Operator, :expr_start rule %r(&&|\|\||~!?), Operator, :expr_start rule %r/[(\[,]/, Punctuation, :expr_start rule %r/;/, Punctuation, :statement rule %r/[)\].]/, Punctuation rule %r/[?]/ do token Punctuation push :ternary push :expr_start end rule %r/[{}]/, Punctuation, :statement rule id do |m| if self.class.keywords.include? m[0] token Keyword push :expr_start elsif self.class.declarations.include? m[0] token Keyword::Declaration push :expr_start elsif self.class.reserved.include? m[0] token Keyword::Reserved elsif self.class.constants.include? m[0] token Keyword::Constant elsif self.class.builtins.include? m[0] token Name::Builtin elsif m[0] =~ /^\$/ token Name::Variable else token Name::Other end end rule %r/[0-9]+\.[0-9]+/, Num::Float rule %r/[0-9]+/, Num::Integer rule %r/"(\\[\\"]|[^"])*"/, Str::Double rule %r/:/, Punctuation end state :statement do rule %r/[{}]/, Punctuation mixin :expr_start end state :ternary do rule %r/:/ do token Punctuation goto :expr_start end mixin :root end end end end rouge-3.28.0/lib/rouge/lexers/batchfile.rb000066400000000000000000000130331417417255300203750ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Batchfile < RegexLexer title "Batchfile" desc "Windows Batch File" tag 'batchfile' aliases 'bat', 'batch', 'dosbatch', 'winbatch' filenames '*.bat', '*.cmd' mimetypes 'application/bat', 'application/x-bat', 'application/x-msdos-program' def self.keywords @keywords ||= %w( if else for in do goto call exit ) end def self.operator_words @operator_words ||= %w( exist defined errorlevel cmdextversion not equ neq lss leq gtr geq ) end def self.devices @devices ||= %w( con prn aux nul com1 com2 com3 com4 com5 com6 com7 com8 com9 lpt1 lpt2 lpt3 lpt4 lpt5 lpt6 lpt7 lpt8 lpt9 ) end def self.builtin_commands @builtin_commands ||= %w( assoc attrib break bcdedit cacls cd chcp chdir chkdsk chkntfs choice cls cmd color comp compact convert copy date del dir diskpart doskey dpath driverquery echo endlocal erase fc find findstr format fsutil ftype gpresult graftabl help icacls label md mkdir mklink mode more move openfiles path pause popd print prompt pushd rd recover ren rename replace rmdir robocopy setlocal sc schtasks shift shutdown sort start subst systeminfo takeown tasklist taskkill time timeout title tree type ver verify vol xcopy waitfor wmic ) end def self.other_commands @other_commands ||= %w( addusers admodcmd ansicon arp at bcdboot bitsadmin browstat certreq certutil change cidiag cipher cleanmgr clip cmdkey compress convertcp coreinfo csccmd csvde cscript curl debug defrag delprof deltree devcon diamond dirquota diruse diskshadow diskuse dism dnscmd dsacls dsadd dsget dsquery dsmod dsmove dsrm dsmgmt dsregcmd edlin eventcreate expand extract fdisk fltmc forfiles freedisk ftp getmac gpupdate hostname ifmember inuse ipconfig kill lgpo lodctr logman logoff logtime makecab mapisend mbsacli mem mountvol moveuser msg mshta msiexec msinfo32 mstsc nbtstat net net1 netdom netsh netstat nlsinfo nltest now nslookup ntbackup ntdsutil ntoskrnl ntrights nvspbind pathping perms ping portqry powercfg pngout pnputil printbrm prncnfg prnmngr procdump psexec psfile psgetsid psinfo pskill pslist psloggedon psloglist pspasswd psping psservice psshutdown pssuspend qbasic qgrep qprocess query quser qwinsta rasdial reg reg1 regdump regedt32 regsvr32 regini reset restore rundll32 rmtshare route rpcping run runas scandisk setspn setx sfc share shellrunas shortcut sigcheck sleep slmgr strings subinacl sysmon telnet tftp tlist touch tracerpt tracert tscon tsdiscon tskill tttracer typeperf tzutil undelete unformat verifier vmconnect vssadmin w32tm wbadmin wecutil wevtutil wget where whoami windiff winrm winrs wpeutil wpr wusa wuauclt wscript ) end def self.attributes @attributes ||= %w( on off disable enableextensions enabledelayedexpansion ) end state :basic do # Comments rule %r/@?\brem\b.*$/i, Comment # Empty Labels rule %r/^::.*$/, Comment # Labels rule %r/:[a-z]+/i, Name::Label rule %r/([a-z]\w*)(\.exe|com|bat|cmd|msi)?/i do |m| if self.class.devices.include? m[1] groups Keyword::Reserved, Error elsif self.class.keywords.include? m[1] groups Keyword, Error elsif self.class.operator_words.include? m[1] groups Operator::Word, Error elsif self.class.builtin_commands.include? m[1] token Name::Builtin elsif self.class.other_commands.include? m[1] token Name::Builtin elsif self.class.attributes.include? m[1] groups Name::Attribute, Error elsif "set".casecmp m[1] groups Keyword::Declaration, Error else token Text end end rule %r/((?:[\/\+]|--?)[a-z]+)\s*/i, Name::Attribute mixin :expansions rule %r/[<>&|(){}\[\]\-+=;,~?*]/, Operator end state :escape do rule %r/\^./m, Str::Escape end state :expansions do # Normal and Delayed expansion rule %r/[%!]+([a-z_$@#]+)[%!]+/i, Name::Variable # For Variables rule %r/(\%+~?[a-z]+\d?)/i, Name::Variable::Magic end state :double_quotes do mixin :escape rule %r/["]/, Str::Double, :pop! mixin :expansions rule %r/[^\^"%!]+/, Str::Double end state :single_quotes do mixin :escape rule %r/[']/, Str::Single, :pop! mixin :expansions rule %r/[^\^'%!]+/, Str::Single end state :backtick do mixin :escape rule %r/[`]/, Str::Backtick, :pop! mixin :expansions rule %r/[^\^`%!]+/, Str::Backtick end state :data do rule %r/\s+/, Text rule %r/0x[0-9a-f]+/i, Literal::Number::Hex rule %r/[0-9]/, Literal::Number rule %r/["]/, Str::Double, :double_quotes rule %r/[']/, Str::Single, :single_quotes rule %r/[`]/, Str::Backtick, :backtick rule %r/[^\s&|()\[\]{}\^=;!%+\-,"'`~?*]+/, Text mixin :escape end state :root do mixin :basic mixin :data end end end end rouge-3.28.0/lib/rouge/lexers/bbcbasic.rb000066400000000000000000000103721417417255300202070ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class BBCBASIC < RegexLexer title "BBCBASIC" desc "BBC BASIC syntax" tag 'bbcbasic' filenames '*,fd1' def self.punctuation @punctuation ||= %w( [,;'~] SPC TAB ) end def self.function @function ||= %w( ABS ACS ADVAL ASC ASN ATN BEATS BEAT BGET# CHR\$ COS COUNT DEG DIM EOF# ERL ERR EVAL EXP EXT# FN GET\$# GET\$ GET HIMEM INKEY\$ INKEY INSTR INT LEFT\$ LEN LN LOG LOMEM MID\$ OPENIN OPENOUT OPENUP PAGE POINT POS PTR# RAD REPORT\$ RIGHT\$ RND SGN SIN SQR STR\$ STRING\$ SUM SUMLEN TAN TEMPO TIME\$ TIME TOP USR VAL VPOS ) end def self.statement @statement ||= %w( BEATS BPUT# CALL CASE CHAIN CLEAR CLG CLOSE# CLS COLOR COLOUR DATA ELSE ENDCASE ENDIF ENDPROC ENDWHILE END ENVELOPE FOR GCOL GOSUB GOTO IF INSTALL LET LIBRARY MODE NEXT OFF OF ON ORIGIN OSCI OTHERWISE OVERLAY PLOT PRINT# PRINT PROC QUIT READ REPEAT REPORT RETURN SOUND STEP STEREO STOP SWAP SYS THEN TINT TO VDU VOICES VOICE UNTIL WAIT WHEN WHILE WIDTH ) end def self.operator @operator ||= %w( << <= <> < >= >>> >> > [-!$()*+/=?^|] AND DIV EOR MOD NOT OR ) end def self.constant @constant ||= %w( FALSE TRUE ) end state :expression do rule %r/#{BBCBASIC.function.join('|')}/o, Name::Builtin # function or pseudo-variable rule %r/#{BBCBASIC.operator.join('|')}/o, Operator rule %r/#{BBCBASIC.constant.join('|')}/o, Name::Constant rule %r/"[^"]*"/o, Literal::String rule %r/[a-z_`][\w`]*[$%]?/io, Name::Variable rule %r/@%/o, Name::Variable rule %r/[\d.]+/o, Literal::Number rule %r/%[01]+/o, Literal::Number::Bin rule %r/&[\h]+/o, Literal::Number::Hex end state :root do rule %r/(:+)( *)(\*)(.*)/ do groups Punctuation, Text, Keyword, Text # CLI command end rule %r/(\n+ *)(\*)(.*)/ do groups Text, Keyword, Text # CLI command end rule %r/(ELSE|OTHERWISE|REPEAT|THEN)( *)(\*)(.*)/ do groups Keyword, Text, Keyword, Text # CLI command end rule %r/[ \n]+/o, Text rule %r/:+/o, Punctuation rule %r/[\[]/o, Keyword, :assembly1 rule %r/REM *>.*/o, Comment::Special rule %r/REM.*/o, Comment rule %r/(?:#{BBCBASIC.statement.join('|')}|CIRCLE(?: *FILL)?|DEF *(?:FN|PROC)|DRAW(?: *BY)?|DIM(?!\()|ELLIPSE(?: *FILL)?|ERROR(?: *EXT)?|FILL(?: *BY)?|INPUT(?:#| *LINE)?|LINE(?: *INPUT)?|LOCAL(?: *DATA| *ERROR)?|MOUSE(?: *COLOUR| *OFF| *ON| *RECTANGLE| *STEP| *TO)?|MOVE(?: *BY)?|ON(?! *ERROR)|ON *ERROR *(?:LOCAL|OFF)?|POINT(?: *BY)?(?!\()|RECTANGE(?: *FILL)?|RESTORE(?: *DATA| *ERROR)?|TRACE(?: *CLOSE| *ENDPROC| *OFF| *STEP(?: *FN| *ON| *PROC)?| *TO)?)/o, Keyword mixin :expression rule %r/#{BBCBASIC.punctuation.join('|')}/o, Punctuation end # Assembly statements are parsed as # {label} {directive|opcode |']' {expressions}} {comment} # Technically, you don't need whitespace between opcodes and arguments, # but this is rare in uncrunched source and trying to enumerate all # possible opcodes here is impractical so we colour it as though # the whitespace is required. Opcodes and directives can only easily be # distinguished from the symbols that make up expressions by looking at # their position within the statement. Similarly, ']' is treated as a # keyword at the start of a statement or as punctuation elsewhere. This # requires a two-state state machine. state :assembly1 do rule %r/ +/o, Text rule %r/]/o, Keyword, :pop! rule %r/[:\n]/o, Punctuation rule %r/\.[a-z_`][\w`]*%? */io, Name::Label rule %r/(?:REM|;)[^:\n]*/o, Comment rule %r/[^ :\n]+/o, Keyword, :assembly2 end state :assembly2 do rule %r/ +/o, Text rule %r/[:\n]/o, Punctuation, :pop! rule %r/(?:REM|;)[^:\n]*/o, Comment, :pop! mixin :expression rule %r/[!#,@\[\]^{}]/, Punctuation end end end end rouge-3.28.0/lib/rouge/lexers/bibtex.rb000066400000000000000000000053321417417255300177340ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # Regular expressions based on https://github.com/SaswatPadhi/prismjs-bibtex # and https://github.com/alecthomas/chroma/blob/master/lexers/b/bibtex.go module Rouge module Lexers class BibTeX < RegexLexer title 'BibTeX' desc "BibTeX" tag 'bibtex' aliases 'bib' filenames '*.bib' valid_punctuation = Regexp.quote("@!$&.\\:;<>?[]^`|~*/+-") valid_name = /[a-z_#{valid_punctuation}][\w#{valid_punctuation}]*/io state :root do mixin :whitespace rule %r/@(#{valid_name})/o do |m| match = m[1].downcase if match == "comment" token Comment elsif match == "preamble" token Name::Class push :closing_brace push :value push :opening_brace elsif match == "string" token Name::Class push :closing_brace push :field push :opening_brace else token Name::Class push :closing_brace push :command_body push :opening_brace end end rule %r/.+/, Comment end state :opening_brace do mixin :whitespace rule %r/[{(]/, Punctuation, :pop! end state :closing_brace do mixin :whitespace rule %r/[})]/, Punctuation, :pop! end state :command_body do mixin :whitespace rule %r/[^\s\,\}]+/ do token Name::Label pop! push :fields end end state :fields do mixin :whitespace rule %r/,/, Punctuation, :field rule(//) { pop! } end state :field do mixin :whitespace rule valid_name do token Name::Attribute push :value push :equal_sign end rule(//) { pop! } end state :equal_sign do mixin :whitespace rule %r/=/, Punctuation, :pop! end state :value do mixin :whitespace rule valid_name, Name::Variable rule %r/"/, Literal::String, :quoted_string rule %r/\{/, Literal::String, :braced_string rule %r/\d+/, Literal::Number rule %r/#/, Punctuation rule(//) { pop! } end state :quoted_string do rule %r/\{/, Literal::String, :braced_string rule %r/"/, Literal::String, :pop! rule %r/[^\{\"]+/, Literal::String end state :braced_string do rule %r/\{/, Literal::String, :braced_string rule %r/\}/, Literal::String, :pop! rule %r/[^\{\}]+/, Literal::String end state :whitespace do rule %r/\s+/, Text end end end end rouge-3.28.0/lib/rouge/lexers/biml.rb000066400000000000000000000017771417417255300174130ustar00rootroot00000000000000# frozen_string_literal: true module Rouge module Lexers load_lexer 'xml.rb' class BIML < XML title "BIML" desc "BIML, Business Intelligence Markup Language" tag 'biml' filenames '*.biml' def self.detect?(text) return true if text =~ /<\s*Biml\b/ end prepend :root do rule %r(<#\@\s*)m, Name::Tag, :directive_tag rule %r(<#[=]?\s*)m, Name::Tag, :directive_as_csharp end prepend :attr do #TODO: how to deal with embedded <# tags inside a attribute string #rule %r("<#[=]?\s*)m, Name::Tag, :directive_as_csharp end state :directive_as_csharp do rule %r/\s*#>\s*/m, Name::Tag, :pop! rule %r(.*?(?=\s*#>\s*))m do delegate CSharp end end state :directive_tag do rule %r/\s+/m, Text rule %r/[\w.:-]+\s*=/m, Name::Attribute, :attr rule %r/\w+\s*/m, Name::Attribute rule %r(/?\s*#>), Name::Tag, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/bpf.rb000066400000000000000000000075561417417255300172400ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class BPF < RegexLexer title "BPF" desc "BPF bytecode syntax" tag 'bpf' TYPE_KEYWORDS = %w( u8 u16 u32 u64 ll ).join('|') MISC_KEYWORDS = %w( be16 be32 be64 exit lock map ).join('|') state :root do # Line numbers and hexadecimal output from bpftool/objdump rule %r/(\d+)(:)(\s+)(\(\h{2}\))/i do groups Generic::Lineno, Punctuation, Text::Whitespace, Generic end rule %r/(\d+)(:)(\s+)((?:\h{2} ){8})/i do groups Generic::Lineno, Punctuation, Text::Whitespace, Generic end rule %r/(\d+)(:)(\s+)/i do groups Generic::Lineno, Punctuation, Text::Whitespace end # Calls to helpers rule %r/(call)(\s+)(\d+)/i do groups Keyword, Text::Whitespace, Literal::Number::Integer end rule %r/(call)(\s+)(\w+)(#)(\d+)/i do groups Keyword, Text::Whitespace, Name::Builtin, Punctuation, Literal::Number::Integer end # Unconditional jumps rule %r/(goto)(\s*)(\+\d+)?(\s*)(?)/i do groups Keyword, Text::Whitespace, Literal::Number::Integer, Text::Whitespace, Name::Label end # Conditional jumps rule %r/(if)(\s+)([rw]\d+)(\s*)([s!=<>]+)(\s*)(0x\h+|[-]?\d+)(\s*)(goto)(\s*)(\+\d+)?(\s*)(?)/i do groups Keyword, Text::Whitespace, Name, Text::Whitespace, Operator, Text::Whitespace, Literal::Number, Text::Whitespace, Keyword, Text::Whitespace, Literal::Number::Integer, Text::Whitespace, Name::Label end rule %r/(if)(\s+)([rw]\d+)(\s*)([s!=<>]+)(\s*)([rw]\d+)(\s*)(goto)(\s*)(\+\d+)?(\s*)(?)/i do groups Keyword, Text::Whitespace, Name, Text::Whitespace, Operator, Text::Whitespace, Name, Text::Whitespace, Keyword, Text::Whitespace, Literal::Number::Integer, Text::Whitespace, Name::Label end # Dereferences rule %r/(\*)(\s*)(\()(#{TYPE_KEYWORDS})(\s*)(\*)(\))/i do groups Operator, Text::Whitespace, Punctuation, Keyword::Type, Text::Whitespace, Operator, Punctuation push :address end # Operators rule %r/[+-\/\*&|><^s]{0,3}=/i, Operator # Registers rule %r/([+-]?)([rw]\d+)/i do groups Punctuation, Name end # Comments rule %r/\/\//, Comment::Single, :linecomment rule %r/\/\*/, Comment::Multiline, :multilinescomment rule %r/#{MISC_KEYWORDS}/i, Keyword # Literals and global objects (maps) refered by name rule %r/(0x\h+|[-]?\d+)(\s*)(ll)?/i do groups Literal::Number, Text::Whitespace, Keyword::Type end rule %r/(\w+)(\s*)(ll)/i do groups Name, Text::Whitespace, Keyword::Type end # Labels rule %r/(\w+)(\s*)(:)/i do groups Name::Label, Text::Whitespace, Punctuation end rule %r{.}m, Text end state :address do # Address is offset from register rule %r/(\()([rw]\d+)(\s*)([+-])(\s*)(\d+)(\))/i do groups Punctuation, Name, Text::Whitespace, Operator, Text::Whitespace, Literal::Number::Integer, Punctuation pop! end # Address is array subscript rule %r/(\w+)(\[)(\d+)(\])/i do groups Name, Punctuation, Literal::Number::Integer, Punctuation pop! end rule %r/(\w+)(\[)([rw]\d+)(\])/i do groups Name, Punctuation, Name, Punctuation pop! end end state :linecomment do rule %r/\n/, Comment::Single, :pop! rule %r/.+/, Comment::Single end state :multilinescomment do rule %r/\*\//, Comment::Multiline, :pop! rule %r/([^\*\/]+)/, Comment::Multiline rule %r/([\*\/])/, Comment::Multiline end end end end rouge-3.28.0/lib/rouge/lexers/brainfuck.rb000066400000000000000000000022411417417255300204170ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Brainfuck < RegexLexer tag 'brainfuck' filenames '*.b', '*.bf' mimetypes 'text/x-brainfuck' title "Brainfuck" desc "The Brainfuck programming language" start { push :bol } state :bol do rule %r/\s+/m, Text rule %r/\[/, Comment::Multiline, :comment_multi rule(//) { pop! } end state :root do rule %r/\]/, Error rule %r/\[/, Punctuation, :loop mixin :comment_single mixin :commands end state :comment_multi do rule %r/\[/, Comment::Multiline, :comment_multi rule %r/\]/, Comment::Multiline, :pop! rule %r/[^\[\]]+?/m, Comment::Multiline end state :comment_single do rule %r/[^><+\-.,\[\]]+/, Comment::Single end state :loop do rule %r/\[/, Punctuation, :loop rule %r/\]/, Punctuation, :pop! mixin :comment_single mixin :commands end state :commands do rule %r/[><]+/, Name::Builtin rule %r/[+\-.,]+/, Name::Function end end end end rouge-3.28.0/lib/rouge/lexers/brightscript.rb000066400000000000000000000155341417417255300211700ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Brightscript < RegexLexer title "BrightScript" desc "BrightScript Programming Language (https://developer.roku.com/en-ca/docs/references/brightscript/language/brightscript-language-reference.md)" tag 'brightscript' aliases 'bs', 'brs' filenames '*.brs' # https://developer.roku.com/en-ca/docs/references/brightscript/language/global-utility-functions.md # https://developer.roku.com/en-ca/docs/references/brightscript/language/global-string-functions.md # https://developer.roku.com/en-ca/docs/references/brightscript/language/global-math-functions.md def self.name_builtin @name_builtin ||= Set.new %w( ABS ASC ATN CDBL CHR CINT CONTROL COPYFILE COS CREATEDIRECTORY CSNG DELETEDIRECTORY DELETEFILE EXP FINDMEMBERFUNCTION FINDNODE FIX FORMATDRIVEFORMATJSON GETINTERFACE INSTR INT LCASE LEFT LEN LISTDIR LOG MATCHFILES MID MOVEFILE OBSERVEFIELD PARSEJSON PARSEXML READASCIIFILE REBOOTSYSTEM RIGHT RND RUNGARBAGECOLLECTOR SGN SIN SLEEP SQR STR STRI STRING STRINGI STRTOI SUBSTITUTE TANTEXTTOP TEXT TRUCASE UPTIME VALVISIBLE VISIBLE WAIT ) end # https://developer.roku.com/en-ca/docs/references/brightscript/language/reserved-words.md def self.keyword_reserved @keyword_reserved ||= Set.new %w( BOX CREATEOBJECT DIM EACH ELSE ELSEIF END ENDFUNCTION ENDIF ENDSUB ENDWHILE EVAL EXIT EXITWHILE FALSE FOR FUNCTION GETGLOBALAA GETLASTRUNCOMPILEERROR GETLASTRUNRUNTIMEERROR GOTO IF IN INVALID LET LINE_NUM M NEXT OBJFUN POS PRINT REM RETURN RUN STEP STOP SUB TAB TO TRUE TYPE WHILE ) end # These keywords are present in BrightScript, but not supported in standard .brs files def self.keyword_reserved_unsupported @keyword_reserved_unsupported ||= Set.new %w( CLASS CONST IMPORT LIBRARY NAMESPACE PRIVATE PROTECTED PUBLIC ) end # https://developer.roku.com/en-ca/docs/references/brightscript/language/expressions-variables-types.md def self.keyword_type @keyword_type ||= Set.new %w( BOOLEAN DIM DOUBLE DYNAMIC FLOAT FUNCTION INTEGER INTERFACE INVALID LONGINTEGER OBJECT STRING VOID ) end # https://developer.roku.com/en-ca/docs/references/brightscript/language/expressions-variables-types.md#operators def self.operator_word @operator_word ||= Set.new %w( AND AS MOD NOT OR THEN ) end # Scene graph components configured as builtins. See BrightScript component documentation e.g. # https://developer.roku.com/en-ca/docs/references/brightscript/components/roappinfo.md def self.builtins @builtins ||= Set.new %w( roAppendFile roAppInfo roAppManager roArray roAssociativeArray roAudioGuide roAudioMetadata roAudioPlayer roAudioPlayerEvent roAudioResourceroBitmap roBoolean roBoolean roBrightPackage roBrSub roButton roByteArray roCaptionRenderer roCaptionRendererEvent roCecInterface roCECStatusEvent roChannelStore roChannelStoreEvent roClockWidget roCodeRegistrationScreen roCodeRegistrationScreenEventroCompositor roControlDown roControlPort roControlPort roControlUp roCreateFile roDatagramReceiver roDatagramSender roDataGramSocket roDateTime roDeviceInfo roDeviceInfoEvent roDoubleroEVPCipher roEVPDigest roFileSystem roFileSystemEvent roFloat roFont roFontMetrics roFontRegistry roFunction roGlobal roGpio roGridScreen roGridScreenEvent roHdmiHotPlugEventroHdmiStatus roHdmiStatusEvent roHMAC roHttpAgent roImageCanvas roImageCanvasEvent roImageMetadata roImagePlayer roImageWidgetroInput roInputEvent roInt roInt roInvalid roInvalid roIRRemote roKeyboard roKeyboardPress roKeyboardScreen roKeyboardScreenEventroList roListScreen roListScreenEvent roLocalization roLongInteger roMessageDialog roMessageDialogEvent roMessagePort roMicrophone roMicrophoneEvent roNetworkConfiguration roOneLineDialog roOneLineDialogEventroParagraphScreen roParagraphScreenEvent roPath roPinEntryDialog roPinEntryDialogEvent roPinentryScreen roPosterScreen roPosterScreenEventroProgramGuide roQuadravoxButton roReadFile roRectangleroRegexroRegion roRegistry roRegistrySection roResourceManager roRSA roRssArticle roRssParser roScreen roSearchHistory roSearchScreen roSearchScreenEvent roSerialPort roSGNode roSGNodeEvent roSGScreenroSGScreenEvent roSlideShowroSlideShowEvent roSNS5 roSocketAddress roSocketEvent roSpringboardScreen roSpringboardScreenEventroSprite roStorageInfo roStreamSocket roStringroSystemLogroSystemLogEvent roSystemTime roTextFieldroTextScreen roTextScreenEvent roTextToSpeech roTextToSpeechEvent roTextureManager roTextureRequest roTextureRequestEventroTextWidget roTimer roTimespan roTouchScreen roTunerroTunerEvent roUniversalControlEvent roUrlEvent roUrlTransfer roVideoEvent roVideoInput roVideoMode roVideoPlayer roVideoPlayerEvent roVideoScreen roVideoScreenEventroWriteFile roXMLElement roXMLList ) end id = /[$a-z_][a-z0-9_]*/io state :root do rule %r/\s+/m, Text::Whitespace # https://developer.roku.com/en-ca/docs/references/brightscript/language/expressions-variables-types.md#comments rule %r/\'.*/, Comment::Single rule %r/REM.*/i, Comment::Single # https://developer.roku.com/en-ca/docs/references/brightscript/language/expressions-variables-types.md#operators rule %r([~!%^&*+=\|?:<>/-]), Operator rule %r/\d*\.\d+(e-?\d+)?/i, Num::Float rule %r/\d+[lu]*/i, Num::Integer rule %r/".*?"/, Str::Double rule %r/#{id}(?=\s*[(])/, Name::Function rule %r/[()\[\],.;{}]/, Punctuation rule id do |m| caseSensitiveChunk = m[0] caseInsensitiveChunk = m[0].upcase if self.class.builtins.include?(caseSensitiveChunk) token Keyword::Reserved elsif self.class.keyword_reserved.include?(caseInsensitiveChunk) token Keyword::Reserved elsif self.class.keyword_reserved_unsupported.include?(caseInsensitiveChunk) token Keyword::Reserved elsif self.class.keyword_type.include?(caseInsensitiveChunk) token Keyword::Type elsif self.class.name_builtin.include?(caseInsensitiveChunk) token Name::Builtin elsif self.class.operator_word.include?(caseInsensitiveChunk) token Operator::Word else token Name end end end end end end rouge-3.28.0/lib/rouge/lexers/bsl.rb000066400000000000000000000640751417417255300172500ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Bsl < RegexLexer title "1C (BSL)" desc "The 1C:Enterprise programming language" tag 'bsl' filenames '*.bsl', '*.os' KEYWORDS = /(?<=[^\wа-яё]|^)(?: КонецПроцедуры | EndProcedure | КонецФункции | EndFunction | Прервать | Break | Продолжить | Continue | Возврат | Return | Если | If | Иначе | Else | ИначеЕсли | ElsIf | Тогда | Then | КонецЕсли | EndIf | Попытка | Try | Исключение | Except | КонецПопытки | EndTry | Raise | ВызватьИсключение | Пока | While | Для | For | Каждого | Each | Из | In | По | To | Цикл | Do | КонецЦикла | EndDo | НЕ | NOT | И | AND | ИЛИ | OR | Новый | New | Процедура | Procedure | Функция | Function | Перем | Var | Экспорт | Export | Знач | Val )(?=[^\wа-яё]|$)/ix BUILTINS = /(?<=[^\wа-яё]|^)(?: СтрДлина|StrLen|СокрЛ|TrimL|СокрП|TrimR|СокрЛП|TrimAll|Лев|Left|Прав|Right|Сред|Mid|СтрНайти|StrFind|ВРег|Upper|НРег|Lower|ТРег|Title|Символ|Char|КодСимвола|CharCode|ПустаяСтрока|IsBlankString|СтрЗаменить|StrReplace|СтрЧислоСтрок|StrLineCount|СтрПолучитьСтроку|StrGetLine|СтрЧислоВхождений|StrOccurrenceCount|СтрСравнить|StrCompare|СтрНачинаетсяС|StrStartWith|СтрЗаканчиваетсяНа|StrEndsWith|СтрРазделить|StrSplit|СтрСоединить|StrConcat | Цел|Int|Окр|Round|ACos|ACos|ASin|ASin|ATan|ATan|Cos|Cos|Exp|Exp|Log|Log|Log10|Log10|Pow|Pow|Sin|Sin|Sqrt|Sqrt|Tan|Tan | Год|Year|Месяц|Month|День|Day|Час|Hour|Минута|Minute|Секунда|Second|НачалоГода|BegOfYear|НачалоДня|BegOfDay|НачалоКвартала|BegOfQuarter|НачалоМесяца|BegOfMonth|НачалоМинуты|BegOfMinute|НачалоНедели|BegOfWeek|НачалоЧаса|BegOfHour|КонецГода|EndOfYear|КонецДня|EndOfDay|КонецКвартала|EndOfQuarter|КонецМесяца|EndOfMonth|КонецМинуты|EndOfMinute|КонецНедели|EndOfWeek|КонецЧаса|EndOfHour|НеделяГода|WeekOfYear|ДеньГода|DayOfYear|ДеньНедели|WeekDay|ТекущаяДата|CurrentDate|ДобавитьМесяц|AddMonth | Тип|Type|ТипЗнч|TypeOf | Булево|Boolean|Число|Number|Строка|String|Дата|Date | ПоказатьВопрос|ShowQueryBox|Вопрос|DoQueryBox|ПоказатьПредупреждение|ShowMessageBox|Предупреждение|DoMessageBox|Сообщить|Message|ОчиститьСообщения|ClearMessages|ОповеститьОбИзменении|NotifyChanged|Состояние|Status|Сигнал|Beep|ПоказатьЗначение|ShowValue|ОткрытьЗначение|OpenValue|Оповестить|Notify|ОбработкаПрерыванияПользователя|UserInterruptProcessing|ОткрытьСодержаниеСправки|OpenHelpContent|ОткрытьИндексСправки|OpenHelpIndex|ОткрытьСправку|OpenHelp|ПоказатьИнформациюОбОшибке|ShowErrorInfo|КраткоеПредставлениеОшибки|BriefErrorDescription|ПодробноеПредставлениеОшибки|DetailErrorDescription|ПолучитьФорму|GetForm|ЗакрытьСправку|CloseHelp|ПоказатьОповещениеПользователя|ShowUserNotification|ОткрытьФорму|OpenForm|ОткрытьФормуМодально|OpenFormModal|АктивноеОкно|ActiveWindow|ВыполнитьОбработкуОповещения|ExecuteNotifyProcessing | ПоказатьВводЗначения|ShowInputValue|ВвестиЗначение|InputValue|ПоказатьВводЧисла|ShowInputNumber|ВвестиЧисло|InputNumber|ПоказатьВводСтроки|ShowInputString|ВвестиСтроку|InputString|ПоказатьВводДаты|ShowInputDate|ВвестиДату|InputDate | Формат|Format|ЧислоПрописью|NumberInWords|НСтр|NStr|ПредставлениеПериода|PeriodPresentation|СтрШаблон|StrTemplate | ПолучитьОбщийМакет|GetCommonTemplate|ПолучитьОбщуюФорму|GetCommonForm|ПредопределенноеЗначение|PredefinedValue|ПолучитьПолноеИмяПредопределенногоЗначения|GetPredefinedValueFullName | ПолучитьЗаголовокСистемы|GetCaption|ПолучитьСкоростьКлиентскогоСоединения|GetClientConnectionSpeed|ПодключитьОбработчикОжидания|AttachIdleHandler|УстановитьЗаголовокСистемы|SetCaption|ОтключитьОбработчикОжидания|DetachIdleHandler|ИмяКомпьютера|ComputerName|ЗавершитьРаботуСистемы|Exit|ИмяПользователя|UserName|ПрекратитьРаботуСистемы|Terminate|ПолноеИмяПользователя|UserFullName|ЗаблокироватьРаботуПользователя|LockApplication|КаталогПрограммы|BinDir|КаталогВременныхФайлов|TempFilesDir|ПравоДоступа|AccessRight|РольДоступна|IsInRole|ТекущийЯзык|CurrentLanguage|ТекущийКодЛокализации|CurrentLocaleCode|СтрокаСоединенияИнформационнойБазы|InfoBaseConnectionString|ПодключитьОбработчикОповещения|AttachNotificationHandler|ОтключитьОбработчикОповещения|DetachNotificationHandler|ПолучитьСообщенияПользователю|GetUserMessages|ПараметрыДоступа|AccessParameters|ПредставлениеПриложения|ApplicationPresentation|ТекущийЯзыкСистемы|CurrentSystemLanguage|ЗапуститьСистему|RunSystem|ТекущийРежимЗапуска|CurrentRunMode|УстановитьЧасовойПоясСеанса|SetSessionTimeZone|ЧасовойПоясСеанса|SessionTimeZone|ТекущаяДатаСеанса|CurrentSessionDate|УстановитьКраткийЗаголовокПриложения|SetShortApplicationCaption|ПолучитьКраткийЗаголовокПриложения|GetShortApplicationCaption|ПредставлениеПрава|RightPresentation|ВыполнитьПроверкуПравДоступа|VerifyAccessRights|РабочийКаталогДанныхПользователя|UserDataWorkDir|КаталогДокументов|DocumentsDir|ПолучитьИнформациюЭкрановКлиента|GetClientDisplaysInformation|ТекущийВариантОсновногоШрифтаКлиентскогоПриложения|ClientApplicationBaseFontCurrentVariant|ТекущийВариантИнтерфейсаКлиентскогоПриложения|ClientApplicationInterfaceCurrentVariant|УстановитьЗаголовокКлиентскогоПриложения|SetClientApplicationCaption|ПолучитьЗаголовокКлиентскогоПриложения|GetClientApplicationCaption|НачатьПолучениеКаталогаВременныхФайлов|BeginGettingTempFilesDir|НачатьПолучениеКаталогаДокументов|BeginGettingDocumentsDir|НачатьПолучениеРабочегоКаталогаДанныхПользователя|BeginGettingUserDataWorkDir|ПодключитьОбработчикЗапросаНастроекКлиентаЛицензирования|AttachLicensingClientParametersRequestHandler|ОтключитьОбработчикЗапросаНастроекКлиентаЛицензирования|DetachLicensingClientParametersRequestHandler | ЗначениеВСтрокуВнутр|ValueToStringInternal|ЗначениеИзСтрокиВнутр|ValueFromStringInternal|ЗначениеВФайл|ValueToFile|ЗначениеИзФайла|ValueFromFile | КомандаСистемы|System|ЗапуститьПриложение|RunApp|ПолучитьCOMОбъект|GetCOMObject|ПользователиОС|OSUsers|НачатьЗапускПриложения|BeginRunningApplication | ПодключитьВнешнююКомпоненту|AttachAddIn|НачатьУстановкуВнешнейКомпоненты|BeginInstallAddIn|УстановитьВнешнююКомпоненту|InstallAddIn|НачатьПодключениеВнешнейКомпоненты|BeginAttachingAddIn | КопироватьФайл|FileCopy|ПереместитьФайл|MoveFile|УдалитьФайлы|DeleteFiles|НайтиФайлы|FindFiles|СоздатьКаталог|CreateDirectory|ПолучитьИмяВременногоФайла|GetTempFileName|РазделитьФайл|SplitFile|ОбъединитьФайлы|MergeFiles|ПолучитьФайл|GetFile|НачатьПомещениеФайла|BeginPutFile|ПоместитьФайл|PutFile|ЭтоАдресВременногоХранилища|IsTempStorageURL|УдалитьИзВременногоХранилища|DeleteFromTempStorage|ПолучитьИзВременногоХранилища|GetFromTempStorage|ПоместитьВоВременноеХранилище|PutToTempStorage|ПодключитьРасширениеРаботыСФайлами|AttachFileSystemExtension|НачатьУстановкуРасширенияРаботыСФайлами|BeginInstallFileSystemExtension|УстановитьРасширениеРаботыСФайлами|InstallFileSystemExtension|ПолучитьФайлы|GetFiles|ПоместитьФайлы|PutFiles|ЗапроситьРазрешениеПользователя|RequestUserPermission|ПолучитьМаскуВсеФайлы|GetAllFilesMask|ПолучитьМаскуВсеФайлыКлиента|GetClientAllFilesMask|ПолучитьМаскуВсеФайлыСервера|GetServerAllFilesMask|ПолучитьРазделительПути|GetPathSeparator|ПолучитьРазделительПутиКлиента|GetClientPathSeparator|ПолучитьРазделительПутиСервера|GetServerPathSeparator|НачатьПодключениеРасширенияРаботыСФайлами|BeginAttachingFileSystemExtension|НачатьЗапросРазрешенияПользователя|BeginRequestingUserPermission|НачатьПоискФайлов|BeginFindingFiles|НачатьСозданиеКаталога|BeginCreatingDirectory|НачатьКопированиеФайла|BeginCopyingFile|НачатьПеремещениеФайла|BeginMovingFile|НачатьУдалениеФайлов|BeginDeletingFiles|НачатьПолучениеФайлов|BeginGettingFiles|НачатьПомещениеФайлов|BeginPuttingFiles | НачатьТранзакцию|BeginTransaction|ЗафиксироватьТранзакцию|CommitTransaction|ОтменитьТранзакцию|RollbackTransaction|УстановитьМонопольныйРежим|SetExclusiveMode|МонопольныйРежим|ExclusiveMode|ПолучитьОперативнуюОтметкуВремени|GetRealTimeTimestamp|ПолучитьСоединенияИнформационнойБазы|GetInfoBaseConnections|НомерСоединенияИнформационнойБазы|InfoBaseConnectionNumber|КонфигурацияИзменена|ConfigurationChanged|КонфигурацияБазыДанныхИзмененаДинамически|DataBaseConfigurationChangedDynamically|УстановитьВремяОжиданияБлокировкиДанных|SetLockWaitTime|ОбновитьНумерациюОбъектов|RefreshObjectsNumbering|ПолучитьВремяОжиданияБлокировкиДанных|GetLockWaitTime|КодЛокализацииИнформационнойБазы|InfoBaseLocaleCode|УстановитьМинимальнуюДлинуПаролейПользователей|SetUserPasswordMinLength|ПолучитьМинимальнуюДлинуПаролейПользователей|GetUserPasswordMinLength|ИнициализироватьПредопределенныеДанные|InitializePredefinedData|УдалитьДанныеИнформационнойБазы|EraseInfoBaseData|УстановитьПроверкуСложностиПаролейПользователей|SetUserPasswordStrengthCheck|ПолучитьПроверкуСложностиПаролейПользователей|GetUserPasswordStrengthCheck|ПолучитьСтруктуруХраненияБазыДанных|GetDBStorageStructureInfo|УстановитьПривилегированныйРежим|SetPrivilegedMode|ПривилегированныйРежим|PrivilegedMode|ТранзакцияАктивна|TransactionActive|НеобходимостьЗавершенияСоединения|ConnectionStopRequest|НомерСеансаИнформационнойБазы|InfoBaseSessionNumber|ПолучитьСеансыИнформационнойБазы|GetInfoBaseSessions|ЗаблокироватьДанныеДляРедактирования|LockDataForEdit|УстановитьСоединениеСВнешнимИсточникомДанных|ConnectExternalDataSource|РазблокироватьДанныеДляРедактирования|UnlockDataForEdit|РазорватьСоединениеСВнешнимИсточникомДанных|DisconnectExternalDataSource|ПолучитьБлокировкуСеансов|GetSessionsLock|УстановитьБлокировкуСеансов|SetSessionsLock|ОбновитьПовторноИспользуемыеЗначения|RefreshReusableValues|УстановитьБезопасныйРежим|SetSafeMode|БезопасныйРежим|SafeMode|ПолучитьДанныеВыбора|GetChoiceData|УстановитьЧасовойПоясИнформационнойБазы|SetInfoBaseTimeZone|ПолучитьЧасовойПоясИнформационнойБазы|GetInfoBaseTimeZone|ПолучитьОбновлениеКонфигурацииБазыДанных|GetDataBaseConfigurationUpdate|УстановитьБезопасныйРежимРазделенияДанных|SetDataSeparationSafeMode|БезопасныйРежимРазделенияДанных|DataSeparationSafeMode|УстановитьВремяЗасыпанияПассивногоСеанса|SetPassiveSessionHibernateTime|ПолучитьВремяЗасыпанияПассивногоСеанса|GetPassiveSessionHibernateTime|УстановитьВремяЗавершенияСпящегоСеанса|SetHibernateSessionTerminateTime|ПолучитьВремяЗавершенияСпящегоСеанса|GetHibernateSessionTerminateTime|ПолучитьТекущийСеансИнформационнойБазы|GetCurrentInfoBaseSession|ПолучитьИдентификаторКонфигурации|GetConfigurationID|УстановитьНастройкиКлиентаЛицензирования|SetLicensingClientParameters|ПолучитьИмяКлиентаЛицензирования|GetLicensingClientName|ПолучитьДополнительныйПараметрКлиентаЛицензирования|GetLicensingClientAdditionalParameter | НайтиПомеченныеНаУдаление|FindMarkedForDeletion|НайтиПоСсылкам|FindByRef|УдалитьОбъекты|DeleteObjects|УстановитьОбновлениеПредопределенныхДанныхИнформационнойБазы|SetInfoBasePredefinedDataUpdate|ПолучитьОбновлениеПредопределенныхДанныхИнформационнойБазы|GetInfoBasePredefinedData | XMLСтрока|XMLString|XMLЗначение|XMLValue|XMLТип|XMLType|XMLТипЗнч|XMLTypeOf|ИзXMLТипа|FromXMLType|ВозможностьЧтенияXML|CanReadXML|ПолучитьXMLТип|GetXMLType|ПрочитатьXML|ReadXML|ЗаписатьXML|WriteXML|НайтиНедопустимыеСимволыXML|FindDisallowedXMLCharacters|ИмпортМоделиXDTO|ImportXDTOModel|СоздатьФабрикуXDTO|CreateXDTOFactory | ЗаписатьJSON|WriteJSON|ПрочитатьJSON|ReadJSON|ПрочитатьДатуJSON|ReadJSONDate|ЗаписатьДатуJSON|WriteJSONDate | ЗаписьЖурналаРегистрации|WriteLogEvent|ПолучитьИспользованиеЖурналаРегистрации|GetEventLogUsing|УстановитьИспользованиеЖурналаРегистрации|SetEventLogUsing|ПредставлениеСобытияЖурналаРегистрации|EventLogEventPresentation|ВыгрузитьЖурналРегистрации|UnloadEventLog|ПолучитьЗначенияОтбораЖурналаРегистрации|GetEventLogFilterValues|УстановитьИспользованиеСобытияЖурналаРегистрации|SetEventLogEventUse|ПолучитьИспользованиеСобытияЖурналаРегистрации|GetEventLogEventUse|СкопироватьЖурналРегистрации|CopyEventLog|ОчиститьЖурналРегистрации|ClearEventLog | ЗначениеВДанныеФормы|ValueToFormData|ДанныеФормыВЗначение|FormDataToValue|КопироватьДанныеФормы|CopyFormData|УстановитьСоответствиеОбъектаИФормы|SetObjectAndFormConformity|ПолучитьСоответствиеОбъектаИФормы|GetObjectAndFormConformity | ПолучитьФункциональнуюОпцию|GetFunctionalOption|ПолучитьФункциональнуюОпциюИнтерфейса|GetInterfaceFunctionalOption|УстановитьПараметрыФункциональныхОпцийИнтерфейса|SetInterfaceFunctionalOptionParameters|ПолучитьПараметрыФункциональныхОпцийИнтерфейса|GetInterfaceFunctionalOptionParameters|ОбновитьИнтерфейс|RefreshInterface | УстановитьРасширениеРаботыСКриптографией|InstallCryptoExtension|НачатьУстановкуРасширенияРаботыСКриптографией|BeginInstallCryptoExtension|ПодключитьРасширениеРаботыСКриптографией|AttachCryptoExtension|НачатьПодключениеРасширенияРаботыСКриптографией|BeginAttachingCryptoExtension | УстановитьСоставСтандартногоИнтерфейсаOData|SetStandardODataInterfaceContent|ПолучитьСоставСтандартногоИнтерфейсаOData|GetStandardODataInterfaceContent | Мин|Min|Макс|Max|ОписаниеОшибки|ErrorDescription|Вычислить|Eval|ИнформацияОбОшибке|ErrorInfo|Base64Значение|Base64Value|Base64Строка|Base64String|ЗаполнитьЗначенияСвойств|FillPropertyValues|ЗначениеЗаполнено|ValueIsFilled|ПолучитьПредставленияНавигационныхСсылок|GetURLsPresentations|НайтиОкноПоНавигационнойСсылке|FindWindowByURL|ПолучитьОкна|GetWindows|ПерейтиПоНавигационнойСсылке|GotoURL|ПолучитьНавигационнуюСсылку|GetURL|ПолучитьДопустимыеКодыЛокализации|GetAvailableLocaleCodes|ПолучитьНавигационнуюСсылкуИнформационнойБазы|GetInfoBaseURL|ПредставлениеКодаЛокализации|LocaleCodePresentation|ПолучитьДопустимыеЧасовыеПояса|GetAvailableTimeZones|ПредставлениеЧасовогоПояса|TimeZonePresentation|ТекущаяУниверсальнаяДата|CurrentUniversalDate|ТекущаяУниверсальнаяДатаВМиллисекундах|CurrentUniversalDateInMilliseconds|МестноеВремя|ToLocalTime|УниверсальноеВремя|ToUniversalTime|ЧасовойПояс|TimeZone|СмещениеЛетнегоВремени|DaylightTimeOffset|СмещениеСтандартногоВремени|StandardTimeOffset|КодироватьСтроку|EncodeString|РаскодироватьСтроку|DecodeString|Найти|Find | ПередНачаломРаботыСистемы|BeforeStart|ПриНачалеРаботыСистемы|OnStart|ПередЗавершениемРаботыСистемы|BeforeExit|ПриЗавершенииРаботыСистемы|OnExit|ОбработкаВнешнегоСобытия|ExternEventProcessing|УстановкаПараметровСеанса|SessionParametersSetting|ПриИзмененииПараметровЭкрана|OnChangeDisplaySettings | WSСсылки|WSReferences|БиблиотекаКартинок|PictureLib|БиблиотекаМакетовОформленияКомпоновкиДанных|DataCompositionAppearanceTemplateLib|БиблиотекаСтилей|StyleLib|БизнесПроцессы|BusinessProcesses|ВнешниеИсточникиДанных|ExternalDataSources|ВнешниеОбработки|ExternalDataProcessors|ВнешниеОтчеты|ExternalReports|Документы|Documents|ДоставляемыеУведомления|DeliverableNotifications|ЖурналыДокументов|DocumentJournals|Задачи|Tasks|ИспользованиеРабочейДаты|WorkingDateUse|ИсторияРаботыПользователя|UserWorkHistory|Константы|Constants|КритерииОтбора|FilterCriteria|Метаданные|Metadata|Обработки|DataProcessors|ОтправкаДоставляемыхУведомлений|DeliverableNotificationSend|Отчеты|Reports|ПараметрыСеанса|SessionParameters|Перечисления|Enums|ПланыВидовРасчета|ChartsOfCalculationTypes|ПланыВидовХарактеристик|ChartsOfCharacteristicTypes|ПланыОбмена|ExchangePlans|ПланыСчетов|ChartsOfAccounts|ПолнотекстовыйПоиск|FullTextSearch|ПользователиИнформационнойБазы|InfoBaseUsers|Последовательности|Sequences|РасширенияКонфигурации|ConfigurationExtensions|РегистрыБухгалтерии|AccountingRegisters|РегистрыНакопления|AccumulationRegisters|РегистрыРасчета|CalculationRegisters|РегистрыСведений|InformationRegisters|РегламентныеЗадания|ScheduledJobs|СериализаторXDTO|XDTOSerializer|Справочники|Catalogs|СредстваГеопозиционирования|LocationTools|СредстваКриптографии|CryptoToolsManager|СредстваМультимедиа|MultimediaTools|СредстваПочты|MailTools|СредстваТелефонии|TelephonyTools|ФабрикаXDTO|XDTOFactory|ФоновыеЗадания|BackgroundJobs|ХранилищаНастроек | ГлавныйИнтерфейс|MainInterface|ГлавныйСтиль|MainStyle|ПараметрЗапуска|LaunchParameter|РабочаяДата|WorkingDate|SettingsStorages|ХранилищеВариантовОтчетов|ReportsVariantsStorage|ХранилищеНастроекДанныхФорм|FormDataSettingsStorage|ХранилищеОбщихНастроек|CommonSettingsStorage|ХранилищеПользовательскихНастроекДинамическихСписков|DynamicListsUserSettingsStorage|ХранилищеПользовательскихНастроекОтчетов|ReportsUserSettingsStorage|ХранилищеСистемныхНастроек|SystemSettingsStorage | Если|If|ИначеЕсли|ElsIf|Иначе|Else|КонецЕсли|EndIf|Тогда|Then | Неопределено|Undefined|Истина|True|Ложь|False|NULL )\s*(?=\()/ix state :root do rule %r/\n/, Text rule %r/[^\S\n]+/, Text rule %r(//.*$), Comment::Single rule %r/[\[\]:(),;]/, Punctuation rule %r/(?<=[^\wа-яё]|^)\&.*$/, Keyword::Declaration rule %r/[-+\/*%=<>.?&]/, Operator rule %r/(?<=[^\wа-яё]|^)\#.*$/, Keyword::Declaration rule KEYWORDS, Keyword rule BUILTINS, Name::Builtin rule %r/[\wа-яё][\wа-яё]*/i, Name::Variable #literals rule %r/\b((\h{8}-(\h{4}-){3}\h{12})|\d+\.?\d*)\b/, Literal::Number rule %r/\'.*\'/, Literal::Date rule %r/".*?("|$)/, Literal::String::Single rule %r/(?<=[^\wа-яё]|^)\|((?!\"\").)*?(\"|$)/, Literal::String end end end end rouge-3.28.0/lib/rouge/lexers/c.rb000066400000000000000000000135501417417255300167020ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class C < RegexLexer tag 'c' filenames '*.c', '*.h', '*.idc' mimetypes 'text/x-chdr', 'text/x-csrc' title "C" desc "The C programming language" # optional comment or whitespace ws = %r((?:\s|//.*?\n|/[*].*?[*]/)+) id = /[a-zA-Z_][a-zA-Z0-9_]*/ def self.keywords @keywords ||= Set.new %w( auto break case const continue default do else enum extern for goto if register restricted return sizeof static struct switch typedef union volatile virtual while _Alignas _Alignof _Atomic _Generic _Imaginary _Noreturn _Static_assert _Thread_local ) end def self.keywords_type @keywords_type ||= Set.new %w( int long float short double char unsigned signed void jmp_buf FILE DIR div_t ldiv_t mbstate_t sig_atomic_t fpos_t clock_t time_t va_list size_t ssize_t off_t wchar_t ptrdiff_t wctrans_t wint_t wctype_t _Bool _Complex int8_t int16_t int32_t int64_t uint8_t uint16_t uint32_t uint64_t int_least8_t int_least16_t int_least32_t int_least64_t uint_least8_t uint_least16_t uint_least32_t uint_least64_t int_fast8_t int_fast16_t int_fast32_t int_fast64_t uint_fast8_t uint_fast16_t uint_fast32_t uint_fast64_t intptr_t uintptr_t intmax_t uintmax_t char16_t char32_t ) end def self.reserved @reserved ||= Set.new %w( __asm __int8 __based __except __int16 __stdcall __cdecl __fastcall __int32 __declspec __finally __int61 __try __leave inline _inline __inline naked _naked __naked restrict _restrict __restrict thread _thread __thread typename _typename __typename ) end def self.builtins @builtins ||= [] end start { push :bol } state :expr_bol do mixin :inline_whitespace rule %r/#if\s0/, Comment, :if_0 rule %r/#/, Comment::Preproc, :macro rule(//) { pop! } end # :expr_bol is the same as :bol but without labels, since # labels can only appear at the beginning of a statement. state :bol do rule %r/#{id}:(?!:)/, Name::Label mixin :expr_bol end state :inline_whitespace do rule %r/[ \t\r]+/, Text rule %r/\\\n/, Text # line continuation rule %r(/(\\\n)?[*].*?[*](\\\n)?/)m, Comment::Multiline end state :whitespace do rule %r/\n+/m, Text, :bol rule %r(//(\\.|.)*?$), Comment::Single, :bol mixin :inline_whitespace end state :expr_whitespace do rule %r/\n+/m, Text, :expr_bol mixin :whitespace end state :statements do mixin :whitespace rule %r/(u8|u|U|L)?"/, Str, :string rule %r((u8|u|U|L)?'(\\.|\\[0-7]{1,3}|\\x[a-f0-9]{1,2}|[^\\'\n])')i, Str::Char rule %r((\d+[.]\d*|[.]?\d+)e[+-]?\d+[lu]*)i, Num::Float rule %r(\d+e[+-]?\d+[lu]*)i, Num::Float rule %r/0x[0-9a-f]+[lu]*/i, Num::Hex rule %r/0[0-7]+[lu]*/i, Num::Oct rule %r/\d+[lu]*/i, Num::Integer rule %r(\*/), Error rule %r([~!%^&*+=\|?:<>/-]), Operator rule %r/[()\[\],.;]/, Punctuation rule %r/\bcase\b/, Keyword, :case rule %r/(?:true|false|NULL)\b/, Name::Builtin rule id do |m| name = m[0] if self.class.keywords.include? name token Keyword elsif self.class.keywords_type.include? name token Keyword::Type elsif self.class.reserved.include? name token Keyword::Reserved elsif self.class.builtins.include? name token Name::Builtin else token Name end end end state :case do rule %r/:/, Punctuation, :pop! mixin :statements end state :root do mixin :expr_whitespace rule %r( ([\w*\s]+?[\s*]) # return arguments (#{id}) # function name (\s*\([^;]*?\)) # signature (#{ws}?)({|;) # open brace or semicolon )mx do |m| # TODO: do this better. recurse m[1] token Name::Function, m[2] recurse m[3] recurse m[4] token Punctuation, m[5] if m[5] == ?{ push :function end end rule %r/\{/, Punctuation, :function mixin :statements end state :function do mixin :whitespace mixin :statements rule %r/;/, Punctuation rule %r/{/, Punctuation, :function rule %r/}/, Punctuation, :pop! end state :string do rule %r/"/, Str, :pop! rule %r/\\([\\abfnrtv"']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})/, Str::Escape rule %r/[^\\"\n]+/, Str rule %r/\\\n/, Str rule %r/\\/, Str # stray backslash end state :macro do mixin :include rule %r([^/\n\\]+), Comment::Preproc rule %r/\\./m, Comment::Preproc mixin :inline_whitespace rule %r(/), Comment::Preproc # NB: pop! goes back to :bol rule %r/\n/, Comment::Preproc, :pop! end state :include do rule %r/(include)(\s*)(<[^>]+>)([^\n]*)/ do groups Comment::Preproc, Text, Comment::PreprocFile, Comment::Single end rule %r/(include)(\s*)("[^"]+")([^\n]*)/ do groups Comment::Preproc, Text, Comment::PreprocFile, Comment::Single end end state :if_0 do # NB: no \b here, to cover #ifdef and #ifndef rule %r/^\s*#if/, Comment, :if_0 rule %r/^\s*#\s*el(?:se|if)/, Comment, :pop! rule %r/^\s*#\s*endif\b.*?(?|+=:;,./?`-]), Operator rule %r(\d{1,3}(_\d{3})+\.\d{1,3}(_\d{3})+[kMGTPmunpf]?), Literal::Number::Float rule %r(\d{1,3}(_\d{3})+\.[0-9]+([eE][+-]?[0-9]+)?[kMGTPmunpf]?), Literal::Number::Float rule %r([0-9][0-9]*\.\d{1,3}(_\d{3})+[kMGTPmunpf]?), Literal::Number::Float rule %r([0-9][0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[kMGTPmunpf]?), Literal::Number::Float rule %r(#([0-9a-fA-F]{4})(_[0-9a-fA-F]{4})+), Literal::Number::Hex rule %r(#[0-9a-fA-F]+), Literal::Number::Hex rule %r(\$([01]{4})(_[01]{4})+), Literal::Number::Bin rule %r(\$[01]+), Literal::Number::Bin rule %r(\d{1,3}(_\d{3})+[kMGTP]?), Literal::Number::Integer rule %r([0-9]+[kMGTP]?), Literal::Number::Integer rule %r(\n), Text end state :class do mixin :whitespace rule %r([A-Za-z_]\w*), Name::Class, :pop! end state :import do rule %r([a-z][\w.]*), Name::Namespace, :pop! rule %r("(\\\\|\\"|[^"])*"), Literal::String, :pop! end state :comment do rule %r([^*/]), Comment.Multiline rule %r(/\*), Comment::Multiline, :push! rule %r(\*/), Comment::Multiline, :pop! rule %r([*/]), Comment::Multiline end end end end rouge-3.28.0/lib/rouge/lexers/cfscript.rb000066400000000000000000000077531417417255300203050ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Cfscript < RegexLexer title "CFScript" desc 'CFScript, the CFML scripting language' tag 'cfscript' aliases 'cfc' filenames '*.cfc' def self.keywords @keywords ||= %w( if else var xml default break switch do try catch throw in continue for return while required ) end def self.declarations @declarations ||= %w( component property function remote public package private ) end def self.types @types ||= %w( any array binary boolean component date guid numeric query string struct uuid void xml ) end constants = %w(application session client cookie super this variables arguments cgi) operators = %w(\+\+ -- && \|\| <= >= < > == != mod eq lt gt lte gte not is and or xor eqv imp equal contains \? ) dotted_id = /[$a-zA-Z_][a-zA-Z0-9_.]*/ state :root do mixin :comments_and_whitespace rule %r/(?:#{operators.join('|')}|does not contain|greater than(?: or equal to)?|less than(?: or equal to)?)\b/i, Operator, :expr_start rule %r([-<>+*%&|\^/!=]=?), Operator, :expr_start rule %r/[(\[,]/, Punctuation, :expr_start rule %r/;/, Punctuation, :statement rule %r/[)\].]/, Punctuation rule %r/[?]/ do token Punctuation push :ternary push :expr_start end rule %r/[{}]/, Punctuation, :statement rule %r/(?:#{constants.join('|')})\b/, Name::Constant rule %r/(?:true|false|null)\b/, Keyword::Constant rule %r/import\b/, Keyword::Namespace, :import rule %r/(#{dotted_id})(\s*)(:)(\s*)/ do groups Name, Text, Punctuation, Text push :expr_start end rule %r/([A-Za-z_$][\w.]*)(\s*)(\()/ do |m| if self.class.keywords.include? m[1] token Keyword, m[1] token Text, m[2] token Punctuation, m[3] else token Name::Function, m[1] token Text, m[2] token Punctuation, m[3] end end rule dotted_id do |m| if self.class.declarations.include? m[0] token Keyword::Declaration push :expr_start elsif self.class.keywords.include? m[0] token Keyword push :expr_start elsif self.class.types.include? m[0] token Keyword::Type push :expr_start else token Name::Other end end rule %r/[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?/, Num::Float rule %r/0x[0-9a-fA-F]+/, Num::Hex rule %r/[0-9]+/, Num::Integer rule %r/"(\\\\|\\"|[^"])*"/, Str::Double rule %r/'(\\\\|\\'|[^'])*'/, Str::Single end # same as java, broken out state :comments_and_whitespace do rule %r/\s+/, Text rule %r(//.*?$), Comment::Single rule %r(/\*.*?\*/)m, Comment::Multiline end state :expr_start do mixin :comments_and_whitespace rule %r/[{]/, Punctuation, :object rule %r//, Text, :pop! end state :statement do rule %r/[{}]/, Punctuation mixin :expr_start end # object literals state :object do mixin :comments_and_whitespace rule %r/[}]/ do token Punctuation push :expr_start end rule %r/(#{dotted_id})(\s*)(:)/ do groups Name::Other, Text, Punctuation push :expr_start end rule %r/:/, Punctuation mixin :root end # ternary expressions, where : is not a label! state :ternary do rule %r/:/ do token Punctuation goto :expr_start end mixin :root end state :import do rule %r/\s+/m, Text rule %r/[a-z0-9_.]+\*?/i, Name::Namespace, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/clean.rb000066400000000000000000000103751417417255300175440ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Clean < RegexLexer title "Clean" desc "The Clean programming language (clean.cs.ru.nl)" tag 'clean' filenames '*.dcl', '*.icl' def self.keywords @keywords ||= Set.new %w( if otherwise let in with where case of infix infixl infixr class instance generic derive special implementation definition system module from import qualified as dynamic code inline foreign export ccall stdcall ) end # These are literal patterns common to the ABC intermediate language and # Clean. Clean has more extensive literal patterns (see :basic below). state :common_literals do rule %r/'(?:[^'\\]|\\(?:x[0-9a-fA-F]+|\d+|.))'/, Str::Char rule %r/[+~-]?\d+\.\d+(?:E[+-]?\d+)?\b/, Num::Float rule %r/[+~-]?\d+E[+-]?\d+\b/, Num::Float rule %r/[+~-]?\d+/, Num::Integer rule %r/"/, Str::Double, :string end state :basic do rule %r/\s+/m, Text::Whitespace rule %r/\/\/\*.*/, Comment::Doc rule %r/\/\/.*/, Comment::Single rule %r/\/\*\*/, Comment::Doc, :comment_doc rule %r/\/\*/, Comment::Multiline, :comment rule %r/[+~-]?0[0-7]+/, Num::Oct rule %r/[+~-]?0x[0-9a-fA-F]+/, Num::Hex mixin :common_literals rule %r/(\[)(\s*)(')(?=.*?'\])/ do groups Punctuation, Text::Whitespace, Str::Single, Punctuation push :charlist end end # nested commenting state :comment_doc do rule %r/\*\//, Comment::Doc, :pop! rule %r/\/\/.*/, Comment::Doc # Singleline comments in multiline comments are skipped rule %r/\/\*/, Comment::Doc, :comment rule %r/[^*\/]+/, Comment::Doc rule %r/[*\/]/, Comment::Doc end # This is the same as the above, but with Multiline instead of Doc state :comment do rule %r/\*\//, Comment::Multiline, :pop! rule %r/\/\/.*/, Comment::Multiline # Singleline comments in multiline comments are skipped rule %r/\/\*/, Comment::Multiline, :comment rule %r/[^*\/]+/, Comment::Multiline rule %r/[*\/]/, Comment::Multiline end state :root do mixin :basic rule %r/code(\s+inline)?\s*{/, Comment::Preproc, :abc rule %r/_*[a-z][\w_`]*/ do |m| if self.class.keywords.include?(m[0]) token Keyword else token Name end end rule %r/_*[A-Z][\w_`]*/ do |m| if m[0]=='True' || m[0]=='False' token Keyword::Constant else token Keyword::Type end end rule %r/[^\w_\s`]/, Punctuation rule %r/_\b/, Punctuation end state :escapes do rule %r/\\x[0-9a-fA-F]{1,2}/i, Str::Escape rule %r/\\d\d{0,3}/i, Str::Escape rule %r/\\0[0-7]{0,3}/, Str::Escape rule %r/\\[0-7]{1,3}/, Str::Escape rule %r/\\[nrfbtv\\"']/, Str::Escape end state :string do rule %r/"/, Str::Double, :pop! mixin :escapes rule %r/[^\\"]+/, Str::Double end state :charlist do rule %r/(')(\])/ do groups Str::Single, Punctuation pop! end mixin :escapes rule %r/[^\\']/, Str::Single end state :abc_basic do rule %r/\s+/, Text::Whitespace rule %r/\|.*/, Comment::Single mixin :common_literals end # The ABC intermediate language can be included, similar to C's inline # assembly. For some information about ABC, see: # https://en.wikipedia.org/wiki/Clean_(programming_language)#The_ABC-Machine state :abc do mixin :abc_basic rule %r/}/, Comment::Preproc, :pop! rule %r/\.\w*/, Keyword, :abc_rest_of_line rule %r/[\w_]+/, Name::Builtin, :abc_rest_of_line end state :abc_rest_of_line do rule %r/\n/, Text::Whitespace, :pop! rule %r/}/ do token Comment::Preproc pop! pop! end mixin :abc_basic rule %r/\S+/, Name end end end end rouge-3.28.0/lib/rouge/lexers/clojure.rb000066400000000000000000000105441417417255300201230ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Clojure < RegexLexer title "Clojure" desc "The Clojure programming language (clojure.org)" tag 'clojure' aliases 'clj', 'cljs' filenames '*.clj', '*.cljs', '*.cljc', 'build.boot', '*.edn' mimetypes 'text/x-clojure', 'application/x-clojure' def self.keywords @keywords ||= Set.new %w( fn def defn defmacro defmethod defmulti defn- defstruct if cond let for ) end def self.builtins @builtins ||= Set.new %w( . .. * + - -> / < <= = == > >= accessor agent agent-errors aget alength all-ns alter and append-child apply array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc await await-for bean binding bit-and bit-not bit-or bit-shift-left bit-shift-right bit-xor boolean branch? butlast byte cast char children class clear-agent-errors comment commute comp comparator complement concat conj cons constantly construct-proxy contains? count create-ns create-struct cycle dec deref difference disj dissoc distinct doall doc dorun doseq dosync dotimes doto double down drop drop-while edit end? ensure eval every? false? ffirst file-seq filter find find-doc find-ns find-var first float flush fnseq frest gensym get-proxy-class get hash-map hash-set identical? identity if-let import in-ns inc index insert-child insert-left insert-right inspect-table inspect-tree instance? int interleave intersection into into-array iterate join key keys keyword keyword? last lazy-cat lazy-cons left lefts line-seq list* list load load-file locking long loop macroexpand macroexpand-1 make-array make-node map map-invert map? mapcat max max-key memfn merge merge-with meta min min-key name namespace neg? new newline next nil? node not not-any? not-every? not= ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unmap nth nthrest or parse partial path peek pop pos? pr pr-str print print-str println println-str prn prn-str project proxy proxy-mappings quot rand rand-int range re-find re-groups re-matcher re-matches re-pattern re-seq read read-line reduce ref ref-set refer rem remove remove-method remove-ns rename rename-keys repeat replace replicate resolve rest resultset-seq reverse rfirst right rights root rrest rseq second select select-keys send send-off seq seq-zip seq? set short slurp some sort sort-by sorted-map sorted-map-by sorted-set special-symbol? split-at split-with str string? struct struct-map subs subvec symbol symbol? sync take take-nth take-while test time to-array to-array-2d tree-seq true? union up update-proxy val vals var-get var-set var? vector vector-zip vector? when when-first when-let when-not with-local-vars with-meta with-open with-out-str xml-seq xml-zip zero? zipmap zipper' ) end identifier = %r([\w!$%*+,<=>?/.-]+) keyword = %r([\w!\#$%*+,<=>?/.-]+) def name_token(name) return Keyword if self.class.keywords.include?(name) return Name::Builtin if self.class.builtins.include?(name) nil end state :root do rule %r/;.*?$/, Comment::Single rule %r/\s+/m, Text::Whitespace rule %r/-?\d+\.\d+/, Num::Float rule %r/-?\d+/, Num::Integer rule %r/0x-?[0-9a-fA-F]+/, Num::Hex rule %r/"(\\.|[^"])*"/, Str rule %r/'#{keyword}/, Str::Symbol rule %r/::?#{keyword}/, Name::Constant rule %r/\\(.|[a-z]+)/i, Str::Char rule %r/~@|[`\'#^~&@]/, Operator rule %r/(\()(\s*)(#{identifier})/m do |m| token Punctuation, m[1] token Text::Whitespace, m[2] token(name_token(m[3]) || Name::Function, m[3]) end rule identifier do |m| token name_token(m[0]) || Name end # vectors rule %r/[\[\]]/, Punctuation # maps rule %r/[{}]/, Punctuation # parentheses rule %r/[()]/, Punctuation end end end end rouge-3.28.0/lib/rouge/lexers/cmake.rb000066400000000000000000000116621417417255300175420ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class CMake < RegexLexer title 'CMake' desc 'The cross-platform, open-source build system' tag 'cmake' filenames 'CMakeLists.txt', '*.cmake' mimetypes 'text/x-cmake' SPACE = '[ \t]' BRACKET_OPEN = '\[=*\[' STATES_MAP = { :root => Text, :bracket_string => Str::Double, :quoted_argument => Str::Double, :bracket_comment => Comment::Multiline, :variable_reference => Name::Variable, } BUILTIN_COMMANDS = Set.new %w[ add_compile_definitions add_compile_options add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_link_options add_subdirectory add_test aux_source_directory break build_command build_name cmake_host_system_information cmake_language cmake_minimum_required cmake_parse_arguments cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile exec_program execute_process export export_library_dependencies file find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_guard include_regular_expression install install_files install_programs install_targets link_directories link_libraries list load_cache load_command macro make_directory mark_as_advanced math message option output_required_files project qt_wrap_cpp qt_wrap_ui remove remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string subdir_depends subdirs target_compile_definitions target_compile_features target_compile_options target_include_directories target_link_directories target_link_libraries target_link_options target_precompile_headers target_sources try_compile try_run unset use_mangled_mesa utility_source variable_requires variable_watch while write_file ] state :default do rule %r/\r\n?|\n/ do token STATES_MAP[state.name.to_sym] end rule %r/./ do token STATES_MAP[state.name.to_sym] end end state :variable_interpolation do rule %r/\$\{/ do token Str::Interpol push :variable_reference end end state :bracket_close do rule %r/\]=*\]/ do |m| token STATES_MAP[state.name.to_sym] goto :root if m[0].length == @bracket_len end end state :root do mixin :variable_interpolation rule %r/#{SPACE}/, Text rule %r/[()]/, Punctuation rule %r/##{BRACKET_OPEN}/ do |m| token Comment::Multiline @bracket_len = m[0].length - 1 # decount '#' goto :bracket_comment end rule %r/#{BRACKET_OPEN}/ do |m| token Str::Double @bracket_len = m[0].length goto :bracket_string end rule %r/\\"/, Text rule %r/"/, Str::Double, :quoted_argument rule %r/([A-Za-z_][A-Za-z0-9_]*)(#{SPACE}*)(\()/ do |m| groups BUILTIN_COMMANDS.include?(m[1]) ? Name::Builtin : Name::Function, Text, Punctuation end rule %r/#.*/, Comment::Single mixin :default end state :bracket_string do mixin :bracket_close mixin :variable_interpolation mixin :default end state :bracket_comment do mixin :bracket_close mixin :default end state :variable_reference do mixin :variable_interpolation rule %r/}/, Str::Interpol, :pop! mixin :default end state :quoted_argument do mixin :variable_interpolation rule %r/"/, Str::Double, :root rule %r/\\[()#" \\$@^trn;]/, Str::Escape mixin :default end end end end rouge-3.28.0/lib/rouge/lexers/cmhg.rb000066400000000000000000000016771417417255300174050ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class CMHG < RegexLexer title "CMHG" desc "RISC OS C module header generator source file" tag 'cmhg' filenames '*.cmhg' def self.preproc_keyword @preproc_keyword ||= %w( define elif else endif error if ifdef ifndef include line pragma undef warning ) end state :root do rule %r/;[^\n]*/, Comment rule %r/^([ \t]*)(#[ \t]*(?:(?:#{CMHG.preproc_keyword.join('|')})(?:[ \t].*)?)?)(?=\n)/ do groups Text, Comment::Preproc end rule %r/[-a-z]+:/, Keyword::Declaration rule %r/[a-z_]\w+/i, Name::Entity rule %r/"[^"]*"/, Literal::String rule %r/(?:&|0x)\h+/, Literal::Number::Hex rule %r/\d+/, Literal::Number rule %r/[,\/()]/, Punctuation rule %r/[ \t]+/, Text rule %r/\n+/, Text end end end end rouge-3.28.0/lib/rouge/lexers/coffeescript.rb000066400000000000000000000124641417417255300211370ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Coffeescript < RegexLexer tag 'coffeescript' aliases 'coffee', 'coffee-script' filenames '*.coffee', 'Cakefile' mimetypes 'text/coffeescript' title "CoffeeScript" desc 'The Coffeescript programming language (coffeescript.org)' def self.detect?(text) return true if text.shebang? 'coffee' end def self.keywords @keywords ||= Set.new %w( for by while until loop break continue return switch when then if else do yield throw try catch finally await new delete typeof instanceof super extends this class import export debugger ) end def self.reserved @reserved ||= Set.new %w( case function var void with const let enum native implements interface package private protected public static ) end def self.constants @constants ||= Set.new %w( true false yes no on off null NaN Infinity undefined ) end def self.builtins @builtins ||= Set.new %w( Array Boolean Date Error Function Math netscape Number Object Packages RegExp String sun decodeURI decodeURIComponent encodeURI encodeURIComponent eval isFinite isNaN parseFloat parseInt document window ) end id = /[$a-zA-Z_][a-zA-Z0-9_]*/ state :comments do rule %r/###[^#].*?###/m, Comment::Multiline rule %r/#.*$/, Comment::Single end state :whitespace do rule %r/\s+/m, Text end state :regex_comment do rule %r/^#(?!\{).*$/, Comment::Single rule %r/(\s+)(#(?!\{).*)$/ do groups Text, Comment::Single end end state :multiline_regex_begin do rule %r(///) do token Str::Regex goto :multiline_regex end end state :multiline_regex_end do rule %r(///([gimy]+\b|\B)), Str::Regex, :pop! end state :multiline_regex do mixin :multiline_regex_end mixin :regex_comment mixin :has_interpolation mixin :comments mixin :whitespace mixin :code_escape rule %r/\\\D/, Str::Escape rule %r/\\\d+/, Name::Variable rule %r/./m, Str::Regex end state :slash_starts_regex do mixin :comments mixin :whitespace mixin :multiline_regex_begin rule %r( /(\\.|[^\[/\\\n]|\[(\\.|[^\]\\\n])*\])+/ # a regex ([gimy]+\b|\B) )x, Str::Regex, :pop! rule(//) { pop! } end state :root do rule(%r(^(?=\s|/| rule %r/--(?![!#\$\%&*+.\/<=>?@\^\|_~]).*?$/, Comment::Single end # nested commenting state :comment do rule %r/-}/, Comment::Multiline, :pop! rule %r/{-/, Comment::Multiline, :comment rule %r/[^-{}]+/, Comment::Multiline rule %r/[-{}]/, Comment::Multiline end state :comment_preproc do rule %r/-}/, Comment::Preproc, :pop! rule %r/{-/, Comment::Preproc, :comment rule %r/[^-{}]+/, Comment::Preproc rule %r/[-{}]/, Comment::Preproc end state :root do mixin :basic rule %r/'(?=(?:.|\\\S+)')/, Str::Char, :character rule %r/"/, Str, :string rule %r/\d+e[+-]?\d+/i, Num::Float rule %r/\d+\.\d+(e[+-]?\d+)?/i, Num::Float rule %r/0o[0-7]+/i, Num::Oct rule %r/0x[\da-f]+/i, Num::Hex rule %r/\d+/, Num::Integer rule %r/[\w']+/ do |m| match = m[0] if match == "import" token Keyword::Reserved push :import elsif match == "module" token Keyword::Reserved push :module elsif reserved.include?(match) token Keyword::Reserved elsif match =~ /\A'?[A-Z]/ token Keyword::Type else token Name end end # lambda operator rule %r(\\(?![:!#\$\%&*+.\\/<=>?@^\|~-]+)), Name::Function # special operators rule %r((<-|::|->|=>|=)(?![:!#\$\%&*+.\\/<=>?@^\|~-]+)), Operator # constructor/type operators rule %r(:[:!#\$\%&*+.\\/<=>?@^\|~-]*), Operator # other operators rule %r([:!#\$\%&*+.\\/<=>?@^\|~-]+), Operator rule %r/\[\s*\]/, Keyword::Type rule %r/\(\s*\)/, Name::Builtin # Quasiquotations rule %r/(\[)([_a-z][\w']*)(\|)/ do |m| token Operator, m[1] token Name, m[2] token Operator, m[3] push :quasiquotation end rule %r/[\[\](),;`{}]/, Punctuation end state :import do rule %r/\s+/, Text rule %r/"/, Str, :string rule %r/\bqualified\b/, Keyword # import X as Y rule %r/([A-Z][\w.]*)(\s+)(as)(\s+)([A-Z][a-zA-Z0-9_.]*)/ do groups( Name::Namespace, # X Text, Keyword, # as Text, Name # Y ) pop! end # import X hiding (functions) rule %r/([A-Z][\w.]*)(\s+)(hiding)(\s+)(\()/ do groups( Name::Namespace, # X Text, Keyword, # hiding Text, Punctuation # ( ) goto :funclist end # import X (functions) rule %r/([A-Z][\w.]*)(\s+)(\()/ do groups( Name::Namespace, # X Text, Punctuation # ( ) goto :funclist end rule %r/[\w.]+/, Name::Namespace, :pop! end state :module do rule %r/\s+/, Text # module Foo (functions) rule %r/([A-Z][\w.]*)(\s+)(\()/ do groups Name::Namespace, Text, Punctuation push :funclist end rule %r/\bwhere\b/, Keyword::Reserved, :pop! rule %r/[A-Z][a-zA-Z0-9_.]*/, Name::Namespace, :pop! end state :funclist do mixin :basic rule %r/[A-Z]\w*/, Keyword::Type rule %r/(_[\w\']+|[a-z][\w\']*)/, Name::Function rule %r/,/, Punctuation rule %r/[:!#\$\%&*+.\\\/<=>?@^\|~-]+/, Operator rule %r/\(/, Punctuation, :funclist rule %r/\)/, Punctuation, :pop! end state :character do rule %r/\\/ do token Str::Escape goto :character_end push :escape end rule %r/./ do token Str::Char goto :character_end end end state :character_end do rule %r/'/, Str::Char, :pop! rule %r/./, Error, :pop! end state :quasiquotation do rule %r/\|\]/, Operator, :pop! rule %r/[^\|]+/m, Text rule %r/\|/, Text end state :string do rule %r/"/, Str, :pop! rule %r/\\/, Str::Escape, :escape rule %r/[^\\"]+/, Str end state :escape do rule %r/[abfnrtv"'&\\]/, Str::Escape, :pop! rule %r/\^[\]\[A-Z@\^_]/, Str::Escape, :pop! rule %r/#{ascii.join('|')}/, Str::Escape, :pop! rule %r/o[0-7]+/i, Str::Escape, :pop! rule %r/x[\da-f]+/i, Str::Escape, :pop! rule %r/\d+/, Str::Escape, :pop! rule %r/\s+\\/, Str::Escape, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/haxe.rb000066400000000000000000000142761417417255300174130ustar00rootroot00000000000000# -*- coding: utf-8 -*- # module Rouge module Lexers class Haxe < RegexLexer title "Haxe" desc "Haxe Cross-platform Toolkit (http://haxe.org)" tag 'haxe' aliases 'hx', 'haxe' filenames '*.hx' mimetypes 'text/haxe', 'text/x-haxe', 'text/x-hx' def self.detect?(text) return true if text.shebang? "haxe" end def self.keywords @keywords ||= Set.new %w( break case cast catch class continue default do else enum false for function if import interface macro new null override package private public return switch this throw true try untyped while ) end def self.imports @imports ||= Set.new %w( import using ) end def self.declarations @declarations ||= Set.new %w( abstract dynamic extern extends from implements inline static to typedef var ) end def self.reserved @reserved ||= Set.new %w( super trace inline build autoBuild enum ) end def self.constants @constants ||= Set.new %w(true false null) end def self.builtins @builtins ||= %w( Void Dynamic Math Class Any Float Int UInt String StringTools Sys EReg isNaN parseFloat parseInt this Array Map Date DateTools Bool Lambda Reflect Std File FileSystem ) end id = /[$a-zA-Z_][a-zA-Z0-9_]*/ state :comments_and_whitespace do rule %r/\s+/, Text rule %r(//.*?$), Comment::Single rule %r(/\*.*?\*/)m, Comment::Multiline end state :expr_start do mixin :comments_and_whitespace rule %r/#(?:if|elseif|else|end).*/, Comment::Preproc rule %r(~) do token Str::Regex goto :regex end rule %r/[{]/, Punctuation, :object rule %r//, Text, :pop! end state :regex do rule %r(/) do token Str::Regex goto :regex_end end rule %r([^/]\n), Error, :pop! rule %r/\n/, Error, :pop! rule %r/\[\^/, Str::Escape, :regex_group rule %r/\[/, Str::Escape, :regex_group rule %r/\\./, Str::Escape rule %r{[(][?][:=> | == | != )x, Operator, :expr_start rule %r([-:<>+*%&|\^/!=]=?), Operator, :expr_start rule %r/[(\[,]/, Punctuation, :expr_start rule %r/;/, Punctuation, :statement rule %r/[)\]}.]/, Punctuation rule %r/[?]/ do token Punctuation push :ternary push :expr_start end rule id do |m| if self.class.keywords.include? m[0] token Keyword push :expr_start elsif self.class.imports.include? m[0] token Keyword push :namespace elsif self.class.declarations.include? m[0] token Keyword::Declaration push :expr_start elsif self.class.reserved.include? m[0] token Keyword::Reserved elsif self.class.constants.include? m[0] token Keyword::Constant elsif self.class.builtins.include? m[0] token Name::Builtin else token Name::Other end end rule %r/\-?\d+\.\d+(?:[eE]\d+)?[fd]?/, Num::Float rule %r/0x\h+/, Num::Hex rule %r/\-?[0-9]+/, Num::Integer rule %r/"/, Str::Double, :str_double rule %r/'/, Str::Single, :str_single end # braced parts that aren't object literals state :statement do rule %r/(#{id})(\s*)(:)/ do groups Name::Label, Text, Punctuation end mixin :expr_start end # object literals state :object do mixin :comments_and_whitespace rule %r/[}]/ do token Punctuation goto :statement end rule %r/(#{id})(\s*)(:)/ do groups Name::Attribute, Text, Punctuation push :expr_start end rule %r/:/, Punctuation mixin :root end state :metadata do rule %r/(#{id})(\()?/ do |m| groups Name::Decorator, Punctuation pop! unless m[2] end rule %r/:#{id}(?:\.#{id})*/, Name::Decorator, :pop! rule %r/\)/, Name::Decorator, :pop! mixin :root end # ternary expressions, where : is not a label! state :ternary do rule %r/:/ do token Punctuation goto :expr_start end mixin :root end state :str_double do mixin :str_escape rule %r/"/, Str::Double, :pop! rule %r/[^\\"]+/, Str::Double end state :str_single do mixin :str_escape rule %r/'/, Str::Single, :pop! rule %r/\$\$/, Str::Single rule %r/\$#{id}/, Str::Interpol rule %r/\$\{/, Str::Interpol, :str_interpol rule %r/[^\\$']+/, Str::Single end state :str_escape do rule %r/\\[\\tnr'"]/, Str::Escape rule %r/\\[0-7]{3}/, Str::Escape rule %r/\\x\h{2}/, Str::Escape rule %r/\\u\h{4}/, Str::Escape rule %r/\\u\{\h{1,6}\}/, Str::Escape end state :str_interpol do rule %r/\}/, Str::Interpol, :pop! mixin :root end end end end rouge-3.28.0/lib/rouge/lexers/hcl.rb000066400000000000000000000073561417417255300172350ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Hcl < RegexLexer tag 'hcl' filenames '*.hcl', '*.nomad' title 'Hashicorp Configuration Language' desc 'Hashicorp Configuration Language, used by Terraform and other Hashicorp tools' state :multiline_comment do rule %r([*]/), Comment::Multiline, :pop! rule %r([^*/]+), Comment::Multiline rule %r([*/]), Comment::Multiline end state :comments_and_whitespace do rule %r/\s+/, Text rule %r(//.*?$), Comment::Single rule %r(#.*?$), Comment::Single rule %r(/[*]), Comment::Multiline, :multiline_comment end state :primitives do rule %r/[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?([kKmMgG]b?)?/, Num::Float rule %r/[0-9]+([kKmMgG]b?)?/, Num::Integer rule %r/"/, Str::Double, :dq rule %r/'/, Str::Single, :sq rule %r/(<<-?)(\s*)(\'?)(\\?)(\w+)(\3)/ do |m| groups Operator, Text, Str::Heredoc, Str::Heredoc, Name::Constant, Str::Heredoc @heredocstr = Regexp.escape(m[5]) push :heredoc end end def self.keywords @keywords ||= Set.new %w() end def self.declarations @declarations ||= Set.new %w() end def self.reserved @reserved ||= Set.new %w() end def self.constants @constants ||= Set.new %w(true false null) end def self.builtins @builtins ||= %w() end id = /[$a-z_][a-z0-9_]*/io state :root do mixin :comments_and_whitespace mixin :primitives rule %r/\{/ do token Punctuation push :hash end rule %r/\[/ do token Punctuation push :array end rule id do |m| if self.class.keywords.include? m[0] token Keyword push :composite elsif self.class.declarations.include? m[0] token Keyword::Declaration push :composite elsif self.class.reserved.include? m[0] token Keyword::Reserved elsif self.class.constants.include? m[0] token Keyword::Constant elsif self.class.builtins.include? m[0] token Name::Builtin else token Name::Other push :composite end end end state :composite do mixin :comments_and_whitespace rule %r/[{]/ do token Punctuation pop! push :hash end rule %r/[\[]/ do token Punctuation pop! push :array end mixin :root rule %r//, Text, :pop! end state :hash do mixin :comments_and_whitespace rule %r/\=/, Punctuation rule %r/\}/, Punctuation, :pop! mixin :root end state :array do mixin :comments_and_whitespace rule %r/,/, Punctuation rule %r/\]/, Punctuation, :pop! mixin :root end state :dq do rule %r/[^\\"]+/, Str::Double rule %r/\\"/, Str::Escape rule %r/"/, Str::Double, :pop! end state :sq do rule %r/[^\\']+/, Str::Single rule %r/\\'/, Str::Escape rule %r/'/, Str::Single, :pop! end state :heredoc do rule %r/\n/, Str::Heredoc, :heredoc_nl rule %r/[^$\n]+/, Str::Heredoc rule %r/[$]/, Str::Heredoc end state :heredoc_nl do rule %r/\s*(\w+)\s*\n/ do |m| if m[1] == @heredocstr token Name::Constant pop! 2 else token Str::Heredoc end end rule(//) { pop! } end end end end rouge-3.28.0/lib/rouge/lexers/hlsl.rb000066400000000000000000000177601417417255300174310ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'c.rb' class HLSL < C title "HLSL" desc "HLSL, the High Level Shading Language for DirectX (docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl)" tag 'hlsl' filenames '*.hlsl', '*.hlsli' mimetypes 'text/x-hlsl' def self.keywords @keywords ||= Set.new %w( asm asm_fragment break case cbuffer centroid class column_major compile compile_fragment const continue default discard do else export extern for fxgroup globallycoherent groupshared if in inline inout interface line lineadj linear namespace nointerpolation noperspective NULL out packoffset pass pixelfragment point precise return register row_major sample sampler shared stateblock stateblock_state static struct switch tbuffer technique technique10 technique11 texture typedef triangle uniform vertexfragment volatile while ) end def self.keywords_type @keywords_type ||= Set.new %w( dword matrix snorm string unorm unsigned void vector BlendState Buffer ByteAddressBuffer ComputeShader DepthStencilState DepthStencilView DomainShader GeometryShader HullShader InputPatch LineStream OutputPatch PixelShader PointStream RasterizerState RenderTargetView RasterizerOrderedBuffer RasterizerOrderedByteAddressBuffer RasterizerOrderedStructuredBuffer RasterizerOrderedTexture1D RasterizerOrderedTexture1DArray RasterizerOrderedTexture2D RasterizerOrderedTexture2DArray RasterizerOrderedTexture3D RWBuffer RWByteAddressBuffer RWStructuredBuffer RWTexture1D RWTexture1DArray RWTexture2D RWTexture2DArray RWTexture3D SamplerState SamplerComparisonState StructuredBuffer Texture1D Texture1DArray Texture2D Texture2DArray Texture2DMS Texture2DMSArray Texture3D TextureCube TextureCubeArray TriangleStream VertexShader bool1 bool2 bool3 bool4 BOOL1 BOOL2 BOOL3 BOOL4 int1 int2 int3 int4 half1 half2 half3 half4 float1 float2 float3 float4 double1 double2 double3 double4 bool1x1 bool1x2 bool1x3 bool1x4 bool2x1 bool2x2 bool2x3 bool2x4 bool3x1 bool3x2 bool3x3 bool3x4 bool4x1 bool4x2 bool4x3 bool4x4 BOOL1x1 BOOL1x2 BOOL1x3 BOOL1x4 BOOL2x1 BOOL2x2 BOOL2x3 BOOL2x4 BOOL3x1 BOOL3x2 BOOL3x3 BOOL3x4 BOOL4x1 BOOL4x2 BOOL4x3 BOOL4x4 half1x1 half1x2 half1x3 half1x4 half2x1 half2x2 half2x3 half2x4 half3x1 half3x2 half3x3 half3x4 half4x1 half4x2 half4x3 half4x4 int1x1 int1x2 int1x3 int1x4 int2x1 int2x2 int2x3 int2x4 int3x1 int3x2 int3x3 int3x4 int4x1 int4x2 int4x3 int4x4 float1x1 float1x2 float1x3 float1x4 float2x1 float2x2 float2x3 float2x4 float3x1 float3x2 float3x3 float3x4 float4x1 float4x2 float4x3 float4x4 double1x1 double1x2 double1x3 double1x4 double2x1 double2x2 double2x3 double2x4 double3x1 double3x2 double3x3 double3x4 double4x1 double4x2 double4x3 double4x4 ) end def self.reserved @reserved ||= Set.new %w( auto catch char const_cast delete dynamic_cast enum explicit friend goto long mutable new operator private protected public reinterpret_cast short signed sizeof static_cast template this throw try typename union unsigned using virtual ) end def self.builtins @builtins ||= Set.new %w( abort abs acos all AllMemoryBarrier AllMemoryBarrierWithGroupSync any AppendStructuredBuffer asdouble asfloat asin asint asuint asuint atan atan2 ceil CheckAccessFullyMapped clamp clip CompileShader ConsumeStructuredBuffer cos cosh countbits cross D3DCOLORtoUBYTE4 ddx ddx_coarse ddx_fine ddy ddy_coarse ddy_fine degrees determinant DeviceMemoryBarrier DeviceMemoryBarrierWithGroupSync distance dot dst errorf EvaluateAttributeAtCentroid EvaluateAttributeAtSample EvaluateAttributeSnapped exp exp2 f16tof32 f32tof16 faceforward firstbithigh firstbitlow floor fma fmod frac frexp fwidth GetRenderTargetSampleCount GetRenderTargetSamplePosition GlobalOrderedCountIncrement GroupMemoryBarrier GroupMemoryBarrierWithGroupSync InterlockedAdd InterlockedAnd InterlockedCompareExchange InterlockedCompareStore InterlockedExchange InterlockedMax InterlockedMin InterlockedOr InterlockedXor isfinite isinf isnan ldexp length lerp lit log log10 log2 mad max min modf msad4 mul noise normalize pow printf Process2DQuadTessFactorsAvg Process2DQuadTessFactorsMax Process2DQuadTessFactorsMin ProcessIsolineTessFactors ProcessQuadTessFactorsAvg ProcessQuadTessFactorsMax ProcessQuadTessFactorsMin ProcessTriTessFactorsAvg ProcessTriTessFactorsMax ProcessTriTessFactorsMin QuadReadLaneAt QuadSwapX QuadSwapY radians rcp reflect refract reversebits round rsqrt saturate sign sin sincos sinh smoothstep sqrt step tan tanh tex1D tex1D tex1Dbias tex1Dgrad tex1Dlod tex1Dproj tex2D tex2D tex2Dbias tex2Dgrad tex2Dlod tex2Dproj tex3D tex3D tex3Dbias tex3Dgrad tex3Dlod tex3Dproj texCUBE texCUBE texCUBEbias texCUBEgrad texCUBElod texCUBEproj transpose trunc WaveAllBitAnd WaveAllMax WaveAllMin WaveAllBitOr WaveAllBitXor WaveAllEqual WaveAllProduct WaveAllSum WaveAllTrue WaveAnyTrue WaveBallot WaveGetLaneCount WaveGetLaneIndex WaveGetOrderedIndex WaveIsHelperLane WaveOnce WavePrefixProduct WavePrefixSum WaveReadFirstLane WaveReadLaneAt SV_CLIPDISTANCE SV_CLIPDISTANCE0 SV_CLIPDISTANCE1 SV_CULLDISTANCE SV_CULLDISTANCE0 SV_CULLDISTANCE1 SV_COVERAGE SV_DEPTH SV_DEPTHGREATEREQUAL SV_DEPTHLESSEQUAL SV_DISPATCHTHREADID SV_DOMAINLOCATION SV_GROUPID SV_GROUPINDEX SV_GROUPTHREADID SV_GSINSTANCEID SV_INNERCOVERAGE SV_INSIDETESSFACTOR SV_INSTANCEID SV_ISFRONTFACE SV_OUTPUTCONTROLPOINTID SV_POSITION SV_PRIMITIVEID SV_RENDERTARGETARRAYINDEX SV_SAMPLEINDEX SV_STENCILREF SV_TESSFACTOR SV_VERTEXID SV_VIEWPORTARRAYINDEX allow_uav_condition branch call domain earlydepthstencil fastopt flatten forcecase instance loop maxtessfactor numthreads outputcontrolpoints outputtopology partitioning patchconstantfunc unroll BINORMAL BINORMAL0 BINORMAL1 BINORMAL2 BINORMAL3 BINORMAL4 BLENDINDICES0 BLENDINDICES1 BLENDINDICES2 BLENDINDICES3 BLENDINDICES4 BLENDWEIGHT0 BLENDWEIGHT1 BLENDWEIGHT2 BLENDWEIGHT3 BLENDWEIGHT4 COLOR COLOR0 COLOR1 COLOR2 COLOR3 COLOR4 NORMAL NORMAL0 NORMAL1 NORMAL2 NORMAL3 NORMAL4 POSITION POSITION0 POSITION1 POSITION2 POSITION3 POSITION4 POSITIONT PSIZE0 PSIZE1 PSIZE2 PSIZE3 PSIZE4 TANGENT TANGENT0 TANGENT1 TANGENT2 TANGENT3 TANGENT4 TESSFACTOR0 TESSFACTOR1 TESSFACTOR2 TESSFACTOR3 TESSFACTOR4 TEXCOORD0 TEXCOORD1 TEXCOORD2 TEXCOORD3 TEXCOORD4 FOG PSIZE VFACE VPOS DEPTH0 DEPTH1 DEPTH2 DEPTH3 DEPTH4 ) end ws = %r((?:\s|//.*?\n|/[*].*?[*]/)+) id = /[a-zA-Z_][a-zA-Z0-9_]*/ state :root do mixin :expr_whitespace rule %r( ([\w*\s]+?[\s*]) # return arguments (#{id}) # function name (\s*\([^;]*?\)(?:\s*:\s+#{id})?) # signature (#{ws}?)({|;) # open brace or semicolon )mx do |m| # This is copied from the C lexer recurse m[1] token Name::Function, m[2] recurse m[3] recurse m[4] token Punctuation, m[5] if m[5] == ?{ push :function end end rule %r/\{/, Punctuation, :function mixin :statements end end end end rouge-3.28.0/lib/rouge/lexers/hocon.rb000066400000000000000000000041601417417255300175630ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'json.rb' class HOCON < JSON title 'HOCON' desc "Human-Optimized Config Object Notation (https://github.com/lightbend/config)" tag 'hocon' filenames '*.hocon' state :comments do # Comments rule %r(//.*?$), Comment::Single rule %r(#.*?$), Comment::Single end prepend :root do mixin :comments end prepend :object do # Keywords rule %r/\b(?:include|url|file|classpath)\b/, Keyword end state :name do rule %r/("(?:\"|[^"\n])*?")(\s*)([:=]|(?={))/ do groups Name::Label, Text::Whitespace, Punctuation end rule %r/([-\w.]+)(\s*)([:=]|(?={))/ do groups Name::Label, Text::Whitespace, Punctuation end end state :value do mixin :comments rule %r/\n/, Text::Whitespace rule %r/\s+/, Text::Whitespace mixin :constants # Interpolation rule %r/[$][{][?]?/, Literal::String::Interpol, :interpolation # Strings rule %r/"""/, Literal::String::Double, :multiline_string rule %r/"/, Str::Double, :string rule %r/\[/, Punctuation, :array rule %r/{/, Punctuation, :object # Symbols (only those not handled by JSON) rule %r/[()=]/, Punctuation # Values rule %r/[^$"{}\[\]:=,\+#`^?!@*&]+?/, Literal end state :interpolation do rule %r/[\w\-\.]+?/, Name::Variable rule %r/}/, Literal::String::Interpol, :pop! end prepend :string do rule %r/[$][{][?]?/, Literal::String::Interpol, :interpolation rule %r/[^\\"\${]+/, Literal::String::Double end state :multiline_string do rule %r/"[^"]{1,2}/, Literal::String::Double mixin :string rule %r/"""/, Literal::String::Double, :pop! end prepend :constants do # Numbers (handle the case where we have multiple periods, ie. IP addresses) rule %r/\d+\.(\d+\.?){3,}/, Literal end end end end rouge-3.28.0/lib/rouge/lexers/hql.rb000066400000000000000000000146221417417255300172450ustar00rootroot00000000000000# -*- coding: utf-8 -*- # module Rouge module Lexers load_lexer 'sql.rb' class HQL < SQL title "HQL" desc "Hive Query Language SQL dialect" tag 'hql' filenames '*.hql' def self.keywords # sources: # https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL # https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF @keywords ||= Set.new(%w( ADD ADMIN AFTER ANALYZE ARCHIVE ASC BEFORE BUCKET BUCKETS CASCADE CHANGE CLUSTER CLUSTERED CLUSTERSTATUS COLLECTION COLUMNS COMMENT COMPACT COMPACTIONS COMPUTE CONCATENATE CONTINUE DATA DATABASES DATETIME DAY DBPROPERTIES DEFERRED DEFINED DELIMITED DEPENDENCY DESC DIRECTORIES DIRECTORY DISABLE DISTRIBUTE ELEM_TYPE ENABLE ESCAPED EXCLUSIVE EXPLAIN EXPORT FIELDS FILE FILEFORMAT FIRST FORMAT FORMATTED FUNCTIONS HOLD_DDLTIME HOUR IDXPROPERTIES IGNORE INDEX INDEXES INPATH INPUTDRIVER INPUTFORMAT ITEMS JAR KEYS KEY_TYPE LIMIT LINES LOAD LOCATION LOCK LOCKS LOGICAL LONG MAPJOIN MATERIALIZED METADATA MINUS MINUTE MONTH MSCK NOSCAN NO_DROP OFFLINE OPTION OUTPUTDRIVER OUTPUTFORMAT OVERWRITE OWNER PARTITIONED PARTITIONS PLUS PRETTY PRINCIPALS PROTECTION PURGE READ READONLY REBUILD RECORDREADER RECORDWRITER REGEXP RELOAD RENAME REPAIR REPLACE REPLICATION RESTRICT REWRITE RLIKE ROLE ROLES SCHEMA SCHEMAS SECOND SEMI SERDE SERDEPROPERTIES SERVER SETS SHARED SHOW SHOW_DATABASE SKEWED SORT SORTED SSL STATISTICS STORED STREAMTABLE STRING STRUCT TABLES TBLPROPERTIES TEMPORARY TERMINATED TINYINT TOUCH TRANSACTIONS UNARCHIVE UNDO UNIONTYPE UNLOCK UNSET UNSIGNED URI USE UTC UTCTIMESTAMP VALUE_TYPE VIEW WHILE YEAR IF ALL ALTER AND ARRAY AS AUTHORIZATION BETWEEN BIGINT BINARY BOOLEAN BOTH BY CASE CAST CHAR COLUMN CONF CREATE CROSS CUBE CURRENT CURRENT_DATE CURRENT_TIMESTAMP CURSOR DATABASE DATE DECIMAL DELETE DESCRIBE DISTINCT DOUBLE DROP ELSE END EXCHANGE EXISTS EXTENDED EXTERNAL FALSE FETCH FLOAT FOLLOWING FOR FROM FULL FUNCTION GRANT GROUP GROUPING HAVING IF IMPORT IN INNER INSERT INT INTERSECT INTERVAL INTO IS JOIN LATERAL LEFT LESS LIKE LOCAL MACRO MAP MORE NONE NOT NULL OF ON OR ORDER OUT OUTER OVER PARTIALSCAN PARTITION PERCENT PRECEDING PRESERVE PROCEDURE RANGE READS REDUCE REVOKE RIGHT ROLLUP ROW ROWS SELECT SET SMALLINT TABLE TABLESAMPLE THEN TIMESTAMP TO TRANSFORM TRIGGER TRUE TRUNCATE UNBOUNDED UNION UNIQUEJOIN UPDATE USER USING UTC_TMESTAMP VALUES VARCHAR WHEN WHERE WINDOW WITH AUTOCOMMIT ISOLATION LEVEL OFFSET SNAPSHOT TRANSACTION WORK WRITE COMMIT ONLY REGEXP RLIKE ROLLBACK START ABORT KEY LAST NORELY NOVALIDATE NULLS RELY VALIDATE CACHE CONSTRAINT FOREIGN PRIMARY REFERENCES DETAIL DOW EXPRESSION OPERATOR QUARTER SUMMARY VECTORIZATION WEEK YEARS MONTHS WEEKS DAYS HOURS MINUTES SECONDS DAYOFWEEK EXTRACT FLOOR INTEGER PRECISION VIEWS TIMESTAMPTZ ZONE TIME NUMERIC NAMED_STRUCT CREATE_UNION ROUND BROUND FLOOR CEIL CEILING RAND EXP LN LOG10 LOG2 LOG POW POWER SQRT BIN HEX UNHEX CONV ABS PMOD SIN ASIN COS ACOS TAN ATAN DEGREES RADIANS POSITIVE NEGATIVE SIGN E PI FACTORIAL CBRT SHIFTLEFT SHIFTRIGHT SHIFTRIGHTUNSIGNED GREATEST LEAST WIDTH_BUCKET SIZE SIZE MAP_KEYS MAP_VALUES ARRAY_CONTAINS SORT_ARRAY BINARY CAST FROM_UNIXTIME UNIX_TIMESTAMP UNIX_TIMESTAMP UNIX_TIMESTAMP TO_DATE YEAR QUARTER MONTH DAY DAYOFMONTH HOUR MINUTE SECOND WEEKOFYEAR EXTRACT DATEDIFF DATE_ADD DATE_SUB FROM_UTC_TIMESTAMP TO_UTC_TIMESTAMP CURRENT_DATE CURRENT_TIMESTAMP ADD_MONTHS LAST_DAY NEXT_DAY TRUNC MONTHS_BETWEEN DATE_FORMAT IF ISNULL ISNOTNULL NVL COALESCE CASE WHEN then else end NULLIF ASSERT_TRUE ASCII BASE64 CHARACTER_LENGTH CHR CONCAT CONTEXT_NGRAMS CONCAT_WS CONCAT_WS DECODE ELT ENCODE FIELD FIND_IN_SET FORMAT_NUMBER GET_JSON_OBJECT IN_FILE INSTR LENGTH LOCATE LOWER LCASE LPAD LTRIM NGRAMS OCTET_LENGTH PARSE_URL PRINTF REGEXP_EXTRACT REGEXP_REPLACE REPEAT REPLACE REVERSE RPAD RTRIM SENTENCES SPACE SPLIT STR_TO_MAP SUBSTR SUBSTRING SUBSTRING_INDEX TRANSLATE TRIM UNBASE64 UPPER UCASE INITCAP LEVENSHTEIN SOUNDEX MASK MASK_FIRST_N MASK_LAST_N MASK_SHOW_FIRST_N MASK_SHOW_LAST_N MASK_HASH JAVA_METHOD REFLECT HASH CURRENT_USER LOGGED_IN_USER CURRENT_DATABASE MD5 SHA1 SHA CRC32 SHA2 AES_ENCRYPT AES_DECRYPT VERSION COUNT SUM AVG MIN MAX VARIANCE VAR_POP VAR_SAMP STDDEV_POP STDDEV_SAMP COVAR_POP COVAR_SAMP CORR PERCENTILE PERCENTILE_APPROX PERCENTILE_APPROX REGR_AVGX REGR_AVGY REGR_COUNT REGR_INTERCEPT REGR_R2 REGR_SLOPE REGR_SXX REGR_SXY REGR_SYY HISTOGRAM_NUMERIC COLLECT_SET COLLECT_LIST NTILE EXPLODE EXPLODE POSEXPLODE INLINE STACK JSON_TUPLE PARSE_URL_TUPLE XPATH XPATH_SHORT XPATH_INT XPATH_LONG XPATH_FLOAT XPATH_DOUBLE XPATH_NUMBER XPATH_STRING GET_JSON_OBJECT JSON_TUPLE PARSE_URL_TUPLE )) end def self.keywords_type # source: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types @keywords_type ||= Set.new(%w( TINYINT SMALLINT INT INTEGER BIGINT FLOAT DOUBLE PRECISION DECIMAL NUMERIC TIMESTAMP DATE INTERVAL STRING VARCHAR CHAR BOOLEAN BINARY ARRAY MAP STRUCT UNIONTYPE )) end prepend :root do # a double-quoted string is a string literal in Hive QL. rule %r/"/, Str::Double, :double_string # interpolation of variables through ${...} rule %r/\$\{/, Name::Variable, :hive_variable end prepend :single_string do rule %r/\$\{/, Name::Variable, :hive_variable rule %r/[^\\'\$]+/, Str::Single end prepend :double_string do rule %r/\$\{/, Name::Variable, :hive_variable # double-quoted strings are string literals so need to change token rule %r/"/, Str::Double, :pop! rule %r/[^\\"\$]+/, Str::Double end state :hive_variable do rule %r/\}/, Name::Variable, :pop! rule %r/[^\}]+/, Name::Variable end end end end rouge-3.28.0/lib/rouge/lexers/html.rb000066400000000000000000000063361417417255300174300ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class HTML < RegexLexer title "HTML" desc "HTML, the markup language of the web" tag 'html' filenames '*.htm', '*.html', '*.xhtml', '*.cshtml' mimetypes 'text/html', 'application/xhtml+xml' def self.detect?(text) return true if text.doctype?(/\bhtml\b/i) return false if text =~ /\A<\?xml\b/ return true if text =~ /<\s*html\b/ end start do @javascript = Javascript.new(options) @css = CSS.new(options) end state :root do rule %r/[^<&]+/m, Text rule %r/&\S*?;/, Name::Entity rule %r//im, Comment::Preproc rule %r//m, Comment::Preproc rule %r//, Comment, :pop! rule %r/-/, Comment end state :tag do rule %r/\s+/m, Text rule %r/[\p{L}:_\[\]()*.-][\p{Word}\p{Cf}:.·\[\]()*-]*\s*=\s*/m, Name::Attribute, :attr rule %r/[\p{L}:_*#-][\p{Word}\p{Cf}:.·*#-]*/, Name::Attribute rule %r(/?\s*>)m, Name::Tag, :pop! end state :attr do # TODO: are backslash escapes valid here? rule %r/"/ do token Str goto :dq end rule %r/'/ do token Str goto :sq end rule %r/[^\s>]+/, Str, :pop! end state :dq do rule %r/"/, Str, :pop! rule %r/[^"]+/, Str end state :sq do rule %r/'/, Str, :pop! rule %r/[^']+/, Str end state :script_content do rule %r([^<]+) do delegate @javascript end rule %r(<\s*/\s*script\s*>)m, Name::Tag, :pop! rule %r(<) do delegate @javascript end end state :style_content do rule %r/[^<]+/ do delegate @lang end rule %r(<\s*/\s*style\s*>)m, Name::Tag, :pop! rule %r/ ->> . / // //= /= < << <<= <= = > >= >> >>= @ @= ^ ^= accumulate apply as-> assoc butlast calling-module-name car cdr chain coll? combinations comp complement compress cond cons cons? constantly count cut cycle dec defclass defmacro defmacro! defmacro/g! defmain defn defreader dict-comp disassemble dispatch-reader-macro distinct do doto drop drop-last drop-while empty? eval eval-and-compile eval-when-compile even? every? filter first flatten float? fn for* fraction genexpr gensym get group-by identity if* if-not if-python2 inc input instance? integer integer-char? integer? interleave interpose islice iterable? iterate iterator? juxt keyword keyword? last let lif lif-not list* list-comp macro-error macroexpand macroexpand-1 map merge-with multicombinations name neg? none? not-in not? nth numeric? odd? partition permutations pos? product quasiquote quote range read read-str reduce remove repeat repeatedly require rest second set-comp setv some string string? symbol? take take-nth take-while tee unless unquote unquote-splicing when with* with-decorator with-gensyms xor yield-from zero? zip zip-longest | |= ~ ) end identifier = %r([\w!$%*+,<=>?/.-]+) keyword = %r([\w!\#$%*+,<=>?/.-]+) def name_token(name) return Keyword if self.class.keywords.include?(name) return Name::Builtin if self.class.builtins.include?(name) nil end state :root do rule %r/;.*?$/, Comment::Single rule %r/\s+/m, Text::Whitespace rule %r/-?\d+\.\d+/, Num::Float rule %r/-?\d+/, Num::Integer rule %r/0x-?[0-9a-fA-F]+/, Num::Hex rule %r/"(\\.|[^"])*"/, Str rule %r/'#{keyword}/, Str::Symbol rule %r/::?#{keyword}/, Name::Constant rule %r/\\(.|[a-z]+)/i, Str::Char rule %r/~@|[`\'#^~&@]/, Operator rule %r/(\()(\s*)(#{identifier})/m do |m| token Punctuation, m[1] token Text::Whitespace, m[2] token(name_token(m[3]) || Name::Function, m[3]) end rule identifier do |m| token name_token(m[0]) || Name end # vectors rule %r/[\[\]]/, Punctuation # maps rule %r/[{}]/, Punctuation # parentheses rule %r/[()]/, Punctuation end end end end rouge-3.28.0/lib/rouge/lexers/idlang.rb000066400000000000000000000311451417417255300177160ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # vim: set ts=2 sw=2 et: module Rouge module Lexers class IDLang < RegexLexer title "IDL" desc "Interactive Data Language" tag 'idlang' filenames '*.idl' name = /[_A-Z]\w*/i kind_param = /(\d+|#{name})/ exponent = /[dDeE][+-]\d+/ def self.exec_unit @exec_unit ||= Set.new %w( PRO FUNCTION ) end def self.keywords @keywords ||= Set.new %w( STRUCT INHERITS RETURN CONTINUE BEGIN END BREAK GOTO ) end def self.standalone_statements # Must not have a comma afterwards @standalone_statements ||= Set.new %w( COMMON FORWARD_FUNCTION ) end def self.decorators # Must not have a comma afterwards @decorators ||= Set.new %w( COMPILE_OPT ) end def self.operators @operators ||= Set.new %w( AND= EQ= GE= GT= LE= LT= MOD= NE= OR= XOR= NOT= ) end def self.conditionals @conditionals ||= Set.new %w( OF DO ENDIF ENDELSE ENDFOR ENDFOREACH ENDWHILE ENDREP ENDCASE ENDSWITCH IF THEN ELSE FOR FOREACH WHILE REPEAT UNTIL CASE SWITCH AND EQ GE GT LE LT MOD NE OR XOR NOT ) end def self.routines @routines ||= Set.new %w( A_CORRELATE ABS ACOS ADAPT_HIST_EQUAL ALOG ALOG10 AMOEBA ANNOTATE ARG_PRESENT ARRAY_EQUAL ARRAY_INDICES ARROW ASCII_TEMPLATE ASIN ASSOC ATAN AXIS BAR_PLOT BESELI BESELJ BESELK BESELY BETA BILINEAR BIN_DATE BINARY_TEMPLATE BINDGEN BINOMIAL BLAS_AXPY BLK_CON BOX_CURSOR BREAK BREAKPOINT BROYDEN BYTARR BYTE BYTEORDER BYTSCL C_CORRELATE CALDAT CALENDAR CALL_EXTERNAL CALL_FUNCTION CALL_METHOD CALL_PROCEDURE CATCH CD CEIL CHEBYSHEV CHECK_MATH CHISQR_CVF CHISQR_PDF CHOLDC CHOLSOL CINDGEN CIR_3PNT CLOSE CLUST_WTS CLUSTER COLOR_CONVERT COLOR_QUAN COLORMAP_APPLICABLE COMFIT COMPLEX COMPLEXARR COMPLEXROUND COMPUTE_MESH_NORMALS COND CONGRID CONJ CONSTRAINED_MIN CONTOUR CONVERT_COORD CONVOL COORD2TO3 CORRELATE COS COSH CRAMER CREATE_STRUCT CREATE_VIEW CROSSP CRVLENGTH CT_LUMINANCE CTI_TEST CURSOR CURVEFIT CV_COORD CVTTOBM CW_ANIMATE CW_ANIMATE_GETP CW_ANIMATE_LOAD CW_ANIMATE_RUN CW_ARCBALL CW_BGROUP CW_CLR_INDEX CW_COLORSEL CW_DEFROI CW_FIELD CW_FILESEL CW_FORM CW_FSLIDER CW_LIGHT_EDITOR CW_LIGHT_EDITOR_GET CW_LIGHT_EDITOR_SET CW_ORIENT CW_PALETTE_EDITOR CW_PALETTE_EDITOR_GET CW_PALETTE_EDITOR_SET CW_PDMENU CW_RGBSLIDER CW_TMPL CW_ZOOM DBLARR DCINDGEN DCOMPLEX DCOMPLEXARR DEFINE_KEY DEFROI DEFSYSV DELETE_SYMBOL DELLOG DELVAR DERIV DERIVSIG DETERM DEVICE DFPMIN DIALOG_MESSAGE DIALOG_PICKFILE DIALOG_PRINTERSETUP DIALOG_PRINTJOB DIALOG_READ_IMAGE DIALOG_WRITE_IMAGE DICTIONARY DIGITAL_FILTER DILATE DINDGEN DISSOLVE DIST DLM_LOAD DLM_REGISTER DO_APPLE_SCRIPT DOC_LIBRARY DOUBLE DRAW_ROI EFONT EIGENQL EIGENVEC ELMHES EMPTY ENABLE_SYSRTN EOF ERASE ERODE ERRORF ERRPLOT EXECUTE EXIT EXP EXPAND EXPAND_PATH EXPINT EXTRAC EXTRACT_SLICE F_CVF F_PDF FACTORIAL FFT FILE_CHMOD FILE_DELETE FILE_EXPAND_PATH FILE_MKDIR FILE_TEST FILE_WHICH FILE_SEARCH PATH_SEP FILE_DIRNAME FILE_BASENAME FILE_INFO FILE_MOVE FILE_COPY FILE_LINK FILE_POLL_INPUT FILEPATH FINDFILE FINDGEN FINITE FIX FLICK FLOAT FLOOR FLOW3 FLTARR FLUSH FORMAT_AXIS_VALUES FORWARD_FUNCTION FREE_LUN FSTAT FULSTR FUNCT FV_TEST FX_ROOT FZ_ROOTS GAMMA GAMMA_CT GAUSS_CVF GAUSS_PDF GAUSS2DFIT GAUSSFIT GAUSSINT GET_DRIVE_LIST GET_KBRD GET_LUN GET_SCREEN_SIZE GET_SYMBOL GETENV GOTO GREG2JUL GRID_TPS GRID3 GS_ITER H_EQ_CT H_EQ_INT HANNING HASH HEAP_GC HELP HILBERT HIST_2D HIST_EQUAL HISTOGRAM HLS HOUGH HQR HSV IBETA IDENTITY IDL_CONTAINER IDLANROI IDLANROIGROUP IDLFFDICOM IDLFFDXF IDLFFLANGUAGECAT IDLFFSHAPE IDLGRAXIS IDLGRBUFFER IDLGRCLIPBOARD IDLGRCOLORBAR IDLGRCONTOUR IDLGRFONT IDLGRIMAGE IDLGRLEGEND IDLGRLIGHT IDLGRMODEL IDLGRMPEG IDLGRPALETTE IDLGRPATTERN IDLGRPLOT IDLGRPOLYGON IDLGRPOLYLINE IDLGRPRINTER IDLGRROI IDLGRROIGROUP IDLGRSCENE IDLGRSURFACE IDLGRSYMBOL IDLGRTESSELLATOR IDLGRTEXT IDLGRVIEW IDLGRVIEWGROUP IDLGRVOLUME IDLGRVRML IDLGRWINDOW IGAMMA IMAGE_CONT IMAGE_STATISTICS IMAGINARY INDGEN INT_2D INT_3D INT_TABULATED INTARR INTERPOL INTERPOLATE INVERT IOCTL ISA ISHFT ISOCONTOUR ISOSURFACE JOURNAL JUL2GREG JULDAY KEYWORD_SET KRIG2D KURTOSIS KW_TEST L64INDGEN LABEL_DATE LABEL_REGION LADFIT LAGUERRE LEEFILT LEGENDRE LINBCG LINDGEN LINFIT LINKIMAGE LIST LIVE_CONTOUR LIVE_CONTROL LIVE_DESTROY LIVE_EXPORT LIVE_IMAGE LIVE_INFO LIVE_LINE LIVE_LOAD LIVE_OPLOT LIVE_PLOT LIVE_PRINT LIVE_RECT LIVE_STYLE LIVE_SURFACE LIVE_TEXT LJLCT LL_ARC_DISTANCE LMFIT LMGR LNGAMMA LNP_TEST LOADCT LOCALE_GET LON64ARR LONARR LONG LONG64 LSODE LU_COMPLEX LUDC LUMPROVE LUSOL M_CORRELATE MACHAR MAKE_ARRAY MAKE_DLL MAP_2POINTS MAP_CONTINENTS MAP_GRID MAP_IMAGE MAP_PATCH MAP_PROJ_INFO MAP_SET MAX MATRIX_MULTIPLY MD_TEST MEAN MEANABSDEV MEDIAN MEMORY MESH_CLIP MESH_DECIMATE MESH_ISSOLID MESH_MERGE MESH_NUMTRIANGLES MESH_OBJ MESH_SMOOTH MESH_SURFACEAREA MESH_VALIDATE MESH_VOLUME MESSAGE MIN MIN_CURVE_SURF MK_HTML_HELP MODIFYCT MOMENT MORPH_CLOSE MORPH_DISTANCE MORPH_GRADIENT MORPH_HITORMISS MORPH_OPEN MORPH_THIN MORPH_TOPHAT MPEG_CLOSE MPEG_OPEN MPEG_PUT MPEG_SAVE MSG_CAT_CLOSE MSG_CAT_COMPILE MSG_CAT_OPEN MULTI N_ELEMENTS N_PARAMS N_TAGS NEWTON NORM OBJ_CLASS OBJ_DESTROY OBJ_ISA OBJ_NEW OBJ_VALID OBJARR ON_ERROR ON_IOERROR ONLINE_HELP OPEN OPENR OPENW OPENU OPLOT OPLOTERR ORDEREDHASH P_CORRELATE PARTICLE_TRACE PCOMP PLOT PLOT_3DBOX PLOT_FIELD PLOTERR PLOTS PNT_LINE POINT_LUN POLAR_CONTOUR POLAR_SURFACE POLY POLY_2D POLY_AREA POLY_FIT POLYFILL POLYFILLV POLYSHADE POLYWARP POPD POWELL PRIMES PRINT PRINTF PRINTD PRODUCT PROFILE PROFILER PROFILES PROJECT_VOL PS_SHOW_FONTS PSAFM PSEUDO PTR_FREE PTR_NEW PTR_VALID PTRARR PUSHD QROMB QROMO QSIMP QUERY_CSV R_CORRELATE R_TEST RADON RANDOMN RANDOMU RANKS RDPIX READ READF READ_ASCII READ_BINARY READ_BMP READ_CSV READ_DICOM READ_IMAGE READ_INTERFILE READ_JPEG READ_PICT READ_PNG READ_PPM READ_SPR READ_SRF READ_SYLK READ_TIFF READ_WAV READ_WAVE READ_X11_BITMAP READ_XWD READS READU REBIN RECALL_COMMANDS RECON3 REDUCE_COLORS REFORM REGRESS REPLICATE REPLICATE_INPLACE RESOLVE_ALL RESOLVE_ROUTINE RESTORE RETALL REVERSE REWIND RK4 ROBERTS ROT ROTATE ROUND ROUTINE_INFO RS_TEST S_TEST SAVE SAVGOL SCALE3 SCALE3D SCOPE_LEVEL SCOPE_TRACEBACK SCOPE_VARFETCH SCOPE_VARNAME SEARCH2D SEARCH3D SET_PLOT SET_SHADING SET_SYMBOL SETENV SETLOG SETUP_KEYS SFIT SHADE_SURF SHADE_SURF_IRR SHADE_VOLUME SHIFT SHOW3 SHOWFONT SIGNUM SIN SINDGEN SINH SIZE SKEWNESS SKIPF SLICER3 SLIDE_IMAGE SMOOTH SOBEL SOCKET SORT SPAWN SPH_4PNT SPH_SCAT SPHER_HARM SPL_INIT SPL_INTERP SPLINE SPLINE_P SPRSAB SPRSAX SPRSIN SPRSTP SQRT STANDARDIZE STDDEV STOP STRARR STRCMP STRCOMPRESS STREAMLINE STREGEX STRETCH STRING STRJOIN STRLEN STRLOWCASE STRMATCH STRMESSAGE STRMID STRPOS STRPUT STRSPLIT STRTRIM STRUCT_ASSIGN STRUCT_HIDE STRUPCASE SURFACE SURFR SVDC SVDFIT SVSOL SWAP_ENDIAN SWITCH SYSTIME T_CVF T_PDF T3D TAG_NAMES TAN TANH TAPRD TAPWRT TEK_COLOR TEMPORARY TETRA_CLIP TETRA_SURFACE TETRA_VOLUME THIN THREED TIME_TEST2 TIMEGEN TM_TEST TOTAL TRACE TRANSPOSE TRI_SURF TRIANGULATE TRIGRID TRIQL TRIRED TRISOL TRNLOG TS_COEF TS_DIFF TS_FCAST TS_SMOOTH TV TVCRS TVLCT TVRD TVSCL TYPENAME UINDGEN UINT UINTARR UL64INDGEN ULINDGEN ULON64ARR ULONARR ULONG ULONG64 UNIQ USERSYM VALUE_LOCATE VARIANCE VAX_FLOAT VECTOR_FIELD VEL VELOVECT VERT_T3D VOIGT VORONOI VOXEL_PROJ WAIT WARP_TRI WATERSHED WDELETE WEOF WF_DRAW WHERE WIDGET_BASE WIDGET_BUTTON WIDGET_CONTROL WIDGET_DRAW WIDGET_DROPLIST WIDGET_EVENT WIDGET_INFO WIDGET_LABEL WIDGET_LIST WIDGET_SLIDER WIDGET_TABLE WIDGET_TEXT WINDOW WRITE_BMP WRITE_CSV WRITE_IMAGE WRITE_JPEG WRITE_NRIF WRITE_PICT WRITE_PNG WRITE_PPM WRITE_SPR WRITE_SRF WRITE_SYLK WRITE_TIFF WRITE_WAV WRITE_WAVE WRITEU WSET WSHOW WTN WV_APPLET WV_CW_WAVELET WV_CWT WV_DENOISE WV_DWT WV_FN_COIFLET WV_FN_DAUBECHIES WV_FN_GAUSSIAN WV_FN_HAAR WV_FN_MORLET WV_FN_PAUL WV_FN_SYMLET WV_IMPORT_DATA WV_IMPORT_WAVELET WV_PLOT3D_WPS WV_PLOT_MULTIRES WV_PWT WV_TOOL_DENOISE XBM_EDIT XDISPLAYFILE XDXF XFONT XINTERANIMATE XLOADCT XMANAGER XMNG_TMPL XMTOOL XOBJVIEW XPALETTE XPCOLOR XPLOT3D XREGISTERED XROI XSQ_TEST XSURFACE XVAREDIT XVOLUME XVOLUME_ROTATE XVOLUME_WRITE_IMAGE XYOUTS ZOOM ZOOM_24 ) end state :root do rule %r/\s+/, Text::Whitespace # Normal comments rule %r/;.*$/, Comment::Single rule %r/\,\s*\,/, Error rule %r/\!#{name}/, Name::Variable::Global rule %r/[(),:\&\$]/, Punctuation ## Format statements are quite a strange beast. ## Better process them in their own state. #rule %r/\b(FORMAT)(\s*)(\()/mi do |m| # token Keyword, m[1] # token Text::Whitespace, m[2] # token Punctuation, m[3] # push :format_spec #end rule %r( [+-]? # sign ( (\d+[.]\d*|[.]\d+)(#{exponent})? | \d+#{exponent} # exponent is mandatory ) (_#{kind_param})? # kind parameter )xi, Num::Float rule %r/\d+(B|S|U|US|LL|L|ULL|UL)?/i, Num::Integer rule %r/"[0-7]+(B|O|U|ULL|UL|LL|L)?/i, Num::Oct rule %r/'[0-9A-F]+'X(B|S|US|ULL|UL|U|LL|L)?/i, Num::Hex rule %r/(#{kind_param}_)?'/, Str::Single, :string_single rule %r/(#{kind_param}_)?"/, Str::Double, :string_double rule %r{\#\#|\#|\&\&|\|\||/=|<=|>=|->|\@|\?|[-+*/<=~^{}]}, Operator # Structures and the like rule %r/(#{name})(\.)([^\s,]*)/i do groups Name, Operator, Name #delegate IDLang, m[3] end rule %r/(function|pro)((?:\s|\$\s)+)/i do groups Keyword, Text::Whitespace push :funcname end rule %r/#{name}/m do |m| match = m[0].upcase if self.class.keywords.include? match token Keyword elsif self.class.conditionals.include? match token Keyword elsif self.class.decorators.include? match token Name::Decorator elsif self.class.standalone_statements.include? match token Keyword::Reserved elsif self.class.operators.include? match token Operator::Word elsif self.class.routines.include? match token Name::Builtin else token Name end end end state :funcname do rule %r/#{name}/, Name::Function rule %r/\s+/, Text::Whitespace rule %r/(:+|\$)/, Operator rule %r/;.*/, Comment::Single # Be done with this state if we hit EOL or comma rule %r/$/, Text::Whitespace, :pop! rule %r/,/, Operator, :pop! end state :string_single do rule %r/[^']+/, Str::Single rule %r/''/, Str::Escape rule %r/'/, Str::Single, :pop! end state :string_double do rule %r/[^"]+/, Str::Double rule %r/"/, Str::Double, :pop! end state :format_spec do rule %r/'/, Str::Single, :string_single rule %r/"/, Str::Double, :string_double rule %r/\(/, Punctuation, :format_spec rule %r/\)/, Punctuation, :pop! rule %r/,/, Punctuation rule %r/\s+/, Text::Whitespace # Edit descriptors could be seen as a kind of "format literal". rule %r/[^\s'"(),]+/, Literal end end end end rouge-3.28.0/lib/rouge/lexers/igorpro.rb000066400000000000000000000761731417417255300201530ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class IgorPro < RegexLexer tag 'igorpro' filenames '*.ipf' mimetypes 'text/x-igorpro' title "IgorPro" desc "WaveMetrics Igor Pro" def self.keywords @keywords ||= Set.new %w( structure endstructure threadsafe static macro proc window menu function end if else elseif endif switch strswitch endswitch break return continue for endfor do while case default try catch endtry abortonrte ) end def self.preprocessor @preprocessor ||= Set.new %w( pragma include define ifdef ifndef undef if elif else endif ) end def self.igorDeclarations @igorDeclarations ||= Set.new %w( variable string wave strconstant constant nvar svar dfref funcref struct char uchar int16 uint16 int32 uint32 int64 uint64 float double ) end def self.igorConstants @igorConstants ||= Set.new %w( nan inf ) end def self.igorFunction @igorFunction ||= Set.new %w( AddListItem AiryA AiryAD AiryB AiryBD AnnotationInfo AnnotationList AxisInfo AxisList AxisValFromPixel AxonTelegraphAGetDataNum AxonTelegraphAGetDataString AxonTelegraphAGetDataStruct AxonTelegraphGetDataNum AxonTelegraphGetDataString AxonTelegraphGetDataStruct AxonTelegraphGetTimeoutMs AxonTelegraphSetTimeoutMs Base64Decode Base64Encode Besseli Besselj Besselk Bessely BinarySearch BinarySearchInterp CTabList CaptureHistory CaptureHistoryStart CheckName ChildWindowList CleanupName ContourInfo ContourNameList ContourNameToWaveRef ContourZ ControlNameList ConvertTextEncoding CountObjects CountObjectsDFR CreationDate CsrInfo CsrWave CsrWaveRef CsrXWave CsrXWaveRef DataFolderDir DataFolderExists DataFolderRefStatus DataFolderRefsEqual DateToJulian Dawson DimDelta DimOffset DimSize Faddeeva FetchURL FindDimLabel FindListItem FontList FontSizeHeight FontSizeStringWidth FresnelCos FresnelSin FuncRefInfo FunctionInfo FunctionList FunctionPath GISGetAllFileFormats GISSRefsAreEqual Gauss Gauss1D Gauss2D GetBrowserLine GetBrowserSelection GetDataFolder GetDataFolderDFR GetDefaultFont GetDefaultFontSize GetDefaultFontStyle GetDimLabel GetEnvironmentVariable GetErrMessage GetFormula GetIndependentModuleName GetIndexedObjName GetIndexedObjNameDFR GetKeyState GetRTErrMessage GetRTError GetRTLocInfo GetRTLocation GetRTStackInfo GetScrapText GetUserData GetWavesDataFolder GetWavesDataFolderDFR GizmoInfo GizmoScale GrepList GrepString GuideInfo GuideNameList HDF5AttributeInfo HDF5DatasetInfo HDF5LibraryInfo HDF5TypeInfo Hash HyperG0F1 HyperG1F1 HyperG2F1 HyperGNoise HyperGPFQ IgorInfo IgorVersion ImageInfo ImageNameList ImageNameToWaveRef IndependentModuleList IndexToScale IndexedDir IndexedFile Inf Integrate1D Interp2D Interp3D ItemsInList JacobiCn JacobiSn JulianToDate Laguerre LaguerreA LaguerreGauss LambertW LayoutInfo LegendreA ListMatch ListToTextWave ListToWaveRefWave LowerStr MCC_AutoBridgeBal MCC_AutoFastComp MCC_AutoPipetteOffset MCC_AutoSlowComp MCC_AutoWholeCellComp MCC_GetBridgeBalEnable MCC_GetBridgeBalResist MCC_GetFastCompCap MCC_GetFastCompTau MCC_GetHolding MCC_GetHoldingEnable MCC_GetMode MCC_GetNeutralizationCap MCC_GetNeutralizationEnable MCC_GetOscKillerEnable MCC_GetPipetteOffset MCC_GetPrimarySignalGain MCC_GetPrimarySignalHPF MCC_GetPrimarySignalLPF MCC_GetRsCompBandwidth MCC_GetRsCompCorrection MCC_GetRsCompEnable MCC_GetRsCompPrediction MCC_GetSecondarySignalGain MCC_GetSecondarySignalLPF MCC_GetSlowCompCap MCC_GetSlowCompTau MCC_GetSlowCompTauX20Enable MCC_GetSlowCurrentInjEnable MCC_GetSlowCurrentInjLevel MCC_GetSlowCurrentInjSetlTime MCC_GetWholeCellCompCap MCC_GetWholeCellCompEnable MCC_GetWholeCellCompResist MCC_SelectMultiClamp700B MCC_SetBridgeBalEnable MCC_SetBridgeBalResist MCC_SetFastCompCap MCC_SetFastCompTau MCC_SetHolding MCC_SetHoldingEnable MCC_SetMode MCC_SetNeutralizationCap MCC_SetNeutralizationEnable MCC_SetOscKillerEnable MCC_SetPipetteOffset MCC_SetPrimarySignalGain MCC_SetPrimarySignalHPF MCC_SetPrimarySignalLPF MCC_SetRsCompBandwidth MCC_SetRsCompCorrection MCC_SetRsCompEnable MCC_SetRsCompPrediction MCC_SetSecondarySignalGain MCC_SetSecondarySignalLPF MCC_SetSlowCompCap MCC_SetSlowCompTau MCC_SetSlowCompTauX20Enable MCC_SetSlowCurrentInjEnable MCC_SetSlowCurrentInjLevel MCC_SetSlowCurrentInjSetlTime MCC_SetTimeoutMs MCC_SetWholeCellCompCap MCC_SetWholeCellCompEnable MCC_SetWholeCellCompResist MPFXEMGPeak MPFXExpConvExpPeak MPFXGaussPeak MPFXLorenzianPeak MPFXVoigtPeak MacroList MandelbrotPoint MarcumQ MatrixCondition MatrixDet MatrixDot MatrixRank MatrixTrace ModDate NVAR_Exists NaN NameOfWave NewFreeDataFolder NewFreeWave NormalizeUnicode NumVarOrDefault NumberByKey OperationList PICTInfo PICTList PadString PanelResolution ParamIsDefault ParseFilePath PathList Pi PixelFromAxisVal PolygonArea PossiblyQuoteName ProcedureText RemoveByKey RemoveEnding RemoveFromList RemoveListItem ReplaceNumberByKey ReplaceString ReplaceStringByKey SQL2DBinaryWaveToTextWave SQLAllocHandle SQLAllocStmt SQLBinaryWavesToTextWave SQLBindCol SQLBindParameter SQLBrowseConnect SQLBulkOperations SQLCancel SQLCloseCursor SQLColAttributeNum SQLColAttributeStr SQLColumnPrivileges SQLColumns SQLConnect SQLDataSources SQLDescribeCol SQLDescribeParam SQLDisconnect SQLDriverConnect SQLDrivers SQLEndTran SQLError SQLExecDirect SQLExecute SQLFetch SQLFetchScroll SQLForeignKeys SQLFreeConnect SQLFreeEnv SQLFreeHandle SQLFreeStmt SQLGetConnectAttrNum SQLGetConnectAttrStr SQLGetCursorName SQLGetDataNum SQLGetDataStr SQLGetDescFieldNum SQLGetDescFieldStr SQLGetDescRec SQLGetDiagFieldNum SQLGetDiagFieldStr SQLGetDiagRec SQLGetEnvAttrNum SQLGetEnvAttrStr SQLGetFunctions SQLGetInfoNum SQLGetInfoStr SQLGetStmtAttrNum SQLGetStmtAttrStr SQLGetTypeInfo SQLMoreResults SQLNativeSql SQLNumParams SQLNumResultCols SQLNumResultRowsIfKnown SQLNumRowsFetched SQLParamData SQLPrepare SQLPrimaryKeys SQLProcedureColumns SQLProcedures SQLPutData SQLReinitialize SQLRowCount SQLSetConnectAttrNum SQLSetConnectAttrStr SQLSetCursorName SQLSetDescFieldNum SQLSetDescFieldStr SQLSetDescRec SQLSetEnvAttrNum SQLSetEnvAttrStr SQLSetPos SQLSetStmtAttrNum SQLSetStmtAttrStr SQLSpecialColumns SQLStatistics SQLTablePrivileges SQLTables SQLTextWaveTo2DBinaryWave SQLTextWaveToBinaryWaves SQLUpdateBoundValues SQLXOPCheckState SVAR_Exists ScreenResolution Secs2Date Secs2Time SelectNumber SelectString SetEnvironmentVariable SortList SpecialCharacterInfo SpecialCharacterList SpecialDirPath SphericalBessJ SphericalBessJD SphericalBessY SphericalBessYD SphericalHarmonics StartMSTimer StatsBetaCDF StatsBetaPDF StatsBinomialCDF StatsBinomialPDF StatsCMSSDCDF StatsCauchyCDF StatsCauchyPDF StatsChiCDF StatsChiPDF StatsCorrelation StatsDExpCDF StatsDExpPDF StatsEValueCDF StatsEValuePDF StatsErlangCDF StatsErlangPDF StatsErrorPDF StatsExpCDF StatsExpPDF StatsFCDF StatsFPDF StatsFriedmanCDF StatsGEVCDF StatsGEVPDF StatsGammaCDF StatsGammaPDF StatsGeometricCDF StatsGeometricPDF StatsHyperGCDF StatsHyperGPDF StatsInvBetaCDF StatsInvBinomialCDF StatsInvCMSSDCDF StatsInvCauchyCDF StatsInvChiCDF StatsInvDExpCDF StatsInvEValueCDF StatsInvExpCDF StatsInvFCDF StatsInvFriedmanCDF StatsInvGammaCDF StatsInvGeometricCDF StatsInvKuiperCDF StatsInvLogNormalCDF StatsInvLogisticCDF StatsInvMaxwellCDF StatsInvMooreCDF StatsInvNBinomialCDF StatsInvNCChiCDF StatsInvNCFCDF StatsInvNormalCDF StatsInvParetoCDF StatsInvPoissonCDF StatsInvPowerCDF StatsInvQCDF StatsInvQpCDF StatsInvRayleighCDF StatsInvRectangularCDF StatsInvSpearmanCDF StatsInvStudentCDF StatsInvTopDownCDF StatsInvTriangularCDF StatsInvUsquaredCDF StatsInvVonMisesCDF StatsInvWeibullCDF StatsKuiperCDF StatsLogNormalCDF StatsLogNormalPDF StatsLogisticCDF StatsLogisticPDF StatsMaxwellCDF StatsMaxwellPDF StatsMedian StatsMooreCDF StatsNBinomialCDF StatsNBinomialPDF StatsNCChiCDF StatsNCChiPDF StatsNCFCDF StatsNCFPDF StatsNCTCDF StatsNCTPDF StatsNormalCDF StatsNormalPDF StatsParetoCDF StatsParetoPDF StatsPermute StatsPoissonCDF StatsPoissonPDF StatsPowerCDF StatsPowerNoise StatsPowerPDF StatsQCDF StatsQpCDF StatsRayleighCDF StatsRayleighPDF StatsRectangularCDF StatsRectangularPDF StatsRunsCDF StatsSpearmanRhoCDF StatsStudentCDF StatsStudentPDF StatsTopDownCDF StatsTriangularCDF StatsTriangularPDF StatsTrimmedMean StatsUSquaredCDF StatsVonMisesCDF StatsVonMisesNoise StatsVonMisesPDF StatsWaldCDF StatsWaldPDF StatsWeibullCDF StatsWeibullPDF StopMSTimer StrVarOrDefault StringByKey StringFromList StringList StudentA StudentT TDMAddChannel TDMAddGroup TDMAppendDataValues TDMAppendDataValuesTime TDMChannelPropertyExists TDMCloseChannel TDMCloseFile TDMCloseGroup TDMCreateChannelProperty TDMCreateFile TDMCreateFileProperty TDMCreateGroupProperty TDMFilePropertyExists TDMGetChannelPropertyNames TDMGetChannelPropertyNum TDMGetChannelPropertyStr TDMGetChannelPropertyTime TDMGetChannelPropertyType TDMGetChannelStringPropertyLen TDMGetChannels TDMGetDataType TDMGetDataValues TDMGetDataValuesTime TDMGetFilePropertyNames TDMGetFilePropertyNum TDMGetFilePropertyStr TDMGetFilePropertyTime TDMGetFilePropertyType TDMGetFileStringPropertyLen TDMGetGroupPropertyNames TDMGetGroupPropertyNum TDMGetGroupPropertyStr TDMGetGroupPropertyTime TDMGetGroupPropertyType TDMGetGroupStringPropertyLen TDMGetGroups TDMGetLibraryErrorDescription TDMGetNumChannelProperties TDMGetNumChannels TDMGetNumDataValues TDMGetNumFileProperties TDMGetNumGroupProperties TDMGetNumGroups TDMGroupPropertyExists TDMOpenFile TDMOpenFileEx TDMRemoveChannel TDMRemoveGroup TDMReplaceDataValues TDMReplaceDataValuesTime TDMSaveFile TDMSetChannelPropertyNum TDMSetChannelPropertyStr TDMSetChannelPropertyTime TDMSetDataValues TDMSetDataValuesTime TDMSetFilePropertyNum TDMSetFilePropertyStr TDMSetFilePropertyTime TDMSetGroupPropertyNum TDMSetGroupPropertyStr TDMSetGroupPropertyTime TableInfo TagVal TagWaveRef TextEncodingCode TextEncodingName TextFile ThreadGroupCreate ThreadGroupGetDF ThreadGroupGetDFR ThreadGroupRelease ThreadGroupWait ThreadProcessorCount ThreadReturnValue TraceFromPixel TraceInfo TraceNameList TraceNameToWaveRef TrimString URLDecode URLEncode UnPadString UniqueName UnsetEnvironmentVariable UpperStr VariableList Variance VoigtFunc VoigtPeak WaveCRC WaveDims WaveExists WaveHash WaveInfo WaveList WaveMax WaveMin WaveName WaveRefIndexed WaveRefIndexedDFR WaveRefWaveToList WaveRefsEqual WaveTextEncoding WaveType WaveUnits WhichListItem WinList WinName WinRecreation WinType XWaveName XWaveRefFromTrace ZernikeR abs acos acosh alog area areaXY asin asinh atan atan2 atanh beta betai binomial binomialNoise binomialln cabs ceil cequal char2num chebyshev chebyshevU cmplx cmpstr conj cos cosIntegral cosh cot coth cpowi csc csch date date2secs datetime defined deltax digamma dilogarithm ei enoise equalWaves erf erfc erfcw exists exp expInt expIntegralE1 expNoise fDAQmx_AI_GetReader fDAQmx_AO_UpdateOutputs fDAQmx_CTR_Finished fDAQmx_CTR_IsFinished fDAQmx_CTR_IsPulseFinished fDAQmx_CTR_ReadCounter fDAQmx_CTR_ReadWithOptions fDAQmx_CTR_SetPulseFrequency fDAQmx_CTR_Start fDAQmx_ConnectTerminals fDAQmx_DIO_Finished fDAQmx_DIO_PortWidth fDAQmx_DIO_Read fDAQmx_DIO_Write fDAQmx_DeviceNames fDAQmx_DisconnectTerminals fDAQmx_ErrorString fDAQmx_ExternalCalDate fDAQmx_NumAnalogInputs fDAQmx_NumAnalogOutputs fDAQmx_NumCounters fDAQmx_NumDIOPorts fDAQmx_ReadChan fDAQmx_ReadNamedChan fDAQmx_ResetDevice fDAQmx_ScanGetAvailable fDAQmx_ScanGetNextIndex fDAQmx_ScanStart fDAQmx_ScanStop fDAQmx_ScanWait fDAQmx_ScanWaitWithTimeout fDAQmx_SelfCalDate fDAQmx_SelfCalibration fDAQmx_WF_IsFinished fDAQmx_WF_WaitUntilFinished fDAQmx_WaveformStart fDAQmx_WaveformStop fDAQmx_WriteChan factorial fakedata faverage faverageXY floor gamma gammaEuler gammaInc gammaNoise gammln gammp gammq gcd gnoise hcsr hermite hermiteGauss imag interp inverseERF inverseERFC leftx limit ln log logNormalNoise lorentzianNoise magsqr max mean median min mod norm note num2char num2istr num2str numpnts numtype p2rect pcsr pnt2x poissonNoise poly poly2D qcsr r2polar real rightx round sawtooth scaleToIndex sec sech sign sin sinIntegral sinc sinh sqrt str2num stringCRC stringmatch strlen strsearch sum tan tango_close_device tango_command_inout tango_compute_image_proj tango_get_dev_attr_list tango_get_dev_black_box tango_get_dev_cmd_list tango_get_dev_status tango_get_dev_timeout tango_get_error_stack tango_open_device tango_ping_device tango_read_attribute tango_read_attributes tango_reload_dev_interface tango_resume_attr_monitor tango_set_attr_monitor_period tango_set_dev_timeout tango_start_attr_monitor tango_stop_attr_monitor tango_suspend_attr_monitor tango_write_attribute tango_write_attributes tanh ticks time trunc vcsr viAssertIntrSignal viAssertTrigger viAssertUtilSignal viClear viClose viDisableEvent viDiscardEvents viEnableEvent viFindNext viFindRsrc viGetAttribute viGetAttributeString viGpibCommand viGpibControlATN viGpibControlREN viGpibPassControl viGpibSendIFC viIn16 viIn32 viIn8 viLock viMapAddress viMapTrigger viMemAlloc viMemFree viMoveIn16 viMoveIn32 viMoveIn8 viMoveOut16 viMoveOut32 viMoveOut8 viOpen viOpenDefaultRM viOut16 viOut32 viOut8 viPeek16 viPeek32 viPeek8 viPoke16 viPoke32 viPoke8 viRead viReadSTB viSetAttribute viSetAttributeString viStatusDesc viTerminate viUnlock viUnmapAddress viUnmapTrigger viUsbControlIn viUsbControlOut viVxiCommandQuery viWaitOnEvent viWrite wnoise x2pnt xcsr zcsr zeromq_client_connect zeromq_client_connect zeromq_client_recv zeromq_client_recv zeromq_client_send zeromq_client_send zeromq_handler_start zeromq_handler_start zeromq_handler_stop zeromq_handler_stop zeromq_server_bind zeromq_server_bind zeromq_server_recv zeromq_server_recv zeromq_server_send zeromq_server_send zeromq_set zeromq_set zeromq_stop zeromq_stop zeromq_test_callfunction zeromq_test_callfunction zeromq_test_serializeWave zeromq_test_serializeWave zeta ) end def self.igorOperation @igorOperation ||= Set.new %w( APMath Abort AddFIFOData AddFIFOVectData AddMovieAudio AddMovieFrame AddWavesToBoxPlot AddWavesToViolinPlot AdoptFiles Append AppendBoxPlot AppendImage AppendLayoutObject AppendMatrixContour AppendText AppendToGizmo AppendToGraph AppendToLayout AppendToTable AppendViolinPlot AppendXYZContour AutoPositionWindow AxonTelegraphFindServers BackgroundInfo Beep BoundingBall BoxSmooth BrowseURL BuildMenu Button CWT Chart CheckBox CheckDisplayed ChooseColor Close CloseHelp CloseMovie CloseProc ColorScale ColorTab2Wave Concatenate ControlBar ControlInfo ControlUpdate ConvertGlobalStringTextEncoding ConvexHull Convolve CopyDimLabels CopyFile CopyFolder CopyScales Correlate CreateAliasShortcut CreateBrowser Cross CtrlBackground CtrlFIFO CtrlNamedBackground Cursor CurveFit CustomControl DAQmx_AI_SetupReader DAQmx_AO_SetOutputs DAQmx_CTR_CountEdges DAQmx_CTR_OutputPulse DAQmx_CTR_Period DAQmx_CTR_PulseWidth DAQmx_DIO_Config DAQmx_DIO_WriteNewData DAQmx_Scan DAQmx_WaveformGen DPSS DSPDetrend DSPPeriodogram DWT Debugger DebuggerOptions DefaultFont DefaultGuiControls DefaultGuiFont DefaultTextEncoding DefineGuide DelayUpdate DeleteAnnotations DeleteFile DeleteFolder DeletePoints Differentiate Display DisplayHelpTopic DisplayProcedure DoAlert DoIgorMenu DoUpdate DoWindow DoXOPIdle DrawAction DrawArc DrawBezier DrawLine DrawOval DrawPICT DrawPoly DrawRRect DrawRect DrawText DrawUserShape Duplicate DuplicateDataFolder EdgeStats Edit ErrorBars EstimatePeakSizes Execute ExecuteScriptText ExperimentInfo ExperimentModified ExportGizmo Extract FBinRead FBinWrite FFT FGetPos FIFO2Wave FIFOStatus FMaxFlat FPClustering FReadLine FSetPos FStatus FTPCreateDirectory FTPDelete FTPDownload FTPUpload FastGaussTransform FastOp FilterFIR FilterIIR FindAPeak FindContour FindDuplicates FindLevel FindLevels FindPeak FindPointsInPoly FindRoots FindSequence FindValue FuncFit FuncFitMD GBLoadWave GISCreateVectorLayer GISGetRasterInfo GISGetRegisteredFileInfo GISGetVectorLayerInfo GISLoadRasterData GISLoadVectorData GISRasterizeVectorData GISRegisterFile GISTransformCoords GISUnRegisterFile GISWriteFieldData GISWriteGeometryData GISWriteRaster GPIB2 GPIBRead2 GPIBReadBinary2 GPIBReadBinaryWave2 GPIBReadWave2 GPIBWrite2 GPIBWriteBinary2 GPIBWriteBinaryWave2 GPIBWriteWave2 GetAxis GetCamera GetFileFolderInfo GetGizmo GetLastUserMenuInfo GetMarquee GetMouse GetSelection GetWindow GraphNormal GraphWaveDraw GraphWaveEdit Grep GroupBox HDF5CloseFile HDF5CloseGroup HDF5ConvertColors HDF5CreateFile HDF5CreateGroup HDF5CreateLink HDF5Dump HDF5DumpErrors HDF5DumpState HDF5FlushFile HDF5ListAttributes HDF5ListGroup HDF5LoadData HDF5LoadGroup HDF5LoadImage HDF5OpenFile HDF5OpenGroup HDF5SaveData HDF5SaveGroup HDF5SaveImage HDF5TestOperation HDF5UnlinkObject HDFInfo HDFReadImage HDFReadSDS HDFReadVset Hanning HideIgorMenus HideInfo HideProcedures HideTools HilbertTransform Histogram ICA IFFT ITCCloseAll2 ITCCloseDevice2 ITCConfigAllChannels2 ITCConfigChannel2 ITCConfigChannelReset2 ITCConfigChannelUpload2 ITCFIFOAvailable2 ITCFIFOAvailableAll2 ITCGetAllChannelsConfig2 ITCGetChannelConfig2 ITCGetCurrentDevice2 ITCGetDeviceInfo2 ITCGetDevices2 ITCGetErrorString2 ITCGetSerialNumber2 ITCGetState2 ITCGetVersions2 ITCInitialize2 ITCOpenDevice2 ITCReadADC2 ITCReadDigital2 ITCReadTimer2 ITCSelectDevice2 ITCSetDAC2 ITCSetGlobals2 ITCSetModes2 ITCSetState2 ITCStartAcq2 ITCStopAcq2 ITCUpdateFIFOPosition2 ITCUpdateFIFOPositionAll2 ITCWriteDigital2 ImageAnalyzeParticles ImageBlend ImageBoundaryToMask ImageComposite ImageEdgeDetection ImageFileInfo ImageFilter ImageFocus ImageFromXYZ ImageGLCM ImageGenerateROIMask ImageHistModification ImageHistogram ImageInterpolate ImageLineProfile ImageLoad ImageMorphology ImageRegistration ImageRemoveBackground ImageRestore ImageRotate ImageSave ImageSeedFill ImageSkeleton3d ImageSnake ImageStats ImageThreshold ImageTransform ImageUnwrapPhase ImageWindow IndexSort InsertPoints Integrate Integrate2D IntegrateODE Interp3DPath Interpolate2 Interpolate3D JCAMPLoadWave JointHistogram KMeans KillBackground KillControl KillDataFolder KillFIFO KillFreeAxis KillPICTs KillPath KillStrings KillVariables KillWaves KillWindow Label Layout LayoutPageAction LayoutSlideShow Legend LinearFeedbackShiftRegister ListBox LoadData LoadPICT LoadPackagePreferences LoadWave Loess LombPeriodogram MCC_FindServers MFR_CheckForNewBricklets MFR_CloseResultFile MFR_CreateOverviewTable MFR_GetBrickletCount MFR_GetBrickletData MFR_GetBrickletDeployData MFR_GetBrickletMetaData MFR_GetBrickletRawData MFR_GetReportTemplate MFR_GetResultFileMetaData MFR_GetResultFileName MFR_GetVernissageVersion MFR_GetVersion MFR_GetXOPErrorMessage MFR_OpenResultFile MLLoadWave Make MakeIndex MarkPerfTestTime MatrixConvolve MatrixCorr MatrixEigenV MatrixFilter MatrixGLM MatrixGaussJ MatrixInverse MatrixLLS MatrixLUBkSub MatrixLUD MatrixLUDTD MatrixLinearSolve MatrixLinearSolveTD MatrixMultiply MatrixOP MatrixSVBkSub MatrixSVD MatrixSchur MatrixSolve MatrixTranspose MeasureStyledText Modify ModifyBoxPlot ModifyBrowser ModifyCamera ModifyContour ModifyControl ModifyControlList ModifyFreeAxis ModifyGizmo ModifyGraph ModifyImage ModifyLayout ModifyPanel ModifyTable ModifyViolinPlot ModifyWaterfall MoveDataFolder MoveFile MoveFolder MoveString MoveSubwindow MoveVariable MoveWave MoveWindow MultiTaperPSD MultiThreadingControl NC_CloseFile NC_DumpErrors NC_Inquire NC_ListAttributes NC_ListObjects NC_LoadData NC_OpenFile NI4882 NILoadWave NeuralNetworkRun NeuralNetworkTrain NewCamera NewDataFolder NewFIFO NewFIFOChan NewFreeAxis NewGizmo NewImage NewLayout NewMovie NewNotebook NewPanel NewPath NewWaterfall Note Notebook NotebookAction Open OpenHelp OpenNotebook Optimize PCA ParseOperationTemplate PathInfo PauseForUser PauseUpdate PlayMovie PlayMovieAction PlaySound PopupContextualMenu PopupMenu Preferences PrimeFactors Print PrintGraphs PrintLayout PrintNotebook PrintSettings PrintTable Project PulseStats PutScrapText Quit RatioFromNumber Redimension Remez Remove RemoveContour RemoveFromGizmo RemoveFromGraph RemoveFromLayout RemoveFromTable RemoveImage RemoveLayoutObjects RemovePath Rename RenameDataFolder RenamePICT RenamePath RenameWindow ReorderImages ReorderTraces ReplaceText ReplaceWave Resample ResumeUpdate Reverse Rotate SQLHighLevelOp STFT Save SaveData SaveExperiment SaveGizmoCopy SaveGraphCopy SaveNotebook SavePICT SavePackagePreferences SaveTableCopy SetActiveSubwindow SetAxis SetBackground SetDashPattern SetDataFolder SetDimLabel SetDrawEnv SetDrawLayer SetFileFolderInfo SetFormula SetIdlePeriod SetIgorHook SetIgorMenuMode SetIgorOption SetMarquee SetProcessSleep SetRandomSeed SetScale SetVariable SetWaveLock SetWaveTextEncoding SetWindow ShowIgorMenus ShowInfo ShowTools Silent Sleep Slider Smooth SmoothCustom Sort SortColumns SoundInRecord SoundInSet SoundInStartChart SoundInStatus SoundInStopChart SoundLoadWave SoundSaveWave SphericalInterpolate SphericalTriangulate SplitString SplitWave Stack StackWindows StatsANOVA1Test StatsANOVA2NRTest StatsANOVA2RMTest StatsANOVA2Test StatsAngularDistanceTest StatsChiTest StatsCircularCorrelationTest StatsCircularMeans StatsCircularMoments StatsCircularTwoSampleTest StatsCochranTest StatsContingencyTable StatsDIPTest StatsDunnettTest StatsFTest StatsFriedmanTest StatsHodgesAjneTest StatsJBTest StatsKDE StatsKSTest StatsKWTest StatsKendallTauTest StatsLinearCorrelationTest StatsLinearRegression StatsMultiCorrelationTest StatsNPMCTest StatsNPNominalSRTest StatsQuantiles StatsRankCorrelationTest StatsResample StatsSRTest StatsSample StatsScheffeTest StatsShapiroWilkTest StatsSignTest StatsTTest StatsTukeyTest StatsVariancesTest StatsWRCorrelationTest StatsWatsonUSquaredTest StatsWatsonWilliamsTest StatsWheelerWatsonTest StatsWilcoxonRankTest String StructFill StructGet StructPut SumDimension SumSeries TDMLoadData TDMSaveData TabControl Tag TextBox ThreadGroupPutDF ThreadStart TickWavesFromAxis Tile TileWindows TitleBox ToCommandLine ToolsGrid Triangulate3d URLRequest Unwrap VDT2 VDTClosePort2 VDTGetPortList2 VDTGetStatus2 VDTOpenPort2 VDTOperationsPort2 VDTRead2 VDTReadBinary2 VDTReadBinaryWave2 VDTReadHex2 VDTReadHexWave2 VDTReadWave2 VDTTerminalPort2 VDTWrite2 VDTWriteBinary2 VDTWriteBinaryWave2 VDTWriteHex2 VDTWriteHexWave2 VDTWriteWave2 VISAControl VISARead VISAReadBinary VISAReadBinaryWave VISAReadWave VISAWrite VISAWriteBinary VISAWriteBinaryWave VISAWriteWave ValDisplay Variable WaveMeanStdv WaveStats WaveTransform WignerTransform WindowFunction XLLoadWave cd dir fprintf printf pwd sprintf sscanf wfprintf ) end def self.object_name /\b[a-z][a-z0-9_\.]*?\b/i end object = self.object_name noLineBreak = /(?:[ \t]|(?:\\\s*[\r\n]))+/ operator = %r([\#$~!%^&*+=\|?:<>/-]) punctuation = /[{}()\[\],.;]/ number_float= /0x[a-f0-9]+/i number_hex = /\d+\.\d+(e[\+\-]?\d+)?/ number_int = /[\d]+(?:_\d+)*/ state :root do rule %r(//), Comment, :comments rule %r/#{object}/ do |m| if m[0].downcase =~ /function/ token Keyword::Declaration push :parse_function elsif self.class.igorDeclarations.include? m[0].downcase token Keyword::Declaration push :parse_variables elsif self.class.keywords.include? m[0].downcase token Keyword elsif self.class.igorConstants.include? m[0].downcase token Keyword::Constant elsif self.class.igorFunction.include? m[0].downcase token Name::Builtin elsif self.class.igorOperation.include? m[0].downcase token Keyword::Reserved push :operationFlags elsif m[0].downcase =~ /\b(v|s|w)_[a-z]+[a-z0-9]*/ token Name::Constant else token Name end end mixin :preprocessor mixin :waveFlag mixin :characters mixin :numbers mixin :whitespace end state :preprocessor do rule %r((\#)(#{object})) do |m| if self.class.preprocessor.include? m[2].downcase token Comment::Preproc else token Punctuation, m[1] #i.e. ModuleFunctions token Name, m[2] end end end state :assignment do mixin :whitespace rule %r/\"/, Literal::String::Double, :string1 #punctuation for string mixin :string2 rule %r/#{number_float}/, Literal::Number::Float, :pop! rule %r/#{number_int}/, Literal::Number::Integer, :pop! rule %r/[\(\[\{][^\)\]\}]+[\)\]\}]/, Generic, :pop! rule %r/[^\s\/\(]+/, Generic, :pop! rule(//) { pop! } end state :parse_variables do mixin :whitespace rule %r/[=]/, Punctuation, :assignment rule object, Name::Variable rule %r/[\[\]]/, Punctuation # optional variables in functions rule %r/[,]/, Punctuation, :parse_variables rule %r/\)/, Punctuation, :pop! # end of function rule %r([/][a-z]+)i, Keyword::Pseudo, :parse_variables rule(//) { pop! } end state :parse_function do rule %r([/][a-z]+)i, Keyword::Pseudo # only one flag mixin :whitespace rule object, Name::Function rule %r/[\(]/, Punctuation, :parse_variables rule(//) { pop! } end state :operationFlags do rule %r/#{noLineBreak}/, Text rule %r/[=]/, Punctuation, :assignment rule %r([/][a-z]+)i, Keyword::Pseudo, :operationFlags rule %r/(as)(\s*)(#{object})/i do groups Keyword::Type, Text, Name::Label end rule(//) { pop! } end # inline variable assignments (i.e. for Make) with strict syntax state :waveFlag do rule %r( (/(?:wave|X|Y)) (\s*)(=)(\s*) (#{object}) )ix do |m| token Keyword::Pseudo, m[1] token Text, m[2] token Punctuation, m[3] token Text, m[4] token Name::Variable, m[5] end end state :characters do rule %r/\s/, Text rule %r/#{operator}/, Operator rule %r/#{punctuation}/, Punctuation rule %r/\"/, Literal::String::Double, :string1 #punctuation for string mixin :string2 end state :numbers do rule %r/#{number_float}/, Literal::Number::Float rule %r/#{number_hex}/, Literal::Number::Hex rule %r/#{number_int}/, Literal::Number::Integer end state :whitespace do rule %r/#{noLineBreak}/, Text end state :string1 do rule %r/%\w\b/, Literal::String::Other rule %r/\\\\/, Literal::String::Escape rule %r/\\\"/, Literal::String::Escape rule %r/\\/, Literal::String::Escape rule %r/[^"]/, Literal::String rule %r/\"/, Literal::String::Double, :pop! #punctuation for string end state :string2 do rule %r/\'[^']*\'/, Literal::String::Single end state :comments do rule %r{([/]\s*)([@]\w+\b)}i do # doxygen comments groups Comment, Comment::Special end rule %r/[^\r\n]/, Comment rule(//) { pop! } end end end end rouge-3.28.0/lib/rouge/lexers/ini.rb000066400000000000000000000020731417417255300172350ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class INI < RegexLexer title "INI" desc 'the INI configuration format' tag 'ini' # TODO add more here filenames '*.ini', '*.INI', '*.gitconfig' mimetypes 'text/x-ini' identifier = /[\w\-.]+/ state :basic do rule %r/[;#].*?\n/, Comment rule %r/\s+/, Text rule %r/\\\n/, Str::Escape end state :root do mixin :basic rule %r/(#{identifier})(\s*)(=)/ do groups Name::Property, Text, Punctuation push :value end rule %r/\[.*?\]/, Name::Namespace end state :value do rule %r/\n/, Text, :pop! mixin :basic rule %r/"/, Str, :dq rule %r/'.*?'/, Str mixin :esc_str rule %r/[^\\\n]+/, Str end state :dq do rule %r/"/, Str, :pop! mixin :esc_str rule %r/[^\\"]+/m, Str end state :esc_str do rule %r/\\./m, Str::Escape end end end end rouge-3.28.0/lib/rouge/lexers/io.rb000066400000000000000000000032571417417255300170720ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class IO < RegexLexer tag 'io' title "Io" desc 'The IO programming language (http://iolanguage.com)' mimetypes 'text/x-iosrc' filenames '*.io' def self.detect?(text) return true if text.shebang? 'io' end def self.constants @constants ||= Set.new %w(nil false true) end def self.builtins @builtins ||= Set.new %w( args call clone do doFile doString else elseif for if list method return super then ) end state :root do rule %r/\s+/m, Text rule %r(//.*), Comment::Single rule %r(#.*), Comment::Single rule %r(/(\\\n)?[*].*?[*](\\\n)?/)m, Comment::Multiline rule %r(/[+]), Comment::Multiline, :nested_comment rule %r/"(\\\\|\\"|[^"])*"/, Str rule %r(:?:=), Keyword rule %r/[()]/, Punctuation rule %r([-=;,*+>"*]/ end def allow_comments? true end end load_lexer 'ruby.rb' class IRBOutputLexer < Ruby tag 'irb_output' start do push :stdout end state :has_irb_output do rule %r(=>), Punctuation, :pop! rule %r/.+?(\n|$)/, Generic::Output end state :irb_error do rule %r/.+?(\n|$)/, Generic::Error mixin :has_irb_output end state :stdout do rule %r/\w+?(Error|Exception):.+?(\n|$)/, Generic::Error, :irb_error mixin :has_irb_output end prepend :root do rule %r/#/, Keyword::Type, :pop! mixin :root end end end end rouge-3.28.0/lib/rouge/lexers/isbl.rb000066400000000000000000000053241417417255300174110ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class ISBL < RegexLexer title "ISBL" desc "The ISBL programming language" tag 'isbl' filenames '*.isbl' def self.builtins Kernel::load File.join(Lexers::BASE_DIR, 'isbl/builtins.rb') self.builtins end def self.constants @constants ||= self.builtins["const"].merge(self.builtins["enum"]).collect!(&:downcase) end def self.interfaces @interfaces ||= self.builtins["interface"].collect!(&:downcase) end def self.globals @globals ||= self.builtins["global"].collect!(&:downcase) end def self.keywords @keywords = Set.new %w( and и else иначе endexcept endfinally endforeach конецвсе endif конецесли endwhile конецпока except exitfor finally foreach все if если in в not не or или try while пока ) end state :whitespace do rule %r/\s+/m, Text rule %r(//.*?$), Comment::Single rule %r(/[*].*?[*]/)m, Comment::Multiline end state :dotted do mixin :whitespace rule %r/[a-zа-яё_0-9]+/i do |m| name = m[0] if self.class.constants.include? name.downcase token Name::Builtin elsif in_state? :type token Keyword::Type else token Name end pop! end end state :type do mixin :whitespace rule %r/[a-zа-яё_0-9]+/i do |m| name = m[0] if self.class.interfaces.include? name.downcase token Keyword::Type else token Name end pop! end rule %r/[.]/, Punctuation, :dotted rule(//) { pop! } end state :root do mixin :whitespace rule %r/[:]/, Punctuation, :type rule %r/[.]/, Punctuation, :dotted rule %r/[\[\]();]/, Punctuation rule %r([&*+=<>/-]), Operator rule %r/\b[a-zа-яё_][a-zа-яё_0-9]*(?=[(])/i, Name::Function rule %r/[a-zа-яё_!][a-zа-яё_0-9]*/i do |m| name = m[0] if self.class.keywords.include? name.downcase token Keyword elsif self.class.constants.include? name.downcase token Name::Builtin elsif self.class.globals.include? name.downcase token Name::Variable::Global else token Name::Variable end end rule %r/\b(\d+(\.\d+)?)\b/, Literal::Number rule %r(["].*?["])m, Literal::String::Double rule %r(['].*?['])m, Literal::String::Single end end end end rouge-3.28.0/lib/rouge/lexers/isbl/000077500000000000000000000000001417417255300170605ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/lexers/isbl/builtins.rb000066400000000000000000001714241417417255300212470ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class ISBL def self.builtins @builtins ||= {}.tap do |b| b["const"] = Set.new %w(SYSRES_CONST_ACCES_RIGHT_TYPE_EDIT SYSRES_CONST_ACCES_RIGHT_TYPE_FULL SYSRES_CONST_ACCES_RIGHT_TYPE_VIEW SYSRES_CONST_ACCESS_MODE_REQUISITE_CODE SYSRES_CONST_ACCESS_NO_ACCESS_VIEW SYSRES_CONST_ACCESS_NO_ACCESS_VIEW_CODE SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW SYSRES_CONST_ACCESS_RIGHTS_VIEW_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_TYPE_CHANGE SYSRES_CONST_ACCESS_TYPE_CHANGE_CODE SYSRES_CONST_ACCESS_TYPE_EXISTS SYSRES_CONST_ACCESS_TYPE_EXISTS_CODE SYSRES_CONST_ACCESS_TYPE_FULL SYSRES_CONST_ACCESS_TYPE_FULL_CODE SYSRES_CONST_ACCESS_TYPE_VIEW SYSRES_CONST_ACCESS_TYPE_VIEW_CODE SYSRES_CONST_ACTION_TYPE_ABORT SYSRES_CONST_ACTION_TYPE_ACCEPT SYSRES_CONST_ACTION_TYPE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ADD_ATTACHMENT SYSRES_CONST_ACTION_TYPE_CHANGE_CARD SYSRES_CONST_ACTION_TYPE_CHANGE_KIND SYSRES_CONST_ACTION_TYPE_CHANGE_STORAGE SYSRES_CONST_ACTION_TYPE_CONTINUE SYSRES_CONST_ACTION_TYPE_COPY SYSRES_CONST_ACTION_TYPE_CREATE SYSRES_CONST_ACTION_TYPE_CREATE_VERSION SYSRES_CONST_ACTION_TYPE_DELETE SYSRES_CONST_ACTION_TYPE_DELETE_ATTACHMENT SYSRES_CONST_ACTION_TYPE_DELETE_VERSION SYSRES_CONST_ACTION_TYPE_DISABLE_DELEGATE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ENABLE_DELEGATE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE_AND_PASSWORD SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_PASSWORD SYSRES_CONST_ACTION_TYPE_EXPORT_WITH_LOCK SYSRES_CONST_ACTION_TYPE_EXPORT_WITHOUT_LOCK SYSRES_CONST_ACTION_TYPE_IMPORT_WITH_UNLOCK SYSRES_CONST_ACTION_TYPE_IMPORT_WITHOUT_UNLOCK SYSRES_CONST_ACTION_TYPE_LIFE_CYCLE_STAGE SYSRES_CONST_ACTION_TYPE_LOCK SYSRES_CONST_ACTION_TYPE_LOCK_FOR_SERVER SYSRES_CONST_ACTION_TYPE_LOCK_MODIFY SYSRES_CONST_ACTION_TYPE_MARK_AS_READED SYSRES_CONST_ACTION_TYPE_MARK_AS_UNREADED SYSRES_CONST_ACTION_TYPE_MODIFY SYSRES_CONST_ACTION_TYPE_MODIFY_CARD SYSRES_CONST_ACTION_TYPE_MOVE_TO_ARCHIVE SYSRES_CONST_ACTION_TYPE_OFF_ENCRYPTION SYSRES_CONST_ACTION_TYPE_PASSWORD_CHANGE SYSRES_CONST_ACTION_TYPE_PERFORM SYSRES_CONST_ACTION_TYPE_RECOVER_FROM_LOCAL_COPY SYSRES_CONST_ACTION_TYPE_RESTART SYSRES_CONST_ACTION_TYPE_RESTORE_FROM_ARCHIVE SYSRES_CONST_ACTION_TYPE_REVISION SYSRES_CONST_ACTION_TYPE_SEND_BY_MAIL SYSRES_CONST_ACTION_TYPE_SIGN SYSRES_CONST_ACTION_TYPE_START SYSRES_CONST_ACTION_TYPE_UNLOCK SYSRES_CONST_ACTION_TYPE_UNLOCK_FROM_SERVER SYSRES_CONST_ACTION_TYPE_VERSION_STATE SYSRES_CONST_ACTION_TYPE_VERSION_VISIBILITY SYSRES_CONST_ACTION_TYPE_VIEW SYSRES_CONST_ACTION_TYPE_VIEW_SHADOW_COPY SYSRES_CONST_ACTION_TYPE_WORKFLOW_DESCRIPTION_MODIFY SYSRES_CONST_ACTION_TYPE_WRITE_HISTORY SYSRES_CONST_ACTIVE_VERSION_STATE_PICK_VALUE SYSRES_CONST_ADD_REFERENCE_MODE_NAME SYSRES_CONST_ADDITION_REQUISITE_CODE SYSRES_CONST_ADDITIONAL_PARAMS_REQUISITE_CODE SYSRES_CONST_ADITIONAL_JOB_END_DATE_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_READ_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_START_DATE_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_STATE_REQUISITE_NAME SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE_ACTION SYSRES_CONST_ALL_ACCEPT_CONDITION_RUS SYSRES_CONST_ALL_USERS_GROUP SYSRES_CONST_ALL_USERS_GROUP_NAME SYSRES_CONST_ALL_USERS_SERVER_GROUP_NAME SYSRES_CONST_ALLOWED_ACCESS_TYPE_CODE SYSRES_CONST_ALLOWED_ACCESS_TYPE_NAME SYSRES_CONST_APP_VIEWER_TYPE_REQUISITE_CODE SYSRES_CONST_APPROVING_SIGNATURE_NAME SYSRES_CONST_APPROVING_SIGNATURE_REQUISITE_CODE SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE_CODE SYSRES_CONST_ATTACH_TYPE_COMPONENT_TOKEN SYSRES_CONST_ATTACH_TYPE_DOC SYSRES_CONST_ATTACH_TYPE_EDOC SYSRES_CONST_ATTACH_TYPE_FOLDER SYSRES_CONST_ATTACH_TYPE_JOB SYSRES_CONST_ATTACH_TYPE_REFERENCE SYSRES_CONST_ATTACH_TYPE_TASK SYSRES_CONST_AUTH_ENCODED_PASSWORD SYSRES_CONST_AUTH_ENCODED_PASSWORD_CODE SYSRES_CONST_AUTH_NOVELL SYSRES_CONST_AUTH_PASSWORD SYSRES_CONST_AUTH_PASSWORD_CODE SYSRES_CONST_AUTH_WINDOWS SYSRES_CONST_AUTHENTICATING_SIGNATURE_NAME SYSRES_CONST_AUTHENTICATING_SIGNATURE_REQUISITE_CODE SYSRES_CONST_AUTO_ENUM_METHOD_FLAG SYSRES_CONST_AUTO_NUMERATION_CODE SYSRES_CONST_AUTO_STRONG_ENUM_METHOD_FLAG SYSRES_CONST_AUTOTEXT_NAME_REQUISITE_CODE SYSRES_CONST_AUTOTEXT_TEXT_REQUISITE_CODE SYSRES_CONST_AUTOTEXT_USAGE_ALL SYSRES_CONST_AUTOTEXT_USAGE_ALL_CODE SYSRES_CONST_AUTOTEXT_USAGE_SIGN SYSRES_CONST_AUTOTEXT_USAGE_SIGN_CODE SYSRES_CONST_AUTOTEXT_USAGE_WORK SYSRES_CONST_AUTOTEXT_USAGE_WORK_CODE SYSRES_CONST_AUTOTEXT_USE_ANYWHERE_CODE SYSRES_CONST_AUTOTEXT_USE_ON_SIGNING_CODE SYSRES_CONST_AUTOTEXT_USE_ON_WORK_CODE SYSRES_CONST_BEGIN_DATE_REQUISITE_CODE SYSRES_CONST_BLACK_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_BLUE_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_BTN_PART SYSRES_CONST_CALCULATED_ROLE_TYPE_CODE SYSRES_CONST_CALL_TYPE_VARIABLE_BUTTON_VALUE SYSRES_CONST_CALL_TYPE_VARIABLE_PROGRAM_VALUE SYSRES_CONST_CANCEL_MESSAGE_FUNCTION_RESULT SYSRES_CONST_CARD_PART SYSRES_CONST_CARD_REFERENCE_MODE_NAME SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_ENCRYPT_VALUE SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_AND_ENCRYPT_VALUE SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_VALUE SYSRES_CONST_CHECK_PARAM_VALUE_DATE_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_FLOAT_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_INTEGER_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_PICK_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_REEFRENCE_PARAM_TYPE SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_FEMININE SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_CODE_COMPONENT_TYPE_ADMIN SYSRES_CONST_CODE_COMPONENT_TYPE_DEVELOPER SYSRES_CONST_CODE_COMPONENT_TYPE_DOCS SYSRES_CONST_CODE_COMPONENT_TYPE_EDOC_CARDS SYSRES_CONST_CODE_COMPONENT_TYPE_EXTERNAL_EXECUTABLE SYSRES_CONST_CODE_COMPONENT_TYPE_OTHER SYSRES_CONST_CODE_COMPONENT_TYPE_REFERENCE SYSRES_CONST_CODE_COMPONENT_TYPE_REPORT SYSRES_CONST_CODE_COMPONENT_TYPE_SCRIPT SYSRES_CONST_CODE_COMPONENT_TYPE_URL SYSRES_CONST_CODE_REQUISITE_ACCESS SYSRES_CONST_CODE_REQUISITE_CODE SYSRES_CONST_CODE_REQUISITE_COMPONENT SYSRES_CONST_CODE_REQUISITE_DESCRIPTION SYSRES_CONST_CODE_REQUISITE_EXCLUDE_COMPONENT SYSRES_CONST_CODE_REQUISITE_RECORD SYSRES_CONST_COMMENT_REQ_CODE SYSRES_CONST_COMMON_SETTINGS_REQUISITE_CODE SYSRES_CONST_COMP_CODE_GRD SYSRES_CONST_COMPONENT_GROUP_TYPE_REQUISITE_CODE SYSRES_CONST_COMPONENT_TYPE_ADMIN_COMPONENTS SYSRES_CONST_COMPONENT_TYPE_DEVELOPER_COMPONENTS SYSRES_CONST_COMPONENT_TYPE_DOCS SYSRES_CONST_COMPONENT_TYPE_EDOC_CARDS SYSRES_CONST_COMPONENT_TYPE_EDOCS SYSRES_CONST_COMPONENT_TYPE_EXTERNAL_EXECUTABLE SYSRES_CONST_COMPONENT_TYPE_OTHER SYSRES_CONST_COMPONENT_TYPE_REFERENCE_TYPES SYSRES_CONST_COMPONENT_TYPE_REFERENCES SYSRES_CONST_COMPONENT_TYPE_REPORTS SYSRES_CONST_COMPONENT_TYPE_SCRIPTS SYSRES_CONST_COMPONENT_TYPE_URL SYSRES_CONST_COMPONENTS_REMOTE_SERVERS_VIEW_CODE SYSRES_CONST_CONDITION_BLOCK_DESCRIPTION SYSRES_CONST_CONST_FIRM_STATUS_COMMON SYSRES_CONST_CONST_FIRM_STATUS_INDIVIDUAL SYSRES_CONST_CONST_NEGATIVE_VALUE SYSRES_CONST_CONST_POSITIVE_VALUE SYSRES_CONST_CONST_SERVER_STATUS_DONT_REPLICATE SYSRES_CONST_CONST_SERVER_STATUS_REPLICATE SYSRES_CONST_CONTENTS_REQUISITE_CODE SYSRES_CONST_DATA_TYPE_BOOLEAN SYSRES_CONST_DATA_TYPE_DATE SYSRES_CONST_DATA_TYPE_FLOAT SYSRES_CONST_DATA_TYPE_INTEGER SYSRES_CONST_DATA_TYPE_PICK SYSRES_CONST_DATA_TYPE_REFERENCE SYSRES_CONST_DATA_TYPE_STRING SYSRES_CONST_DATA_TYPE_TEXT SYSRES_CONST_DATA_TYPE_VARIANT SYSRES_CONST_DATE_CLOSE_REQ_CODE SYSRES_CONST_DATE_FORMAT_DATE_ONLY_CHAR SYSRES_CONST_DATE_OPEN_REQ_CODE SYSRES_CONST_DATE_REQUISITE SYSRES_CONST_DATE_REQUISITE_CODE SYSRES_CONST_DATE_REQUISITE_NAME SYSRES_CONST_DATE_REQUISITE_TYPE SYSRES_CONST_DATE_TYPE_CHAR SYSRES_CONST_DATETIME_FORMAT_VALUE SYSRES_CONST_DEA_ACCESS_RIGHTS_ACTION_CODE SYSRES_CONST_DESCRIPTION_LOCALIZE_ID_REQUISITE_CODE SYSRES_CONST_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_DET1_PART SYSRES_CONST_DET2_PART SYSRES_CONST_DET3_PART SYSRES_CONST_DET4_PART SYSRES_CONST_DET5_PART SYSRES_CONST_DET6_PART SYSRES_CONST_DETAIL_DATASET_KEY_REQUISITE_CODE SYSRES_CONST_DETAIL_PICK_REQUISITE_CODE SYSRES_CONST_DETAIL_REQ_CODE SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_CODE SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_NAME SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_CODE SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_NAME SYSRES_CONST_DOCUMENT_STORAGES_CODE SYSRES_CONST_DOCUMENT_TEMPLATES_TYPE_NAME SYSRES_CONST_DOUBLE_REQUISITE_CODE SYSRES_CONST_EDITOR_CLOSE_FILE_OBSERV_TYPE_CODE SYSRES_CONST_EDITOR_CLOSE_PROCESS_OBSERV_TYPE_CODE SYSRES_CONST_EDITOR_TYPE_REQUISITE_CODE SYSRES_CONST_EDITORS_APPLICATION_NAME_REQUISITE_CODE SYSRES_CONST_EDITORS_CREATE_SEVERAL_PROCESSES_REQUISITE_CODE SYSRES_CONST_EDITORS_EXTENSION_REQUISITE_CODE SYSRES_CONST_EDITORS_OBSERVER_BY_PROCESS_TYPE SYSRES_CONST_EDITORS_REFERENCE_CODE SYSRES_CONST_EDITORS_REPLACE_SPEC_CHARS_REQUISITE_CODE SYSRES_CONST_EDITORS_USE_PLUGINS_REQUISITE_CODE SYSRES_CONST_EDITORS_VIEW_DOCUMENT_OPENED_TO_EDIT_CODE SYSRES_CONST_EDOC_CARD_TYPE_REQUISITE_CODE SYSRES_CONST_EDOC_CARD_TYPES_LINK_REQUISITE_CODE SYSRES_CONST_EDOC_CERTIFICATE_AND_PASSWORD_ENCODE_CODE SYSRES_CONST_EDOC_CERTIFICATE_ENCODE_CODE SYSRES_CONST_EDOC_DATE_REQUISITE_CODE SYSRES_CONST_EDOC_KIND_REFERENCE_CODE SYSRES_CONST_EDOC_KINDS_BY_TEMPLATE_ACTION_CODE SYSRES_CONST_EDOC_MANAGE_ACCESS_CODE SYSRES_CONST_EDOC_NONE_ENCODE_CODE SYSRES_CONST_EDOC_NUMBER_REQUISITE_CODE SYSRES_CONST_EDOC_PASSWORD_ENCODE_CODE SYSRES_CONST_EDOC_READONLY_ACCESS_CODE SYSRES_CONST_EDOC_SHELL_LIFE_TYPE_VIEW_VALUE SYSRES_CONST_EDOC_SIZE_RESTRICTION_PRIORITY_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_CHECK_ACCESS_RIGHTS_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_COMPUTER_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_DATABASE_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_EDIT_IN_STORAGE_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_LOCAL_PATH_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_SHARED_SOURCE_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_TEMPLATE_REQUISITE_CODE SYSRES_CONST_EDOC_TYPES_REFERENCE_CODE SYSRES_CONST_EDOC_VERSION_ACTIVE_STAGE_CODE SYSRES_CONST_EDOC_VERSION_DESIGN_STAGE_CODE SYSRES_CONST_EDOC_VERSION_OBSOLETE_STAGE_CODE SYSRES_CONST_EDOC_WRITE_ACCES_CODE SYSRES_CONST_EDOCUMENT_CARD_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE SYSRES_CONST_ENCODE_CERTIFICATE_TYPE_CODE SYSRES_CONST_END_DATE_REQUISITE_CODE SYSRES_CONST_ENUMERATION_TYPE_REQUISITE_CODE SYSRES_CONST_EXECUTE_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_EXECUTIVE_FILE_STORAGE_TYPE SYSRES_CONST_EXIST_CONST SYSRES_CONST_EXIST_VALUE SYSRES_CONST_EXPORT_LOCK_TYPE_ASK SYSRES_CONST_EXPORT_LOCK_TYPE_WITH_LOCK SYSRES_CONST_EXPORT_LOCK_TYPE_WITHOUT_LOCK SYSRES_CONST_EXPORT_VERSION_TYPE_ASK SYSRES_CONST_EXPORT_VERSION_TYPE_LAST SYSRES_CONST_EXPORT_VERSION_TYPE_LAST_ACTIVE SYSRES_CONST_EXTENSION_REQUISITE_CODE SYSRES_CONST_FILTER_NAME_REQUISITE_CODE SYSRES_CONST_FILTER_REQUISITE_CODE SYSRES_CONST_FILTER_TYPE_COMMON_CODE SYSRES_CONST_FILTER_TYPE_COMMON_NAME SYSRES_CONST_FILTER_TYPE_USER_CODE SYSRES_CONST_FILTER_TYPE_USER_NAME SYSRES_CONST_FILTER_VALUE_REQUISITE_NAME SYSRES_CONST_FLOAT_NUMBER_FORMAT_CHAR SYSRES_CONST_FLOAT_REQUISITE_TYPE SYSRES_CONST_FOLDER_AUTHOR_VALUE SYSRES_CONST_FOLDER_KIND_ANY_OBJECTS SYSRES_CONST_FOLDER_KIND_COMPONENTS SYSRES_CONST_FOLDER_KIND_EDOCS SYSRES_CONST_FOLDER_KIND_JOBS SYSRES_CONST_FOLDER_KIND_TASKS SYSRES_CONST_FOLDER_TYPE_COMMON SYSRES_CONST_FOLDER_TYPE_COMPONENT SYSRES_CONST_FOLDER_TYPE_FAVORITES SYSRES_CONST_FOLDER_TYPE_INBOX SYSRES_CONST_FOLDER_TYPE_OUTBOX SYSRES_CONST_FOLDER_TYPE_QUICK_LAUNCH SYSRES_CONST_FOLDER_TYPE_SEARCH SYSRES_CONST_FOLDER_TYPE_SHORTCUTS SYSRES_CONST_FOLDER_TYPE_USER SYSRES_CONST_FROM_DICTIONARY_ENUM_METHOD_FLAG SYSRES_CONST_FULL_SUBSTITUTE_TYPE SYSRES_CONST_FULL_SUBSTITUTE_TYPE_CODE SYSRES_CONST_FUNCTION_CANCEL_RESULT SYSRES_CONST_FUNCTION_CATEGORY_SYSTEM SYSRES_CONST_FUNCTION_CATEGORY_USER SYSRES_CONST_FUNCTION_FAILURE_RESULT SYSRES_CONST_FUNCTION_SAVE_RESULT SYSRES_CONST_GENERATED_REQUISITE SYSRES_CONST_GREEN_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_GROUP_ACCOUNT_TYPE_VALUE_CODE SYSRES_CONST_GROUP_CATEGORY_NORMAL_CODE SYSRES_CONST_GROUP_CATEGORY_NORMAL_NAME SYSRES_CONST_GROUP_CATEGORY_SERVICE_CODE SYSRES_CONST_GROUP_CATEGORY_SERVICE_NAME SYSRES_CONST_GROUP_COMMON_CATEGORY_FIELD_VALUE SYSRES_CONST_GROUP_FULL_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_RIGHTS_T_REQUISITE_CODE SYSRES_CONST_GROUP_SERVER_CODES_REQUISITE_CODE SYSRES_CONST_GROUP_SERVER_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_SERVICE_CATEGORY_FIELD_VALUE SYSRES_CONST_GROUP_USER_REQUISITE_CODE SYSRES_CONST_GROUPS_REFERENCE_CODE SYSRES_CONST_GROUPS_REQUISITE_CODE SYSRES_CONST_HIDDEN_MODE_NAME SYSRES_CONST_HIGH_LVL_REQUISITE_CODE SYSRES_CONST_HISTORY_ACTION_CREATE_CODE SYSRES_CONST_HISTORY_ACTION_DELETE_CODE SYSRES_CONST_HISTORY_ACTION_EDIT_CODE SYSRES_CONST_HOUR_CHAR SYSRES_CONST_ID_REQUISITE_CODE SYSRES_CONST_IDSPS_REQUISITE_CODE SYSRES_CONST_IMAGE_MODE_COLOR SYSRES_CONST_IMAGE_MODE_GREYSCALE SYSRES_CONST_IMAGE_MODE_MONOCHROME SYSRES_CONST_IMPORTANCE_HIGH SYSRES_CONST_IMPORTANCE_LOW SYSRES_CONST_IMPORTANCE_NORMAL SYSRES_CONST_IN_DESIGN_VERSION_STATE_PICK_VALUE SYSRES_CONST_INCOMING_WORK_RULE_TYPE_CODE SYSRES_CONST_INT_REQUISITE SYSRES_CONST_INT_REQUISITE_TYPE SYSRES_CONST_INTEGER_NUMBER_FORMAT_CHAR SYSRES_CONST_INTEGER_TYPE_CHAR SYSRES_CONST_IS_GENERATED_REQUISITE_NEGATIVE_VALUE SYSRES_CONST_IS_PUBLIC_ROLE_REQUISITE_CODE SYSRES_CONST_IS_REMOTE_USER_NEGATIVE_VALUE SYSRES_CONST_IS_REMOTE_USER_POSITIVE_VALUE SYSRES_CONST_IS_STORED_REQUISITE_NEGATIVE_VALUE SYSRES_CONST_IS_STORED_REQUISITE_STORED_VALUE SYSRES_CONST_ITALIC_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_JOB_BLOCK_DESCRIPTION SYSRES_CONST_JOB_KIND_CONTROL_JOB SYSRES_CONST_JOB_KIND_JOB SYSRES_CONST_JOB_KIND_NOTICE SYSRES_CONST_JOB_STATE_ABORTED SYSRES_CONST_JOB_STATE_COMPLETE SYSRES_CONST_JOB_STATE_WORKING SYSRES_CONST_KIND_REQUISITE_CODE SYSRES_CONST_KIND_REQUISITE_NAME SYSRES_CONST_KINDS_CREATE_SHADOW_COPIES_REQUISITE_CODE SYSRES_CONST_KINDS_DEFAULT_EDOC_LIFE_STAGE_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALL_TEPLATES_ALLOWED_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALLOW_LIFE_CYCLE_STAGE_CHANGING_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALLOW_MULTIPLE_ACTIVE_VERSIONS_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_SHARE_ACCES_RIGHTS_BY_DEFAULT_CODE SYSRES_CONST_KINDS_EDOC_TEMPLATE_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_TYPE_REQUISITE_CODE SYSRES_CONST_KINDS_SIGNERS_REQUISITES_CODE SYSRES_CONST_KOD_INPUT_TYPE SYSRES_CONST_LAST_UPDATE_DATE_REQUISITE_CODE SYSRES_CONST_LIFE_CYCLE_START_STAGE_REQUISITE_CODE SYSRES_CONST_LILAC_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_LINK_OBJECT_KIND_COMPONENT SYSRES_CONST_LINK_OBJECT_KIND_DOCUMENT SYSRES_CONST_LINK_OBJECT_KIND_EDOC SYSRES_CONST_LINK_OBJECT_KIND_FOLDER SYSRES_CONST_LINK_OBJECT_KIND_JOB SYSRES_CONST_LINK_OBJECT_KIND_REFERENCE SYSRES_CONST_LINK_OBJECT_KIND_TASK SYSRES_CONST_LINK_REF_TYPE_REQUISITE_CODE SYSRES_CONST_LIST_REFERENCE_MODE_NAME SYSRES_CONST_LOCALIZATION_DICTIONARY_MAIN_VIEW_CODE SYSRES_CONST_MAIN_VIEW_CODE SYSRES_CONST_MANUAL_ENUM_METHOD_FLAG SYSRES_CONST_MASTER_COMP_TYPE_REQUISITE_CODE SYSRES_CONST_MASTER_TABLE_REC_ID_REQUISITE_CODE SYSRES_CONST_MAXIMIZED_MODE_NAME SYSRES_CONST_ME_VALUE SYSRES_CONST_MESSAGE_ATTENTION_CAPTION SYSRES_CONST_MESSAGE_CONFIRMATION_CAPTION SYSRES_CONST_MESSAGE_ERROR_CAPTION SYSRES_CONST_MESSAGE_INFORMATION_CAPTION SYSRES_CONST_MINIMIZED_MODE_NAME SYSRES_CONST_MINUTE_CHAR SYSRES_CONST_MODULE_REQUISITE_CODE SYSRES_CONST_MONITORING_BLOCK_DESCRIPTION SYSRES_CONST_MONTH_FORMAT_VALUE SYSRES_CONST_NAME_LOCALIZE_ID_REQUISITE_CODE SYSRES_CONST_NAME_REQUISITE_CODE SYSRES_CONST_NAME_SINGULAR_REQUISITE_CODE SYSRES_CONST_NAMEAN_INPUT_TYPE SYSRES_CONST_NEGATIVE_PICK_VALUE SYSRES_CONST_NEGATIVE_VALUE SYSRES_CONST_NO SYSRES_CONST_NO_PICK_VALUE SYSRES_CONST_NO_SIGNATURE_REQUISITE_CODE SYSRES_CONST_NO_VALUE SYSRES_CONST_NONE_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_NORMAL_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_NORMAL_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_NORMAL_MODE_NAME SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_CODE SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_NAME SYSRES_CONST_NOTE_REQUISITE_CODE SYSRES_CONST_NOTICE_BLOCK_DESCRIPTION SYSRES_CONST_NUM_REQUISITE SYSRES_CONST_NUM_STR_REQUISITE_CODE SYSRES_CONST_NUMERATION_AUTO_NOT_STRONG SYSRES_CONST_NUMERATION_AUTO_STRONG SYSRES_CONST_NUMERATION_FROM_DICTONARY SYSRES_CONST_NUMERATION_MANUAL SYSRES_CONST_NUMERIC_TYPE_CHAR SYSRES_CONST_NUMREQ_REQUISITE_CODE SYSRES_CONST_OBSOLETE_VERSION_STATE_PICK_VALUE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_CODE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_FEMININE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_OPTIONAL_FORM_COMP_REQCODE_PREFIX SYSRES_CONST_ORANGE_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_ORIGINALREF_REQUISITE_CODE SYSRES_CONST_OURFIRM_REF_CODE SYSRES_CONST_OURFIRM_REQUISITE_CODE SYSRES_CONST_OURFIRM_VAR SYSRES_CONST_OUTGOING_WORK_RULE_TYPE_CODE SYSRES_CONST_PICK_NEGATIVE_RESULT SYSRES_CONST_PICK_POSITIVE_RESULT SYSRES_CONST_PICK_REQUISITE SYSRES_CONST_PICK_REQUISITE_TYPE SYSRES_CONST_PICK_TYPE_CHAR SYSRES_CONST_PLAN_STATUS_REQUISITE_CODE SYSRES_CONST_PLATFORM_VERSION_COMMENT SYSRES_CONST_PLUGINS_SETTINGS_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_POSITIVE_PICK_VALUE SYSRES_CONST_POWER_TO_CREATE_ACTION_CODE SYSRES_CONST_POWER_TO_SIGN_ACTION_CODE SYSRES_CONST_PRIORITY_REQUISITE_CODE SYSRES_CONST_QUALIFIED_TASK_TYPE SYSRES_CONST_QUALIFIED_TASK_TYPE_CODE SYSRES_CONST_RECSTAT_REQUISITE_CODE SYSRES_CONST_RED_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_REF_ID_T_REF_TYPE_REQUISITE_CODE SYSRES_CONST_REF_REQUISITE SYSRES_CONST_REF_REQUISITE_TYPE SYSRES_CONST_REF_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE SYSRES_CONST_REFERENCE_RECORD_HISTORY_CREATE_ACTION_CODE SYSRES_CONST_REFERENCE_RECORD_HISTORY_DELETE_ACTION_CODE SYSRES_CONST_REFERENCE_RECORD_HISTORY_MODIFY_ACTION_CODE SYSRES_CONST_REFERENCE_TYPE_CHAR SYSRES_CONST_REFERENCE_TYPE_REQUISITE_NAME SYSRES_CONST_REFERENCES_ADD_PARAMS_REQUISITE_CODE SYSRES_CONST_REFERENCES_DISPLAY_REQUISITE_REQUISITE_CODE SYSRES_CONST_REMOTE_SERVER_STATUS_WORKING SYSRES_CONST_REMOTE_SERVER_TYPE_MAIN SYSRES_CONST_REMOTE_SERVER_TYPE_SECONDARY SYSRES_CONST_REMOTE_USER_FLAG_VALUE_CODE SYSRES_CONST_REPORT_APP_EDITOR_INTERNAL SYSRES_CONST_REPORT_BASE_REPORT_ID_REQUISITE_CODE SYSRES_CONST_REPORT_BASE_REPORT_REQUISITE_CODE SYSRES_CONST_REPORT_SCRIPT_REQUISITE_CODE SYSRES_CONST_REPORT_TEMPLATE_REQUISITE_CODE SYSRES_CONST_REPORT_VIEWER_CODE_REQUISITE_CODE SYSRES_CONST_REQ_ALLOW_COMPONENT_DEFAULT_VALUE SYSRES_CONST_REQ_ALLOW_RECORD_DEFAULT_VALUE SYSRES_CONST_REQ_ALLOW_SERVER_COMPONENT_DEFAULT_VALUE SYSRES_CONST_REQ_MODE_AVAILABLE_CODE SYSRES_CONST_REQ_MODE_EDIT_CODE SYSRES_CONST_REQ_MODE_HIDDEN_CODE SYSRES_CONST_REQ_MODE_NOT_AVAILABLE_CODE SYSRES_CONST_REQ_MODE_VIEW_CODE SYSRES_CONST_REQ_NUMBER_REQUISITE_CODE SYSRES_CONST_REQ_SECTION_VALUE SYSRES_CONST_REQ_TYPE_VALUE SYSRES_CONST_REQUISITE_FORMAT_BY_UNIT SYSRES_CONST_REQUISITE_FORMAT_DATE_FULL SYSRES_CONST_REQUISITE_FORMAT_DATE_TIME SYSRES_CONST_REQUISITE_FORMAT_LEFT SYSRES_CONST_REQUISITE_FORMAT_RIGHT SYSRES_CONST_REQUISITE_FORMAT_WITHOUT_UNIT SYSRES_CONST_REQUISITE_NUMBER_REQUISITE_CODE SYSRES_CONST_REQUISITE_SECTION_ACTIONS SYSRES_CONST_REQUISITE_SECTION_BUTTON SYSRES_CONST_REQUISITE_SECTION_BUTTONS SYSRES_CONST_REQUISITE_SECTION_CARD SYSRES_CONST_REQUISITE_SECTION_TABLE SYSRES_CONST_REQUISITE_SECTION_TABLE10 SYSRES_CONST_REQUISITE_SECTION_TABLE11 SYSRES_CONST_REQUISITE_SECTION_TABLE12 SYSRES_CONST_REQUISITE_SECTION_TABLE13 SYSRES_CONST_REQUISITE_SECTION_TABLE14 SYSRES_CONST_REQUISITE_SECTION_TABLE15 SYSRES_CONST_REQUISITE_SECTION_TABLE16 SYSRES_CONST_REQUISITE_SECTION_TABLE17 SYSRES_CONST_REQUISITE_SECTION_TABLE18 SYSRES_CONST_REQUISITE_SECTION_TABLE19 SYSRES_CONST_REQUISITE_SECTION_TABLE2 SYSRES_CONST_REQUISITE_SECTION_TABLE20 SYSRES_CONST_REQUISITE_SECTION_TABLE21 SYSRES_CONST_REQUISITE_SECTION_TABLE22 SYSRES_CONST_REQUISITE_SECTION_TABLE23 SYSRES_CONST_REQUISITE_SECTION_TABLE24 SYSRES_CONST_REQUISITE_SECTION_TABLE3 SYSRES_CONST_REQUISITE_SECTION_TABLE4 SYSRES_CONST_REQUISITE_SECTION_TABLE5 SYSRES_CONST_REQUISITE_SECTION_TABLE6 SYSRES_CONST_REQUISITE_SECTION_TABLE7 SYSRES_CONST_REQUISITE_SECTION_TABLE8 SYSRES_CONST_REQUISITE_SECTION_TABLE9 SYSRES_CONST_REQUISITES_PSEUDOREFERENCE_REQUISITE_NUMBER_REQUISITE_CODE SYSRES_CONST_RIGHT_ALIGNMENT_CODE SYSRES_CONST_ROLES_REFERENCE_CODE SYSRES_CONST_ROUTE_STEP_AFTER_RUS SYSRES_CONST_ROUTE_STEP_AND_CONDITION_RUS SYSRES_CONST_ROUTE_STEP_OR_CONDITION_RUS SYSRES_CONST_ROUTE_TYPE_COMPLEX SYSRES_CONST_ROUTE_TYPE_PARALLEL SYSRES_CONST_ROUTE_TYPE_SERIAL SYSRES_CONST_SBDATASETDESC_NEGATIVE_VALUE SYSRES_CONST_SBDATASETDESC_POSITIVE_VALUE SYSRES_CONST_SBVIEWSDESC_POSITIVE_VALUE SYSRES_CONST_SCRIPT_BLOCK_DESCRIPTION SYSRES_CONST_SEARCH_BY_TEXT_REQUISITE_CODE SYSRES_CONST_SEARCHES_COMPONENT_CONTENT SYSRES_CONST_SEARCHES_CRITERIA_ACTION_NAME SYSRES_CONST_SEARCHES_EDOC_CONTENT SYSRES_CONST_SEARCHES_FOLDER_CONTENT SYSRES_CONST_SEARCHES_JOB_CONTENT SYSRES_CONST_SEARCHES_REFERENCE_CODE SYSRES_CONST_SEARCHES_TASK_CONTENT SYSRES_CONST_SECOND_CHAR SYSRES_CONST_SECTION_REQUISITE_ACTIONS_VALUE SYSRES_CONST_SECTION_REQUISITE_CARD_VALUE SYSRES_CONST_SECTION_REQUISITE_CODE SYSRES_CONST_SECTION_REQUISITE_DETAIL_1_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_2_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_3_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_4_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_5_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_6_VALUE SYSRES_CONST_SELECT_REFERENCE_MODE_NAME SYSRES_CONST_SELECT_TYPE_SELECTABLE SYSRES_CONST_SELECT_TYPE_SELECTABLE_ONLY_CHILD SYSRES_CONST_SELECT_TYPE_SELECTABLE_WITH_CHILD SYSRES_CONST_SELECT_TYPE_UNSLECTABLE SYSRES_CONST_SERVER_TYPE_MAIN SYSRES_CONST_SERVICE_USER_CATEGORY_FIELD_VALUE SYSRES_CONST_SETTINGS_USER_REQUISITE_CODE SYSRES_CONST_SIGNATURE_AND_ENCODE_CERTIFICATE_TYPE_CODE SYSRES_CONST_SIGNATURE_CERTIFICATE_TYPE_CODE SYSRES_CONST_SINGULAR_TITLE_REQUISITE_CODE SYSRES_CONST_SQL_SERVER_AUTHENTIFICATION_FLAG_VALUE_CODE SYSRES_CONST_SQL_SERVER_ENCODE_AUTHENTIFICATION_FLAG_VALUE_CODE SYSRES_CONST_STANDART_ROUTE_REFERENCE_CODE SYSRES_CONST_STANDART_ROUTE_REFERENCE_COMMENT_REQUISITE_CODE SYSRES_CONST_STANDART_ROUTES_GROUPS_REFERENCE_CODE SYSRES_CONST_STATE_REQ_NAME SYSRES_CONST_STATE_REQUISITE_ACTIVE_VALUE SYSRES_CONST_STATE_REQUISITE_CLOSED_VALUE SYSRES_CONST_STATE_REQUISITE_CODE SYSRES_CONST_STATIC_ROLE_TYPE_CODE SYSRES_CONST_STATUS_PLAN_DEFAULT_VALUE SYSRES_CONST_STATUS_VALUE_AUTOCLEANING SYSRES_CONST_STATUS_VALUE_BLUE_SQUARE SYSRES_CONST_STATUS_VALUE_COMPLETE SYSRES_CONST_STATUS_VALUE_GREEN_SQUARE SYSRES_CONST_STATUS_VALUE_ORANGE_SQUARE SYSRES_CONST_STATUS_VALUE_PURPLE_SQUARE SYSRES_CONST_STATUS_VALUE_RED_SQUARE SYSRES_CONST_STATUS_VALUE_SUSPEND SYSRES_CONST_STATUS_VALUE_YELLOW_SQUARE SYSRES_CONST_STDROUTE_SHOW_TO_USERS_REQUISITE_CODE SYSRES_CONST_STORAGE_TYPE_FILE SYSRES_CONST_STORAGE_TYPE_SQL_SERVER SYSRES_CONST_STR_REQUISITE SYSRES_CONST_STRIKEOUT_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_STRING_FORMAT_LEFT_ALIGN_CHAR SYSRES_CONST_STRING_FORMAT_RIGHT_ALIGN_CHAR SYSRES_CONST_STRING_REQUISITE_CODE SYSRES_CONST_STRING_REQUISITE_TYPE SYSRES_CONST_STRING_TYPE_CHAR SYSRES_CONST_SUBSTITUTES_PSEUDOREFERENCE_CODE SYSRES_CONST_SUBTASK_BLOCK_DESCRIPTION SYSRES_CONST_SYSTEM_SETTING_CURRENT_USER_PARAM_VALUE SYSRES_CONST_SYSTEM_SETTING_EMPTY_VALUE_PARAM_VALUE SYSRES_CONST_SYSTEM_VERSION_COMMENT SYSRES_CONST_TASK_ACCESS_TYPE_ALL SYSRES_CONST_TASK_ACCESS_TYPE_ALL_MEMBERS SYSRES_CONST_TASK_ACCESS_TYPE_MANUAL SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION_AND_PASSWORD SYSRES_CONST_TASK_ENCODE_TYPE_NONE SYSRES_CONST_TASK_ENCODE_TYPE_PASSWORD SYSRES_CONST_TASK_ROUTE_ALL_CONDITION SYSRES_CONST_TASK_ROUTE_AND_CONDITION SYSRES_CONST_TASK_ROUTE_OR_CONDITION SYSRES_CONST_TASK_STATE_ABORTED SYSRES_CONST_TASK_STATE_COMPLETE SYSRES_CONST_TASK_STATE_CONTINUED SYSRES_CONST_TASK_STATE_CONTROL SYSRES_CONST_TASK_STATE_INIT SYSRES_CONST_TASK_STATE_WORKING SYSRES_CONST_TASK_TITLE SYSRES_CONST_TASK_TYPES_GROUPS_REFERENCE_CODE SYSRES_CONST_TASK_TYPES_REFERENCE_CODE SYSRES_CONST_TEMPLATES_REFERENCE_CODE SYSRES_CONST_TEST_DATE_REQUISITE_NAME SYSRES_CONST_TEST_DEV_DATABASE_NAME SYSRES_CONST_TEST_DEV_SYSTEM_CODE SYSRES_CONST_TEST_EDMS_DATABASE_NAME SYSRES_CONST_TEST_EDMS_MAIN_CODE SYSRES_CONST_TEST_EDMS_MAIN_DB_NAME SYSRES_CONST_TEST_EDMS_SECOND_CODE SYSRES_CONST_TEST_EDMS_SECOND_DB_NAME SYSRES_CONST_TEST_EDMS_SYSTEM_CODE SYSRES_CONST_TEST_NUMERIC_REQUISITE_NAME SYSRES_CONST_TEXT_REQUISITE SYSRES_CONST_TEXT_REQUISITE_CODE SYSRES_CONST_TEXT_REQUISITE_TYPE SYSRES_CONST_TEXT_TYPE_CHAR SYSRES_CONST_TYPE_CODE_REQUISITE_CODE SYSRES_CONST_TYPE_REQUISITE_CODE SYSRES_CONST_UNDEFINED_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_UNITS_SECTION_ID_REQUISITE_CODE SYSRES_CONST_UNITS_SECTION_REQUISITE_CODE SYSRES_CONST_UNOPERATING_RECORD_FLAG_VALUE_CODE SYSRES_CONST_UNSTORED_DATA_REQUISITE_CODE SYSRES_CONST_UNSTORED_DATA_REQUISITE_NAME SYSRES_CONST_USE_ACCESS_TYPE_CODE SYSRES_CONST_USE_ACCESS_TYPE_NAME SYSRES_CONST_USER_ACCOUNT_TYPE_VALUE_CODE SYSRES_CONST_USER_ADDITIONAL_INFORMATION_REQUISITE_CODE SYSRES_CONST_USER_AND_GROUP_ID_FROM_PSEUDOREFERENCE_REQUISITE_CODE SYSRES_CONST_USER_CATEGORY_NORMAL SYSRES_CONST_USER_CERTIFICATE_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_STATE_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_SUBJECT_NAME_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_THUMBPRINT_REQUISITE_CODE SYSRES_CONST_USER_COMMON_CATEGORY SYSRES_CONST_USER_COMMON_CATEGORY_CODE SYSRES_CONST_USER_FULL_NAME_REQUISITE_CODE SYSRES_CONST_USER_GROUP_TYPE_REQUISITE_CODE SYSRES_CONST_USER_LOGIN_REQUISITE_CODE SYSRES_CONST_USER_REMOTE_CONTROLLER_REQUISITE_CODE SYSRES_CONST_USER_REMOTE_SYSTEM_REQUISITE_CODE SYSRES_CONST_USER_RIGHTS_T_REQUISITE_CODE SYSRES_CONST_USER_SERVER_NAME_REQUISITE_CODE SYSRES_CONST_USER_SERVICE_CATEGORY SYSRES_CONST_USER_SERVICE_CATEGORY_CODE SYSRES_CONST_USER_STATUS_ADMINISTRATOR_CODE SYSRES_CONST_USER_STATUS_ADMINISTRATOR_NAME SYSRES_CONST_USER_STATUS_DEVELOPER_CODE SYSRES_CONST_USER_STATUS_DEVELOPER_NAME SYSRES_CONST_USER_STATUS_DISABLED_CODE SYSRES_CONST_USER_STATUS_DISABLED_NAME SYSRES_CONST_USER_STATUS_SYSTEM_DEVELOPER_CODE SYSRES_CONST_USER_STATUS_USER_CODE SYSRES_CONST_USER_STATUS_USER_NAME SYSRES_CONST_USER_STATUS_USER_NAME_DEPRECATED SYSRES_CONST_USER_TYPE_FIELD_VALUE_USER SYSRES_CONST_USER_TYPE_REQUISITE_CODE SYSRES_CONST_USERS_CONTROLLER_REQUISITE_CODE SYSRES_CONST_USERS_IS_MAIN_SERVER_REQUISITE_CODE SYSRES_CONST_USERS_REFERENCE_CODE SYSRES_CONST_USERS_REGISTRATION_CERTIFICATES_ACTION_NAME SYSRES_CONST_USERS_REQUISITE_CODE SYSRES_CONST_USERS_SYSTEM_REQUISITE_CODE SYSRES_CONST_USERS_USER_ACCESS_RIGHTS_TYPR_REQUISITE_CODE SYSRES_CONST_USERS_USER_AUTHENTICATION_REQUISITE_CODE SYSRES_CONST_USERS_USER_COMPONENT_REQUISITE_CODE SYSRES_CONST_USERS_USER_GROUP_REQUISITE_CODE SYSRES_CONST_USERS_VIEW_CERTIFICATES_ACTION_NAME SYSRES_CONST_VIEW_DEFAULT_CODE SYSRES_CONST_VIEW_DEFAULT_NAME SYSRES_CONST_VIEWER_REQUISITE_CODE SYSRES_CONST_WAITING_BLOCK_DESCRIPTION SYSRES_CONST_WIZARD_FORM_LABEL_TEST_STRING SYSRES_CONST_WIZARD_QUERY_PARAM_HEIGHT_ETALON_STRING SYSRES_CONST_WIZARD_REFERENCE_COMMENT_REQUISITE_CODE SYSRES_CONST_WORK_RULES_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_WORK_TIME_CALENDAR_REFERENCE_CODE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE_RUS SYSRES_CONST_WORK_WORKFLOW_SOFT_ROUTE_TYPE_VALUE_CODE_RUS SYSRES_CONST_WORKFLOW_ROUTE_TYPR_HARD SYSRES_CONST_WORKFLOW_ROUTE_TYPR_SOFT SYSRES_CONST_XML_ENCODING SYSRES_CONST_XREC_STAT_REQUISITE_CODE SYSRES_CONST_XRECID_FIELD_NAME SYSRES_CONST_YES SYSRES_CONST_YES_NO_2_REQUISITE_CODE SYSRES_CONST_YES_NO_REQUISITE_CODE SYSRES_CONST_YES_NO_T_REF_TYPE_REQUISITE_CODE SYSRES_CONST_YES_PICK_VALUE SYSRES_CONST_YES_VALUE CR FALSE nil NO_VALUE NULL TAB TRUE YES_VALUE ADMINISTRATORS_GROUP_NAME CUSTOMIZERS_GROUP_NAME DEVELOPERS_GROUP_NAME SERVICE_USERS_GROUP_NAME DECISION_BLOCK_FIRST_OPERAND_PROPERTY DECISION_BLOCK_NAME_PROPERTY DECISION_BLOCK_OPERATION_PROPERTY DECISION_BLOCK_RESULT_TYPE_PROPERTY DECISION_BLOCK_SECOND_OPERAND_PROPERTY ANY_FILE_EXTENTION COMPRESSED_DOCUMENT_EXTENSION EXTENDED_DOCUMENT_EXTENSION SHORT_COMPRESSED_DOCUMENT_EXTENSION SHORT_EXTENDED_DOCUMENT_EXTENSION JOB_BLOCK_ABORT_DEADLINE_PROPERTY JOB_BLOCK_AFTER_FINISH_EVENT JOB_BLOCK_AFTER_QUERY_PARAMETERS_EVENT JOB_BLOCK_ATTACHMENT_PROPERTY JOB_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY JOB_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY JOB_BLOCK_BEFORE_QUERY_PARAMETERS_EVENT JOB_BLOCK_BEFORE_START_EVENT JOB_BLOCK_CREATED_JOBS_PROPERTY JOB_BLOCK_DEADLINE_PROPERTY JOB_BLOCK_EXECUTION_RESULTS_PROPERTY JOB_BLOCK_IS_PARALLEL_PROPERTY JOB_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY JOB_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY JOB_BLOCK_JOB_TEXT_PROPERTY JOB_BLOCK_NAME_PROPERTY JOB_BLOCK_NEED_SIGN_ON_PERFORM_PROPERTY JOB_BLOCK_PERFORMER_PROPERTY JOB_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY JOB_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY JOB_BLOCK_SUBJECT_PROPERTY ENGLISH_LANGUAGE_CODE RUSSIAN_LANGUAGE_CODE smHidden smMaximized smMinimized smNormal wmNo wmYes COMPONENT_TOKEN_LINK_KIND DOCUMENT_LINK_KIND EDOCUMENT_LINK_KIND FOLDER_LINK_KIND JOB_LINK_KIND REFERENCE_LINK_KIND TASK_LINK_KIND COMPONENT_TOKEN_LOCK_TYPE EDOCUMENT_VERSION_LOCK_TYPE MONITOR_BLOCK_AFTER_FINISH_EVENT MONITOR_BLOCK_BEFORE_START_EVENT MONITOR_BLOCK_DEADLINE_PROPERTY MONITOR_BLOCK_INTERVAL_PROPERTY MONITOR_BLOCK_INTERVAL_TYPE_PROPERTY MONITOR_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY MONITOR_BLOCK_NAME_PROPERTY MONITOR_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY MONITOR_BLOCK_SEARCH_SCRIPT_PROPERTY NOTICE_BLOCK_AFTER_FINISH_EVENT NOTICE_BLOCK_ATTACHMENT_PROPERTY NOTICE_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY NOTICE_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY NOTICE_BLOCK_BEFORE_START_EVENT NOTICE_BLOCK_CREATED_NOTICES_PROPERTY NOTICE_BLOCK_DEADLINE_PROPERTY NOTICE_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY NOTICE_BLOCK_NAME_PROPERTY NOTICE_BLOCK_NOTICE_TEXT_PROPERTY NOTICE_BLOCK_PERFORMER_PROPERTY NOTICE_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY NOTICE_BLOCK_SUBJECT_PROPERTY dseAfterCancel dseAfterClose dseAfterDelete dseAfterDeleteOutOfTransaction dseAfterInsert dseAfterOpen dseAfterScroll dseAfterUpdate dseAfterUpdateOutOfTransaction dseBeforeCancel dseBeforeClose dseBeforeDelete dseBeforeDetailUpdate dseBeforeInsert dseBeforeOpen dseBeforeUpdate dseOnAnyRequisiteChange dseOnCloseRecord dseOnDeleteError dseOnOpenRecord dseOnPrepareUpdate dseOnUpdateError dseOnUpdateRatifiedRecord dseOnValidDelete dseOnValidUpdate reOnChange reOnChangeValues SELECTION_BEGIN_ROUTE_EVENT SELECTION_END_ROUTE_EVENT CURRENT_PERIOD_IS_REQUIRED PREVIOUS_CARD_TYPE_NAME SHOW_RECORD_PROPERTIES_FORM ACCESS_RIGHTS_SETTING_DIALOG_CODE ADMINISTRATOR_USER_CODE ANALYTIC_REPORT_TYPE asrtHideLocal asrtHideRemote CALCULATED_ROLE_TYPE_CODE COMPONENTS_REFERENCE_DEVELOPER_VIEW_CODE DCTS_TEST_PROTOCOLS_FOLDER_PATH E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED_BY_USER E_EDOC_VERSION_ALREDY_SIGNED E_EDOC_VERSION_ALREDY_SIGNED_BY_USER EDOC_TYPES_CODE_REQUISITE_FIELD_NAME EDOCUMENTS_ALIAS_NAME FILES_FOLDER_PATH FILTER_OPERANDS_DELIMITER FILTER_OPERATIONS_DELIMITER FORMCARD_NAME FORMLIST_NAME GET_EXTENDED_DOCUMENT_EXTENSION_CREATION_MODE GET_EXTENDED_DOCUMENT_EXTENSION_IMPORT_MODE INTEGRATED_REPORT_TYPE IS_BUILDER_APPLICATION_ROLE IS_BUILDER_APPLICATION_ROLE2 IS_BUILDER_USERS ISBSYSDEV LOG_FOLDER_PATH mbCancel mbNo mbNoToAll mbOK mbYes mbYesToAll MEMORY_DATASET_DESRIPTIONS_FILENAME mrNo mrNoToAll mrYes mrYesToAll MULTIPLE_SELECT_DIALOG_CODE NONOPERATING_RECORD_FLAG_FEMININE NONOPERATING_RECORD_FLAG_MASCULINE OPERATING_RECORD_FLAG_FEMININE OPERATING_RECORD_FLAG_MASCULINE PROFILING_SETTINGS_COMMON_SETTINGS_CODE_VALUE PROGRAM_INITIATED_LOOKUP_ACTION ratDelete ratEdit ratInsert REPORT_TYPE REQUIRED_PICK_VALUES_VARIABLE rmCard rmList SBRTE_PROGID_DEV SBRTE_PROGID_RELEASE STATIC_ROLE_TYPE_CODE SUPPRESS_EMPTY_TEMPLATE_CREATION SYSTEM_USER_CODE UPDATE_DIALOG_DATASET USED_IN_OBJECT_HINT_PARAM USER_INITIATED_LOOKUP_ACTION USER_NAME_FORMAT USER_SELECTION_RESTRICTIONS WORKFLOW_TEST_PROTOCOLS_FOLDER_PATH ELS_SUBTYPE_CONTROL_NAME ELS_FOLDER_KIND_CONTROL_NAME REPEAT_PROCESS_CURRENT_OBJECT_EXCEPTION_NAME PRIVILEGE_COMPONENT_FULL_ACCESS PRIVILEGE_DEVELOPMENT_EXPORT PRIVILEGE_DEVELOPMENT_IMPORT PRIVILEGE_DOCUMENT_DELETE PRIVILEGE_ESD PRIVILEGE_FOLDER_DELETE PRIVILEGE_MANAGE_ACCESS_RIGHTS PRIVILEGE_MANAGE_REPLICATION PRIVILEGE_MANAGE_SESSION_SERVER PRIVILEGE_OBJECT_FULL_ACCESS PRIVILEGE_OBJECT_VIEW PRIVILEGE_RESERVE_LICENSE PRIVILEGE_SYSTEM_CUSTOMIZE PRIVILEGE_SYSTEM_DEVELOP PRIVILEGE_SYSTEM_INSTALL PRIVILEGE_TASK_DELETE PRIVILEGE_USER_PLUGIN_SETTINGS_CUSTOMIZE PRIVILEGES_PSEUDOREFERENCE_CODE ACCESS_TYPES_PSEUDOREFERENCE_CODE ALL_AVAILABLE_COMPONENTS_PSEUDOREFERENCE_CODE ALL_AVAILABLE_PRIVILEGES_PSEUDOREFERENCE_CODE ALL_REPLICATE_COMPONENTS_PSEUDOREFERENCE_CODE AVAILABLE_DEVELOPERS_COMPONENTS_PSEUDOREFERENCE_CODE COMPONENTS_PSEUDOREFERENCE_CODE FILTRATER_SETTINGS_CONFLICTS_PSEUDOREFERENCE_CODE GROUPS_PSEUDOREFERENCE_CODE RECEIVE_PROTOCOL_PSEUDOREFERENCE_CODE REFERENCE_REQUISITE_PSEUDOREFERENCE_CODE REFERENCE_REQUISITES_PSEUDOREFERENCE_CODE REFTYPES_PSEUDOREFERENCE_CODE REPLICATION_SEANCES_DIARY_PSEUDOREFERENCE_CODE SEND_PROTOCOL_PSEUDOREFERENCE_CODE SUBSTITUTES_PSEUDOREFERENCE_CODE SYSTEM_SETTINGS_PSEUDOREFERENCE_CODE UNITS_PSEUDOREFERENCE_CODE USERS_PSEUDOREFERENCE_CODE VIEWERS_PSEUDOREFERENCE_CODE CERTIFICATE_TYPE_ENCRYPT CERTIFICATE_TYPE_SIGN CERTIFICATE_TYPE_SIGN_AND_ENCRYPT STORAGE_TYPE_FILE STORAGE_TYPE_NAS_CIFS STORAGE_TYPE_SAPERION STORAGE_TYPE_SQL_SERVER COMPTYPE2_REQUISITE_DOCUMENTS_VALUE COMPTYPE2_REQUISITE_TASKS_VALUE COMPTYPE2_REQUISITE_FOLDERS_VALUE COMPTYPE2_REQUISITE_REFERENCES_VALUE SYSREQ_CODE SYSREQ_COMPTYPE2 SYSREQ_CONST_AVAILABLE_FOR_WEB SYSREQ_CONST_COMMON_CODE SYSREQ_CONST_COMMON_VALUE SYSREQ_CONST_FIRM_CODE SYSREQ_CONST_FIRM_STATUS SYSREQ_CONST_FIRM_VALUE SYSREQ_CONST_SERVER_STATUS SYSREQ_CONTENTS SYSREQ_DATE_OPEN SYSREQ_DATE_CLOSE SYSREQ_DESCRIPTION SYSREQ_DESCRIPTION_LOCALIZE_ID SYSREQ_DOUBLE SYSREQ_EDOC_ACCESS_TYPE SYSREQ_EDOC_AUTHOR SYSREQ_EDOC_CREATED SYSREQ_EDOC_DELEGATE_RIGHTS_REQUISITE_CODE SYSREQ_EDOC_EDITOR SYSREQ_EDOC_ENCODE_TYPE SYSREQ_EDOC_ENCRYPTION_PLUGIN_NAME SYSREQ_EDOC_ENCRYPTION_PLUGIN_VERSION SYSREQ_EDOC_EXPORT_DATE SYSREQ_EDOC_EXPORTER SYSREQ_EDOC_KIND SYSREQ_EDOC_LIFE_STAGE_NAME SYSREQ_EDOC_LOCKED_FOR_SERVER_CODE SYSREQ_EDOC_MODIFIED SYSREQ_EDOC_NAME SYSREQ_EDOC_NOTE SYSREQ_EDOC_QUALIFIED_ID SYSREQ_EDOC_SESSION_KEY SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_NAME SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_VERSION SYSREQ_EDOC_SIGNATURE_TYPE SYSREQ_EDOC_SIGNED SYSREQ_EDOC_STORAGE SYSREQ_EDOC_STORAGES_ARCHIVE_STORAGE SYSREQ_EDOC_STORAGES_CHECK_RIGHTS SYSREQ_EDOC_STORAGES_COMPUTER_NAME SYSREQ_EDOC_STORAGES_EDIT_IN_STORAGE SYSREQ_EDOC_STORAGES_EXECUTIVE_STORAGE SYSREQ_EDOC_STORAGES_FUNCTION SYSREQ_EDOC_STORAGES_INITIALIZED SYSREQ_EDOC_STORAGES_LOCAL_PATH SYSREQ_EDOC_STORAGES_SAPERION_DATABASE_NAME SYSREQ_EDOC_STORAGES_SEARCH_BY_TEXT SYSREQ_EDOC_STORAGES_SERVER_NAME SYSREQ_EDOC_STORAGES_SHARED_SOURCE_NAME SYSREQ_EDOC_STORAGES_TYPE SYSREQ_EDOC_TEXT_MODIFIED SYSREQ_EDOC_TYPE_ACT_CODE SYSREQ_EDOC_TYPE_ACT_DESCRIPTION SYSREQ_EDOC_TYPE_ACT_DESCRIPTION_LOCALIZE_ID SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE_EXISTS SYSREQ_EDOC_TYPE_ACT_SECTION SYSREQ_EDOC_TYPE_ADD_PARAMS SYSREQ_EDOC_TYPE_COMMENT SYSREQ_EDOC_TYPE_EVENT_TEXT SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID SYSREQ_EDOC_TYPE_NAME_LOCALIZE_ID SYSREQ_EDOC_TYPE_NUMERATION_METHOD SYSREQ_EDOC_TYPE_PSEUDO_REQUISITE_CODE SYSREQ_EDOC_TYPE_REQ_CODE SYSREQ_EDOC_TYPE_REQ_DESCRIPTION SYSREQ_EDOC_TYPE_REQ_DESCRIPTION_LOCALIZE_ID SYSREQ_EDOC_TYPE_REQ_IS_LEADING SYSREQ_EDOC_TYPE_REQ_IS_REQUIRED SYSREQ_EDOC_TYPE_REQ_NUMBER SYSREQ_EDOC_TYPE_REQ_ON_CHANGE SYSREQ_EDOC_TYPE_REQ_ON_CHANGE_EXISTS SYSREQ_EDOC_TYPE_REQ_ON_SELECT SYSREQ_EDOC_TYPE_REQ_ON_SELECT_KIND SYSREQ_EDOC_TYPE_REQ_SECTION SYSREQ_EDOC_TYPE_VIEW_CARD SYSREQ_EDOC_TYPE_VIEW_CODE SYSREQ_EDOC_TYPE_VIEW_COMMENT SYSREQ_EDOC_TYPE_VIEW_IS_MAIN SYSREQ_EDOC_TYPE_VIEW_NAME SYSREQ_EDOC_TYPE_VIEW_NAME_LOCALIZE_ID SYSREQ_EDOC_VERSION_AUTHOR SYSREQ_EDOC_VERSION_CRC SYSREQ_EDOC_VERSION_DATA SYSREQ_EDOC_VERSION_EDITOR SYSREQ_EDOC_VERSION_EXPORT_DATE SYSREQ_EDOC_VERSION_EXPORTER SYSREQ_EDOC_VERSION_HIDDEN SYSREQ_EDOC_VERSION_LIFE_STAGE SYSREQ_EDOC_VERSION_MODIFIED SYSREQ_EDOC_VERSION_NOTE SYSREQ_EDOC_VERSION_SIGNATURE_TYPE SYSREQ_EDOC_VERSION_SIGNED SYSREQ_EDOC_VERSION_SIZE SYSREQ_EDOC_VERSION_SOURCE SYSREQ_EDOC_VERSION_TEXT_MODIFIED SYSREQ_EDOCKIND_DEFAULT_VERSION_STATE_CODE SYSREQ_FOLDER_KIND SYSREQ_FUNC_CATEGORY SYSREQ_FUNC_COMMENT SYSREQ_FUNC_GROUP SYSREQ_FUNC_GROUP_COMMENT SYSREQ_FUNC_GROUP_NUMBER SYSREQ_FUNC_HELP SYSREQ_FUNC_PARAM_DEF_VALUE SYSREQ_FUNC_PARAM_IDENT SYSREQ_FUNC_PARAM_NUMBER SYSREQ_FUNC_PARAM_TYPE SYSREQ_FUNC_TEXT SYSREQ_GROUP_CATEGORY SYSREQ_ID SYSREQ_LAST_UPDATE SYSREQ_LEADER_REFERENCE SYSREQ_LINE_NUMBER SYSREQ_MAIN_RECORD_ID SYSREQ_NAME SYSREQ_NAME_LOCALIZE_ID SYSREQ_NOTE SYSREQ_ORIGINAL_RECORD SYSREQ_OUR_FIRM SYSREQ_PROFILING_SETTINGS_BATCH_LOGING SYSREQ_PROFILING_SETTINGS_BATCH_SIZE SYSREQ_PROFILING_SETTINGS_PROFILING_ENABLED SYSREQ_PROFILING_SETTINGS_SQL_PROFILING_ENABLED SYSREQ_PROFILING_SETTINGS_START_LOGGED SYSREQ_RECORD_STATUS SYSREQ_REF_REQ_FIELD_NAME SYSREQ_REF_REQ_FORMAT SYSREQ_REF_REQ_GENERATED SYSREQ_REF_REQ_LENGTH SYSREQ_REF_REQ_PRECISION SYSREQ_REF_REQ_REFERENCE SYSREQ_REF_REQ_SECTION SYSREQ_REF_REQ_STORED SYSREQ_REF_REQ_TOKENS SYSREQ_REF_REQ_TYPE SYSREQ_REF_REQ_VIEW SYSREQ_REF_TYPE_ACT_CODE SYSREQ_REF_TYPE_ACT_DESCRIPTION SYSREQ_REF_TYPE_ACT_DESCRIPTION_LOCALIZE_ID SYSREQ_REF_TYPE_ACT_ON_EXECUTE SYSREQ_REF_TYPE_ACT_ON_EXECUTE_EXISTS SYSREQ_REF_TYPE_ACT_SECTION SYSREQ_REF_TYPE_ADD_PARAMS SYSREQ_REF_TYPE_COMMENT SYSREQ_REF_TYPE_COMMON_SETTINGS SYSREQ_REF_TYPE_DISPLAY_REQUISITE_NAME SYSREQ_REF_TYPE_EVENT_TEXT SYSREQ_REF_TYPE_MAIN_LEADING_REF SYSREQ_REF_TYPE_NAME_IN_SINGULAR SYSREQ_REF_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID SYSREQ_REF_TYPE_NAME_LOCALIZE_ID SYSREQ_REF_TYPE_NUMERATION_METHOD SYSREQ_REF_TYPE_REQ_CODE SYSREQ_REF_TYPE_REQ_DESCRIPTION SYSREQ_REF_TYPE_REQ_DESCRIPTION_LOCALIZE_ID SYSREQ_REF_TYPE_REQ_IS_CONTROL SYSREQ_REF_TYPE_REQ_IS_FILTER SYSREQ_REF_TYPE_REQ_IS_LEADING SYSREQ_REF_TYPE_REQ_IS_REQUIRED SYSREQ_REF_TYPE_REQ_NUMBER SYSREQ_REF_TYPE_REQ_ON_CHANGE SYSREQ_REF_TYPE_REQ_ON_CHANGE_EXISTS SYSREQ_REF_TYPE_REQ_ON_SELECT SYSREQ_REF_TYPE_REQ_ON_SELECT_KIND SYSREQ_REF_TYPE_REQ_SECTION SYSREQ_REF_TYPE_VIEW_CARD SYSREQ_REF_TYPE_VIEW_CODE SYSREQ_REF_TYPE_VIEW_COMMENT SYSREQ_REF_TYPE_VIEW_IS_MAIN SYSREQ_REF_TYPE_VIEW_NAME SYSREQ_REF_TYPE_VIEW_NAME_LOCALIZE_ID SYSREQ_REFERENCE_TYPE_ID SYSREQ_STATE SYSREQ_STATЕ SYSREQ_SYSTEM_SETTINGS_VALUE SYSREQ_TYPE SYSREQ_UNIT SYSREQ_UNIT_ID SYSREQ_USER_GROUPS_GROUP_FULL_NAME SYSREQ_USER_GROUPS_GROUP_NAME SYSREQ_USER_GROUPS_GROUP_SERVER_NAME SYSREQ_USERS_ACCESS_RIGHTS SYSREQ_USERS_AUTHENTICATION SYSREQ_USERS_CATEGORY SYSREQ_USERS_COMPONENT SYSREQ_USERS_COMPONENT_USER_IS_PUBLIC SYSREQ_USERS_DOMAIN SYSREQ_USERS_FULL_USER_NAME SYSREQ_USERS_GROUP SYSREQ_USERS_IS_MAIN_SERVER SYSREQ_USERS_LOGIN SYSREQ_USERS_REFERENCE_USER_IS_PUBLIC SYSREQ_USERS_STATUS SYSREQ_USERS_USER_CERTIFICATE SYSREQ_USERS_USER_CERTIFICATE_INFO SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_NAME SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_VERSION SYSREQ_USERS_USER_CERTIFICATE_STATE SYSREQ_USERS_USER_CERTIFICATE_SUBJECT_NAME SYSREQ_USERS_USER_CERTIFICATE_THUMBPRINT SYSREQ_USERS_USER_DEFAULT_CERTIFICATE SYSREQ_USERS_USER_DESCRIPTION SYSREQ_USERS_USER_GLOBAL_NAME SYSREQ_USERS_USER_LOGIN SYSREQ_USERS_USER_MAIN_SERVER SYSREQ_USERS_USER_TYPE SYSREQ_WORK_RULES_FOLDER_ID RESULT_VAR_NAME RESULT_VAR_NAME_ENG AUTO_NUMERATION_RULE_ID CANT_CHANGE_ID_REQUISITE_RULE_ID CANT_CHANGE_OURFIRM_REQUISITE_RULE_ID CHECK_CHANGING_REFERENCE_RECORD_USE_RULE_ID CHECK_CODE_REQUISITE_RULE_ID CHECK_DELETING_REFERENCE_RECORD_USE_RULE_ID CHECK_FILTRATER_CHANGES_RULE_ID CHECK_RECORD_INTERVAL_RULE_ID CHECK_REFERENCE_INTERVAL_RULE_ID CHECK_REQUIRED_DATA_FULLNESS_RULE_ID CHECK_REQUIRED_REQUISITES_FULLNESS_RULE_ID MAKE_RECORD_UNRATIFIED_RULE_ID RESTORE_AUTO_NUMERATION_RULE_ID SET_FIRM_CONTEXT_FROM_RECORD_RULE_ID SET_FIRST_RECORD_IN_LIST_FORM_RULE_ID SET_IDSPS_VALUE_RULE_ID SET_NEXT_CODE_VALUE_RULE_ID SET_OURFIRM_BOUNDS_RULE_ID SET_OURFIRM_REQUISITE_RULE_ID SCRIPT_BLOCK_AFTER_FINISH_EVENT SCRIPT_BLOCK_BEFORE_START_EVENT SCRIPT_BLOCK_EXECUTION_RESULTS_PROPERTY SCRIPT_BLOCK_NAME_PROPERTY SCRIPT_BLOCK_SCRIPT_PROPERTY SUBTASK_BLOCK_ABORT_DEADLINE_PROPERTY SUBTASK_BLOCK_AFTER_FINISH_EVENT SUBTASK_BLOCK_ASSIGN_PARAMS_EVENT SUBTASK_BLOCK_ATTACHMENTS_PROPERTY SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY SUBTASK_BLOCK_BEFORE_START_EVENT SUBTASK_BLOCK_CREATED_TASK_PROPERTY SUBTASK_BLOCK_CREATION_EVENT SUBTASK_BLOCK_DEADLINE_PROPERTY SUBTASK_BLOCK_IMPORTANCE_PROPERTY SUBTASK_BLOCK_INITIATOR_PROPERTY SUBTASK_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY SUBTASK_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY SUBTASK_BLOCK_JOBS_TYPE_PROPERTY SUBTASK_BLOCK_NAME_PROPERTY SUBTASK_BLOCK_PARALLEL_ROUTE_PROPERTY SUBTASK_BLOCK_PERFORMERS_PROPERTY SUBTASK_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY SUBTASK_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY SUBTASK_BLOCK_REQUIRE_SIGN_PROPERTY SUBTASK_BLOCK_STANDARD_ROUTE_PROPERTY SUBTASK_BLOCK_START_EVENT SUBTASK_BLOCK_STEP_CONTROL_PROPERTY SUBTASK_BLOCK_SUBJECT_PROPERTY SUBTASK_BLOCK_TASK_CONTROL_PROPERTY SUBTASK_BLOCK_TEXT_PROPERTY SUBTASK_BLOCK_UNLOCK_ATTACHMENTS_ON_STOP_PROPERTY SUBTASK_BLOCK_USE_STANDARD_ROUTE_PROPERTY SUBTASK_BLOCK_WAIT_FOR_TASK_COMPLETE_PROPERTY SYSCOMP_CONTROL_JOBS SYSCOMP_FOLDERS SYSCOMP_JOBS SYSCOMP_NOTICES SYSCOMP_TASKS SYSDLG_CREATE_EDOCUMENT SYSDLG_CREATE_EDOCUMENT_VERSION SYSDLG_CURRENT_PERIOD SYSDLG_EDIT_FUNCTION_HELP SYSDLG_EDOCUMENT_KINDS_FOR_TEMPLATE SYSDLG_EXPORT_MULTIPLE_EDOCUMENTS SYSDLG_EXPORT_SINGLE_EDOCUMENT SYSDLG_IMPORT_EDOCUMENT SYSDLG_MULTIPLE_SELECT SYSDLG_SETUP_ACCESS_RIGHTS SYSDLG_SETUP_DEFAULT_RIGHTS SYSDLG_SETUP_FILTER_CONDITION SYSDLG_SETUP_SIGN_RIGHTS SYSDLG_SETUP_TASK_OBSERVERS SYSDLG_SETUP_TASK_ROUTE SYSDLG_SETUP_USERS_LIST SYSDLG_SIGN_EDOCUMENT SYSDLG_SIGN_MULTIPLE_EDOCUMENTS SYSREF_ACCESS_RIGHTS_TYPES SYSREF_ADMINISTRATION_HISTORY SYSREF_ALL_AVAILABLE_COMPONENTS SYSREF_ALL_AVAILABLE_PRIVILEGES SYSREF_ALL_REPLICATING_COMPONENTS SYSREF_AVAILABLE_DEVELOPERS_COMPONENTS SYSREF_CALENDAR_EVENTS SYSREF_COMPONENT_TOKEN_HISTORY SYSREF_COMPONENT_TOKENS SYSREF_COMPONENTS SYSREF_CONSTANTS SYSREF_DATA_RECEIVE_PROTOCOL SYSREF_DATA_SEND_PROTOCOL SYSREF_DIALOGS SYSREF_DIALOGS_REQUISITES SYSREF_EDITORS SYSREF_EDOC_CARDS SYSREF_EDOC_TYPES SYSREF_EDOCUMENT_CARD_REQUISITES SYSREF_EDOCUMENT_CARD_TYPES SYSREF_EDOCUMENT_CARD_TYPES_REFERENCE SYSREF_EDOCUMENT_CARDS SYSREF_EDOCUMENT_HISTORY SYSREF_EDOCUMENT_KINDS SYSREF_EDOCUMENT_REQUISITES SYSREF_EDOCUMENT_SIGNATURES SYSREF_EDOCUMENT_TEMPLATES SYSREF_EDOCUMENT_TEXT_STORAGES SYSREF_EDOCUMENT_VIEWS SYSREF_FILTERER_SETUP_CONFLICTS SYSREF_FILTRATER_SETTING_CONFLICTS SYSREF_FOLDER_HISTORY SYSREF_FOLDERS SYSREF_FUNCTION_GROUPS SYSREF_FUNCTION_PARAMS SYSREF_FUNCTIONS SYSREF_JOB_HISTORY SYSREF_LINKS SYSREF_LOCALIZATION_DICTIONARY SYSREF_LOCALIZATION_LANGUAGES SYSREF_MODULES SYSREF_PRIVILEGES SYSREF_RECORD_HISTORY SYSREF_REFERENCE_REQUISITES SYSREF_REFERENCE_TYPE_VIEWS SYSREF_REFERENCE_TYPES SYSREF_REFERENCES SYSREF_REFERENCES_REQUISITES SYSREF_REMOTE_SERVERS SYSREF_REPLICATION_SESSIONS_LOG SYSREF_REPLICATION_SESSIONS_PROTOCOL SYSREF_REPORTS SYSREF_ROLES SYSREF_ROUTE_BLOCK_GROUPS SYSREF_ROUTE_BLOCKS SYSREF_SCRIPTS SYSREF_SEARCHES SYSREF_SERVER_EVENTS SYSREF_SERVER_EVENTS_HISTORY SYSREF_STANDARD_ROUTE_GROUPS SYSREF_STANDARD_ROUTES SYSREF_STATUSES SYSREF_SYSTEM_SETTINGS SYSREF_TASK_HISTORY SYSREF_TASK_KIND_GROUPS SYSREF_TASK_KINDS SYSREF_TASK_RIGHTS SYSREF_TASK_SIGNATURES SYSREF_TASKS SYSREF_UNITS SYSREF_USER_GROUPS SYSREF_USER_GROUPS_REFERENCE SYSREF_USER_SUBSTITUTION SYSREF_USERS SYSREF_USERS_REFERENCE SYSREF_VIEWERS SYSREF_WORKING_TIME_CALENDARS ACCESS_RIGHTS_TABLE_NAME EDMS_ACCESS_TABLE_NAME EDOC_TYPES_TABLE_NAME TEST_DEV_DB_NAME TEST_DEV_SYSTEM_CODE TEST_EDMS_DB_NAME TEST_EDMS_MAIN_CODE TEST_EDMS_MAIN_DB_NAME TEST_EDMS_SECOND_CODE TEST_EDMS_SECOND_DB_NAME TEST_EDMS_SYSTEM_CODE TEST_ISB5_MAIN_CODE TEST_ISB5_SECOND_CODE TEST_SQL_SERVER_2005_NAME TEST_SQL_SERVER_NAME ATTENTION_CAPTION cbsCommandLinks cbsDefault CONFIRMATION_CAPTION ERROR_CAPTION INFORMATION_CAPTION mrCancel mrOk EDOC_VERSION_ACTIVE_STAGE_CODE EDOC_VERSION_DESIGN_STAGE_CODE EDOC_VERSION_OBSOLETE_STAGE_CODE cpDataEnciphermentEnabled cpDigitalSignatureEnabled cpID cpIssuer cpPluginVersion cpSerial cpSubjectName cpSubjSimpleName cpValidFromDate cpValidToDate ISBL_SYNTAX NO_SYNTAX XML_SYNTAX WAIT_BLOCK_AFTER_FINISH_EVENT WAIT_BLOCK_BEFORE_START_EVENT WAIT_BLOCK_DEADLINE_PROPERTY WAIT_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY WAIT_BLOCK_NAME_PROPERTY WAIT_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY SYSRES_COMMON SYSRES_CONST SYSRES_MBFUNC SYSRES_SBDATA SYSRES_SBGUI SYSRES_SBINTF SYSRES_SBREFDSC SYSRES_SQLERRORS SYSRES_SYSCOMP) b["enum"] = Set.new %w(atUser atGroup atRole aemEnabledAlways aemDisabledAlways aemEnabledOnBrowse aemEnabledOnEdit aemDisabledOnBrowseEmpty apBegin apEnd alLeft alRight asmNever asmNoButCustomize asmAsLastTime asmYesButCustomize asmAlways cirCommon cirRevoked ctSignature ctEncode ctSignatureEncode clbUnchecked clbChecked clbGrayed ceISB ceAlways ceNever ctDocument ctReference ctScript ctUnknown ctReport ctDialog ctFunction ctFolder ctEDocument ctTask ctJob ctNotice ctControlJob cfInternal cfDisplay ciUnspecified ciWrite ciRead ckFolder ckEDocument ckTask ckJob ckComponentToken ckAny ckReference ckScript ckReport ckDialog ctISBLEditor ctBevel ctButton ctCheckListBox ctComboBox ctComboEdit ctGrid ctDBCheckBox ctDBComboBox ctDBEdit ctDBEllipsis ctDBMemo ctDBNavigator ctDBRadioGroup ctDBStatusLabel ctEdit ctGroupBox ctInplaceHint ctMemo ctPanel ctListBox ctRadioButton ctRichEdit ctTabSheet ctWebBrowser ctImage ctHyperLink ctLabel ctDBMultiEllipsis ctRibbon ctRichView ctInnerPanel ctPanelGroup ctBitButton cctDate cctInteger cctNumeric cctPick cctReference cctString cctText cltInternal cltPrimary cltGUI dseBeforeOpen dseAfterOpen dseBeforeClose dseAfterClose dseOnValidDelete dseBeforeDelete dseAfterDelete dseAfterDeleteOutOfTransaction dseOnDeleteError dseBeforeInsert dseAfterInsert dseOnValidUpdate dseBeforeUpdate dseOnUpdateRatifiedRecord dseAfterUpdate dseAfterUpdateOutOfTransaction dseOnUpdateError dseAfterScroll dseOnOpenRecord dseOnCloseRecord dseBeforeCancel dseAfterCancel dseOnUpdateDeadlockError dseBeforeDetailUpdate dseOnPrepareUpdate dseOnAnyRequisiteChange dssEdit dssInsert dssBrowse dssInActive dftDate dftShortDate dftDateTime dftTimeStamp dotDays dotHours dotMinutes dotSeconds dtkndLocal dtkndUTC arNone arView arEdit arFull ddaView ddaEdit emLock emEdit emSign emExportWithLock emImportWithUnlock emChangeVersionNote emOpenForModify emChangeLifeStage emDelete emCreateVersion emImport emUnlockExportedWithLock emStart emAbort emReInit emMarkAsReaded emMarkAsUnreaded emPerform emAccept emResume emChangeRights emEditRoute emEditObserver emRecoveryFromLocalCopy emChangeWorkAccessType emChangeEncodeTypeToCertificate emChangeEncodeTypeToPassword emChangeEncodeTypeToNone emChangeEncodeTypeToCertificatePassword emChangeStandardRoute emGetText emOpenForView emMoveToStorage emCreateObject emChangeVersionHidden emDeleteVersion emChangeLifeCycleStage emApprovingSign emExport emContinue emLockFromEdit emUnLockForEdit emLockForServer emUnlockFromServer emDelegateAccessRights emReEncode ecotFile ecotProcess eaGet eaCopy eaCreate eaCreateStandardRoute edltAll edltNothing edltQuery essmText essmCard esvtLast esvtLastActive esvtSpecified edsfExecutive edsfArchive edstSQLServer edstFile edvstNone edvstEDocumentVersionCopy edvstFile edvstTemplate edvstScannedFile vsDefault vsDesign vsActive vsObsolete etNone etCertificate etPassword etCertificatePassword ecException ecWarning ecInformation estAll estApprovingOnly evtLast evtLastActive evtQuery fdtString fdtNumeric fdtInteger fdtDate fdtText fdtUnknown fdtWideString fdtLargeInteger ftInbox ftOutbox ftFavorites ftCommonFolder ftUserFolder ftComponents ftQuickLaunch ftShortcuts ftSearch grhAuto grhX1 grhX2 grhX3 hltText hltRTF hltHTML iffBMP iffJPEG iffMultiPageTIFF iffSinglePageTIFF iffTIFF iffPNG im8bGrayscale im24bRGB im1bMonochrome itBMP itJPEG itWMF itPNG ikhInformation ikhWarning ikhError ikhNoIcon icUnknown icScript icFunction icIntegratedReport icAnalyticReport icDataSetEventHandler icActionHandler icFormEventHandler icLookUpEventHandler icRequisiteChangeEventHandler icBeforeSearchEventHandler icRoleCalculation icSelectRouteEventHandler icBlockPropertyCalculation icBlockQueryParamsEventHandler icChangeSearchResultEventHandler icBlockEventHandler icSubTaskInitEventHandler icEDocDataSetEventHandler icEDocLookUpEventHandler icEDocActionHandler icEDocFormEventHandler icEDocRequisiteChangeEventHandler icStructuredConversionRule icStructuredConversionEventBefore icStructuredConversionEventAfter icWizardEventHandler icWizardFinishEventHandler icWizardStepEventHandler icWizardStepFinishEventHandler icWizardActionEnableEventHandler icWizardActionExecuteEventHandler icCreateJobsHandler icCreateNoticesHandler icBeforeLookUpEventHandler icAfterLookUpEventHandler icTaskAbortEventHandler icWorkflowBlockActionHandler icDialogDataSetEventHandler icDialogActionHandler icDialogLookUpEventHandler icDialogRequisiteChangeEventHandler icDialogFormEventHandler icDialogValidCloseEventHandler icBlockFormEventHandler icTaskFormEventHandler icReferenceMethod icEDocMethod icDialogMethod icProcessMessageHandler isShow isHide isByUserSettings jkJob jkNotice jkControlJob jtInner jtLeft jtRight jtFull jtCross lbpAbove lbpBelow lbpLeft lbpRight eltPerConnection eltPerUser sfcUndefined sfcBlack sfcGreen sfcRed sfcBlue sfcOrange sfcLilac sfsItalic sfsStrikeout sfsNormal ldctStandardRoute ldctWizard ldctScript ldctFunction ldctRouteBlock ldctIntegratedReport ldctAnalyticReport ldctReferenceType ldctEDocumentType ldctDialog ldctServerEvents mrcrtNone mrcrtUser mrcrtMaximal mrcrtCustom vtEqual vtGreaterOrEqual vtLessOrEqual vtRange rdYesterday rdToday rdTomorrow rdThisWeek rdThisMonth rdThisYear rdNextMonth rdNextWeek rdLastWeek rdLastMonth rdWindow rdFile rdPrinter rdtString rdtNumeric rdtInteger rdtDate rdtReference rdtAccount rdtText rdtPick rdtUnknown rdtLargeInteger rdtDocument reOnChange reOnChangeValues ttGlobal ttLocal ttUser ttSystem ssmBrowse ssmSelect ssmMultiSelect ssmBrowseModal smSelect smLike smCard stNone stAuthenticating stApproving sctString sctStream sstAnsiSort sstNaturalSort svtEqual svtContain soatString soatNumeric soatInteger soatDatetime soatReferenceRecord soatText soatPick soatBoolean soatEDocument soatAccount soatIntegerCollection soatNumericCollection soatStringCollection soatPickCollection soatDatetimeCollection soatBooleanCollection soatReferenceRecordCollection soatEDocumentCollection soatAccountCollection soatContents soatUnknown tarAbortByUser tarAbortByWorkflowException tvtAllWords tvtExactPhrase tvtAnyWord usNone usCompleted usRedSquare usBlueSquare usYellowSquare usGreenSquare usOrangeSquare usPurpleSquare usFollowUp utUnknown utUser utDeveloper utAdministrator utSystemDeveloper utDisconnected btAnd btDetailAnd btOr btNotOr btOnly vmView vmSelect vmNavigation vsmSingle vsmMultiple vsmMultipleCheck vsmNoSelection wfatPrevious wfatNext wfatCancel wfatFinish wfepUndefined wfepText3 wfepText6 wfepText9 wfepSpinEdit wfepDropDown wfepRadioGroup wfepFlag wfepText12 wfepText15 wfepText18 wfepText21 wfepText24 wfepText27 wfepText30 wfepRadioGroupColumn1 wfepRadioGroupColumn2 wfepRadioGroupColumn3 wfetQueryParameter wfetText wfetDelimiter wfetLabel wptString wptInteger wptNumeric wptBoolean wptDateTime wptPick wptText wptUser wptUserList wptEDocumentInfo wptEDocumentInfoList wptReferenceRecordInfo wptReferenceRecordInfoList wptFolderInfo wptTaskInfo wptContents wptFileName wptDate wsrComplete wsrGoNext wsrGoPrevious wsrCustom wsrCancel wsrGoFinal wstForm wstEDocument wstTaskCard wstReferenceRecordCard wstFinal waAll waPerformers waManual wsbStart wsbFinish wsbNotice wsbStep wsbDecision wsbWait wsbMonitor wsbScript wsbConnector wsbSubTask wsbLifeCycleStage wsbPause wdtInteger wdtFloat wdtString wdtPick wdtDateTime wdtBoolean wdtTask wdtJob wdtFolder wdtEDocument wdtReferenceRecord wdtUser wdtGroup wdtRole wdtIntegerCollection wdtFloatCollection wdtStringCollection wdtPickCollection wdtDateTimeCollection wdtBooleanCollection wdtTaskCollection wdtJobCollection wdtFolderCollection wdtEDocumentCollection wdtReferenceRecordCollection wdtUserCollection wdtGroupCollection wdtRoleCollection wdtContents wdtUserList wdtSearchDescription wdtDeadLine wdtPickSet wdtAccountCollection wiLow wiNormal wiHigh wrtSoft wrtHard wsInit wsRunning wsDone wsControlled wsAborted wsContinued wtmFull wtmFromCurrent wtmOnlyCurrent) b["global"] = Set.new %w(AltState Application CallType ComponentTokens CreatedJobs CreatedNotices ControlState DialogResult Dialogs EDocuments EDocumentVersionSource Folders GlobalIDs Job Jobs InputValue LookUpReference LookUpRequisiteNames LookUpSearch Object ParentComponent Processes References Requisite ReportName Reports Result Scripts Searches SelectedAttachments SelectedItems SelectMode Sender ServerEvents ServiceFactory ShiftState SubTask SystemDialogs Tasks Wizard Wizards Work ВызовСпособ ИмяОтчета РеквЗнач) b["interface"] = Set.new %w(IApplication IAccessRights IAccountRepository IAccountSelectionRestrictions IAction IActionList IAdministrationHistoryDescription IAnchors IApplication IArchiveInfo IAttachment IAttachmentList ICheckListBox ICheckPointedList IColumn IComponent IComponentDescription IComponentToken IComponentTokenFactory IComponentTokenInfo ICompRecordInfo IConnection IContents IControl IControlJob IControlJobInfo IControlList ICrypto ICrypto2 ICustomJob ICustomJobInfo ICustomListBox ICustomObjectWizardStep ICustomWork ICustomWorkInfo IDataSet IDataSetAccessInfo IDataSigner IDateCriterion IDateRequisite IDateRequisiteDescription IDateValue IDeaAccessRights IDeaObjectInfo IDevelopmentComponentLock IDialog IDialogFactory IDialogPickRequisiteItems IDialogsFactory IDICSFactory IDocRequisite IDocumentInfo IDualListDialog IECertificate IECertificateInfo IECertificates IEditControl IEditorForm IEdmsExplorer IEdmsObject IEdmsObjectDescription IEdmsObjectFactory IEdmsObjectInfo IEDocument IEDocumentAccessRights IEDocumentDescription IEDocumentEditor IEDocumentFactory IEDocumentInfo IEDocumentStorage IEDocumentVersion IEDocumentVersionListDialog IEDocumentVersionSource IEDocumentWizardStep IEDocVerSignature IEDocVersionState IEnabledMode IEncodeProvider IEncrypter IEvent IEventList IException IExternalEvents IExternalHandler IFactory IField IFileDialog IFolder IFolderDescription IFolderDialog IFolderFactory IFolderInfo IForEach IForm IFormTitle IFormWizardStep IGlobalIDFactory IGlobalIDInfo IGrid IHasher IHistoryDescription IHyperLinkControl IImageButton IImageControl IInnerPanel IInplaceHint IIntegerCriterion IIntegerList IIntegerRequisite IIntegerValue IISBLEditorForm IJob IJobDescription IJobFactory IJobForm IJobInfo ILabelControl ILargeIntegerCriterion ILargeIntegerRequisite ILargeIntegerValue ILicenseInfo ILifeCycleStage IList IListBox ILocalIDInfo ILocalization ILock IMemoryDataSet IMessagingFactory IMetadataRepository INotice INoticeInfo INumericCriterion INumericRequisite INumericValue IObject IObjectDescription IObjectImporter IObjectInfo IObserver IPanelGroup IPickCriterion IPickProperty IPickRequisite IPickRequisiteDescription IPickRequisiteItem IPickRequisiteItems IPickValue IPrivilege IPrivilegeList IProcess IProcessFactory IProcessMessage IProgress IProperty IPropertyChangeEvent IQuery IReference IReferenceCriterion IReferenceEnabledMode IReferenceFactory IReferenceHistoryDescription IReferenceInfo IReferenceRecordCardWizardStep IReferenceRequisiteDescription IReferencesFactory IReferenceValue IRefRequisite IReport IReportFactory IRequisite IRequisiteDescription IRequisiteDescriptionList IRequisiteFactory IRichEdit IRouteStep IRule IRuleList ISchemeBlock IScript IScriptFactory ISearchCriteria ISearchCriterion ISearchDescription ISearchFactory ISearchFolderInfo ISearchForObjectDescription ISearchResultRestrictions ISecuredContext ISelectDialog IServerEvent IServerEventFactory IServiceDialog IServiceFactory ISignature ISignProvider ISignProvider2 ISignProvider3 ISimpleCriterion IStringCriterion IStringList IStringRequisite IStringRequisiteDescription IStringValue ISystemDialogsFactory ISystemInfo ITabSheet ITask ITaskAbortReasonInfo ITaskCardWizardStep ITaskDescription ITaskFactory ITaskInfo ITaskRoute ITextCriterion ITextRequisite ITextValue ITreeListSelectDialog IUser IUserList IValue IView IWebBrowserControl IWizard IWizardAction IWizardFactory IWizardFormElement IWizardParam IWizardPickParam IWizardReferenceParam IWizardStep IWorkAccessRights IWorkDescription IWorkflowAskableParam IWorkflowAskableParams IWorkflowBlock IWorkflowBlockResult IWorkflowEnabledMode IWorkflowParam IWorkflowPickParam IWorkflowReferenceParam IWorkState IWorkTreeCustomNode IWorkTreeJobNode IWorkTreeTaskNode IXMLEditorForm SBCrypto) end end end end end rouge-3.28.0/lib/rouge/lexers/j.rb000066400000000000000000000156441417417255300167170ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class J < RegexLexer title 'J' desc "The J programming language (jsoftware.com)" tag 'j' filenames '*.ijs', '*.ijt' # For J-specific terms we use, see: # https://code.jsoftware.com/wiki/Vocabulary/AET # https://code.jsoftware.com/wiki/Vocabulary/Glossary # https://code.jsoftware.com/wiki/Vocabulary/PartsOfSpeech def self.token_map @token_map ||= { noun: Keyword::Constant, verb: Name::Function, modifier: Operator, name: Name, param: Name::Builtin::Pseudo, other: Punctuation, nil => Error, } end # https://code.jsoftware.com/wiki/NuVoc def self.inflection_list @inflection_list ||= ['', '.', ':', '..', '.:', ':.', '::'] end def self.primitive_table @primitive_table ||= Hash.new([:name]).tap do |h| { '()' => [:other], '=' => [:verb, :other, :other], '<>+-*%$|,#' => [:verb, :verb, :verb], '^' => [:verb, :verb, :modifier], '~"' => [:modifier, :verb, :verb], '.:@' => [:modifier, :modifier, :modifier], ';' => [:verb, :modifier, :verb], '!' => [:verb, :modifier, :modifier], '/\\' => [:modifier, :modifier, :verb], '[' => [:verb, nil, :verb], ']' => [:verb], '{' => [:verb, :verb, :verb, nil, nil, nil, :verb], '}' => [:modifier, :verb, :verb, nil, nil, nil, :modifier], '`' => [:modifier, nil, :modifier], '&' => [:modifier, :modifier, :modifier, nil, :modifier], '?' => [:verb, :verb], 'a' => [:name, :noun, :noun], 'ACeEIjorv' => [:name, :verb], 'bdfHMT' => [:name, :modifier], 'Dt' => [:name, :modifier, :modifier], 'F' => [:name, :modifier, :modifier, :modifier, :modifier, :modifier, :modifier], 'iu' => [:name, :verb, :verb], 'L' => [:name, :verb, :modifier], 'mny' => [:param], 'p' => [:name, :verb, :verb, :verb], 'qsZ' => [:name, nil, :verb], 'S' => [:name, nil, :modifier], 'u' => [:param, :verb, :verb], 'v' => [:param, :verb], 'x' => [:param, nil, :verb], }.each {|k, v| k.each_char {|c| h[c] = v } } end end def self.primitive(char, inflection) i = inflection_list.index(inflection) or return Error token_map[primitive_table[char][i]] end def self.control_words @control_words ||= Set.new %w( assert break case catch catchd catcht continue do else elseif end fcase for if return select throw try while whilst ) end def self.control_words_id @control_words_id ||= Set.new %w(for goto label) end state :expr do rule %r/\s+/, Text rule %r'([!-&(-/:-@\[-^`{-~]|[A-Za-z]\b)([.:]*)' do |m| token J.primitive(m[1], m[2]) end rule %r/(?:\d|_\d?):([.:]*)/ do |m| token m[1].empty? ? J.token_map[:verb] : Error end rule %r/[\d_][\w.]*([.:]*)/ do |m| token m[1].empty? ? Num : Error end rule %r/'/, Str::Single, :str rule %r/NB\.(?![.:]).*/, Comment::Single rule %r/([A-Za-z]\w*)([.:]*)/ do |m| if m[2] == '.' word, sep, id = m[1].partition '_' list = if sep.empty? J.control_words elsif not id.empty? J.control_words_id end if list and list.include? word token Keyword, word + sep token((word == 'for' ? Name : Name::Label), id) token Keyword, m[2] else token Error end else token m[2].empty? ? Name : Error end end end state :str do rule %r/''/, Str::Escape rule %r/[^'\n]+/, Str::Single rule %r/'|$/, Str::Single, :pop! end start do @note_next = false end state :root do rule %r/\n/ do token Text if @note_next push :note @note_next = false end end # https://code.jsoftware.com/wiki/Vocabulary/com # https://code.jsoftware.com/wiki/Vocabulary/NounExplicitDefinition rule %r/ ([0-4]|13|adverb|conjunction|dyad|monad|noun|verb)([\ \t]+) (def(?:ine)?\b|:)(?![.:])([\ \t]*) /x do |m| groups Keyword::Pseudo, Text, Keyword::Pseudo, Text @def_body = (m[1] == '0' || m[1] == 'noun') ? :noun : :code if m[3] == 'define' # stack: [:root] # or [:root, ..., :def_next] pop! if stack.size > 1 push @def_body push :def_next # [:root, ..., @def_body, :def_next] else push :expl_def end end rule %r/^([ \t]*)(Note\b(?![.:]))([ \t\r]*)(?!=[.:]|$)/ do groups Text, Name, Text @note_next = true end rule %r/[mnuvxy]\b(?![.:])/, Name mixin :expr end state :def_next do rule %r/\n/, Text, :pop! mixin :root end state :expl_def do rule %r/0\b(?![.:])/ do token Keyword::Pseudo # stack: [:root, :expl_def] # or [:root, ..., :def_next, :expl_def] pop! if stack.size > 2 goto @def_body push :def_next # [:root, ..., @def_body, :def_next] end rule %r/'/ do if @def_body == :noun token Str::Single goto :str else token Punctuation goto :q_expr end end rule(//) { pop! } end # `q_expr` lexes the content of a string literal which is a part of an # explicit definition. # e.g. dyad def 'x + y' state :q_expr do rule %r/''/, Str::Single, :q_str rule %r/'|$/, Punctuation, :pop! rule %r/NB\.(?![.:])([^'\n]|'')*/, Comment::Single mixin :expr end state :q_str do rule %r/''''/, Str::Escape rule %r/[^'\n]+/, Str::Single rule %r/''/, Str::Single, :pop! rule(/'|$/) { token Punctuation; pop! 2 } end state :note do mixin :delimiter rule %r/.+\n?/, Comment::Multiline end state :noun do mixin :delimiter rule %r/.+\n?/, Str::Heredoc end state :code do mixin :delimiter rule %r/^([ \t]*)(:)([ \t\r]*)$/ do groups Text, Punctuation, Text end mixin :expr end state :delimiter do rule %r/^([ \t]*)(\))([ \t\r]*$\n?)/ do groups Text, Punctuation, Text pop! end end end end end rouge-3.28.0/lib/rouge/lexers/janet.rb000066400000000000000000000207011417417255300175550ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Janet < RegexLexer title "Janet" desc "The Janet programming language (janet-lang.org)" tag 'janet' aliases 'jdn' filenames '*.janet', '*.jdn' mimetypes 'text/x-janet', 'application/x-janet' def self.specials @specials ||= Set.new %w( break def do fn if quote quasiquote splice set unquote var while ) end def self.bundled @bundled ||= Set.new %w( % %= * *= + ++ += - -- -= -> ->> -?> -?>> / /= < <= = > >= abstract? accumulate accumulate2 all all-bindings all-dynamics and apply array array/concat array/ensure array/fill array/insert array/new array/new-filled array/peek array/pop array/push array/remove array/slice array? as-> as?-> asm assert bad-compile bad-parse band blshift bnot boolean? bor brshift brushift buffer buffer/bit buffer/bit-clear buffer/bit-set buffer/bit-toggle buffer/blit buffer/clear buffer/fill buffer/format buffer/new buffer/new-filled buffer/popn buffer/push-byte buffer/push-string buffer/push-word buffer/slice buffer? bxor bytes? case cfunction? chr cli-main comment comp compare compare= compare< compare<= compare> compare>= compile complement comptime cond coro count debug debug/arg-stack debug/break debug/fbreak debug/lineage debug/stack debug/stacktrace debug/step debug/unbreak debug/unfbreak debugger-env dec deep-not= deep= default default-peg-grammar def- defer defmacro defmacro- defn defn- defglobal describe dictionary? disasm distinct doc doc* doc-format dofile drop drop-until drop-while dyn each eachk eachp eachy edefer eflush empty? env-lookup eprin eprinf eprint eprintf error errorf eval eval-string even? every? extreme false? fiber/can-resume? fiber/current fiber/getenv fiber/maxstack fiber/new fiber/root fiber/setenv fiber/setmaxstack fiber/status fiber? file/close file/flush file/open file/popen file/read file/seek file/temp file/write filter find find-index first flatten flatten-into flush for forv freeze frequencies function? gccollect gcinterval gcsetinterval generate gensym get get-in getline hash idempotent? identity import import* if-let if-not if-with in inc indexed? int/s64 int/u64 int? interleave interpose invert janet/build janet/config-bits janet/version juxt juxt* keep keys keyword keyword? kvs label last length let load-image load-image-dict loop macex macex1 make-env make-image make-image-dict map mapcat marshal math/-inf math/abs math/acos math/acosh math/asin math/asinh math/atan math/atan2 math/atanh math/cbrt math/ceil math/cos math/cosh math/e math/erf math/erfc math/exp math/exp2 math/expm1 math/floor math/gamma math/hypot math/inf math/log math/log10 math/log1p math/log2 math/next math/pi math/pow math/random math/rng math/rng-buffer math/rng-int math/rng-uniform math/round math/seedrandom math/sin math/sinh math/sqrt math/tan math/tanh math/trunc match max mean merge merge-into min mod module/add-paths module/cache module/expand-path module/find module/loaders module/loading module/paths nan? nat? native neg? net/chunk net/close net/connect net/read net/server net/write next nil? not not= number? odd? one? or os/arch os/cd os/chmod os/clock os/cryptorand os/cwd os/date os/dir os/environ os/execute os/exit os/getenv os/link os/lstat os/mkdir os/mktime os/perm-int os/perm-string os/readlink os/realpath os/rename os/rm os/rmdir os/setenv os/shell os/sleep os/stat os/symlink os/time os/touch os/umask os/which pairs parse parser/byte parser/clone parser/consume parser/eof parser/error parser/flush parser/has-more parser/insert parser/new parser/produce parser/state parser/status parser/where partial partition peg/compile peg/match pos? postwalk pp prewalk prin prinf print printf product prompt propagate protect put put-in quit range reduce reduce2 repeat repl require resume return reverse reversed root-env run-context scan-number seq setdyn shortfn signal slice slurp some sort sort-by sorted sorted-by spit stderr stdin stdout string string/ascii-lower string/ascii-upper string/bytes string/check-set string/find string/find-all string/format string/from-bytes string/has-prefix? string/has-suffix? string/join string/repeat string/replace string/replace-all string/reverse string/slice string/split string/trim string/triml string/trimr string? struct struct? sum symbol symbol? table table/clone table/getproto table/new table/rawget table/setproto table/to-struct table? take take-until take-while tarray/buffer tarray/copy-bytes tarray/length tarray/new tarray/properties tarray/slice tarray/swap-bytes thread/close thread/current thread/new thread/receive thread/send trace tracev true? truthy? try tuple tuple/brackets tuple/setmap tuple/slice tuple/sourcemap tuple/type tuple? type unless unmarshal untrace update update-in use values var- varfn varglobal walk walk-ind walk-dict when when-let when-with with with-dyns with-syms with-vars yield zero? zipcoll ) end def name_token(name) if self.class.specials.include? name Keyword elsif self.class.bundled.include? name Keyword::Reserved else Name::Function end end punctuation = %r/[_!$%^&*+=~<>.?\/-]/o symbol = %r/([[:alpha:]]|#{punctuation})([[:word:]]|#{punctuation}|:)*/o state :root do rule %r/#.*?$/, Comment::Single rule %r/\s+/m, Text::Whitespace rule %r/(true|false|nil)\b/, Name::Constant rule %r/(['~])(#{symbol})/ do groups Operator, Str::Symbol end rule %r/:([[:word:]]|#{punctuation}|:)*/, Keyword::Constant # radix-specified numbers rule %r/[+-]?\d{1,2}r[\w.]+(&[+-]?\w+)?/, Num::Float # hex numbers rule %r/[+-]?0x\h[\h_]*(\.\h[\h_]*)?/, Num::Hex rule %r/[+-]?0x\.\h[\h_]*/, Num::Hex # decimal numbers (Janet treats all decimals as floats) rule %r/[+-]?\d[\d_]*(\.\d[\d_]*)?([e][+-]?\d+)?/i, Num::Float rule %r/[+-]?\.\d[\d_]*([e][+-]?\d+)?/i, Num::Float rule %r/@?"/, Str::Double, :string rule %r/@?(`+).*?\1/m, Str::Heredoc rule %r/\(/, Punctuation, :function rule %r/(')(@?[(\[{])/ do groups Operator, Punctuation push :quote end rule %r/(~)(@?[(\[{])/ do groups Operator, Punctuation push :quasiquote end rule %r/[\#~,';\|]/, Operator rule %r/@?[(){}\[\]]/, Punctuation rule symbol, Name end state :string do rule %r/"/, Str::Double, :pop! rule %r/\\(u\h{4}|U\h{6})/, Str::Escape rule %r/\\./, Str::Escape rule %r/[^"\\]+/, Str::Double end state :function do rule %r/[\)]/, Punctuation, :pop! rule symbol do |m| case m[0] when "quote" token Keyword goto :quote when "quasiquote" token Keyword goto :quasiquote else token name_token(m[0]) goto :root end end mixin :root end state :quote do rule %r/[(\[{]/, Punctuation, :push rule %r/[)\]}]/, Punctuation, :pop! rule symbol, Str::Escape mixin :root end state :quasiquote do rule %r/(,)(\()/ do groups Operator, Punctuation push :function end rule %r/(\()(\s*)(unquote)(\s+)(\()/ do groups Punctuation, Text, Keyword, Text, Punctuation push :function end rule %r/(,)(#{symbol})/ do groups Operator, Name end rule %r/(\()(\s*)(unquote)(\s+)(#{symbol})/ do groups Punctuation, Text, Keyword, Text, Name end mixin :quote end end end end rouge-3.28.0/lib/rouge/lexers/java.rb000066400000000000000000000057151417417255300174050ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Java < RegexLexer title "Java" desc "The Java programming language (java.com)" tag 'java' filenames '*.java' mimetypes 'text/x-java' keywords = %w( assert break case catch continue default do else finally for if goto instanceof new return switch this throw try while ) declarations = %w( abstract const enum extends final implements native private protected public static strictfp super synchronized throws transient volatile ) types = %w(boolean byte char double float int long short var void) id = /[[:alpha:]_][[:word:]]*/ const_name = /[[:upper:]][[:upper:][:digit:]_]*\b/ class_name = /[[:upper:]][[:alnum:]]*\b/ state :root do rule %r/[^\S\n]+/, Text rule %r(//.*?$), Comment::Single rule %r(/\*.*?\*/)m, Comment::Multiline # keywords: go before method names to avoid lexing "throw new XYZ" # as a method signature rule %r/(?:#{keywords.join('|')})\b/, Keyword rule %r( (\s*(?:[a-zA-Z_][a-zA-Z0-9_.\[\]<>]*\s+)+?) # return arguments ([a-zA-Z_][a-zA-Z0-9_]*) # method name (\s*)(\() # signature start )mx do |m| # TODO: do this better, this shouldn't need a delegation delegate Java, m[1] token Name::Function, m[2] token Text, m[3] token Operator, m[4] end rule %r/@#{id}/, Name::Decorator rule %r/(?:#{declarations.join('|')})\b/, Keyword::Declaration rule %r/(?:#{types.join('|')})\b/, Keyword::Type rule %r/(?:true|false|null)\b/, Keyword::Constant rule %r/(?:class|interface)\b/, Keyword::Declaration, :class rule %r/(?:import|package)\b/, Keyword::Namespace, :import rule %r/"(\\\\|\\"|[^"])*"/, Str rule %r/'(?:\\.|[^\\]|\\u[0-9a-f]{4})'/, Str::Char rule %r/(\.)(#{id})/ do groups Operator, Name::Attribute end rule %r/#{id}:/, Name::Label rule const_name, Name::Constant rule class_name, Name::Class rule %r/\$?#{id}/, Name rule %r/[~^*!%&\[\](){}<>\|+=:;,.\/?-]/, Operator digit = /[0-9]_+[0-9]|[0-9]/ bin_digit = /[01]_+[01]|[01]/ oct_digit = /[0-7]_+[0-7]|[0-7]/ hex_digit = /[0-9a-f]_+[0-9a-f]|[0-9a-f]/i rule %r/#{digit}+\.#{digit}+([eE]#{digit}+)?[fd]?/, Num::Float rule %r/0b#{bin_digit}+/i, Num::Bin rule %r/0x#{hex_digit}+/i, Num::Hex rule %r/0#{oct_digit}+/, Num::Oct rule %r/#{digit}+L?/, Num::Integer rule %r/\n/, Text end state :class do rule %r/\s+/m, Text rule id, Name::Class, :pop! end state :import do rule %r/\s+/m, Text rule %r/[a-z0-9_.]+\*?/i, Name::Namespace, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/javascript.rb000066400000000000000000000167761417417255300206430ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers # IMPORTANT NOTICE: # # Please do not copy this lexer and open a pull request # for a new language. It will not get merged, you will # be unhappy, and kittens will cry. # class Javascript < RegexLexer title "JavaScript" desc "JavaScript, the browser scripting language" tag 'javascript' aliases 'js' filenames '*.cjs', '*.js', '*.mjs' mimetypes 'application/javascript', 'application/x-javascript', 'text/javascript', 'text/x-javascript' # Pseudo-documentation: https://stackoverflow.com/questions/1661197/what-characters-are-valid-for-javascript-variable-names def self.detect?(text) return 1 if text.shebang?('node') return 1 if text.shebang?('jsc') # TODO: rhino, spidermonkey, etc end state :multiline_comment do rule %r([*]/), Comment::Multiline, :pop! rule %r([^*/]+), Comment::Multiline rule %r([*/]), Comment::Multiline end state :comments_and_whitespace do rule %r/\s+/, Text rule %r/|<(script|style).*?\2>|<(?!\?(lasso(script)?|=)))+/im) { delegate parent } end state :nosquarebrackets do rule %r/\[noprocess\]/, Comment::Preproc, :noprocess rule %r/<\?(lasso(script)?|=)/i, Comment::Preproc, :anglebrackets rule(/([^\[<]||<(script|style).*?\2>|<(?!\?(lasso(script)?|=))|\[(?!noprocess))+/im) { delegate parent } end state :noprocess do rule %r(\[/noprocess\]), Comment::Preproc, :pop! rule(%r(([^\[]|\[(?!/noprocess))+)i) { delegate parent } end state :squarebrackets do rule %r/\]/, Comment::Preproc, :pop! mixin :lasso end state :anglebrackets do rule %r/\?>/, Comment::Preproc, :pop! mixin :lasso end state :lassofile do rule %r/\]|\?>/, Comment::Preproc, :pop! mixin :lasso end state :whitespacecomments do rule %r/\s+/, Text rule %r(//.*?\n), Comment::Single rule %r(/\*\*!.*?\*/)m, Comment::Doc rule %r(/\*.*?\*/)m, Comment::Multiline end state :lasso do mixin :whitespacecomments # literals rule %r/\d*\.\d+(e[+-]?\d+)?/i, Num::Float rule %r/0x[\da-f]+/i, Num::Hex rule %r/\d+/, Num::Integer rule %r/(infinity|NaN)\b/i, Num rule %r/'[^'\\]*(\\.[^'\\]*)*'/m, Str::Single rule %r/"[^"\\]*(\\.[^"\\]*)*"/m, Str::Double rule %r/`[^`]*`/m, Str::Backtick # names rule %r/\$#{id}/, Name::Variable rule %r/#(#{id}|\d+\b)/, Name::Variable::Instance rule %r/(\.\s*)('#{id}')/ do groups Name::Builtin::Pseudo, Name::Variable::Class end rule %r/(self)(\s*->\s*)('#{id}')/i do groups Name::Builtin::Pseudo, Operator, Name::Variable::Class end rule %r/(\.\.?\s*)(#{id}(=(?!=))?)/ do groups Name::Builtin::Pseudo, Name::Other end rule %r/(->\\?\s*|&\s*)(#{id}(=(?!=))?)/ do groups Operator, Name::Other end rule %r/(?)(self|inherited|currentcapture|givenblock)\b/i, Name::Builtin::Pseudo rule %r/-(?!infinity)#{id}/i, Name::Attribute rule %r/::\s*#{id}/, Name::Label # definitions rule %r/(define)(\s+)(#{id})(\s*=>\s*)(type|trait|thread)\b/i do groups Keyword::Declaration, Text, Name::Class, Operator, Keyword end rule %r((define)(\s+)(#{id})(\s*->\s*)(#{id}=?|[-+*/%]))i do groups Keyword::Declaration, Text, Name::Class, Operator, Name::Function push :signature end rule %r/(define)(\s+)(#{id})/i do groups Keyword::Declaration, Text, Name::Function push :signature end rule %r((public|protected|private|provide)(\s+)((#{id}=?|[-+*/%])(?=\s*\()))i do groups Keyword, Text, Name::Function push :signature end rule %r/(public|protected|private|provide)(\s+)(#{id})/i do groups Keyword, Text, Name::Function end # keywords rule %r/(true|false|none|minimal|full|all|void)\b/i, Keyword::Constant rule %r/(local|var|variable|global|data(?=\s))\b/i, Keyword::Declaration rule %r/(#{id})(\s+)(in)\b/i do groups Name, Text, Keyword end rule %r/(let|into)(\s+)(#{id})/i do groups Keyword, Text, Name end # other rule %r/,/, Punctuation, :commamember rule %r/(and|or|not)\b/i, Operator::Word rule %r/(#{id})(\s*::\s*#{id})?(\s*=(?!=|>))/ do groups Name, Name::Label, Operator end rule %r((/?)([\w.]+)) do |m| name = m[2].downcase if m[1] != '' token Punctuation, m[1] end if name == 'namespace_using' token Keyword::Namespace, m[2] elsif self.class.keywords[:exceptions].include? name token Name::Exception, m[2] elsif self.class.keywords[:types].include? name token Keyword::Type, m[2] elsif self.class.keywords[:traits].include? name token Name::Decorator, m[2] elsif self.class.keywords[:keywords].include? name token Keyword, m[2] elsif self.class.keywords[:builtins].include? name token Name::Builtin, m[2] else token Name::Other, m[2] end end rule %r/(=)(n?bw|n?ew|n?cn|lte?|gte?|n?eq|n?rx|ft)\b/i do groups Operator, Operator::Word end rule %r(:=|[-+*/%=<>&|!?\\]+), Operator rule %r/[{}():;,@^]/, Punctuation end state :signature do rule %r/\=>/, Operator, :pop! rule %r/\)/, Punctuation, :pop! rule %r/[(,]/, Punctuation, :parameter mixin :lasso end state :parameter do rule %r/\)/, Punctuation, :pop! rule %r/-?#{id}/, Name::Attribute, :pop! rule %r/\.\.\./, Name::Builtin::Pseudo mixin :lasso end state :commamember do rule %r((#{id}=?|[-+*/%])(?=\s*(\(([^()]*\([^()]*\))*[^\)]*\)\s*)?(::[\w.\s]+)?=>)), Name::Function, :signature mixin :whitespacecomments rule %r//, Text, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/lasso/000077500000000000000000000000001417417255300172505ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/lexers/lasso/keywords.rb000066400000000000000000001454601417417255300214560ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # DO NOT EDIT # This file is automatically generated by `rake builtins:lasso`. # See tasks/builtins/lasso.rake for more info. module Rouge module Lexers def Lasso.keywords @keywords ||= {}.tap do |h| h[:types] = Set.new ["array", "date", "decimal", "duration", "integer", "map", "pair", "string", "tag", "xml", "null", "boolean", "bytes", "keyword", "list", "locale", "queue", "set", "stack", "staticarray", "atbegin", "bson_iter", "bson", "bytes_document_body", "cache_server_element", "cache_server", "capture", "client_address", "client_ip", "component_container", "component_render_state", "component", "curl", "curltoken", "currency", "custom", "data_document", "database_registry", "dateandtime", "dbgp_packet", "dbgp_server", "debugging_stack", "delve", "dir", "dirdesc", "dns_response", "document_base", "document_body", "document_header", "dsinfo", "eacher", "email_compose", "email_parse", "email_pop", "email_queue_impl_base", "email_queue_impl", "email_smtp", "email_stage_impl_base", "email_stage_impl", "fastcgi_each_fcgi_param", "fastcgi_server", "fcgi_record", "fcgi_request", "file", "filedesc", "filemaker_datasource", "generateforeachkeyed", "generateforeachunkeyed", "generateseries", "hash_map", "html_atomic_element", "html_attr", "html_base", "html_binary", "html_br", "html_cdata", "html_container_element", "html_div", "html_document_body", "html_document_head", "html_eol", "html_fieldset", "html_form", "html_h1", "html_h2", "html_h3", "html_h4", "html_h5", "html_h6", "html_hr", "html_img", "html_input", "html_json", "html_label", "html_legend", "html_link", "html_meta", "html_object", "html_option", "html_raw", "html_script", "html_select", "html_span", "html_style", "html_table", "html_td", "html_text", "html_th", "html_tr", "http_document_header", "http_document", "http_error", "http_header_field", "http_server_connection_handler_globals", "http_server_connection_handler", "http_server_request_logger_thread", "http_server_web_connection", "http_server", "image", "include_cache", "inline_type", "java_jnienv", "jbyte", "jbytearray", "jchar", "jchararray", "jfieldid", "jfloat", "jint", "jmethodid", "jobject", "jshort", "json_decode", "json_encode", "json_literal", "json_object", "lassoapp_compiledsrc_appsource", "lassoapp_compiledsrc_fileresource", "lassoapp_content_rep_halt", "lassoapp_dirsrc_appsource", "lassoapp_dirsrc_fileresource", "lassoapp_installer", "lassoapp_livesrc_appsource", "lassoapp_livesrc_fileresource", "lassoapp_long_expiring_bytes", "lassoapp_manualsrc_appsource", "lassoapp_zip_file_server", "lassoapp_zipsrc_appsource", "lassoapp_zipsrc_fileresource", "ldap", "library_thread_loader", "list_node", "log_impl_base", "log_impl", "magick_image", "map_node", "memberstream", "memory_session_driver_impl_entry", "memory_session_driver_impl", "memory_session_driver", "mime_reader", "mongo_client", "mongo_collection", "mongo_cursor", "mustache_ctx", "mysql_session_driver_impl", "mysql_session_driver", "net_named_pipe", "net_tcp_ssl", "net_tcp", "net_udp_packet", "net_udp", "odbc_session_driver_impl", "odbc_session_driver", "opaque", "os_process", "pair_compare", "pairup", "pdf_barcode", "pdf_chunk", "pdf_color", "pdf_doc", "pdf_font", "pdf_hyphenator", "pdf_image", "pdf_list", "pdf_paragraph", "pdf_phrase", "pdf_read", "pdf_table", "pdf_text", "pdf_typebase", "percent", "portal_impl", "queriable_groupby", "queriable_grouping", "queriable_groupjoin", "queriable_join", "queriable_orderby", "queriable_orderbydescending", "queriable_select", "queriable_selectmany", "queriable_skip", "queriable_take", "queriable_thenby", "queriable_thenbydescending", "queriable_where", "raw_document_body", "regexp", "repeat", "scientific", "security_registry", "serialization_element", "serialization_object_identity_compare", "serialization_reader", "serialization_writer_ref", "serialization_writer_standin", "serialization_writer", "session_delete_expired_thread", "signature", "sourcefile", "sqlite_column", "sqlite_currentrow", "sqlite_db", "sqlite_results", "sqlite_session_driver_impl_entry", "sqlite_session_driver_impl", "sqlite_session_driver", "sqlite_table", "sqlite3_stmt", "sqlite3", "sys_process", "text_document", "tie", "timeonly", "tree_base", "tree_node", "tree_nullnode", "ucal", "usgcpu", "usgvm", "web_error_atend", "web_node_base", "web_node_content_representation_css_specialized", "web_node_content_representation_html_specialized", "web_node_content_representation_js_specialized", "web_node_content_representation_xhr_container", "web_node_echo", "web_node_root", "web_request_impl", "web_request", "web_response_impl", "web_response", "web_router", "websocket_handler", "worker_pool", "xml_attr", "xml_cdatasection", "xml_characterdata", "xml_comment", "xml_document", "xml_documentfragment", "xml_documenttype", "xml_domimplementation", "xml_element", "xml_entity", "xml_entityreference", "xml_namednodemap_attr", "xml_namednodemap_ht", "xml_namednodemap", "xml_node", "xml_nodelist", "xml_notation", "xml_processinginstruction", "xml_text", "xmlstream", "zip_file_impl", "zip_file", "zip_impl", "zip"] h[:traits] = Set.new ["any", "formattingbase", "html_attributed", "html_element_coreattrs", "html_element_eventsattrs", "html_element_i18nattrs", "lassoapp_capabilities", "lassoapp_resource", "lassoapp_source", "queriable_asstring", "session_driver", "trait_array", "trait_asstring", "trait_backcontractible", "trait_backended", "trait_backexpandable", "trait_close", "trait_contractible", "trait_decompose_assignment", "trait_doubleended", "trait_each_sub", "trait_encodeurl", "trait_endedfullymutable", "trait_expandable", "trait_file", "trait_finite", "trait_finiteforeach", "trait_foreach", "trait_foreachtextelement", "trait_frontcontractible", "trait_frontended", "trait_frontexpandable", "trait_fullymutable", "trait_generator", "trait_generatorcentric", "trait_hashable", "trait_json_serialize", "trait_keyed", "trait_keyedfinite", "trait_keyedforeach", "trait_keyedmutable", "trait_list", "trait_map", "trait_net", "trait_pathcomponents", "trait_positionallykeyed", "trait_positionallysearchable", "trait_queriable", "trait_queriablelambda", "trait_readbytes", "trait_readstring", "trait_scalar", "trait_searchable", "trait_serializable", "trait_setencoding", "trait_setoperations", "trait_stack", "trait_treenode", "trait_writebytes", "trait_writestring", "trait_xml_elementcompat", "trait_xml_nodecompat", "web_connection", "web_node_container", "web_node_content_css_specialized", "web_node_content_document", "web_node_content_html_specialized", "web_node_content_js_specialized", "web_node_content_json_specialized", "web_node_content_representation", "web_node_content", "web_node_postable", "web_node"] h[:builtins] = Set.new ["__char", "__sync_timestamp__", "_admin_addgroup", "_admin_adduser", "_admin_defaultconnector", "_admin_defaultconnectornames", "_admin_defaultdatabase", "_admin_defaultfield", "_admin_defaultgroup", "_admin_defaulthost", "_admin_defaulttable", "_admin_defaultuser", "_admin_deleteconnector", "_admin_deletedatabase", "_admin_deletefield", "_admin_deletegroup", "_admin_deletehost", "_admin_deletetable", "_admin_deleteuser", "_admin_duplicategroup", "_admin_internaldatabase", "_admin_listconnectors", "_admin_listdatabases", "_admin_listfields", "_admin_listgroups", "_admin_listhosts", "_admin_listtables", "_admin_listusers", "_admin_refreshconnector", "_admin_refreshsecurity", "_admin_servicepath", "_admin_updateconnector", "_admin_updatedatabase", "_admin_updatefield", "_admin_updategroup", "_admin_updatehost", "_admin_updatetable", "_admin_updateuser", "_chartfx_activation_string", "_chartfx_getchallengestring", "_chop_args", "_chop_mimes", "_client_addr_old", "_client_address_old", "_client_ip_old", "_database_names", "_datasource_reload", "_date_current", "_date_format", "_date_msec", "_date_parse", "_execution_timelimit", "_file_chmod", "_initialize", "_jdbc_acceptsurl", "_jdbc_debug", "_jdbc_deletehost", "_jdbc_driverclasses", "_jdbc_driverinfo", "_jdbc_metainfo", "_jdbc_propertyinfo", "_jdbc_setdriver", "_lasso_param", "_log_helper", "_proc_noparam", "_proc_withparam", "_recursion_limit", "_request_param", "_security_binaryexpiration", "_security_flushcaches", "_security_isserialized", "_security_serialexpiration", "_srand", "_strict_literals", "_substring", "_xmlrpc_exconverter", "_xmlrpc_inconverter", "_xmlrpc_xmlinconverter", "action_addinfo", "action_addrecord", "action_setfoundcount", "action_setrecordid", "action_settotalcount", "admin_allowedfileroots", "admin_changeuser", "admin_createuser", "admin_groupassignuser", "admin_grouplistusers", "admin_groupremoveuser", "admin_listgroups", "admin_refreshlicensing", "admin_refreshsecurity", "admin_reloaddatasource", "admin_userlistgroups", "array_iterator", "auth_auth", "auth", "base64", "bean", "bigint", "cache_delete", "cache_empty", "cache_exists", "cache_fetch", "cache_internal", "cache_maintenance", "cache_object", "cache_preferences", "cache_store", "chartfx_records", "chartfx_serve", "chartfx", "choice_list", "choice_listitem", "choicelistitem", "click_text", "client_ipfrominteger", "compare_beginswith", "compare_contains", "compare_endswith", "compare_equalto", "compare_greaterthan", "compare_greaterthanorequals", "compare_greaterthanorequls", "compare_lessthan", "compare_lessthanorequals", "compare_notbeginswith", "compare_notcontains", "compare_notendswith", "compare_notequalto", "compare_notregexp", "compare_regexp", "compare_strictequalto", "compare_strictnotequalto", "compiler_removecacheddoc", "compiler_setdefaultparserflags", "curl_ftp_getfile", "curl_ftp_getlisting", "curl_ftp_putfile", "curl_include_url", "database_changecolumn", "database_changefield", "database_createcolumn", "database_createfield", "database_createtable", "database_fmcontainer", "database_hostinfo", "database_inline", "database_nameitem", "database_realname", "database_removecolumn", "database_removefield", "database_removetable", "database_repeating_valueitem", "database_repeating", "database_repeatingvalueitem", "database_schemanameitem", "database_tablecolumn", "database_tablenameitem", "datasource_name", "datasource_register", "date__date_current", "date__date_format", "date__date_msec", "date__date_parse", "date_add", "date_date", "date_difference", "date_duration", "date_format", "date_getcurrentdate", "date_getday", "date_getdayofweek", "date_gethour", "date_getlocaltimezone", "date_getminute", "date_getmonth", "date_getsecond", "date_gettime", "date_getyear", "date_gmttolocal", "date_localtogmt", "date_maximum", "date_minimum", "date_msec", "date_setformat", "date_subtract", "db_layoutnameitem", "db_layoutnames", "db_nameitem", "db_names", "db_tablenameitem", "db_tablenames", "dbi_column_names", "dbi_field_names", "decimal_setglobaldefaultprecision", "decode_base64", "decode_bheader", "decode_hex", "decode_html", "decode_json", "decode_qheader", "decode_quotedprintable", "decode_quotedprintablebytes", "decode_url", "decode_xml", "decrypt_blowfish2", "default", "define_constant", "define_prototype", "define_tagp", "define_typep", "deserialize", "directory_directorynameitem", "directory_lister", "directory_nameitem", "directorynameitem", "email_mxerror", "encode_base64", "encode_bheader", "encode_break", "encode_breaks", "encode_crc32", "encode_hex", "encode_html", "encode_htmltoxml", "encode_json", "encode_quotedprintable", "encode_quotedprintablebytes", "encode_smart", "encode_sql", "encode_sql92", "encode_stricturl", "encode_url", "encode_xml", "encrypt_blowfish2", "error_currenterror", "error_norecordsfound", "error_seterrorcode", "error_seterrormessage", "euro", "event_schedule", "file_autoresolvefullpaths", "file_chmod", "file_control", "file_copy", "file_create", "file_creationdate", "file_currenterror", "file_delete", "file_exists", "file_getlinecount", "file_getsize", "file_isdirectory", "file_listdirectory", "file_moddate", "file_move", "file_openread", "file_openreadwrite", "file_openwrite", "file_openwriteappend", "file_openwritetruncate", "file_probeeol", "file_processuploads", "file_read", "file_readline", "file_rename", "file_serve", "file_setsize", "file_stream", "file_streamcopy", "file_uploads", "file_waitread", "file_waittimeout", "file_waitwrite", "file_write", "find_soap_ops", "form_param", "global_defined", "global_remove", "global_reset", "globals", "http_getfile", "ical_alarm", "ical_attribute", "ical_calendar", "ical_daylight", "ical_event", "ical_freebusy", "ical_item", "ical_journal", "ical_parse", "ical_standard", "ical_timezone", "ical_todo", "image_url", "img", "include_cgi", "iterator", "java_bean", "java", "json_records", "lasso_comment", "lasso_datasourceis", "lasso_datasourceis4d", "lasso_datasourceisfilemaker", "lasso_datasourceisfilemaker7", "lasso_datasourceisfilemaker9", "lasso_datasourceisfilemakersa", "lasso_datasourceisjdbc", "lasso_datasourceislassomysql", "lasso_datasourceismysql", "lasso_datasourceisodbc", "lasso_datasourceisopenbase", "lasso_datasourceisoracle", "lasso_datasourceispostgresql", "lasso_datasourceisspotlight", "lasso_datasourceissqlite", "lasso_datasourceissqlserver", "lasso_datasourcemodulename", "lasso_datatype", "lasso_disableondemand", "lasso_parser", "lasso_process", "lasso_sessionid", "lasso_siteid", "lasso_siteisrunning", "lasso_sitename", "lasso_siterestart", "lasso_sitestart", "lasso_sitestop", "lasso_tagmodulename", "lasso_updatecheck", "lasso_uptime", "lassoapp_create", "lassoapp_dump", "lassoapp_flattendir", "lassoapp_getappdata", "lassoapp_list", "lassoapp_process", "lassoapp_unitize", "ldml_ldml", "ldml", "link_currentactionparams", "link_currentactionurl", "link_currentgroupparams", "link_currentgroupurl", "link_currentrecordparams", "link_currentrecordurl", "link_currentsearch", "link_currentsearchparams", "link_currentsearchurl", "link_detailparams", "link_detailurl", "link_firstgroupparams", "link_firstgroupurl", "link_firstrecordparams", "link_firstrecordurl", "link_lastgroupparams", "link_lastgroupurl", "link_lastrecordparams", "link_lastrecordurl", "link_nextgroupparams", "link_nextgroupurl", "link_nextrecordparams", "link_nextrecordurl", "link_params", "link_prevgroupparams", "link_prevgroupurl", "link_prevrecordparams", "link_prevrecordurl", "link_setformat", "link_url", "list_additem", "list_fromlist", "list_fromstring", "list_getitem", "list_itemcount", "list_iterator", "list_removeitem", "list_replaceitem", "list_reverseiterator", "list_tostring", "literal", "ljax_end", "ljax_hastarget", "ljax_include", "ljax_start", "local_defined", "local_remove", "local_reset", "locals", "logicalop_value", "logicaloperator_value", "map_iterator", "match_comparator", "match_notrange", "match_notregexp", "match_range", "match_regexp", "math_abs", "math_acos", "math_add", "math_asin", "math_atan", "math_atan2", "math_ceil", "math_converteuro", "math_cos", "math_div", "math_exp", "math_floor", "math_internal_rand", "math_internal_randmax", "math_internal_srand", "math_ln", "math_log", "math_log10", "math_max", "math_min", "math_mod", "math_mult", "math_pow", "math_random", "math_range", "math_rint", "math_roman", "math_round", "math_sin", "math_sqrt", "math_sub", "math_tan", "mime_type", "misc__srand", "misc_randomnumber", "misc_roman", "misc_valid_creditcard", "named_param", "namespace_current", "namespace_delimiter", "namespace_exists", "namespace_file_fullpathexists", "namespace_load", "namespace_page", "namespace_unload", "net", "no_default_output", "object", "once", "oneoff", "op_logicalvalue", "operator_logicalvalue", "option", "postcondition", "precondition", "prettyprintingnsmap", "prettyprintingtypemap", "priorityqueue", "proc_convert", "proc_convertbody", "proc_convertone", "proc_extract", "proc_extractone", "proc_find", "proc_first", "proc_foreach", "proc_get", "proc_join", "proc_lasso", "proc_last", "proc_map_entry", "proc_null", "proc_regexp", "proc_xml", "proc_xslt", "rand", "randomnumber", "raw", "recid_value", "record_count", "recordcount", "recordid_value", "reference", "repeating_valueitem", "repeatingvalueitem", "repetition", "req_column", "req_field", "required_column", "required_field", "response_fileexists", "reverseiterator", "roman", "row_count", "search_columnitem", "search_fielditem", "search_operatoritem", "search_opitem", "search_valueitem", "searchfielditem", "searchoperatoritem", "searchopitem", "searchvalueitem", "serialize", "server_date", "server_day", "server_siteisrunning", "server_sitestart", "server_sitestop", "server_time", "session_addoutputfilter", "session_addvariable", "session_removevariable", "session_setdriver", "set_iterator", "set_reverseiterator", "site_atbegin", "site_restart", "soap_convertpartstopairs", "soap_info", "soap_stub", "sort_columnitem", "sort_fielditem", "sort_orderitem", "sortcolumnitem", "sortfielditem", "sortorderitem", "srand", "stock_quote", "string_charfromname", "string_concatenate", "string_countfields", "string_endswith", "string_extract", "string_findposition", "string_findregexp", "string_fordigit", "string_getfield", "string_getunicodeversion", "string_insert", "string_isalpha", "string_isalphanumeric", "string_isdigit", "string_ishexdigit", "string_islower", "string_isnumeric", "string_ispunctuation", "string_isspace", "string_isupper", "string_length", "string_lowercase", "string_remove", "string_removeleading", "string_removetrailing", "string_replace", "string_replaceregexp", "string_todecimal", "string_tointeger", "string_uppercase", "table_realname", "tags_find", "tags_list", "tags", "tcp_close", "tcp_open", "tcp_send", "tcp_tcp_close", "tcp_tcp_open", "tcp_tcp_send", "thread_abort", "thread_event", "thread_exists", "thread_getcurrentid", "thread_getpriority", "thread_info", "thread_list", "thread_lock", "thread_pipe", "thread_priority_default", "thread_priority_high", "thread_priority_low", "thread_rwlock", "thread_semaphore", "thread_setpriority", "total_records", "treemap_iterator", "url_rewrite", "valid_creditcard", "valid_date", "valid_email", "valid_url", "var_defined", "var_remove", "var_reset", "var_set", "variable_defined", "variable_set", "variables", "variant_count", "vars", "wsdl_extract", "wsdl_getbinding", "wsdl_getbindingforoperation", "wsdl_getbindingoperations", "wsdl_getmessagenamed", "wsdl_getmessageparts", "wsdl_getmessagetriofromporttype", "wsdl_getopbodystyle", "wsdl_getopbodyuse", "wsdl_getoperation", "wsdl_getoplocation", "wsdl_getopmessagetypes", "wsdl_getopsoapaction", "wsdl_getportaddress", "wsdl_getportsforservice", "wsdl_getporttype", "wsdl_getporttypeoperation", "wsdl_getservicedocumentation", "wsdl_getservices", "wsdl_gettargetnamespace", "wsdl_issoapoperation", "wsdl_listoperations", "wsdl_maketest", "xml_extract", "xml_rpc", "xml_rpccall", "xml_rw", "xml_serve", "xml_xml", "xml_xmlstream", "xsd_attribute", "xsd_blankarraybase", "xsd_blankbase", "xsd_buildtype", "xsd_cache", "xsd_checkcardinality", "xsd_continueall", "xsd_continueannotation", "xsd_continueany", "xsd_continueanyattribute", "xsd_continueattribute", "xsd_continueattributegroup", "xsd_continuechoice", "xsd_continuecomplexcontent", "xsd_continuecomplextype", "xsd_continuedocumentation", "xsd_continueextension", "xsd_continuegroup", "xsd_continuekey", "xsd_continuelist", "xsd_continuerestriction", "xsd_continuesequence", "xsd_continuesimplecontent", "xsd_continuesimpletype", "xsd_continueunion", "xsd_deserialize", "xsd_fullyqualifyname", "xsd_generate", "xsd_generateblankfromtype", "xsd_generateblanksimpletype", "xsd_generatetype", "xsd_getschematype", "xsd_issimpletype", "xsd_loadschema", "xsd_lookupnamespaceuri", "xsd_lookuptype", "xsd_processany", "xsd_processattribute", "xsd_processattributegroup", "xsd_processcomplextype", "xsd_processelement", "xsd_processgroup", "xsd_processimport", "xsd_processinclude", "xsd_processschema", "xsd_processsimpletype", "xsd_ref", "xsd_type", "_ffi", "abort_clear", "abort_now", "action_param", "action_params", "action_statement", "admin_authorization", "admin_currentgroups", "admin_currentuserid", "admin_currentusername", "admin_getpref", "admin_initialize", "admin_lassoservicepath", "admin_removepref", "admin_setpref", "admin_userexists", "auth_admin", "auth_check", "auth_custom", "auth_group", "auth_prompt", "auth_user", "bom_utf16be", "bom_utf16le", "bom_utf32be", "bom_utf32le", "bom_utf8", "capture_nearestloopabort", "capture_nearestloopcontinue", "capture_nearestloopcount", "checked", "cipher_decrypt_private", "cipher_decrypt_public", "cipher_decrypt", "cipher_digest", "cipher_encrypt_private", "cipher_encrypt_public", "cipher_encrypt", "cipher_generate_key", "cipher_hmac", "cipher_keylength", "cipher_list", "cipher_open", "cipher_seal", "cipher_sign", "cipher_verify", "client_addr", "client_authorization", "client_browser", "client_contentlength", "client_contenttype", "client_cookielist", "client_cookies", "client_encoding", "client_formmethod", "client_getargs", "client_getparam", "client_getparams", "client_headers", "client_integertoip", "client_iptointeger", "client_password", "client_postargs", "client_postparam", "client_postparams", "client_type", "client_url", "client_username", "column_name", "column_names", "column_type", "column", "compress", "content_addheader", "content_body", "content_encoding", "content_header", "content_replaceheader", "content_type", "cookie_set", "cookie", "curl_easy_cleanup", "curl_easy_duphandle", "curl_easy_getinfo", "curl_easy_init", "curl_easy_reset", "curl_easy_setopt", "curl_easy_strerror", "curl_getdate", "curl_http_version_1_0", "curl_http_version_1_1", "curl_http_version_none", "curl_ipresolve_v4", "curl_ipresolve_v6", "curl_ipresolve_whatever", "curl_multi_perform", "curl_multi_result", "curl_netrc_ignored", "curl_netrc_optional", "curl_netrc_required", "curl_sslversion_default", "curl_sslversion_sslv2", "curl_sslversion_sslv3", "curl_sslversion_tlsv1", "curl_version_asynchdns", "curl_version_debug", "curl_version_gssnegotiate", "curl_version_idn", "curl_version_info", "curl_version_ipv6", "curl_version_kerberos4", "curl_version_largefile", "curl_version_libz", "curl_version_ntlm", "curl_version_spnego", "curl_version_ssl", "curl_version", "curlauth_any", "curlauth_anysafe", "curlauth_basic", "curlauth_digest", "curlauth_gssnegotiate", "curlauth_none", "curlauth_ntlm", "curle_aborted_by_callback", "curle_bad_calling_order", "curle_bad_content_encoding", "curle_bad_download_resume", "curle_bad_function_argument", "curle_bad_password_entered", "curle_couldnt_connect", "curle_couldnt_resolve_host", "curle_couldnt_resolve_proxy", "curle_failed_init", "curle_file_couldnt_read_file", "curle_filesize_exceeded", "curle_ftp_access_denied", "curle_ftp_cant_get_host", "curle_ftp_cant_reconnect", "curle_ftp_couldnt_get_size", "curle_ftp_couldnt_retr_file", "curle_ftp_couldnt_set_ascii", "curle_ftp_couldnt_set_binary", "curle_ftp_couldnt_use_rest", "curle_ftp_port_failed", "curle_ftp_quote_error", "curle_ftp_ssl_failed", "curle_ftp_user_password_incorrect", "curle_ftp_weird_227_format", "curle_ftp_weird_pass_reply", "curle_ftp_weird_pasv_reply", "curle_ftp_weird_server_reply", "curle_ftp_weird_user_reply", "curle_ftp_write_error", "curle_function_not_found", "curle_got_nothing", "curle_http_post_error", "curle_http_range_error", "curle_http_returned_error", "curle_interface_failed", "curle_ldap_cannot_bind", "curle_ldap_invalid_url", "curle_ldap_search_failed", "curle_library_not_found", "curle_login_denied", "curle_malformat_user", "curle_obsolete", "curle_ok", "curle_operation_timeouted", "curle_out_of_memory", "curle_partial_file", "curle_read_error", "curle_recv_error", "curle_send_error", "curle_send_fail_rewind", "curle_share_in_use", "curle_ssl_cacert", "curle_ssl_certproblem", "curle_ssl_cipher", "curle_ssl_connect_error", "curle_ssl_engine_initfailed", "curle_ssl_engine_notfound", "curle_ssl_engine_setfailed", "curle_ssl_peer_certificate", "curle_telnet_option_syntax", "curle_too_many_redirects", "curle_unknown_telnet_option", "curle_unsupported_protocol", "curle_url_malformat_user", "curle_url_malformat", "curle_write_error", "curlftpauth_default", "curlftpauth_ssl", "curlftpauth_tls", "curlftpssl_all", "curlftpssl_control", "curlftpssl_last", "curlftpssl_none", "curlftpssl_try", "curlinfo_connect_time", "curlinfo_content_length_download", "curlinfo_content_length_upload", "curlinfo_content_type", "curlinfo_effective_url", "curlinfo_filetime", "curlinfo_header_size", "curlinfo_http_connectcode", "curlinfo_httpauth_avail", "curlinfo_namelookup_time", "curlinfo_num_connects", "curlinfo_os_errno", "curlinfo_pretransfer_time", "curlinfo_proxyauth_avail", "curlinfo_redirect_count", "curlinfo_redirect_time", "curlinfo_request_size", "curlinfo_response_code", "curlinfo_size_download", "curlinfo_size_upload", "curlinfo_speed_download", "curlinfo_speed_upload", "curlinfo_ssl_engines", "curlinfo_ssl_verifyresult", "curlinfo_starttransfer_time", "curlinfo_total_time", "curlmsg_done", "curlopt_autoreferer", "curlopt_buffersize", "curlopt_cainfo", "curlopt_capath", "curlopt_connecttimeout", "curlopt_cookie", "curlopt_cookiefile", "curlopt_cookiejar", "curlopt_cookiesession", "curlopt_crlf", "curlopt_customrequest", "curlopt_dns_use_global_cache", "curlopt_egdsocket", "curlopt_encoding", "curlopt_failonerror", "curlopt_filetime", "curlopt_followlocation", "curlopt_forbid_reuse", "curlopt_fresh_connect", "curlopt_ftp_account", "curlopt_ftp_create_missing_dirs", "curlopt_ftp_response_timeout", "curlopt_ftp_ssl", "curlopt_ftp_use_eprt", "curlopt_ftp_use_epsv", "curlopt_ftpappend", "curlopt_ftplistonly", "curlopt_ftpport", "curlopt_ftpsslauth", "curlopt_header", "curlopt_http_version", "curlopt_http200aliases", "curlopt_httpauth", "curlopt_httpget", "curlopt_httpheader", "curlopt_httppost", "curlopt_httpproxytunnel", "curlopt_infilesize_large", "curlopt_infilesize", "curlopt_interface", "curlopt_ipresolve", "curlopt_krb4level", "curlopt_low_speed_limit", "curlopt_low_speed_time", "curlopt_mail_from", "curlopt_mail_rcpt", "curlopt_maxconnects", "curlopt_maxfilesize_large", "curlopt_maxfilesize", "curlopt_maxredirs", "curlopt_netrc_file", "curlopt_netrc", "curlopt_nobody", "curlopt_noprogress", "curlopt_port", "curlopt_post", "curlopt_postfields", "curlopt_postfieldsize_large", "curlopt_postfieldsize", "curlopt_postquote", "curlopt_prequote", "curlopt_proxy", "curlopt_proxyauth", "curlopt_proxyport", "curlopt_proxytype", "curlopt_proxyuserpwd", "curlopt_put", "curlopt_quote", "curlopt_random_file", "curlopt_range", "curlopt_readdata", "curlopt_referer", "curlopt_resume_from_large", "curlopt_resume_from", "curlopt_ssl_cipher_list", "curlopt_ssl_verifyhost", "curlopt_ssl_verifypeer", "curlopt_sslcert", "curlopt_sslcerttype", "curlopt_sslengine_default", "curlopt_sslengine", "curlopt_sslkey", "curlopt_sslkeypasswd", "curlopt_sslkeytype", "curlopt_sslversion", "curlopt_tcp_nodelay", "curlopt_timecondition", "curlopt_timeout", "curlopt_timevalue", "curlopt_transfertext", "curlopt_unrestricted_auth", "curlopt_upload", "curlopt_url", "curlopt_use_ssl", "curlopt_useragent", "curlopt_userpwd", "curlopt_verbose", "curlopt_writedata", "curlproxy_http", "curlproxy_socks4", "curlproxy_socks5", "database_adddefaultsqlitehost", "database_database", "database_initialize", "database_name", "database_qs", "database_table_database_tables", "database_table_datasource_databases", "database_table_datasource_hosts", "database_table_datasources", "database_table_table_fields", "database_util_cleanpath", "dbgp_stop_stack_name", "debugging_break", "debugging_breakpoint_get", "debugging_breakpoint_list", "debugging_breakpoint_remove", "debugging_breakpoint_set", "debugging_breakpoint_update", "debugging_context_locals", "debugging_context_self", "debugging_context_vars", "debugging_detach", "debugging_enabled", "debugging_get_context", "debugging_get_stack", "debugging_run", "debugging_step_in", "debugging_step_out", "debugging_step_over", "debugging_stop", "debugging_terminate", "decimal_random", "decompress", "decrypt_blowfish", "define_atbegin", "define_atend", "dns_default", "dns_lookup", "document", "email_attachment_mime_type", "email_digestchallenge", "email_digestresponse", "email_extract", "email_findemails", "email_fix_address_list", "email_fix_address", "email_fs_error_clean", "email_immediate", "email_initialize", "email_merge", "email_mxlookup", "email_pop_priv_extract", "email_pop_priv_quote", "email_pop_priv_substring", "email_queue", "email_result", "email_safeemail", "email_send", "email_status", "email_token", "email_translatebreakstocrlf", "encode_qheader", "encoding_iso88591", "encoding_utf8", "encrypt_blowfish", "encrypt_crammd5", "encrypt_hmac", "encrypt_md5", "eol", "error_code", "error_msg", "error_obj", "error_pop", "error_push", "error_reset", "error_stack", "escape_tag", "evdns_resolve_ipv4", "evdns_resolve_ipv6", "evdns_resolve_reverse_ipv6", "evdns_resolve_reverse", "fail_now", "failure_clear", "fastcgi_createfcgirequest", "fastcgi_handlecon", "fastcgi_handlereq", "fastcgi_initialize", "fastcgi_initiate_request", "fcgi_abort_request", "fcgi_authorize", "fcgi_begin_request", "fcgi_bodychunksize", "fcgi_cant_mpx_conn", "fcgi_data", "fcgi_end_request", "fcgi_filter", "fcgi_get_values_result", "fcgi_get_values", "fcgi_keep_conn", "fcgi_makeendrequestbody", "fcgi_makestdoutbody", "fcgi_max_conns", "fcgi_max_reqs", "fcgi_mpxs_conns", "fcgi_null_request_id", "fcgi_overloaded", "fcgi_params", "fcgi_read_timeout_seconds", "fcgi_readparam", "fcgi_request_complete", "fcgi_responder", "fcgi_stderr", "fcgi_stdin", "fcgi_stdout", "fcgi_unknown_role", "fcgi_unknown_type", "fcgi_version_1", "fcgi_x_stdin", "field_name", "field_names", "field", "file_copybuffersize", "file_defaultencoding", "file_forceroot", "file_modechar", "file_modeline", "file_stderr", "file_stdin", "file_stdout", "file_tempfile", "filemakerds_initialize", "filemakerds", "found_count", "ftp_deletefile", "ftp_getdata", "ftp_getfile", "ftp_getlisting", "ftp_putdata", "ftp_putfile", "generateforeach", "hash_primes", "http_char_colon", "http_char_cr", "http_char_htab", "http_char_lf", "http_char_question", "http_char_space", "http_default_files", "http_read_headers", "http_read_timeout_secs", "http_server_apps_path", "http_server_request_logger", "include_cache_compare", "include_currentpath", "include_filepath", "include_localpath", "include_once", "include_path", "include_raw", "include_url", "include", "includes", "inline_colinfo_name_pos", "inline_colinfo_type_pos", "inline_colinfo_valuelist_pos", "inline_columninfo_pos", "inline_foundcount_pos", "inline_namedget", "inline_namedput", "inline_resultrows_pos", "inline_scopeget", "inline_scopepop", "inline_scopepush", "integer_bitor", "integer_random", "io_dir_dt_blk", "io_dir_dt_chr", "io_dir_dt_dir", "io_dir_dt_fifo", "io_dir_dt_lnk", "io_dir_dt_reg", "io_dir_dt_sock", "io_dir_dt_unknown", "io_dir_dt_wht", "io_file_access", "io_file_chdir", "io_file_chmod", "io_file_chown", "io_file_dirname", "io_file_f_dupfd", "io_file_f_getfd", "io_file_f_getfl", "io_file_f_getlk", "io_file_f_rdlck", "io_file_f_setfd", "io_file_f_setfl", "io_file_f_setlk", "io_file_f_setlkw", "io_file_f_test", "io_file_f_tlock", "io_file_f_ulock", "io_file_f_unlck", "io_file_f_wrlck", "io_file_fd_cloexec", "io_file_fioasync", "io_file_fioclex", "io_file_fiodtype", "io_file_fiogetown", "io_file_fionbio", "io_file_fionclex", "io_file_fionread", "io_file_fiosetown", "io_file_getcwd", "io_file_lchown", "io_file_link", "io_file_lockf", "io_file_lstat_atime", "io_file_lstat_mode", "io_file_lstat_mtime", "io_file_lstat_size", "io_file_mkdir", "io_file_mkfifo", "io_file_mkstemp", "io_file_o_append", "io_file_o_async", "io_file_o_creat", "io_file_o_excl", "io_file_o_exlock", "io_file_o_fsync", "io_file_o_nofollow", "io_file_o_nonblock", "io_file_o_rdonly", "io_file_o_rdwr", "io_file_o_shlock", "io_file_o_sync", "io_file_o_trunc", "io_file_o_wronly", "io_file_pipe", "io_file_readlink", "io_file_realpath", "io_file_remove", "io_file_rename", "io_file_rmdir", "io_file_s_ifblk", "io_file_s_ifchr", "io_file_s_ifdir", "io_file_s_ififo", "io_file_s_iflnk", "io_file_s_ifmt", "io_file_s_ifreg", "io_file_s_ifsock", "io_file_s_irgrp", "io_file_s_iroth", "io_file_s_irusr", "io_file_s_irwxg", "io_file_s_irwxo", "io_file_s_irwxu", "io_file_s_isgid", "io_file_s_isuid", "io_file_s_isvtx", "io_file_s_iwgrp", "io_file_s_iwoth", "io_file_s_iwusr", "io_file_s_ixgrp", "io_file_s_ixoth", "io_file_s_ixusr", "io_file_seek_cur", "io_file_seek_end", "io_file_seek_set", "io_file_stat_atime", "io_file_stat_mode", "io_file_stat_mtime", "io_file_stat_size", "io_file_stderr", "io_file_stdin", "io_file_stdout", "io_file_symlink", "io_file_tempnam", "io_file_truncate", "io_file_umask", "io_file_unlink", "io_net_accept", "io_net_af_inet", "io_net_af_inet6", "io_net_af_unix", "io_net_bind", "io_net_connect", "io_net_getpeername", "io_net_getsockname", "io_net_ipproto_ip", "io_net_ipproto_udp", "io_net_listen", "io_net_msg_oob", "io_net_msg_peek", "io_net_msg_waitall", "io_net_recv", "io_net_recvfrom", "io_net_send", "io_net_sendto", "io_net_shut_rd", "io_net_shut_rdwr", "io_net_shut_wr", "io_net_shutdown", "io_net_so_acceptconn", "io_net_so_broadcast", "io_net_so_debug", "io_net_so_dontroute", "io_net_so_error", "io_net_so_keepalive", "io_net_so_linger", "io_net_so_oobinline", "io_net_so_rcvbuf", "io_net_so_rcvlowat", "io_net_so_rcvtimeo", "io_net_so_reuseaddr", "io_net_so_sndbuf", "io_net_so_sndlowat", "io_net_so_sndtimeo", "io_net_so_timestamp", "io_net_so_type", "io_net_so_useloopback", "io_net_sock_dgram", "io_net_sock_raw", "io_net_sock_rdm", "io_net_sock_seqpacket", "io_net_sock_stream", "io_net_socket", "io_net_sol_socket", "io_net_ssl_accept", "io_net_ssl_begin", "io_net_ssl_connect", "io_net_ssl_end", "io_net_ssl_error", "io_net_ssl_errorstring", "io_net_ssl_funcerrorstring", "io_net_ssl_liberrorstring", "io_net_ssl_read", "io_net_ssl_reasonerrorstring", "io_net_ssl_setacceptstate", "io_net_ssl_setconnectstate", "io_net_ssl_setverifylocations", "io_net_ssl_shutdown", "io_net_ssl_usecertificatechainfile", "io_net_ssl_useprivatekeyfile", "io_net_ssl_write", "java_jvm_create", "java_jvm_getenv", "jdbc_initialize", "json_back_slash", "json_back_space", "json_close_array", "json_close_object", "json_colon", "json_comma", "json_consume_array", "json_consume_object", "json_consume_string", "json_consume_token", "json_cr", "json_debug", "json_deserialize", "json_e_lower", "json_e_upper", "json_f_lower", "json_form_feed", "json_forward_slash", "json_lf", "json_n_lower", "json_negative", "json_open_array", "json_open_object", "json_period", "json_positive", "json_quote_double", "json_rpccall", "json_serialize", "json_t_lower", "json_tab", "json_white_space", "keycolumn_name", "keycolumn_value", "keyfield_name", "keyfield_value", "lasso_currentaction", "lasso_errorreporting", "lasso_executiontimelimit", "lasso_methodexists", "lasso_tagexists", "lasso_uniqueid", "lasso_version", "lassoapp_current_app", "lassoapp_current_include", "lassoapp_do_with_include", "lassoapp_exists", "lassoapp_find_missing_file", "lassoapp_format_mod_date", "lassoapp_get_capabilities_name", "lassoapp_include_current", "lassoapp_include", "lassoapp_initialize_db", "lassoapp_initialize", "lassoapp_invoke_resource", "lassoapp_issourcefileextension", "lassoapp_link", "lassoapp_load_module", "lassoapp_mime_get", "lassoapp_mime_type_appcache", "lassoapp_mime_type_css", "lassoapp_mime_type_csv", "lassoapp_mime_type_doc", "lassoapp_mime_type_docx", "lassoapp_mime_type_eof", "lassoapp_mime_type_eot", "lassoapp_mime_type_gif", "lassoapp_mime_type_html", "lassoapp_mime_type_ico", "lassoapp_mime_type_jpg", "lassoapp_mime_type_js", "lassoapp_mime_type_lasso", "lassoapp_mime_type_map", "lassoapp_mime_type_pdf", "lassoapp_mime_type_png", "lassoapp_mime_type_ppt", "lassoapp_mime_type_rss", "lassoapp_mime_type_svg", "lassoapp_mime_type_swf", "lassoapp_mime_type_tif", "lassoapp_mime_type_ttf", "lassoapp_mime_type_txt", "lassoapp_mime_type_woff", "lassoapp_mime_type_xaml", "lassoapp_mime_type_xap", "lassoapp_mime_type_xbap", "lassoapp_mime_type_xhr", "lassoapp_mime_type_xml", "lassoapp_mime_type_zip", "lassoapp_path_to_method_name", "lassoapp_settingsdb", "layout_name", "lcapi_datasourceadd", "lcapi_datasourcecloseconnection", "lcapi_datasourcedelete", "lcapi_datasourceduplicate", "lcapi_datasourceexecsql", "lcapi_datasourcefindall", "lcapi_datasourceimage", "lcapi_datasourceinfo", "lcapi_datasourceinit", "lcapi_datasourcematchesname", "lcapi_datasourcenames", "lcapi_datasourcenothing", "lcapi_datasourceopand", "lcapi_datasourceopany", "lcapi_datasourceopbw", "lcapi_datasourceopct", "lcapi_datasourceopeq", "lcapi_datasourceopew", "lcapi_datasourceopft", "lcapi_datasourceopgt", "lcapi_datasourceopgteq", "lcapi_datasourceopin", "lcapi_datasourceoplt", "lcapi_datasourceoplteq", "lcapi_datasourceopnbw", "lcapi_datasourceopnct", "lcapi_datasourceopneq", "lcapi_datasourceopnew", "lcapi_datasourceopnin", "lcapi_datasourceopno", "lcapi_datasourceopnot", "lcapi_datasourceopnrx", "lcapi_datasourceopor", "lcapi_datasourceoprx", "lcapi_datasourcepreparesql", "lcapi_datasourceprotectionnone", "lcapi_datasourceprotectionreadonly", "lcapi_datasourcerandom", "lcapi_datasourceschemanames", "lcapi_datasourcescripts", "lcapi_datasourcesearch", "lcapi_datasourcesortascending", "lcapi_datasourcesortcustom", "lcapi_datasourcesortdescending", "lcapi_datasourcetablenames", "lcapi_datasourceterm", "lcapi_datasourcetickle", "lcapi_datasourcetypeblob", "lcapi_datasourcetypeboolean", "lcapi_datasourcetypedate", "lcapi_datasourcetypedecimal", "lcapi_datasourcetypeinteger", "lcapi_datasourcetypestring", "lcapi_datasourceunpreparesql", "lcapi_datasourceupdate", "lcapi_fourchartointeger", "lcapi_listdatasources", "lcapi_loadmodule", "lcapi_loadmodules", "lcapi_updatedatasourceslist", "ldap_scope_base", "ldap_scope_children", "ldap_scope_onelevel", "ldap_scope_subtree", "library_once", "library", "ljapi_initialize", "locale_availablelocales", "locale_canada", "locale_canadafrench", "locale_china", "locale_chinese", "locale_default", "locale_english", "locale_format_style_date_time", "locale_format_style_default", "locale_format_style_full", "locale_format_style_long", "locale_format_style_medium", "locale_format_style_none", "locale_format_style_short", "locale_format", "locale_france", "locale_french", "locale_german", "locale_germany", "locale_isocountries", "locale_isolanguages", "locale_italian", "locale_italy", "locale_japan", "locale_japanese", "locale_korea", "locale_korean", "locale_prc", "locale_setdefault", "locale_simplifiedchinese", "locale_taiwan", "locale_traditionalchinese", "locale_uk", "locale_us", "log_always", "log_critical", "log_deprecated", "log_destination_console", "log_destination_database", "log_destination_file", "log_detail", "log_initialize", "log_level_critical", "log_level_deprecated", "log_level_detail", "log_level_sql", "log_level_warning", "log_max_file_size", "log_setdestination", "log_sql", "log_trim_file_size", "log_warning", "loop_key_pop", "loop_key_push", "loop_key", "loop_pop", "loop_push", "loop_value_pop", "loop_value_push", "loop_value", "main_thread_only", "maxrecords_value", "median", "method_name", "micros", "millis", "mongo_insert_continue_on_error", "mongo_insert_no_validate", "mongo_insert_none", "mongo_query_await_data", "mongo_query_exhaust", "mongo_query_no_cursor_timeout", "mongo_query_none", "mongo_query_oplog_replay", "mongo_query_partial", "mongo_query_slave_ok", "mongo_query_tailable_cursor", "mongo_remove_none", "mongo_remove_single_remove", "mongo_update_multi_update", "mongo_update_no_validate", "mongo_update_none", "mongo_update_upsert", "mustache_compile_file", "mustache_compile_string", "mustache_include", "mysqlds", "namespace_global", "namespace_import", "net_connectinprogress", "net_connectok", "net_typessl", "net_typessltcp", "net_typessludp", "net_typetcp", "net_typeudp", "net_waitread", "net_waittimeout", "net_waitwrite", "nslookup", "odbc_session_driver_mssql", "odbc", "output", "pdf_package", "pdf_rectangle", "pdf_serve", "pi", "postgresql", "process", "protect_now", "queriable_average", "queriable_defaultcompare", "queriable_do", "queriable_internal_combinebindings", "queriable_max", "queriable_min", "queriable_qsort", "queriable_reversecompare", "queriable_sum", "random_seed", "range", "records_array", "records_map", "redirect_url", "referer_url", "referrer_url", "register_thread", "register", "response_filepath", "response_localpath", "response_path", "response_realm", "response_root", "resultset_count", "resultsets", "rows_array", "rows_impl", "schema_name", "security_database", "security_default_realm", "security_initialize", "security_table_groups", "security_table_ug_map", "security_table_users", "selected", "series", "server_admin", "server_ip", "server_name", "server_port", "server_protocol", "server_push", "server_signature", "server_software", "session_abort", "session_addvar", "session_decorate", "session_deleteexpired", "session_end", "session_getdefaultdriver", "session_id", "session_initialize", "session_removevar", "session_result", "session_setdefaultdriver", "session_start", "shown_count", "shown_first", "shown_last", "site_id", "site_name", "skiprecords_value", "sleep", "sqlite_abort", "sqlite_auth", "sqlite_blob", "sqlite_busy", "sqlite_cantopen", "sqlite_constraint", "sqlite_corrupt", "sqlite_createdb", "sqlite_done", "sqlite_empty", "sqlite_error", "sqlite_float", "sqlite_format", "sqlite_full", "sqlite_integer", "sqlite_internal", "sqlite_interrupt", "sqlite_ioerr", "sqlite_locked", "sqlite_mismatch", "sqlite_misuse", "sqlite_nolfs", "sqlite_nomem", "sqlite_notadb", "sqlite_notfound", "sqlite_null", "sqlite_ok", "sqlite_perm", "sqlite_protocol", "sqlite_range", "sqlite_readonly", "sqlite_row", "sqlite_schema", "sqlite_setsleepmillis", "sqlite_setsleeptries", "sqlite_text", "sqlite_toobig", "sqliteconnector", "staticarray_join", "stdout", "stdoutnl", "string_validcharset", "suspend", "sys_appspath", "sys_chroot", "sys_clock", "sys_clockspersec", "sys_credits", "sys_daemon", "sys_databasespath", "sys_detach_exec", "sys_difftime", "sys_dll_ext", "sys_drand48", "sys_environ", "sys_eol", "sys_erand48", "sys_errno", "sys_exec_pid_to_os_pid", "sys_exec", "sys_exit", "sys_fork", "sys_garbagecollect", "sys_getbytessincegc", "sys_getchar", "sys_getegid", "sys_getenv", "sys_geteuid", "sys_getgid", "sys_getgrnam", "sys_getheapfreebytes", "sys_getheapsize", "sys_getlogin", "sys_getpid", "sys_getppid", "sys_getpwnam", "sys_getpwuid", "sys_getstartclock", "sys_getthreadcount", "sys_getuid", "sys_growheapby", "sys_homepath", "sys_is_full_path", "sys_is_windows", "sys_isfullpath", "sys_iswindows", "sys_iterate", "sys_jrand48", "sys_kill_exec", "sys_kill", "sys_lcong48", "sys_librariespath", "sys_library", "sys_listtraits", "sys_listtypes", "sys_listunboundmethods", "sys_load_dynamic_library", "sys_loadlibrary", "sys_lrand48", "sys_masterhomepath", "sys_mrand48", "sys_nrand48", "sys_pid_exec", "sys_pointersize", "sys_rand", "sys_random", "sys_seed48", "sys_setenv", "sys_setgid", "sys_setsid", "sys_setuid", "sys_sigabrt", "sys_sigalrm", "sys_sigbus", "sys_sigchld", "sys_sigcont", "sys_sigfpe", "sys_sighup", "sys_sigill", "sys_sigint", "sys_sigkill", "sys_sigpipe", "sys_sigprof", "sys_sigquit", "sys_sigsegv", "sys_sigstop", "sys_sigsys", "sys_sigterm", "sys_sigtrap", "sys_sigtstp", "sys_sigttin", "sys_sigttou", "sys_sigurg", "sys_sigusr1", "sys_sigusr2", "sys_sigvtalrm", "sys_sigxcpu", "sys_sigxfsz", "sys_srand", "sys_srand48", "sys_srandom", "sys_strerror", "sys_supportpath", "sys_test_exec", "sys_time", "sys_uname", "sys_unsetenv", "sys_usercapimodulepath", "sys_userstartuppath", "sys_version", "sys_wait_exec", "sys_waitpid", "sys_wcontinued", "sys_while", "sys_wnohang", "sys_wuntraced", "table_name", "tag_exists", "thread_var_get", "thread_var_pop", "thread_var_push", "threadvar_find", "threadvar_get", "threadvar_set_asrt", "threadvar_set", "timer", "token_value", "treemap", "u_lb_alphabetic", "u_lb_ambiguous", "u_lb_break_after", "u_lb_break_before", "u_lb_break_both", "u_lb_break_symbols", "u_lb_carriage_return", "u_lb_close_punctuation", "u_lb_combining_mark", "u_lb_complex_context", "u_lb_contingent_break", "u_lb_exclamation", "u_lb_glue", "u_lb_h2", "u_lb_h3", "u_lb_hyphen", "u_lb_ideographic", "u_lb_infix_numeric", "u_lb_inseparable", "u_lb_jl", "u_lb_jt", "u_lb_jv", "u_lb_line_feed", "u_lb_mandatory_break", "u_lb_next_line", "u_lb_nonstarter", "u_lb_numeric", "u_lb_open_punctuation", "u_lb_postfix_numeric", "u_lb_prefix_numeric", "u_lb_quotation", "u_lb_space", "u_lb_surrogate", "u_lb_unknown", "u_lb_word_joiner", "u_lb_zwspace", "u_nt_decimal", "u_nt_digit", "u_nt_none", "u_nt_numeric", "u_sb_aterm", "u_sb_close", "u_sb_format", "u_sb_lower", "u_sb_numeric", "u_sb_oletter", "u_sb_other", "u_sb_sep", "u_sb_sp", "u_sb_sterm", "u_sb_upper", "u_wb_aletter", "u_wb_extendnumlet", "u_wb_format", "u_wb_katakana", "u_wb_midletter", "u_wb_midnum", "u_wb_numeric", "u_wb_other", "ucal_ampm", "ucal_dayofmonth", "ucal_dayofweek", "ucal_dayofweekinmonth", "ucal_dayofyear", "ucal_daysinfirstweek", "ucal_dowlocal", "ucal_dstoffset", "ucal_era", "ucal_extendedyear", "ucal_firstdayofweek", "ucal_hour", "ucal_hourofday", "ucal_julianday", "ucal_lenient", "ucal_listtimezones", "ucal_millisecond", "ucal_millisecondsinday", "ucal_minute", "ucal_month", "ucal_second", "ucal_weekofmonth", "ucal_weekofyear", "ucal_year", "ucal_yearwoy", "ucal_zoneoffset", "uchar_age", "uchar_alphabetic", "uchar_ascii_hex_digit", "uchar_bidi_class", "uchar_bidi_control", "uchar_bidi_mirrored", "uchar_bidi_mirroring_glyph", "uchar_bidi_paired_bracket", "uchar_block", "uchar_canonical_combining_class", "uchar_case_folding", "uchar_case_sensitive", "uchar_dash", "uchar_decomposition_type", "uchar_default_ignorable_code_point", "uchar_deprecated", "uchar_diacritic", "uchar_east_asian_width", "uchar_extender", "uchar_full_composition_exclusion", "uchar_general_category_mask", "uchar_general_category", "uchar_grapheme_base", "uchar_grapheme_cluster_break", "uchar_grapheme_extend", "uchar_grapheme_link", "uchar_hangul_syllable_type", "uchar_hex_digit", "uchar_hyphen", "uchar_id_continue", "uchar_ideographic", "uchar_ids_binary_operator", "uchar_ids_trinary_operator", "uchar_iso_comment", "uchar_join_control", "uchar_joining_group", "uchar_joining_type", "uchar_lead_canonical_combining_class", "uchar_line_break", "uchar_logical_order_exception", "uchar_lowercase_mapping", "uchar_lowercase", "uchar_math", "uchar_name", "uchar_nfc_inert", "uchar_nfc_quick_check", "uchar_nfd_inert", "uchar_nfd_quick_check", "uchar_nfkc_inert", "uchar_nfkc_quick_check", "uchar_nfkd_inert", "uchar_nfkd_quick_check", "uchar_noncharacter_code_point", "uchar_numeric_type", "uchar_numeric_value", "uchar_pattern_syntax", "uchar_pattern_white_space", "uchar_posix_alnum", "uchar_posix_blank", "uchar_posix_graph", "uchar_posix_print", "uchar_posix_xdigit", "uchar_quotation_mark", "uchar_radical", "uchar_s_term", "uchar_script", "uchar_segment_starter", "uchar_sentence_break", "uchar_simple_case_folding", "uchar_simple_lowercase_mapping", "uchar_simple_titlecase_mapping", "uchar_simple_uppercase_mapping", "uchar_soft_dotted", "uchar_terminal_punctuation", "uchar_titlecase_mapping", "uchar_trail_canonical_combining_class", "uchar_unicode_1_name", "uchar_unified_ideograph", "uchar_uppercase_mapping", "uchar_uppercase", "uchar_variation_selector", "uchar_white_space", "uchar_word_break", "uchar_xid_continue", "uncompress", "usage", "uuid_compare", "uuid_copy", "uuid_generate_random", "uuid_generate_time", "uuid_generate", "uuid_is_null", "uuid_parse", "uuid_unparse_lower", "uuid_unparse_upper", "uuid_unparse", "value_listitem", "valuelistitem", "var_keys", "var_values", "wap_isenabled", "wap_maxbuttons", "wap_maxcolumns", "wap_maxhorzpixels", "wap_maxrows", "wap_maxvertpixels", "web_handlefcgirequest", "web_node_content_representation_css", "web_node_content_representation_html", "web_node_content_representation_js", "web_node_content_representation_xhr", "web_node_forpath", "web_nodes_initialize", "web_nodes_normalizeextension", "web_nodes_processcontentnode", "web_nodes_requesthandler", "web_response_nodesentry", "web_router_database", "web_router_initialize", "websocket_handler_timeout", "wexitstatus", "wifcontinued", "wifexited", "wifsignaled", "wifstopped", "wstopsig", "wtermsig", "xml_transform", "zip_add_dir", "zip_add", "zip_checkcons", "zip_close", "zip_cm_bzip2", "zip_cm_default", "zip_cm_deflate", "zip_cm_deflate64", "zip_cm_implode", "zip_cm_pkware_implode", "zip_cm_reduce_1", "zip_cm_reduce_2", "zip_cm_reduce_3", "zip_cm_reduce_4", "zip_cm_shrink", "zip_cm_store", "zip_create", "zip_delete", "zip_em_3des_112", "zip_em_3des_168", "zip_em_aes_128", "zip_em_aes_192", "zip_em_aes_256", "zip_em_des", "zip_em_none", "zip_em_rc2_old", "zip_em_rc2", "zip_em_rc4", "zip_em_trad_pkware", "zip_em_unknown", "zip_er_changed", "zip_er_close", "zip_er_compnotsupp", "zip_er_crc", "zip_er_deleted", "zip_er_eof", "zip_er_exists", "zip_er_incons", "zip_er_internal", "zip_er_inval", "zip_er_memory", "zip_er_multidisk", "zip_er_noent", "zip_er_nozip", "zip_er_ok", "zip_er_open", "zip_er_read", "zip_er_remove", "zip_er_rename", "zip_er_seek", "zip_er_tmpopen", "zip_er_write", "zip_er_zipclosed", "zip_er_zlib", "zip_error_get_sys_type", "zip_error_get", "zip_error_to_str", "zip_et_none", "zip_et_sys", "zip_et_zlib", "zip_excl", "zip_fclose", "zip_file_error_get", "zip_file_strerror", "zip_fl_compressed", "zip_fl_nocase", "zip_fl_nodir", "zip_fl_unchanged", "zip_fopen_index", "zip_fopen", "zip_fread", "zip_get_archive_comment", "zip_get_file_comment", "zip_get_name", "zip_get_num_files", "zip_name_locate", "zip_open", "zip_rename", "zip_replace", "zip_set_archive_comment", "zip_set_file_comment", "zip_stat_index", "zip_stat", "zip_strerror", "zip_unchange_all", "zip_unchange_archive", "zip_unchange", "zlib_version"] h[:keywords] = Set.new ["cache", "database_names", "database_schemanames", "database_tablenames", "define_tag", "define_type", "email_batch", "encode_set", "html_comment", "handle", "handle_error", "header", "if", "inline", "iterate", "ljax_target", "link", "link_currentaction", "link_currentgroup", "link_currentrecord", "link_detail", "link_firstgroup", "link_firstrecord", "link_lastgroup", "link_lastrecord", "link_nextgroup", "link_nextrecord", "link_prevgroup", "link_prevrecord", "log", "loop", "namespace_using", "output_none", "portal", "private", "protect", "records", "referer", "referrer", "repeating", "resultset", "rows", "search_args", "search_arguments", "select", "sort_args", "sort_arguments", "thread_atomic", "value_list", "while", "abort", "case", "else", "fail_if", "fail_ifnot", "fail", "if_empty", "if_false", "if_null", "if_true", "loop_abort", "loop_continue", "loop_count", "params", "params_up", "return", "return_value", "run_children", "soap_definetag", "soap_lastrequest", "soap_lastresponse", "tag_name", "ascending", "average", "by", "define", "descending", "do", "equals", "frozen", "group", "handle_failure", "import", "in", "into", "join", "let", "match", "max", "min", "on", "order", "parent", "protected", "provide", "public", "require", "returnhome", "skip", "split_thread", "sum", "take", "thread", "to", "trait", "type", "where", "with", "yield", "yieldhome"] h[:exceptions] = Set.new ["error_adderror", "error_columnrestriction", "error_databaseconnectionunavailable", "error_databasetimeout", "error_deleteerror", "error_fieldrestriction", "error_filenotfound", "error_invaliddatabase", "error_invalidpassword", "error_invalidusername", "error_modulenotfound", "error_noerror", "error_nopermission", "error_outofmemory", "error_reqcolumnmissing", "error_reqfieldmissing", "error_requiredcolumnmissing", "error_requiredfieldmissing", "error_updateerror"] end end end endrouge-3.28.0/lib/rouge/lexers/liquid.rb000066400000000000000000000157731417417255300177600ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Liquid < RegexLexer title "Liquid" desc 'Liquid is a templating engine for Ruby (liquidmarkup.org)' tag 'liquid' filenames '*.liquid' state :root do rule %r/[^\{]+/, Text rule %r/(\{%-?)(\s*)/ do groups Punctuation, Text::Whitespace push :tag_or_block end rule %r/(\{\{-?)(\s*)/ do groups Punctuation, Text::Whitespace push :output end rule %r/\{/, Text end state :tag_or_block do # builtin logic blocks rule %r/(if|elsif|unless|case)\b/, Keyword::Reserved, :condition rule %r/(when)\b/, Keyword::Reserved, :when rule %r/(else)(\s*)(-?%\})/ do groups Keyword::Reserved, Text::Whitespace, Punctuation pop! end # other builtin blocks rule %r/(capture|(?:in|de)crement)(\s+)([^\s%]+)(\s*)(-?%\})/ do groups Name::Tag, Text::Whitespace, Name::Variable, Text::Whitespace, Punctuation pop! end rule %r/(comment)(\s*)(-?%\})/ do groups Name::Tag, Text::Whitespace, Punctuation push :comment end rule %r/(raw)(\s*)(-?%\})/ do groups Name::Tag, Text::Whitespace, Punctuation push :raw end # end of block rule %r/(end(?:if|unless|case))(\s*)(-?%\})/ do groups Keyword::Reserved, Text::Whitespace, Punctuation pop! end rule %r/(end(?:[^\s%]+))(\s*)(-?%\})/ do groups Name::Tag, Text::Whitespace, Punctuation pop! end # builtin tags rule %r/(assign|echo)\b/, Name::Tag, :assign rule %r/(include|render)\b/, Name::Tag, :include rule %r/(cycle)(\s+)(?:([^\s:]*)(\s*)(:))?(\s*)/ do |m| token_class = case m[3] when %r/'[^']*'/ then Str::Single when %r/"[^"]*"/ then Str::Double else Name::Attribute end groups Name::Tag, Text::Whitespace, token_class, Text::Whitespace, Punctuation, Text::Whitespace push :variable_tag_markup end # iteration rule %r/ (for|tablerow)(\s+) ([\w-]+)(\s+) (in)(\s+) ( (?: [^\s%,\|'"] | (?:"[^"]*"|'[^']*') )+ )(\s*) /x do |m| groups Name::Tag, Text::Whitespace, Name::Variable, Text::Whitespace, Name::Tag, Text::Whitespace token_class = case m[7] when %r/'[^']*'/ then Str::Single when %r/"[^"]*"/ then Str::Double else Name::Variable end token token_class, m[7] token Text::Whitespace, m[8] push :tag_markup end # other tags or blocks rule %r/([^\s%]+)(\s*)/ do groups Name::Tag, Text::Whitespace push :tag_markup end end state :output do rule %r/(\|)(\s*)([a-zA-Z_][^\s}\|:]*)/ do groups Punctuation, Text::Whitespace, Name::Function push :filters end mixin :end_of_tag mixin :generic end state :filters do rule %r/(\|)(\s*)([a-zA-Z_][^\s%}\|:]*)/ do groups Punctuation, Text::Whitespace, Name::Function end mixin :end_of_tag mixin :end_of_block mixin :variable_param_markup end state :condition do rule %r/([=!]=|[<>]=?)/, Operator rule %r/(and|or|contains)\b/, Operator::Word mixin :end_of_block mixin :generic end state :when do mixin :end_of_block mixin :generic end state :end_of_tag do rule(/-?\}\}/) { token Punctuation; reset_stack } end state :end_of_block do rule(/-?%\}/) { token Punctuation; reset_stack } end # states for unknown markup state :param_markup do mixin :whitespace mixin :keyword mixin :string mixin :number rule %r/([^\s=:]+)(\s*)(=|:)/ do groups Name::Attribute, Text::Whitespace, Operator end rule %r/[,:]/, Punctuation end state :default_param_markup do mixin :param_markup rule %r/\S+/, Text end state :variable_param_markup do mixin :param_markup mixin :variable rule %r/\S+/, Text end state :tag_markup do rule %r/(reversed)\b/, Name::Attribute mixin :end_of_block mixin :default_param_markup end state :variable_tag_markup do mixin :end_of_block mixin :variable_param_markup end # states for different values types state :keyword do rule %r/(false|true|nil)\b/, Keyword::Constant end state :variable do rule %r/(empty|blank|forloop\.[^\s%}\|:]+)\b/, Name::Builtin rule %r/\.(?=\w)|\[|\]/, Punctuation rule %r/(first|last|size)\b/, Name::Function rule %r/[a-zA-Z_][\w-]*\??/, Name::Variable end state :string do rule %r/'[^']*'/, Str::Single rule %r/"[^"]*"/, Str::Double end state :number do rule %r/-/, Operator rule %r/\d+\.\d+/, Num::Float rule %r/\d+/, Num::Integer end state :generic do mixin :whitespace mixin :keyword mixin :string mixin :number mixin :variable end state :whitespace do rule %r/[ \t]+/, Text::Whitespace end state :comment do rule %r/[^\{]+/, Comment rule %r/(\{%-?)(\s*)(endcomment)(\s*)(-?%\})/ do groups Punctuation, Text::Whitespace, Name::Tag, Text::Whitespace, Punctuation reset_stack end rule %r/\{/, Comment end state :raw do rule %r/[^\{]+/, Text rule %r/(\{%-?)(\s*)(endraw)(\s*)(-?%\})/ do groups Punctuation, Text::Whitespace, Name::Tag, Text::Whitespace, Punctuation reset_stack end rule %r/\{/, Text end state :assign do rule %r/=/, Operator rule %r/(\|)(\s*)([a-zA-Z_][^\s%\|:]*)/ do groups Punctuation, Text::Whitespace, Name::Function push :filters end mixin :end_of_block mixin :generic end state :include do rule %r/(\{\{-?)(\s*)/ do groups Punctuation, Text::Whitespace push :output_embed end rule %r/(with|for)\b/, Name::Tag rule %r/[\/\w-]+(\.[\w-]+)+\b/, Text mixin :variable_tag_markup end state :output_embed do rule %r/(\|)(\s*)([a-zA-Z_][^\s}\|:]*)/ do groups Punctuation, Text::Whitespace, Name::Function end rule %r/-?\}\}/, Punctuation, :pop! mixin :variable_param_markup end end end end rouge-3.28.0/lib/rouge/lexers/literate_coffeescript.rb000066400000000000000000000012671417417255300230270ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class LiterateCoffeescript < RegexLexer tag 'literate_coffeescript' title "Literate CoffeeScript" desc 'Literate coffeescript' aliases 'litcoffee' filenames '*.litcoffee' def markdown @markdown ||= Markdown.new(options) end def coffee @coffee ||= Coffeescript.new(options) end start { markdown.reset!; coffee.reset! } state :root do rule %r/^( .*?\n)+/m do delegate coffee end rule %r/^([ ]{0,3}(\S.*?|)\n)*/m do delegate markdown end end end end end rouge-3.28.0/lib/rouge/lexers/literate_haskell.rb000066400000000000000000000014671417417255300220000ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class LiterateHaskell < RegexLexer title "Literate Haskell" desc 'Literate haskell' tag 'literate_haskell' aliases 'lithaskell', 'lhaskell', 'lhs' filenames '*.lhs' mimetypes 'text/x-literate-haskell' def haskell @haskell ||= Haskell.new(options) end start { haskell.reset! } # TODO: support TeX versions as well. state :root do rule %r/\s*?\n(?=>)/, Text, :code rule %r/.*?\n/, Text rule %r/.+\z/, Text end state :code do rule %r/(>)( .*?(\n|\z))/ do |m| token Name::Label, m[1] delegate haskell, m[2] end rule %r/\s*\n(?=\s*[^>])/, Text, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/livescript.rb000066400000000000000000000176661417417255300206600ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Livescript < RegexLexer tag 'livescript' aliases 'ls' filenames '*.ls' mimetypes 'text/livescript' title 'LiveScript' desc 'LiveScript, a language which compiles to JavaScript (livescript.net)' def self.detect?(text) return text.shebang? 'lsc' end def self.declarations @declarations ||= Set.new %w(const let var function class extends implements) end def self.keywords @keywords ||= Set.new %w( loop until for in of while break return continue switch case fallthrough default otherwise when then if unless else throw try catch finally new delete typeof instanceof super by from to til with require do debugger import export yield ) end def self.constants @constants ||= Javascript.constants + %w(yes no on off void) end def self.builtins @builtins ||= Javascript.builtins + %w(this it that arguments) end def self.loop_control_keywords @loop_control_keywords ||= Set.new %w(break continue) end id = /[$a-z_]((-(?=[a-z]))?[a-z0-9_])*/i int_number = /\d[\d_]*/ int = /#{int_number}(e[+-]?#{int_number})?[$\w]*/ # the last class matches units state :root do rule(%r(^(?=\s|/))) { push :slash_starts_regex } mixin :comments mixin :whitespace # list of words rule %r/(<\[)(.*?)(\]>)/m do groups Punctuation, Str, Punctuation end # function declarations rule %r/!\s*function\b/, Keyword::Declaration rule %r/!?[-~]>|<[-~]!?/, Keyword::Declaration # switch arrow rule %r/(=>)/, Keyword # prototype attributes rule %r/(::)(#{id})/ do groups Punctuation, Name::Attribute push :id end rule %r/(::)(#{int})/ do groups Punctuation, Num::Integer push :id end # instance attributes rule %r/(@)(#{id})/ do groups Name::Variable::Instance, Name::Attribute push :id end rule %r/([.])(#{id})/ do groups Punctuation, Name::Attribute push :id end rule %r/([.])(\d+)/ do groups Punctuation, Num::Integer push :id end rule %r/#{id}(?=\s*:[^:=])/, Name::Attribute # operators rule %r( [+][+]|--|&&|\b(and|x?or|is(nt)?|not)\b(?!-[a-zA-Z]|_)|[|][|]| [.]([|&^]|<<|>>>?)[.]|\\(?=\n)|[.:]=|<<<| (<<|>>|==?|!=?|[-<>+*%^/~?])=? )x, Operator, :slash_starts_regex # arguments shorthand rule %r/(&)(#{id})?/ do groups Name::Builtin, Name::Attribute end # switch case rule %r/[|]|\bcase(?=\s)/, Keyword, :switch_underscore rule %r/@/, Name::Variable::Instance rule %r/[.]{3}/, Punctuation rule %r/:/, Punctuation # keywords rule %r/#{id}/ do |m| if self.class.loop_control_keywords.include? m[0] token Keyword push :loop_control next elsif self.class.keywords.include? m[0] token Keyword elsif self.class.constants.include? m[0] token Name::Constant elsif self.class.builtins.include? m[0] token Name::Builtin elsif self.class.declarations.include? m[0] token Keyword::Declaration elsif /^[A-Z]/.match(m[0]) && /[^-][a-z]/.match(m[0]) token Name::Class else token Name::Variable end push :id end # punctuation and brackets rule %r/\](?=[!?.]|#{id})/, Punctuation, :id rule %r/[{(\[;,]/, Punctuation, :slash_starts_regex rule %r/[})\].]/, Punctuation # literals rule %r/#{int_number}[.]#{int}/, Num::Float rule %r/0x[0-9A-Fa-f]+/, Num::Hex rule %r/#{int}/, Num::Integer # strings rule %r/"""/ do token Str push do rule %r/"""/, Str, :pop! rule %r/"/, Str mixin :double_strings end end rule %r/'''/ do token Str push do rule %r/'''/, Str, :pop! rule %r/'/, Str mixin :single_strings end end rule %r/"/ do token Str push do rule %r/"/, Str, :pop! mixin :double_strings end end rule %r/'/ do token Str push do rule %r/'/, Str, :pop! mixin :single_strings end end # words rule %r/\\\S[^\s,;\])}]*/, Str end state :code_escape do rule %r(\\( c[A-Z]| x[0-9a-fA-F]{2}| u[0-9a-fA-F]{4}| u\{[0-9a-fA-F]{4}\} ))x, Str::Escape end state :interpolated_expression do rule %r/}/, Str::Interpol, :pop! mixin :root end state :interpolation do # with curly braces rule %r/[#][{]/, Str::Interpol, :interpolated_expression # without curly braces rule %r/(#)(#{id})/ do |m| groups Str::Interpol, (self.class.builtins.include? m[2]) ? Name::Builtin : Name::Variable end end state :whitespace do # white space and loop labels rule %r/(\s+?)(?:^([^\S\n]*)(:#{id}))?/m do groups Text, Text, Name::Label end end state :whitespace_single_line do rule %r([^\S\n]+), Text end state :slash_starts_regex do mixin :comments mixin :whitespace mixin :multiline_regex_begin rule %r( /(\\.|[^\[/\\\n]|\[(\\.|[^\]\\\n])*\])+/ # a regex ([gimy]+\b|\B) )x, Str::Regex, :pop! rule(//) { pop! } end state :multiline_regex_begin do rule %r(//) do token Str::Regex goto :multiline_regex end end state :multiline_regex_end do rule %r(//([gimy]+\b|\B)), Str::Regex, :pop! end state :multiline_regex do mixin :multiline_regex_end mixin :regex_comment mixin :interpolation mixin :code_escape rule %r/\\\D/, Str::Escape rule %r/\\\d+/, Name::Variable rule %r/./m, Str::Regex end state :regex_comment do rule %r/^#(\s+.*)?$/, Comment::Single rule %r/(\s+)(#)(\s+.*)?$/ do groups Text, Comment::Single, Comment::Single end end state :comments do rule %r(/\*.*?\*/)m, Comment::Multiline rule %r/#.*$/, Comment::Single end state :switch_underscore do mixin :whitespace_single_line rule %r/_(?=\s*=>|\s+then\b)/, Keyword rule(//) { pop! } end state :loop_control do mixin :whitespace_single_line rule %r/#{id}(?=[);\n])/, Name::Label rule(//) { pop! } end state :id do rule %r/[!?]|[.](?!=)/, Punctuation rule %r/[{]/ do # destructuring token Punctuation push do rule %r/[,;]/, Punctuation rule %r/#{id}/, Name::Attribute rule %r/#{int}/, Num::Integer mixin :whitespace rule %r/[}]/, Punctuation, :pop! end end rule %r/#{id}/, Name::Attribute rule %r/#{int}/, Num::Integer rule(//) { goto :slash_starts_regex } end state :strings do # all strings are multi-line rule %r/[^#\\'"]+/m, Str mixin :code_escape rule %r/\\./, Str::Escape rule %r/#/, Str end state :double_strings do rule %r/'/, Str mixin :interpolation mixin :strings end state :single_strings do rule %r/"/, Str mixin :strings end end end end rouge-3.28.0/lib/rouge/lexers/llvm.rb000066400000000000000000000032551417417255300174330ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class LLVM < RegexLexer title "LLVM" desc 'The LLVM Compiler Infrastructure (http://llvm.org/)' tag 'llvm' filenames '*.ll' mimetypes 'text/x-llvm' string = /"[^"]*?"/ identifier = /([-a-zA-Z$._][-a-zA-Z$._0-9]*|#{string})/ def self.keywords Kernel::load File.join(Lexers::BASE_DIR, "llvm/keywords.rb") keywords end def self.instructions Kernel::load File.join(Lexers::BASE_DIR, "llvm/keywords.rb") instructions end def self.types Kernel::load File.join(Lexers::BASE_DIR, "llvm/keywords.rb") types end state :basic do rule %r/;.*?$/, Comment::Single rule %r/\s+/, Text rule %r/#{identifier}\s*:/, Name::Label rule %r/@(#{identifier}|\d+)/, Name::Variable::Global rule %r/#\d+/, Name::Variable::Global rule %r/(%|!)#{identifier}/, Name::Variable rule %r/(%|!)\d+/, Name::Variable rule %r/c?#{string}/, Str rule %r/0[xX][a-fA-F0-9]+/, Num rule %r/-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?/, Num rule %r/[=<>{}\[\]()*.,!]|x/, Punctuation end state :root do mixin :basic rule %r/i[1-9]\d*/, Keyword::Type rule %r/\w+/ do |m| if self.class.types.include? m[0] token Keyword::Type elsif self.class.instructions.include? m[0] token Keyword elsif self.class.keywords.include? m[0] token Keyword else token Error end end end end end end rouge-3.28.0/lib/rouge/lexers/llvm/000077500000000000000000000000001417417255300171015ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/lexers/llvm/keywords.rb000066400000000000000000000117031417417255300212770ustar00rootroot00000000000000# encoding: utf-8 # frozen_string_literal: true # DO NOT EDIT # This file is automatically generated by `rake builtins:llvm`. # See tasks/builtins/llvm.rake for more info. module Rouge module Lexers class LLVM def self.keywords @keywords ||= Set.new ["aarch64_sve_vector_pcs", "aarch64_vector_pcs", "acq_rel", "acquire", "addrspace", "afn", "alias", "aliasee", "align", "alignLog2", "alignstack", "allOnes", "allocsize", "alwaysInline", "alwaysinline", "amdgpu_cs", "amdgpu_es", "amdgpu_gs", "amdgpu_hs", "amdgpu_kernel", "amdgpu_ls", "amdgpu_ps", "amdgpu_vs", "any", "anyregcc", "appending", "arcp", "argmemonly", "args", "arm_aapcs_vfpcc", "arm_aapcscc", "arm_apcscc", "asm", "atomic", "attributes", "available_externally", "avr_intrcc", "avr_signalcc", "bit", "bitMask", "blockaddress", "branchFunnel", "builtin", "byArg", "byte", "byteArray", "byval", "c", "callee", "caller", "calls", "canAutoHide", "catch", "cc", "ccc", "cfguard_checkcc", "cleanup", "cold", "coldcc", "comdat", "common", "constant", "contract", "convergent", "critical", "cxx_fast_tlscc", "datalayout", "declare", "default", "define", "deplibs", "dereferenceable", "dereferenceable_or_null", "distinct", "dllexport", "dllimport", "dsoLocal", "dso_local", "dso_preemptable", "eq", "exact", "exactmatch", "extern_weak", "external", "externally_initialized", "false", "fast", "fastcc", "filter", "flags", "from", "funcFlags", "function", "gc", "ghccc", "global", "guid", "gv", "hash", "hhvm_ccc", "hhvmcc", "hidden", "hot", "hotness", "ifunc", "immarg", "inaccessiblemem_or_argmemonly", "inaccessiblememonly", "inalloca", "inbounds", "indir", "info", "initialexec", "inline", "inlineBits", "inlinehint", "inrange", "inreg", "insts", "intel_ocl_bicc", "inteldialect", "internal", "jumptable", "kind", "largest", "linkage", "linkonce", "linkonce_odr", "live", "local_unnamed_addr", "localdynamic", "localexec", "max", "min", "minsize", "module", "monotonic", "msp430_intrcc", "musttail", "naked", "name", "nand", "ne", "nest", "ninf", "nnan", "noInline", "noRecurse", "noalias", "nobuiltin", "nocapture", "nocf_check", "noduplicate", "noduplicates", "nofree", "noimplicitfloat", "noinline", "none", "nonlazybind", "nonnull", "norecurse", "noredzone", "noreturn", "nosync", "notEligibleToImport", "notail", "nounwind", "nsw", "nsz", "null", "nuw", "oeq", "offset", "oge", "ogt", "ole", "olt", "one", "opaque", "optforfuzzing", "optnone", "optsize", "ord", "partition", "path", "personality", "prefix", "preserve_allcc", "preserve_mostcc", "private", "prologue", "protected", "ptx_device", "ptx_kernel", "readNone", "readOnly", "readnone", "readonly", "reassoc", "refs", "relbf", "release", "resByArg", "returnDoesNotAlias", "returned", "returns_twice", "safestack", "samesize", "sanitize_address", "sanitize_hwaddress", "sanitize_memory", "sanitize_memtag", "sanitize_thread", "section", "seq_cst", "sge", "sgt", "shadowcallstack", "sideeffect", "signext", "single", "singleImpl", "singleImplName", "sizeM1", "sizeM1BitWidth", "sle", "slt", "source_filename", "speculatable", "speculative_load_hardening", "spir_func", "spir_kernel", "sret", "ssp", "sspreq", "sspstrong", "strictfp", "summaries", "summary", "swiftcc", "swifterror", "swiftself", "syncscope", "tail", "tailcc", "target", "thread_local", "to", "triple", "true", "type", "typeCheckedLoadConstVCalls", "typeCheckedLoadVCalls", "typeIdInfo", "typeTestAssumeConstVCalls", "typeTestAssumeVCalls", "typeTestRes", "typeTests", "typeid", "typeidCompatibleVTable", "ueq", "uge", "ugt", "ule", "ult", "umax", "umin", "undef", "une", "uniformRetVal", "uniqueRetVal", "unknown", "unnamed_addr", "uno", "unordered", "unsat", "unwind", "uselistorder", "uselistorder_bb", "uwtable", "vFuncId", "vTableFuncs", "varFlags", "variable", "vcall_visibility", "virtFunc", "virtualConstProp", "volatile", "vscale", "weak", "weak_odr", "webkit_jscc", "willreturn", "win64cc", "within", "wpdRes", "wpdResolutions", "writeonly", "x", "x86_64_sysvcc", "x86_fastcallcc", "x86_intrcc", "x86_regcallcc", "x86_stdcallcc", "x86_thiscallcc", "x86_vectorcallcc", "xchg", "zeroext", "zeroinitializer"] end def self.types @types ||= Set.new ["double", "float", "fp128", "half", "label", "metadata", "ppc_fp128", "token", "void", "x86_fp80", "x86_mmx"] end def self.instructions @instructions ||= Set.new ["add", "addrspacecast", "alloca", "and", "ashr", "atomicrmw", "bitcast", "br", "call", "callbr", "catchpad", "catchret", "catchswitch", "cleanuppad", "cleanupret", "cmpxchg", "extractelement", "extractvalue", "fadd", "fcmp", "fdiv", "fence", "fmul", "fneg", "fpext", "fptosi", "fptoui", "fptrunc", "freeze", "frem", "fsub", "getelementptr", "icmp", "indirectbr", "insertelement", "insertvalue", "inttoptr", "invoke", "landingpad", "load", "lshr", "mul", "or", "phi", "ptrtoint", "resume", "ret", "sdiv", "select", "sext", "shl", "shufflevector", "sitofp", "srem", "store", "sub", "switch", "trunc", "udiv", "uitofp", "unreachable", "urem", "va_arg", "xor", "zext"] end end end endrouge-3.28.0/lib/rouge/lexers/lua.rb000066400000000000000000000104251417417255300172370ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Lua < RegexLexer title "Lua" desc "Lua (http://www.lua.org)" tag 'lua' filenames '*.lua', '*.wlua' mimetypes 'text/x-lua', 'application/x-lua' option :function_highlighting, 'Whether to highlight builtin functions (default: true)' option :disabled_modules, 'builtin modules to disable' def initialize(opts={}) @function_highlighting = opts.delete(:function_highlighting) { true } @disabled_modules = opts.delete(:disabled_modules) { [] } super(opts) end def self.detect?(text) return true if text.shebang? 'lua' end def self.builtins Kernel::load File.join(Lexers::BASE_DIR, 'lua/keywords.rb') builtins end def builtins return [] unless @function_highlighting @builtins ||= Set.new.tap do |builtins| self.class.builtins.each do |mod, fns| next if @disabled_modules.include? mod builtins.merge(fns) end end end state :root do # lua allows a file to start with a shebang rule %r(#!(.*?)$), Comment::Preproc rule %r//, Text, :base end state :base do rule %r(--\[(=*)\[.*?\]\1\])m, Comment::Multiline rule %r(--.*$), Comment::Single rule %r((?i)(\d*\.\d+|\d+\.\d*)(e[+-]?\d+)?'), Num::Float rule %r((?i)\d+e[+-]?\d+), Num::Float rule %r((?i)0x[0-9a-f]*), Num::Hex rule %r(\d+), Num::Integer rule %r(\n), Text rule %r([^\S\n]), Text # multiline strings rule %r(\[(=*)\[.*?\]\1\])m, Str rule %r((==|~=|<=|>=|\.\.\.|\.\.|[=+\-*/%^<>#])), Operator rule %r([\[\]\{\}\(\)\.,:;]), Punctuation rule %r((and|or|not)\b), Operator::Word rule %r((break|do|else|elseif|end|for|if|in|repeat|return|then|until|while)\b), Keyword rule %r((local)\b), Keyword::Declaration rule %r((true|false|nil)\b), Keyword::Constant rule %r((function)\b), Keyword, :function_name rule %r([A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)?) do |m| name = m[0] if name == "gsub" token Name::Builtin push :gsub elsif self.builtins.include?(name) token Name::Builtin elsif name =~ /\./ a, b = name.split('.', 2) token Name, a token Punctuation, '.' token Name, b else token Name end end rule %r('), Str::Single, :escape_sqs rule %r("), Str::Double, :escape_dqs end state :function_name do rule %r/\s+/, Text rule %r((?:([A-Za-z_][A-Za-z0-9_]*)(\.))?([A-Za-z_][A-Za-z0-9_]*)) do groups Name::Class, Punctuation, Name::Function pop! end # inline function rule %r(\(), Punctuation, :pop! end state :gsub do rule %r/\)/, Punctuation, :pop! rule %r/[(,]/, Punctuation rule %r/\s+/, Text rule %r/"/, Str::Regex, :regex end state :regex do rule %r(") do token Str::Regex goto :regex_end end rule %r/\[\^?/, Str::Escape, :regex_group rule %r/\\./, Str::Escape rule %r{[(][?][:=?@^|~#-]+) id = /[a-z_][\w']*/i state :root do rule %r/\s+/m, Text rule %r/false|true/, Keyword::Constant rule %r(\-\-.*), Comment::Single rule %r(/\*.*?\*/)m, Comment::Multiline rule %r(\(\*.*?\*\))m, Comment::Multiline rule id do |m| match = m[0] if self.class.keywords.include? match token Keyword elsif self.class.word_operators.include? match token Operator::Word elsif self.class.primitives.include? match token Keyword::Type else token Name end end rule %r/[(){}\[\];]+/, Punctuation rule operator, Operator rule %r/-?\d[\d_]*(.[\d_]*)?(e[+-]?\d[\d_]*)/i, Num::Float rule %r/\d[\d_]*/, Num::Integer rule %r/'(?:(\\[\\"'ntbr ])|(\\[0-9]{3})|(\\x\h{2}))'/, Str::Char rule %r/'[.]'/, Str::Char rule %r/"/, Str::Double, :string rule %r/[~?]#{id}/, Name::Variable end state :string do rule %r/[^\\"]+/, Str::Double mixin :escape_sequence rule %r/\\\n/, Str::Double rule %r/"/, Str::Double, :pop! end state :escape_sequence do rule %r/\\[\\"'ntbr]/, Str::Escape rule %r/\\\d{3}/, Str::Escape rule %r/\\x\h{2}/, Str::Escape end end end end rouge-3.28.0/lib/rouge/lexers/lutin.rb000066400000000000000000000015341417417255300176120ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # # adapted from lustre.rf (adapted from ocaml.rb), hence some ocaml-ism migth remains module Rouge module Lexers load_lexer 'lustre.rb' class Lutin < Lustre title "Lutin" desc 'The Lutin programming language (Verimag)' tag 'lutin' filenames '*.lut' mimetypes 'text/x-lutin' def self.keywords @keywords ||= Set.new %w( let in node extern system returns weak strong assert raise try catch trap do exist erun run type ref exception include false true ) end def self.word_operators @word_operators ||= Set.new %w( div and xor mod or not nor if then else pre) end def self.primitives @primitives ||= Set.new %w(int real bool trace loop fby) end end end end rouge-3.28.0/lib/rouge/lexers/m68k.rb000066400000000000000000000075741417417255300172560ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class M68k < RegexLexer tag 'm68k' title "M68k" desc "Motorola 68k Assembler" id = /[a-zA-Z_][a-zA-Z0-9_]*/ def self.keywords @keywords ||= Set.new %w( abcd add adda addi addq addx and andi asl asr bcc bcs beq bge bgt bhi ble bls blt bmi bne bpl bvc bvs bhs blo bchg bclr bfchg bfclr bfests bfextu bfffo bfins bfset bftst bkpt bra bse bsr btst callm cas cas2 chk chk2 clr cmp cmpa cmpi cmpm cmp2 dbcc dbcs dbeq dbge dbgt dbhi dble dbls dblt dbmi dbne dbpl dbvc dbvs dbhs dblo dbra dbf dbt divs divsl divu divul eor eori exg ext extb illegal jmp jsr lea link lsl lsr move movea move16 movem movep moveq muls mulu nbcd neg negx nop not or ori pack pea rol ror roxl roxr rtd rtm rtr rts sbcd seq sne spl smi svc svs st sf sge sgt sle slt scc shi sls scs shs slo sub suba subi subq subx swap tas trap trapcc TODO trapv tst unlk unpk eori ) end def self.keywords_type @keywords_type ||= Set.new %w( dc ds dcb ) end def self.reserved @reserved ||= Set.new %w( include incdir incbin end endf endfunc endmain endproc fpu func machine main mmu opword proc set opt section rept endr ifeq ifne ifgt ifge iflt ifle iif ifd ifnd ifc ifnc elseif else endc even cnop fail machine output radix __G2 __LK list nolist plen llen ttl subttl spc page listchar format equ equenv equr set reg rsreset rsset offset cargs fequ.s fequ.d fequ.x fequ.p fequ.w fequ.l fopt macro endm mexit narg ) end def self.builtins @builtins ||=Set.new %w( d0 d1 d2 d3 d4 d5 d6 d7 a0 a1 a2 a3 a4 a5 a6 a7 a7' pc usp ssp ccr ) end start { push :expr_bol } state :expr_bol do mixin :inline_whitespace rule(//) { pop! } end state :inline_whitespace do rule %r/\s+/, Text end state :whitespace do rule %r/\n+/m, Text, :expr_bol rule %r(^\*(\\.|.)*?$), Comment::Single, :expr_bol rule %r(;(\\.|.)*?$), Comment::Single, :expr_bol mixin :inline_whitespace end state :root do rule(//) { push :statements } end state :statements do mixin :whitespace rule %r/"/, Str, :string rule %r/#/, Name::Decorator rule %r/^\.?[a-zA-Z0-9_]+:?/, Name::Label rule %r/\.[bswl]\s/i, Name::Decorator rule %r('(\\.|\\[0-7]{1,3}|\\x[a-f0-9]{1,2}|[^\\'\n])')i, Str::Char rule %r/\$[0-9a-f]+/i, Num::Hex rule %r/@[0-8]+/i, Num::Oct rule %r/%[01]+/i, Num::Bin rule %r/\d+/i, Num::Integer rule %r([*~&+=\|?:<>/-]), Operator rule %r/\\./, Comment::Preproc rule %r/[(),.]/, Punctuation rule %r/\[[a-zA-Z0-9]*\]/, Punctuation rule id do |m| name = m[0] if self.class.keywords.include? name.downcase token Keyword elsif self.class.keywords_type.include? name.downcase token Keyword::Type elsif self.class.reserved.include? name.downcase token Keyword::Reserved elsif self.class.builtins.include? name.downcase token Name::Builtin elsif name =~ /[a-zA-Z0-9]+/ token Name::Variable else token Name end end end state :string do rule %r/"/, Str, :pop! rule %r/\\([\\abfnrtv"']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})/, Str::Escape rule %r/[^\\"\n]+/, Str rule %r/\\\n/, Str rule %r/\\/, Str # stray backslash end end end end rouge-3.28.0/lib/rouge/lexers/magik.rb000066400000000000000000000067771417417255300175650ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Magik < RegexLexer title "Magik" desc "Smallworld Magik" tag 'magik' filenames '*.magik' mimetypes 'text/x-magik', 'application/x-magik' def self.keywords @keywords ||= %w( _package _pragma _block _endblock _handling _default _protect _protection _endprotect _try _with _when _endtry _catch _endcatch _throw _lock _endlock _if _then _elif _else _endif _for _over _while _loop _finally _endloop _loopbody _continue _leave _return _class _local _constant _recursive _global _dynamic _import _private _iter _abstract _method _endmethod _proc _endproc _gather _scatter _allresults _optional _thisthread _self _clone _super _primitive _unset _true _false _maybe _is _isnt _not _and _or _xor _cf _andif _orif _div _mod ) end def self.string_double @string_double ||= /"[^"\n]*?"/ end def self.string_single @string_single ||= /'[^'\n]*?'/ end def self.digits @digits ||= /[0-9]+/ end def self.radix @radix ||= /r[0-9a-z]/i end def self.exponent @exponent ||= /(e|&)[+-]?#{Magik.digits}/i end def self.decimal @decimal ||= /\.#{Magik.digits}/ end def self.number @number = /#{Magik.digits}(#{Magik.radix}|#{Magik.exponent}|#{Magik.decimal})*/ end def self.character @character ||= /%u[0-9a-z]{4}|%[^\s]+/i end def self.simple_identifier @simple_identifier ||= /(?>(?:[a-z0-9_!?]|\\.)+)/i end def self.piped_identifier @piped_identifier ||= /\|[^\|\n]*\|/ end def self.identifier @identifier ||= /(?:#{Magik.simple_identifier}|#{Magik.piped_identifier})+/i end def self.package_identifier @package_identifier ||= /#{Magik.identifier}:#{Magik.identifier}/ end def self.symbol @symbol ||= /:#{Magik.identifier}/i end def self.global_ref @global_ref ||= /@[\s]*#{Magik.identifier}:#{Magik.identifier}/ end def self.label @label = /@[\s]*#{Magik.identifier}/ end state :root do rule %r/##(.*)?/, Comment::Doc rule %r/#(.*)?/, Comment::Single rule %r/(_method)(\s+)/ do groups Keyword, Text::Whitespace push :method_name end rule %r/(?:#{Magik.keywords.join('|')})\b/, Keyword rule Magik.string_double, Literal::String rule Magik.string_single, Literal::String rule Magik.symbol, Str::Symbol rule Magik.global_ref, Name::Label rule Magik.label, Name::Label rule Magik.character, Literal::String::Char rule Magik.number, Literal::Number rule Magik.package_identifier, Name rule Magik.identifier, Name rule %r/[\[\]{}()\.,;]/, Punctuation rule %r/\$/, Punctuation rule %r/(<<|^<<)/, Operator rule %r/(>>)/, Operator rule %r/[-~+\/*%=&^<>]|!=/, Operator rule %r/[\s]+/, Text::Whitespace end state :method_name do rule %r/(#{Magik.identifier})(\.)(#{Magik.identifier})/ do groups Name::Class, Punctuation, Name::Function pop! end end end end end rouge-3.28.0/lib/rouge/lexers/make.rb000066400000000000000000000070561417417255300174010ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Make < RegexLexer title "Make" desc "Makefile syntax" tag 'make' aliases 'makefile', 'mf', 'gnumake', 'bsdmake' filenames '*.make', '*.mak', '*.mk', 'Makefile', 'makefile', 'Makefile.*', 'GNUmakefile', '*,fe1' mimetypes 'text/x-makefile' def self.functions @functions ||= %w( abspath addprefix addsuffix and basename call dir error eval file filter filter-out findstring firstword flavor foreach if join lastword notdir or origin patsubst realpath shell sort strip subst suffix value warning wildcard word wordlist words ) end # TODO: Add support for special keywords # bsd_special = %w( # include undef error warning if else elif endif for endfor # ) def initialize(opts={}) super @shell = Shell.new(opts) end start { @shell.reset! } state :root do rule %r/\s+/, Text rule %r/#.*?\n/, Comment rule %r/([-s]?include)((?:[\t ]+[^\t\n #]+)+)/ do groups Keyword, Literal::String::Other end rule %r/(ifn?def|ifn?eq)([\t ]+)([^#\n]+)/ do groups Keyword, Text, Name::Variable end rule %r/(?:else|endif)[\t ]*(?=[#\n])/, Keyword rule %r/(export)([\t ]+)(?=[\w\${}()\t -]+\n)/ do groups Keyword, Text push :export end rule %r/export[\t ]+/, Keyword # assignment rule %r/([\w${}().-]+)([\t ]*)([!?:+]?=)/m do |m| token Name::Variable, m[1] token Text, m[2] token Operator, m[3] push :shell_line end rule %r/"(\\\\|\\.|[^"\\])*"/, Str::Double rule %r/'(\\\\|\\.|[^'\\])*'/, Str::Single rule %r/([^\n:]+)(:+)([ \t]*)/ do groups Name::Label, Operator, Text push :block_header end end state :export do rule %r/[\w\${}()-]/, Name::Variable rule %r/\n/, Text, :pop! rule %r/[\t ]+/, Text end state :block_header do rule %r/[^,\\\n#]+/, Name::Function rule %r/,/, Punctuation rule %r/#.*?/, Comment rule %r/\\\n/, Text rule %r/\\./, Text rule %r/\n/ do token Text goto :block_body end end state :block_body do rule %r/(ifn?def|ifn?eq)([\t ]+)([^#\n]+)(#.*)?(\n)/ do groups Keyword, Text, Name::Variable, Comment, Text end rule %r/(else|endif)([\t ]*)(#.*)?(\n)/ do groups Keyword, Text, Comment, Text end rule %r/(\t[\t ]*)([@-]?)/ do groups Text, Punctuation push :shell_line end rule(//) { @shell.reset!; pop! } end state :shell do # macro interpolation rule %r/\$[({][\t ]*\w[\w:=%.]*[\t ]*[)}]/i, Name::Variable # function invocation rule %r/(\$[({])([\t ]*)(#{Make.functions.join('|')})([\t ]+)/m do groups Name::Function, Text, Name::Builtin, Text push :shell_expr end rule(/\\./m) { delegate @shell } stop = /\$\(|\$\{|\(|\)|\}|\\|$/ rule(/.+?(?=#{stop})/m) { delegate @shell } rule(stop) { delegate @shell } end state :shell_expr do rule(/[({]/) { delegate @shell; push } rule %r/[)}]/, Name::Function, :pop! mixin :shell end state :shell_line do rule %r/\n/, Text, :pop! mixin :shell end end end end rouge-3.28.0/lib/rouge/lexers/markdown.rb000066400000000000000000000106671417417255300203100ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Markdown < RegexLexer title "Markdown" desc "Markdown, a light-weight markup language for authors" tag 'markdown' aliases 'md', 'mkd' filenames '*.markdown', '*.md', '*.mkd' mimetypes 'text/x-markdown' def html @html ||= HTML.new(options) end start { html.reset! } edot = /\\.|[^\\\n]/ state :root do # YAML frontmatter rule(/\A(---\s*\n.*?\n?)^(---\s*$\n?)/m) { delegate YAML } rule %r/\\./, Str::Escape rule %r/^[\S ]+\n(?:---*)\n/, Generic::Heading rule %r/^[\S ]+\n(?:===*)\n/, Generic::Subheading rule %r/^#(?=[^#]).*?$/, Generic::Heading rule %r/^##*.*?$/, Generic::Subheading rule %r/^([ \t]*)(`{3,}|~{3,})([^\n]*\n)((.*?)(\n\1)(\2))?/m do |m| name = m[3].strip sublexer = begin Lexer.find_fancy(name.empty? ? "guess" : name, m[5], @options) rescue Guesser::Ambiguous => e e.alternatives.first.new(@options) end sublexer ||= PlainText.new(@options.merge(:token => Str::Backtick)) sublexer.reset! token Text, m[1] token Punctuation, m[2] token Name::Label, m[3] if m[5] delegate sublexer, m[5] end token Text, m[6] if m[7] token Punctuation, m[7] else push do rule %r/^([ \t]*)(#{m[2]})/ do |mb| pop! token Text, mb[1] token Punctuation, mb[2] end rule %r/^.*\n/ do |mb| delegate sublexer, mb[1] end end end end rule %r/\n\n(( |\t).*?\n|\n)+/, Str::Backtick rule %r/(`+)(?:#{edot}|\n)+?\1/, Str::Backtick # various uses of * are in order of precedence # line breaks rule %r/^(\s*[*]){3,}\s*$/, Punctuation rule %r/^(\s*[-]){3,}\s*$/, Punctuation # bulleted lists rule %r/^\s*[*+-](?=\s)/, Punctuation # numbered lists rule %r/^\s*\d+\./, Punctuation # blockquotes rule %r/^\s*>.*?$/, Generic::Traceback # link references # [foo]: bar "baz" rule %r(^ (\s*) # leading whitespace (\[) (#{edot}+?) (\]) # the reference (\s*) (:) # colon )x do groups Text, Punctuation, Str::Symbol, Punctuation, Text, Punctuation push :title push :url end # links and images rule %r/(!?\[)(#{edot}*?|[^\]]*?)(\])(?=[\[(])/ do groups Punctuation, Name::Variable, Punctuation push :link end rule %r/[*][*]#{edot}*?[*][*]/, Generic::Strong rule %r/__#{edot}*?__/, Generic::Strong rule %r/[*]#{edot}*?[*]/, Generic::Emph rule %r/_#{edot}*?_/, Generic::Emph # Automatic links rule %r/<.*?@.+[.].+>/, Name::Variable rule %r[<(https?|mailto|ftp)://#{edot}*?>], Name::Variable rule %r/[^\\`\[*\n&<]+/, Text # inline html rule(/&\S*;/) { delegate html } rule(/<#{edot}*?>/) { delegate html } rule %r/[&<]/, Text # An opening square bracket that is not a link rule %r/\[/, Text rule %r/\n/, Text end state :link do rule %r/(\[)(#{edot}*?)(\])/ do groups Punctuation, Str::Symbol, Punctuation pop! end rule %r/[(]/ do token Punctuation push :inline_title push :inline_url end rule %r/[ \t]+/, Text rule(//) { pop! } end state :url do rule %r/[ \t]+/, Text # the url rule %r/(<)(#{edot}*?)(>)/ do groups Name::Tag, Str::Other, Name::Tag pop! end rule %r/\S+/, Str::Other, :pop! end state :title do rule %r/"#{edot}*?"/, Name::Namespace rule %r/'#{edot}*?'/, Name::Namespace rule %r/[(]#{edot}*?[)]/, Name::Namespace rule %r/\s*(?=["'()])/, Text rule(//) { pop! } end state :inline_title do rule %r/[)]/, Punctuation, :pop! mixin :title end state :inline_url do rule %r/[^<\s)]+/, Str::Other, :pop! rule %r/\s+/m, Text mixin :url end end end end rouge-3.28.0/lib/rouge/lexers/mason.rb000066400000000000000000000063101417417255300175710ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Mason < TemplateLexer title 'Mason' desc 'The HTML::Mason framework (https://metacpan.org/pod/HTML::Mason)' tag 'mason' filenames '*.mi', '*.mc', '*.mas', '*.m', '*.mhtml', '*.mcomp', 'autohandler', 'dhandler' mimetypes 'text/x-mason', 'application/x-mason' def initialize(*) super @perl = Perl.new end # Note: If you add a tag in the lines below, you also need to modify "disambiguate '*.m'" in file disambiguation.rb TEXT_BLOCKS = %w(text doc) PERL_BLOCKS = %w(args flags attr init once shared perl cleanup filter) COMPONENTS = %w(def method) state :root do mixin :mason_tags end state :mason_tags do rule %r/\s+/, Text::Whitespace rule %r/<%(#{TEXT_BLOCKS.join('|')})>/oi, Comment::Preproc, :text_block rule %r/<%(#{PERL_BLOCKS.join('|')})>/oi, Comment::Preproc, :perl_block rule %r/(<%(#{COMPONENTS.join('|')}))([^>]*)(>)/oi do |m| token Comment::Preproc, m[1] token Name, m[3] token Comment::Preproc, m[4] push :component_block end # perl line rule %r/^(%)(.*)$/ do |m| token Comment::Preproc, m[1] delegate @perl, m[2] end # start of component call rule %r/<%/, Comment::Preproc, :component_call # start of component with content rule %r/<&\|/ do token Comment::Preproc push :component_with_content push :component_sub end # start of component substitution rule %r/<&/, Comment::Preproc, :component_sub # fallback to HTML until a mason tag is encountered rule(/(.+?)(?=(<\/?&|<\/?%|^%|^#))/m) { delegate parent } # if we get here, there's no more mason tags, so we parse the rest of the doc as HTML rule(/.+/m) { delegate parent } end state :perl_block do rule %r/<\/%(#{PERL_BLOCKS.join('|')})>/oi, Comment::Preproc, :pop! rule %r/\s+/, Text::Whitespace rule %r/^(#.*)$/, Comment rule(/(.*?[^"])(?=<\/%)/m) { delegate @perl } end state :text_block do rule %r/<\/%(#{TEXT_BLOCKS.join('|')})>/oi, Comment::Preproc, :pop! rule %r/\s+/, Text::Whitespace rule %r/^(#.*)$/, Comment rule %r/(.*?[^"])(?=<\/%)/m, Comment end state :component_block do rule %r/<\/%(#{COMPONENTS.join('|')})>/oi, Comment::Preproc, :pop! rule %r/\s+/, Text::Whitespace rule %r/^(#.*)$/, Comment mixin :mason_tags end state :component_with_content do rule %r/<\/&>/ do token Comment::Preproc pop! end mixin :mason_tags end state :component_sub do rule %r/&>/, Comment::Preproc, :pop! rule(/(.*?)(?=&>)/m) { delegate @perl } end state :component_call do rule %r/%>/, Comment::Preproc, :pop! rule(/(.*?)(?=%>)/m) { delegate @perl } end end end end rouge-3.28.0/lib/rouge/lexers/mathematica.rb000066400000000000000000000070741417417255300207410ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Mathematica < RegexLexer title "Mathematica" desc "Wolfram Mathematica, the world's definitive system for modern technical computing." tag 'mathematica' aliases 'wl' filenames '*.m', '*.wl' mimetypes 'application/vnd.wolfram.mathematica.package', 'application/vnd.wolfram.wl' # Mathematica has various input forms for numbers. We need to handle numbers in bases, precision, accuracy, # and *^ scientific notation. All this works for integers and real numbers. Some examples # 1 1234567 1.1 .3 0.2 1*^10 2*^+10 3*^-10 # 1`1 1``1 1.2` 1.2``1.234*^-10 1.2``1.234*^+10 1.2``1.234*^10 # 2^^01001 10^^1.2``20.1234*^-10 base = /(?:\d+)/ number = /(?:\.\d+|\d+\.\d*|\d+)/ number_base = /(?:\.\w+|\w+\.\w*|\w+)/ precision = /`(`?#{number})?/ operators = /[+\-*\/|,;.:@~=><&`'^?!_%]/ braces = /[\[\](){}]/ string = /"(\\\\|\\"|[^"])*"/ # symbols and namespaced symbols. Note the special form \[Gamma] for named characters. These are also symbols. # Module With Block Integrate Table Plot # x32 $x x$ $Context` Context123`$x `Private`Context # \[Gamma] \[Alpha]x32 Context`\[Xi] identifier = /[a-zA-Z$][$a-zA-Z0-9]*/ named_character = /\\\[#{identifier}\]/ symbol = /(#{identifier}|#{named_character})+/ context_symbol = /`?#{symbol}(`#{symbol})*`?/ # Slots for pure functions. # Examples: # ## #1 ##3 #Test #"Test" #[Test] #["Test"] association_slot = /#(#{identifier}|\"#{identifier}\")/ slot = /#{association_slot}|#[0-9]*/ # Handling of message like symbol::usage or symbol::"argx" message = /::(#{identifier}|#{string})/ # Highlighting of the special in and out markers that are prepended when you copy a cell in_out = /(In|Out)\[[0-9]+\]:?=/ # Although Module, With and Block are normal built-in symbols, we give them a special treatment as they are # the most important expressions for defining local variables def self.keywords @keywords = Set.new %w( Module With Block ) end # The list of built-in symbols comes from a wolfram server and is created automatically by rake def self.builtins Kernel::load File.join(Lexers::BASE_DIR, 'mathematica/keywords.rb') builtins end state :root do rule %r/\s+/, Text::Whitespace rule %r/\(\*/, Comment, :comment rule %r/#{base}\^\^#{number_base}#{precision}?(\*\^[+-]?\d+)?/, Num # a number with a base rule %r/(?:#{number}#{precision}?(?:\*\^[+-]?\d+)?)/, Num # all other numbers rule message, Name::Tag rule in_out, Generic::Prompt rule %r/#{context_symbol}/m do |m| match = m[0] if self.class.keywords.include? match token Name::Builtin::Pseudo elsif self.class.builtins.include? match token Name::Builtin else token Name::Variable end end rule slot, Name::Function rule operators, Operator rule braces, Punctuation rule string, Str end # Allow for nested comments and special treatment of ::Section:: or :Author: markup state :comment do rule %r/\(\*/, Comment, :comment rule %r/\*\)/, Comment, :pop! rule %r/::#{identifier}::/, Comment::Preproc rule %r/[ ]:(#{identifier}|[^\S])+:[ ]/, Comment::Preproc rule %r/./, Comment end end end end rouge-3.28.0/lib/rouge/lexers/mathematica/000077500000000000000000000000001417417255300204045ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/lexers/mathematica/keywords.rb000066400000000000000000002714501417417255300226110ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # DO NOT EDIT # This file is automatically generated by `rake builtins:mathematica`. # See tasks/builtins/mathematica.rake for more info. module Rouge module Lexers class Mathematica def self.builtins @builtins ||= Set.new ["AASTriangle", "AngleVector", "AsymptoticDSolveValue", "AbelianGroup", "AngularGauge", "AsymptoticEqual", "Abort", "Animate", "AsymptoticEquivalent", "AbortKernels", "AnimationDirection", "AsymptoticGreater", "AbortProtect", "AnimationRate", "AsymptoticGreaterEqual", "Above", "AnimationRepetitions", "AsymptoticIntegrate", "Abs", "AnimationRunning", "AsymptoticLess", "AbsArg", "AnimationRunTime", "AsymptoticLessEqual", "AbsArgPlot", "AnimationTimeIndex", "AsymptoticOutputTracker", "AbsoluteCorrelation", "Animator", "AsymptoticProduct", "AbsoluteCorrelationFunction", "Annotate", "AsymptoticRSolveValue", "AbsoluteCurrentValue", "Annotation", "AsymptoticSolve", "AbsoluteDashing", "AnnotationDelete", "AsymptoticSum", "AbsoluteFileName", "AnnotationKeys", "Asynchronous", "AbsoluteOptions", "AnnotationRules", "Atom", "AbsolutePointSize", "AnnotationValue", "AtomCoordinates", "AbsoluteThickness", "Annuity", "AtomCount", "AbsoluteTime", "AnnuityDue", "AtomDiagramCoordinates", "AbsoluteTiming", "Annulus", "AtomList", "AcceptanceThreshold", "AnomalyDetection", "AtomQ", "AccountingForm", "AnomalyDetector", "AttentionLayer", "Accumulate", "AnomalyDetectorFunction", "Attributes", "Accuracy", "Anonymous", "Audio", "AccuracyGoal", "Antialiasing", "AudioAmplify", "ActionMenu", "AntihermitianMatrixQ", "AudioAnnotate", "Activate", "Antisymmetric", "AudioAnnotationLookup", "ActiveClassification", "AntisymmetricMatrixQ", "AudioBlockMap", "ActiveClassificationObject", "Antonyms", "AudioCapture", "ActivePrediction", "AnyOrder", "AudioChannelAssignment", "ActivePredictionObject", "AnySubset", "AudioChannelCombine", "ActiveStyle", "AnyTrue", "AudioChannelMix", "AcyclicGraphQ", "Apart", "AudioChannels", "AddSides", "ApartSquareFree", "AudioChannelSeparate", "AddTo", "APIFunction", "AudioData", "AddToSearchIndex", "Appearance", "AudioDelay", "AddUsers", "AppearanceElements", "AudioDelete", "AdjacencyGraph", "AppearanceRules", "AudioDistance", "AdjacencyList", "AppellF1", "AudioEncoding", "AdjacencyMatrix", "Append", "AudioFade", "AdjacentMeshCells", "AppendLayer", "AudioFrequencyShift", "AdjustmentBox", "AppendTo", "AudioGenerator", "AdjustmentBoxOptions", "Apply", "AudioIdentify", "AdjustTimeSeriesForecast", "ApplySides", "AudioInputDevice", "AdministrativeDivisionData", "ArcCos", "AudioInsert", "AffineHalfSpace", "ArcCosh", "AudioInstanceQ", "AffineSpace", "ArcCot", "AudioIntervals", "AffineStateSpaceModel", "ArcCoth", "AudioJoin", "AffineTransform", "ArcCsc", "AudioLabel", "After", "ArcCsch", "AudioLength", "AggregatedEntityClass", "ArcCurvature", "AudioLocalMeasurements", "AggregationLayer", "ARCHProcess", "AudioLoudness", "AircraftData", "ArcLength", "AudioMeasurements", "AirportData", "ArcSec", "AudioNormalize", "AirPressureData", "ArcSech", "AudioOutputDevice", "AirTemperatureData", "ArcSin", "AudioOverlay", "AiryAi", "ArcSinDistribution", "AudioPad", "AiryAiPrime", "ArcSinh", "AudioPan", "AiryAiZero", "ArcTan", "AudioPartition", "AiryBi", "ArcTanh", "AudioPause", "AiryBiPrime", "Area", "AudioPitchShift", "AiryBiZero", "Arg", "AudioPlay", "AlgebraicIntegerQ", "ArgMax", "AudioPlot", "AlgebraicNumber", "ArgMin", "AudioQ", "AlgebraicNumberDenominator", "ARIMAProcess", "AudioRecord", "AlgebraicNumberNorm", "ArithmeticGeometricMean", "AudioReplace", "AlgebraicNumberPolynomial", "ARMAProcess", "AudioResample", "AlgebraicNumberTrace", "Around", "AudioReverb", "Algebraics", "AroundReplace", "AudioReverse", "AlgebraicUnitQ", "ARProcess", "AudioSampleRate", "Alignment", "Array", "AudioSpectralMap", "AlignmentPoint", "ArrayComponents", "AudioSpectralTransformation", "All", "ArrayDepth", "AudioSplit", "AllowedCloudExtraParameters", "ArrayFilter", "AudioStop", "AllowedCloudParameterExtensions", "ArrayFlatten", "AudioStream", "AllowedDimensions", "ArrayMesh", "AudioStreams", "AllowedFrequencyRange", "ArrayPad", "AudioTimeStretch", "AllowedHeads", "ArrayPlot", "AudioTracks", "AllowGroupClose", "ArrayQ", "AudioTrim", "AllowInlineCells", "ArrayResample", "AudioType", "AllowLooseGrammar", "ArrayReshape", "AugmentedPolyhedron", "AllowReverseGroupClose", "ArrayRules", "AugmentedSymmetricPolynomial", "AllowVersionUpdate", "Arrays", "Authentication", "AllTrue", "Arrow", "AuthenticationDialog", "Alphabet", "Arrowheads", "AutoAction", "AlphabeticOrder", "ASATriangle", "Autocomplete", "AlphabeticSort", "Ask", "AutocompletionFunction", "AlphaChannel", "AskAppend", "AutoCopy", "AlternatingFactorial", "AskConfirm", "AutocorrelationTest", "AlternatingGroup", "AskDisplay", "AutoDelete", "AlternativeHypothesis", "AskedQ", "AutoIndent", "Alternatives", "AskedValue", "AutoItalicWords", "AltitudeMethod", "AskFunction", "Automatic", "AmbiguityFunction", "AskState", "AutoMultiplicationSymbol", "AmbiguityList", "AskTemplateDisplay", "AutoRefreshed", "AnatomyData", "AspectRatio", "AutoRemove", "AnatomyPlot3D", "Assert", "AutorunSequencing", "AnatomySkinStyle", "AssociateTo", "AutoScroll", "AnatomyStyling", "Association", "AutoSpacing", "AnchoredSearch", "AssociationFormat", "AutoSubmitting", "And", "AssociationMap", "Axes", "AndersonDarlingTest", "AssociationQ", "AxesEdge", "AngerJ", "AssociationThread", "AxesLabel", "AngleBisector", "AssumeDeterministic", "AxesOrigin", "AngleBracket", "Assuming", "AxesStyle", "AnglePath", "Assumptions", "AxiomaticTheory", "AnglePath3D", "Asymptotic", "Axis", "BabyMonsterGroupB", "BezierFunction", "BooleanCountingFunction", "Back", "BilateralFilter", "BooleanFunction", "Background", "Binarize", "BooleanGraph", "Backslash", "BinaryDeserialize", "BooleanMaxterms", "Backward", "BinaryDistance", "BooleanMinimize", "Ball", "BinaryFormat", "BooleanMinterms", "Band", "BinaryImageQ", "BooleanQ", "BandpassFilter", "BinaryRead", "BooleanRegion", "BandstopFilter", "BinaryReadList", "Booleans", "BarabasiAlbertGraphDistribution", "BinarySerialize", "BooleanStrings", "BarChart", "BinaryWrite", "BooleanTable", "BarChart3D", "BinCounts", "BooleanVariables", "BarcodeImage", "BinLists", "BorderDimensions", "BarcodeRecognize", "Binomial", "BorelTannerDistribution", "BaringhausHenzeTest", "BinomialDistribution", "Bottom", "BarLegend", "BinomialProcess", "BottomHatTransform", "BarlowProschanImportance", "BinormalDistribution", "BoundaryDiscretizeGraphics", "BarnesG", "BiorthogonalSplineWavelet", "BoundaryDiscretizeRegion", "BarOrigin", "BipartiteGraphQ", "BoundaryMesh", "BarSpacing", "BiquadraticFilterModel", "BoundaryMeshRegion", "BartlettHannWindow", "BirnbaumImportance", "BoundaryMeshRegionQ", "BartlettWindow", "BirnbaumSaundersDistribution", "BoundaryStyle", "BaseDecode", "BitAnd", "BoundedRegionQ", "BaseEncode", "BitClear", "BoundingRegion", "BaseForm", "BitGet", "BoxData", "Baseline", "BitLength", "Boxed", "BaselinePosition", "BitNot", "Boxes", "BaseStyle", "BitOr", "BoxMatrix", "BasicRecurrentLayer", "BitSet", "BoxObject", "BatchNormalizationLayer", "BitShiftLeft", "BoxRatios", "BatchSize", "BitShiftRight", "BoxStyle", "BatesDistribution", "BitXor", "BoxWhiskerChart", "BattleLemarieWavelet", "BiweightLocation", "BracketingBar", "BayesianMaximization", "BiweightMidvariance", "BrayCurtisDistance", "BayesianMaximizationObject", "Black", "BreadthFirstScan", "BayesianMinimization", "BlackmanHarrisWindow", "Break", "BayesianMinimizationObject", "BlackmanNuttallWindow", "BridgeData", "Because", "BlackmanWindow", "BrightnessEqualize", "BeckmannDistribution", "Blank", "BroadcastStationData", "Beep", "BlankNullSequence", "Brown", "Before", "BlankSequence", "BrownForsytheTest", "Begin", "Blend", "BrownianBridgeProcess", "BeginDialogPacket", "Block", "BSplineBasis", "BeginPackage", "BlockchainAddressData", "BSplineCurve", "BellB", "BlockchainBase", "BSplineFunction", "BellY", "BlockchainBlockData", "BSplineSurface", "Below", "BlockchainContractValue", "BubbleChart", "BenfordDistribution", "BlockchainData", "BubbleChart3D", "BeniniDistribution", "BlockchainGet", "BubbleScale", "BenktanderGibratDistribution", "BlockchainKeyEncode", "BubbleSizes", "BenktanderWeibullDistribution", "BlockchainPut", "BuildingData", "BernoulliB", "BlockchainTokenData", "BulletGauge", "BernoulliDistribution", "BlockchainTransaction", "BusinessDayQ", "BernoulliGraphDistribution", "BlockchainTransactionData", "ButterflyGraph", "BernoulliProcess", "BlockchainTransactionSign", "ButterworthFilterModel", "BernsteinBasis", "BlockchainTransactionSubmit", "Button", "BesselFilterModel", "BlockMap", "ButtonBar", "BesselI", "BlockRandom", "ButtonBox", "BesselJ", "BlomqvistBeta", "ButtonBoxOptions", "BesselJZero", "BlomqvistBetaTest", "ButtonData", "BesselK", "Blue", "ButtonFunction", "BesselY", "Blur", "ButtonMinHeight", "BesselYZero", "BodePlot", "ButtonNotebook", "Beta", "BohmanWindow", "ButtonSource", "BetaBinomialDistribution", "Bold", "Byte", "BetaDistribution", "Bond", "ByteArray", "BetaNegativeBinomialDistribution", "BondCount", "ByteArrayFormat", "BetaPrimeDistribution", "BondList", "ByteArrayQ", "BetaRegularized", "BondQ", "ByteArrayToString", "Between", "Bookmarks", "ByteCount", "BetweennessCentrality", "Boole", "ByteOrdering", "BeveledPolyhedron", "BooleanConsecutiveFunction", "BezierCurve", "BooleanConvert", "C", "ClearSystemCache", "Construct", "CachePersistence", "ClebschGordan", "Containing", "CalendarConvert", "ClickPane", "ContainsAll", "CalendarData", "Clip", "ContainsAny", "CalendarType", "ClippingStyle", "ContainsExactly", "Callout", "ClipPlanes", "ContainsNone", "CalloutMarker", "ClipPlanesStyle", "ContainsOnly", "CalloutStyle", "ClipRange", "ContentFieldOptions", "CallPacket", "Clock", "ContentLocationFunction", "CanberraDistance", "ClockGauge", "ContentObject", "Cancel", "Close", "ContentPadding", "CancelButton", "CloseKernels", "ContentSelectable", "CandlestickChart", "ClosenessCentrality", "ContentSize", "CanonicalGraph", "Closing", "Context", "CanonicalizePolygon", "CloudAccountData", "Contexts", "CanonicalizePolyhedron", "CloudBase", "ContextToFileName", "CanonicalName", "CloudConnect", "Continue", "CanonicalWarpingCorrespondence", "CloudDeploy", "ContinuedFraction", "CanonicalWarpingDistance", "CloudDirectory", "ContinuedFractionK", "CantorMesh", "CloudDisconnect", "ContinuousAction", "CantorStaircase", "CloudEvaluate", "ContinuousMarkovProcess", "Cap", "CloudExport", "ContinuousTask", "CapForm", "CloudExpression", "ContinuousTimeModelQ", "CapitalDifferentialD", "CloudExpressions", "ContinuousWaveletData", "Capitalize", "CloudFunction", "ContinuousWaveletTransform", "CapsuleShape", "CloudGet", "ContourDetect", "CaptureRunning", "CloudImport", "ContourLabels", "CarlemanLinearize", "CloudLoggingData", "ContourPlot", "CarmichaelLambda", "CloudObject", "ContourPlot3D", "CaseOrdering", "CloudObjectNameFormat", "Contours", "Cases", "CloudObjects", "ContourShading", "CaseSensitive", "CloudObjectURLType", "ContourStyle", "Cashflow", "CloudPublish", "ContraharmonicMean", "Casoratian", "CloudPut", "ContrastiveLossLayer", "Catalan", "CloudRenderingMethod", "Control", "CatalanNumber", "CloudSave", "ControlActive", "Catch", "CloudShare", "ControllabilityGramian", "CategoricalDistribution", "CloudSubmit", "ControllabilityMatrix", "Catenate", "CloudSymbol", "ControllableDecomposition", "CatenateLayer", "CloudUnshare", "ControllableModelQ", "CauchyDistribution", "ClusterClassify", "ControllerInformation", "CauchyWindow", "ClusterDissimilarityFunction", "ControllerLinking", "CayleyGraph", "ClusteringComponents", "ControllerManipulate", "CDF", "ClusteringTree", "ControllerMethod", "CDFDeploy", "CMYKColor", "ControllerPath", "CDFWavelet", "CodeAssistOptions", "ControllerState", "Ceiling", "Coefficient", "ControlPlacement", "CelestialSystem", "CoefficientArrays", "ControlsRendering", "Cell", "CoefficientList", "ControlType", "CellAutoOverwrite", "CoefficientRules", "Convergents", "CellBaseline", "CoifletWavelet", "ConversionRules", "CellBracketOptions", "Collect", "ConvexHullMesh", "CellChangeTimes", "Colon", "ConvexPolygonQ", "CellContext", "ColorBalance", "ConvexPolyhedronQ", "CellDingbat", "ColorCombine", "ConvolutionLayer", "CellDynamicExpression", "ColorConvert", "Convolve", "CellEditDuplicate", "ColorCoverage", "ConwayGroupCo1", "CellEpilog", "ColorData", "ConwayGroupCo2", "CellEvaluationDuplicate", "ColorDataFunction", "ConwayGroupCo3", "CellEvaluationFunction", "ColorDetect", "CookieFunction", "CellEventActions", "ColorDistance", "CoordinateBoundingBox", "CellFrame", "ColorFunction", "CoordinateBoundingBoxArray", "CellFrameColor", "ColorFunctionScaling", "CoordinateBounds", "CellFrameLabelMargins", "Colorize", "CoordinateBoundsArray", "CellFrameLabels", "ColorNegate", "CoordinateChartData", "CellFrameMargins", "ColorProfileData", "CoordinatesToolOptions", "CellGroup", "ColorQ", "CoordinateTransform", "CellGroupData", "ColorQuantize", "CoordinateTransformData", "CellGrouping", "ColorReplace", "CoprimeQ", "CellID", "ColorRules", "Coproduct", "CellLabel", "ColorSeparate", "CopulaDistribution", "CellLabelAutoDelete", "ColorSetter", "Copyable", "CellLabelStyle", "ColorSlider", "CopyDatabin", "CellMargins", "ColorsNear", "CopyDirectory", "CellObject", "ColorSpace", "CopyFile", "CellOpen", "ColorToneMapping", "CopyToClipboard", "CellPrint", "Column", "CornerFilter", "CellProlog", "ColumnAlignments", "CornerNeighbors", "Cells", "ColumnLines", "Correlation", "CellStyle", "ColumnsEqual", "CorrelationDistance", "CellTags", "ColumnSpacings", "CorrelationFunction", "CellularAutomaton", "ColumnWidths", "CorrelationTest", "CensoredDistribution", "CombinedEntityClass", "Cos", "Censoring", "CombinerFunction", "Cosh", "Center", "CometData", "CoshIntegral", "CenterArray", "Commonest", "CosineDistance", "CenterDot", "CommonestFilter", "CosineWindow", "CentralFeature", "CommonName", "CosIntegral", "CentralMoment", "CommonUnits", "Cot", "CentralMomentGeneratingFunction", "CommunityBoundaryStyle", "Coth", "Cepstrogram", "CommunityGraphPlot", "Count", "CepstrogramArray", "CommunityLabels", "CountDistinct", "CepstrumArray", "CommunityRegionStyle", "CountDistinctBy", "CForm", "CompanyData", "CountRoots", "ChampernowneNumber", "CompatibleUnitQ", "CountryData", "ChannelBase", "CompilationOptions", "Counts", "ChannelBrokerAction", "CompilationTarget", "CountsBy", "ChannelHistoryLength", "Compile", "Covariance", "ChannelListen", "Compiled", "CovarianceEstimatorFunction", "ChannelListener", "CompiledCodeFunction", "CovarianceFunction", "ChannelListeners", "CompiledFunction", "CoxianDistribution", "ChannelObject", "CompilerOptions", "CoxIngersollRossProcess", "ChannelReceiverFunction", "Complement", "CoxModel", "ChannelSend", "ComplementedEntityClass", "CoxModelFit", "ChannelSubscribers", "CompleteGraph", "CramerVonMisesTest", "ChanVeseBinarize", "CompleteGraphQ", "CreateArchive", "Character", "CompleteKaryTree", "CreateCellID", "CharacterCounts", "Complex", "CreateChannel", "CharacterEncoding", "ComplexContourPlot", "CreateCloudExpression", "CharacteristicFunction", "Complexes", "CreateDatabin", "CharacteristicPolynomial", "ComplexExpand", "CreateDataStructure", "CharacterName", "ComplexInfinity", "CreateDataSystemModel", "CharacterNormalize", "ComplexityFunction", "CreateDialog", "CharacterRange", "ComplexListPlot", "CreateDirectory", "Characters", "ComplexPlot", "CreateDocument", "ChartBaseStyle", "ComplexPlot3D", "CreateFile", "ChartElementFunction", "ComplexRegionPlot", "CreateIntermediateDirectories", "ChartElements", "ComplexStreamPlot", "CreateManagedLibraryExpression", "ChartLabels", "ComplexVectorPlot", "CreateNotebook", "ChartLayout", "ComponentMeasurements", "CreatePacletArchive", "ChartLegends", "ComposeList", "CreatePalette", "ChartStyle", "ComposeSeries", "CreatePermissionsGroup", "Chebyshev1FilterModel", "CompositeQ", "CreateSearchIndex", "Chebyshev2FilterModel", "Composition", "CreateSystemModel", "ChebyshevT", "CompoundElement", "CreateUUID", "ChebyshevU", "CompoundExpression", "CreateWindow", "Check", "CompoundPoissonDistribution", "CriterionFunction", "CheckAbort", "CompoundPoissonProcess", "CriticalityFailureImportance", "Checkbox", "CompoundRenewalProcess", "CriticalitySuccessImportance", "CheckboxBar", "Compress", "CriticalSection", "ChemicalData", "CompressionLevel", "Cross", "ChessboardDistance", "ComputeUncertainty", "CrossEntropyLossLayer", "ChiDistribution", "Condition", "CrossingCount", "ChineseRemainder", "ConditionalExpression", "CrossingDetect", "ChiSquareDistribution", "Conditioned", "CrossingPolygon", "ChoiceButtons", "Cone", "CrossMatrix", "ChoiceDialog", "ConfidenceLevel", "Csc", "CholeskyDecomposition", "ConfidenceRange", "Csch", "Chop", "ConfidenceTransform", "CTCLossLayer", "ChromaticityPlot", "ConformAudio", "Cube", "ChromaticityPlot3D", "ConformImages", "CubeRoot", "ChromaticPolynomial", "Congruent", "Cubics", "Circle", "ConicHullRegion", "Cuboid", "CircleDot", "ConicOptimization", "Cumulant", "CircleMinus", "Conjugate", "CumulantGeneratingFunction", "CirclePlus", "ConjugateTranspose", "Cup", "CirclePoints", "Conjunction", "CupCap", "CircleThrough", "ConnectedComponents", "Curl", "CircleTimes", "ConnectedGraphComponents", "CurrencyConvert", "CirculantGraph", "ConnectedGraphQ", "CurrentDate", "CircularOrthogonalMatrixDistribution", "ConnectedMeshComponents", "CurrentImage", "CircularQuaternionMatrixDistribution", "ConnectedMoleculeComponents", "CurrentNotebookImage", "CircularRealMatrixDistribution", "ConnectedMoleculeQ", "CurrentScreenImage", "CircularSymplecticMatrixDistribution", "ConnectionSettings", "CurrentValue", "CircularUnitaryMatrixDistribution", "ConnectLibraryCallbackFunction", "CurryApplied", "Circumsphere", "ConnectSystemModelComponents", "CurvatureFlowFilter", "CityData", "ConnesWindow", "CurveClosed", "ClassifierFunction", "ConoverTest", "Cyan", "ClassifierMeasurements", "Constant", "CycleGraph", "ClassifierMeasurementsObject", "ConstantArray", "CycleIndexPolynomial", "Classify", "ConstantArrayLayer", "Cycles", "ClassPriors", "ConstantImage", "CyclicGroup", "Clear", "ConstantPlusLayer", "Cyclotomic", "ClearAll", "ConstantRegionQ", "Cylinder", "ClearAttributes", "Constants", "CylindricalDecomposition", "ClearCookies", "ConstantTimesLayer", "ClearPermissions", "ConstellationData", "D", "DeleteFile", "DiscreteLyapunovSolve", "DagumDistribution", "DeleteMissing", "DiscreteMarkovProcess", "DamData", "DeleteObject", "DiscreteMaxLimit", "DamerauLevenshteinDistance", "DeletePermissionsKey", "DiscreteMinLimit", "Darker", "DeleteSearchIndex", "DiscretePlot", "Dashed", "DeleteSmallComponents", "DiscretePlot3D", "Dashing", "DeleteStopwords", "DiscreteRatio", "DatabaseConnect", "DelimitedSequence", "DiscreteRiccatiSolve", "DatabaseDisconnect", "Delimiter", "DiscreteShift", "DatabaseReference", "DelimiterFlashTime", "DiscreteTimeModelQ", "Databin", "Delimiters", "DiscreteUniformDistribution", "DatabinAdd", "DeliveryFunction", "DiscreteVariables", "DatabinRemove", "Dendrogram", "DiscreteWaveletData", "Databins", "Denominator", "DiscreteWaveletPacketTransform", "DatabinUpload", "DensityHistogram", "DiscreteWaveletTransform", "DataDistribution", "DensityPlot", "DiscretizeGraphics", "DataRange", "DensityPlot3D", "DiscretizeRegion", "DataReversed", "DependentVariables", "Discriminant", "Dataset", "Deploy", "DisjointQ", "DataStructure", "Deployed", "Disjunction", "DataStructureQ", "Depth", "Disk", "DateBounds", "DepthFirstScan", "DiskMatrix", "Dated", "Derivative", "DiskSegment", "DateDifference", "DerivativeFilter", "Dispatch", "DatedUnit", "DerivedKey", "DispersionEstimatorFunction", "DateFormat", "DescriptorStateSpace", "DisplayAllSteps", "DateFunction", "DesignMatrix", "DisplayEndPacket", "DateHistogram", "Det", "DisplayForm", "DateInterval", "DeviceClose", "DisplayFunction", "DateList", "DeviceConfigure", "DisplayPacket", "DateListLogPlot", "DeviceExecute", "DistanceFunction", "DateListPlot", "DeviceExecuteAsynchronous", "DistanceMatrix", "DateListStepPlot", "DeviceObject", "DistanceTransform", "DateObject", "DeviceOpen", "Distribute", "DateObjectQ", "DeviceRead", "Distributed", "DateOverlapsQ", "DeviceReadBuffer", "DistributedContexts", "DatePattern", "DeviceReadLatest", "DistributeDefinitions", "DatePlus", "DeviceReadList", "DistributionChart", "DateRange", "DeviceReadTimeSeries", "DistributionFitTest", "DateReduction", "Devices", "DistributionParameterAssumptions", "DateString", "DeviceStreams", "DistributionParameterQ", "DateTicksFormat", "DeviceWrite", "Dithering", "DateValue", "DeviceWriteBuffer", "Div", "DateWithinQ", "DGaussianWavelet", "Divide", "DaubechiesWavelet", "Diagonal", "DivideBy", "DavisDistribution", "DiagonalizableMatrixQ", "Dividers", "DawsonF", "DiagonalMatrix", "DivideSides", "DayCount", "DiagonalMatrixQ", "Divisible", "DayCountConvention", "Dialog", "Divisors", "DayHemisphere", "DialogInput", "DivisorSigma", "DaylightQ", "DialogNotebook", "DivisorSum", "DayMatchQ", "DialogProlog", "DMSList", "DayName", "DialogReturn", "DMSString", "DayNightTerminator", "DialogSymbols", "Do", "DayPlus", "Diamond", "DockedCells", "DayRange", "DiamondMatrix", "DocumentGenerator", "DayRound", "DiceDissimilarity", "DocumentGeneratorInformation", "DeBruijnGraph", "DictionaryLookup", "DocumentGenerators", "DeBruijnSequence", "DictionaryWordQ", "DocumentNotebook", "Decapitalize", "DifferenceDelta", "DocumentWeightingRules", "DecimalForm", "DifferenceQuotient", "Dodecahedron", "DeclarePackage", "DifferenceRoot", "DominantColors", "Decompose", "DifferenceRootReduce", "Dot", "DeconvolutionLayer", "Differences", "DotDashed", "Decrement", "DifferentialD", "DotEqual", "Decrypt", "DifferentialRoot", "DotLayer", "DecryptFile", "DifferentialRootReduce", "Dotted", "DedekindEta", "DifferentiatorFilter", "DoubleBracketingBar", "DeepSpaceProbeData", "DigitalSignature", "DoubleDownArrow", "Default", "DigitBlock", "DoubleLeftArrow", "DefaultAxesStyle", "DigitCharacter", "DoubleLeftRightArrow", "DefaultBaseStyle", "DigitCount", "DoubleLeftTee", "DefaultBoxStyle", "DigitQ", "DoubleLongLeftArrow", "DefaultButton", "DihedralAngle", "DoubleLongLeftRightArrow", "DefaultDuplicateCellStyle", "DihedralGroup", "DoubleLongRightArrow", "DefaultDuration", "Dilation", "DoubleRightArrow", "DefaultElement", "DimensionalCombinations", "DoubleRightTee", "DefaultFaceGridsStyle", "DimensionalMeshComponents", "DoubleUpArrow", "DefaultFieldHintStyle", "DimensionReduce", "DoubleUpDownArrow", "DefaultFrameStyle", "DimensionReducerFunction", "DoubleVerticalBar", "DefaultFrameTicksStyle", "DimensionReduction", "DownArrow", "DefaultGridLinesStyle", "Dimensions", "DownArrowBar", "DefaultLabelStyle", "DiracComb", "DownArrowUpArrow", "DefaultMenuStyle", "DiracDelta", "DownLeftRightVector", "DefaultNaturalLanguage", "DirectedEdge", "DownLeftTeeVector", "DefaultNewCellStyle", "DirectedEdges", "DownLeftVector", "DefaultOptions", "DirectedGraph", "DownLeftVectorBar", "DefaultPrintPrecision", "DirectedGraphQ", "DownRightTeeVector", "DefaultTicksStyle", "DirectedInfinity", "DownRightVector", "DefaultTooltipStyle", "Direction", "DownRightVectorBar", "Defer", "Directive", "Downsample", "DefineInputStreamMethod", "Directory", "DownTee", "DefineOutputStreamMethod", "DirectoryName", "DownTeeArrow", "DefineResourceFunction", "DirectoryQ", "DownValues", "Definition", "DirectoryStack", "Drop", "Degree", "DirichletBeta", "DropoutLayer", "DegreeCentrality", "DirichletCharacter", "DSolve", "DegreeGraphDistribution", "DirichletCondition", "DSolveValue", "DEigensystem", "DirichletConvolve", "Dt", "DEigenvalues", "DirichletDistribution", "DualPolyhedron", "Deinitialization", "DirichletEta", "DualSystemsModel", "Del", "DirichletL", "DumpSave", "DelaunayMesh", "DirichletLambda", "DuplicateFreeQ", "Delayed", "DirichletTransform", "Duration", "Deletable", "DirichletWindow", "Dynamic", "Delete", "DisableFormatting", "DynamicEvaluationTimeout", "DeleteAnomalies", "DiscreteAsymptotic", "DynamicGeoGraphics", "DeleteBorderComponents", "DiscreteChirpZTransform", "DynamicImage", "DeleteCases", "DiscreteConvolve", "DynamicModule", "DeleteChannel", "DiscreteDelta", "DynamicModuleValues", "DeleteCloudExpression", "DiscreteHadamardTransform", "DynamicSetting", "DeleteContents", "DiscreteIndicator", "DynamicUpdating", "DeleteDirectory", "DiscreteLimit", "DynamicWrapper", "DeleteDuplicates", "DiscreteLQEstimatorGains", "DeleteDuplicatesBy", "DiscreteLQRegulatorGains", "E", "EndOfFile", "EventHandler", "EarthImpactData", "EndOfLine", "EventLabels", "EarthquakeData", "EndOfString", "EventSeries", "EccentricityCentrality", "EndPackage", "ExactBlackmanWindow", "Echo", "EngineeringForm", "ExactNumberQ", "EchoFunction", "EnterExpressionPacket", "ExampleData", "EclipseType", "EnterTextPacket", "Except", "EdgeAdd", "Entity", "ExcludedForms", "EdgeBetweennessCentrality", "EntityClass", "ExcludedLines", "EdgeCapacity", "EntityClassList", "ExcludedPhysicalQuantities", "EdgeConnectivity", "EntityCopies", "ExcludePods", "EdgeContract", "EntityFunction", "Exclusions", "EdgeCost", "EntityGroup", "ExclusionsStyle", "EdgeCount", "EntityInstance", "Exists", "EdgeCoverQ", "EntityList", "Exit", "EdgeCycleMatrix", "EntityPrefetch", "ExoplanetData", "EdgeDelete", "EntityProperties", "Exp", "EdgeDetect", "EntityProperty", "Expand", "EdgeForm", "EntityPropertyClass", "ExpandAll", "EdgeIndex", "EntityRegister", "ExpandDenominator", "EdgeLabels", "EntityStore", "ExpandFileName", "EdgeLabelStyle", "EntityStores", "ExpandNumerator", "EdgeList", "EntityTypeName", "Expectation", "EdgeQ", "EntityUnregister", "ExpGammaDistribution", "EdgeRules", "EntityValue", "ExpIntegralE", "EdgeShapeFunction", "Entropy", "ExpIntegralEi", "EdgeStyle", "EntropyFilter", "ExpirationDate", "EdgeTaggedGraph", "Environment", "Exponent", "EdgeTaggedGraphQ", "Epilog", "ExponentFunction", "EdgeTags", "EpilogFunction", "ExponentialDistribution", "EdgeWeight", "Equal", "ExponentialFamily", "EdgeWeightedGraphQ", "EqualTilde", "ExponentialGeneratingFunction", "Editable", "EqualTo", "ExponentialMovingAverage", "EditDistance", "Equilibrium", "ExponentialPowerDistribution", "EffectiveInterest", "EquirippleFilterKernel", "ExponentStep", "Eigensystem", "Equivalent", "Export", "Eigenvalues", "Erf", "ExportByteArray", "EigenvectorCentrality", "Erfc", "ExportForm", "Eigenvectors", "Erfi", "ExportString", "Element", "ErlangB", "Expression", "ElementData", "ErlangC", "ExpressionCell", "ElementwiseLayer", "ErlangDistribution", "ExpressionGraph", "ElidedForms", "Erosion", "ExpToTrig", "Eliminate", "ErrorBox", "ExtendedEntityClass", "Ellipsoid", "EscapeRadius", "ExtendedGCD", "EllipticE", "EstimatedBackground", "Extension", "EllipticExp", "EstimatedDistribution", "ExtentElementFunction", "EllipticExpPrime", "EstimatedProcess", "ExtentMarkers", "EllipticF", "EstimatorGains", "ExtentSize", "EllipticFilterModel", "EstimatorRegulator", "ExternalBundle", "EllipticK", "EuclideanDistance", "ExternalEvaluate", "EllipticLog", "EulerAngles", "ExternalFunction", "EllipticNomeQ", "EulerCharacteristic", "ExternalIdentifier", "EllipticPi", "EulerE", "ExternalObject", "EllipticTheta", "EulerGamma", "ExternalOptions", "EllipticThetaPrime", "EulerianGraphQ", "ExternalSessionObject", "EmbedCode", "EulerMatrix", "ExternalSessions", "EmbeddedHTML", "EulerPhi", "ExternalStorageBase", "EmbeddedService", "Evaluatable", "ExternalStorageDownload", "EmbeddingLayer", "Evaluate", "ExternalStorageGet", "EmitSound", "EvaluatePacket", "ExternalStorageObject", "EmpiricalDistribution", "EvaluationBox", "ExternalStoragePut", "EmptyGraphQ", "EvaluationCell", "ExternalStorageUpload", "EmptyRegion", "EvaluationData", "ExternalTypeSignature", "Enabled", "EvaluationElements", "ExternalValue", "Encode", "EvaluationEnvironment", "Extract", "Encrypt", "EvaluationMonitor", "ExtractArchive", "EncryptedObject", "EvaluationNotebook", "ExtractLayer", "EncryptFile", "EvaluationObject", "ExtractPacletArchive", "End", "Evaluator", "ExtremeValueDistribution", "EndDialogPacket", "EvenQ", "EndOfBuffer", "EventData", "FaceAlign", "FindFaces", "ForceVersionInstall", "FaceForm", "FindFile", "Format", "FaceGrids", "FindFit", "FormatType", "FaceGridsStyle", "FindFormula", "FormBox", "FacialFeatures", "FindFundamentalCycles", "FormBoxOptions", "Factor", "FindGeneratingFunction", "FormControl", "Factorial", "FindGeoLocation", "FormFunction", "Factorial2", "FindGeometricConjectures", "FormLayoutFunction", "FactorialMoment", "FindGeometricTransform", "FormObject", "FactorialMomentGeneratingFunction", "FindGraphCommunities", "FormPage", "FactorialPower", "FindGraphIsomorphism", "FormulaData", "FactorInteger", "FindGraphPartition", "FormulaLookup", "FactorList", "FindHamiltonianCycle", "FortranForm", "FactorSquareFree", "FindHamiltonianPath", "Forward", "FactorSquareFreeList", "FindHiddenMarkovStates", "ForwardBackward", "FactorTerms", "FindImageText", "Fourier", "FactorTermsList", "FindIndependentEdgeSet", "FourierCoefficient", "Failure", "FindIndependentVertexSet", "FourierCosCoefficient", "FailureAction", "FindInstance", "FourierCosSeries", "FailureDistribution", "FindIntegerNullVector", "FourierCosTransform", "FailureQ", "FindKClan", "FourierDCT", "False", "FindKClique", "FourierDCTFilter", "FareySequence", "FindKClub", "FourierDCTMatrix", "FARIMAProcess", "FindKPlex", "FourierDST", "FeatureDistance", "FindLibrary", "FourierDSTMatrix", "FeatureExtract", "FindLinearRecurrence", "FourierMatrix", "FeatureExtraction", "FindList", "FourierParameters", "FeatureExtractor", "FindMatchingColor", "FourierSequenceTransform", "FeatureExtractorFunction", "FindMaximum", "FourierSeries", "FeatureNames", "FindMaximumCut", "FourierSinCoefficient", "FeatureNearest", "FindMaximumFlow", "FourierSinSeries", "FeatureSpacePlot", "FindMaxValue", "FourierSinTransform", "FeatureSpacePlot3D", "FindMeshDefects", "FourierTransform", "FeatureTypes", "FindMinimum", "FourierTrigSeries", "FeedbackLinearize", "FindMinimumCostFlow", "FractionalBrownianMotionProcess", "FeedbackSector", "FindMinimumCut", "FractionalGaussianNoiseProcess", "FeedbackSectorStyle", "FindMinValue", "FractionalPart", "FeedbackType", "FindMoleculeSubstructure", "FractionBox", "FetalGrowthData", "FindPath", "FractionBoxOptions", "Fibonacci", "FindPeaks", "Frame", "Fibonorial", "FindPermutation", "FrameBox", "FieldCompletionFunction", "FindPostmanTour", "FrameBoxOptions", "FieldHint", "FindProcessParameters", "Framed", "FieldHintStyle", "FindRepeat", "FrameLabel", "FieldMasked", "FindRoot", "FrameMargins", "FieldSize", "FindSequenceFunction", "FrameRate", "File", "FindSettings", "FrameStyle", "FileBaseName", "FindShortestPath", "FrameTicks", "FileByteCount", "FindShortestTour", "FrameTicksStyle", "FileConvert", "FindSpanningTree", "FRatioDistribution", "FileDate", "FindSystemModelEquilibrium", "FrechetDistribution", "FileExistsQ", "FindTextualAnswer", "FreeQ", "FileExtension", "FindThreshold", "FrenetSerretSystem", "FileFormat", "FindTransientRepeat", "FrequencySamplingFilterKernel", "FileHash", "FindVertexCover", "FresnelC", "FileNameDepth", "FindVertexCut", "FresnelF", "FileNameDrop", "FindVertexIndependentPaths", "FresnelG", "FileNameForms", "FinishDynamic", "FresnelS", "FileNameJoin", "FiniteAbelianGroupCount", "Friday", "FileNames", "FiniteGroupCount", "FrobeniusNumber", "FileNameSetter", "FiniteGroupData", "FrobeniusSolve", "FileNameSplit", "First", "FromAbsoluteTime", "FileNameTake", "FirstCase", "FromCharacterCode", "FilePrint", "FirstPassageTimeDistribution", "FromCoefficientRules", "FileSize", "FirstPosition", "FromContinuedFraction", "FileSystemMap", "FischerGroupFi22", "FromDigits", "FileSystemScan", "FischerGroupFi23", "FromDMS", "FileTemplate", "FischerGroupFi24Prime", "FromEntity", "FileTemplateApply", "FisherHypergeometricDistribution", "FromJulianDate", "FileType", "FisherRatioTest", "FromLetterNumber", "FilledCurve", "FisherZDistribution", "FromPolarCoordinates", "Filling", "Fit", "FromRomanNumeral", "FillingStyle", "FitRegularization", "FromSphericalCoordinates", "FillingTransform", "FittedModel", "FromUnixTime", "FilteredEntityClass", "FixedOrder", "Front", "FilterRules", "FixedPoint", "FrontEndDynamicExpression", "FinancialBond", "FixedPointList", "FrontEndEventActions", "FinancialData", "Flat", "FrontEndExecute", "FinancialDerivative", "Flatten", "FrontEndToken", "FinancialIndicator", "FlattenAt", "FrontEndTokenExecute", "Find", "FlattenLayer", "Full", "FindAnomalies", "FlatTopWindow", "FullDefinition", "FindArgMax", "FlipView", "FullForm", "FindArgMin", "Floor", "FullGraphics", "FindChannels", "FlowPolynomial", "FullInformationOutputRegulator", "FindClique", "Fold", "FullRegion", "FindClusters", "FoldList", "FullSimplify", "FindCookies", "FoldPair", "Function", "FindCurvePath", "FoldPairList", "FunctionCompile", "FindCycle", "FollowRedirects", "FunctionCompileExport", "FindDevices", "FontColor", "FunctionCompileExportByteArray", "FindDistribution", "FontFamily", "FunctionCompileExportLibrary", "FindDistributionParameters", "FontSize", "FunctionCompileExportString", "FindDivisions", "FontSlant", "FunctionDomain", "FindEdgeCover", "FontSubstitutions", "FunctionExpand", "FindEdgeCut", "FontTracking", "FunctionInterpolation", "FindEdgeIndependentPaths", "FontVariations", "FunctionPeriod", "FindEquationalProof", "FontWeight", "FunctionRange", "FindEulerianCycle", "For", "FunctionSpace", "FindExternalEvaluators", "ForAll", "FussellVeselyImportance", "GaborFilter", "GeoGraphics", "Graph", "GaborMatrix", "GeogravityModelData", "Graph3D", "GaborWavelet", "GeoGridDirectionDifference", "GraphAssortativity", "GainMargins", "GeoGridLines", "GraphAutomorphismGroup", "GainPhaseMargins", "GeoGridLinesStyle", "GraphCenter", "GalaxyData", "GeoGridPosition", "GraphComplement", "GalleryView", "GeoGridRange", "GraphData", "Gamma", "GeoGridRangePadding", "GraphDensity", "GammaDistribution", "GeoGridUnitArea", "GraphDiameter", "GammaRegularized", "GeoGridUnitDistance", "GraphDifference", "GapPenalty", "GeoGridVector", "GraphDisjointUnion", "GARCHProcess", "GeoGroup", "GraphDistance", "GatedRecurrentLayer", "GeoHemisphere", "GraphDistanceMatrix", "Gather", "GeoHemisphereBoundary", "GraphEmbedding", "GatherBy", "GeoHistogram", "GraphHighlight", "GaugeFaceElementFunction", "GeoIdentify", "GraphHighlightStyle", "GaugeFaceStyle", "GeoImage", "GraphHub", "GaugeFrameElementFunction", "GeoLabels", "Graphics", "GaugeFrameSize", "GeoLength", "Graphics3D", "GaugeFrameStyle", "GeoListPlot", "GraphicsColumn", "GaugeLabels", "GeoLocation", "GraphicsComplex", "GaugeMarkers", "GeologicalPeriodData", "GraphicsGrid", "GaugeStyle", "GeomagneticModelData", "GraphicsGroup", "GaussianFilter", "GeoMarker", "GraphicsRow", "GaussianIntegers", "GeometricAssertion", "GraphIntersection", "GaussianMatrix", "GeometricBrownianMotionProcess", "GraphLayout", "GaussianOrthogonalMatrixDistribution", "GeometricDistribution", "GraphLinkEfficiency", "GaussianSymplecticMatrixDistribution", "GeometricMean", "GraphPeriphery", "GaussianUnitaryMatrixDistribution", "GeometricMeanFilter", "GraphPlot", "GaussianWindow", "GeometricOptimization", "GraphPlot3D", "GCD", "GeometricScene", "GraphPower", "GegenbauerC", "GeometricTransformation", "GraphPropertyDistribution", "General", "GeoModel", "GraphQ", "GeneralizedLinearModelFit", "GeoNearest", "GraphRadius", "GenerateAsymmetricKeyPair", "GeoPath", "GraphReciprocity", "GenerateConditions", "GeoPosition", "GraphUnion", "GeneratedCell", "GeoPositionENU", "Gray", "GeneratedDocumentBinding", "GeoPositionXYZ", "GrayLevel", "GenerateDerivedKey", "GeoProjection", "Greater", "GenerateDigitalSignature", "GeoProjectionData", "GreaterEqual", "GenerateDocument", "GeoRange", "GreaterEqualLess", "GeneratedParameters", "GeoRangePadding", "GreaterEqualThan", "GeneratedQuantityMagnitudes", "GeoRegionValuePlot", "GreaterFullEqual", "GenerateFileSignature", "GeoResolution", "GreaterGreater", "GenerateHTTPResponse", "GeoScaleBar", "GreaterLess", "GenerateSecuredAuthenticationKey", "GeoServer", "GreaterSlantEqual", "GenerateSymmetricKey", "GeoSmoothHistogram", "GreaterThan", "GeneratingFunction", "GeoStreamPlot", "GreaterTilde", "GeneratorDescription", "GeoStyling", "Green", "GeneratorHistoryLength", "GeoStylingImageFunction", "GreenFunction", "GeneratorOutputType", "GeoVariant", "Grid", "GenericCylindricalDecomposition", "GeoVector", "GridBox", "GenomeData", "GeoVectorENU", "GridDefaultElement", "GenomeLookup", "GeoVectorPlot", "GridGraph", "GeoAntipode", "GeoVectorXYZ", "GridLines", "GeoArea", "GeoVisibleRegion", "GridLinesStyle", "GeoArraySize", "GeoVisibleRegionBoundary", "GroebnerBasis", "GeoBackground", "GeoWithinQ", "GroupActionBase", "GeoBoundingBox", "GeoZoomLevel", "GroupBy", "GeoBounds", "GestureHandler", "GroupCentralizer", "GeoBoundsRegion", "Get", "GroupElementFromWord", "GeoBubbleChart", "GetEnvironment", "GroupElementPosition", "GeoCenter", "Glaisher", "GroupElementQ", "GeoCircle", "GlobalClusteringCoefficient", "GroupElements", "GeoContourPlot", "Glow", "GroupElementToWord", "GeoDensityPlot", "GoldenAngle", "GroupGenerators", "GeodesicClosing", "GoldenRatio", "Groupings", "GeodesicDilation", "GompertzMakehamDistribution", "GroupMultiplicationTable", "GeodesicErosion", "GoochShading", "GroupOrbits", "GeodesicOpening", "GoodmanKruskalGamma", "GroupOrder", "GeoDestination", "GoodmanKruskalGammaTest", "GroupPageBreakWithin", "GeodesyData", "Goto", "GroupSetwiseStabilizer", "GeoDirection", "Grad", "GroupStabilizer", "GeoDisk", "Gradient", "GroupStabilizerChain", "GeoDisplacement", "GradientFilter", "GrowCutComponents", "GeoDistance", "GradientOrientationFilter", "Gudermannian", "GeoDistanceList", "GrammarApply", "GuidedFilter", "GeoElevationData", "GrammarRules", "GumbelDistribution", "GeoEntities", "GrammarToken", "HaarWavelet", "HermiteH", "HoldComplete", "HadamardMatrix", "HermitianMatrixQ", "HoldFirst", "HalfLine", "HessenbergDecomposition", "HoldForm", "HalfNormalDistribution", "HeunB", "HoldPattern", "HalfPlane", "HeunBPrime", "HoldRest", "HalfSpace", "HeunC", "HolidayCalendar", "HalftoneShading", "HeunCPrime", "HorizontalGauge", "HamiltonianGraphQ", "HeunD", "HornerForm", "HammingDistance", "HeunDPrime", "HostLookup", "HammingWindow", "HeunG", "HotellingTSquareDistribution", "HandlerFunctions", "HeunGPrime", "HoytDistribution", "HandlerFunctionsKeys", "HeunT", "HTTPErrorResponse", "HankelH1", "HeunTPrime", "HTTPRedirect", "HankelH2", "HexadecimalCharacter", "HTTPRequest", "HankelMatrix", "Hexahedron", "HTTPRequestData", "HankelTransform", "HiddenItems", "HTTPResponse", "HannPoissonWindow", "HiddenMarkovProcess", "Hue", "HannWindow", "Highlighted", "HumanGrowthData", "HaradaNortonGroupHN", "HighlightGraph", "HumpDownHump", "HararyGraph", "HighlightImage", "HumpEqual", "HarmonicMean", "HighlightMesh", "HurwitzLerchPhi", "HarmonicMeanFilter", "HighpassFilter", "HurwitzZeta", "HarmonicNumber", "HigmanSimsGroupHS", "HyperbolicDistribution", "Hash", "HilbertCurve", "HypercubeGraph", "HatchFilling", "HilbertFilter", "HyperexponentialDistribution", "HatchShading", "HilbertMatrix", "Hyperfactorial", "Haversine", "Histogram", "Hypergeometric0F1", "HazardFunction", "Histogram3D", "Hypergeometric0F1Regularized", "Head", "HistogramDistribution", "Hypergeometric1F1", "HeaderAlignment", "HistogramList", "Hypergeometric1F1Regularized", "HeaderBackground", "HistogramTransform", "Hypergeometric2F1", "HeaderDisplayFunction", "HistogramTransformInterpolation", "Hypergeometric2F1Regularized", "HeaderLines", "HistoricalPeriodData", "HypergeometricDistribution", "HeaderSize", "HitMissTransform", "HypergeometricPFQ", "HeaderStyle", "HITSCentrality", "HypergeometricPFQRegularized", "Heads", "HjorthDistribution", "HypergeometricU", "HeavisideLambda", "HodgeDual", "Hyperlink", "HeavisidePi", "HoeffdingD", "HyperlinkAction", "HeavisideTheta", "HoeffdingDTest", "Hyperplane", "HeldGroupHe", "Hold", "Hyphenation", "Here", "HoldAll", "HypoexponentialDistribution", "HermiteDecomposition", "HoldAllComplete", "HypothesisTestData", "I", "ImageSizeMultipliers", "IntegerName", "IconData", "ImageSubtract", "IntegerPart", "Iconize", "ImageTake", "IntegerPartitions", "IconRules", "ImageTransformation", "IntegerQ", "Icosahedron", "ImageTrim", "IntegerReverse", "Identity", "ImageType", "Integers", "IdentityMatrix", "ImageValue", "IntegerString", "If", "ImageValuePositions", "Integrate", "IgnoreCase", "ImagingDevice", "Interactive", "IgnoreDiacritics", "ImplicitRegion", "InteractiveTradingChart", "IgnorePunctuation", "Implies", "Interleaving", "IgnoringInactive", "Import", "InternallyBalancedDecomposition", "Im", "ImportByteArray", "InterpolatingFunction", "Image", "ImportOptions", "InterpolatingPolynomial", "Image3D", "ImportString", "Interpolation", "Image3DProjection", "ImprovementImportance", "InterpolationOrder", "Image3DSlices", "In", "InterpolationPoints", "ImageAccumulate", "Inactivate", "Interpretation", "ImageAdd", "Inactive", "InterpretationBox", "ImageAdjust", "IncidenceGraph", "InterpretationBoxOptions", "ImageAlign", "IncidenceList", "Interpreter", "ImageApply", "IncidenceMatrix", "InterquartileRange", "ImageApplyIndexed", "IncludeAromaticBonds", "Interrupt", "ImageAspectRatio", "IncludeConstantBasis", "IntersectedEntityClass", "ImageAssemble", "IncludeDefinitions", "IntersectingQ", "ImageAugmentationLayer", "IncludeDirectories", "Intersection", "ImageBoundingBoxes", "IncludeGeneratorTasks", "Interval", "ImageCapture", "IncludeHydrogens", "IntervalIntersection", "ImageCaptureFunction", "IncludeInflections", "IntervalMarkers", "ImageCases", "IncludeMetaInformation", "IntervalMarkersStyle", "ImageChannels", "IncludePods", "IntervalMemberQ", "ImageClip", "IncludeQuantities", "IntervalSlider", "ImageCollage", "IncludeRelatedTables", "IntervalUnion", "ImageColorSpace", "IncludeWindowTimes", "Inverse", "ImageCompose", "Increment", "InverseBetaRegularized", "ImageContainsQ", "IndefiniteMatrixQ", "InverseCDF", "ImageContents", "IndependenceTest", "InverseChiSquareDistribution", "ImageConvolve", "IndependentEdgeSetQ", "InverseContinuousWaveletTransform", "ImageCooccurrence", "IndependentPhysicalQuantity", "InverseDistanceTransform", "ImageCorners", "IndependentUnit", "InverseEllipticNomeQ", "ImageCorrelate", "IndependentUnitDimension", "InverseErf", "ImageCorrespondingPoints", "IndependentVertexSetQ", "InverseErfc", "ImageCrop", "Indeterminate", "InverseFourier", "ImageData", "IndeterminateThreshold", "InverseFourierCosTransform", "ImageDeconvolve", "Indexed", "InverseFourierSequenceTransform", "ImageDemosaic", "IndexEdgeTaggedGraph", "InverseFourierSinTransform", "ImageDifference", "IndexGraph", "InverseFourierTransform", "ImageDimensions", "InexactNumberQ", "InverseFunction", "ImageDisplacements", "InfiniteFuture", "InverseFunctions", "ImageDistance", "InfiniteLine", "InverseGammaDistribution", "ImageEffect", "InfinitePast", "InverseGammaRegularized", "ImageExposureCombine", "InfinitePlane", "InverseGaussianDistribution", "ImageFeatureTrack", "Infinity", "InverseGudermannian", "ImageFileApply", "Infix", "InverseHankelTransform", "ImageFileFilter", "InflationAdjust", "InverseHaversine", "ImageFileScan", "InflationMethod", "InverseImagePyramid", "ImageFilter", "Information", "InverseJacobiCD", "ImageFocusCombine", "Inherited", "InverseJacobiCN", "ImageForestingComponents", "InheritScope", "InverseJacobiCS", "ImageFormattingWidth", "InhomogeneousPoissonProcess", "InverseJacobiDC", "ImageForwardTransformation", "InitialEvaluationHistory", "InverseJacobiDN", "ImageGraphics", "Initialization", "InverseJacobiDS", "ImageHistogram", "InitializationCell", "InverseJacobiNC", "ImageIdentify", "InitializationObjects", "InverseJacobiND", "ImageInstanceQ", "InitializationValue", "InverseJacobiNS", "ImageKeypoints", "Initialize", "InverseJacobiSC", "ImageLabels", "InitialSeeding", "InverseJacobiSD", "ImageLegends", "Inner", "InverseJacobiSN", "ImageLevels", "InnerPolygon", "InverseLaplaceTransform", "ImageLines", "InnerPolyhedron", "InverseMellinTransform", "ImageMargins", "Inpaint", "InversePermutation", "ImageMarker", "Input", "InverseRadon", "ImageMeasurements", "InputAliases", "InverseRadonTransform", "ImageMesh", "InputAssumptions", "InverseSeries", "ImageMultiply", "InputAutoReplacements", "InverseShortTimeFourier", "ImagePad", "InputField", "InverseSpectrogram", "ImagePadding", "InputForm", "InverseSurvivalFunction", "ImagePartition", "InputNamePacket", "InverseTransformedRegion", "ImagePeriodogram", "InputNotebook", "InverseWaveletTransform", "ImagePerspectiveTransformation", "InputPacket", "InverseWeierstrassP", "ImagePosition", "InputStream", "InverseWishartMatrixDistribution", "ImagePreviewFunction", "InputString", "InverseZTransform", "ImagePyramid", "InputStringPacket", "Invisible", "ImagePyramidApply", "Insert", "IPAddress", "ImageQ", "InsertionFunction", "IrreduciblePolynomialQ", "ImageRecolor", "InsertLinebreaks", "IslandData", "ImageReflect", "InsertResults", "IsolatingInterval", "ImageResize", "Inset", "IsomorphicGraphQ", "ImageResolution", "Insphere", "IsotopeData", "ImageRestyle", "Install", "Italic", "ImageRotate", "InstallService", "Item", "ImageSaliencyFilter", "InString", "ItemAspectRatio", "ImageScaled", "Integer", "ItemDisplayFunction", "ImageScan", "IntegerDigits", "ItemSize", "ImageSize", "IntegerExponent", "ItemStyle", "ImageSizeAction", "IntegerLength", "ItoProcess", "JaccardDissimilarity", "JacobiSC", "JoinAcross", "JacobiAmplitude", "JacobiSD", "Joined", "JacobiCD", "JacobiSN", "JoinedCurve", "JacobiCN", "JacobiSymbol", "JoinForm", "JacobiCS", "JacobiZeta", "JordanDecomposition", "JacobiDC", "JankoGroupJ1", "JordanModelDecomposition", "JacobiDN", "JankoGroupJ2", "JulianDate", "JacobiDS", "JankoGroupJ3", "JuliaSetBoettcher", "JacobiNC", "JankoGroupJ4", "JuliaSetIterationCount", "JacobiND", "JarqueBeraALMTest", "JuliaSetPlot", "JacobiNS", "JohnsonDistribution", "JuliaSetPoints", "JacobiP", "Join", "KagiChart", "KernelObject", "Khinchin", "KaiserBesselWindow", "Kernels", "KillProcess", "KaiserWindow", "Key", "KirchhoffGraph", "KalmanEstimator", "KeyCollisionFunction", "KirchhoffMatrix", "KalmanFilter", "KeyComplement", "KleinInvariantJ", "KarhunenLoeveDecomposition", "KeyDrop", "KnapsackSolve", "KaryTree", "KeyDropFrom", "KnightTourGraph", "KatzCentrality", "KeyExistsQ", "KnotData", "KCoreComponents", "KeyFreeQ", "KnownUnitQ", "KDistribution", "KeyIntersection", "KochCurve", "KEdgeConnectedComponents", "KeyMap", "KolmogorovSmirnovTest", "KEdgeConnectedGraphQ", "KeyMemberQ", "KroneckerDelta", "KeepExistingVersion", "KeypointStrength", "KroneckerModelDecomposition", "KelvinBei", "Keys", "KroneckerProduct", "KelvinBer", "KeySelect", "KroneckerSymbol", "KelvinKei", "KeySort", "KuiperTest", "KelvinKer", "KeySortBy", "KumaraswamyDistribution", "KendallTau", "KeyTake", "Kurtosis", "KendallTauTest", "KeyUnion", "KuwaharaFilter", "KernelFunction", "KeyValueMap", "KVertexConnectedComponents", "KernelMixtureDistribution", "KeyValuePattern", "KVertexConnectedGraphQ", "LABColor", "LetterQ", "ListPickerBox", "Label", "Level", "ListPickerBoxOptions", "Labeled", "LeveneTest", "ListPlay", "LabelingFunction", "LeviCivitaTensor", "ListPlot", "LabelingSize", "LevyDistribution", "ListPlot3D", "LabelStyle", "LibraryDataType", "ListPointPlot3D", "LabelVisibility", "LibraryFunction", "ListPolarPlot", "LaguerreL", "LibraryFunctionError", "ListQ", "LakeData", "LibraryFunctionInformation", "ListSliceContourPlot3D", "LambdaComponents", "LibraryFunctionLoad", "ListSliceDensityPlot3D", "LaminaData", "LibraryFunctionUnload", "ListSliceVectorPlot3D", "LanczosWindow", "LibraryLoad", "ListStepPlot", "LandauDistribution", "LibraryUnload", "ListStreamDensityPlot", "Language", "LiftingFilterData", "ListStreamPlot", "LanguageCategory", "LiftingWaveletTransform", "ListSurfacePlot3D", "LanguageData", "LightBlue", "ListVectorDensityPlot", "LanguageIdentify", "LightBrown", "ListVectorPlot", "LaplaceDistribution", "LightCyan", "ListVectorPlot3D", "LaplaceTransform", "Lighter", "ListZTransform", "Laplacian", "LightGray", "LocalAdaptiveBinarize", "LaplacianFilter", "LightGreen", "LocalCache", "LaplacianGaussianFilter", "Lighting", "LocalClusteringCoefficient", "Large", "LightingAngle", "LocalizeVariables", "Larger", "LightMagenta", "LocalObject", "Last", "LightOrange", "LocalObjects", "Latitude", "LightPink", "LocalResponseNormalizationLayer", "LatitudeLongitude", "LightPurple", "LocalSubmit", "LatticeData", "LightRed", "LocalSymbol", "LatticeReduce", "LightYellow", "LocalTime", "LaunchKernels", "Likelihood", "LocalTimeZone", "LayeredGraphPlot", "Limit", "LocationEquivalenceTest", "LayerSizeFunction", "LimitsPositioning", "LocationTest", "LCHColor", "LindleyDistribution", "Locator", "LCM", "Line", "LocatorAutoCreate", "LeaderSize", "LinearFractionalOptimization", "LocatorPane", "LeafCount", "LinearFractionalTransform", "LocatorRegion", "LeapYearQ", "LinearGradientImage", "Locked", "LearnDistribution", "LinearizingTransformationData", "Log", "LearnedDistribution", "LinearLayer", "Log10", "LearningRate", "LinearModelFit", "Log2", "LearningRateMultipliers", "LinearOffsetFunction", "LogBarnesG", "LeastSquares", "LinearOptimization", "LogGamma", "LeastSquaresFilterKernel", "LinearProgramming", "LogGammaDistribution", "Left", "LinearRecurrence", "LogicalExpand", "LeftArrow", "LinearSolve", "LogIntegral", "LeftArrowBar", "LinearSolveFunction", "LogisticDistribution", "LeftArrowRightArrow", "LineBreakChart", "LogisticSigmoid", "LeftDownTeeVector", "LineGraph", "LogitModelFit", "LeftDownVector", "LineIndent", "LogLikelihood", "LeftDownVectorBar", "LineIndentMaxFraction", "LogLinearPlot", "LeftRightArrow", "LineIntegralConvolutionPlot", "LogLogisticDistribution", "LeftRightVector", "LineIntegralConvolutionScale", "LogLogPlot", "LeftTee", "LineLegend", "LogMultinormalDistribution", "LeftTeeArrow", "LineSpacing", "LogNormalDistribution", "LeftTeeVector", "LinkActivate", "LogPlot", "LeftTriangle", "LinkClose", "LogRankTest", "LeftTriangleBar", "LinkConnect", "LogSeriesDistribution", "LeftTriangleEqual", "LinkCreate", "Longest", "LeftUpDownVector", "LinkFunction", "LongestCommonSequence", "LeftUpTeeVector", "LinkInterrupt", "LongestCommonSequencePositions", "LeftUpVector", "LinkLaunch", "LongestCommonSubsequence", "LeftUpVectorBar", "LinkObject", "LongestCommonSubsequencePositions", "LeftVector", "LinkPatterns", "LongestOrderedSequence", "LeftVectorBar", "LinkProtocol", "Longitude", "LegendAppearance", "LinkRankCentrality", "LongLeftArrow", "Legended", "LinkRead", "LongLeftRightArrow", "LegendFunction", "LinkReadyQ", "LongRightArrow", "LegendLabel", "Links", "LongShortTermMemoryLayer", "LegendLayout", "LinkWrite", "Lookup", "LegendMargins", "LiouvilleLambda", "LoopFreeGraphQ", "LegendMarkers", "List", "Looping", "LegendMarkerSize", "Listable", "LossFunction", "LegendreP", "ListAnimate", "LowerCaseQ", "LegendreQ", "ListContourPlot", "LowerLeftArrow", "Length", "ListContourPlot3D", "LowerRightArrow", "LengthWhile", "ListConvolve", "LowerTriangularize", "LerchPhi", "ListCorrelate", "LowerTriangularMatrixQ", "Less", "ListCurvePathPlot", "LowpassFilter", "LessEqual", "ListDeconvolve", "LQEstimatorGains", "LessEqualGreater", "ListDensityPlot", "LQGRegulator", "LessEqualThan", "ListDensityPlot3D", "LQOutputRegulatorGains", "LessFullEqual", "ListFormat", "LQRegulatorGains", "LessGreater", "ListFourierSequenceTransform", "LucasL", "LessLess", "ListInterpolation", "LuccioSamiComponents", "LessSlantEqual", "ListLineIntegralConvolutionPlot", "LUDecomposition", "LessThan", "ListLinePlot", "LunarEclipse", "LessTilde", "ListLogLinearPlot", "LUVColor", "LetterCharacter", "ListLogLogPlot", "LyapunovSolve", "LetterCounts", "ListLogPlot", "LyonsGroupLy", "LetterNumber", "ListPicker", "MachineNumberQ", "MaxMemoryUsed", "MinimalPolynomial", "MachinePrecision", "MaxMixtureKernels", "MinimalStateSpaceModel", "Magenta", "MaxOverlapFraction", "Minimize", "Magnification", "MaxPlotPoints", "MinimumTimeIncrement", "Magnify", "MaxRecursion", "MinIntervalSize", "MailAddressValidation", "MaxStableDistribution", "MinkowskiQuestionMark", "MailExecute", "MaxStepFraction", "MinLimit", "MailFolder", "MaxSteps", "MinMax", "MailItem", "MaxStepSize", "MinorPlanetData", "MailReceiverFunction", "MaxTrainingRounds", "Minors", "MailResponseFunction", "MaxValue", "MinStableDistribution", "MailSearch", "MaxwellDistribution", "Minus", "MailServerConnect", "MaxWordGap", "MinusPlus", "MailServerConnection", "McLaughlinGroupMcL", "MinValue", "MailSettings", "Mean", "Missing", "Majority", "MeanAbsoluteLossLayer", "MissingBehavior", "MakeBoxes", "MeanAround", "MissingDataMethod", "MakeExpression", "MeanClusteringCoefficient", "MissingDataRules", "ManagedLibraryExpressionID", "MeanDegreeConnectivity", "MissingQ", "ManagedLibraryExpressionQ", "MeanDeviation", "MissingString", "MandelbrotSetBoettcher", "MeanFilter", "MissingStyle", "MandelbrotSetDistance", "MeanGraphDistance", "MissingValuePattern", "MandelbrotSetIterationCount", "MeanNeighborDegree", "MittagLefflerE", "MandelbrotSetMemberQ", "MeanShift", "MixedFractionParts", "MandelbrotSetPlot", "MeanShiftFilter", "MixedGraphQ", "MangoldtLambda", "MeanSquaredLossLayer", "MixedMagnitude", "ManhattanDistance", "Median", "MixedRadix", "Manipulate", "MedianDeviation", "MixedRadixQuantity", "Manipulator", "MedianFilter", "MixedUnit", "MannedSpaceMissionData", "MedicalTestData", "MixtureDistribution", "MannWhitneyTest", "Medium", "Mod", "MantissaExponent", "MeijerG", "Modal", "Manual", "MeijerGReduce", "ModularInverse", "Map", "MeixnerDistribution", "ModularLambda", "MapAll", "MellinConvolve", "Module", "MapAt", "MellinTransform", "Modulus", "MapIndexed", "MemberQ", "MoebiusMu", "MAProcess", "MemoryAvailable", "Molecule", "MapThread", "MemoryConstrained", "MoleculeContainsQ", "MarchenkoPasturDistribution", "MemoryConstraint", "MoleculeEquivalentQ", "MarcumQ", "MemoryInUse", "MoleculeGraph", "MardiaCombinedTest", "MengerMesh", "MoleculeModify", "MardiaKurtosisTest", "MenuCommandKey", "MoleculePattern", "MardiaSkewnessTest", "MenuPacket", "MoleculePlot", "MarginalDistribution", "MenuSortingValue", "MoleculePlot3D", "MarkovProcessProperties", "MenuStyle", "MoleculeProperty", "Masking", "MenuView", "MoleculeQ", "MatchingDissimilarity", "Merge", "MoleculeRecognize", "MatchLocalNames", "MergingFunction", "MoleculeValue", "MatchQ", "MersennePrimeExponent", "Moment", "MathematicalFunctionData", "MersennePrimeExponentQ", "MomentConvert", "MathieuC", "Mesh", "MomentEvaluate", "MathieuCharacteristicA", "MeshCellCentroid", "MomentGeneratingFunction", "MathieuCharacteristicB", "MeshCellCount", "MomentOfInertia", "MathieuCharacteristicExponent", "MeshCellHighlight", "Monday", "MathieuCPrime", "MeshCellIndex", "Monitor", "MathieuGroupM11", "MeshCellLabel", "MonomialList", "MathieuGroupM12", "MeshCellMarker", "MonsterGroupM", "MathieuGroupM22", "MeshCellMeasure", "MoonPhase", "MathieuGroupM23", "MeshCellQuality", "MoonPosition", "MathieuGroupM24", "MeshCells", "MorletWavelet", "MathieuS", "MeshCellShapeFunction", "MorphologicalBinarize", "MathieuSPrime", "MeshCellStyle", "MorphologicalBranchPoints", "MathMLForm", "MeshConnectivityGraph", "MorphologicalComponents", "Matrices", "MeshCoordinates", "MorphologicalEulerNumber", "MatrixExp", "MeshFunctions", "MorphologicalGraph", "MatrixForm", "MeshPrimitives", "MorphologicalPerimeter", "MatrixFunction", "MeshQualityGoal", "MorphologicalTransform", "MatrixLog", "MeshRefinementFunction", "MortalityData", "MatrixNormalDistribution", "MeshRegion", "Most", "MatrixPlot", "MeshRegionQ", "MountainData", "MatrixPower", "MeshShading", "MouseAnnotation", "MatrixPropertyDistribution", "MeshStyle", "MouseAppearance", "MatrixQ", "Message", "Mouseover", "MatrixRank", "MessageDialog", "MousePosition", "MatrixTDistribution", "MessageList", "MovieData", "Max", "MessageName", "MovingAverage", "MaxCellMeasure", "MessagePacket", "MovingMap", "MaxColorDistance", "Messages", "MovingMedian", "MaxDate", "MetaInformation", "MoyalDistribution", "MaxDetect", "MeteorShowerData", "Multicolumn", "MaxDuration", "Method", "MultiedgeStyle", "MaxExtraBandwidths", "MexicanHatWavelet", "MultigraphQ", "MaxExtraConditions", "MeyerWavelet", "Multinomial", "MaxFeatureDisplacement", "Midpoint", "MultinomialDistribution", "MaxFeatures", "Min", "MultinormalDistribution", "MaxFilter", "MinColorDistance", "MultiplicativeOrder", "MaximalBy", "MinDate", "MultiplySides", "Maximize", "MinDetect", "Multiselection", "MaxItems", "MineralData", "MultivariateHypergeometricDistribution", "MaxIterations", "MinFilter", "MultivariatePoissonDistribution", "MaxLimit", "MinimalBy", "MultivariateTDistribution", "N", "NHoldFirst", "NotificationFunction", "NakagamiDistribution", "NHoldRest", "NotLeftTriangle", "NameQ", "NicholsGridLines", "NotLeftTriangleBar", "Names", "NicholsPlot", "NotLeftTriangleEqual", "Nand", "NightHemisphere", "NotLess", "NArgMax", "NIntegrate", "NotLessEqual", "NArgMin", "NMaximize", "NotLessFullEqual", "NBodySimulation", "NMaxValue", "NotLessGreater", "NBodySimulationData", "NMinimize", "NotLessLess", "NCache", "NMinValue", "NotLessSlantEqual", "NDEigensystem", "NominalVariables", "NotLessTilde", "NDEigenvalues", "NoncentralBetaDistribution", "NotNestedGreaterGreater", "NDSolve", "NoncentralChiSquareDistribution", "NotNestedLessLess", "NDSolveValue", "NoncentralFRatioDistribution", "NotPrecedes", "Nearest", "NoncentralStudentTDistribution", "NotPrecedesEqual", "NearestFunction", "NonCommutativeMultiply", "NotPrecedesSlantEqual", "NearestMeshCells", "NonConstants", "NotPrecedesTilde", "NearestNeighborGraph", "NondimensionalizationTransform", "NotReverseElement", "NearestTo", "None", "NotRightTriangle", "NebulaData", "NoneTrue", "NotRightTriangleBar", "NeedlemanWunschSimilarity", "NonlinearModelFit", "NotRightTriangleEqual", "Needs", "NonlinearStateSpaceModel", "NotSquareSubset", "Negative", "NonlocalMeansFilter", "NotSquareSubsetEqual", "NegativeBinomialDistribution", "NonNegative", "NotSquareSuperset", "NegativeDefiniteMatrixQ", "NonNegativeIntegers", "NotSquareSupersetEqual", "NegativeIntegers", "NonNegativeRationals", "NotSubset", "NegativeMultinomialDistribution", "NonNegativeReals", "NotSubsetEqual", "NegativeRationals", "NonPositive", "NotSucceeds", "NegativeReals", "NonPositiveIntegers", "NotSucceedsEqual", "NegativeSemidefiniteMatrixQ", "NonPositiveRationals", "NotSucceedsSlantEqual", "NeighborhoodData", "NonPositiveReals", "NotSucceedsTilde", "NeighborhoodGraph", "Nor", "NotSuperset", "Nest", "NorlundB", "NotSupersetEqual", "NestedGreaterGreater", "Norm", "NotTilde", "NestedLessLess", "Normal", "NotTildeEqual", "NestGraph", "NormalDistribution", "NotTildeFullEqual", "NestList", "NormalizationLayer", "NotTildeTilde", "NestWhile", "Normalize", "NotVerticalBar", "NestWhileList", "Normalized", "Now", "NetAppend", "NormalizedSquaredEuclideanDistance", "NoWhitespace", "NetBidirectionalOperator", "NormalMatrixQ", "NProbability", "NetChain", "NormalsFunction", "NProduct", "NetDecoder", "NormFunction", "NRoots", "NetDelete", "Not", "NSolve", "NetDrop", "NotCongruent", "NSum", "NetEncoder", "NotCupCap", "NuclearExplosionData", "NetEvaluationMode", "NotDoubleVerticalBar", "NuclearReactorData", "NetExtract", "Notebook", "Null", "NetFlatten", "NotebookApply", "NullRecords", "NetFoldOperator", "NotebookAutoSave", "NullSpace", "NetGANOperator", "NotebookClose", "NullWords", "NetGraph", "NotebookDelete", "Number", "NetInitialize", "NotebookDirectory", "NumberCompose", "NetInsert", "NotebookDynamicExpression", "NumberDecompose", "NetInsertSharedArrays", "NotebookEvaluate", "NumberExpand", "NetJoin", "NotebookEventActions", "NumberFieldClassNumber", "NetMapOperator", "NotebookFileName", "NumberFieldDiscriminant", "NetMapThreadOperator", "NotebookFind", "NumberFieldFundamentalUnits", "NetMeasurements", "NotebookGet", "NumberFieldIntegralBasis", "NetModel", "NotebookImport", "NumberFieldNormRepresentatives", "NetNestOperator", "NotebookInformation", "NumberFieldRegulator", "NetPairEmbeddingOperator", "NotebookLocate", "NumberFieldRootsOfUnity", "NetPort", "NotebookObject", "NumberFieldSignature", "NetPortGradient", "NotebookOpen", "NumberForm", "NetPrepend", "NotebookPrint", "NumberFormat", "NetRename", "NotebookPut", "NumberLinePlot", "NetReplace", "NotebookRead", "NumberMarks", "NetReplacePart", "Notebooks", "NumberMultiplier", "NetSharedArray", "NotebookSave", "NumberPadding", "NetStateObject", "NotebookSelection", "NumberPoint", "NetTake", "NotebooksMenu", "NumberQ", "NetTrain", "NotebookTemplate", "NumberSeparator", "NetTrainResultsObject", "NotebookWrite", "NumberSigns", "NetworkPacketCapture", "NotElement", "NumberString", "NetworkPacketRecording", "NotEqualTilde", "Numerator", "NetworkPacketTrace", "NotExists", "NumeratorDenominator", "NeumannValue", "NotGreater", "NumericalOrder", "NevilleThetaC", "NotGreaterEqual", "NumericalSort", "NevilleThetaD", "NotGreaterFullEqual", "NumericArray", "NevilleThetaN", "NotGreaterGreater", "NumericArrayQ", "NevilleThetaS", "NotGreaterLess", "NumericArrayType", "NExpectation", "NotGreaterSlantEqual", "NumericFunction", "NextCell", "NotGreaterTilde", "NumericQ", "NextDate", "Nothing", "NuttallWindow", "NextPrime", "NotHumpDownHump", "NyquistGridLines", "NHoldAll", "NotHumpEqual", "NyquistPlot", "O", "OperatingSystem", "OuterPolyhedron", "ObservabilityGramian", "OperatorApplied", "OutputControllabilityMatrix", "ObservabilityMatrix", "OptimumFlowData", "OutputControllableModelQ", "ObservableDecomposition", "Optional", "OutputForm", "ObservableModelQ", "OptionalElement", "OutputNamePacket", "OceanData", "Options", "OutputResponse", "Octahedron", "OptionsPattern", "OutputSizeLimit", "OddQ", "OptionValue", "OutputStream", "Off", "Or", "OverBar", "Offset", "Orange", "OverDot", "On", "Order", "Overflow", "ONanGroupON", "OrderDistribution", "OverHat", "Once", "OrderedQ", "Overlaps", "OneIdentity", "Ordering", "Overlay", "Opacity", "OrderingBy", "Overscript", "OpacityFunction", "OrderingLayer", "OverscriptBox", "OpacityFunctionScaling", "Orderless", "OverscriptBoxOptions", "OpenAppend", "OrderlessPatternSequence", "OverTilde", "Opener", "OrnsteinUhlenbeckProcess", "OverVector", "OpenerView", "Orthogonalize", "OverwriteTarget", "Opening", "OrthogonalMatrixQ", "OwenT", "OpenRead", "Out", "OwnValues", "OpenWrite", "Outer", "Operate", "OuterPolygon", "PacletDataRebuild", "PeriodicBoundaryCondition", "PolynomialLCM", "PacletDirectoryLoad", "Periodogram", "PolynomialMod", "PacletDirectoryUnload", "PeriodogramArray", "PolynomialQ", "PacletDisable", "Permanent", "PolynomialQuotient", "PacletEnable", "Permissions", "PolynomialQuotientRemainder", "PacletFind", "PermissionsGroup", "PolynomialReduce", "PacletFindRemote", "PermissionsGroups", "PolynomialRemainder", "PacletInstall", "PermissionsKey", "PoolingLayer", "PacletInstallSubmit", "PermissionsKeys", "PopupMenu", "PacletNewerQ", "PermutationCycles", "PopupView", "PacletObject", "PermutationCyclesQ", "PopupWindow", "PacletSite", "PermutationGroup", "Position", "PacletSiteObject", "PermutationLength", "PositionIndex", "PacletSiteRegister", "PermutationList", "Positive", "PacletSites", "PermutationListQ", "PositiveDefiniteMatrixQ", "PacletSiteUnregister", "PermutationMax", "PositiveIntegers", "PacletSiteUpdate", "PermutationMin", "PositiveRationals", "PacletUninstall", "PermutationOrder", "PositiveReals", "PaddedForm", "PermutationPower", "PositiveSemidefiniteMatrixQ", "Padding", "PermutationProduct", "PossibleZeroQ", "PaddingLayer", "PermutationReplace", "Postfix", "PaddingSize", "Permutations", "Power", "PadeApproximant", "PermutationSupport", "PowerDistribution", "PadLeft", "Permute", "PowerExpand", "PadRight", "PeronaMalikFilter", "PowerMod", "PageBreakAbove", "PerpendicularBisector", "PowerModList", "PageBreakBelow", "PersistenceLocation", "PowerRange", "PageBreakWithin", "PersistenceTime", "PowerSpectralDensity", "PageFooters", "PersistentObject", "PowersRepresentations", "PageHeaders", "PersistentObjects", "PowerSymmetricPolynomial", "PageRankCentrality", "PersistentValue", "PrecedenceForm", "PageTheme", "PersonData", "Precedes", "PageWidth", "PERTDistribution", "PrecedesEqual", "Pagination", "PetersenGraph", "PrecedesSlantEqual", "PairedBarChart", "PhaseMargins", "PrecedesTilde", "PairedHistogram", "PhaseRange", "Precision", "PairedSmoothHistogram", "PhysicalSystemData", "PrecisionGoal", "PairedTTest", "Pi", "PreDecrement", "PairedZTest", "Pick", "Predict", "PaletteNotebook", "PIDData", "PredictorFunction", "PalindromeQ", "PIDDerivativeFilter", "PredictorMeasurements", "Pane", "PIDFeedforward", "PredictorMeasurementsObject", "Panel", "PIDTune", "PreemptProtect", "Paneled", "Piecewise", "Prefix", "PaneSelector", "PiecewiseExpand", "PreIncrement", "ParabolicCylinderD", "PieChart", "Prepend", "ParagraphIndent", "PieChart3D", "PrependLayer", "ParagraphSpacing", "PillaiTrace", "PrependTo", "ParallelArray", "PillaiTraceTest", "PreprocessingRules", "ParallelCombine", "PingTime", "PreserveColor", "ParallelDo", "Pink", "PreserveImageOptions", "Parallelepiped", "PitchRecognize", "PreviousCell", "ParallelEvaluate", "PixelValue", "PreviousDate", "Parallelization", "PixelValuePositions", "PriceGraphDistribution", "Parallelize", "Placed", "Prime", "ParallelMap", "Placeholder", "PrimeNu", "ParallelNeeds", "PlaceholderReplace", "PrimeOmega", "Parallelogram", "Plain", "PrimePi", "ParallelProduct", "PlanarAngle", "PrimePowerQ", "ParallelSubmit", "PlanarGraph", "PrimeQ", "ParallelSum", "PlanarGraphQ", "Primes", "ParallelTable", "PlanckRadiationLaw", "PrimeZetaP", "ParallelTry", "PlaneCurveData", "PrimitivePolynomialQ", "ParameterEstimator", "PlanetaryMoonData", "PrimitiveRoot", "ParameterMixtureDistribution", "PlanetData", "PrimitiveRootList", "ParametricFunction", "PlantData", "PrincipalComponents", "ParametricNDSolve", "Play", "PrincipalValue", "ParametricNDSolveValue", "PlayRange", "Print", "ParametricPlot", "Plot", "PrintableASCIIQ", "ParametricPlot3D", "Plot3D", "PrintingStyleEnvironment", "ParametricRampLayer", "PlotLabel", "Printout3D", "ParametricRegion", "PlotLabels", "Printout3DPreviewer", "ParentBox", "PlotLayout", "PrintTemporary", "ParentCell", "PlotLegends", "Prism", "ParentDirectory", "PlotMarkers", "PrivateCellOptions", "ParentNotebook", "PlotPoints", "PrivateFontOptions", "ParetoDistribution", "PlotRange", "PrivateKey", "ParetoPickandsDistribution", "PlotRangeClipping", "PrivateNotebookOptions", "ParkData", "PlotRangePadding", "Probability", "Part", "PlotRegion", "ProbabilityDistribution", "PartBehavior", "PlotStyle", "ProbabilityPlot", "PartialCorrelationFunction", "PlotTheme", "ProbabilityScalePlot", "ParticleAcceleratorData", "Pluralize", "ProbitModelFit", "ParticleData", "Plus", "ProcessConnection", "Partition", "PlusMinus", "ProcessDirectory", "PartitionGranularity", "Pochhammer", "ProcessEnvironment", "PartitionsP", "PodStates", "Processes", "PartitionsQ", "PodWidth", "ProcessEstimator", "PartLayer", "Point", "ProcessInformation", "PartOfSpeech", "PointFigureChart", "ProcessObject", "PartProtection", "PointLegend", "ProcessParameterAssumptions", "ParzenWindow", "PointSize", "ProcessParameterQ", "PascalDistribution", "PoissonConsulDistribution", "ProcessStatus", "PassEventsDown", "PoissonDistribution", "Product", "PassEventsUp", "PoissonProcess", "ProductDistribution", "Paste", "PoissonWindow", "ProductLog", "PasteButton", "PolarAxes", "ProgressIndicator", "Path", "PolarAxesOrigin", "Projection", "PathGraph", "PolarGridLines", "Prolog", "PathGraphQ", "PolarPlot", "ProofObject", "Pattern", "PolarTicks", "Proportion", "PatternFilling", "PoleZeroMarkers", "Proportional", "PatternSequence", "PolyaAeppliDistribution", "Protect", "PatternTest", "PolyGamma", "Protected", "PauliMatrix", "Polygon", "ProteinData", "PaulWavelet", "PolygonalNumber", "Pruning", "Pause", "PolygonAngle", "PseudoInverse", "PDF", "PolygonCoordinates", "PsychrometricPropertyData", "PeakDetect", "PolygonDecomposition", "PublicKey", "PeanoCurve", "Polyhedron", "PublisherID", "PearsonChiSquareTest", "PolyhedronAngle", "PulsarData", "PearsonCorrelationTest", "PolyhedronCoordinates", "PunctuationCharacter", "PearsonDistribution", "PolyhedronData", "Purple", "PercentForm", "PolyhedronDecomposition", "Put", "PerfectNumber", "PolyhedronGenus", "PutAppend", "PerfectNumberQ", "PolyLog", "Pyramid", "PerformanceGoal", "PolynomialExtendedGCD", "Perimeter", "PolynomialGCD", "QBinomial", "Quantity", "Quartics", "QFactorial", "QuantityArray", "QuartileDeviation", "QGamma", "QuantityDistribution", "Quartiles", "QHypergeometricPFQ", "QuantityForm", "QuartileSkewness", "QnDispersion", "QuantityMagnitude", "Query", "QPochhammer", "QuantityQ", "QueueingNetworkProcess", "QPolyGamma", "QuantityUnit", "QueueingProcess", "QRDecomposition", "QuantityVariable", "QueueProperties", "QuadraticIrrationalQ", "QuantityVariableCanonicalUnit", "Quiet", "QuadraticOptimization", "QuantityVariableDimensions", "Quit", "Quantile", "QuantityVariableIdentifier", "Quotient", "QuantilePlot", "QuantityVariablePhysicalQuantity", "QuotientRemainder", "RadialGradientImage", "RegionEqual", "Restricted", "RadialityCentrality", "RegionFillingStyle", "Resultant", "RadicalBox", "RegionFunction", "Return", "RadicalBoxOptions", "RegionImage", "ReturnExpressionPacket", "RadioButton", "RegionIntersection", "ReturnPacket", "RadioButtonBar", "RegionMeasure", "ReturnReceiptFunction", "Radon", "RegionMember", "ReturnTextPacket", "RadonTransform", "RegionMemberFunction", "Reverse", "RamanujanTau", "RegionMoment", "ReverseApplied", "RamanujanTauL", "RegionNearest", "ReverseBiorthogonalSplineWavelet", "RamanujanTauTheta", "RegionNearestFunction", "ReverseElement", "RamanujanTauZ", "RegionPlot", "ReverseEquilibrium", "Ramp", "RegionPlot3D", "ReverseGraph", "RandomChoice", "RegionProduct", "ReverseSort", "RandomColor", "RegionQ", "ReverseSortBy", "RandomComplex", "RegionResize", "ReverseUpEquilibrium", "RandomEntity", "RegionSize", "RevolutionAxis", "RandomFunction", "RegionSymmetricDifference", "RevolutionPlot3D", "RandomGeoPosition", "RegionUnion", "RGBColor", "RandomGraph", "RegionWithin", "RiccatiSolve", "RandomImage", "RegisterExternalEvaluator", "RiceDistribution", "RandomInstance", "RegularExpression", "RidgeFilter", "RandomInteger", "Regularization", "RiemannR", "RandomPermutation", "RegularlySampledQ", "RiemannSiegelTheta", "RandomPoint", "RegularPolygon", "RiemannSiegelZ", "RandomPolygon", "ReIm", "RiemannXi", "RandomPolyhedron", "ReImLabels", "Riffle", "RandomPrime", "ReImPlot", "Right", "RandomReal", "ReImStyle", "RightArrow", "RandomSample", "RelationalDatabase", "RightArrowBar", "RandomSeeding", "RelationGraph", "RightArrowLeftArrow", "RandomVariate", "ReleaseHold", "RightComposition", "RandomWalkProcess", "ReliabilityDistribution", "RightCosetRepresentative", "RandomWord", "ReliefImage", "RightDownTeeVector", "Range", "ReliefPlot", "RightDownVector", "RangeFilter", "RemoteAuthorizationCaching", "RightDownVectorBar", "RankedMax", "RemoteConnect", "RightTee", "RankedMin", "RemoteConnectionObject", "RightTeeArrow", "RarerProbability", "RemoteFile", "RightTeeVector", "Raster", "RemoteRun", "RightTriangle", "Raster3D", "RemoteRunProcess", "RightTriangleBar", "Rasterize", "Remove", "RightTriangleEqual", "RasterSize", "RemoveAlphaChannel", "RightUpDownVector", "Rational", "RemoveAudioStream", "RightUpTeeVector", "Rationalize", "RemoveBackground", "RightUpVector", "Rationals", "RemoveChannelListener", "RightUpVectorBar", "Ratios", "RemoveChannelSubscribers", "RightVector", "RawBoxes", "RemoveDiacritics", "RightVectorBar", "RawData", "RemoveInputStreamMethod", "RiskAchievementImportance", "RayleighDistribution", "RemoveOutputStreamMethod", "RiskReductionImportance", "Re", "RemoveUsers", "RogersTanimotoDissimilarity", "Read", "RemoveVideoStream", "RollPitchYawAngles", "ReadByteArray", "RenameDirectory", "RollPitchYawMatrix", "ReadLine", "RenameFile", "RomanNumeral", "ReadList", "RenderingOptions", "Root", "ReadProtected", "RenewalProcess", "RootApproximant", "ReadString", "RenkoChart", "RootIntervals", "Real", "RepairMesh", "RootLocusPlot", "RealAbs", "Repeated", "RootMeanSquare", "RealBlockDiagonalForm", "RepeatedNull", "RootOfUnityQ", "RealDigits", "RepeatedTiming", "RootReduce", "RealExponent", "RepeatingElement", "Roots", "Reals", "Replace", "RootSum", "RealSign", "ReplaceAll", "Rotate", "Reap", "ReplaceImageValue", "RotateLabel", "RecognitionPrior", "ReplaceList", "RotateLeft", "Record", "ReplacePart", "RotateRight", "RecordLists", "ReplacePixelValue", "RotationAction", "RecordSeparators", "ReplaceRepeated", "RotationMatrix", "Rectangle", "ReplicateLayer", "RotationTransform", "RectangleChart", "RequiredPhysicalQuantities", "Round", "RectangleChart3D", "Resampling", "RoundingRadius", "RectangularRepeatingElement", "ResamplingAlgorithmData", "Row", "RecurrenceFilter", "ResamplingMethod", "RowAlignments", "RecurrenceTable", "Rescale", "RowBox", "Red", "RescalingTransform", "RowLines", "Reduce", "ResetDirectory", "RowMinHeight", "ReferenceLineStyle", "ReshapeLayer", "RowReduce", "Refine", "Residue", "RowsEqual", "ReflectionMatrix", "ResizeLayer", "RowSpacings", "ReflectionTransform", "Resolve", "RSolve", "Refresh", "ResourceData", "RSolveValue", "RefreshRate", "ResourceFunction", "RudinShapiro", "Region", "ResourceObject", "RudvalisGroupRu", "RegionBinarize", "ResourceRegister", "Rule", "RegionBoundary", "ResourceRemove", "RuleDelayed", "RegionBoundaryStyle", "ResourceSearch", "RulePlot", "RegionBounds", "ResourceSubmit", "RulerUnits", "RegionCentroid", "ResourceSystemBase", "Run", "RegionDifference", "ResourceSystemPath", "RunProcess", "RegionDimension", "ResourceUpdate", "RunThrough", "RegionDisjoint", "ResourceVersion", "RuntimeAttributes", "RegionDistance", "ResponseForm", "RuntimeOptions", "RegionDistanceFunction", "Rest", "RussellRaoDissimilarity", "RegionEmbeddingDimension", "RestartInterval", "SameQ", "SingularValueDecomposition", "StreamDensityPlot", "SameTest", "SingularValueList", "StreamMarkers", "SameTestProperties", "SingularValuePlot", "StreamPlot", "SampledEntityClass", "Sinh", "StreamPoints", "SampleDepth", "SinhIntegral", "StreamPosition", "SampledSoundFunction", "SinIntegral", "Streams", "SampledSoundList", "SixJSymbol", "StreamScale", "SampleRate", "Skeleton", "StreamStyle", "SamplingPeriod", "SkeletonTransform", "String", "SARIMAProcess", "SkellamDistribution", "StringCases", "SARMAProcess", "Skewness", "StringContainsQ", "SASTriangle", "SkewNormalDistribution", "StringCount", "SatelliteData", "Skip", "StringDelete", "SatisfiabilityCount", "SliceContourPlot3D", "StringDrop", "SatisfiabilityInstances", "SliceDensityPlot3D", "StringEndsQ", "SatisfiableQ", "SliceDistribution", "StringExpression", "Saturday", "SliceVectorPlot3D", "StringExtract", "Save", "Slider", "StringForm", "SaveConnection", "Slider2D", "StringFormat", "SaveDefinitions", "SlideView", "StringFreeQ", "SavitzkyGolayMatrix", "Slot", "StringInsert", "SawtoothWave", "SlotSequence", "StringJoin", "Scale", "Small", "StringLength", "Scaled", "SmallCircle", "StringMatchQ", "ScaleDivisions", "Smaller", "StringPadLeft", "ScaleOrigin", "SmithDecomposition", "StringPadRight", "ScalePadding", "SmithDelayCompensator", "StringPart", "ScaleRanges", "SmithWatermanSimilarity", "StringPartition", "ScaleRangeStyle", "SmoothDensityHistogram", "StringPosition", "ScalingFunctions", "SmoothHistogram", "StringQ", "ScalingMatrix", "SmoothHistogram3D", "StringRepeat", "ScalingTransform", "SmoothKernelDistribution", "StringReplace", "Scan", "SnDispersion", "StringReplaceList", "ScheduledTask", "Snippet", "StringReplacePart", "SchurDecomposition", "SnubPolyhedron", "StringReverse", "ScientificForm", "SocialMediaData", "StringRiffle", "ScientificNotationThreshold", "SocketConnect", "StringRotateLeft", "ScorerGi", "SocketListen", "StringRotateRight", "ScorerGiPrime", "SocketListener", "StringSkeleton", "ScorerHi", "SocketObject", "StringSplit", "ScorerHiPrime", "SocketOpen", "StringStartsQ", "ScreenStyleEnvironment", "SocketReadMessage", "StringTake", "ScriptBaselineShifts", "SocketReadyQ", "StringTemplate", "ScriptMinSize", "Sockets", "StringToByteArray", "ScriptSizeMultipliers", "SocketWaitAll", "StringToStream", "Scrollbars", "SocketWaitNext", "StringTrim", "ScrollingOptions", "SoftmaxLayer", "StripBoxes", "ScrollPosition", "SokalSneathDissimilarity", "StripOnInput", "SearchAdjustment", "SolarEclipse", "StripWrapperBoxes", "SearchIndexObject", "SolarSystemFeatureData", "StructuralImportance", "SearchIndices", "SolidAngle", "StructuredSelection", "SearchQueryString", "SolidData", "StruveH", "SearchResultObject", "SolidRegionQ", "StruveL", "Sec", "Solve", "Stub", "Sech", "SolveAlways", "StudentTDistribution", "SechDistribution", "Sort", "Style", "SecondOrderConeOptimization", "SortBy", "StyleBox", "SectorChart", "SortedBy", "StyleData", "SectorChart3D", "SortedEntityClass", "StyleDefinitions", "SectorOrigin", "Sound", "Subdivide", "SectorSpacing", "SoundNote", "Subfactorial", "SecuredAuthenticationKey", "SoundVolume", "Subgraph", "SecuredAuthenticationKeys", "SourceLink", "SubMinus", "SeedRandom", "Sow", "SubPlus", "Select", "SpaceCurveData", "SubresultantPolynomialRemainders", "Selectable", "Spacer", "SubresultantPolynomials", "SelectComponents", "Spacings", "Subresultants", "SelectedCells", "Span", "Subscript", "SelectedNotebook", "SpanFromAbove", "SubscriptBox", "SelectFirst", "SpanFromBoth", "SubscriptBoxOptions", "SelectionCreateCell", "SpanFromLeft", "Subsequences", "SelectionEvaluate", "SparseArray", "Subset", "SelectionEvaluateCreateCell", "SpatialGraphDistribution", "SubsetCases", "SelectionMove", "SpatialMedian", "SubsetCount", "SelfLoopStyle", "SpatialTransformationLayer", "SubsetEqual", "SemanticImport", "Speak", "SubsetMap", "SemanticImportString", "SpeakerMatchQ", "SubsetPosition", "SemanticInterpretation", "SpearmanRankTest", "SubsetQ", "SemialgebraicComponentInstances", "SpearmanRho", "SubsetReplace", "SemidefiniteOptimization", "SpeciesData", "Subsets", "SendMail", "SpecificityGoal", "SubStar", "SendMessage", "SpectralLineData", "SubstitutionSystem", "Sequence", "Spectrogram", "Subsuperscript", "SequenceAlignment", "SpectrogramArray", "SubsuperscriptBox", "SequenceCases", "Specularity", "SubsuperscriptBoxOptions", "SequenceCount", "SpeechCases", "SubtitleEncoding", "SequenceFold", "SpeechInterpreter", "SubtitleTracks", "SequenceFoldList", "SpeechRecognize", "Subtract", "SequenceHold", "SpeechSynthesize", "SubtractFrom", "SequenceLastLayer", "SpellingCorrection", "SubtractSides", "SequenceMostLayer", "SpellingCorrectionList", "Succeeds", "SequencePosition", "SpellingOptions", "SucceedsEqual", "SequencePredict", "Sphere", "SucceedsSlantEqual", "SequencePredictorFunction", "SpherePoints", "SucceedsTilde", "SequenceReplace", "SphericalBesselJ", "Success", "SequenceRestLayer", "SphericalBesselY", "SuchThat", "SequenceReverseLayer", "SphericalHankelH1", "Sum", "SequenceSplit", "SphericalHankelH2", "SumConvergence", "Series", "SphericalHarmonicY", "SummationLayer", "SeriesCoefficient", "SphericalPlot3D", "Sunday", "SeriesData", "SphericalRegion", "SunPosition", "SeriesTermGoal", "SphericalShell", "Sunrise", "ServiceConnect", "SpheroidalEigenvalue", "Sunset", "ServiceDisconnect", "SpheroidalJoiningFactor", "SuperDagger", "ServiceExecute", "SpheroidalPS", "SuperMinus", "ServiceObject", "SpheroidalPSPrime", "SupernovaData", "ServiceRequest", "SpheroidalQS", "SuperPlus", "ServiceSubmit", "SpheroidalQSPrime", "Superscript", "SessionSubmit", "SpheroidalRadialFactor", "SuperscriptBox", "SessionTime", "SpheroidalS1", "SuperscriptBoxOptions", "Set", "SpheroidalS1Prime", "Superset", "SetAccuracy", "SpheroidalS2", "SupersetEqual", "SetAlphaChannel", "SpheroidalS2Prime", "SuperStar", "SetAttributes", "Splice", "Surd", "SetCloudDirectory", "SplicedDistribution", "SurdForm", "SetCookies", "SplineClosed", "SurfaceArea", "SetDelayed", "SplineDegree", "SurfaceData", "SetDirectory", "SplineKnots", "SurvivalDistribution", "SetEnvironment", "SplineWeights", "SurvivalFunction", "SetFileDate", "Split", "SurvivalModel", "SetOptions", "SplitBy", "SurvivalModelFit", "SetPermissions", "SpokenString", "SuzukiDistribution", "SetPrecision", "Sqrt", "SuzukiGroupSuz", "SetSelectedNotebook", "SqrtBox", "SwatchLegend", "SetSharedFunction", "SqrtBoxOptions", "Switch", "SetSharedVariable", "Square", "Symbol", "SetStreamPosition", "SquaredEuclideanDistance", "SymbolName", "SetSystemModel", "SquareFreeQ", "SymletWavelet", "SetSystemOptions", "SquareIntersection", "Symmetric", "Setter", "SquareMatrixQ", "SymmetricGroup", "SetterBar", "SquareRepeatingElement", "SymmetricKey", "Setting", "SquaresR", "SymmetricMatrixQ", "SetUsers", "SquareSubset", "SymmetricPolynomial", "Shallow", "SquareSubsetEqual", "SymmetricReduction", "ShannonWavelet", "SquareSuperset", "Symmetrize", "ShapiroWilkTest", "SquareSupersetEqual", "SymmetrizedArray", "Share", "SquareUnion", "SymmetrizedArrayRules", "SharingList", "SquareWave", "SymmetrizedDependentComponents", "Sharpen", "SSSTriangle", "SymmetrizedIndependentComponents", "ShearingMatrix", "StabilityMargins", "SymmetrizedReplacePart", "ShearingTransform", "StabilityMarginsStyle", "SynchronousInitialization", "ShellRegion", "StableDistribution", "SynchronousUpdating", "ShenCastanMatrix", "Stack", "Synonyms", "ShiftedGompertzDistribution", "StackBegin", "SyntaxForm", "ShiftRegisterSequence", "StackComplete", "SyntaxInformation", "Short", "StackedDateListPlot", "SyntaxLength", "ShortDownArrow", "StackedListPlot", "SyntaxPacket", "Shortest", "StackInhibit", "SyntaxQ", "ShortestPathFunction", "StadiumShape", "SynthesizeMissingValues", "ShortLeftArrow", "StandardAtmosphereData", "SystemCredential", "ShortRightArrow", "StandardDeviation", "SystemCredentialData", "ShortTimeFourier", "StandardDeviationFilter", "SystemCredentialKey", "ShortTimeFourierData", "StandardForm", "SystemCredentialKeys", "ShortUpArrow", "Standardize", "SystemCredentialStoreObject", "Show", "Standardized", "SystemDialogInput", "ShowAutoSpellCheck", "StandardOceanData", "SystemInformation", "ShowAutoStyles", "StandbyDistribution", "SystemInstall", "ShowCellBracket", "Star", "SystemModel", "ShowCellLabel", "StarClusterData", "SystemModeler", "ShowCellTags", "StarData", "SystemModelExamples", "ShowCursorTracker", "StarGraph", "SystemModelLinearize", "ShowGroupOpener", "StartExternalSession", "SystemModelParametricSimulate", "ShowPageBreaks", "StartingStepSize", "SystemModelPlot", "ShowSelection", "StartOfLine", "SystemModelProgressReporting", "ShowSpecialCharacters", "StartOfString", "SystemModelReliability", "ShowStringCharacters", "StartProcess", "SystemModels", "ShrinkingDelay", "StartWebSession", "SystemModelSimulate", "SiderealTime", "StateFeedbackGains", "SystemModelSimulateSensitivity", "SiegelTheta", "StateOutputEstimator", "SystemModelSimulationData", "SiegelTukeyTest", "StateResponse", "SystemOpen", "SierpinskiCurve", "StateSpaceModel", "SystemOptions", "SierpinskiMesh", "StateSpaceRealization", "SystemProcessData", "Sign", "StateSpaceTransform", "SystemProcesses", "Signature", "StateTransformationLinearize", "SystemsConnectionsModel", "SignedRankTest", "StationaryDistribution", "SystemsModelDelay", "SignedRegionDistance", "StationaryWaveletPacketTransform", "SystemsModelDelayApproximate", "SignificanceLevel", "StationaryWaveletTransform", "SystemsModelDelete", "SignPadding", "StatusArea", "SystemsModelDimensions", "SignTest", "StatusCentrality", "SystemsModelExtract", "SimilarityRules", "StepMonitor", "SystemsModelFeedbackConnect", "SimpleGraph", "StereochemistryElements", "SystemsModelLabels", "SimpleGraphQ", "StieltjesGamma", "SystemsModelLinearity", "SimplePolygonQ", "StippleShading", "SystemsModelMerge", "SimplePolyhedronQ", "StirlingS1", "SystemsModelOrder", "Simplex", "StirlingS2", "SystemsModelParallelConnect", "Simplify", "StoppingPowerData", "SystemsModelSeriesConnect", "Sin", "StrataVariables", "SystemsModelStateFeedbackConnect", "Sinc", "StratonovichProcess", "SystemsModelVectorRelativeOrders", "SinghMaddalaDistribution", "StreamColorFunction", "SingleLetterItalics", "StreamColorFunctionScaling", "Table", "Thickness", "TraceDepth", "TableAlignments", "Thin", "TraceDialog", "TableDepth", "Thinning", "TraceForward", "TableDirections", "ThompsonGroupTh", "TraceOff", "TableForm", "Thread", "TraceOn", "TableHeadings", "ThreadingLayer", "TraceOriginal", "TableSpacing", "ThreeJSymbol", "TracePrint", "TableView", "Threshold", "TraceScan", "TabView", "Through", "TrackedSymbols", "TagBox", "Throw", "TrackingFunction", "TagBoxOptions", "ThueMorse", "TracyWidomDistribution", "TaggingRules", "Thumbnail", "TradingChart", "TagSet", "Thursday", "TraditionalForm", "TagSetDelayed", "Ticks", "TrainingProgressCheckpointing", "TagUnset", "TicksStyle", "TrainingProgressFunction", "Take", "TideData", "TrainingProgressMeasurements", "TakeDrop", "Tilde", "TrainingProgressReporting", "TakeLargest", "TildeEqual", "TrainingStoppingCriterion", "TakeLargestBy", "TildeFullEqual", "TrainingUpdateSchedule", "TakeList", "TildeTilde", "TransferFunctionCancel", "TakeSmallest", "TimeConstrained", "TransferFunctionExpand", "TakeSmallestBy", "TimeConstraint", "TransferFunctionFactor", "TakeWhile", "TimeDirection", "TransferFunctionModel", "Tally", "TimeFormat", "TransferFunctionPoles", "Tan", "TimeGoal", "TransferFunctionTransform", "Tanh", "TimelinePlot", "TransferFunctionZeros", "TargetDevice", "TimeObject", "TransformationClass", "TargetFunctions", "TimeObjectQ", "TransformationFunction", "TargetSystem", "TimeRemaining", "TransformationFunctions", "TargetUnits", "Times", "TransformationMatrix", "TaskAbort", "TimesBy", "TransformedDistribution", "TaskExecute", "TimeSeries", "TransformedField", "TaskObject", "TimeSeriesAggregate", "TransformedProcess", "TaskRemove", "TimeSeriesForecast", "TransformedRegion", "TaskResume", "TimeSeriesInsert", "TransitionDirection", "Tasks", "TimeSeriesInvertibility", "TransitionDuration", "TaskSuspend", "TimeSeriesMap", "TransitionEffect", "TaskWait", "TimeSeriesMapThread", "TransitiveClosureGraph", "TautologyQ", "TimeSeriesModel", "TransitiveReductionGraph", "TelegraphProcess", "TimeSeriesModelFit", "Translate", "TemplateApply", "TimeSeriesResample", "TranslationOptions", "TemplateBox", "TimeSeriesRescale", "TranslationTransform", "TemplateBoxOptions", "TimeSeriesShift", "Transliterate", "TemplateExpression", "TimeSeriesThread", "Transparent", "TemplateIf", "TimeSeriesWindow", "Transpose", "TemplateObject", "TimeUsed", "TransposeLayer", "TemplateSequence", "TimeValue", "TravelDirections", "TemplateSlot", "TimeZone", "TravelDirectionsData", "TemplateWith", "TimeZoneConvert", "TravelDistance", "TemporalData", "TimeZoneOffset", "TravelDistanceList", "TemporalRegularity", "Timing", "TravelMethod", "Temporary", "Tiny", "TravelTime", "TensorContract", "TitsGroupT", "TreeForm", "TensorDimensions", "ToBoxes", "TreeGraph", "TensorExpand", "ToCharacterCode", "TreeGraphQ", "TensorProduct", "ToContinuousTimeModel", "TreePlot", "TensorRank", "Today", "TrendStyle", "TensorReduce", "ToDiscreteTimeModel", "Triangle", "TensorSymmetry", "ToEntity", "TriangleCenter", "TensorTranspose", "ToeplitzMatrix", "TriangleConstruct", "TensorWedge", "ToExpression", "TriangleMeasurement", "TestID", "Together", "TriangleWave", "TestReport", "Toggler", "TriangularDistribution", "TestReportObject", "TogglerBar", "TriangulateMesh", "TestResultObject", "ToInvertibleTimeSeries", "Trig", "Tetrahedron", "TokenWords", "TrigExpand", "TeXForm", "Tolerance", "TrigFactor", "Text", "ToLowerCase", "TrigFactorList", "TextAlignment", "Tomorrow", "Trigger", "TextCases", "ToNumberField", "TrigReduce", "TextCell", "Tooltip", "TrigToExp", "TextClipboardType", "TooltipDelay", "TrimmedMean", "TextContents", "TooltipStyle", "TrimmedVariance", "TextData", "ToonShading", "TropicalStormData", "TextElement", "Top", "True", "TextGrid", "TopHatTransform", "TrueQ", "TextJustification", "ToPolarCoordinates", "TruncatedDistribution", "TextPacket", "TopologicalSort", "TruncatedPolyhedron", "TextPosition", "ToRadicals", "TsallisQExponentialDistribution", "TextRecognize", "ToRules", "TsallisQGaussianDistribution", "TextSearch", "ToSphericalCoordinates", "TTest", "TextSearchReport", "ToString", "Tube", "TextSentences", "Total", "Tuesday", "TextString", "TotalLayer", "TukeyLambdaDistribution", "TextStructure", "TotalVariationFilter", "TukeyWindow", "TextTranslation", "TotalWidth", "TunnelData", "Texture", "TouchPosition", "Tuples", "TextureCoordinateFunction", "TouchscreenAutoZoom", "TuranGraph", "TextureCoordinateScaling", "TouchscreenControlPlacement", "TuringMachine", "TextWords", "ToUpperCase", "TuttePolynomial", "Therefore", "Tr", "TwoWayRule", "ThermodynamicData", "Trace", "Typed", "ThermometerGauge", "TraceAbove", "TypeSpecifier", "Thick", "TraceBackward", "UnateQ", "UnitaryMatrixQ", "UpperCaseQ", "Uncompress", "UnitBox", "UpperLeftArrow", "UnconstrainedParameters", "UnitConvert", "UpperRightArrow", "Undefined", "UnitDimensions", "UpperTriangularize", "UnderBar", "Unitize", "UpperTriangularMatrixQ", "Underflow", "UnitRootTest", "Upsample", "Underlined", "UnitSimplify", "UpSet", "Underoverscript", "UnitStep", "UpSetDelayed", "UnderoverscriptBox", "UnitSystem", "UpTee", "UnderoverscriptBoxOptions", "UnitTriangle", "UpTeeArrow", "Underscript", "UnitVector", "UpTo", "UnderscriptBox", "UnitVectorLayer", "UpValues", "UnderscriptBoxOptions", "UnityDimensions", "URL", "UnderseaFeatureData", "UniverseModelData", "URLBuild", "UndirectedEdge", "UniversityData", "URLDecode", "UndirectedGraph", "UnixTime", "URLDispatcher", "UndirectedGraphQ", "Unprotect", "URLDownload", "UndoOptions", "UnregisterExternalEvaluator", "URLDownloadSubmit", "UndoTrackedVariables", "UnsameQ", "URLEncode", "Unequal", "UnsavedVariables", "URLExecute", "UnequalTo", "Unset", "URLExpand", "Unevaluated", "UnsetShared", "URLParse", "UniformDistribution", "UpArrow", "URLQueryDecode", "UniformGraphDistribution", "UpArrowBar", "URLQueryEncode", "UniformPolyhedron", "UpArrowDownArrow", "URLRead", "UniformSumDistribution", "Update", "URLResponseTime", "Uninstall", "UpdateInterval", "URLShorten", "Union", "UpdatePacletSites", "URLSubmit", "UnionedEntityClass", "UpdateSearchIndex", "UsingFrontEnd", "UnionPlus", "UpDownArrow", "UtilityFunction", "Unique", "UpEquilibrium", "ValenceErrorHandling", "VerifyDigitalSignature", "VertexStyle", "ValidationLength", "VerifyFileSignature", "VertexTextureCoordinates", "ValidationSet", "VerifyInterpretation", "VertexWeight", "ValueDimensions", "VerifySecurityCertificates", "VertexWeightedGraphQ", "ValuePreprocessingFunction", "VerifySolutions", "VerticalBar", "ValueQ", "VerifyTestAssumptions", "VerticalGauge", "Values", "VersionedPreferences", "VerticalSeparator", "Variables", "VertexAdd", "VerticalSlider", "Variance", "VertexCapacity", "VerticalTilde", "VarianceEquivalenceTest", "VertexColors", "Video", "VarianceEstimatorFunction", "VertexComponent", "VideoEncoding", "VarianceGammaDistribution", "VertexConnectivity", "VideoExtractFrames", "VarianceTest", "VertexContract", "VideoFrameList", "VectorAngle", "VertexCoordinates", "VideoFrameMap", "VectorAround", "VertexCorrelationSimilarity", "VideoPause", "VectorAspectRatio", "VertexCosineSimilarity", "VideoPlay", "VectorColorFunction", "VertexCount", "VideoQ", "VectorColorFunctionScaling", "VertexCoverQ", "VideoStop", "VectorDensityPlot", "VertexDataCoordinates", "VideoStream", "VectorGreater", "VertexDegree", "VideoStreams", "VectorGreaterEqual", "VertexDelete", "VideoTimeSeries", "VectorLess", "VertexDiceSimilarity", "VideoTracks", "VectorLessEqual", "VertexEccentricity", "VideoTrim", "VectorMarkers", "VertexInComponent", "ViewAngle", "VectorPlot", "VertexInDegree", "ViewCenter", "VectorPlot3D", "VertexIndex", "ViewMatrix", "VectorPoints", "VertexJaccardSimilarity", "ViewPoint", "VectorQ", "VertexLabels", "ViewProjection", "VectorRange", "VertexLabelStyle", "ViewRange", "Vectors", "VertexList", "ViewVector", "VectorScaling", "VertexNormals", "ViewVertical", "VectorSizes", "VertexOutComponent", "Visible", "VectorStyle", "VertexOutDegree", "VoiceStyleData", "Vee", "VertexQ", "VoigtDistribution", "Verbatim", "VertexReplace", "VolcanoData", "VerificationTest", "VertexShape", "Volume", "VerifyConvergence", "VertexShapeFunction", "VonMisesDistribution", "VerifyDerivedKey", "VertexSize", "VoronoiMesh", "WaitAll", "WeierstrassEta2", "WindowElements", "WaitNext", "WeierstrassEta3", "WindowFloating", "WakebyDistribution", "WeierstrassHalfPeriods", "WindowFrame", "WalleniusHypergeometricDistribution", "WeierstrassHalfPeriodW1", "WindowFrameElements", "WaringYuleDistribution", "WeierstrassHalfPeriodW2", "WindowMargins", "WarpingCorrespondence", "WeierstrassHalfPeriodW3", "WindowOpacity", "WarpingDistance", "WeierstrassInvariantG2", "WindowSize", "WatershedComponents", "WeierstrassInvariantG3", "WindowStatusArea", "WatsonUSquareTest", "WeierstrassInvariants", "WindowTitle", "WattsStrogatzGraphDistribution", "WeierstrassP", "WindowToolbars", "WaveletBestBasis", "WeierstrassPPrime", "WindSpeedData", "WaveletFilterCoefficients", "WeierstrassSigma", "WindVectorData", "WaveletImagePlot", "WeierstrassZeta", "WinsorizedMean", "WaveletListPlot", "WeightedAdjacencyGraph", "WinsorizedVariance", "WaveletMapIndexed", "WeightedAdjacencyMatrix", "WishartMatrixDistribution", "WaveletMatrixPlot", "WeightedData", "With", "WaveletPhi", "WeightedGraphQ", "WolframAlpha", "WaveletPsi", "Weights", "WolframLanguageData", "WaveletScale", "WelchWindow", "Word", "WaveletScalogram", "WheelGraph", "WordBoundary", "WaveletThreshold", "WhenEvent", "WordCharacter", "WeaklyConnectedComponents", "Which", "WordCloud", "WeaklyConnectedGraphComponents", "While", "WordCount", "WeaklyConnectedGraphQ", "White", "WordCounts", "WeakStationarity", "WhiteNoiseProcess", "WordData", "WeatherData", "WhitePoint", "WordDefinition", "WeatherForecastData", "Whitespace", "WordFrequency", "WebAudioSearch", "WhitespaceCharacter", "WordFrequencyData", "WebElementObject", "WhittakerM", "WordList", "WeberE", "WhittakerW", "WordOrientation", "WebExecute", "WienerFilter", "WordSearch", "WebImage", "WienerProcess", "WordSelectionFunction", "WebImageSearch", "WignerD", "WordSeparators", "WebSearch", "WignerSemicircleDistribution", "WordSpacings", "WebSessionObject", "WikidataData", "WordStem", "WebSessions", "WikidataSearch", "WordTranslation", "WebWindowObject", "WikipediaData", "WorkingPrecision", "Wedge", "WikipediaSearch", "WrapAround", "Wednesday", "WilksW", "Write", "WeibullDistribution", "WilksWTest", "WriteLine", "WeierstrassE1", "WindDirectionData", "WriteString", "WeierstrassE2", "WindingCount", "Wronskian", "WeierstrassE3", "WindingPolygon", "WeierstrassEta1", "WindowClickSelect", "XMLElement", "XMLTemplate", "Xor", "XMLObject", "Xnor", "XYZColor", "Yellow", "Yesterday", "YuleDissimilarity", "ZernikeR", "ZetaZero", "ZoomFactor", "ZeroSymmetric", "ZIPCodeData", "ZTest", "ZeroTest", "ZipfDistribution", "ZTransform", "Zeta", "ZoomCenter"] end end end endrouge-3.28.0/lib/rouge/lexers/matlab.rb000066400000000000000000000040301417417255300177110ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Matlab < RegexLexer title "MATLAB" desc "Matlab" tag 'matlab' aliases 'm' filenames '*.m' mimetypes 'text/x-matlab', 'application/x-matlab' def self.keywords @keywords = Set.new %w( break case catch classdef continue else elseif end for function global if otherwise parfor persistent return spmd switch try while ) end # self-modifying method that loads the builtins file def self.builtins Kernel::load File.join(Lexers::BASE_DIR, 'matlab/keywords.rb') builtins end state :root do rule %r/\s+/m, Text # Whitespace rule %r([{]%.*?%[}])m, Comment::Multiline rule %r/%.*$/, Comment::Single rule %r/([.][.][.])(.*?)$/ do groups(Keyword, Comment) end rule %r/^(!)(.*?)(?=%|$)/ do |m| token Keyword, m[1] delegate Shell, m[2] end rule %r/[a-zA-Z][_a-zA-Z0-9]*/m do |m| match = m[0] if self.class.keywords.include? match token Keyword elsif self.class.builtins.include? match token Name::Builtin else token Name end end rule %r{[(){};:,\/\\\]\[]}, Punctuation rule %r/~=|==|<<|>>|[-~+\/*%=<>&^|.@]/, Operator rule %r/(\d+\.\d*|\d*\.\d+)(e[+-]?[0-9]+)?/i, Num::Float rule %r/\d+e[+-]?[0-9]+/i, Num::Float rule %r/\d+L/, Num::Integer::Long rule %r/\d+/, Num::Integer rule %r/'(?=(.*'))/, Str::Single, :chararray rule %r/"(?=(.*"))/, Str::Double, :string rule %r/'/, Operator end state :chararray do rule %r/[^']+/, Str::Single rule %r/''/, Str::Escape rule %r/'/, Str::Single, :pop! end state :string do rule %r/[^"]+/, Str::Double rule %r/""/, Str::Escape rule %r/"/, Str::Double, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/matlab/000077500000000000000000000000001417417255300173675ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/lexers/matlab/builtins.rb000066400000000000000000001713441417417255300215570ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # automatically generated by `rake builtins:matlab` module Rouge module Lexers def Matlab.builtins @builtins ||= Set.new ["abs", "accumarray", "acos", "acosd", "acosh", "acot", "acotd", "acoth", "acsc", "acscd", "acsch", "actxcontrol", "actxcontrollist", "actxcontrolselect", "actxGetRunningServer", "actxserver", "add", "addboundary", "addcats", "addCause", "addClass", "addCondition", "addConditionsFrom", "addConstructor", "addCorrection", "addedge", "addevent", "addFields", "addFields", "addFile", "addFolderIncludingChildFiles", "addFunction", "addLabel", "addlistener", "addMethod", "addmulti", "addnode", "addOptional", "addParameter", "addParamValue", "addPath", "addpath", "addPlugin", "addpoints", "addpref", "addprop", "addprop", "addproperty", "addProperty", "addReference", "addRequired", "addsample", "addsampletocollection", "addShortcut", "addShutdownFile", "addStartupFile", "addTeardown", "addTeardown", "addtodate", "addToolbarExplorationButtons", "addts", "addvars", "adjacency", "airy", "align", "alim", "all", "allchild", "allowModelReferenceDiscreteSampleTimeInheritanceImpl", "alpha", "alphamap", "alphaShape", "alphaSpectrum", "alphaTriangulation", "amd", "analyzeCodeCompatibility", "ancestor", "and", "angle", "animatedline", "annotation", "ans", "any", "appdesigner", "append", "append", "applyFixture", "applyFixture", "area", "area", "area", "array2table", "array2timetable", "arrayfun", "ascii", "asec", "asecd", "asech", "asin", "asind", "asinh", "assert", "assertAccessed", "assertCalled", "assertClass", "assertEmpty", "assertEqual", "assertError", "assertFail", "assertFalse", "assertGreaterThan", "assertGreaterThanOrEqual", "assertInstanceOf", "assertLength", "assertLessThan", "assertLessThanOrEqual", "assertMatches", "assertNotAccessed", "assertNotCalled", "assertNotEmpty", "assertNotEqual", "assertNotSameHandle", "assertNotSet", "assertNumElements", "assertReturnsTrue", "assertSameHandle", "assertSet", "assertSize", "assertSubstring", "assertThat", "assertTrue", "assertUsing", "assertWarning", "assertWarningFree", "assignin", "assignOutputsWhen", "assumeAccessed", "assumeCalled", "assumeClass", "assumeEmpty", "assumeEqual", "assumeError", "assumeFail", "assumeFalse", "assumeGreaterThan", "assumeGreaterThanOrEqual", "assumeInstanceOf", "assumeLength", "assumeLessThan", "assumeLessThanOrEqual", "assumeMatches", "assumeNotAccessed", "assumeNotCalled", "assumeNotEmpty", "assumeNotEqual", "assumeNotSameHandle", "assumeNotSet", "assumeNumElements", "assumeReturnsTrue", "assumeSameHandle", "assumeSet", "assumeSize", "assumeSubstring", "assumeThat", "assumeTrue", "assumeUsing", "assumeWarning", "assumeWarningFree", "atan", "atan2", "atan2d", "atand", "atanh", "audiodevinfo", "audioinfo", "audioplayer", "audioread", "audiorecorder", "audiowrite", "autumn", "aviinfo", "axes", "axis", "axtoolbar", "axtoolbarbtn", "balance", "bandwidth", "bar", "bar3", "bar3h", "barh", "barycentricToCartesian", "baryToCart", "base2dec", "batchStartupOptionUsed", "bctree", "beep", "BeginInvoke", "bench", "besselh", "besseli", "besselj", "besselk", "bessely", "beta", "betainc", "betaincinv", "betaln", "between", "bfsearch", "bicg", "bicgstab", "bicgstabl", "biconncomp", "bin2dec", "binary", "binscatter", "bitand", "bitcmp", "bitget", "bitnot", "bitor", "bitset", "bitshift", "bitxor", "blanks", "blkdiag", "bone", "boundary", "boundary", "boundaryFacets", "boundaryshape", "boundingbox", "bounds", "box", "break", "brighten", "brush", "bsxfun", "build", "builddocsearchdb", "builtin", "bvp4c", "bvp5c", "bvpget", "bvpinit", "bvpset", "bvpxtend", "caldays", "caldiff", "calendar", "calendarDuration", "calllib", "callSoapService", "calmonths", "calquarters", "calweeks", "calyears", "camdolly", "cameratoolbar", "camlight", "camlookat", "camorbit", "campan", "campos", "camproj", "camroll", "camtarget", "camup", "camva", "camzoom", "cancel", "cancelled", "cart2pol", "cart2sph", "cartesianToBarycentric", "cartToBary", "cast", "cat", "cat", "categorical", "categories", "caxis", "cd", "cd", "cdf2rdf", "cdfepoch", "cdfinfo", "cdflib", "cdflib.close", "cdflib.closeVar", "cdflib.computeEpoch", "cdflib.computeEpoch16", "cdflib.create", "cdflib.createAttr", "cdflib.createVar", "cdflib.delete", "cdflib.deleteAttr", "cdflib.deleteAttrEntry", "cdflib.deleteAttrgEntry", "cdflib.deleteVar", "cdflib.deleteVarRecords", "cdflib.epoch16Breakdown", "cdflib.epochBreakdown", "cdflib.getAttrEntry", "cdflib.getAttrgEntry", "cdflib.getAttrMaxEntry", "cdflib.getAttrMaxgEntry", "cdflib.getAttrName", "cdflib.getAttrNum", "cdflib.getAttrScope", "cdflib.getCacheSize", "cdflib.getChecksum", "cdflib.getCompression", "cdflib.getCompressionCacheSize", "cdflib.getConstantNames", "cdflib.getConstantValue", "cdflib.getCopyright", "cdflib.getFileBackward", "cdflib.getFormat", "cdflib.getLibraryCopyright", "cdflib.getLibraryVersion", "cdflib.getMajority", "cdflib.getName", "cdflib.getNumAttrEntries", "cdflib.getNumAttrgEntries", "cdflib.getNumAttributes", "cdflib.getNumgAttributes", "cdflib.getReadOnlyMode", "cdflib.getStageCacheSize", "cdflib.getValidate", "cdflib.getVarAllocRecords", "cdflib.getVarBlockingFactor", "cdflib.getVarCacheSize", "cdflib.getVarCompression", "cdflib.getVarData", "cdflib.getVarMaxAllocRecNum", "cdflib.getVarMaxWrittenRecNum", "cdflib.getVarName", "cdflib.getVarNum", "cdflib.getVarNumRecsWritten", "cdflib.getVarPadValue", "cdflib.getVarRecordData", "cdflib.getVarReservePercent", "cdflib.getVarsMaxWrittenRecNum", "cdflib.getVarSparseRecords", "cdflib.getVersion", "cdflib.hyperGetVarData", "cdflib.hyperPutVarData", "cdflib.inquire", "cdflib.inquireAttr", "cdflib.inquireAttrEntry", "cdflib.inquireAttrgEntry", "cdflib.inquireVar", "cdflib.open", "cdflib.putAttrEntry", "cdflib.putAttrgEntry", "cdflib.putVarData", "cdflib.putVarRecordData", "cdflib.renameAttr", "cdflib.renameVar", "cdflib.setCacheSize", "cdflib.setChecksum", "cdflib.setCompression", "cdflib.setCompressionCacheSize", "cdflib.setFileBackward", "cdflib.setFormat", "cdflib.setMajority", "cdflib.setReadOnlyMode", "cdflib.setStageCacheSize", "cdflib.setValidate", "cdflib.setVarAllocBlockRecords", "cdflib.setVarBlockingFactor", "cdflib.setVarCacheSize", "cdflib.setVarCompression", "cdflib.setVarInitialRecs", "cdflib.setVarPadValue", "cdflib.SetVarReservePercent", "cdflib.setVarsCacheSize", "cdflib.setVarSparseRecords", "cdfread", "cdfwrite", "ceil", "cell", "cell2mat", "cell2struct", "cell2table", "celldisp", "cellfun", "cellplot", "cellstr", "centrality", "centroid", "cgs", "changeFields", "changeFields", "char", "char", "checkcode", "checkin", "checkout", "chol", "cholupdate", "choose", "circshift", "circumcenter", "circumcenters", "cla", "clabel", "class", "classdef", "classUnderlying", "clc", "clear", "clear", "clearAllMemoizedCaches", "clearCache", "clearMockHistory", "clearPersonalValue", "clearpoints", "clearTemporaryValue", "clearvars", "clf", "clibgen.buildInterface", "clibgen.ClassDefinition", "clibgen.ConstructorDefinition", "clibgen.EnumDefinition", "clibgen.FunctionDefinition", "clibgen.generateLibraryDefinition", "clibgen.LibraryDefinition", "clibgen.MethodDefinition", "clibgen.PropertyDefinition", "clibRelease", "clipboard", "clock", "clone", "close", "close", "close", "close", "close", "closeFile", "closereq", "cmopts", "cmpermute", "cmunique", "CodeCompatibilityAnalysis", "codeCompatibilityReport", "colamd", "collapse", "colon", "colorbar", "colorcube", "colordef", "colormap", "ColorSpec", "colperm", "COM", "com.mathworks.engine.MatlabEngine", "com.mathworks.matlab.types.CellStr", "com.mathworks.matlab.types.Complex", "com.mathworks.matlab.types.HandleObject", "com.mathworks.matlab.types.Struct", "combine", "Combine", "CombinedDatastore", "comet", "comet3", "compan", "compass", "complete", "complete", "complete", "complete", "complete", "complete", "complete", "complex", "compose", "computer", "cond", "condeig", "condensation", "condest", "coneplot", "conj", "conncomp", "containers.Map", "contains", "continue", "contour", "contour3", "contourc", "contourf", "contourslice", "contrast", "conv", "conv2", "convert", "convert", "convert", "convertCharsToStrings", "convertContainedStringsToChars", "convertLike", "convertStringsToChars", "convertvars", "convexHull", "convexHull", "convhull", "convhull", "convhulln", "convn", "cool", "copper", "copy", "copyElement", "copyfile", "copyHDU", "copyobj", "copyTo", "corrcoef", "cos", "cosd", "cosh", "cospi", "cot", "cotd", "coth", "count", "countcats", "countEachLabel", "cov", "cplxpair", "cputime", "createCategory", "createClassFromWsdl", "createFile", "createImg", "createLabel", "createMock", "createSampleTime", "createSharedTestFixture", "createSoapMessage", "createTbl", "createTestClassInstance", "createTestMethodInstance", "criticalAlpha", "cross", "csc", "cscd", "csch", "csvread", "csvwrite", "ctranspose", "cummax", "cummin", "cumprod", "cumsum", "cumtrapz", "curl", "currentProject", "customverctrl", "cylinder", "daqread", "daspect", "datacursormode", "datastore", "dataTipInteraction", "dataTipTextRow", "date", "datenum", "dateshift", "datestr", "datetick", "datetime", "datevec", "day", "days", "dbclear", "dbcont", "dbdown", "dblquad", "dbmex", "dbquit", "dbstack", "dbstatus", "dbstep", "dbstop", "dbtype", "dbup", "dde23", "ddeget", "ddensd", "ddesd", "ddeset", "deal", "deblank", "dec2base", "dec2bin", "dec2hex", "decic", "decomposition", "deconv", "defineArgument", "defineArgument", "defineArgument", "defineOutput", "defineOutput", "deg2rad", "degree", "del2", "delaunay", "delaunayn", "DelaunayTri", "DelaunayTri", "delaunayTriangulation", "delegateTo", "delegateTo", "delete", "delete", "delete", "delete", "delete", "deleteCol", "deleteFile", "deleteHDU", "deleteKey", "deleteproperty", "deleteRecord", "deleteRows", "delevent", "delimitedTextImportOptions", "delsample", "delsamplefromcollection", "demo", "det", "details", "detectImportOptions", "detrend", "detrend", "deval", "dfsearch", "diag", "diagnose", "dialog", "diary", "diff", "diffuse", "digraph", "dir", "dir", "disableDefaultInteractivity", "discretize", "disp", "disp", "disp", "display", "displayEmptyObject", "displayNonScalarObject", "displayScalarHandleToDeletedObject", "displayScalarObject", "dissect", "distances", "dither", "divergence", "dlmread", "dlmwrite", "dmperm", "doc", "docsearch", "done", "done", "dos", "dot", "double", "drag", "dragrect", "drawnow", "dsearchn", "duration", "dynamicprops", "echo", "echodemo", "edgeAttachments", "edgeAttachments", "edgecount", "edges", "edges", "edit", "eig", "eigs", "ellipj", "ellipke", "ellipsoid", "empty", "enableDefaultInteractivity", "enableNETfromNetworkDrive", "enableservice", "end", "EndInvoke", "endsWith", "enumeration", "eomday", "eps", "eq", "eq", "equilibrate", "erase", "eraseBetween", "erf", "erfc", "erfcinv", "erfcx", "erfinv", "error", "errorbar", "errordlg", "etime", "etree", "etreeplot", "eval", "evalc", "evalin", "event.DynamicPropertyEvent", "event.EventData", "event.hasListener", "event.listener", "event.PropertyEvent", "event.proplistener", "eventlisteners", "events", "events", "exceltime", "Execute", "exist", "exit", "exp", "expand", "expectedContentLength", "expectedContentLength", "expint", "expm", "expm1", "export", "export2wsdlg", "exportsetupdlg", "extractAfter", "extractBefore", "extractBetween", "eye", "ezcontour", "ezcontourf", "ezmesh", "ezmeshc", "ezplot", "ezplot3", "ezpolar", "ezsurf", "ezsurfc", "faceNormal", "faceNormals", "factor", "factorial", "false", "fatalAssertAccessed", "fatalAssertCalled", "fatalAssertClass", "fatalAssertEmpty", "fatalAssertEqual", "fatalAssertError", "fatalAssertFail", "fatalAssertFalse", "fatalAssertGreaterThan", "fatalAssertGreaterThanOrEqual", "fatalAssertInstanceOf", "fatalAssertLength", "fatalAssertLessThan", "fatalAssertLessThanOrEqual", "fatalAssertMatches", "fatalAssertNotAccessed", "fatalAssertNotCalled", "fatalAssertNotEmpty", "fatalAssertNotEqual", "fatalAssertNotSameHandle", "fatalAssertNotSet", "fatalAssertNumElements", "fatalAssertReturnsTrue", "fatalAssertSameHandle", "fatalAssertSet", "fatalAssertSize", "fatalAssertSubstring", "fatalAssertThat", "fatalAssertTrue", "fatalAssertUsing", "fatalAssertWarning", "fatalAssertWarningFree", "fclose", "fclose", "fcontour", "feather", "featureEdges", "featureEdges", "feof", "ferror", "feval", "Feval", "feval", "fewerbins", "fft", "fft2", "fftn", "fftshift", "fftw", "fgetl", "fgetl", "fgets", "fgets", "fieldnames", "figure", "figurepalette", "fileattrib", "fileDatastore", "filemarker", "fileMode", "fileName", "fileparts", "fileread", "filesep", "fill", "fill3", "fillmissing", "filloutliers", "filter", "filter", "filter2", "fimplicit", "fimplicit3", "find", "findall", "findCategory", "findedge", "findEvent", "findfigs", "findFile", "findgroups", "findLabel", "findnode", "findobj", "findobj", "findprop", "findstr", "finish", "fitsdisp", "fitsinfo", "fitsread", "fitswrite", "fix", "fixedWidthImportOptions", "flag", "flintmax", "flip", "flipdim", "flipedge", "fliplr", "flipud", "floor", "flow", "fmesh", "fminbnd", "fminsearch", "fopen", "fopen", "for", "format", "fplot", "fplot3", "fprintf", "fprintf", "frame2im", "fread", "fread", "freeBoundary", "freeBoundary", "freqspace", "frewind", "fscanf", "fscanf", "fseek", "fsurf", "ftell", "ftp", "full", "fullfile", "func2str", "function", "functions", "FunctionTestCase", "functiontests", "funm", "fwrite", "fwrite", "fzero", "gallery", "gamma", "gammainc", "gammaincinv", "gammaln", "gather", "gca", "gcbf", "gcbo", "gcd", "gcf", "gcmr", "gco", "ge", "genpath", "genvarname", "geoaxes", "geobasemap", "geobubble", "geodensityplot", "geolimits", "geoplot", "geoscatter", "geotickformat", "get", "get", "get", "get", "get", "get", "get", "get", "get", "get", "get", "getabstime", "getabstime", "getAColParms", "getappdata", "getaudiodata", "getBColParms", "GetCharArray", "getClass", "getColName", "getColType", "getConstantValue", "getCurrentTime", "getData", "getData", "getData", "getData", "getData", "getdatasamples", "getdatasamplesize", "getDiagnosticFor", "getDiagnosticFor", "getDiscreteStateImpl", "getDiscreteStateSpecificationImpl", "getdisp", "getenv", "getEqColType", "getfield", "getFields", "getFields", "getFileFormats", "getFooter", "getframe", "GetFullMatrix", "getGlobalNamesImpl", "getHdrSpace", "getHDUnum", "getHDUtype", "getHeader", "getHeaderImpl", "getIconImpl", "getImgSize", "getImgType", "getImpulseResponseLengthImpl", "getInputDimensionConstraintImpl", "getinterpmethod", "getLocation", "getLocation", "getMockHistory", "getNegativeDiagnosticFor", "getnext", "getNumCols", "getNumHDUs", "getNumInputs", "getNumInputsImpl", "getNumOutputs", "getNumOutputsImpl", "getNumRows", "getOpenFiles", "getOutputDataTypeImpl", "getOutputDimensionConstraintImpl", "getOutputSizeImpl", "getParameter", "getParameter", "getParameter", "getpixelposition", "getplayer", "getpoints", "getPostActValString", "getPostConditionString", "getPostDescriptionString", "getPostExpValString", "getPreDescriptionString", "getpref", "getProfiles", "getPropertyGroups", "getPropertyGroupsImpl", "getqualitydesc", "getReasonPhrase", "getReasonPhrase", "getReport", "getsamples", "getSampleTime", "getSampleTimeImpl", "getsampleusingtime", "getsampleusingtime", "getSharedTestFixtures", "getSimulateUsingImpl", "getSimulinkFunctionNamesImpl", "gettimeseriesnames", "getTimeStr", "gettsafteratevent", "gettsafterevent", "gettsatevent", "gettsbeforeatevent", "gettsbeforeevent", "gettsbetweenevents", "GetVariable", "getvaropts", "getVersion", "GetWorkspaceData", "ginput", "global", "gmres", "gobjects", "gplot", "grabcode", "gradient", "graph", "GraphPlot", "gray", "graymon", "grid", "griddata", "griddatan", "griddedInterpolant", "groot", "groupcounts", "groupsummary", "grouptransform", "gsvd", "gt", "gtext", "guidata", "guide", "guihandles", "gunzip", "gzip", "H5.close", "H5.garbage_collect", "H5.get_libversion", "H5.open", "H5.set_free_list_limits", "H5A.close", "H5A.create", "H5A.delete", "H5A.get_info", "H5A.get_name", "H5A.get_space", "H5A.get_type", "H5A.iterate", "H5A.open", "H5A.open_by_idx", "H5A.open_by_name", "H5A.read", "H5A.write", "h5create", "H5D.close", "H5D.create", "H5D.get_access_plist", "H5D.get_create_plist", "H5D.get_offset", "H5D.get_space", "H5D.get_space_status", "H5D.get_storage_size", "H5D.get_type", "H5D.open", "H5D.read", "H5D.set_extent", "H5D.vlen_get_buf_size", "H5D.write", "h5disp", "H5DS.attach_scale", "H5DS.detach_scale", "H5DS.get_label", "H5DS.get_num_scales", "H5DS.get_scale_name", "H5DS.is_scale", "H5DS.iterate_scales", "H5DS.set_label", "H5DS.set_scale", "H5E.clear", "H5E.get_major", "H5E.get_minor", "H5E.walk", "H5F.close", "H5F.create", "H5F.flush", "H5F.get_access_plist", "H5F.get_create_plist", "H5F.get_filesize", "H5F.get_freespace", "H5F.get_info", "H5F.get_mdc_config", "H5F.get_mdc_hit_rate", "H5F.get_mdc_size", "H5F.get_name", "H5F.get_obj_count", "H5F.get_obj_ids", "H5F.is_hdf5", "H5F.mount", "H5F.open", "H5F.reopen", "H5F.set_mdc_config", "H5F.unmount", "H5G.close", "H5G.create", "H5G.get_info", "H5G.open", "H5I.dec_ref", "H5I.get_file_id", "H5I.get_name", "H5I.get_ref", "H5I.get_type", "H5I.inc_ref", "H5I.is_valid", "h5info", "H5L.copy", "H5L.create_external", "H5L.create_hard", "H5L.create_soft", "H5L.delete", "H5L.exists", "H5L.get_info", "H5L.get_name_by_idx", "H5L.get_val", "H5L.iterate", "H5L.iterate_by_name", "H5L.move", "H5L.visit", "H5L.visit_by_name", "H5ML.compare_values", "H5ML.get_constant_names", "H5ML.get_constant_value", "H5ML.get_function_names", "H5ML.get_mem_datatype", "H5ML.hoffset", "H5ML.sizeof", "H5O.close", "H5O.copy", "H5O.get_comment", "H5O.get_comment_by_name", "H5O.get_info", "H5O.link", "H5O.open", "H5O.open_by_idx", "H5O.set_comment", "H5O.set_comment_by_name", "H5O.visit", "H5O.visit_by_name", "H5P.all_filters_avail", "H5P.close", "H5P.close_class", "H5P.copy", "H5P.create", "H5P.equal", "H5P.exist", "H5P.fill_value_defined", "H5P.get", "H5P.get_alignment", "H5P.get_alloc_time", "H5P.get_attr_creation_order", "H5P.get_attr_phase_change", "H5P.get_btree_ratios", "H5P.get_char_encoding", "H5P.get_chunk", "H5P.get_chunk_cache", "H5P.get_class", "H5P.get_class_name", "H5P.get_class_parent", "H5P.get_copy_object", "H5P.get_create_intermediate_group", "H5P.get_driver", "H5P.get_edc_check", "H5P.get_external", "H5P.get_external_count", "H5P.get_family_offset", "H5P.get_fapl_core", "H5P.get_fapl_family", "H5P.get_fapl_multi", "H5P.get_fclose_degree", "H5P.get_fill_time", "H5P.get_fill_value", "H5P.get_filter", "H5P.get_filter_by_id", "H5P.get_gc_references", "H5P.get_hyper_vector_size", "H5P.get_istore_k", "H5P.get_layout", "H5P.get_libver_bounds", "H5P.get_link_creation_order", "H5P.get_link_phase_change", "H5P.get_mdc_config", "H5P.get_meta_block_size", "H5P.get_multi_type", "H5P.get_nfilters", "H5P.get_nprops", "H5P.get_sieve_buf_size", "H5P.get_size", "H5P.get_sizes", "H5P.get_small_data_block_size", "H5P.get_sym_k", "H5P.get_userblock", "H5P.get_version", "H5P.isa_class", "H5P.iterate", "H5P.modify_filter", "H5P.remove_filter", "H5P.set", "H5P.set_alignment", "H5P.set_alloc_time", "H5P.set_attr_creation_order", "H5P.set_attr_phase_change", "H5P.set_btree_ratios", "H5P.set_char_encoding", "H5P.set_chunk", "H5P.set_chunk_cache", "H5P.set_copy_object", "H5P.set_create_intermediate_group", "H5P.set_deflate", "H5P.set_edc_check", "H5P.set_external", "H5P.set_family_offset", "H5P.set_fapl_core", "H5P.set_fapl_family", "H5P.set_fapl_log", "H5P.set_fapl_multi", "H5P.set_fapl_sec2", "H5P.set_fapl_split", "H5P.set_fapl_stdio", "H5P.set_fclose_degree", "H5P.set_fill_time", "H5P.set_fill_value", "H5P.set_filter", "H5P.set_fletcher32", "H5P.set_gc_references", "H5P.set_hyper_vector_size", "H5P.set_istore_k", "H5P.set_layout", "H5P.set_libver_bounds", "H5P.set_link_creation_order", "H5P.set_link_phase_change", "H5P.set_mdc_config", "H5P.set_meta_block_size", "H5P.set_multi_type", "H5P.set_nbit", "H5P.set_scaleoffset", "H5P.set_shuffle", "H5P.set_sieve_buf_size", "H5P.set_sizes", "H5P.set_small_data_block_size", "H5P.set_sym_k", "H5P.set_userblock", "H5R.create", "H5R.dereference", "H5R.get_name", "H5R.get_obj_type", "H5R.get_region", "h5read", "h5readatt", "H5S.close", "H5S.copy", "H5S.create", "H5S.create_simple", "H5S.extent_copy", "H5S.get_select_bounds", "H5S.get_select_elem_npoints", "H5S.get_select_elem_pointlist", "H5S.get_select_hyper_blocklist", "H5S.get_select_hyper_nblocks", "H5S.get_select_npoints", "H5S.get_select_type", "H5S.get_simple_extent_dims", "H5S.get_simple_extent_ndims", "H5S.get_simple_extent_npoints", "H5S.get_simple_extent_type", "H5S.is_simple", "H5S.offset_simple", "H5S.select_all", "H5S.select_elements", "H5S.select_hyperslab", "H5S.select_none", "H5S.select_valid", "H5S.set_extent_none", "H5S.set_extent_simple", "H5T.array_create", "H5T.close", "H5T.commit", "H5T.committed", "H5T.copy", "H5T.create", "H5T.detect_class", "H5T.enum_create", "H5T.enum_insert", "H5T.enum_nameof", "H5T.enum_valueof", "H5T.equal", "H5T.get_array_dims", "H5T.get_array_ndims", "H5T.get_class", "H5T.get_create_plist", "H5T.get_cset", "H5T.get_ebias", "H5T.get_fields", "H5T.get_inpad", "H5T.get_member_class", "H5T.get_member_index", "H5T.get_member_name", "H5T.get_member_offset", "H5T.get_member_type", "H5T.get_member_value", "H5T.get_native_type", "H5T.get_nmembers", "H5T.get_norm", "H5T.get_offset", "H5T.get_order", "H5T.get_pad", "H5T.get_precision", "H5T.get_sign", "H5T.get_size", "H5T.get_strpad", "H5T.get_super", "H5T.get_tag", "H5T.insert", "H5T.is_variable_str", "H5T.lock", "H5T.open", "H5T.pack", "H5T.set_cset", "H5T.set_ebias", "H5T.set_fields", "H5T.set_inpad", "H5T.set_norm", "H5T.set_offset", "H5T.set_order", "H5T.set_pad", "H5T.set_precision", "H5T.set_sign", "H5T.set_size", "H5T.set_strpad", "H5T.set_tag", "H5T.vlen_create", "h5write", "h5writeatt", "H5Z.filter_avail", "H5Z.get_filter_info", "hadamard", "handle", "hankel", "hasdata", "hasdata", "hasFactoryValue", "hasfile", "hasFrame", "hasnext", "hasPersonalValue", "hasTemporaryValue", "hdf5info", "hdf5read", "hdf5write", "hdfan", "hdfdf24", "hdfdfr8", "hdfh", "hdfhd", "hdfhe", "hdfhx", "hdfinfo", "hdfml", "hdfpt", "hdfread", "hdftool", "hdfv", "hdfvf", "hdfvh", "hdfvs", "head", "heatmap", "height", "help", "helpbrowser", "helpdesk", "helpdlg", "helpwin", "hess", "hex2dec", "hex2num", "hgexport", "hggroup", "hgload", "hgsave", "hgtransform", "hidden", "highlight", "hilb", "hist", "histc", "histcounts", "histcounts2", "histogram", "histogram2", "hms", "hold", "holes", "home", "horzcat", "horzcat", "horzcat", "hot", "hour", "hours", "hover", "hsv", "hsv2rgb", "hypot", "ichol", "idealfilter", "idivide", "ifft", "ifft2", "ifftn", "ifftshift", "ilu", "im2double", "im2frame", "im2java", "imag", "image", "imageDatastore", "imagesc", "imapprox", "imfinfo", "imformats", "imgCompress", "import", "importdata", "imread", "imresize", "imshow", "imtile", "imwrite", "incenter", "incenters", "incidence", "ind2rgb", "ind2sub", "indegree", "inedges", "Inf", "info", "infoImpl", "initialize", "initialize", "initialize", "initialize", "initialize", "initializeDatastore", "initializeDatastore", "inline", "inmem", "inner2outer", "innerjoin", "inOutStatus", "inpolygon", "input", "inputdlg", "inputname", "inputParser", "insertAfter", "insertATbl", "insertBefore", "insertBTbl", "insertCol", "insertImg", "insertRows", "inShape", "inspect", "instrcallback", "instrfind", "instrfindall", "int16", "int2str", "int32", "int64", "int8", "integral", "integral2", "integral3", "interp1", "interp1q", "interp2", "interp3", "interpft", "interpn", "interpstreamspeed", "intersect", "intersect", "intmax", "intmin", "inv", "invhilb", "invoke", "ipermute", "iqr", "is*", "isa", "isappdata", "isaUnderlying", "isbanded", "isbetween", "iscalendarduration", "iscategorical", "iscategory", "iscell", "iscellstr", "ischange", "ischar", "iscolumn", "iscom", "isCompatible", "isCompressedImg", "isConnected", "isdag", "isdatetime", "isdiag", "isdir", "isDiscreteStateSpecificationMutableImpl", "isDone", "isDoneImpl", "isdst", "isduration", "isEdge", "isempty", "isempty", "isenum", "isequal", "isequaln", "isequalwithequalnans", "isevent", "isfield", "isfile", "isfinite", "isfloat", "isfolder", "isfullfile", "isfullfile", "isgraphics", "ishandle", "ishermitian", "ishghandle", "ishold", "ishole", "isIllConditioned", "isInactivePropertyImpl", "isinf", "isInputComplexityMutableImpl", "isInputDataTypeMutableImpl", "isInputDirectFeedthroughImpl", "isInputSizeLockedImpl", "isInputSizeMutableImpl", "isinteger", "isinterface", "isInterior", "isinterior", "isisomorphic", "isjava", "isKey", "iskeyword", "isletter", "isLoaded", "islocalmax", "islocalmin", "isLocked", "islogical", "ismac", "ismatrix", "ismember", "ismembertol", "ismethod", "ismissing", "ismultigraph", "isnan", "isnat", "isNull", "isnumeric", "isobject", "isocaps", "isocolors", "isomorphism", "isonormals", "isordinal", "isosurface", "isoutlier", "isOutputComplexImpl", "isOutputFixedSizeImpl", "ispc", "isplaying", "ispref", "isprime", "isprop", "isprotected", "isreal", "isrecording", "isregular", "isrow", "isscalar", "issimplified", "issorted", "issortedrows", "isspace", "issparse", "isstr", "isstring", "isStringScalar", "isstrprop", "isstruct", "isstudent", "issymmetric", "istable", "istall", "istimetable", "istril", "istriu", "isTunablePropertyDataTypeMutableImpl", "isundefined", "isunix", "isvalid", "isvalid", "isvalid", "isvarname", "isvector", "isweekend", "javaaddpath", "javaArray", "javachk", "javaclasspath", "javaMethod", "javaMethodEDT", "javaObject", "javaObjectEDT", "javarmpath", "jet", "join", "join", "join", "jsondecode", "jsonencode", "juliandate", "keepMeasuring", "keyboard", "keys", "KeyValueDatastore", "KeyValueStore", "kron", "labeledge", "labelnode", "lag", "laplacian", "lasterr", "lasterror", "lastwarn", "layout", "lcm", "ldivide", "ldl", "le", "legend", "legendre", "length", "length", "length", "length", "lib.pointer", "libfunctions", "libfunctionsview", "libisloaded", "libpointer", "libstruct", "license", "light", "lightangle", "lighting", "lin2mu", "line", "lines", "LineSpec", "linkaxes", "linkdata", "linkprop", "linsolve", "linspace", "listdlg", "listener", "listfonts", "listModifiedFiles", "listRequiredFiles", "load", "load", "load", "loadlibrary", "loadobj", "loadObjectImpl", "localfunctions", "log", "log", "log", "log10", "log1p", "log2", "logical", "Logical", "loglog", "logm", "logspace", "lookfor", "lower", "ls", "lscov", "lsqminnorm", "lsqnonneg", "lsqr", "lt", "lu", "magic", "makehgtform", "mapreduce", "mapreducer", "mat2cell", "mat2str", "matchpairs", "material", "matfile", "matlab", "matlab", "matlab", "matlab.addons.disableAddon", "matlab.addons.enableAddon", "matlab.addons.install", "matlab.addons.installedAddons", "matlab.addons.isAddonEnabled", "matlab.addons.toolbox.installedToolboxes", "matlab.addons.toolbox.installToolbox", "matlab.addons.toolbox.packageToolbox", "matlab.addons.toolbox.toolboxVersion", "matlab.addons.toolbox.uninstallToolbox", "matlab.addons.uninstall", "matlab.apputil.create", "matlab.apputil.getInstalledAppInfo", "matlab.apputil.install", "matlab.apputil.package", "matlab.apputil.run", "matlab.apputil.uninstall", "matlab.codetools.requiredFilesAndProducts", "matlab.engine.connect_matlab", "matlab.engine.engineName", "matlab.engine.find_matlab", "matlab.engine.FutureResult", "matlab.engine.isEngineShared", "matlab.engine.MatlabEngine", "matlab.engine.shareEngine", "matlab.engine.start_matlab", "matlab.exception.JavaException", "matlab.exception.PyException", "matlab.graphics.Graphics", "matlab.graphics.GraphicsPlaceholder", "matlab.io.Datastore", "matlab.io.datastore.DsFileReader", "matlab.io.datastore.DsFileSet", "matlab.io.datastore.HadoopFileBased", "matlab.io.datastore.HadoopLocationBased", "matlab.io.datastore.Partitionable", "matlab.io.datastore.Shuffleable", "matlab.io.hdf4.sd", "matlab.io.hdf4.sd.attrInfo", "matlab.io.hdf4.sd.close", "matlab.io.hdf4.sd.create", "matlab.io.hdf4.sd.dimInfo", "matlab.io.hdf4.sd.endAccess", "matlab.io.hdf4.sd.fileInfo", "matlab.io.hdf4.sd.findAttr", "matlab.io.hdf4.sd.getCal", "matlab.io.hdf4.sd.getChunkInfo", "matlab.io.hdf4.sd.getCompInfo", "matlab.io.hdf4.sd.getDataStrs", "matlab.io.hdf4.sd.getDimID", "matlab.io.hdf4.sd.getDimScale", "matlab.io.hdf4.sd.getDimStrs", "matlab.io.hdf4.sd.getFilename", "matlab.io.hdf4.sd.getFillValue", "matlab.io.hdf4.sd.getInfo", "matlab.io.hdf4.sd.getRange", "matlab.io.hdf4.sd.idToRef", "matlab.io.hdf4.sd.idType", "matlab.io.hdf4.sd.isCoordVar", "matlab.io.hdf4.sd.isRecord", "matlab.io.hdf4.sd.nameToIndex", "matlab.io.hdf4.sd.nameToIndices", "matlab.io.hdf4.sd.readAttr", "matlab.io.hdf4.sd.readChunk", "matlab.io.hdf4.sd.readData", "matlab.io.hdf4.sd.refToIndex", "matlab.io.hdf4.sd.select", "matlab.io.hdf4.sd.setAttr", "matlab.io.hdf4.sd.setCal", "matlab.io.hdf4.sd.setChunk", "matlab.io.hdf4.sd.setCompress", "matlab.io.hdf4.sd.setDataStrs", "matlab.io.hdf4.sd.setDimName", "matlab.io.hdf4.sd.setDimScale", "matlab.io.hdf4.sd.setDimStrs", "matlab.io.hdf4.sd.setExternalFile", "matlab.io.hdf4.sd.setFillMode", "matlab.io.hdf4.sd.setFillValue", "matlab.io.hdf4.sd.setNBitDataSet", "matlab.io.hdf4.sd.setRange", "matlab.io.hdf4.sd.start", "matlab.io.hdf4.sd.writeChunk", "matlab.io.hdf4.sd.writeData", "matlab.io.hdfeos.gd", "matlab.io.hdfeos.gd.attach", "matlab.io.hdfeos.gd.close", "matlab.io.hdfeos.gd.compInfo", "matlab.io.hdfeos.gd.create", "matlab.io.hdfeos.gd.defBoxRegion", "matlab.io.hdfeos.gd.defComp", "matlab.io.hdfeos.gd.defDim", "matlab.io.hdfeos.gd.defField", "matlab.io.hdfeos.gd.defOrigin", "matlab.io.hdfeos.gd.defPixReg", "matlab.io.hdfeos.gd.defProj", "matlab.io.hdfeos.gd.defTile", "matlab.io.hdfeos.gd.defVrtRegion", "matlab.io.hdfeos.gd.detach", "matlab.io.hdfeos.gd.dimInfo", "matlab.io.hdfeos.gd.extractRegion", "matlab.io.hdfeos.gd.fieldInfo", "matlab.io.hdfeos.gd.getFillValue", "matlab.io.hdfeos.gd.getPixels", "matlab.io.hdfeos.gd.getPixValues", "matlab.io.hdfeos.gd.gridInfo", "matlab.io.hdfeos.gd.ij2ll", "matlab.io.hdfeos.gd.inqAttrs", "matlab.io.hdfeos.gd.inqDims", "matlab.io.hdfeos.gd.inqFields", "matlab.io.hdfeos.gd.inqGrid", "matlab.io.hdfeos.gd.interpolate", "matlab.io.hdfeos.gd.ll2ij", "matlab.io.hdfeos.gd.nEntries", "matlab.io.hdfeos.gd.open", "matlab.io.hdfeos.gd.originInfo", "matlab.io.hdfeos.gd.pixRegInfo", "matlab.io.hdfeos.gd.projInfo", "matlab.io.hdfeos.gd.readAttr", "matlab.io.hdfeos.gd.readBlkSomOffset", "matlab.io.hdfeos.gd.readField", "matlab.io.hdfeos.gd.readTile", "matlab.io.hdfeos.gd.regionInfo", "matlab.io.hdfeos.gd.setFillValue", "matlab.io.hdfeos.gd.setTileComp", "matlab.io.hdfeos.gd.sphereCodeToName", "matlab.io.hdfeos.gd.sphereNameToCode", "matlab.io.hdfeos.gd.tileInfo", "matlab.io.hdfeos.gd.writeAttr", "matlab.io.hdfeos.gd.writeBlkSomOffset", "matlab.io.hdfeos.gd.writeField", "matlab.io.hdfeos.gd.writeTile", "matlab.io.hdfeos.sw", "matlab.io.hdfeos.sw.attach", "matlab.io.hdfeos.sw.close", "matlab.io.hdfeos.sw.compInfo", "matlab.io.hdfeos.sw.create", "matlab.io.hdfeos.sw.defBoxRegion", "matlab.io.hdfeos.sw.defComp", "matlab.io.hdfeos.sw.defDataField", "matlab.io.hdfeos.sw.defDim", "matlab.io.hdfeos.sw.defDimMap", "matlab.io.hdfeos.sw.defGeoField", "matlab.io.hdfeos.sw.defTimePeriod", "matlab.io.hdfeos.sw.defVrtRegion", "matlab.io.hdfeos.sw.detach", "matlab.io.hdfeos.sw.dimInfo", "matlab.io.hdfeos.sw.extractPeriod", "matlab.io.hdfeos.sw.extractRegion", "matlab.io.hdfeos.sw.fieldInfo", "matlab.io.hdfeos.sw.geoMapInfo", "matlab.io.hdfeos.sw.getFillValue", "matlab.io.hdfeos.sw.idxMapInfo", "matlab.io.hdfeos.sw.inqAttrs", "matlab.io.hdfeos.sw.inqDataFields", "matlab.io.hdfeos.sw.inqDims", "matlab.io.hdfeos.sw.inqGeoFields", "matlab.io.hdfeos.sw.inqIdxMaps", "matlab.io.hdfeos.sw.inqMaps", "matlab.io.hdfeos.sw.inqSwath", "matlab.io.hdfeos.sw.mapInfo", "matlab.io.hdfeos.sw.nEntries", "matlab.io.hdfeos.sw.open", "matlab.io.hdfeos.sw.periodInfo", "matlab.io.hdfeos.sw.readAttr", "matlab.io.hdfeos.sw.readField", "matlab.io.hdfeos.sw.regionInfo", "matlab.io.hdfeos.sw.setFillValue", "matlab.io.hdfeos.sw.writeAttr", "matlab.io.hdfeos.sw.writeField", "matlab.io.MatFile", "matlab.io.saveVariablesToScript", "matlab.lang.correction.AppendArgumentsCorrection", "matlab.lang.makeUniqueStrings", "matlab.lang.makeValidName", "matlab.lang.OnOffSwitchState", "matlab.mex.MexHost", "matlab.mixin.Copyable", "matlab.mixin.CustomDisplay", "matlab.mixin.CustomDisplay.convertDimensionsToString", "matlab.mixin.CustomDisplay.displayPropertyGroups", "matlab.mixin.CustomDisplay.getClassNameForHeader", "matlab.mixin.CustomDisplay.getDeletedHandleText", "matlab.mixin.CustomDisplay.getDetailedFooter", "matlab.mixin.CustomDisplay.getDetailedHeader", "matlab.mixin.CustomDisplay.getHandleText", "matlab.mixin.CustomDisplay.getSimpleHeader", "matlab.mixin.Heterogeneous", "matlab.mixin.Heterogeneous.getDefaultScalarElement", "matlab.mixin.SetGet", "matlab.mixin.SetGetExactNames", "matlab.mixin.util.PropertyGroup", "matlab.mock.actions.AssignOutputs", "matlab.mock.actions.Invoke", "matlab.mock.actions.ReturnStoredValue", "matlab.mock.actions.StoreValue", "matlab.mock.actions.ThrowException", "matlab.mock.AnyArguments", "matlab.mock.constraints.Occurred", "matlab.mock.constraints.WasAccessed", "matlab.mock.constraints.WasCalled", "matlab.mock.constraints.WasSet", "matlab.mock.history.MethodCall", "matlab.mock.history.PropertyAccess", "matlab.mock.history.PropertyModification", "matlab.mock.history.SuccessfulMethodCall", "matlab.mock.history.SuccessfulPropertyAccess", "matlab.mock.history.SuccessfulPropertyModification", "matlab.mock.history.UnsuccessfulMethodCall", "matlab.mock.history.UnsuccessfulPropertyAccess", "matlab.mock.history.UnsuccessfulPropertyModification", "matlab.mock.InteractionHistory", "matlab.mock.InteractionHistory.forMock", "matlab.mock.MethodCallBehavior", "matlab.mock.PropertyBehavior", "matlab.mock.PropertyGetBehavior", "matlab.mock.PropertySetBehavior", "matlab.mock.TestCase", "matlab.mock.TestCase.forInteractiveUse", "matlab.net.ArrayFormat", "matlab.net.base64decode", "matlab.net.base64encode", "matlab.net.http.AuthenticationScheme", "matlab.net.http.AuthInfo", "matlab.net.http.Cookie", "matlab.net.http.CookieInfo", "matlab.net.http.CookieInfo.collectFromLog", "matlab.net.http.Credentials", "matlab.net.http.Disposition", "matlab.net.http.field.AcceptField", "matlab.net.http.field.AuthenticateField", "matlab.net.http.field.AuthenticationInfoField", "matlab.net.http.field.AuthorizationField", "matlab.net.http.field.ContentDispositionField", "matlab.net.http.field.ContentLengthField", "matlab.net.http.field.ContentLocationField", "matlab.net.http.field.ContentTypeField", "matlab.net.http.field.CookieField", "matlab.net.http.field.DateField", "matlab.net.http.field.GenericField", "matlab.net.http.field.GenericParameterizedField", "matlab.net.http.field.HTTPDateField", "matlab.net.http.field.IntegerField", "matlab.net.http.field.LocationField", "matlab.net.http.field.MediaRangeField", "matlab.net.http.field.SetCookieField", "matlab.net.http.field.URIReferenceField", "matlab.net.http.HeaderField", "matlab.net.http.HeaderField.displaySubclasses", "matlab.net.http.HTTPException", "matlab.net.http.HTTPOptions", "matlab.net.http.io.BinaryConsumer", "matlab.net.http.io.ContentConsumer", "matlab.net.http.io.ContentProvider", "matlab.net.http.io.FileConsumer", "matlab.net.http.io.FileProvider", "matlab.net.http.io.FormProvider", "matlab.net.http.io.GenericConsumer", "matlab.net.http.io.GenericProvider", "matlab.net.http.io.ImageConsumer", "matlab.net.http.io.ImageProvider", "matlab.net.http.io.JSONConsumer", "matlab.net.http.io.JSONProvider", "matlab.net.http.io.MultipartConsumer", "matlab.net.http.io.MultipartFormProvider", "matlab.net.http.io.MultipartProvider", "matlab.net.http.io.StringConsumer", "matlab.net.http.io.StringProvider", "matlab.net.http.LogRecord", "matlab.net.http.MediaType", "matlab.net.http.Message", "matlab.net.http.MessageBody", "matlab.net.http.MessageType", "matlab.net.http.ProgressMonitor", "matlab.net.http.ProtocolVersion", "matlab.net.http.RequestLine", "matlab.net.http.RequestMessage", "matlab.net.http.RequestMethod", "matlab.net.http.ResponseMessage", "matlab.net.http.StartLine", "matlab.net.http.StatusClass", "matlab.net.http.StatusCode", "matlab.net.http.StatusCode.fromValue", "matlab.net.http.StatusLine", "matlab.net.QueryParameter", "matlab.net.URI", "matlab.perftest.FixedTimeExperiment", "matlab.perftest.FrequentistTimeExperiment", "matlab.perftest.TestCase", "matlab.perftest.TimeExperiment", "matlab.perftest.TimeExperiment.limitingSamplingError", "matlab.perftest.TimeExperiment.withFixedSampleSize", "matlab.perftest.TimeResult", "matlab.project.createProject", "matlab.project.loadProject", "matlab.project.Project", "matlab.project.rootProject", "matlab.System", "matlab.system.display.Action", "matlab.system.display.Header", "matlab.system.display.Icon", "matlab.system.display.Section", "matlab.system.display.SectionGroup", "matlab.system.mixin.CustomIcon", "matlab.system.mixin.FiniteSource", "matlab.system.mixin.Nondirect", "matlab.system.mixin.Propagates", "matlab.system.mixin.SampleTime", "matlab.system.StringSet", "matlab.tall.blockMovingWindow", "matlab.tall.movingWindow", "matlab.tall.reduce", "matlab.tall.transform", "matlab.test.behavior.Missing", "matlab.uitest.TestCase", "matlab.uitest.TestCase.forInteractiveUse", "matlab.uitest.unlock", "matlab.unittest.constraints.AbsoluteTolerance", "matlab.unittest.constraints.AnyCellOf", "matlab.unittest.constraints.AnyElementOf", "matlab.unittest.constraints.BooleanConstraint", "matlab.unittest.constraints.CellComparator", "matlab.unittest.constraints.Constraint", "matlab.unittest.constraints.ContainsSubstring", "matlab.unittest.constraints.EndsWithSubstring", "matlab.unittest.constraints.Eventually", "matlab.unittest.constraints.EveryCellOf", "matlab.unittest.constraints.EveryElementOf", "matlab.unittest.constraints.HasElementCount", "matlab.unittest.constraints.HasField", "matlab.unittest.constraints.HasInf", "matlab.unittest.constraints.HasLength", "matlab.unittest.constraints.HasNaN", "matlab.unittest.constraints.HasSize", "matlab.unittest.constraints.HasUniqueElements", "matlab.unittest.constraints.IsAnything", "matlab.unittest.constraints.IsEmpty", "matlab.unittest.constraints.IsEqualTo", "matlab.unittest.constraints.IsFalse", "matlab.unittest.constraints.IsFile", "matlab.unittest.constraints.IsFinite", "matlab.unittest.constraints.IsFolder", "matlab.unittest.constraints.IsGreaterThan", "matlab.unittest.constraints.IsGreaterThanOrEqualTo", "matlab.unittest.constraints.IsInstanceOf", "matlab.unittest.constraints.IsLessThan", "matlab.unittest.constraints.IsLessThanOrEqualTo", "matlab.unittest.constraints.IsOfClass", "matlab.unittest.constraints.IsReal", "matlab.unittest.constraints.IsSameHandleAs", "matlab.unittest.constraints.IsSameSetAs", "matlab.unittest.constraints.IsScalar", "matlab.unittest.constraints.IsSparse", "matlab.unittest.constraints.IsSubsetOf", "matlab.unittest.constraints.IsSubstringOf", "matlab.unittest.constraints.IssuesNoWarnings", "matlab.unittest.constraints.IssuesWarnings", "matlab.unittest.constraints.IsSupersetOf", "matlab.unittest.constraints.IsTrue", "matlab.unittest.constraints.LogicalComparator", "matlab.unittest.constraints.Matches", "matlab.unittest.constraints.NumericComparator", "matlab.unittest.constraints.ObjectComparator", "matlab.unittest.constraints.PublicPropertyComparator", "matlab.unittest.constraints.PublicPropertyComparator.supportingAllValues", "matlab.unittest.constraints.RelativeTolerance", "matlab.unittest.constraints.ReturnsTrue", "matlab.unittest.constraints.StartsWithSubstring", "matlab.unittest.constraints.StringComparator", "matlab.unittest.constraints.StructComparator", "matlab.unittest.constraints.TableComparator", "matlab.unittest.constraints.Throws", "matlab.unittest.constraints.Tolerance", "matlab.unittest.diagnostics.ConstraintDiagnostic", "matlab.unittest.diagnostics.ConstraintDiagnostic.getDisplayableString", "matlab.unittest.diagnostics.Diagnostic", "matlab.unittest.diagnostics.DiagnosticResult", "matlab.unittest.diagnostics.DisplayDiagnostic", "matlab.unittest.diagnostics.FigureDiagnostic", "matlab.unittest.diagnostics.FileArtifact", "matlab.unittest.diagnostics.FrameworkDiagnostic", "matlab.unittest.diagnostics.FunctionHandleDiagnostic", "matlab.unittest.diagnostics.LoggedDiagnosticEventData", "matlab.unittest.diagnostics.ScreenshotDiagnostic", "matlab.unittest.diagnostics.StringDiagnostic", "matlab.unittest.fixtures.CurrentFolderFixture", "matlab.unittest.fixtures.Fixture", "matlab.unittest.fixtures.PathFixture", "matlab.unittest.fixtures.ProjectFixture", "matlab.unittest.fixtures.SuppressedWarningsFixture", "matlab.unittest.fixtures.TemporaryFolderFixture", "matlab.unittest.fixtures.WorkingFolderFixture", "matlab.unittest.measurement.DefaultMeasurementResult", "matlab.unittest.measurement.MeasurementResult", "matlab.unittest.parameters.ClassSetupParameter", "matlab.unittest.parameters.EmptyParameter", "matlab.unittest.parameters.MethodSetupParameter", "matlab.unittest.parameters.Parameter", "matlab.unittest.parameters.Parameter.fromData", "matlab.unittest.parameters.TestParameter", "matlab.unittest.plugins.codecoverage.CoberturaFormat", "matlab.unittest.plugins.codecoverage.CoverageReport", "matlab.unittest.plugins.codecoverage.ProfileReport", "matlab.unittest.plugins.CodeCoveragePlugin", "matlab.unittest.plugins.CodeCoveragePlugin.forFile", "matlab.unittest.plugins.CodeCoveragePlugin.forFolder", "matlab.unittest.plugins.CodeCoveragePlugin.forPackage", "matlab.unittest.plugins.diagnosticrecord.DiagnosticRecord", "matlab.unittest.plugins.diagnosticrecord.ExceptionDiagnosticRecord", "matlab.unittest.plugins.diagnosticrecord.LoggedDiagnosticRecord", "matlab.unittest.plugins.diagnosticrecord.QualificationDiagnosticRecord", "matlab.unittest.plugins.DiagnosticsOutputPlugin", "matlab.unittest.plugins.DiagnosticsRecordingPlugin", "matlab.unittest.plugins.DiagnosticsValidationPlugin", "matlab.unittest.plugins.FailOnWarningsPlugin", "matlab.unittest.plugins.LoggingPlugin", "matlab.unittest.plugins.LoggingPlugin.withVerbosity", "matlab.unittest.plugins.OutputStream", "matlab.unittest.plugins.plugindata.FinalizedResultPluginData", "matlab.unittest.plugins.plugindata.ImplicitFixturePluginData", "matlab.unittest.plugins.plugindata.PluginData", "matlab.unittest.plugins.plugindata.QualificationContext", "matlab.unittest.plugins.plugindata.SharedTestFixturePluginData", "matlab.unittest.plugins.plugindata.TestContentCreationPluginData", "matlab.unittest.plugins.plugindata.TestSuiteRunPluginData", "matlab.unittest.plugins.QualifyingPlugin", "matlab.unittest.plugins.StopOnFailuresPlugin", "matlab.unittest.plugins.TAPPlugin", "matlab.unittest.plugins.TAPPlugin.producingOriginalFormat", "matlab.unittest.plugins.TAPPlugin.producingVersion13", "matlab.unittest.plugins.testreport.DOCXTestReportPlugin", "matlab.unittest.plugins.testreport.HTMLTestReportPlugin", "matlab.unittest.plugins.testreport.PDFTestReportPlugin", "matlab.unittest.plugins.TestReportPlugin", "matlab.unittest.plugins.TestReportPlugin.producingDOCX", "matlab.unittest.plugins.TestReportPlugin.producingHTML", "matlab.unittest.plugins.TestReportPlugin.producingPDF", "matlab.unittest.plugins.TestRunnerPlugin", "matlab.unittest.plugins.TestRunProgressPlugin", "matlab.unittest.plugins.ToFile", "matlab.unittest.plugins.ToStandardOutput", "matlab.unittest.plugins.ToUniqueFile", "matlab.unittest.plugins.XMLPlugin", "matlab.unittest.plugins.XMLPlugin.producingJUnitFormat", "matlab.unittest.qualifications.Assertable", "matlab.unittest.qualifications.AssertionFailedException", "matlab.unittest.qualifications.Assumable", "matlab.unittest.qualifications.AssumptionFailedException", "matlab.unittest.qualifications.ExceptionEventData", "matlab.unittest.qualifications.FatalAssertable", "matlab.unittest.qualifications.FatalAssertionFailedException", "matlab.unittest.qualifications.QualificationEventData", "matlab.unittest.qualifications.Verifiable", "matlab.unittest.Scope", "matlab.unittest.selectors.AndSelector", "matlab.unittest.selectors.HasBaseFolder", "matlab.unittest.selectors.HasName", "matlab.unittest.selectors.HasParameter", "matlab.unittest.selectors.HasProcedureName", "matlab.unittest.selectors.HasSharedTestFixture", "matlab.unittest.selectors.HasSuperclass", "matlab.unittest.selectors.HasTag", "matlab.unittest.selectors.NotSelector", "matlab.unittest.selectors.OrSelector", "matlab.unittest.Test", "matlab.unittest.TestCase", "matlab.unittest.TestCase.forInteractiveUse", "matlab.unittest.TestResult", "matlab.unittest.TestRunner", "matlab.unittest.TestRunner.withNoPlugins", "matlab.unittest.TestRunner.withTextOutput", "matlab.unittest.TestSuite", "matlab.unittest.TestSuite.fromClass", "matlab.unittest.TestSuite.fromFile", "matlab.unittest.TestSuite.fromFolder", "matlab.unittest.TestSuite.fromMethod", "matlab.unittest.TestSuite.fromName", "matlab.unittest.TestSuite.fromPackage", "matlab.unittest.TestSuite.fromProject", "matlab.unittest.Verbosity", "matlab.wsdl.createWSDLClient", "matlab.wsdl.setWSDLToolPath", "matlabrc", "matlabroot", "matlabshared.supportpkg.checkForUpdate", "matlabshared.supportpkg.getInstalled", "matlabshared.supportpkg.getSupportPackageRoot", "matlabshared.supportpkg.setSupportPackageRoot", "max", "max", "maxflow", "MaximizeCommandWindow", "maxk", "maxNumCompThreads", "maxpartitions", "maxpartitions", "mean", "mean", "median", "median", "memmapfile", "memoize", "MemoizedFunction", "memory", "menu", "mergecats", "mergevars", "mesh", "meshc", "meshgrid", "meshz", "meta.abstractDetails", "meta.ArrayDimension", "meta.class", "meta.class.fromName", "meta.DynamicProperty", "meta.EnumeratedValue", "meta.event", "meta.FixedDimension", "meta.MetaData", "meta.method", "meta.package", "meta.package.fromName", "meta.package.getAllPackages", "meta.property", "meta.UnrestrictedDimension", "meta.Validation", "metaclass", "methods", "methodsview", "mex", "mex.getCompilerConfigurations", "MException", "MException.last", "mexext", "mexhost", "mfilename", "mget", "milliseconds", "min", "min", "MinimizeCommandWindow", "mink", "minres", "minspantree", "minus", "minute", "minutes", "mislocked", "missing", "mkdir", "mkdir", "mkpp", "mldivide", "mlint", "mlintrpt", "mlock", "mmfileinfo", "mod", "mode", "month", "more", "morebins", "movAbsHDU", "move", "move", "movefile", "movegui", "movevars", "movie", "movmad", "movmax", "movmean", "movmedian", "movmin", "movNamHDU", "movprod", "movRelHDU", "movstd", "movsum", "movvar", "mpower", "mput", "mrdivide", "msgbox", "mtimes", "mu2lin", "multibandread", "multibandwrite", "munlock", "mustBeFinite", "mustBeGreaterThan", "mustBeGreaterThanOrEqual", "mustBeInteger", "mustBeLessThan", "mustBeLessThanOrEqual", "mustBeMember", "mustBeNegative", "mustBeNonempty", "mustBeNonNan", "mustBeNonnegative", "mustBeNonpositive", "mustBeNonsparse", "mustBeNonzero", "mustBeNumeric", "mustBeNumericOrLogical", "mustBePositive", "mustBeReal", "namelengthmax", "NaN", "nargchk", "nargin", "nargin", "narginchk", "nargout", "nargout", "nargoutchk", "NaT", "native2unicode", "nccreate", "ncdisp", "nchoosek", "ncinfo", "ncread", "ncreadatt", "ncwrite", "ncwriteatt", "ncwriteschema", "ndgrid", "ndims", "ne", "nearest", "nearestNeighbor", "nearestNeighbor", "nearestNeighbor", "nearestvertex", "neighbors", "neighbors", "neighbors", "NET", "NET.addAssembly", "NET.Assembly", "NET.convertArray", "NET.createArray", "NET.createGeneric", "NET.disableAutoRelease", "NET.enableAutoRelease", "NET.GenericClass", "NET.invokeGenericMethod", "NET.isNETSupported", "NET.NetException", "NET.setStaticProperty", "netcdf.abort", "netcdf.close", "netcdf.copyAtt", "netcdf.create", "netcdf.defDim", "netcdf.defGrp", "netcdf.defVar", "netcdf.defVarChunking", "netcdf.defVarDeflate", "netcdf.defVarFill", "netcdf.defVarFletcher32", "netcdf.delAtt", "netcdf.endDef", "netcdf.getAtt", "netcdf.getChunkCache", "netcdf.getConstant", "netcdf.getConstantNames", "netcdf.getVar", "netcdf.inq", "netcdf.inqAtt", "netcdf.inqAttID", "netcdf.inqAttName", "netcdf.inqDim", "netcdf.inqDimID", "netcdf.inqDimIDs", "netcdf.inqFormat", "netcdf.inqGrpName", "netcdf.inqGrpNameFull", "netcdf.inqGrpParent", "netcdf.inqGrps", "netcdf.inqLibVers", "netcdf.inqNcid", "netcdf.inqUnlimDims", "netcdf.inqVar", "netcdf.inqVarChunking", "netcdf.inqVarDeflate", "netcdf.inqVarFill", "netcdf.inqVarFletcher32", "netcdf.inqVarID", "netcdf.inqVarIDs", "netcdf.open", "netcdf.putAtt", "netcdf.putVar", "netcdf.reDef", "netcdf.renameAtt", "netcdf.renameDim", "netcdf.renameVar", "netcdf.setChunkCache", "netcdf.setDefaultFormat", "netcdf.setFill", "netcdf.sync", "newline", "newplot", "nextfile", "nextpow2", "nnz", "nonzeros", "norm", "normalize", "normest", "not", "notebook", "notify", "now", "nsidedpoly", "nthroot", "null", "num2cell", "num2hex", "num2ruler", "num2str", "numArgumentsFromSubscript", "numboundaries", "numedges", "numel", "numnodes", "numpartitions", "numpartitions", "numRegions", "numsides", "nzmax", "ode113", "ode15i", "ode15s", "ode23", "ode23s", "ode23t", "ode23tb", "ode45", "odeget", "odeset", "odextend", "onCleanup", "ones", "onFailure", "onFailure", "open", "open", "openDiskFile", "openfig", "openFile", "opengl", "openProject", "openvar", "optimget", "optimset", "or", "ordeig", "orderfields", "ordqz", "ordschur", "orient", "orth", "outdegree", "outedges", "outerjoin", "outputImpl", "overlaps", "pack", "pad", "padecoef", "pagesetupdlg", "pan", "panInteraction", "parallelplot", "pareto", "parfor", "parquetDatastore", "parquetinfo", "parquetread", "parquetwrite", "parse", "parse", "parseSoapResponse", "partition", "partition", "partition", "parula", "pascal", "patch", "path", "path2rc", "pathsep", "pathtool", "pause", "pause", "pbaspect", "pcg", "pchip", "pcode", "pcolor", "pdepe", "pdeval", "peaks", "perimeter", "perimeter", "perl", "perms", "permute", "persistent", "pi", "pie", "pie3", "pink", "pinv", "planerot", "play", "play", "playblocking", "plot", "plot", "plot", "plot", "plot", "plot3", "plotbrowser", "plotedit", "plotmatrix", "plottools", "plotyy", "plus", "plus", "pointLocation", "pointLocation", "pol2cart", "polar", "polaraxes", "polarhistogram", "polarplot", "polarscatter", "poly", "polyarea", "polybuffer", "polyder", "polyeig", "polyfit", "polyint", "polyshape", "polyval", "polyvalm", "posixtime", "pow2", "power", "ppval", "predecessors", "prefdir", "preferences", "preferredBufferSize", "preferredBufferSize", "press", "preview", "preview", "primes", "print", "print", "printdlg", "printopt", "printpreview", "prism", "processInputSpecificationChangeImpl", "processTunedPropertiesImpl", "prod", "profile", "profsave", "progress", "propagatedInputComplexity", "propagatedInputDataType", "propagatedInputFixedSize", "propagatedInputSize", "propedit", "propedit", "properties", "propertyeditor", "psi", "publish", "PutCharArray", "putData", "putData", "putData", "putData", "putData", "putData", "putData", "putData", "PutFullMatrix", "PutWorkspaceData", "pwd", "pyargs", "pyversion", "qmr", "qr", "qrdelete", "qrinsert", "qrupdate", "quad", "quad2d", "quadgk", "quadl", "quadv", "quarter", "questdlg", "Quit", "quit", "quiver", "quiver3", "qz", "rad2deg", "rand", "rand", "randi", "randi", "randn", "randn", "randperm", "randperm", "RandStream", "RandStream", "RandStream.create", "RandStream.getGlobalStream", "RandStream.list", "RandStream.setGlobalStream", "rank", "rat", "rats", "rbbox", "rcond", "rdivide", "read", "read", "read", "read", "read", "readall", "readasync", "readATblHdr", "readBTblHdr", "readCard", "readcell", "readCol", "readFrame", "readimage", "readImg", "readKey", "readKeyCmplx", "readKeyDbl", "readKeyLongLong", "readKeyLongStr", "readKeyUnit", "readmatrix", "readRecord", "readtable", "readtimetable", "readvars", "real", "reallog", "realmax", "realmin", "realpow", "realsqrt", "record", "record", "recordblocking", "rectangle", "rectint", "recycle", "reducepatch", "reducevolume", "refresh", "refreshdata", "refreshSourceControl", "regexp", "regexpi", "regexprep", "regexptranslate", "regions", "regionZoomInteraction", "registerevent", "regmatlabserver", "rehash", "relationaloperators", "release", "release", "releaseImpl", "reload", "rem", "Remove", "remove", "RemoveAll", "removeCategory", "removecats", "removeFields", "removeFields", "removeFile", "removeLabel", "removeParameter", "removeParameter", "removePath", "removeReference", "removeShortcut", "removeShutdownFile", "removeStartupFile", "removeToolbarExplorationButtons", "removets", "removevars", "rename", "renamecats", "rendererinfo", "reordercats", "reordernodes", "repeat", "repeat", "repeat", "repeat", "repeat", "repelem", "replace", "replaceBetween", "replaceFields", "replaceFields", "repmat", "reportFinalizedResult", "resample", "resample", "rescale", "reset", "reset", "reset", "reset", "reset", "resetImpl", "reshape", "reshape", "residue", "resolve", "restartable", "restartable", "restartable", "restoredefaultpath", "result", "resume", "rethrow", "rethrow", "retime", "return", "returnStoredValueWhen", "reusable", "reusable", "reusable", "reverse", "rgb2gray", "rgb2hsv", "rgb2ind", "rgbplot", "ribbon", "rlim", "rmappdata", "rmboundary", "rmdir", "rmdir", "rmedge", "rmfield", "rmholes", "rmmissing", "rmnode", "rmoutliers", "rmpath", "rmpref", "rmprop", "rmslivers", "rng", "roots", "rose", "rosser", "rot90", "rotate", "rotate", "rotate3d", "rotateInteraction", "round", "rowfun", "rows2vars", "rref", "rsf2csf", "rtickangle", "rtickformat", "rticklabels", "rticks", "ruler2num", "rulerPanInteraction", "run", "run", "run", "run", "run", "runInParallel", "runperf", "runTest", "runTestClass", "runTestMethod", "runtests", "runTestSuite", "samplefun", "sampleSummary", "satisfiedBy", "satisfiedBy", "save", "save", "save", "saveas", "savefig", "saveobj", "saveObjectImpl", "savepath", "scale", "scatter", "scatter3", "scatteredInterpolant", "scatterhistogram", "schur", "scroll", "sec", "secd", "sech", "second", "seconds", "seek", "selectFailed", "selectIf", "selectIncomplete", "selectLogged", "selectmoveresize", "selectPassed", "semilogx", "semilogy", "send", "sendmail", "serial", "serialbreak", "seriallist", "set", "set", "set", "set", "set", "set", "set", "set", "set", "set", "set", "setabstime", "setabstime", "setappdata", "setBscale", "setcats", "setCompressionType", "setdatatype", "setdiff", "setdisp", "setenv", "setfield", "setHCompScale", "setHCompSmooth", "setinterpmethod", "setParameter", "setParameter", "setParameter", "setpixelposition", "setpref", "setProperties", "setstr", "setTileDim", "settimeseriesnames", "Setting", "settings", "SettingsGroup", "setToValue", "setTscale", "setuniformtime", "setup", "setupImpl", "setupSharedTestFixture", "setupTestClass", "setupTestMethod", "setvaropts", "setvartype", "setxor", "sgtitle", "shading", "sheetnames", "shg", "shiftdim", "shortestpath", "shortestpathtree", "show", "show", "show", "show", "showFiSettingsImpl", "showplottool", "showSimulateUsingImpl", "shrinkfaces", "shuffle", "shuffle", "sign", "simplify", "simplify", "sin", "sind", "single", "sinh", "sinpi", "size", "size", "size", "size", "size", "size", "size", "slice", "smooth3", "smoothdata", "snapnow", "sort", "sortboundaries", "sortByFixtures", "sortregions", "sortrows", "sortx", "sorty", "sound", "soundsc", "spalloc", "sparse", "spaugment", "spconvert", "spdiags", "specular", "speye", "spfun", "sph2cart", "sphere", "spinmap", "spline", "split", "split", "splitapply", "splitEachLabel", "splitlines", "splitvars", "spones", "spparms", "sprand", "sprandn", "sprandsym", "sprank", "spreadsheetDatastore", "spreadsheetImportOptions", "spring", "sprintf", "spy", "sqrt", "sqrtm", "squeeze", "ss2tf", "sscanf", "stack", "stackedplot", "stairs", "standardizeMissing", "start", "start", "start", "start", "start", "start", "start", "start", "start", "start", "start", "start", "startat", "startMeasuring", "startsWith", "startup", "stats", "std", "std", "stem", "stem3", "step", "stepImpl", "stlread", "stlwrite", "stop", "stop", "stopasync", "stopMeasuring", "storeValueWhen", "str2double", "str2func", "str2mat", "str2num", "strcat", "strcmp", "strcmpi", "stream2", "stream3", "streamline", "streamparticles", "streamribbon", "streamslice", "streamtube", "strfind", "string", "string", "string", "string", "string", "string", "strings", "strip", "strjoin", "strjust", "strlength", "strmatch", "strncmp", "strncmpi", "strread", "strrep", "strsplit", "strtok", "strtrim", "struct", "struct2cell", "struct2table", "structfun", "strvcat", "sub2ind", "subgraph", "subplot", "subsasgn", "subset", "subsindex", "subspace", "subsref", "substruct", "subtract", "subvolume", "successors", "sum", "sum", "summary", "summary", "summer", "superclasses", "support", "supportPackageInstaller", "supports", "supportsMultipleInstanceImpl", "surf", "surf2patch", "surface", "surfaceArea", "surfc", "surfl", "surfnorm", "svd", "svds", "swapbytes", "sylvester", "symamd", "symbfact", "symmlq", "symrcm", "symvar", "synchronize", "synchronize", "syntax", "system", "table", "table2array", "table2cell", "table2struct", "table2timetable", "tabularTextDatastore", "tail", "tall", "TallDatastore", "tallrng", "tan", "tand", "tanh", "tar", "tcpclient", "teardown", "teardownSharedTestFixture", "teardownTestClass", "teardownTestMethod", "tempdir", "tempname", "testsuite", "tetramesh", "texlabel", "text", "textread", "textscan", "textwrap", "tfqmr", "then", "then", "then", "then", "then", "thetalim", "thetatickformat", "thetaticklabels", "thetaticks", "thingSpeakRead", "thingSpeakWrite", "throw", "throwAsCaller", "throwExceptionWhen", "tic", "Tiff", "Tiff.computeStrip", "Tiff.computeTile", "Tiff.currentDirectory", "Tiff.getTag", "Tiff.getTagNames", "Tiff.getVersion", "Tiff.isTiled", "Tiff.lastDirectory", "Tiff.nextDirectory", "Tiff.numberOfStrips", "Tiff.numberOfTiles", "Tiff.readEncodedStrip", "Tiff.readEncodedTile", "Tiff.readRGBAImage", "Tiff.readRGBAStrip", "Tiff.readRGBATile", "Tiff.rewriteDirectory", "Tiff.setDirectory", "Tiff.setSubDirectory", "Tiff.setTag", "Tiff.writeDirectory", "Tiff.writeEncodedStrip", "Tiff.writeEncodedTile", "time", "timeit", "timeofday", "timer", "timerange", "timerfind", "timerfindall", "times", "timeseries", "timetable", "timetable2table", "timezones", "title", "toc", "todatenum", "toeplitz", "toolboxdir", "topkrows", "toposort", "trace", "transclosure", "transform", "TransformedDatastore", "translate", "transpose", "transreduction", "trapz", "treelayout", "treeplot", "triangulation", "triangulation", "tril", "trimesh", "triplequad", "triplot", "TriRep", "TriRep", "TriScatteredInterp", "TriScatteredInterp", "trisurf", "triu", "true", "tscollection", "tsdata.event", "tsearchn", "turningdist", "type", "type", "typecast", "tzoffset", "uialert", "uiaxes", "uibutton", "uibuttongroup", "uicheckbox", "uiconfirm", "uicontextmenu", "uicontrol", "uidatepicker", "uidropdown", "uieditfield", "uifigure", "uigauge", "uigetdir", "uigetfile", "uigetpref", "uigridlayout", "uiimage", "uiimport", "uiknob", "uilabel", "uilamp", "uilistbox", "uimenu", "uint16", "uint32", "uint64", "uint8", "uiopen", "uipanel", "uiprogressdlg", "uipushtool", "uiputfile", "uiradiobutton", "uiresume", "uisave", "uisetcolor", "uisetfont", "uisetpref", "uislider", "uispinner", "uistack", "uiswitch", "uitab", "uitabgroup", "uitable", "uitextarea", "uitogglebutton", "uitoggletool", "uitoolbar", "uitree", "uitreenode", "uiwait", "uminus", "underlyingValue", "undocheckout", "unicode2native", "union", "union", "unique", "uniquetol", "unix", "unloadlibrary", "unmesh", "unmkpp", "unregisterallevents", "unregisterevent", "unstack", "untar", "unwrap", "unzip", "updateDependencies", "updateImpl", "upgradePreviouslyInstalledSupportPackages", "uplus", "upper", "urlread", "urlwrite", "usejava", "userpath", "validate", "validate", "validate", "validate", "validateattributes", "validateFunctionSignaturesJSON", "validateInputsImpl", "validatePropertiesImpl", "validatestring", "ValueIterator", "values", "vander", "var", "var", "varargin", "varargout", "varfun", "vartype", "vecnorm", "vectorize", "ver", "verctrl", "verifyAccessed", "verifyCalled", "verifyClass", "verifyEmpty", "verifyEqual", "verifyError", "verifyFail", "verifyFalse", "verifyGreaterThan", "verifyGreaterThanOrEqual", "verifyInstanceOf", "verifyLength", "verifyLessThan", "verifyLessThanOrEqual", "verifyMatches", "verifyNotAccessed", "verifyNotCalled", "verifyNotEmpty", "verifyNotEqual", "verifyNotSameHandle", "verifyNotSet", "verifyNumElements", "verifyReturnsTrue", "verifySameHandle", "verifySet", "verifySize", "verifySubstring", "verifyThat", "verifyTrue", "verifyUsing", "verifyWarning", "verifyWarningFree", "verLessThan", "version", "vertcat", "vertcat", "vertcat", "vertexAttachments", "vertexAttachments", "vertexNormal", "VideoReader", "VideoWriter", "view", "viewmtx", "visdiff", "volume", "volumebounds", "voronoi", "voronoiDiagram", "voronoiDiagram", "voronoin", "wait", "waitbar", "waitfor", "waitforbuttonpress", "warndlg", "warning", "waterfall", "web", "weboptions", "webread", "websave", "webwrite", "week", "weekday", "what", "whatsnew", "when", "when", "when", "which", "while", "whitebg", "who", "who", "whos", "whos", "width", "wilkinson", "winopen", "winqueryreg", "winter", "withAnyInputs", "withExactInputs", "withNargout", "withtol", "wordcloud", "write", "write", "write", "writecell", "writeChecksum", "writeCol", "writeComment", "writeDate", "writeHistory", "writeImg", "writeKey", "writeKeyUnit", "writematrix", "writetable", "writetimetable", "writeVideo", "xcorr", "xcov", "xlabel", "xlim", "xline", "xlsfinfo", "xlsread", "xlswrite", "xmlread", "xmlwrite", "xor", "xor", "xslt", "xtickangle", "xtickformat", "xticklabels", "xticks", "year", "years", "ylabel", "ylim", "yline", "ymd", "ytickangle", "ytickformat", "yticklabels", "yticks", "yyaxis", "yyyymmdd", "zeros", "zip", "zlabel", "zlim", "zoom", "zoomInteraction", "ztickangle", "ztickformat", "zticklabels", "zticks"] end end end rouge-3.28.0/lib/rouge/lexers/matlab/keywords.rb000066400000000000000000001714611417417255300215750ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # DO NOT EDIT # This file is automatically generated by `rake builtins:matlab`. # See tasks/builtins/matlab.rake for more info. module Rouge module Lexers def Matlab.builtins @builtins ||= Set.new ["abs", "accumarray", "acos", "acosd", "acosh", "acot", "acotd", "acoth", "acsc", "acscd", "acsch", "actxcontrol", "actxcontrollist", "actxcontrolselect", "actxGetRunningServer", "actxserver", "add", "addboundary", "addcats", "addCause", "addClass", "addCondition", "addConditionsFrom", "addConstructor", "addCorrection", "addedge", "addevent", "addFields", "addFields", "addFile", "addFolderIncludingChildFiles", "addFunction", "addLabel", "addlistener", "addMethod", "addmulti", "addnode", "addOptional", "addParameter", "addParamValue", "addPath", "addpath", "addPlugin", "addpoints", "addpref", "addprop", "addprop", "addproperty", "addProperty", "addReference", "addRequired", "addsample", "addsampletocollection", "addShortcut", "addShutdownFile", "addStartupFile", "addTeardown", "addTeardown", "addtodate", "addToolbarExplorationButtons", "addts", "addvars", "adjacency", "airy", "align", "alim", "all", "allchild", "allowModelReferenceDiscreteSampleTimeInheritanceImpl", "alpha", "alphamap", "alphaShape", "alphaSpectrum", "alphaTriangulation", "amd", "analyzeCodeCompatibility", "ancestor", "and", "angle", "animatedline", "annotation", "ans", "any", "appdesigner", "append", "append", "applyFixture", "applyFixture", "area", "area", "area", "array2table", "array2timetable", "arrayfun", "ascii", "asec", "asecd", "asech", "asin", "asind", "asinh", "assert", "assertAccessed", "assertCalled", "assertClass", "assertEmpty", "assertEqual", "assertError", "assertFail", "assertFalse", "assertGreaterThan", "assertGreaterThanOrEqual", "assertInstanceOf", "assertLength", "assertLessThan", "assertLessThanOrEqual", "assertMatches", "assertNotAccessed", "assertNotCalled", "assertNotEmpty", "assertNotEqual", "assertNotSameHandle", "assertNotSet", "assertNumElements", "assertReturnsTrue", "assertSameHandle", "assertSet", "assertSize", "assertSubstring", "assertThat", "assertTrue", "assertUsing", "assertWarning", "assertWarningFree", "assignin", "assignOutputsWhen", "assumeAccessed", "assumeCalled", "assumeClass", "assumeEmpty", "assumeEqual", "assumeError", "assumeFail", "assumeFalse", "assumeGreaterThan", "assumeGreaterThanOrEqual", "assumeInstanceOf", "assumeLength", "assumeLessThan", "assumeLessThanOrEqual", "assumeMatches", "assumeNotAccessed", "assumeNotCalled", "assumeNotEmpty", "assumeNotEqual", "assumeNotSameHandle", "assumeNotSet", "assumeNumElements", "assumeReturnsTrue", "assumeSameHandle", "assumeSet", "assumeSize", "assumeSubstring", "assumeThat", "assumeTrue", "assumeUsing", "assumeWarning", "assumeWarningFree", "atan", "atan2", "atan2d", "atand", "atanh", "audiodevinfo", "audioinfo", "audioplayer", "audioread", "audiorecorder", "audiowrite", "autumn", "aviinfo", "axes", "axis", "axtoolbar", "axtoolbarbtn", "balance", "bandwidth", "bar", "bar3", "bar3h", "barh", "barycentricToCartesian", "baryToCart", "base2dec", "batchStartupOptionUsed", "bctree", "beep", "BeginInvoke", "bench", "besselh", "besseli", "besselj", "besselk", "bessely", "beta", "betainc", "betaincinv", "betaln", "between", "bfsearch", "bicg", "bicgstab", "bicgstabl", "biconncomp", "bin2dec", "binary", "binscatter", "bitand", "bitcmp", "bitget", "bitnot", "bitor", "bitset", "bitshift", "bitxor", "blanks", "blkdiag", "bone", "boundary", "boundary", "boundaryFacets", "boundaryshape", "boundingbox", "bounds", "box", "break", "brighten", "brush", "bsxfun", "build", "builddocsearchdb", "builtin", "bvp4c", "bvp5c", "bvpget", "bvpinit", "bvpset", "bvpxtend", "caldays", "caldiff", "calendar", "calendarDuration", "calllib", "callSoapService", "calmonths", "calquarters", "calweeks", "calyears", "camdolly", "cameratoolbar", "camlight", "camlookat", "camorbit", "campan", "campos", "camproj", "camroll", "camtarget", "camup", "camva", "camzoom", "cancel", "cancelled", "cart2pol", "cart2sph", "cartesianToBarycentric", "cartToBary", "cast", "cat", "cat", "categorical", "categories", "caxis", "cd", "cd", "cdf2rdf", "cdfepoch", "cdfinfo", "cdflib", "cdflib.close", "cdflib.closeVar", "cdflib.computeEpoch", "cdflib.computeEpoch16", "cdflib.create", "cdflib.createAttr", "cdflib.createVar", "cdflib.delete", "cdflib.deleteAttr", "cdflib.deleteAttrEntry", "cdflib.deleteAttrgEntry", "cdflib.deleteVar", "cdflib.deleteVarRecords", "cdflib.epoch16Breakdown", "cdflib.epochBreakdown", "cdflib.getAttrEntry", "cdflib.getAttrgEntry", "cdflib.getAttrMaxEntry", "cdflib.getAttrMaxgEntry", "cdflib.getAttrName", "cdflib.getAttrNum", "cdflib.getAttrScope", "cdflib.getCacheSize", "cdflib.getChecksum", "cdflib.getCompression", "cdflib.getCompressionCacheSize", "cdflib.getConstantNames", "cdflib.getConstantValue", "cdflib.getCopyright", "cdflib.getFileBackward", "cdflib.getFormat", "cdflib.getLibraryCopyright", "cdflib.getLibraryVersion", "cdflib.getMajority", "cdflib.getName", "cdflib.getNumAttrEntries", "cdflib.getNumAttrgEntries", "cdflib.getNumAttributes", "cdflib.getNumgAttributes", "cdflib.getReadOnlyMode", "cdflib.getStageCacheSize", "cdflib.getValidate", "cdflib.getVarAllocRecords", "cdflib.getVarBlockingFactor", "cdflib.getVarCacheSize", "cdflib.getVarCompression", "cdflib.getVarData", "cdflib.getVarMaxAllocRecNum", "cdflib.getVarMaxWrittenRecNum", "cdflib.getVarName", "cdflib.getVarNum", "cdflib.getVarNumRecsWritten", "cdflib.getVarPadValue", "cdflib.getVarRecordData", "cdflib.getVarReservePercent", "cdflib.getVarsMaxWrittenRecNum", "cdflib.getVarSparseRecords", "cdflib.getVersion", "cdflib.hyperGetVarData", "cdflib.hyperPutVarData", "cdflib.inquire", "cdflib.inquireAttr", "cdflib.inquireAttrEntry", "cdflib.inquireAttrgEntry", "cdflib.inquireVar", "cdflib.open", "cdflib.putAttrEntry", "cdflib.putAttrgEntry", "cdflib.putVarData", "cdflib.putVarRecordData", "cdflib.renameAttr", "cdflib.renameVar", "cdflib.setCacheSize", "cdflib.setChecksum", "cdflib.setCompression", "cdflib.setCompressionCacheSize", "cdflib.setFileBackward", "cdflib.setFormat", "cdflib.setMajority", "cdflib.setReadOnlyMode", "cdflib.setStageCacheSize", "cdflib.setValidate", "cdflib.setVarAllocBlockRecords", "cdflib.setVarBlockingFactor", "cdflib.setVarCacheSize", "cdflib.setVarCompression", "cdflib.setVarInitialRecs", "cdflib.setVarPadValue", "cdflib.SetVarReservePercent", "cdflib.setVarsCacheSize", "cdflib.setVarSparseRecords", "cdfread", "cdfwrite", "ceil", "cell", "cell2mat", "cell2struct", "cell2table", "celldisp", "cellfun", "cellplot", "cellstr", "centrality", "centroid", "cgs", "changeFields", "changeFields", "char", "char", "checkcode", "checkin", "checkout", "chol", "cholupdate", "choose", "circshift", "circumcenter", "circumcenters", "cla", "clabel", "class", "classdef", "classUnderlying", "clc", "clear", "clear", "clearAllMemoizedCaches", "clearCache", "clearMockHistory", "clearPersonalValue", "clearpoints", "clearTemporaryValue", "clearvars", "clf", "clibgen.buildInterface", "clibgen.ClassDefinition", "clibgen.ConstructorDefinition", "clibgen.EnumDefinition", "clibgen.FunctionDefinition", "clibgen.generateLibraryDefinition", "clibgen.LibraryDefinition", "clibgen.MethodDefinition", "clibgen.PropertyDefinition", "clibRelease", "clipboard", "clock", "clone", "close", "close", "close", "close", "close", "closeFile", "closereq", "cmopts", "cmpermute", "cmunique", "CodeCompatibilityAnalysis", "codeCompatibilityReport", "colamd", "collapse", "colon", "colorbar", "colorcube", "colordef", "colormap", "ColorSpec", "colperm", "COM", "com.mathworks.engine.MatlabEngine", "com.mathworks.matlab.types.CellStr", "com.mathworks.matlab.types.Complex", "com.mathworks.matlab.types.HandleObject", "com.mathworks.matlab.types.Struct", "combine", "Combine", "CombinedDatastore", "comet", "comet3", "compan", "compass", "complete", "complete", "complete", "complete", "complete", "complete", "complete", "complex", "compose", "computer", "cond", "condeig", "condensation", "condest", "coneplot", "conj", "conncomp", "containers.Map", "contains", "continue", "contour", "contour3", "contourc", "contourf", "contourslice", "contrast", "conv", "conv2", "convert", "convert", "convert", "convertCharsToStrings", "convertContainedStringsToChars", "convertLike", "convertStringsToChars", "convertvars", "convexHull", "convexHull", "convhull", "convhull", "convhulln", "convn", "cool", "copper", "copy", "copyElement", "copyfile", "copyHDU", "copyobj", "copyTo", "corrcoef", "cos", "cosd", "cosh", "cospi", "cot", "cotd", "coth", "count", "countcats", "countEachLabel", "cov", "cplxpair", "cputime", "createCategory", "createClassFromWsdl", "createFile", "createImg", "createLabel", "createMock", "createSampleTime", "createSharedTestFixture", "createSoapMessage", "createTbl", "createTestClassInstance", "createTestMethodInstance", "criticalAlpha", "cross", "csc", "cscd", "csch", "csvread", "csvwrite", "ctranspose", "cummax", "cummin", "cumprod", "cumsum", "cumtrapz", "curl", "currentProject", "customverctrl", "cylinder", "daqread", "daspect", "datacursormode", "datastore", "dataTipInteraction", "dataTipTextRow", "date", "datenum", "dateshift", "datestr", "datetick", "datetime", "datevec", "day", "days", "dbclear", "dbcont", "dbdown", "dblquad", "dbmex", "dbquit", "dbstack", "dbstatus", "dbstep", "dbstop", "dbtype", "dbup", "dde23", "ddeget", "ddensd", "ddesd", "ddeset", "deal", "deblank", "dec2base", "dec2bin", "dec2hex", "decic", "decomposition", "deconv", "defineArgument", "defineArgument", "defineArgument", "defineOutput", "defineOutput", "deg2rad", "degree", "del2", "delaunay", "delaunayn", "DelaunayTri", "DelaunayTri", "delaunayTriangulation", "delegateTo", "delegateTo", "delete", "delete", "delete", "delete", "delete", "deleteCol", "deleteFile", "deleteHDU", "deleteKey", "deleteproperty", "deleteRecord", "deleteRows", "delevent", "delimitedTextImportOptions", "delsample", "delsamplefromcollection", "demo", "det", "details", "detectImportOptions", "detrend", "detrend", "deval", "dfsearch", "diag", "diagnose", "dialog", "diary", "diff", "diffuse", "digraph", "dir", "dir", "disableDefaultInteractivity", "discretize", "disp", "disp", "disp", "display", "displayEmptyObject", "displayNonScalarObject", "displayScalarHandleToDeletedObject", "displayScalarObject", "dissect", "distances", "dither", "divergence", "dlmread", "dlmwrite", "dmperm", "doc", "docsearch", "done", "done", "dos", "dot", "double", "drag", "dragrect", "drawnow", "dsearchn", "duration", "dynamicprops", "echo", "echodemo", "edgeAttachments", "edgeAttachments", "edgecount", "edges", "edges", "edit", "eig", "eigs", "ellipj", "ellipke", "ellipsoid", "empty", "enableDefaultInteractivity", "enableNETfromNetworkDrive", "enableservice", "end", "EndInvoke", "endsWith", "enumeration", "eomday", "eps", "eq", "eq", "equilibrate", "erase", "eraseBetween", "erf", "erfc", "erfcinv", "erfcx", "erfinv", "error", "errorbar", "errordlg", "etime", "etree", "etreeplot", "eval", "evalc", "evalin", "event.DynamicPropertyEvent", "event.EventData", "event.hasListener", "event.listener", "event.PropertyEvent", "event.proplistener", "eventlisteners", "events", "events", "exceltime", "Execute", "exist", "exit", "exp", "expand", "expectedContentLength", "expectedContentLength", "expint", "expm", "expm1", "export", "export2wsdlg", "exportsetupdlg", "extractAfter", "extractBefore", "extractBetween", "eye", "ezcontour", "ezcontourf", "ezmesh", "ezmeshc", "ezplot", "ezplot3", "ezpolar", "ezsurf", "ezsurfc", "faceNormal", "faceNormals", "factor", "factorial", "false", "fatalAssertAccessed", "fatalAssertCalled", "fatalAssertClass", "fatalAssertEmpty", "fatalAssertEqual", "fatalAssertError", "fatalAssertFail", "fatalAssertFalse", "fatalAssertGreaterThan", "fatalAssertGreaterThanOrEqual", "fatalAssertInstanceOf", "fatalAssertLength", "fatalAssertLessThan", "fatalAssertLessThanOrEqual", "fatalAssertMatches", "fatalAssertNotAccessed", "fatalAssertNotCalled", "fatalAssertNotEmpty", "fatalAssertNotEqual", "fatalAssertNotSameHandle", "fatalAssertNotSet", "fatalAssertNumElements", "fatalAssertReturnsTrue", "fatalAssertSameHandle", "fatalAssertSet", "fatalAssertSize", "fatalAssertSubstring", "fatalAssertThat", "fatalAssertTrue", "fatalAssertUsing", "fatalAssertWarning", "fatalAssertWarningFree", "fclose", "fclose", "fcontour", "feather", "featureEdges", "featureEdges", "feof", "ferror", "feval", "Feval", "feval", "fewerbins", "fft", "fft2", "fftn", "fftshift", "fftw", "fgetl", "fgetl", "fgets", "fgets", "fieldnames", "figure", "figurepalette", "fileattrib", "fileDatastore", "filemarker", "fileMode", "fileName", "fileparts", "fileread", "filesep", "fill", "fill3", "fillmissing", "filloutliers", "filter", "filter", "filter2", "fimplicit", "fimplicit3", "find", "findall", "findCategory", "findedge", "findEvent", "findfigs", "findFile", "findgroups", "findLabel", "findnode", "findobj", "findobj", "findprop", "findstr", "finish", "fitsdisp", "fitsinfo", "fitsread", "fitswrite", "fix", "fixedWidthImportOptions", "flag", "flintmax", "flip", "flipdim", "flipedge", "fliplr", "flipud", "floor", "flow", "fmesh", "fminbnd", "fminsearch", "fopen", "fopen", "for", "format", "fplot", "fplot3", "fprintf", "fprintf", "frame2im", "fread", "fread", "freeBoundary", "freeBoundary", "freqspace", "frewind", "fscanf", "fscanf", "fseek", "fsurf", "ftell", "ftp", "full", "fullfile", "func2str", "function", "functions", "FunctionTestCase", "functiontests", "funm", "fwrite", "fwrite", "fzero", "gallery", "gamma", "gammainc", "gammaincinv", "gammaln", "gather", "gca", "gcbf", "gcbo", "gcd", "gcf", "gcmr", "gco", "ge", "genpath", "genvarname", "geoaxes", "geobasemap", "geobubble", "geodensityplot", "geolimits", "geoplot", "geoscatter", "geotickformat", "get", "get", "get", "get", "get", "get", "get", "get", "get", "get", "get", "getabstime", "getabstime", "getAColParms", "getappdata", "getaudiodata", "getBColParms", "GetCharArray", "getClass", "getColName", "getColType", "getConstantValue", "getCurrentTime", "getData", "getData", "getData", "getData", "getData", "getdatasamples", "getdatasamplesize", "getDiagnosticFor", "getDiagnosticFor", "getDiscreteStateImpl", "getDiscreteStateSpecificationImpl", "getdisp", "getenv", "getEqColType", "getfield", "getFields", "getFields", "getFileFormats", "getFooter", "getframe", "GetFullMatrix", "getGlobalNamesImpl", "getHdrSpace", "getHDUnum", "getHDUtype", "getHeader", "getHeaderImpl", "getIconImpl", "getImgSize", "getImgType", "getImpulseResponseLengthImpl", "getInputDimensionConstraintImpl", "getinterpmethod", "getLocation", "getLocation", "getMockHistory", "getNegativeDiagnosticFor", "getnext", "getNumCols", "getNumHDUs", "getNumInputs", "getNumInputsImpl", "getNumOutputs", "getNumOutputsImpl", "getNumRows", "getOpenFiles", "getOutputDataTypeImpl", "getOutputDimensionConstraintImpl", "getOutputSizeImpl", "getParameter", "getParameter", "getParameter", "getpixelposition", "getplayer", "getpoints", "getPostActValString", "getPostConditionString", "getPostDescriptionString", "getPostExpValString", "getPreDescriptionString", "getpref", "getProfiles", "getPropertyGroups", "getPropertyGroupsImpl", "getqualitydesc", "getReasonPhrase", "getReasonPhrase", "getReport", "getsamples", "getSampleTime", "getSampleTimeImpl", "getsampleusingtime", "getsampleusingtime", "getSharedTestFixtures", "getSimulateUsingImpl", "getSimulinkFunctionNamesImpl", "gettimeseriesnames", "getTimeStr", "gettsafteratevent", "gettsafterevent", "gettsatevent", "gettsbeforeatevent", "gettsbeforeevent", "gettsbetweenevents", "GetVariable", "getvaropts", "getVersion", "GetWorkspaceData", "ginput", "global", "gmres", "gobjects", "gplot", "grabcode", "gradient", "graph", "GraphPlot", "gray", "graymon", "grid", "griddata", "griddatan", "griddedInterpolant", "groot", "groupcounts", "groupsummary", "grouptransform", "gsvd", "gt", "gtext", "guidata", "guide", "guihandles", "gunzip", "gzip", "H5.close", "H5.garbage_collect", "H5.get_libversion", "H5.open", "H5.set_free_list_limits", "H5A.close", "H5A.create", "H5A.delete", "H5A.get_info", "H5A.get_name", "H5A.get_space", "H5A.get_type", "H5A.iterate", "H5A.open", "H5A.open_by_idx", "H5A.open_by_name", "H5A.read", "H5A.write", "h5create", "H5D.close", "H5D.create", "H5D.get_access_plist", "H5D.get_create_plist", "H5D.get_offset", "H5D.get_space", "H5D.get_space_status", "H5D.get_storage_size", "H5D.get_type", "H5D.open", "H5D.read", "H5D.set_extent", "H5D.vlen_get_buf_size", "H5D.write", "h5disp", "H5DS.attach_scale", "H5DS.detach_scale", "H5DS.get_label", "H5DS.get_num_scales", "H5DS.get_scale_name", "H5DS.is_scale", "H5DS.iterate_scales", "H5DS.set_label", "H5DS.set_scale", "H5E.clear", "H5E.get_major", "H5E.get_minor", "H5E.walk", "H5F.close", "H5F.create", "H5F.flush", "H5F.get_access_plist", "H5F.get_create_plist", "H5F.get_filesize", "H5F.get_freespace", "H5F.get_info", "H5F.get_mdc_config", "H5F.get_mdc_hit_rate", "H5F.get_mdc_size", "H5F.get_name", "H5F.get_obj_count", "H5F.get_obj_ids", "H5F.is_hdf5", "H5F.mount", "H5F.open", "H5F.reopen", "H5F.set_mdc_config", "H5F.unmount", "H5G.close", "H5G.create", "H5G.get_info", "H5G.open", "H5I.dec_ref", "H5I.get_file_id", "H5I.get_name", "H5I.get_ref", "H5I.get_type", "H5I.inc_ref", "H5I.is_valid", "h5info", "H5L.copy", "H5L.create_external", "H5L.create_hard", "H5L.create_soft", "H5L.delete", "H5L.exists", "H5L.get_info", "H5L.get_name_by_idx", "H5L.get_val", "H5L.iterate", "H5L.iterate_by_name", "H5L.move", "H5L.visit", "H5L.visit_by_name", "H5ML.compare_values", "H5ML.get_constant_names", "H5ML.get_constant_value", "H5ML.get_function_names", "H5ML.get_mem_datatype", "H5ML.hoffset", "H5ML.sizeof", "H5O.close", "H5O.copy", "H5O.get_comment", "H5O.get_comment_by_name", "H5O.get_info", "H5O.link", "H5O.open", "H5O.open_by_idx", "H5O.set_comment", "H5O.set_comment_by_name", "H5O.visit", "H5O.visit_by_name", "H5P.all_filters_avail", "H5P.close", "H5P.close_class", "H5P.copy", "H5P.create", "H5P.equal", "H5P.exist", "H5P.fill_value_defined", "H5P.get", "H5P.get_alignment", "H5P.get_alloc_time", "H5P.get_attr_creation_order", "H5P.get_attr_phase_change", "H5P.get_btree_ratios", "H5P.get_char_encoding", "H5P.get_chunk", "H5P.get_chunk_cache", "H5P.get_class", "H5P.get_class_name", "H5P.get_class_parent", "H5P.get_copy_object", "H5P.get_create_intermediate_group", "H5P.get_driver", "H5P.get_edc_check", "H5P.get_external", "H5P.get_external_count", "H5P.get_family_offset", "H5P.get_fapl_core", "H5P.get_fapl_family", "H5P.get_fapl_multi", "H5P.get_fclose_degree", "H5P.get_fill_time", "H5P.get_fill_value", "H5P.get_filter", "H5P.get_filter_by_id", "H5P.get_gc_references", "H5P.get_hyper_vector_size", "H5P.get_istore_k", "H5P.get_layout", "H5P.get_libver_bounds", "H5P.get_link_creation_order", "H5P.get_link_phase_change", "H5P.get_mdc_config", "H5P.get_meta_block_size", "H5P.get_multi_type", "H5P.get_nfilters", "H5P.get_nprops", "H5P.get_sieve_buf_size", "H5P.get_size", "H5P.get_sizes", "H5P.get_small_data_block_size", "H5P.get_sym_k", "H5P.get_userblock", "H5P.get_version", "H5P.isa_class", "H5P.iterate", "H5P.modify_filter", "H5P.remove_filter", "H5P.set", "H5P.set_alignment", "H5P.set_alloc_time", "H5P.set_attr_creation_order", "H5P.set_attr_phase_change", "H5P.set_btree_ratios", "H5P.set_char_encoding", "H5P.set_chunk", "H5P.set_chunk_cache", "H5P.set_copy_object", "H5P.set_create_intermediate_group", "H5P.set_deflate", "H5P.set_edc_check", "H5P.set_external", "H5P.set_family_offset", "H5P.set_fapl_core", "H5P.set_fapl_family", "H5P.set_fapl_log", "H5P.set_fapl_multi", "H5P.set_fapl_sec2", "H5P.set_fapl_split", "H5P.set_fapl_stdio", "H5P.set_fclose_degree", "H5P.set_fill_time", "H5P.set_fill_value", "H5P.set_filter", "H5P.set_fletcher32", "H5P.set_gc_references", "H5P.set_hyper_vector_size", "H5P.set_istore_k", "H5P.set_layout", "H5P.set_libver_bounds", "H5P.set_link_creation_order", "H5P.set_link_phase_change", "H5P.set_mdc_config", "H5P.set_meta_block_size", "H5P.set_multi_type", "H5P.set_nbit", "H5P.set_scaleoffset", "H5P.set_shuffle", "H5P.set_sieve_buf_size", "H5P.set_sizes", "H5P.set_small_data_block_size", "H5P.set_sym_k", "H5P.set_userblock", "H5R.create", "H5R.dereference", "H5R.get_name", "H5R.get_obj_type", "H5R.get_region", "h5read", "h5readatt", "H5S.close", "H5S.copy", "H5S.create", "H5S.create_simple", "H5S.extent_copy", "H5S.get_select_bounds", "H5S.get_select_elem_npoints", "H5S.get_select_elem_pointlist", "H5S.get_select_hyper_blocklist", "H5S.get_select_hyper_nblocks", "H5S.get_select_npoints", "H5S.get_select_type", "H5S.get_simple_extent_dims", "H5S.get_simple_extent_ndims", "H5S.get_simple_extent_npoints", "H5S.get_simple_extent_type", "H5S.is_simple", "H5S.offset_simple", "H5S.select_all", "H5S.select_elements", "H5S.select_hyperslab", "H5S.select_none", "H5S.select_valid", "H5S.set_extent_none", "H5S.set_extent_simple", "H5T.array_create", "H5T.close", "H5T.commit", "H5T.committed", "H5T.copy", "H5T.create", "H5T.detect_class", "H5T.enum_create", "H5T.enum_insert", "H5T.enum_nameof", "H5T.enum_valueof", "H5T.equal", "H5T.get_array_dims", "H5T.get_array_ndims", "H5T.get_class", "H5T.get_create_plist", "H5T.get_cset", "H5T.get_ebias", "H5T.get_fields", "H5T.get_inpad", "H5T.get_member_class", "H5T.get_member_index", "H5T.get_member_name", "H5T.get_member_offset", "H5T.get_member_type", "H5T.get_member_value", "H5T.get_native_type", "H5T.get_nmembers", "H5T.get_norm", "H5T.get_offset", "H5T.get_order", "H5T.get_pad", "H5T.get_precision", "H5T.get_sign", "H5T.get_size", "H5T.get_strpad", "H5T.get_super", "H5T.get_tag", "H5T.insert", "H5T.is_variable_str", "H5T.lock", "H5T.open", "H5T.pack", "H5T.set_cset", "H5T.set_ebias", "H5T.set_fields", "H5T.set_inpad", "H5T.set_norm", "H5T.set_offset", "H5T.set_order", "H5T.set_pad", "H5T.set_precision", "H5T.set_sign", "H5T.set_size", "H5T.set_strpad", "H5T.set_tag", "H5T.vlen_create", "h5write", "h5writeatt", "H5Z.filter_avail", "H5Z.get_filter_info", "hadamard", "handle", "hankel", "hasdata", "hasdata", "hasFactoryValue", "hasfile", "hasFrame", "hasnext", "hasPersonalValue", "hasTemporaryValue", "hdf5info", "hdf5read", "hdf5write", "hdfan", "hdfdf24", "hdfdfr8", "hdfh", "hdfhd", "hdfhe", "hdfhx", "hdfinfo", "hdfml", "hdfpt", "hdfread", "hdftool", "hdfv", "hdfvf", "hdfvh", "hdfvs", "head", "heatmap", "height", "help", "helpbrowser", "helpdesk", "helpdlg", "helpwin", "hess", "hex2dec", "hex2num", "hgexport", "hggroup", "hgload", "hgsave", "hgtransform", "hidden", "highlight", "hilb", "hist", "histc", "histcounts", "histcounts2", "histogram", "histogram2", "hms", "hold", "holes", "home", "horzcat", "horzcat", "horzcat", "hot", "hour", "hours", "hover", "hsv", "hsv2rgb", "hypot", "ichol", "idealfilter", "idivide", "ifft", "ifft2", "ifftn", "ifftshift", "ilu", "im2double", "im2frame", "im2java", "imag", "image", "imageDatastore", "imagesc", "imapprox", "imfinfo", "imformats", "imgCompress", "import", "importdata", "imread", "imresize", "imshow", "imtile", "imwrite", "incenter", "incenters", "incidence", "ind2rgb", "ind2sub", "indegree", "inedges", "Inf", "info", "infoImpl", "initialize", "initialize", "initialize", "initialize", "initialize", "initializeDatastore", "initializeDatastore", "inline", "inmem", "inner2outer", "innerjoin", "inOutStatus", "inpolygon", "input", "inputdlg", "inputname", "inputParser", "insertAfter", "insertATbl", "insertBefore", "insertBTbl", "insertCol", "insertImg", "insertRows", "inShape", "inspect", "instrcallback", "instrfind", "instrfindall", "int16", "int2str", "int32", "int64", "int8", "integral", "integral2", "integral3", "interp1", "interp1q", "interp2", "interp3", "interpft", "interpn", "interpstreamspeed", "intersect", "intersect", "intmax", "intmin", "inv", "invhilb", "invoke", "ipermute", "iqr", "is*", "isa", "isappdata", "isaUnderlying", "isbanded", "isbetween", "iscalendarduration", "iscategorical", "iscategory", "iscell", "iscellstr", "ischange", "ischar", "iscolumn", "iscom", "isCompatible", "isCompressedImg", "isConnected", "isdag", "isdatetime", "isdiag", "isdir", "isDiscreteStateSpecificationMutableImpl", "isDone", "isDoneImpl", "isdst", "isduration", "isEdge", "isempty", "isempty", "isenum", "isequal", "isequaln", "isequalwithequalnans", "isevent", "isfield", "isfile", "isfinite", "isfloat", "isfolder", "isfullfile", "isfullfile", "isgraphics", "ishandle", "ishermitian", "ishghandle", "ishold", "ishole", "isIllConditioned", "isInactivePropertyImpl", "isinf", "isInputComplexityMutableImpl", "isInputDataTypeMutableImpl", "isInputDirectFeedthroughImpl", "isInputSizeLockedImpl", "isInputSizeMutableImpl", "isinteger", "isinterface", "isInterior", "isinterior", "isisomorphic", "isjava", "isKey", "iskeyword", "isletter", "isLoaded", "islocalmax", "islocalmin", "isLocked", "islogical", "ismac", "ismatrix", "ismember", "ismembertol", "ismethod", "ismissing", "ismultigraph", "isnan", "isnat", "isNull", "isnumeric", "isobject", "isocaps", "isocolors", "isomorphism", "isonormals", "isordinal", "isosurface", "isoutlier", "isOutputComplexImpl", "isOutputFixedSizeImpl", "ispc", "isplaying", "ispref", "isprime", "isprop", "isprotected", "isreal", "isrecording", "isregular", "isrow", "isscalar", "issimplified", "issorted", "issortedrows", "isspace", "issparse", "isstr", "isstring", "isStringScalar", "isstrprop", "isstruct", "isstudent", "issymmetric", "istable", "istall", "istimetable", "istril", "istriu", "isTunablePropertyDataTypeMutableImpl", "isundefined", "isunix", "isvalid", "isvalid", "isvalid", "isvarname", "isvector", "isweekend", "javaaddpath", "javaArray", "javachk", "javaclasspath", "javaMethod", "javaMethodEDT", "javaObject", "javaObjectEDT", "javarmpath", "jet", "join", "join", "join", "jsondecode", "jsonencode", "juliandate", "keepMeasuring", "keyboard", "keys", "KeyValueDatastore", "KeyValueStore", "kron", "labeledge", "labelnode", "lag", "laplacian", "lasterr", "lasterror", "lastwarn", "layout", "lcm", "ldivide", "ldl", "le", "legend", "legendre", "length", "length", "length", "length", "lib.pointer", "libfunctions", "libfunctionsview", "libisloaded", "libpointer", "libstruct", "license", "light", "lightangle", "lighting", "lin2mu", "line", "lines", "LineSpec", "linkaxes", "linkdata", "linkprop", "linsolve", "linspace", "listdlg", "listener", "listfonts", "listModifiedFiles", "listRequiredFiles", "load", "load", "load", "loadlibrary", "loadobj", "loadObjectImpl", "localfunctions", "log", "log", "log", "log10", "log1p", "log2", "logical", "Logical", "loglog", "logm", "logspace", "lookfor", "lower", "ls", "lscov", "lsqminnorm", "lsqnonneg", "lsqr", "lt", "lu", "magic", "makehgtform", "mapreduce", "mapreducer", "mat2cell", "mat2str", "matchpairs", "material", "matfile", "matlab", "matlab", "matlab", "matlab.addons.disableAddon", "matlab.addons.enableAddon", "matlab.addons.install", "matlab.addons.installedAddons", "matlab.addons.isAddonEnabled", "matlab.addons.toolbox.installedToolboxes", "matlab.addons.toolbox.installToolbox", "matlab.addons.toolbox.packageToolbox", "matlab.addons.toolbox.toolboxVersion", "matlab.addons.toolbox.uninstallToolbox", "matlab.addons.uninstall", "matlab.apputil.create", "matlab.apputil.getInstalledAppInfo", "matlab.apputil.install", "matlab.apputil.package", "matlab.apputil.run", "matlab.apputil.uninstall", "matlab.codetools.requiredFilesAndProducts", "matlab.engine.connect_matlab", "matlab.engine.engineName", "matlab.engine.find_matlab", "matlab.engine.FutureResult", "matlab.engine.isEngineShared", "matlab.engine.MatlabEngine", "matlab.engine.shareEngine", "matlab.engine.start_matlab", "matlab.exception.JavaException", "matlab.exception.PyException", "matlab.graphics.Graphics", "matlab.graphics.GraphicsPlaceholder", "matlab.io.Datastore", "matlab.io.datastore.DsFileReader", "matlab.io.datastore.DsFileSet", "matlab.io.datastore.HadoopFileBased", "matlab.io.datastore.HadoopLocationBased", "matlab.io.datastore.Partitionable", "matlab.io.datastore.Shuffleable", "matlab.io.hdf4.sd", "matlab.io.hdf4.sd.attrInfo", "matlab.io.hdf4.sd.close", "matlab.io.hdf4.sd.create", "matlab.io.hdf4.sd.dimInfo", "matlab.io.hdf4.sd.endAccess", "matlab.io.hdf4.sd.fileInfo", "matlab.io.hdf4.sd.findAttr", "matlab.io.hdf4.sd.getCal", "matlab.io.hdf4.sd.getChunkInfo", "matlab.io.hdf4.sd.getCompInfo", "matlab.io.hdf4.sd.getDataStrs", "matlab.io.hdf4.sd.getDimID", "matlab.io.hdf4.sd.getDimScale", "matlab.io.hdf4.sd.getDimStrs", "matlab.io.hdf4.sd.getFilename", "matlab.io.hdf4.sd.getFillValue", "matlab.io.hdf4.sd.getInfo", "matlab.io.hdf4.sd.getRange", "matlab.io.hdf4.sd.idToRef", "matlab.io.hdf4.sd.idType", "matlab.io.hdf4.sd.isCoordVar", "matlab.io.hdf4.sd.isRecord", "matlab.io.hdf4.sd.nameToIndex", "matlab.io.hdf4.sd.nameToIndices", "matlab.io.hdf4.sd.readAttr", "matlab.io.hdf4.sd.readChunk", "matlab.io.hdf4.sd.readData", "matlab.io.hdf4.sd.refToIndex", "matlab.io.hdf4.sd.select", "matlab.io.hdf4.sd.setAttr", "matlab.io.hdf4.sd.setCal", "matlab.io.hdf4.sd.setChunk", "matlab.io.hdf4.sd.setCompress", "matlab.io.hdf4.sd.setDataStrs", "matlab.io.hdf4.sd.setDimName", "matlab.io.hdf4.sd.setDimScale", "matlab.io.hdf4.sd.setDimStrs", "matlab.io.hdf4.sd.setExternalFile", "matlab.io.hdf4.sd.setFillMode", "matlab.io.hdf4.sd.setFillValue", "matlab.io.hdf4.sd.setNBitDataSet", "matlab.io.hdf4.sd.setRange", "matlab.io.hdf4.sd.start", "matlab.io.hdf4.sd.writeChunk", "matlab.io.hdf4.sd.writeData", "matlab.io.hdfeos.gd", "matlab.io.hdfeos.gd.attach", "matlab.io.hdfeos.gd.close", "matlab.io.hdfeos.gd.compInfo", "matlab.io.hdfeos.gd.create", "matlab.io.hdfeos.gd.defBoxRegion", "matlab.io.hdfeos.gd.defComp", "matlab.io.hdfeos.gd.defDim", "matlab.io.hdfeos.gd.defField", "matlab.io.hdfeos.gd.defOrigin", "matlab.io.hdfeos.gd.defPixReg", "matlab.io.hdfeos.gd.defProj", "matlab.io.hdfeos.gd.defTile", "matlab.io.hdfeos.gd.defVrtRegion", "matlab.io.hdfeos.gd.detach", "matlab.io.hdfeos.gd.dimInfo", "matlab.io.hdfeos.gd.extractRegion", "matlab.io.hdfeos.gd.fieldInfo", "matlab.io.hdfeos.gd.getFillValue", "matlab.io.hdfeos.gd.getPixels", "matlab.io.hdfeos.gd.getPixValues", "matlab.io.hdfeos.gd.gridInfo", "matlab.io.hdfeos.gd.ij2ll", "matlab.io.hdfeos.gd.inqAttrs", "matlab.io.hdfeos.gd.inqDims", "matlab.io.hdfeos.gd.inqFields", "matlab.io.hdfeos.gd.inqGrid", "matlab.io.hdfeos.gd.interpolate", "matlab.io.hdfeos.gd.ll2ij", "matlab.io.hdfeos.gd.nEntries", "matlab.io.hdfeos.gd.open", "matlab.io.hdfeos.gd.originInfo", "matlab.io.hdfeos.gd.pixRegInfo", "matlab.io.hdfeos.gd.projInfo", "matlab.io.hdfeos.gd.readAttr", "matlab.io.hdfeos.gd.readBlkSomOffset", "matlab.io.hdfeos.gd.readField", "matlab.io.hdfeos.gd.readTile", "matlab.io.hdfeos.gd.regionInfo", "matlab.io.hdfeos.gd.setFillValue", "matlab.io.hdfeos.gd.setTileComp", "matlab.io.hdfeos.gd.sphereCodeToName", "matlab.io.hdfeos.gd.sphereNameToCode", "matlab.io.hdfeos.gd.tileInfo", "matlab.io.hdfeos.gd.writeAttr", "matlab.io.hdfeos.gd.writeBlkSomOffset", "matlab.io.hdfeos.gd.writeField", "matlab.io.hdfeos.gd.writeTile", "matlab.io.hdfeos.sw", "matlab.io.hdfeos.sw.attach", "matlab.io.hdfeos.sw.close", "matlab.io.hdfeos.sw.compInfo", "matlab.io.hdfeos.sw.create", "matlab.io.hdfeos.sw.defBoxRegion", "matlab.io.hdfeos.sw.defComp", "matlab.io.hdfeos.sw.defDataField", "matlab.io.hdfeos.sw.defDim", "matlab.io.hdfeos.sw.defDimMap", "matlab.io.hdfeos.sw.defGeoField", "matlab.io.hdfeos.sw.defTimePeriod", "matlab.io.hdfeos.sw.defVrtRegion", "matlab.io.hdfeos.sw.detach", "matlab.io.hdfeos.sw.dimInfo", "matlab.io.hdfeos.sw.extractPeriod", "matlab.io.hdfeos.sw.extractRegion", "matlab.io.hdfeos.sw.fieldInfo", "matlab.io.hdfeos.sw.geoMapInfo", "matlab.io.hdfeos.sw.getFillValue", "matlab.io.hdfeos.sw.idxMapInfo", "matlab.io.hdfeos.sw.inqAttrs", "matlab.io.hdfeos.sw.inqDataFields", "matlab.io.hdfeos.sw.inqDims", "matlab.io.hdfeos.sw.inqGeoFields", "matlab.io.hdfeos.sw.inqIdxMaps", "matlab.io.hdfeos.sw.inqMaps", "matlab.io.hdfeos.sw.inqSwath", "matlab.io.hdfeos.sw.mapInfo", "matlab.io.hdfeos.sw.nEntries", "matlab.io.hdfeos.sw.open", "matlab.io.hdfeos.sw.periodInfo", "matlab.io.hdfeos.sw.readAttr", "matlab.io.hdfeos.sw.readField", "matlab.io.hdfeos.sw.regionInfo", "matlab.io.hdfeos.sw.setFillValue", "matlab.io.hdfeos.sw.writeAttr", "matlab.io.hdfeos.sw.writeField", "matlab.io.MatFile", "matlab.io.saveVariablesToScript", "matlab.lang.correction.AppendArgumentsCorrection", "matlab.lang.makeUniqueStrings", "matlab.lang.makeValidName", "matlab.lang.OnOffSwitchState", "matlab.mex.MexHost", "matlab.mixin.Copyable", "matlab.mixin.CustomDisplay", "matlab.mixin.CustomDisplay.convertDimensionsToString", "matlab.mixin.CustomDisplay.displayPropertyGroups", "matlab.mixin.CustomDisplay.getClassNameForHeader", "matlab.mixin.CustomDisplay.getDeletedHandleText", "matlab.mixin.CustomDisplay.getDetailedFooter", "matlab.mixin.CustomDisplay.getDetailedHeader", "matlab.mixin.CustomDisplay.getHandleText", "matlab.mixin.CustomDisplay.getSimpleHeader", "matlab.mixin.Heterogeneous", "matlab.mixin.Heterogeneous.getDefaultScalarElement", "matlab.mixin.SetGet", "matlab.mixin.SetGetExactNames", "matlab.mixin.util.PropertyGroup", "matlab.mock.actions.AssignOutputs", "matlab.mock.actions.Invoke", "matlab.mock.actions.ReturnStoredValue", "matlab.mock.actions.StoreValue", "matlab.mock.actions.ThrowException", "matlab.mock.AnyArguments", "matlab.mock.constraints.Occurred", "matlab.mock.constraints.WasAccessed", "matlab.mock.constraints.WasCalled", "matlab.mock.constraints.WasSet", "matlab.mock.history.MethodCall", "matlab.mock.history.PropertyAccess", "matlab.mock.history.PropertyModification", "matlab.mock.history.SuccessfulMethodCall", "matlab.mock.history.SuccessfulPropertyAccess", "matlab.mock.history.SuccessfulPropertyModification", "matlab.mock.history.UnsuccessfulMethodCall", "matlab.mock.history.UnsuccessfulPropertyAccess", "matlab.mock.history.UnsuccessfulPropertyModification", "matlab.mock.InteractionHistory", "matlab.mock.InteractionHistory.forMock", "matlab.mock.MethodCallBehavior", "matlab.mock.PropertyBehavior", "matlab.mock.PropertyGetBehavior", "matlab.mock.PropertySetBehavior", "matlab.mock.TestCase", "matlab.mock.TestCase.forInteractiveUse", "matlab.net.ArrayFormat", "matlab.net.base64decode", "matlab.net.base64encode", "matlab.net.http.AuthenticationScheme", "matlab.net.http.AuthInfo", "matlab.net.http.Cookie", "matlab.net.http.CookieInfo", "matlab.net.http.CookieInfo.collectFromLog", "matlab.net.http.Credentials", "matlab.net.http.Disposition", "matlab.net.http.field.AcceptField", "matlab.net.http.field.AuthenticateField", "matlab.net.http.field.AuthenticationInfoField", "matlab.net.http.field.AuthorizationField", "matlab.net.http.field.ContentDispositionField", "matlab.net.http.field.ContentLengthField", "matlab.net.http.field.ContentLocationField", "matlab.net.http.field.ContentTypeField", "matlab.net.http.field.CookieField", "matlab.net.http.field.DateField", "matlab.net.http.field.GenericField", "matlab.net.http.field.GenericParameterizedField", "matlab.net.http.field.HTTPDateField", "matlab.net.http.field.IntegerField", "matlab.net.http.field.LocationField", "matlab.net.http.field.MediaRangeField", "matlab.net.http.field.SetCookieField", "matlab.net.http.field.URIReferenceField", "matlab.net.http.HeaderField", "matlab.net.http.HeaderField.displaySubclasses", "matlab.net.http.HTTPException", "matlab.net.http.HTTPOptions", "matlab.net.http.io.BinaryConsumer", "matlab.net.http.io.ContentConsumer", "matlab.net.http.io.ContentProvider", "matlab.net.http.io.FileConsumer", "matlab.net.http.io.FileProvider", "matlab.net.http.io.FormProvider", "matlab.net.http.io.GenericConsumer", "matlab.net.http.io.GenericProvider", "matlab.net.http.io.ImageConsumer", "matlab.net.http.io.ImageProvider", "matlab.net.http.io.JSONConsumer", "matlab.net.http.io.JSONProvider", "matlab.net.http.io.MultipartConsumer", "matlab.net.http.io.MultipartFormProvider", "matlab.net.http.io.MultipartProvider", "matlab.net.http.io.StringConsumer", "matlab.net.http.io.StringProvider", "matlab.net.http.LogRecord", "matlab.net.http.MediaType", "matlab.net.http.Message", "matlab.net.http.MessageBody", "matlab.net.http.MessageType", "matlab.net.http.ProgressMonitor", "matlab.net.http.ProtocolVersion", "matlab.net.http.RequestLine", "matlab.net.http.RequestMessage", "matlab.net.http.RequestMethod", "matlab.net.http.ResponseMessage", "matlab.net.http.StartLine", "matlab.net.http.StatusClass", "matlab.net.http.StatusCode", "matlab.net.http.StatusCode.fromValue", "matlab.net.http.StatusLine", "matlab.net.QueryParameter", "matlab.net.URI", "matlab.perftest.FixedTimeExperiment", "matlab.perftest.FrequentistTimeExperiment", "matlab.perftest.TestCase", "matlab.perftest.TimeExperiment", "matlab.perftest.TimeExperiment.limitingSamplingError", "matlab.perftest.TimeExperiment.withFixedSampleSize", "matlab.perftest.TimeResult", "matlab.project.createProject", "matlab.project.loadProject", "matlab.project.Project", "matlab.project.rootProject", "matlab.System", "matlab.system.display.Action", "matlab.system.display.Header", "matlab.system.display.Icon", "matlab.system.display.Section", "matlab.system.display.SectionGroup", "matlab.system.mixin.CustomIcon", "matlab.system.mixin.FiniteSource", "matlab.system.mixin.Nondirect", "matlab.system.mixin.Propagates", "matlab.system.mixin.SampleTime", "matlab.system.StringSet", "matlab.tall.blockMovingWindow", "matlab.tall.movingWindow", "matlab.tall.reduce", "matlab.tall.transform", "matlab.test.behavior.Missing", "matlab.uitest.TestCase", "matlab.uitest.TestCase.forInteractiveUse", "matlab.uitest.unlock", "matlab.unittest.constraints.AbsoluteTolerance", "matlab.unittest.constraints.AnyCellOf", "matlab.unittest.constraints.AnyElementOf", "matlab.unittest.constraints.BooleanConstraint", "matlab.unittest.constraints.CellComparator", "matlab.unittest.constraints.Constraint", "matlab.unittest.constraints.ContainsSubstring", "matlab.unittest.constraints.EndsWithSubstring", "matlab.unittest.constraints.Eventually", "matlab.unittest.constraints.EveryCellOf", "matlab.unittest.constraints.EveryElementOf", "matlab.unittest.constraints.HasElementCount", "matlab.unittest.constraints.HasField", "matlab.unittest.constraints.HasInf", "matlab.unittest.constraints.HasLength", "matlab.unittest.constraints.HasNaN", "matlab.unittest.constraints.HasSize", "matlab.unittest.constraints.HasUniqueElements", "matlab.unittest.constraints.IsAnything", "matlab.unittest.constraints.IsEmpty", "matlab.unittest.constraints.IsEqualTo", "matlab.unittest.constraints.IsFalse", "matlab.unittest.constraints.IsFile", "matlab.unittest.constraints.IsFinite", "matlab.unittest.constraints.IsFolder", "matlab.unittest.constraints.IsGreaterThan", "matlab.unittest.constraints.IsGreaterThanOrEqualTo", "matlab.unittest.constraints.IsInstanceOf", "matlab.unittest.constraints.IsLessThan", "matlab.unittest.constraints.IsLessThanOrEqualTo", "matlab.unittest.constraints.IsOfClass", "matlab.unittest.constraints.IsReal", "matlab.unittest.constraints.IsSameHandleAs", "matlab.unittest.constraints.IsSameSetAs", "matlab.unittest.constraints.IsScalar", "matlab.unittest.constraints.IsSparse", "matlab.unittest.constraints.IsSubsetOf", "matlab.unittest.constraints.IsSubstringOf", "matlab.unittest.constraints.IssuesNoWarnings", "matlab.unittest.constraints.IssuesWarnings", "matlab.unittest.constraints.IsSupersetOf", "matlab.unittest.constraints.IsTrue", "matlab.unittest.constraints.LogicalComparator", "matlab.unittest.constraints.Matches", "matlab.unittest.constraints.NumericComparator", "matlab.unittest.constraints.ObjectComparator", "matlab.unittest.constraints.PublicPropertyComparator", "matlab.unittest.constraints.PublicPropertyComparator.supportingAllValues", "matlab.unittest.constraints.RelativeTolerance", "matlab.unittest.constraints.ReturnsTrue", "matlab.unittest.constraints.StartsWithSubstring", "matlab.unittest.constraints.StringComparator", "matlab.unittest.constraints.StructComparator", "matlab.unittest.constraints.TableComparator", "matlab.unittest.constraints.Throws", "matlab.unittest.constraints.Tolerance", "matlab.unittest.diagnostics.ConstraintDiagnostic", "matlab.unittest.diagnostics.ConstraintDiagnostic.getDisplayableString", "matlab.unittest.diagnostics.Diagnostic", "matlab.unittest.diagnostics.DiagnosticResult", "matlab.unittest.diagnostics.DisplayDiagnostic", "matlab.unittest.diagnostics.FigureDiagnostic", "matlab.unittest.diagnostics.FileArtifact", "matlab.unittest.diagnostics.FrameworkDiagnostic", "matlab.unittest.diagnostics.FunctionHandleDiagnostic", "matlab.unittest.diagnostics.LoggedDiagnosticEventData", "matlab.unittest.diagnostics.ScreenshotDiagnostic", "matlab.unittest.diagnostics.StringDiagnostic", "matlab.unittest.fixtures.CurrentFolderFixture", "matlab.unittest.fixtures.Fixture", "matlab.unittest.fixtures.PathFixture", "matlab.unittest.fixtures.ProjectFixture", "matlab.unittest.fixtures.SuppressedWarningsFixture", "matlab.unittest.fixtures.TemporaryFolderFixture", "matlab.unittest.fixtures.WorkingFolderFixture", "matlab.unittest.measurement.DefaultMeasurementResult", "matlab.unittest.measurement.MeasurementResult", "matlab.unittest.parameters.ClassSetupParameter", "matlab.unittest.parameters.EmptyParameter", "matlab.unittest.parameters.MethodSetupParameter", "matlab.unittest.parameters.Parameter", "matlab.unittest.parameters.Parameter.fromData", "matlab.unittest.parameters.TestParameter", "matlab.unittest.plugins.codecoverage.CoberturaFormat", "matlab.unittest.plugins.codecoverage.CoverageReport", "matlab.unittest.plugins.codecoverage.ProfileReport", "matlab.unittest.plugins.CodeCoveragePlugin", "matlab.unittest.plugins.CodeCoveragePlugin.forFile", "matlab.unittest.plugins.CodeCoveragePlugin.forFolder", "matlab.unittest.plugins.CodeCoveragePlugin.forPackage", "matlab.unittest.plugins.diagnosticrecord.DiagnosticRecord", "matlab.unittest.plugins.diagnosticrecord.ExceptionDiagnosticRecord", "matlab.unittest.plugins.diagnosticrecord.LoggedDiagnosticRecord", "matlab.unittest.plugins.diagnosticrecord.QualificationDiagnosticRecord", "matlab.unittest.plugins.DiagnosticsOutputPlugin", "matlab.unittest.plugins.DiagnosticsRecordingPlugin", "matlab.unittest.plugins.DiagnosticsValidationPlugin", "matlab.unittest.plugins.FailOnWarningsPlugin", "matlab.unittest.plugins.LoggingPlugin", "matlab.unittest.plugins.LoggingPlugin.withVerbosity", "matlab.unittest.plugins.OutputStream", "matlab.unittest.plugins.plugindata.FinalizedResultPluginData", "matlab.unittest.plugins.plugindata.ImplicitFixturePluginData", "matlab.unittest.plugins.plugindata.PluginData", "matlab.unittest.plugins.plugindata.QualificationContext", "matlab.unittest.plugins.plugindata.SharedTestFixturePluginData", "matlab.unittest.plugins.plugindata.TestContentCreationPluginData", "matlab.unittest.plugins.plugindata.TestSuiteRunPluginData", "matlab.unittest.plugins.QualifyingPlugin", "matlab.unittest.plugins.StopOnFailuresPlugin", "matlab.unittest.plugins.TAPPlugin", "matlab.unittest.plugins.TAPPlugin.producingOriginalFormat", "matlab.unittest.plugins.TAPPlugin.producingVersion13", "matlab.unittest.plugins.testreport.DOCXTestReportPlugin", "matlab.unittest.plugins.testreport.HTMLTestReportPlugin", "matlab.unittest.plugins.testreport.PDFTestReportPlugin", "matlab.unittest.plugins.TestReportPlugin", "matlab.unittest.plugins.TestReportPlugin.producingDOCX", "matlab.unittest.plugins.TestReportPlugin.producingHTML", "matlab.unittest.plugins.TestReportPlugin.producingPDF", "matlab.unittest.plugins.TestRunnerPlugin", "matlab.unittest.plugins.TestRunProgressPlugin", "matlab.unittest.plugins.ToFile", "matlab.unittest.plugins.ToStandardOutput", "matlab.unittest.plugins.ToUniqueFile", "matlab.unittest.plugins.XMLPlugin", "matlab.unittest.plugins.XMLPlugin.producingJUnitFormat", "matlab.unittest.qualifications.Assertable", "matlab.unittest.qualifications.AssertionFailedException", "matlab.unittest.qualifications.Assumable", "matlab.unittest.qualifications.AssumptionFailedException", "matlab.unittest.qualifications.ExceptionEventData", "matlab.unittest.qualifications.FatalAssertable", "matlab.unittest.qualifications.FatalAssertionFailedException", "matlab.unittest.qualifications.QualificationEventData", "matlab.unittest.qualifications.Verifiable", "matlab.unittest.Scope", "matlab.unittest.selectors.AndSelector", "matlab.unittest.selectors.HasBaseFolder", "matlab.unittest.selectors.HasName", "matlab.unittest.selectors.HasParameter", "matlab.unittest.selectors.HasProcedureName", "matlab.unittest.selectors.HasSharedTestFixture", "matlab.unittest.selectors.HasSuperclass", "matlab.unittest.selectors.HasTag", "matlab.unittest.selectors.NotSelector", "matlab.unittest.selectors.OrSelector", "matlab.unittest.Test", "matlab.unittest.TestCase", "matlab.unittest.TestCase.forInteractiveUse", "matlab.unittest.TestResult", "matlab.unittest.TestRunner", "matlab.unittest.TestRunner.withNoPlugins", "matlab.unittest.TestRunner.withTextOutput", "matlab.unittest.TestSuite", "matlab.unittest.TestSuite.fromClass", "matlab.unittest.TestSuite.fromFile", "matlab.unittest.TestSuite.fromFolder", "matlab.unittest.TestSuite.fromMethod", "matlab.unittest.TestSuite.fromName", "matlab.unittest.TestSuite.fromPackage", "matlab.unittest.TestSuite.fromProject", "matlab.unittest.Verbosity", "matlab.wsdl.createWSDLClient", "matlab.wsdl.setWSDLToolPath", "matlabrc", "matlabroot", "matlabshared.supportpkg.checkForUpdate", "matlabshared.supportpkg.getInstalled", "matlabshared.supportpkg.getSupportPackageRoot", "matlabshared.supportpkg.setSupportPackageRoot", "max", "max", "maxflow", "MaximizeCommandWindow", "maxk", "maxNumCompThreads", "maxpartitions", "maxpartitions", "mean", "mean", "median", "median", "memmapfile", "memoize", "MemoizedFunction", "memory", "menu", "mergecats", "mergevars", "mesh", "meshc", "meshgrid", "meshz", "meta.abstractDetails", "meta.ArrayDimension", "meta.class", "meta.class.fromName", "meta.DynamicProperty", "meta.EnumeratedValue", "meta.event", "meta.FixedDimension", "meta.MetaData", "meta.method", "meta.package", "meta.package.fromName", "meta.package.getAllPackages", "meta.property", "meta.UnrestrictedDimension", "meta.Validation", "metaclass", "methods", "methodsview", "mex", "mex.getCompilerConfigurations", "MException", "MException.last", "mexext", "mexhost", "mfilename", "mget", "milliseconds", "min", "min", "MinimizeCommandWindow", "mink", "minres", "minspantree", "minus", "minute", "minutes", "mislocked", "missing", "mkdir", "mkdir", "mkpp", "mldivide", "mlint", "mlintrpt", "mlock", "mmfileinfo", "mod", "mode", "month", "more", "morebins", "movAbsHDU", "move", "move", "movefile", "movegui", "movevars", "movie", "movmad", "movmax", "movmean", "movmedian", "movmin", "movNamHDU", "movprod", "movRelHDU", "movstd", "movsum", "movvar", "mpower", "mput", "mrdivide", "msgbox", "mtimes", "mu2lin", "multibandread", "multibandwrite", "munlock", "mustBeFinite", "mustBeGreaterThan", "mustBeGreaterThanOrEqual", "mustBeInteger", "mustBeLessThan", "mustBeLessThanOrEqual", "mustBeMember", "mustBeNegative", "mustBeNonempty", "mustBeNonNan", "mustBeNonnegative", "mustBeNonpositive", "mustBeNonsparse", "mustBeNonzero", "mustBeNumeric", "mustBeNumericOrLogical", "mustBePositive", "mustBeReal", "namelengthmax", "NaN", "nargchk", "nargin", "nargin", "narginchk", "nargout", "nargout", "nargoutchk", "NaT", "native2unicode", "nccreate", "ncdisp", "nchoosek", "ncinfo", "ncread", "ncreadatt", "ncwrite", "ncwriteatt", "ncwriteschema", "ndgrid", "ndims", "ne", "nearest", "nearestNeighbor", "nearestNeighbor", "nearestNeighbor", "nearestvertex", "neighbors", "neighbors", "neighbors", "NET", "NET.addAssembly", "NET.Assembly", "NET.convertArray", "NET.createArray", "NET.createGeneric", "NET.disableAutoRelease", "NET.enableAutoRelease", "NET.GenericClass", "NET.invokeGenericMethod", "NET.isNETSupported", "NET.NetException", "NET.setStaticProperty", "netcdf.abort", "netcdf.close", "netcdf.copyAtt", "netcdf.create", "netcdf.defDim", "netcdf.defGrp", "netcdf.defVar", "netcdf.defVarChunking", "netcdf.defVarDeflate", "netcdf.defVarFill", "netcdf.defVarFletcher32", "netcdf.delAtt", "netcdf.endDef", "netcdf.getAtt", "netcdf.getChunkCache", "netcdf.getConstant", "netcdf.getConstantNames", "netcdf.getVar", "netcdf.inq", "netcdf.inqAtt", "netcdf.inqAttID", "netcdf.inqAttName", "netcdf.inqDim", "netcdf.inqDimID", "netcdf.inqDimIDs", "netcdf.inqFormat", "netcdf.inqGrpName", "netcdf.inqGrpNameFull", "netcdf.inqGrpParent", "netcdf.inqGrps", "netcdf.inqLibVers", "netcdf.inqNcid", "netcdf.inqUnlimDims", "netcdf.inqVar", "netcdf.inqVarChunking", "netcdf.inqVarDeflate", "netcdf.inqVarFill", "netcdf.inqVarFletcher32", "netcdf.inqVarID", "netcdf.inqVarIDs", "netcdf.open", "netcdf.putAtt", "netcdf.putVar", "netcdf.reDef", "netcdf.renameAtt", "netcdf.renameDim", "netcdf.renameVar", "netcdf.setChunkCache", "netcdf.setDefaultFormat", "netcdf.setFill", "netcdf.sync", "newline", "newplot", "nextfile", "nextpow2", "nnz", "nonzeros", "norm", "normalize", "normest", "not", "notebook", "notify", "now", "nsidedpoly", "nthroot", "null", "num2cell", "num2hex", "num2ruler", "num2str", "numArgumentsFromSubscript", "numboundaries", "numedges", "numel", "numnodes", "numpartitions", "numpartitions", "numRegions", "numsides", "nzmax", "ode113", "ode15i", "ode15s", "ode23", "ode23s", "ode23t", "ode23tb", "ode45", "odeget", "odeset", "odextend", "onCleanup", "ones", "onFailure", "onFailure", "open", "open", "openDiskFile", "openfig", "openFile", "opengl", "openProject", "openvar", "optimget", "optimset", "or", "ordeig", "orderfields", "ordqz", "ordschur", "orient", "orth", "outdegree", "outedges", "outerjoin", "outputImpl", "overlaps", "pack", "pad", "padecoef", "pagesetupdlg", "pan", "panInteraction", "parallelplot", "pareto", "parfor", "parquetDatastore", "parquetinfo", "parquetread", "parquetwrite", "parse", "parse", "parseSoapResponse", "partition", "partition", "partition", "parula", "pascal", "patch", "path", "path2rc", "pathsep", "pathtool", "pause", "pause", "pbaspect", "pcg", "pchip", "pcode", "pcolor", "pdepe", "pdeval", "peaks", "perimeter", "perimeter", "perl", "perms", "permute", "persistent", "pi", "pie", "pie3", "pink", "pinv", "planerot", "play", "play", "playblocking", "plot", "plot", "plot", "plot", "plot", "plot3", "plotbrowser", "plotedit", "plotmatrix", "plottools", "plotyy", "plus", "plus", "pointLocation", "pointLocation", "pol2cart", "polar", "polaraxes", "polarhistogram", "polarplot", "polarscatter", "poly", "polyarea", "polybuffer", "polyder", "polyeig", "polyfit", "polyint", "polyshape", "polyval", "polyvalm", "posixtime", "pow2", "power", "ppval", "predecessors", "prefdir", "preferences", "preferredBufferSize", "preferredBufferSize", "press", "preview", "preview", "primes", "print", "print", "printdlg", "printopt", "printpreview", "prism", "processInputSpecificationChangeImpl", "processTunedPropertiesImpl", "prod", "profile", "profsave", "progress", "propagatedInputComplexity", "propagatedInputDataType", "propagatedInputFixedSize", "propagatedInputSize", "propedit", "propedit", "properties", "propertyeditor", "psi", "publish", "PutCharArray", "putData", "putData", "putData", "putData", "putData", "putData", "putData", "putData", "PutFullMatrix", "PutWorkspaceData", "pwd", "pyargs", "pyversion", "qmr", "qr", "qrdelete", "qrinsert", "qrupdate", "quad", "quad2d", "quadgk", "quadl", "quadv", "quarter", "questdlg", "Quit", "quit", "quiver", "quiver3", "qz", "rad2deg", "rand", "rand", "randi", "randi", "randn", "randn", "randperm", "randperm", "RandStream", "RandStream", "RandStream.create", "RandStream.getGlobalStream", "RandStream.list", "RandStream.setGlobalStream", "rank", "rat", "rats", "rbbox", "rcond", "rdivide", "read", "read", "read", "read", "read", "readall", "readasync", "readATblHdr", "readBTblHdr", "readCard", "readcell", "readCol", "readFrame", "readimage", "readImg", "readKey", "readKeyCmplx", "readKeyDbl", "readKeyLongLong", "readKeyLongStr", "readKeyUnit", "readmatrix", "readRecord", "readtable", "readtimetable", "readvars", "real", "reallog", "realmax", "realmin", "realpow", "realsqrt", "record", "record", "recordblocking", "rectangle", "rectint", "recycle", "reducepatch", "reducevolume", "refresh", "refreshdata", "refreshSourceControl", "regexp", "regexpi", "regexprep", "regexptranslate", "regions", "regionZoomInteraction", "registerevent", "regmatlabserver", "rehash", "relationaloperators", "release", "release", "releaseImpl", "reload", "rem", "Remove", "remove", "RemoveAll", "removeCategory", "removecats", "removeFields", "removeFields", "removeFile", "removeLabel", "removeParameter", "removeParameter", "removePath", "removeReference", "removeShortcut", "removeShutdownFile", "removeStartupFile", "removeToolbarExplorationButtons", "removets", "removevars", "rename", "renamecats", "rendererinfo", "reordercats", "reordernodes", "repeat", "repeat", "repeat", "repeat", "repeat", "repelem", "replace", "replaceBetween", "replaceFields", "replaceFields", "repmat", "reportFinalizedResult", "resample", "resample", "rescale", "reset", "reset", "reset", "reset", "reset", "resetImpl", "reshape", "reshape", "residue", "resolve", "restartable", "restartable", "restartable", "restoredefaultpath", "result", "resume", "rethrow", "rethrow", "retime", "return", "returnStoredValueWhen", "reusable", "reusable", "reusable", "reverse", "rgb2gray", "rgb2hsv", "rgb2ind", "rgbplot", "ribbon", "rlim", "rmappdata", "rmboundary", "rmdir", "rmdir", "rmedge", "rmfield", "rmholes", "rmmissing", "rmnode", "rmoutliers", "rmpath", "rmpref", "rmprop", "rmslivers", "rng", "roots", "rose", "rosser", "rot90", "rotate", "rotate", "rotate3d", "rotateInteraction", "round", "rowfun", "rows2vars", "rref", "rsf2csf", "rtickangle", "rtickformat", "rticklabels", "rticks", "ruler2num", "rulerPanInteraction", "run", "run", "run", "run", "run", "runInParallel", "runperf", "runTest", "runTestClass", "runTestMethod", "runtests", "runTestSuite", "samplefun", "sampleSummary", "satisfiedBy", "satisfiedBy", "save", "save", "save", "saveas", "savefig", "saveobj", "saveObjectImpl", "savepath", "scale", "scatter", "scatter3", "scatteredInterpolant", "scatterhistogram", "schur", "scroll", "sec", "secd", "sech", "second", "seconds", "seek", "selectFailed", "selectIf", "selectIncomplete", "selectLogged", "selectmoveresize", "selectPassed", "semilogx", "semilogy", "send", "sendmail", "serial", "serialbreak", "seriallist", "set", "set", "set", "set", "set", "set", "set", "set", "set", "set", "set", "setabstime", "setabstime", "setappdata", "setBscale", "setcats", "setCompressionType", "setdatatype", "setdiff", "setdisp", "setenv", "setfield", "setHCompScale", "setHCompSmooth", "setinterpmethod", "setParameter", "setParameter", "setParameter", "setpixelposition", "setpref", "setProperties", "setstr", "setTileDim", "settimeseriesnames", "Setting", "settings", "SettingsGroup", "setToValue", "setTscale", "setuniformtime", "setup", "setupImpl", "setupSharedTestFixture", "setupTestClass", "setupTestMethod", "setvaropts", "setvartype", "setxor", "sgtitle", "shading", "sheetnames", "shg", "shiftdim", "shortestpath", "shortestpathtree", "show", "show", "show", "show", "showFiSettingsImpl", "showplottool", "showSimulateUsingImpl", "shrinkfaces", "shuffle", "shuffle", "sign", "simplify", "simplify", "sin", "sind", "single", "sinh", "sinpi", "size", "size", "size", "size", "size", "size", "size", "slice", "smooth3", "smoothdata", "snapnow", "sort", "sortboundaries", "sortByFixtures", "sortregions", "sortrows", "sortx", "sorty", "sound", "soundsc", "spalloc", "sparse", "spaugment", "spconvert", "spdiags", "specular", "speye", "spfun", "sph2cart", "sphere", "spinmap", "spline", "split", "split", "splitapply", "splitEachLabel", "splitlines", "splitvars", "spones", "spparms", "sprand", "sprandn", "sprandsym", "sprank", "spreadsheetDatastore", "spreadsheetImportOptions", "spring", "sprintf", "spy", "sqrt", "sqrtm", "squeeze", "ss2tf", "sscanf", "stack", "stackedplot", "stairs", "standardizeMissing", "start", "start", "start", "start", "start", "start", "start", "start", "start", "start", "start", "start", "startat", "startMeasuring", "startsWith", "startup", "stats", "std", "std", "stem", "stem3", "step", "stepImpl", "stlread", "stlwrite", "stop", "stop", "stopasync", "stopMeasuring", "storeValueWhen", "str2double", "str2func", "str2mat", "str2num", "strcat", "strcmp", "strcmpi", "stream2", "stream3", "streamline", "streamparticles", "streamribbon", "streamslice", "streamtube", "strfind", "string", "string", "string", "string", "string", "string", "strings", "strip", "strjoin", "strjust", "strlength", "strmatch", "strncmp", "strncmpi", "strread", "strrep", "strsplit", "strtok", "strtrim", "struct", "struct2cell", "struct2table", "structfun", "strvcat", "sub2ind", "subgraph", "subplot", "subsasgn", "subset", "subsindex", "subspace", "subsref", "substruct", "subtract", "subvolume", "successors", "sum", "sum", "summary", "summary", "summer", "superclasses", "support", "supportPackageInstaller", "supports", "supportsMultipleInstanceImpl", "surf", "surf2patch", "surface", "surfaceArea", "surfc", "surfl", "surfnorm", "svd", "svds", "swapbytes", "sylvester", "symamd", "symbfact", "symmlq", "symrcm", "symvar", "synchronize", "synchronize", "syntax", "system", "table", "table2array", "table2cell", "table2struct", "table2timetable", "tabularTextDatastore", "tail", "tall", "TallDatastore", "tallrng", "tan", "tand", "tanh", "tar", "tcpclient", "teardown", "teardownSharedTestFixture", "teardownTestClass", "teardownTestMethod", "tempdir", "tempname", "testsuite", "tetramesh", "texlabel", "text", "textread", "textscan", "textwrap", "tfqmr", "then", "then", "then", "then", "then", "thetalim", "thetatickformat", "thetaticklabels", "thetaticks", "thingSpeakRead", "thingSpeakWrite", "throw", "throwAsCaller", "throwExceptionWhen", "tic", "Tiff", "Tiff.computeStrip", "Tiff.computeTile", "Tiff.currentDirectory", "Tiff.getTag", "Tiff.getTagNames", "Tiff.getVersion", "Tiff.isTiled", "Tiff.lastDirectory", "Tiff.nextDirectory", "Tiff.numberOfStrips", "Tiff.numberOfTiles", "Tiff.readEncodedStrip", "Tiff.readEncodedTile", "Tiff.readRGBAImage", "Tiff.readRGBAStrip", "Tiff.readRGBATile", "Tiff.rewriteDirectory", "Tiff.setDirectory", "Tiff.setSubDirectory", "Tiff.setTag", "Tiff.writeDirectory", "Tiff.writeEncodedStrip", "Tiff.writeEncodedTile", "time", "timeit", "timeofday", "timer", "timerange", "timerfind", "timerfindall", "times", "timeseries", "timetable", "timetable2table", "timezones", "title", "toc", "todatenum", "toeplitz", "toolboxdir", "topkrows", "toposort", "trace", "transclosure", "transform", "TransformedDatastore", "translate", "transpose", "transreduction", "trapz", "treelayout", "treeplot", "triangulation", "triangulation", "tril", "trimesh", "triplequad", "triplot", "TriRep", "TriRep", "TriScatteredInterp", "TriScatteredInterp", "trisurf", "triu", "true", "tscollection", "tsdata.event", "tsearchn", "turningdist", "type", "type", "typecast", "tzoffset", "uialert", "uiaxes", "uibutton", "uibuttongroup", "uicheckbox", "uiconfirm", "uicontextmenu", "uicontrol", "uidatepicker", "uidropdown", "uieditfield", "uifigure", "uigauge", "uigetdir", "uigetfile", "uigetpref", "uigridlayout", "uiimage", "uiimport", "uiknob", "uilabel", "uilamp", "uilistbox", "uimenu", "uint16", "uint32", "uint64", "uint8", "uiopen", "uipanel", "uiprogressdlg", "uipushtool", "uiputfile", "uiradiobutton", "uiresume", "uisave", "uisetcolor", "uisetfont", "uisetpref", "uislider", "uispinner", "uistack", "uiswitch", "uitab", "uitabgroup", "uitable", "uitextarea", "uitogglebutton", "uitoggletool", "uitoolbar", "uitree", "uitreenode", "uiwait", "uminus", "underlyingValue", "undocheckout", "unicode2native", "union", "union", "unique", "uniquetol", "unix", "unloadlibrary", "unmesh", "unmkpp", "unregisterallevents", "unregisterevent", "unstack", "untar", "unwrap", "unzip", "updateDependencies", "updateImpl", "upgradePreviouslyInstalledSupportPackages", "uplus", "upper", "urlread", "urlwrite", "usejava", "userpath", "validate", "validate", "validate", "validate", "validateattributes", "validateFunctionSignaturesJSON", "validateInputsImpl", "validatePropertiesImpl", "validatestring", "ValueIterator", "values", "vander", "var", "var", "varargin", "varargout", "varfun", "vartype", "vecnorm", "vectorize", "ver", "verctrl", "verifyAccessed", "verifyCalled", "verifyClass", "verifyEmpty", "verifyEqual", "verifyError", "verifyFail", "verifyFalse", "verifyGreaterThan", "verifyGreaterThanOrEqual", "verifyInstanceOf", "verifyLength", "verifyLessThan", "verifyLessThanOrEqual", "verifyMatches", "verifyNotAccessed", "verifyNotCalled", "verifyNotEmpty", "verifyNotEqual", "verifyNotSameHandle", "verifyNotSet", "verifyNumElements", "verifyReturnsTrue", "verifySameHandle", "verifySet", "verifySize", "verifySubstring", "verifyThat", "verifyTrue", "verifyUsing", "verifyWarning", "verifyWarningFree", "verLessThan", "version", "vertcat", "vertcat", "vertcat", "vertexAttachments", "vertexAttachments", "vertexNormal", "VideoReader", "VideoWriter", "view", "viewmtx", "visdiff", "volume", "volumebounds", "voronoi", "voronoiDiagram", "voronoiDiagram", "voronoin", "wait", "waitbar", "waitfor", "waitforbuttonpress", "warndlg", "warning", "waterfall", "web", "weboptions", "webread", "websave", "webwrite", "week", "weekday", "what", "whatsnew", "when", "when", "when", "which", "while", "whitebg", "who", "who", "whos", "whos", "width", "wilkinson", "winopen", "winqueryreg", "winter", "withAnyInputs", "withExactInputs", "withNargout", "withtol", "wordcloud", "write", "write", "write", "writecell", "writeChecksum", "writeCol", "writeComment", "writeDate", "writeHistory", "writeImg", "writeKey", "writeKeyUnit", "writematrix", "writetable", "writetimetable", "writeVideo", "xcorr", "xcov", "xlabel", "xlim", "xline", "xlsfinfo", "xlsread", "xlswrite", "xmlread", "xmlwrite", "xor", "xor", "xslt", "xtickangle", "xtickformat", "xticklabels", "xticks", "year", "years", "ylabel", "ylim", "yline", "ymd", "ytickangle", "ytickformat", "yticklabels", "yticks", "yyaxis", "yyyymmdd", "zeros", "zip", "zlabel", "zlim", "zoom", "zoomInteraction", "ztickangle", "ztickformat", "zticklabels", "zticks"] end end endrouge-3.28.0/lib/rouge/lexers/minizinc.rb000066400000000000000000000055271417417255300203050ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # Based on Chroma's MiniZinc lexer: # https://github.com/alecthomas/chroma/blob/5152194c717b394686d3d7a7e1946a360ec0728f/lexers/m/minizinc.go module Rouge module Lexers class MiniZinc < RegexLexer title "MiniZinc" desc "MiniZinc is a free and open-source constraint modeling language (minizinc.org)" tag 'minizinc' filenames '*.mzn', '*.fzn', '*.dzn' mimetypes 'text/minizinc' def self.builtins @builtins = Set.new %w[ abort abs acosh array_intersect array_union array1d array2d array3d array4d array5d array6d asin assert atan bool2int card ceil concat cos cosh dom dom_array dom_size fix exp floor index_set index_set_1of2 index_set_2of2 index_set_1of3 index_set_2of3 index_set_3of3 int2float is_fixed join lb lb_array length ln log log2 log10 min max pow product round set2array show show_int show_float sin sinh sqrt sum tan tanh trace ub ub_array ] end def self.keywords @keywords = Set.new %w[ ann annotation any constraint else endif function for forall if include list of op output minimize maximize par predicate record satisfy solve test then type var where ] end def self.keywords_type @keywords_type ||= Set.new %w( array set bool enum float int string tuple ) end def self.operators @operators ||= Set.new %w( in subset superset union diff symdiff intersect ) end id = /[$a-zA-Z_]\w*/ state :root do rule %r(\s+)m, Text::Whitespace rule %r(\\\n)m, Text::Whitespace rule %r(%.*), Comment::Single rule %r(/(\\\n)?[*](.|\n)*?[*](\\\n)?/)m, Comment::Multiline rule %r/"(\\\\|\\"|[^"])*"/, Literal::String rule %r(not|<->|->|<-|\\/|xor|/\\), Operator rule %r(<|>|<=|>=|==|=|!=), Operator rule %r(\+|-|\*|/|div|mod), Operator rule %r(\\|\.\.|\+\+), Operator rule %r([|()\[\]{},:;]), Punctuation rule %r((true|false)\b), Keyword::Constant rule %r(([+-]?)\d+(\.(?!\.)\d*)?([eE][-+]?\d+)?), Literal::Number rule id do |m| if self.class.keywords.include? m[0] token Keyword elsif self.class.keywords_type.include? m[0] token Keyword::Type elsif self.class.builtins.include? m[0] token Name::Builtin elsif self.class.operators.include? m[0] token Operator else token Name::Other end end rule %r(::\s*([^\W\d]\w*)(\s*\([^\)]*\))?), Name::Decorator rule %r(\b([^\W\d]\w*)\b(\()) do groups Name::Function, Punctuation end rule %r([^\W\d]\w*), Name::Other end end end end rouge-3.28.0/lib/rouge/lexers/moonscript.rb000066400000000000000000000063311417417255300206540ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'lua.rb' class Moonscript < RegexLexer title "MoonScript" desc "Moonscript (http://www.moonscript.org)" tag 'moonscript' aliases 'moon' filenames '*.moon' mimetypes 'text/x-moonscript', 'application/x-moonscript' option :function_highlighting, 'Whether to highlight builtin functions (default: true)' option :disabled_modules, 'builtin modules to disable' def initialize(*) super @function_highlighting = bool_option(:function_highlighting) { true } @disabled_modules = list_option(:disabled_modules) end def self.detect?(text) return true if text.shebang? 'moon' end def builtins return [] unless @function_highlighting @builtins ||= Set.new.tap do |builtins| Rouge::Lexers::Lua.builtins.each do |mod, fns| next if @disabled_modules.include? mod builtins.merge(fns) end end end state :root do rule %r(#!(.*?)$), Comment::Preproc # shebang rule %r//, Text, :main end state :base do ident = '(?:\w\w*)' rule %r((?i)(\d*\.\d+|\d+\.\d*)(e[+-]?\d+)?'), Num::Float rule %r((?i)\d+e[+-]?\d+), Num::Float rule %r((?i)0x[0-9a-f]*), Num::Hex rule %r(\d+), Num::Integer rule %r(@#{ident}*), Name::Variable::Instance rule %r([A-Z]\w*), Name::Class rule %r("?[^"]+":), Literal::String::Symbol rule %r(#{ident}:), Literal::String::Symbol rule %r(:#{ident}), Literal::String::Symbol rule %r(\s+), Text::Whitespace rule %r((==|~=|!=|<=|>=|\.\.\.|\.\.|->|=>|[=+\-*/%^<>#!\\])), Operator rule %r([\[\]\{\}\(\)\.,:;]), Punctuation rule %r((and|or|not)\b), Operator::Word keywords = %w{ break class continue do else elseif end extends for if import in repeat return switch super then unless until using when with while } rule %r((#{keywords.join('|')})\b), Keyword rule %r((local|export)\b), Keyword::Declaration rule %r((true|false|nil)\b), Keyword::Constant rule %r([A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)?) do |m| name = m[0] if self.builtins.include?(name) token Name::Builtin elsif name =~ /\./ a, b = name.split('.', 2) token Name, a token Punctuation, '.' token Name, b else token Name end end end state :main do rule %r(--.*$), Comment::Single rule %r(\[(=*)\[.*?\]\1\])m, Str::Heredoc mixin :base rule %r('), Str::Single, :sqs rule %r("), Str::Double, :dqs end state :sqs do rule %r('), Str::Single, :pop! rule %r([^']+), Str::Single end state :interpolation do rule %r(\}), Str::Interpol, :pop! mixin :base end state :dqs do rule %r(#\{), Str::Interpol, :interpolation rule %r("), Str::Double, :pop! rule %r(#[^{]), Str::Double rule %r([^"#]+), Str::Double end end end end rouge-3.28.0/lib/rouge/lexers/mosel.rb000066400000000000000000000213351417417255300175770ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Mosel < RegexLexer tag 'mosel' filenames '*.mos' title "Mosel" desc "An optimization language used by Fico's Xpress." # http://www.fico.com/en/products/fico-xpress-optimization-suite filenames '*.mos' mimetypes 'text/x-mosel' def self.detect?(text) return true if text =~ /^\s*(model|package)\s+/ end id = /[a-zA-Z_][a-zA-Z0-9_]*/ ############################################################################################################################ # General language lements ############################################################################################################################ core_keywords = %w( and array as boolean break case count counter declarations div do dynamic elif else end evaluation exit false forall forward from function if imports in include initialisations initializations integer inter is_binary is_continuous is_free is_integer is_partint is_semcont is_semint is_sos1 is_sos2 linctr list max min mod model mpvar next not of options or package parameters procedure public prod range real record repeat requirements set string sum then to true union until uses version while with ) core_functions = %w( abs arctan assert bitflip bitneg bitset bitshift bittest bitval ceil cos create currentdate currenttime cuthead cuttail delcell exists exit exp exportprob fclose fflush finalize findfirst findlast floor fopen fselect fskipline getact getcoeff getcoeffs getdual getfid getfirst gethead getfname getlast getobjval getparam getrcost getreadcnt getreverse getsize getslack getsol gettail gettype getvars iseof ishidden isodd ln log makesos1 makesos2 maxlist minlist publish random read readln reset reverse round setcoeff sethidden setioerr setname setparam setrandseed settype sin splithead splittail sqrt strfmt substr timestamp unpublish write writeln ) ############################################################################################################################ # mmxprs module elements ############################################################################################################################ mmxprs_functions = %w( addmipsol basisstability calcsolinfo clearmipdir clearmodcut command copysoltoinit defdelayedrows defsecurevecs estimatemarginals fixglobal getbstat getdualray getiis getiissense getiistype getinfcause getinfeas getlb getloadedlinctrs getloadedmpvars getname getprimalray getprobstat getrange getsensrng getsize getsol getub getvars implies indicator isiisvalid isintegral loadbasis loadmipsol loadprob maximize minimize postsolve readbasis readdirs readsol refinemipsol rejectintsol repairinfeas resetbasis resetiis resetsol savebasis savemipsol savesol savestate selectsol setbstat setcallback setcbcutoff setgndata setlb setmipdir setmodcut setsol setub setucbdata stopoptimize unloadprob writebasis writedirs writeprob writesol xor ) mmxpres_constants = %w(XPRS_OPT XPRS_UNF XPRS_INF XPRS_UNB XPRS_OTH) mmxprs_parameters = %w(XPRS_colorder XPRS_enumduplpol XPRS_enummaxsol XPRS_enumsols XPRS_fullversion XPRS_loadnames XPRS_problem XPRS_probname XPRS_verbose) ############################################################################################################################ # mmsystem module elements ############################################################################################################################ mmsystem_functions = %w( addmonths copytext cuttext deltext endswith expandpath fcopy fdelete findfiles findtext fmove getasnumber getchar getcwd getdate getday getdaynum getdays getdirsep getendparse setendparse getenv getfsize getfstat getftime gethour getminute getmonth getmsec getpathsep getqtype setqtype getsecond getsepchar setsepchar getsize getstart setstart getsucc setsucc getsysinfo getsysstat gettime gettmpdir gettrim settrim getweekday getyear inserttext isvalid makedir makepath newtar newzip nextfield openpipe parseextn parseint parsereal parsetext pastetext pathmatch pathsplit qsort quote readtextline regmatch regreplace removedir removefiles setchar setdate setday setenv sethour setminute setmonth setmsec setsecond settime setyear sleep startswith system tarlist textfmt tolower toupper trim untar unzip ziplist ) mmsystem_parameters = %w(datefmt datetimefmt monthnames sys_endparse sys_fillchar sys_pid sys_qtype sys_regcache sys_sepchar) ############################################################################################################################ # mmjobs module elements ############################################################################################################################ mmjobs_instance_mgmt_functions = %w( clearaliases connect disconnect findxsrvs getaliases getbanner gethostalias sethostalias ) mmjobs_model_mgmt_functions = %w( compile detach getannidents getannotations getexitcode getgid getid getnode getrmtid getstatus getuid load reset resetmodpar run setcontrol setdefstream setmodpar setworkdir stop unload ) mmjobs_synchornization_functions = %w( dropnextevent getclass getfromgid getfromid getfromuid getnextevent getvalue isqueueempty nullevent peeknextevent send setgid setuid wait waitfor ) mmjobs_functions = mmjobs_instance_mgmt_functions + mmjobs_model_mgmt_functions + mmjobs_synchornization_functions mmjobs_parameters = %w(conntmpl defaultnode fsrvdelay fsrvnbiter fsrvport jobid keepalive nodenumber parentnumber) state :whitespace do # Spaces rule %r/\s+/m, Text # ! Comments rule %r((!).*$\n?), Comment::Single # (! Comments !) rule %r(\(!.*?!\))m, Comment::Multiline end # From Mosel documentation: # Constant strings of characters must be quoted with single (') or double quote (") and may extend over several lines. Strings enclosed in double quotes may contain C-like escape sequences introduced by the 'backslash' # character (\a \b \f \n \r \t \v \xxx with xxx being the character code as an octal number). # Each sequence is replaced by the corresponding control character (e.g. \n is the `new line' command) or, if no control character exists, by the second character of the sequence itself (e.g. \\ is replaced by '\'). # The escape sequences are not interpreted if they are contained in strings that are enclosed in single quotes. state :single_quotes do rule %r/'/, Str::Single, :pop! rule %r/[^']+/, Str::Single end state :double_quotes do rule %r/"/, Str::Double, :pop! rule %r/(\\"|\\[0-7]{1,3}\D|\\[abfnrtv]|\\\\)/, Str::Escape rule %r/[^"]/, Str::Double end state :base do rule %r{"}, Str::Double, :double_quotes rule %r{'}, Str::Single, :single_quotes rule %r{((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?}, Num rule %r{[~!@#\$%\^&\*\(\)\+`\-={}\[\]:;<>\?,\.\/\|\\]}, Punctuation # rule %r{'([^']|'')*'}, Str # rule %r/"(\\\\|\\"|[^"])*"/, Str rule %r/(true|false)\b/i, Name::Builtin rule %r/\b(#{core_keywords.join('|')})\b/i, Keyword rule %r/\b(#{core_functions.join('|')})\b/, Name::Builtin rule %r/\b(#{mmxprs_functions.join('|')})\b/, Name::Function rule %r/\b(#{mmxpres_constants.join('|')})\b/, Name::Constant rule %r/\b(#{mmxprs_parameters.join('|')})\b/i, Name::Property rule %r/\b(#{mmsystem_functions.join('|')})\b/i, Name::Function rule %r/\b(#{mmsystem_parameters.join('|')})\b/, Name::Property rule %r/\b(#{mmjobs_functions.join('|')})\b/i, Name::Function rule %r/\b(#{mmjobs_parameters.join('|')})\b/, Name::Property rule id, Name end state :root do mixin :whitespace mixin :base end end end end rouge-3.28.0/lib/rouge/lexers/msgtrans.rb000066400000000000000000000012241417417255300203110ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class MsgTrans < RegexLexer title "MessageTrans" desc "RISC OS message translator messages file" tag 'msgtrans' filenames 'Messages', 'Message[0-9]', 'Message[1-9][0-9]', 'Message[1-9][0-9][0-9]' state :root do rule %r/^#[^\n]*/, Comment rule %r/[^\t\n\r ,):?\/]+/, Name::Variable rule %r/[\n\/?]/, Operator rule %r/:/, Operator, :value end state :value do rule %r/\n/, Text, :pop! rule %r/%[0-3%]/, Operator rule %r/[^\n%]/, Literal::String end end end end rouge-3.28.0/lib/rouge/lexers/mxml.rb000066400000000000000000000031531417417255300174330ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class MXML < RegexLexer title "MXML" desc "MXML" tag 'mxml' filenames '*.mxml' mimetypes 'application/xv+xml' state :root do rule %r/[^<&]+/, Text rule %r/&\S*?;/, Name::Entity rule %r//, Comment::Preproc rule %r/]*>/, Comment::Preproc rule %r(<\s*[\w:.-]+)m, Name::Tag, :tag # opening tags rule %r(<\s*/\s*[\w:.-]+\s*>)m, Name::Tag # closing tags end state :comment do rule %r/[^-]+/m, Comment rule %r/-->/, Comment, :pop! rule %r/-/, Comment end state :tag do rule %r/\s+/m, Text rule %r/[\w.:-]+\s*=/m, Name::Attribute, :attribute rule %r(/?\s*>), Name::Tag, :root end state :attribute do rule %r/\s+/m, Text rule %r/(")({|@{)/m do groups Str, Punctuation push :actionscript_attribute end rule %r/".*?"|'.*?'|[^\s>]+/, Str, :tag end state :actionscript_content do rule %r/\]\]\>/m, Comment::Preproc, :pop! rule %r/.*?(?=\]\]\>)/m do delegate Actionscript end end state :actionscript_attribute do rule %r/(})(")/m do groups Punctuation, Str push :tag end rule %r/.*?(?=}")/m do delegate Actionscript end end end end end rouge-3.28.0/lib/rouge/lexers/nasm.rb000066400000000000000000000043641417417255300174210ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # Based on Chroma's NASM lexer implementation # https://github.com/alecthomas/chroma/blob/498eaa690f5ac6ab0e3d6f46237e547a8935cdc7/lexers/n/nasm.go module Rouge module Lexers class Nasm < RegexLexer title "Nasm" desc "Netwide Assembler" tag 'nasm' filenames '*.asm' mimetypes 'text/x-nasm' state :root do rule %r/^\s*%/, Comment::Preproc, :preproc mixin :whitespace rule %r/[a-z$._?][\w$.?#@~]*:/i, Name::Label rule %r/([a-z$._?][\w$.?#@~]*)(\s+)(equ)/i do groups Name::Constant, Keyword::Declaration, Keyword::Declaration push :instruction_args end rule %r/BITS|USE16|USE32|SECTION|SEGMENT|ABSOLUTE|EXTERN|GLOBAL|ORG|ALIGN|STRUC|ENDSTRUC|COMMON|CPU|GROUP|UPPERCASE|IMPORT|EXPORT|LIBRARY|MODULE/, Keyword, :instruction_args rule %r/(?:res|d)[bwdqt]|times/i, Keyword::Declaration, :instruction_args rule %r/[a-z$._?][\w$.?#@~]*/i, Name::Function, :instruction_args rule %r/[\r\n]+/, Text end state :instruction_args do rule %r/"(\\\\"|[^"\\n])*"|'(\\\\'|[^'\\n])*'|`(\\\\`|[^`\\n])*`/, Str rule %r/(?:0x[\da-f]+|$0[\da-f]*|\d+[\da-f]*h)/i, Num::Hex rule %r/[0-7]+q/i, Num::Oct rule %r/[01]+b/i, Num::Bin rule %r/\d+\.e?\d+/i, Num::Float rule %r/\d+/, Num::Integer mixin :punctuation rule %r/r\d[0-5]?[bwd]|[a-d][lh]|[er]?[a-d]x|[er]?[sb]p|[er]?[sd]i|[c-gs]s|st[0-7]|mm[0-7]|cr[0-4]|dr[0-367]|tr[3-7]/i, Name::Builtin rule %r/[a-z$._?][\w$.?#@~]*/i, Name::Variable rule %r/[\r\n]+/, Text, :pop! mixin :whitespace end state :preproc do rule %r/[^;\n]+/, Comment::Preproc rule %r/;.*?\n/, Comment::Single, :pop! rule %r/\n/, Comment::Preproc, :pop! end state :whitespace do rule %r/\n/, Text rule %r/[ \t]+/, Text rule %r/;.*/, Comment::Single end state :punctuation do rule %r/[,():\[\]]+/, Punctuation rule %r/[&|^<>+*\/%~-]+/, Operator rule %r/\$+/, Keyword::Constant rule %r/seg|wrt|strict/i, Operator::Word rule %r/byte|[dq]?word/i, Keyword::Type end end end end rouge-3.28.0/lib/rouge/lexers/nesasm.rb000066400000000000000000000042701417417255300177450ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class NesAsm < RegexLexer title "NesAsm" desc "Nesasm3 assembly (6502 asm)" tag 'nesasm' aliases 'nes' filenames '*.nesasm' def self.keywords @keywords ||= %w( ADC AND ASL BIT BRK CMP CPX CPY DEC EOR INC JMP JSR LDA LDX LDY LSR NOP ORA ROL ROR RTI RTS SBC STA STX STY TAX TXA DEX INX TAY TYA DEY INY BPL BMI BVC BVS BCC BCS BNE BEQ CLC SEC CLI SEI CLV CLD SED TXS TSX PHA PLA PHP PLP ) end def self.keywords_type @keywords_type ||= %w( DB DW BYTE WORD ) end def self.keywords_reserved @keywords_reserved ||= %w( INCBIN INCLUDE ORG BANK RSSET RS MACRO ENDM DS PROC ENDP PROCGROUP ENDPROCGROUP INCCHR DEFCHR ZP BSS CODE DATA IF IFDEF IFNDEF ELSE ENDIF FAIL INESPRG INESCHR INESMAP INESMIR FUNC ) end state :root do rule %r/\s+/m, Text rule %r(;.*), Comment::Single rule %r/[\(\)\,\.\[\]]/, Punctuation rule %r/\#?\%[0-1]+/, Num::Bin # #%00110011 %00110011 rule %r/\#?\$\h+/, Num::Hex # $1f #$1f rule %r/\#?\d+/, Num # 10 #10 rule %r([~&*+=\|?:<>/-]), Operator rule %r/\#?\w+:?/i do |m| name = m[0].upcase if self.class.keywords.include? name token Keyword elsif self.class.keywords_type.include? name token Keyword::Type elsif self.class.keywords_reserved.include? name token Keyword::Reserved else token Name::Function end end rule %r/\#?(?:LOW|HIGH)\(.*\)/i, Keyword::Reserved # LOW() #HIGH() rule %r/\#\(/, Punctuation # #() rule %r/"/, Str, :string rule %r/'\w'/, Str::Char # 'A' for example rule %r/\\\??[\d@#]/, Name::Builtin # builtin parameters for use inside macros and functions: \1-\9 , \?1-\?9 , \# , \@ end state :string do rule %r/"/, Str, :pop! rule %r/\\"?/, Str::Escape rule %r/[^"\\]+/m, Str end end end end rouge-3.28.0/lib/rouge/lexers/nginx.rb000066400000000000000000000030031417417255300175730ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Nginx < RegexLexer title "nginx" desc 'configuration files for the nginx web server (nginx.org)' tag 'nginx' mimetypes 'text/x-nginx-conf' filenames 'nginx.conf' id = /[^\s$;{}()#]+/ state :root do rule %r/(include)(\s+)([^\s;]+)/ do groups Keyword, Text, Name end rule id, Keyword, :statement mixin :base end state :block do rule %r/}/, Punctuation, :pop! rule id, Keyword::Namespace, :statement mixin :base end state :statement do rule %r/{/ do token Punctuation; pop!; push :block end rule %r/;/, Punctuation, :pop! mixin :base end state :base do rule %r/\s+/, Text rule %r/#.*/, Comment::Single rule %r/(?:on|off)\b/, Name::Constant rule %r/[$][\w-]+/, Name::Variable # host/port rule %r/([a-z0-9.-]+)(:)([0-9]+)/i do groups Name::Function, Punctuation, Num::Integer end # mimetype rule %r([a-z-]+/[a-z-]+)i, Name::Class rule %r/[0-9]+[kmg]?\b/i, Num::Integer rule %r/(~)(\s*)([^\s{]+)/ do groups Punctuation, Text, Str::Regex end rule %r/[:=~]/, Punctuation # pathname rule %r(/#{id}?), Name rule %r/[^#\s;{}$\\]+/, Str # catchall rule %r/[$;]/, Text end end end end rouge-3.28.0/lib/rouge/lexers/nim.rb000066400000000000000000000111001417417255300172300ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Nim < RegexLexer # This is pretty much a 1-1 port of the pygments NimrodLexer class title "Nim" desc "The Nim programming language (http://nim-lang.org/)" tag 'nim' aliases 'nimrod' filenames '*.nim' KEYWORDS = %w( addr as asm atomic bind block break case cast const continue converter defer discard distinct do elif else end enum except export func finally for from generic if import include interface iterator let macro method mixin nil object of out proc ptr raise ref return static template try tuple type using var when while with without yield ) OPWORDS = %w( and or not xor shl shr div mod in notin is isnot ) PSEUDOKEYWORDS = %w( nil true false ) TYPES = %w( int int8 int16 int32 int64 float float32 float64 bool char range array seq set string ) NAMESPACE = %w( from import include ) def self.underscorize(words) words.map do |w| w.gsub(/./) { |x| "#{Regexp.escape(x)}_?" } end.join('|') end state :chars do rule(/\\([\\abcefnrtvl"\']|x[a-fA-F0-9]{2}|[0-9]{1,3})/, Str::Escape) rule(/'/, Str::Char, :pop!) rule(/./, Str::Char) end state :strings do rule(/(?|<|\+|-|\/|@|\$|~|&|%|\!|\?|\||\\|\[|\]/, Operator) rule(/\.\.|\.|,|\[\.|\.\]|{\.|\.}|\(\.|\.\)|{|}|\(|\)|:|\^|`|;/, Punctuation) # Strings rule(/(?:\w+)"/,Str, :rdqs) rule(/"""/, Str, :tdqs) rule(/"/, Str, :dqs) # Char rule(/'/, Str::Char, :chars) # Keywords rule(%r[(#{Nim.underscorize(OPWORDS)})\b], Operator::Word) rule(/(p_?r_?o_?c_?\s)(?![\(\[\]])/, Keyword, :funcname) rule(%r[(#{Nim.underscorize(KEYWORDS)})\b], Keyword) rule(%r[(#{Nim.underscorize(NAMESPACE)})\b], Keyword::Namespace) rule(/(v_?a_?r)\b/, Keyword::Declaration) rule(%r[(#{Nim.underscorize(TYPES)})\b], Keyword::Type) rule(%r[(#{Nim.underscorize(PSEUDOKEYWORDS)})\b], Keyword::Pseudo) # Identifiers rule(/\b((?![_\d])\w)(((?!_)\w)|(_(?!_)\w))*/, Name) # Numbers # Note: Have to do this with a block to push multiple states first, # since we can't pass array of states like w/ Pygments. rule(/[0-9][0-9_]*(?=([eE.]|'?[fF](32|64)))/) do push :floatsuffix push :floatnumber token Num::Float end rule(/0[xX][a-fA-F0-9][a-fA-F0-9_]*/, Num::Hex, :intsuffix) rule(/0[bB][01][01_]*/, Num, :intsuffix) rule(/0o[0-7][0-7_]*/, Num::Oct, :intsuffix) rule(/[0-9][0-9_]*/, Num::Integer, :intsuffix) # Whitespace rule(/\s+/, Text) rule(/.+$/, Error) end end end end rouge-3.28.0/lib/rouge/lexers/nix.rb000066400000000000000000000114461417417255300172600ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Nix < RegexLexer title 'Nix' desc 'The Nix expression language (https://nixos.org/nix/manual/#ch-expression-language)' tag 'nix' aliases 'nixos' filenames '*.nix' state :whitespaces do rule %r/^\s*\n\s*$/m, Text rule %r/\s+/, Text end state :comment do rule %r/#.*$/, Comment rule %r(/\*), Comment, :multiline_comment end state :multiline_comment do rule %r(\*/), Comment, :pop! rule %r/./, Comment end state :number do rule %r/[0-9]/, Num::Integer end state :null do rule %r/(null)/, Keyword::Constant end state :boolean do rule %r/(true|false)/, Keyword::Constant end state :binding do rule %r/[a-zA-Z_][a-zA-Z0-9-]*/, Name::Variable end state :path do word = "[a-zA-Z0-9\._-]+" section = "(\/#{word})" prefix = "[a-z\+]+:\/\/" root = /#{section}+/.source tilde = /~#{section}+/.source basic = /#{word}(\/#{word})+/.source url = /#{prefix}(\/?#{basic})/.source rule %r/(#{root}|#{tilde}|#{basic}|#{url})/, Str::Other end state :string do rule %r/"/, Str::Double, :double_quoted_string rule %r/''/, Str::Double, :indented_string end state :string_content do rule %r/\\./, Str::Escape rule %r/\$\$/, Str::Escape rule %r/\${/, Str::Interpol, :string_interpolated_arg end state :indented_string_content do rule %r/'''/, Str::Escape rule %r/''\$/, Str::Escape rule %r/\$\$/, Str::Escape rule %r/''\\./, Str::Escape rule %r/\${/, Str::Interpol, :string_interpolated_arg end state :string_interpolated_arg do mixin :expression rule %r/}/, Str::Interpol, :pop! end state :indented_string do mixin :indented_string_content rule %r/''/, Str::Double, :pop! rule %r/./, Str::Double end state :double_quoted_string do mixin :string_content rule %r/"/, Str::Double, :pop! rule %r/./, Str::Double end state :operator do rule %r/(\.|\?|\+\+|\+|!=|!|\/\/|\=\=|&&|\|\||->|\/|\*|-|<|>|<=|=>)/, Operator end state :assignment do rule %r/(=)/, Operator rule %r/(@)/, Operator end state :accessor do rule %r/(\$)/, Punctuation end state :delimiter do rule %r/(;|,|:)/, Punctuation end state :atom_content do mixin :expression rule %r/\)/, Punctuation, :pop! end state :atom do rule %r/\(/, Punctuation, :atom_content end state :list do rule %r/\[/, Punctuation, :list_content end state :list_content do rule %r/\]/, Punctuation, :pop! mixin :expression end state :set do rule %r/{/, Punctuation, :set_content end state :set_content do rule %r/}/, Punctuation, :pop! mixin :expression end state :expression do mixin :ignore mixin :comment mixin :boolean mixin :null mixin :number mixin :path mixin :string mixin :keywords mixin :operator mixin :accessor mixin :assignment mixin :delimiter mixin :binding mixin :atom mixin :set mixin :list end state :keywords do mixin :keywords_namespace mixin :keywords_declaration mixin :keywords_conditional mixin :keywords_reserved mixin :keywords_builtin end state :keywords_namespace do keywords = %w(with in inherit) rule %r/(?:#{keywords.join('|')})\b/, Keyword::Namespace end state :keywords_declaration do keywords = %w(let) rule %r/(?:#{keywords.join('|')})\b/, Keyword::Declaration end state :keywords_conditional do keywords = %w(if then else) rule %r/(?:#{keywords.join('|')})\b/, Keyword end state :keywords_reserved do keywords = %w(rec assert map) rule %r/(?:#{keywords.join('|')})\b/, Keyword::Reserved end state :keywords_builtin do keywords = %w( abort baseNameOf builtins derivation fetchTarball import isNull removeAttrs throw toString ) rule %r/(?:#{keywords.join('|')})\b/, Keyword::Reserved end state :ignore do mixin :whitespaces end state :root do mixin :ignore mixin :expression end start do end end end end rouge-3.28.0/lib/rouge/lexers/objective_c.rb000066400000000000000000000007521417417255300207340ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'c.rb' load_lexer 'objective_c/common.rb' class ObjectiveC < C extend ObjectiveCCommon tag 'objective_c' title "Objective-C" desc 'an extension of C commonly used to write Apple software' aliases 'objc', 'obj-c', 'obj_c', 'objectivec' filenames '*.m', '*.h' mimetypes 'text/x-objective_c', 'application/x-objective_c' end end end rouge-3.28.0/lib/rouge/lexers/objective_c/000077500000000000000000000000001417417255300204035ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/lexers/objective_c/common.rb000066400000000000000000000121471417417255300222250ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers module ObjectiveCCommon id = /[a-z$_][a-z0-9$_]*/i def at_keywords @at_keywords ||= %w( selector private protected public encode synchronized try throw catch finally end property synthesize dynamic optional interface implementation import autoreleasepool ) end def at_builtins @at_builtins ||= %w(true false YES NO) end def builtins @builtins ||= %w(YES NO nil) end def self.extended(base) base.prepend :statements do rule %r/@"/, base::Str, :string rule %r/@'(\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|\\.|[^\\'\n]')/, base::Str::Char rule %r/@(\d+[.]\d*|[.]\d+|\d+)e[+-]?\d+l?/i, base::Num::Float rule %r/@(\d+[.]\d*|[.]\d+|\d+f)f?/i, base::Num::Float rule %r/@0x\h+[lL]?/, base::Num::Hex rule %r/@0[0-7]+l?/i, base::Num::Oct rule %r/@\d+l?/, base::Num::Integer rule %r/\bin\b/, base::Keyword rule %r/@(?:interface|implementation)\b/, base::Keyword, :objc_classname rule %r/@(?:class|protocol)\b/, base::Keyword, :forward_classname rule %r/@([[:alnum:]]+)/ do |m| if base.at_keywords.include? m[1] token base::Keyword elsif base.at_builtins.include? m[1] token base::Name::Builtin else token base::Error end end rule %r/[?]/, base::Punctuation, :ternary rule %r/\[/, base::Punctuation, :message rule %r/@\[/, base::Punctuation, :array_literal rule %r/@\{/, base::Punctuation, :dictionary_literal end id = /[a-z$_][a-z0-9$_]*/i base.state :ternary do rule %r/:/, base::Punctuation, :pop! mixin :statements end base.state :message_shared do rule %r/\]/, base::Punctuation, :pop! rule %r/\{/, base::Punctuation, :pop! rule %r/;/, base::Error mixin :statements end base.state :message do rule %r/(#{id})(\s*)(:)/ do groups(base::Name::Function, base::Text, base::Punctuation) goto :message_with_args end rule %r/(#{id})(\s*)(\])/ do groups(base::Name::Function, base::Text, base::Punctuation) pop! end mixin :message_shared end base.state :message_with_args do rule %r/\{/, base::Punctuation, :function rule %r/(#{id})(\s*)(:)/ do groups(base::Name::Function, base::Text, base::Punctuation) pop! end mixin :message_shared end base.state :array_literal do rule %r/]/, base::Punctuation, :pop! rule %r/,/, base::Punctuation mixin :statements end base.state :dictionary_literal do rule %r/}/, base::Punctuation, :pop! rule %r/,/, base::Punctuation mixin :statements end base.state :objc_classname do mixin :whitespace rule %r/(#{id})(\s*)(:)(\s*)(#{id})/ do groups(base::Name::Class, base::Text, base::Punctuation, base::Text, base::Name::Class) pop! end rule %r/(#{id})(\s*)([(])(\s*)(#{id})(\s*)([)])/ do groups(base::Name::Class, base::Text, base::Punctuation, base::Text, base::Name::Label, base::Text, base::Punctuation) pop! end rule id, base::Name::Class, :pop! end base.state :forward_classname do mixin :whitespace rule %r/(#{id})(\s*)(,)(\s*)/ do groups(base::Name::Class, base::Text, base::Punctuation, base::Text) push end rule %r/(#{id})(\s*)(;?)/ do groups(base::Name::Class, base::Text, base::Punctuation) pop! end end base.prepend :root do rule %r( ([-+])(\s*) ([(].*?[)])?(\s*) (?=#{id}:?) )ix do |m| token base::Keyword, m[1] token base::Text, m[2] recurse(m[3]) if m[3] token base::Text, m[4] push :method_definition end end base.state :method_definition do rule %r/,/, base::Punctuation rule %r/[.][.][.]/, base::Punctuation rule %r/([(].*?[)])(#{id})/ do |m| recurse m[1]; token base::Name::Variable, m[2] end rule %r/(#{id})(\s*)(:)/m do groups(base::Name::Function, base::Text, base::Punctuation) end rule %r/;/, base::Punctuation, :pop! rule %r/{/ do token base::Punctuation goto :function end mixin :inline_whitespace rule %r(//.*?\n), base::Comment::Single rule %r/\s+/m, base::Text rule(//) { pop! } end end end end end rouge-3.28.0/lib/rouge/lexers/objective_cpp.rb000066400000000000000000000015171417417255300212740ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'cpp.rb' load_lexer 'objective_c/common.rb' class ObjectiveCpp < Cpp extend ObjectiveCCommon tag 'objective_cpp' title "Objective-C++" desc 'an extension of C++ uncommonly used to write Apple software' aliases 'objcpp', 'obj-cpp', 'obj_cpp', 'objectivecpp', 'objc++', 'obj-c++', 'obj_c++', 'objectivec++' filenames '*.mm', '*.h' mimetypes 'text/x-objective-c++', 'application/x-objective-c++' prepend :statements do rule %r/(\.)(class)/ do groups(Operator, Name::Builtin::Pseudo) end rule %r/(@selector)(\()(class)(\))/ do groups(Keyword, Punctuation, Name::Builtin::Pseudo, Punctuation) end end end end end rouge-3.28.0/lib/rouge/lexers/ocaml.rb000066400000000000000000000034501417417255300175510ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'ocaml/common.rb' class OCaml < OCamlCommon title "OCaml" desc 'Objective Caml (ocaml.org)' tag 'ocaml' filenames '*.ml', '*.mli', '*.mll', '*.mly' mimetypes 'text/x-ocaml' def self.keywords @keywords ||= super + Set.new(%w( match raise )) end state :root do rule %r/\s+/m, Text rule %r/false|true|[(][)]|\[\]/, Name::Builtin::Pseudo rule %r/#{@@upper_id}(?=\s*[.])/, Name::Namespace, :dotted rule %r/`#{@@id}/, Name::Tag rule @@upper_id, Name::Class rule %r/[(][*](?![)])/, Comment, :comment rule @@id do |m| match = m[0] if self.class.keywords.include? match token Keyword elsif self.class.word_operators.include? match token Operator::Word elsif self.class.primitives.include? match token Keyword::Type else token Name end end rule %r/[(){}\[\];]+/, Punctuation rule @@operator, Operator rule %r/-?\d[\d_]*(.[\d_]*)?(e[+-]?\d[\d_]*)/i, Num::Float rule %r/0x\h[\h_]*/i, Num::Hex rule %r/0o[0-7][0-7_]*/i, Num::Oct rule %r/0b[01][01_]*/i, Num::Bin rule %r/\d[\d_]*/, Num::Integer rule %r/'(?:(\\[\\"'ntbr ])|(\\[0-9]{3})|(\\x\h{2}))'/, Str::Char rule %r/'[.]'/, Str::Char rule %r/'/, Keyword rule %r/"/, Str::Double, :string rule %r/[~?]#{@@id}/, Name::Variable end state :comment do rule %r/[^(*)]+/, Comment rule(/[(][*]/) { token Comment; push } rule %r/[*][)]/, Comment, :pop! rule %r/[(*)]/, Comment end end end end rouge-3.28.0/lib/rouge/lexers/ocaml/000077500000000000000000000000001417417255300172225ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/lexers/ocaml/common.rb000066400000000000000000000027651417417255300210510ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers # shared states with Reasonml and ReScript class OCamlCommon < RegexLexer def self.keywords @keywords ||= Set.new %w( as assert begin class constraint do done downto else end exception external false for fun function functor if in include inherit initializer lazy let module mutable new nonrec object of open rec sig struct then to true try type val virtual when while with ) end def self.word_operators @word_operators ||= Set.new %w(and asr land lor lsl lxor mod or) end def self.primitives @primitives ||= Set.new %w(unit int float bool string char list array) end @@operator = %r([;,_!$%&*+./:<=>?@^|~#-]+) @@id = /[a-z_][\w']*/i @@upper_id = /[A-Z][\w']*/ state :string do rule %r/[^\\"]+/, Str::Double mixin :escape_sequence rule %r/\\\n/, Str::Double rule %r/"/, Str::Double, :pop! end state :escape_sequence do rule %r/\\[\\"'ntbr]/, Str::Escape rule %r/\\\d{3}/, Str::Escape rule %r/\\x\h{2}/, Str::Escape end state :dotted do rule %r/\s+/m, Text rule %r/[.]/, Punctuation rule %r/#{@@upper_id}(?=\s*[.])/, Name::Namespace rule @@upper_id, Name::Class, :pop! rule @@id, Name, :pop! rule %r/[({\[]/, Punctuation, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/ocl.rb000066400000000000000000000053231417417255300172340ustar00rootroot00000000000000module Rouge module Lexers class OCL < RegexLexer title "OCL" desc "OMG Object Constraint Language (omg.org/spec/OCL)" tag 'ocl' aliases 'OCL' filenames '*.ocl' mimetypes 'text/x-ocl' def self.keywords @keywords ||= Set.new %w( context pre post inv init body def derive if then else endif import package endpackage let in ) end def self.keywords_type @keywords_type ||= Set.new %w( Boolean Integer UnlimitedNatural Real String OrderedSet Tuple Bag Set Sequence OclInvalid OclVoid TupleType OclState Collection OclMessage ) end def self.builtins @builtins ||= Set.new %w( self null result true false invalid @pre ) end def self.operators @operators ||= Set.new %w( or xor and not implies ) end def self.functions @functions ||= Set.new %w( oclAsSet oclIsNew oclIsUndefined oclIsInvalid oclAsType oclIsTypeOf oclIsKindOf oclInState oclType oclLocale hasReturned result isSignalSent isOperationCallabs floor round max min toString div mod size substring concat toInteger toReal toUpperCase toLowerCase indexOf equalsIgnoreCase at characters toBoolean includes excludes count includesAll excludesAll isEmpty notEmpty sum product selectByKind selectByType asBag asSequence asOrderedSet asSet flatten union intersection including excluding symmetricDifferencecount append prepend insertAt subOrderedSet first last reverse subSequence any closure collect collectNested exists forAll isUnique iterate one reject select sortedBy allInstances average conformsTo ) end state :single_string do rule %r/\\./, Str::Escape rule %r/'/, Str::Single, :pop! rule %r/[^\\']+/, Str::Single end state :root do rule %r/\s+/m, Text rule %r/--.*/, Comment::Single rule %r/\d+/, Num::Integer rule %r/'/, Str::Single, :single_string rule %r([->|+*/<>=~!@#%&|?^-]), Operator rule %r/[;:()\[\],.]/, Punctuation rule %r/\w[\w\d]*/ do |m| if self.class.operators.include? m[0] token Operator elsif self.class.keywords_type.include? m[0] token Keyword::Declaration elsif self.class.keywords.include? m[0] token Keyword elsif self.class.builtins.include? m[0] token Name::Builtin elsif self.class.functions.include? m[0] token Name::Function else token Name end end end end end end rouge-3.28.0/lib/rouge/lexers/openedge.rb000066400000000000000000000644511417417255300202540ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class OpenEdge < RegexLexer tag 'openedge' filenames '*.w', '*.i' mimetypes 'text/x-openedge' title "OpenEdge ABL" desc "The OpenEdge ABL programming language" # optional comment or whitespace ws = %r((?:\s|//.*?\n|/[*].*?[*]/)+) id = /[a-zA-Z_&{}][a-zA-Z0-9_\-&}]*/ def self.keywords @keywords ||= Set.new %w( &ELSE &ELSEIF &ENDIF &GLOB &GLOBAL-DEFINE &IF &MESSAGE &SCOP &SCOPED-DEFINE &THEN &UNDEF &UNDEFINE &WEBSTREAM @ {&BATCH} {&BATCH-MODE} {&FILE-NAME} {&LINE-NUMBE} {&LINE-NUMBER} {&OPSYS} {&PROCESS-ARCHITECTURE} {&SEQUENCE} {&WINDOW-SYS} {&WINDOW-SYSTEM} ABS ABSOLUTE ABSTRACT ACCELERATOR ACCUM ACCUM ACCUMULATE ACTIVE-FORM ACTIVE-WINDOW ADD ADD-BUFFER ADD-CALC-COLUMN ADD-COLUMNS-FROM ADD-EVENTS-PROCEDURE ADD-FIELDS-FROM ADD-FIRST ADD-INDEX-FIELD ADD-LAST ADD-LIKE-COLUMN ADD-LIKE-FIELD ADD-LIKE-INDEX ADD-NEW-FIELD ADD-NEW-INDEX ADD-SCHEMA-LOCATION ADD-SUPER-PROCEDURE ADM-DATA ADVISE ALERT-BOX ALIAS ALL ALLOW-COLUMN-SEARCHING ALLOW-REPLICATION ALTER ALWAYS-ON-TOP AMBIG AMBIGUOUS ANALYZ ANALYZE AND ANSI-ONLY ANY ANYWHERE APPEND APPL-ALERT APPL-ALERT-BOXES APPL-CONTEXT-ID APPLICATION APPLY APPSERVER-INFO APPSERVER-PASSWORD APPSERVER-USERID ARRAY-MESSAGE AS ASC ASCENDING ASK-OVERWRITE ASSEMBLY ASSIGN ASYNCHRONOUS ASYNC-REQUEST-COUNT ASYNC-REQUEST-HANDLE AT ATTACHED-PAIRLIST ATTR ATTR-SPACE AUDIT-CONTROL AUDIT-ENABLED AUDIT-EVENT-CONTEXT AUDIT-POLICY AUTHENTICATION-FAILED AUTHORIZATION AUTO-COMP AUTO-COMPLETION AUTO-ENDKEY AUTO-END-KEY AUTO-GO AUTO-IND AUTO-INDENT AUTOMATIC AUTO-RESIZE AUTO-RET AUTO-RETURN AUTO-SYNCHRONIZE AUTO-Z AUTO-ZAP AVAIL AVAILABLE AVAILABLE-FORMATS AVE AVERAGE AVG BACK BACKGROUND BACKWARD BACKWARDS BASE64-DECODE BASE64-ENCODE BASE-ADE BASE-KEY BATCH BATCH-MODE BATCH-SIZE BEFORE-H BEFORE-HIDE BEGIN-EVENT-GROUP BEGINS BELL BETWEEN BGC BGCOLOR BIG-ENDIAN BINARY BIND BIND-WHERE BLANK BLOCK-ITERATION-DISPLAY BLOCK-LEV BLOCK-LEVEL BORDER-B BORDER-BOTTOM-CHARS BORDER-BOTTOM-P BORDER-BOTTOM-PIXELS BORDER-L BORDER-LEFT-CHARS BORDER-LEFT-P BORDER-LEFT-PIXELS BORDER-R BORDER-RIGHT-CHARS BORDER-RIGHT-P BORDER-RIGHT-PIXELS BORDER-T BORDER-TOP-CHARS BORDER-TOP-P BORDER-TOP-PIXELS BOX BOX-SELECT BOX-SELECTABLE BREAK BROWSE BUFFER BUFFER-CHARS BUFFER-COMPARE BUFFER-COPY BUFFER-CREATE BUFFER-DELETE BUFFER-FIELD BUFFER-HANDLE BUFFER-LINES BUFFER-NAME BUFFER-PARTITION-ID BUFFER-RELEASE BUFFER-VALUE BUTTON BUTTON BUTTONS BY BY-POINTER BY-VARIANT-POINTER CACHE CACHE-SIZE CALL CALL-NAME CALL-TYPE CANCEL-BREAK CANCEL-BUTTON CAN-CREATE CAN-DELETE CAN-DO CAN-DO-DOMAIN-SUPPORT CAN-FIND CAN-QUERY CAN-READ CAN-SET CAN-WRITE CAPS CAREFUL-PAINT CASE CASE-SEN CASE-SENSITIVE CAST CATCH CDECL CENTER CENTERED CHAINED CHARACTER_LENGTH CHARSET CHECK CHECKED CHOOSE CHR CLASS CLASS-TYPE CLEAR CLEAR-APPL-CONTEXT CLEAR-LOG CLEAR-SELECT CLEAR-SELECTION CLEAR-SORT-ARROW CLEAR-SORT-ARROWS CLIENT-CONNECTION-ID CLIENT-PRINCIPAL CLIENT-TTY CLIENT-TYPE CLIENT-WORKSTATION CLIPBOARD CLOSE CLOSE-LOG CODE CODEBASE-LOCATOR CODEPAGE CODEPAGE-CONVERT COL COLLATE COL-OF COLON COLON-ALIGN COLON-ALIGNED COLOR COLOR-TABLE COLUMN COLUMN-BGCOLOR COLUMN-DCOLOR COLUMN-FGCOLOR COLUMN-FONT COLUMN-LAB COLUMN-LABEL COLUMN-MOVABLE COLUMN-OF COLUMN-PFCOLOR COLUMN-READ-ONLY COLUMN-RESIZABLE COLUMNS COLUMN-SCROLLING COMBO-BOX COM-HANDLE COMMAND COMPARES COMPILE COMPILER COMPLETE COM-SELF CONFIG-NAME CONNECT CONNECTED CONSTRUCTOR CONTAINS CONTENTS CONTEXT CONTEXT-HELP CONTEXT-HELP-FILE CONTEXT-HELP-ID CONTEXT-POPUP CONTROL CONTROL-BOX CONTROL-FRAME CONVERT CONVERT-3D-COLORS CONVERT-TO-OFFS CONVERT-TO-OFFSET COPY-DATASET COPY-LOB COPY-SAX-ATTRIBUTES COPY-TEMP-TABLE COUNT COUNT-OF CPCASE CPCOLL CPINTERNAL CPLOG CPPRINT CPRCODEIN CPRCODEOUT CPSTREAM CPTERM CRC-VALUE CREATE CREATE-LIKE CREATE-LIKE-SEQUENTIAL CREATE-NODE-NAMESPACE CREATE-RESULT-LIST-ENTRY CREATE-TEST-FILE CURRENT CURRENT_DATE CURRENT_DATE CURRENT-CHANGED CURRENT-COLUMN CURRENT-ENV CURRENT-ENVIRONMENT CURRENT-ITERATION CURRENT-LANG CURRENT-LANGUAGE CURRENT-QUERY CURRENT-REQUEST-INFO CURRENT-RESPONSE-INFO CURRENT-RESULT-ROW CURRENT-ROW-MODIFIED CURRENT-VALUE CURRENT-WINDOW CURS CURSOR CURSOR-CHAR CURSOR-LINE CURSOR-OFFSET DATABASE DATA-BIND DATA-ENTRY-RET DATA-ENTRY-RETURN DATA-REL DATA-RELATION DATASERVERS DATASET DATASET-HANDLE DATA-SOURCE DATA-SOURCE-COMPLETE-MAP DATA-SOURCE-MODIFIED DATA-SOURCE-ROWID DATA-T DATA-TYPE DATE-F DATE-FORMAT DAY DBCODEPAGE DBCOLLATION DB-CONTEXT DBNAME DBPARAM DB-REFERENCES DBREST DBRESTRICTIONS DBTASKID DBTYPE DBVERS DBVERSION DCOLOR DDE DDE-ERROR DDE-I DDE-ID DDE-ITEM DDE-NAME DDE-TOPIC DEBLANK DEBU DEBUG DEBUG-ALERT DEBUGGER DEBUG-LIST DECIMALS DECLARE DECLARE-NAMESPACE DECRYPT DEF DEFAULT DEFAULT-BUFFER-HANDLE DEFAULT-BUTTON DEFAULT-COMMIT DEFAULT-EX DEFAULT-EXTENSION DEFAULT-NOXL DEFAULT-NOXLATE DEFAULT-VALUE DEFAULT-WINDOW DEFAUT-B DEFINE DEFINED DEFINE-USER-EVENT-MANAGER DEL DELEGATE DELETE DELETE PROCEDURE DELETE-CHAR DELETE-CURRENT-ROW DELETE-LINE DELETE-RESULT-LIST-ENTRY DELETE-SELECTED-ROW DELETE-SELECTED-ROWS DELIMITER DESC DESCENDING DESELECT-FOCUSED-ROW DESELECTION DESELECT-ROWS DESELECT-SELECTED-ROW DESTRUCTOR DIALOG-BOX DICT DICTIONARY DIR DISABLE DISABLE-AUTO-ZAP DISABLED DISABLE-DUMP-TRIGGERS DISABLE-LOAD-TRIGGERS DISCON DISCONNECT DISP DISPLAY DISPLAY-MESSAGE DISPLAY-T DISPLAY-TYPE DISTINCT DO DOMAIN-DESCRIPTION DOMAIN-NAME DOMAIN-TYPE DOS DOUBLE DOWN DRAG-ENABLED DROP DROP-DOWN DROP-DOWN-LIST DROP-FILE-NOTIFY DROP-TARGET ds-close-cursor DSLOG-MANAGER DUMP DYNAMIC DYNAMIC-ENUM DYNAMIC-FUNCTION DYNAMIC-INVOKE EACH ECHO EDGE EDGE-CHARS EDGE-P EDGE-PIXELS EDIT-CAN-PASTE EDIT-CAN-UNDO EDIT-CLEAR EDIT-COPY EDIT-CUT EDITING EDITOR EDIT-PASTE EDIT-UNDO ELSE EMPTY EMPTY-TEMP-TABLE ENABLE ENABLED-FIELDS ENCODE ENCRYPT ENCRYPT-AUDIT-MAC-KEY ENCRYPTION-SALT END END-DOCUMENT END-ELEMENT END-EVENT-GROUP END-FILE-DROP ENDKEY END-KEY END-MOVE END-RESIZE END-ROW-RESIZE END-USER-PROMPT ENTERED ENTITY-EXPANSION-LIMIT ENTRY ENUM EQ ERROR ERROR-COL ERROR-COLUMN ERROR-ROW ERROR-STACK-TRACE ERROR-STAT ERROR-STATUS ESCAPE ETIME EVENT EVENT-GROUP-ID EVENT-PROCEDURE EVENT-PROCEDURE-CONTEXT EVENTS EVENT-T EVENT-TYPE EXCEPT EXCLUSIVE EXCLUSIVE-ID EXCLUSIVE-LOCK EXCLUSIVE-WEB-USER EXECUTE EXISTS EXP EXPAND EXPANDABLE EXPLICIT EXPORT EXPORT-PRINCIPAL EXTENDED EXTENT EXTERNAL FALSE FETCH FETCH-SELECTED-ROW FGC FGCOLOR FIELD FIELD FIELDS FILE FILE-CREATE-DATE FILE-CREATE-TIME FILE-INFO FILE-INFORMATION FILE-MOD-DATE FILE-MOD-TIME FILENAME FILE-NAME FILE-OFF FILE-OFFSET FILE-SIZE FILE-TYPE FILL FILLED FILL-IN FILTERS FINAL FINALLY FIND FIND-BY-ROWID FIND-CASE-SENSITIVE FIND-CURRENT FINDER FIND-FIRST FIND-GLOBAL FIND-LAST FIND-NEXT-OCCURRENCE FIND-PREV-OCCURRENCE FIND-SELECT FIND-UNIQUE FIND-WRAP-AROUND FIRST FIRST-ASYNCH-REQUEST FIRST-CHILD FIRST-COLUMN FIRST-FORM FIRST-OBJECT FIRST-OF FIRST-PROC FIRST-PROCEDURE FIRST-SERVER FIRST-TAB-I FIRST-TAB-ITEM FIT-LAST-COLUMN FIXED-ONLY FLAT-BUTTON FLOAT FOCUS FOCUSED-ROW FOCUSED-ROW-SELECTED FONT FONT-TABLE FOR FORCE-FILE FORE FOREGROUND FORM FORMAT FORMATTE FORMATTED FORM-LONG-INPUT FORWARD FORWARD FORWARDS FRAGMEN FRAGMENT FRAM FRAME FRAME-COL FRAME-DB FRAME-DOWN FRAME-FIELD FRAME-FILE FRAME-INDE FRAME-INDEX FRAME-LINE FRAME-NAME FRAME-ROW FRAME-SPA FRAME-SPACING FRAME-VAL FRAME-VALUE FRAME-X FRAME-Y FREQUENCY FROM FROM-C FROM-CHARS FROM-CUR FROM-CURRENT FROM-P FROM-PIXELS FULL-HEIGHT FULL-HEIGHT-CHARS FULL-HEIGHT-P FULL-HEIGHT-PIXELS FULL-PATHN FULL-PATHNAME FULL-WIDTH FULL-WIDTH-CHARS FULL-WIDTH-P FULL-WIDTH-PIXELS FUNCTION FUNCTION-CALL-TYPE GATEWAY GATEWAYS GE GENERATE-MD5 GENERATE-PBE-KEY GENERATE-PBE-SALT GENERATE-RANDOM-KEY GENERATE-UUID GET GET-ATTR-CALL-TYPE GET-ATTRIBUTE-NODE GET-BINARY-DATA GET-BLUE GET-BLUE-VALUE GET-BROWSE-COLUMN GET-BUFFER-HANDLE GETBYTE GET-BYTE GET-CALLBACK-PROC-CONTEXT GET-CALLBACK-PROC-NAME GET-CGI-LIST GET-CGI-LONG-VALUE GET-CGI-VALUE GET-CLASS GET-CODEPAGES GET-COLLATIONS GET-CONFIG-VALUE GET-CURRENT GET-DOUBLE GET-DROPPED-FILE GET-DYNAMIC GET-ERROR-COLUMN GET-ERROR-ROW GET-FILE GET-FILE-NAME GET-FILE-OFFSE GET-FILE-OFFSET GET-FIRST GET-FLOAT GET-GREEN GET-GREEN-VALUE GET-INDEX-BY-NAMESPACE-NAME GET-INDEX-BY-QNAME GET-INT64 GET-ITERATION GET-KEY-VAL GET-KEY-VALUE GET-LAST GET-LOCALNAME-BY-INDEX GET-LONG GET-MESSAGE GET-NEXT GET-NUMBER GET-POINTER-VALUE GET-PREV GET-PRINTERS GET-PROPERTY GET-QNAME-BY-INDEX GET-RED GET-RED-VALUE GET-REPOSITIONED-ROW GET-RGB-VALUE GET-SELECTED GET-SELECTED-WIDGET GET-SHORT GET-SIGNATURE GET-SIZE GET-STRING GET-TAB-ITEM GET-TEXT-HEIGHT GET-TEXT-HEIGHT-CHARS GET-TEXT-HEIGHT-P GET-TEXT-HEIGHT-PIXELS GET-TEXT-WIDTH GET-TEXT-WIDTH-CHARS GET-TEXT-WIDTH-P GET-TEXT-WIDTH-PIXELS GET-TYPE-BY-INDEX GET-TYPE-BY-NAMESPACE-NAME GET-TYPE-BY-QNAME GET-UNSIGNED-LONG GET-UNSIGNED-SHORT GET-URI-BY-INDEX GET-VALUE-BY-INDEX GET-VALUE-BY-NAMESPACE-NAME GET-VALUE-BY-QNAME GET-WAIT-STATE GLOBAL GO-ON GO-PEND GO-PENDING GRANT GRAPHIC-E GRAPHIC-EDGE GRID-FACTOR-H GRID-FACTOR-HORIZONTAL GRID-FACTOR-V GRID-FACTOR-VERTICAL GRID-SNAP GRID-UNIT-HEIGHT GRID-UNIT-HEIGHT-CHARS GRID-UNIT-HEIGHT-P GRID-UNIT-HEIGHT-PIXELS GRID-UNIT-WIDTH GRID-UNIT-WIDTH-CHARS GRID-UNIT-WIDTH-P GRID-UNIT-WIDTH-PIXELS GRID-VISIBLE GROUP GT GUID HANDLER HAS-RECORDS HAVING HEADER HEIGHT HEIGHT HEIGHT-CHARS HEIGHT-P HEIGHT-P HEIGHT-PIXELS HELP HEX-DECODE HEX-ENCODE HIDDEN HIDE HORI HORIZONTAL HOST-BYTE-ORDER HTML-CHARSET HTML-END-OF-LINE HTML-END-OF-PAGE HTML-FRAME-BEGIN HTML-FRAME-END HTML-HEADER-BEGIN HTML-HEADER-END HTML-TITLE-BEGIN HTML-TITLE-END HWND ICON IF IMAGE IMAGE-DOWN IMAGE-INSENSITIVE IMAGE-SIZE IMAGE-SIZE-C IMAGE-SIZE-CHARS IMAGE-SIZE-P IMAGE-SIZE-PIXELS IMAGE-UP IMMEDIATE-DISPLAY IMPLEMENTS IMPORT IMPORT-PRINCIPAL IN INCREMENT-EXCLUSIVE-ID INDEX INDEXED-REPOSITION INDEX-HINT INDEX-INFORMATION INDICATOR INFO INFORMATION IN-HANDLE INHERIT-BGC INHERIT-BGCOLOR INHERIT-FGC INHERIT-FGCOLOR INHERITS INIT INITIAL INITIAL-DIR INITIAL-FILTER INITIALIZE-DOCUMENT-TYPE INITIATE INNER-CHARS INNER-LINES INPUT INPUT-O INPUT-OUTPUT INPUT-VALUE INSERT INSERT-ATTRIBUTE INSERT-B INSERT-BACKTAB INSERT-FILE INSERT-ROW INSERT-STRING INSERT-T INSERT-TAB INTERFACE INTERNAL-ENTRIES INTO INVOKE IS IS-ATTR IS-ATTR IS-ATTR-SPACE IS-CLAS IS-CLASS IS-JSON IS-LEAD-BYTE IS-OPEN IS-PARAMETER-SET IS-PARTITIONE IS-PARTITIONED IS-ROW-SELECTED IS-SELECTED IS-XML ITEM ITEMS-PER-ROW JOIN JOIN-BY-SQLDB KBLABEL KEEP-CONNECTION-OPEN KEEP-FRAME-Z KEEP-FRAME-Z-ORDER KEEP-MESSAGES KEEP-SECURITY-CACHE KEEP-TAB-ORDER KEY KEYCODE KEY-CODE KEYFUNC KEY-FUNC KEYFUNCTION KEY-FUNCTION KEYLABEL KEY-LABEL KEYS KEYWORD KEYWORD-ALL LABEL LABEL-BGC LABEL-BGCOLOR LABEL-DC LABEL-DCOLOR LABEL-FGC LABEL-FGCOLOR LABEL-FONT LABEL-PFC LABEL-PFCOLOR LABELS LABELS-HAVE-COLONS LANDSCAPE LANGUAGE LANGUAGES LARGE LARGE-TO-SMALL LAST LAST-ASYNCH-REQUEST LAST-BATCH LAST-CHILD LAST-EVEN LAST-EVENT LAST-FORM LASTKEY LAST-KEY LAST-OBJECT LAST-OF LAST-PROCE LAST-PROCEDURE LAST-SERVER LAST-TAB-I LAST-TAB-ITEM LC LDBNAME LE LEAVE LEFT-ALIGN LEFT-ALIGNED LEFT-TRIM LENGTH LIBRARY LIKE LIKE-SEQUENTIAL LINE LINE-COUNT LINE-COUNTER LIST-EVENTS LISTI LISTING LIST-ITEM-PAIRS LIST-ITEMS LIST-PROPERTY-NAMES LIST-QUERY-ATTRS LIST-SET-ATTRS LIST-WIDGETS LITERAL-QUESTION LITTLE-ENDIAN LOAD LOAD-DOMAINS LOAD-ICON LOAD-IMAGE LOAD-IMAGE-DOWN LOAD-IMAGE-INSENSITIVE LOAD-IMAGE-UP LOAD-MOUSE-P LOAD-MOUSE-POINTER LOAD-PICTURE LOAD-SMALL-ICON LOCAL-NAME LOCAL-VERSION-INFO LOCATOR-COLUMN-NUMBER LOCATOR-LINE-NUMBER LOCATOR-PUBLIC-ID LOCATOR-SYSTEM-ID LOCATOR-TYPE LOCKED LOCK-REGISTRATION LOG LOG-AUDIT-EVENT LOGIN-EXPIRATION-TIMESTAMP LOGIN-HOST LOGIN-STATE LOG-MANAGER LOGOUT LOOKAHEAD LOOKUP LT MACHINE-CLASS MANDATORY MANUAL-HIGHLIGHT MAP MARGIN-EXTRA MARGIN-HEIGHT MARGIN-HEIGHT-CHARS MARGIN-HEIGHT-P MARGIN-HEIGHT-PIXELS MARGIN-WIDTH MARGIN-WIDTH-CHARS MARGIN-WIDTH-P MARGIN-WIDTH-PIXELS MARK-NEW MARK-ROW-STATE MATCHES MAX MAX MAX-BUTTON MAX-CHARS MAX-DATA-GUESS MAX-HEIGHT MAX-HEIGHT-C MAX-HEIGHT-CHARS MAX-HEIGHT-P MAX-HEIGHT-PIXELS MAXIMIZE MAXIMUM MAXIMUM-LEVEL MAX-ROWS MAX-SIZE MAX-VAL MAX-VALUE MAX-WIDTH MAX-WIDTH MAX-WIDTH-CHARS MAX-WIDTH-P MAX-WIDTH-PIXELS MD5-DIGEST MEMBER MEMPTR-TO-NODE-VALUE MENU MENUBAR MENU-BAR MENU-ITEM MENU-K MENU-KEY MENU-M MENU-MOUSE MERGE-BY-FIELD MESSAGE MESSAGE-AREA MESSAGE-AREA-FONT MESSAGE-LINES METHOD MIN MIN MIN-BUTTON MIN-COLUMN-WIDTH-C MIN-COLUMN-WIDTH-CHARS MIN-COLUMN-WIDTH-P MIN-COLUMN-WIDTH-PIXELS MIN-HEIGHT MIN-HEIGHT-CHARS MIN-HEIGHT-P MIN-HEIGHT-PIXELS MINIMUM MIN-SIZE MIN-VAL MIN-VALUE MIN-WIDTH MIN-WIDTH-CHARS MIN-WIDTH-P MIN-WIDTH-PIXELS MOD MODIFIED MODULO MONTH MOUSE MOUSE-P MOUSE-POINTER MOVABLE MOVE-AFTER MOVE-AFTER-TAB-ITEM MOVE-BEFOR MOVE-BEFORE-TAB-ITEM MOVE-COL MOVE-COLUMN MOVE-TO-B MOVE-TO-BOTTOM MOVE-TO-EOF MOVE-TO-T MOVE-TO-TOP MPE MTIME MULTI-COMPILE MULTIPLE MULTIPLE-KEY MULTITASKING-INTERVAL MUST-EXIST NAME NAMESPACE-PREFIX NAMESPACE-URI NATIVE NE NEEDS-APPSERVER-PROMPT NEEDS-PROMPT NEW NEW-INSTANCE NEW-ROW NEXT NEXT-COLUMN NEXT-PROMPT NEXT-ROWID NEXT-SIBLING NEXT-TAB-I NEXT-TAB-ITEM NEXT-VALUE NO NO-APPLY NO-ARRAY-MESSAGE NO-ASSIGN NO-ATTR NO-ATTR NO-ATTR-LIST NO-ATTR-SPACE NO-AUTO-VALIDATE NO-BIND-WHERE NO-BOX NO-CONSOLE NO-CONVERT NO-CONVERT-3D-COLORS NO-CURRENT-VALUE NO-DEBUG NODE-VALUE-TO-MEMPTR NO-DRAG NO-ECHO NO-EMPTY-SPACE NO-ERROR NO-F NO-FILL NO-FOCUS NO-HELP NO-HIDE NO-INDEX-HINT NO-INHERIT-BGC NO-INHERIT-BGCOLOR NO-INHERIT-FGC NO-INHERIT-FGCOLOR NO-JOIN-BY-SQLDB NO-LABEL NO-LABELS NO-LOBS NO-LOCK NO-LOOKAHEAD NO-MAP NO-MES NO-MESSAGE NONAMESPACE-SCHEMA-LOCATION NONE NO-PAUSE NO-PREFE NO-PREFETCH NORMALIZE NO-ROW-MARKERS NO-SCROLLBAR-VERTICAL NO-SEPARATE-CONNECTION NO-SEPARATORS NOT NO-TAB-STOP NOT-ACTIVE NO-UND NO-UNDERLINE NO-UNDO NO-VAL NO-VALIDATE NOW NO-WAIT NO-WORD-WRAP NULL NUM-ALI NUM-ALIASES NUM-BUFFERS NUM-BUT NUM-BUTTONS NUM-COL NUM-COLUMNS NUM-COPIES NUM-DBS NUM-DROPPED-FILES NUM-ENTRIES NUMERIC NUMERIC-F NUMERIC-FORMAT NUM-FIELDS NUM-FORMATS NUM-ITEMS NUM-ITERATIONS NUM-LINES NUM-LOCKED-COL NUM-LOCKED-COLUMNS NUM-MESSAGES NUM-PARAMETERS NUM-REFERENCES NUM-REPLACED NUM-RESULTS NUM-SELECTED NUM-SELECTED-ROWS NUM-SELECTED-WIDGETS NUM-TABS NUM-TO-RETAIN NUM-VISIBLE-COLUMNS OBJECT OCTET-LENGTH OF OFF OK OK-CANCEL OLD ON ON-FRAME ON-FRAME-BORDER OPEN OPSYS OPTION OR ORDERED-JOIN ORDINAL OS-APPEND OS-COMMAND OS-COPY OS-CREATE-DIR OS-DELETE OS-DIR OS-DRIVE OS-DRIVES OS-ERROR OS-GETENV OS-RENAME OTHERWISE OUTPUT OVERLAY OVERRIDE OWNER PAGE PAGE-BOT PAGE-BOTTOM PAGED PAGE-NUM PAGE-NUMBER PAGE-SIZE PAGE-TOP PAGE-WID PAGE-WIDTH PARAM PARAMETER PARENT PARSE-STATUS PARTIAL-KEY PASCAL PASSWORD-FIELD PATHNAME PAUSE PBE-HASH-ALG PBE-HASH-ALGORITHM PBE-KEY-ROUNDS PDBNAME PERSIST PERSISTENT PERSISTENT-CACHE-DISABLED PFC PFCOLOR PIXELS PIXELS-PER-COL PIXELS-PER-COLUMN PIXELS-PER-ROW POPUP-M POPUP-MENU POPUP-O POPUP-ONLY PORTRAIT POSITION PRECISION PREFER-DATASET PREPARED PREPARE-STRING PREPROC PREPROCESS PRESEL PRESELECT PREV PREV-COLUMN PREV-SIBLING PREV-TAB-I PREV-TAB-ITEM PRIMARY PRINTER PRINTER-CONTROL-HANDLE PRINTER-HDC PRINTER-NAME PRINTER-PORT PRINTER-SETUP PRIVATE PRIVATE-D PRIVATE-DATA PRIVILEGES PROCE PROCEDURE PROCEDURE-CALL-TYPE PROCEDURE-TYPE PROCESS PROC-HA PROC-HANDLE PROC-ST PROC-STATUS proc-text proc-text-buffer PROFILER PROGRAM-NAME PROGRESS PROGRESS-S PROGRESS-SOURCE PROMPT PROMPT-F PROMPT-FOR PROMSGS PROPATH PROPERTY PROTECTED PROVERS PROVERSION PROXY PROXY-PASSWORD PROXY-USERID PUBLIC PUBLIC-ID PUBLISH PUBLISHED-EVENTS PUT PUTBYTE PUT-BYTE PUT-DOUBLE PUT-FLOAT PUT-INT64 PUT-KEY-VAL PUT-KEY-VALUE PUT-LONG PUT-SHORT PUT-STRING PUT-UNSIGNED-LONG QUERY QUERY-CLOSE QUERY-OFF-END QUERY-OPEN QUERY-PREPARE QUERY-TUNING QUESTION QUIT QUOTER RADIO-BUTTONS RADIO-SET RANDOM RAW-TRANSFER RCODE-INFO RCODE-INFORMATION READ-AVAILABLE READ-EXACT-NUM READ-FILE READ-JSON READKEY READ-ONLY READ-XML REAL RECORD-LENGTH RECT RECTANGLE RECURSIVE REFERENCE-ONLY REFRESH REFRESHABLE REFRESH-AUDIT-POLICY REGISTER-DOMAIN RELEASE REMOTE REMOVE-EVENTS-PROCEDURE REMOVE-SUPER-PROCEDURE REPEAT REPLACE REPLACE-SELECTION-TEXT REPOSITION REPOSITION-BACKWARD REPOSITION-FORWARD REPOSITION-MODE REPOSITION-TO-ROW REPOSITION-TO-ROWID REQUEST REQUEST-INFO RESET RESIZA RESIZABLE RESIZE RESPONSE-INFO RESTART-ROW RESTART-ROWID RETAIN RETAIN-SHAPE RETRY RETRY-CANCEL RETURN RETURN-ALIGN RETURN-INS RETURN-INSERTED RETURNS RETURN-TO-START-DI RETURN-TO-START-DIR RETURN-VAL RETURN-VALUE RETURN-VALUE-DATA-TYPE REVERSE-FROM REVERT REVOKE RGB-VALUE RIGHT-ALIGNED RIGHT-TRIM R-INDEX ROLES ROUND ROUTINE-LEVEL ROW ROW-HEIGHT-CHARS ROW-HEIGHT-PIXELS ROW-MARKERS ROW-OF ROW-RESIZABLE RULE RUN RUN-PROCEDURE SAVE SAVE CACHE SAVE-AS SAVE-FILE SAX-COMPLE SAX-COMPLETE SAX-PARSE SAX-PARSE-FIRST SAX-PARSE-NEXT SAX-PARSER-ERROR SAX-RUNNING SAX-UNINITIALIZED SAX-WRITE-BEGIN SAX-WRITE-COMPLETE SAX-WRITE-CONTENT SAX-WRITE-ELEMENT SAX-WRITE-ERROR SAX-WRITE-IDLE SAX-WRITER SAX-WRITE-TAG SCHEMA SCHEMA-LOCATION SCHEMA-MARSHAL SCHEMA-PATH SCREEN SCREEN-IO SCREEN-LINES SCREEN-VAL SCREEN-VALUE SCROLL SCROLLABLE SCROLLBAR-H SCROLLBAR-HORIZONTAL SCROLL-BARS SCROLLBAR-V SCROLLBAR-VERTICAL SCROLL-DELTA SCROLLED-ROW-POS SCROLLED-ROW-POSITION SCROLLING SCROLL-OFFSET SCROLL-TO-CURRENT-ROW SCROLL-TO-I SCROLL-TO-ITEM SCROLL-TO-SELECTED-ROW SDBNAME SEAL SEAL-TIMESTAMP SEARCH SEARCH-SELF SEARCH-TARGER SECTION SECURITY-POLICY SEEK SELECT SELECTABLE SELECT-ALL SELECTED SELECT-FOCUSED-ROW SELECTION SELECTION-END SELECTION-LIST SELECTION-START SELECTION-TEXT SELECT-NEXT-ROW SELECT-PREV-ROW SELECT-ROW SELF SEND send-sql send-sql-statement SENSITIVE SEPARATE-CONNECTION SEPARATOR-FGCOLOR SEPARATORS SERIALIZABLE SERIALIZE-HIDDEN SERIALIZE-NAME SERVER SERVER-CONNECTION-BOUND SERVER-CONNECTION-BOUND-REQUEST SERVER-CONNECTION-CONTEXT SERVER-CONNECTION-ID SERVER-OPERATING-MODE SESSION SESSION-IDSET SET-APPL-CONTEXT SET-ATTR-CALL-TYPE SET-ATTRIBUTE-NODE SET-BLUE SET-BLUE-VALUE SET-BREAK SET-BUFFERS SET-CALLBACK SET-CLIENT SET-COMMIT SET-CONTENTS SET-CURRENT-VALUE SET-DB-CLIENT SET-DYNAMIC SET-EVENT-MANAGER-OPTION SET-GREEN SET-GREEN-VALUE SET-INPUT-SOURCE SET-OPTION SET-OUTPUT-DESTINATION SET-PARAMETER SET-POINTER-VALUE SET-PROPERTY SET-RED SET-RED-VALUE SET-REPOSITIONED-ROW SET-RGB-VALUE SET-ROLLBACK SET-SELECTION SET-SIZE SET-SORT-ARROW SETUSER SETUSERID SET-WAIT-STATE SHA1-DIGEST SHARE SHARED SHARE-LOCK SHOW-IN-TASKBAR SHOW-STAT SHOW-STATS SIDE-LAB SIDE-LABEL-H SIDE-LABEL-HANDLE SIDE-LABELS SIGNATURE SILENT SIMPLE SINGLE SINGLE-RUN SINGLETON SIZE SIZE-C SIZE-CHARS SIZE-P SIZE-PIXELS SKIP SKIP-DELETED-RECORD SLIDER SMALL-ICON SMALLINT SMALL-TITLE SOME SORT SORT-ASCENDING SORT-NUMBER SOURCE SOURCE-PROCEDURE SPACE SQL SQRT SSL-SERVER-NAME STANDALONE START START-DOCUMENT START-ELEMENT START-MOVE START-RESIZE START-ROW-RESIZE STATE-DETAIL STATIC STATUS STATUS-AREA STATUS-AREA-FONT STDCALL STOP STOP-AFTER STOP-PARSING STOPPE STOPPED STORED-PROC STORED-PROCEDURE STREAM STREAM-HANDLE STREAM-IO STRETCH-TO-FIT STRICT STRICT-ENTITY-RESOLUTION STRING STRING-VALUE STRING-XREF SUB- SUB-AVE SUB-AVERAGE SUB-COUNT SUB-MAXIMUM SUB-MENU SUB-MIN SUB-MINIMUM SUBSCRIBE SUBST SUBSTITUTE SUBSTR SUBSTRING SUB-TOTAL SUBTYPE SUM SUM-MAX SUPER SUPER-PROCEDURES SUPPRESS-NAMESPACE-PROCESSING SUPPRESS-W SUPPRESS-WARNINGS SYMMETRIC-ENCRYPTION-ALGORITHM SYMMETRIC-ENCRYPTION-IV SYMMETRIC-ENCRYPTION-KEY SYMMETRIC-SUPPORT SYSTEM-ALERT SYSTEM-ALERT-BOXES SYSTEM-DIALOG SYSTEM-HELP SYSTEM-ID TABLE TABLE-HANDLE TABLE-NUMBER TABLE-SCAN TAB-POSITION TAB-STOP TARGET TARGET-PROCEDURE TEMP-DIR TEMP-DIRECTORY TEMP-TABLE TEMP-TABLE-PREPARE TERM TERMINAL TERMINATETEXT TEXT TEXT-CURSOR TEXT-SEG-GROW TEXT-SELECTED THEN THIS-OBJECT THIS-PROCEDURE THREAD-SAFE THREE-D THROUGH THROW THRU TIC-MARKS TIME TIME-SOURCE TITLE TITLE-BGC TITLE-BGCOLOR TITLE-DC TITLE-DCOLORTITLE-FGC TITLE-FGCOLOR TITLE-FO TITLE-FONT TO TODAY TOGGLE-BOX TOOLTIP TOOLTIPS TOPIC TOP-NAV-QUERY TOP-ONLY TO-ROWID TOTAL TRAILING TRANS TRANSACTION TRANSACTION-MODE TRANS-INIT-PROCEDURE TRANSPARENT TRIGGER TRIGGERS TRIM TRUE TRUNC TRUNCATE TYPE TYPE-OF UNBOX UNBUFF UNBUFFERED UNDERL UNDERLINE UNDO UNFORM UNFORMATTED UNION UNIQUE UNIQUE-ID UNIQUE-MATCH UNIX UNLESS-HIDDEN UNLOAD UNSIGNED-LONG UNSUBSCRIBE UP UPDATE UPDATE-ATTRIBUTE URL URL-DECODE URL-ENCODE URL-PASSWORD URL-USERID USE USE-DICT-EXPS USE-FILENAME USE-INDEX USER USE-REVVIDEO USERID USER-ID USE-TEXT USE-UNDERLINE USE-WIDGET-POOL USING V6DISPLAY V6FRAME VALIDATE VALIDATE-EXPRESSION VALIDATE-MESSAGE VALIDATE-SEAL VALIDATION-ENABLED VALID-EVENT VALID-HANDLE VALID-OBJECT VALUE VALUE-CHANGED VALUES VAR VARIABLE VERBOSE VERSION VERT VERTICAL VIEW VIEW-AS VIEW-FIRST-COLUMN-ON-REOPEN VIRTUAL-HEIGHT VIRTUAL-HEIGHT-CHARS VIRTUAL-HEIGHT-P VIRTUAL-HEIGHT-PIXELS VIRTUAL-WIDTH VIRTUAL-WIDTH-CHARS VIRTUAL-WIDTH-P VIRTUAL-WIDTH-PIXELS VISIBLE VOID WAIT WAIT-FOR WARNING WEB-CONTEXT WEEKDAY WHEN WHERE WHILE WIDGET WIDGET-E WIDGET-ENTER WIDGET-ID WIDGET-L WIDGET-LEAVE WIDGET-POOL WIDTH WIDTH WIDTH-CHARS WIDTH-P WIDTH-PIXELS WINDOW WINDOW-MAXIM WINDOW-MAXIMIZED WINDOW-MINIM WINDOW-MINIMIZED WINDOW-NAME WINDOW-NORMAL WINDOW-STA WINDOW-STATE WINDOW-SYSTEM WITH WORD-INDEX WORD-WRAP WORK-AREA-HEIGHT-PIXELS WORK-AREA-WIDTH-PIXELS WORK-AREA-X WORK-AREA-Y WORKFILE WORK-TAB WORK-TABLE WRITE WRITE-CDATA WRITE-CHARACTERS WRITE-COMMENT WRITE-DATA-ELEMENT WRITE-EMPTY-ELEMENT WRITE-ENTITY-REF WRITE-EXTERNAL-DTD WRITE-FRAGMENT WRITE-JSON WRITE-MESSAGE WRITE-PROCESSING-INSTRUCTION WRITE-STATUS WRITE-XML WRITE-XMLSCHEMA X XCODE XML-DATA-TYPE XML-ENTITY-EXPANSION-LIMIT XML-NODE-TYPE XML-SCHEMA-PATH XML-STRICT-ENTITY-RESOLUTION XML-SUPPRESS-NAMESPACE-PROCESSING X-OF XREF XREF-XML Y YEAR YEAR-OFFSET YES YES-NO YES-NO-CANCEL Y-OF ) end def self.keywords_type @keywords_type ||= Set.new %w( BLOB CHARACTER CHAR CLOB COM-HANDLE DATE DATETIME DATETIME-TZ DECIMAL DEC HANDLE INT64 INTEGER INT LOGICAL LONGCHAR MEMPTR RAW RECID ROWID WIDGET-HANDLE ) end state :root do rule %r(\s+), Text rule %r((\.)(\s+)) do groups Operator, Text end rule %r(//[^\n]*), Comment::Single rule %r(/[*].*?[*]/)m, Comment::Multiline rule %r/(\{?&)(\S+)/ do groups Comment::Preproc, Name::Other push :preproc end rule %r/"/, Str, :string rule %r('(\\.|\\[0-7]{1,3}|\\x[a-f0-9]{1,2}|[^\\'\n])')i, Str::Char mixin :numbers rule %r(\*/), Error rule %r([~!%^*+=\|?:<>/-]), Operator rule %r/[()\[\],]/, Punctuation rule %r/(?:TRUE|FALSE|NULL)\b/i, Keyword::Constant rule id do |m| name = m[0].upcase if self.class.keywords.include? name token Name::Builtin elsif self.class.keywords_type.include? name token Keyword::Type else token Name::Variable end end end state :numbers do rule %r((?:\d+[.]\d*|[.]\d+)(?:e[+-]?\d+[lu]*)?)i, Num::Float rule %r(\d+e[+-]?\d+[lu]*)i, Num::Float rule %r/0x[0-9a-f]+[lu]*/i, Num::Hex rule %r/0[0-7]+[lu]*/i, Num::Oct rule %r/\d+[lu]*/i, Num::Integer end state :string do rule %r/"/, Str, :pop! rule %r/\\([\\abfnrtv"']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})/, Str::Escape rule %r/[^\\"]+/, Str rule %r/\\/, Str # stray backslash end state :preproc do rule %r/\n/, Text, :pop! rule %r/\s+/, Text rule %r/({?&)(\S+)/ do groups Comment::Preproc, Name::Other end rule %r/"/, Str, :string mixin :numbers rule %r/\S+/, Name end end end end rouge-3.28.0/lib/rouge/lexers/opentype_feature_file.rb000066400000000000000000000063361417417255300230410ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class OpenTypeFeatureFile < RegexLexer title "OpenType Feature File" desc "Feature specifications for an OpenType font (adobe-type-tools.github.io/afdko)" tag 'opentype_feature_file' aliases 'fea', 'opentype', 'opentypefeature' filenames '*.fea' def self.keywords @keywords ||= %w( Ascender Attach AxisValue CapHeight CaretOffset CodePageRange DesignAxis Descender ElidedFallbackName ElidedFallbackNameID ElidableAxisValueName FeatUILabelNameID FeatUITooltipTextNameID FontRevision FSType GlyphClassDef HorizAxis.BaseScriptList HorizAxis.BaseTagList HorizAxis.MinMax IgnoreBaseGlyphs IgnoreLigatures IgnoreMarks LigatureCaretByDev LigatureCaretByIndex LigatureCaretByPos LineGap MarkAttachClass MarkAttachmentType NULL OlderSiblingFontAttribute Panose ParamUILabelNameID RightToLeft SampleTextNameID TypoAscender TypoDescender TypoLineGap UnicodeRange UseMarkFilteringSet Vendor VertAdvanceY VertAxis.BaseScriptList VertAxis.BaseTagList VertAxis.MinMax VertOriginY VertTypoAscender VertTypoDescender VertTypoLineGap WeightClass WidthClass XHeight anchorDef anchor anonymous anon by contour cursive device enumerate enum exclude_dflt featureNames feature flag from ignore include_dflt include languagesystem language location lookupflag lookup markClass mark nameid name parameters position pos required reversesub rsub script sizemenuname substitute subtable sub table useExtension valueRecordDef winAscent winDescent ) end identifier = %r/[a-z_][a-z0-9\/_.-]*/i state :root do rule %r/\s+/m, Text::Whitespace rule %r/#.*$/, Comment # feature rule %r/(anonymous|anon|feature|lookup|table)((?:\s)+)/ do groups Keyword, Text push :featurename end # } ; rule %r/(\})((?:\s))/ do groups Punctuation, Text push :featurename end # solve include( ../path) rule %r/include\b/i, Keyword, :includepath rule %r/[\-\[\]\/(){},.:;=%*<>']/, Punctuation rule %r/`.*?/, Str::Backtick rule %r/\"/, Str, :strings rule %r/\\[^.*\s]+/i, Str::Escape # classes, start with @ rule %r/@#{identifier}/, Name::Class # using negative lookbehind so we don't match property names rule %r/(?\?,\.\/\|\\]}, Punctuation rule %r{'([^']|'')*'}, Str rule %r/(true|false|nil)\b/i, Name::Builtin rule %r/\b(#{keywords.join('|')})\b/i, Keyword rule %r/\b(#{keywords_type.join('|')})\b/i, Keyword::Type rule id, Name end end end end rouge-3.28.0/lib/rouge/lexers/perl.rb000066400000000000000000000216141417417255300174220ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Perl < RegexLexer title "Perl" desc "The Perl scripting language (perl.org)" tag 'perl' aliases 'pl' filenames '*.pl', '*.pm', '*.t' mimetypes 'text/x-perl', 'application/x-perl' def self.detect?(text) return true if text.shebang? 'perl' end keywords = %w( case continue do else elsif for foreach if last my next our redo reset then unless until while use print new BEGIN CHECK INIT END return ) builtins = %w( abs accept alarm atan2 bind binmode bless caller chdir chmod chomp chop chown chr chroot close closedir connect continue cos crypt dbmclose dbmopen defined delete die dump each endgrent endhostent endnetent endprotoent endpwent endservent eof eval exec exists exit exp fcntl fileno flock fork format formline getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getppid getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt glob gmtime goto grep hex import index int ioctl join keys kill last lc lcfirst length link listen local localtime log lstat map mkdir msgctl msgget msgrcv msgsnd my next no oct open opendir ord our pack package pipe pop pos printf prototype push quotemeta rand read readdir readline readlink readpipe recv redo ref rename require reverse rewinddir rindex rmdir scalar seek seekdir select semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat study substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unlink unpack unshift untie utime values vec wait waitpid wantarray warn write ) re_tok = Str::Regex state :balanced_regex do rule %r(/(\\[\\/]|[^/])*/[egimosx]*)m, re_tok, :pop! rule %r(!(\\[\\!]|[^!])*![egimosx]*)m, re_tok, :pop! rule %r(\\(\\\\|[^\\])*\\[egimosx]*)m, re_tok, :pop! rule %r({(\\[\\}]|[^}])*}[egimosx]*), re_tok, :pop! rule %r(<(\\[\\>]|[^>])*>[egimosx]*), re_tok, :pop! rule %r(\[(\\[\\\]]|[^\]])*\][egimosx]*), re_tok, :pop! rule %r[\((\\[\\\)]|[^\)])*\)[egimosx]*], re_tok, :pop! rule %r(@(\\[\\@]|[^@])*@[egimosx]*), re_tok, :pop! rule %r(%(\\[\\%]|[^%])*%[egimosx]*), re_tok, :pop! rule %r(\$(\\[\\\$]|[^\$])*\$[egimosx]*), re_tok, :pop! end state :root do rule %r/#.*/, Comment::Single rule %r/^=[a-zA-Z0-9]+\s+.*?\n=cut/m, Comment::Multiline rule %r/(?:#{keywords.join('|')})\b/, Keyword rule %r/(format)(\s+)([a-zA-Z0-9_]+)(\s*)(=)(\s*\n)/ do groups Keyword, Text, Name, Text, Punctuation, Text push :format end rule %r/(?:eq|lt|gt|le|ge|ne|not|and|or|cmp)\b/, Operator::Word # substitution/transliteration: balanced delimiters rule %r((?:s|tr|y){(\\\\|\\}|[^}])*}\s*), re_tok, :balanced_regex rule %r((?:s|tr|y)<(\\\\|\\>|[^>])*>\s*), re_tok, :balanced_regex rule %r((?:s|tr|y)\[(\\\\|\\\]|[^\]])*\]\s*), re_tok, :balanced_regex rule %r[(?:s|tr|y)\((\\\\|\\\)|[^\)])*\)\s*], re_tok, :balanced_regex # substitution/transliteration: arbitrary non-whitespace delimiters rule %r((?:s|tr|y)\s*([^\w\s])((\\\\|\\\1)|[^\1])*?\1((\\\\|\\\1)|[^\1])*?\1[msixpodualngcr]*)m, re_tok rule %r((?:s|tr|y)\s+(\w)((\\\\|\\\1)|[^\1])*?\1((\\\\|\\\1)|[^\1])*?\1[msixpodualngcr]*)m, re_tok # matches: common case, m-optional rule %r(m?/(\\\\|\\/|[^/\n])*/[msixpodualngc]*), re_tok rule %r(m(?=[/!\\{<\[\(@%\$])), re_tok, :balanced_regex # arbitrary non-whitespace delimiters rule %r(m\s*([^\w\s])((\\\\|\\\1)|[^\1])*?\1[msixpodualngc]*)m, re_tok rule %r(m\s+(\w)((\\\\|\\\1)|[^\1])*?\1[msixpodualngc]*)m, re_tok rule %r(((?<==~)|(?<=\())\s*/(\\\\|\\/|[^/])*/[msixpodualngc]*), re_tok, :balanced_regex rule %r/\s+/, Text rule(/(?=[a-z_]\w*(\s*#.*\n)*\s*=>)/i) { push :fat_comma } rule %r/(?:#{builtins.join('|')})\b/, Name::Builtin rule %r/((__(DIE|WARN)__)|(DATA|STD(IN|OUT|ERR)))\b/, Name::Builtin::Pseudo rule %r/<<([\'"]?)([a-zA-Z_][a-zA-Z0-9_]*)\1;?\n.*?\n\2\n/m, Str rule %r/(__(END|DATA)__)\b/, Comment::Preproc, :end_part rule %r/\$\^[ADEFHILMOPSTWX]/, Name::Variable::Global rule %r/\$[\\"'\[\]&`+*.,;=%~?@$!<>(^\|\/_-](?!\w)/, Name::Variable::Global rule %r/[$@%&*][$@%&*#_]*(?=[a-z{\[;])/i, Name::Variable, :varname rule %r/[-+\/*%=<>&^\|!\\~]=?/, Operator rule %r/0_?[0-7]+(_[0-7]+)*/, Num::Oct rule %r/0x[0-9A-Fa-f]+(_[0-9A-Fa-f]+)*/, Num::Hex rule %r/0b[01]+(_[01]+)*/, Num::Bin rule %r/(\d*(_\d*)*\.\d+(_\d*)*|\d+(_\d*)*\.\d+(_\d*)*)(e[+-]?\d+)?/i, Num::Float rule %r/\d+(_\d*)*e[+-]?\d+(_\d*)*/i, Num::Float rule %r/\d+(_\d+)*/, Num::Integer rule %r/'/, Punctuation, :sq rule %r/"/, Punctuation, :dq rule %r/`/, Punctuation, :bq rule %r/<([^\s>]+)>/, re_tok rule %r/(q|qq|qw|qr|qx)\{/, Str::Other, :cb_string rule %r/(q|qq|qw|qr|qx)\(/, Str::Other, :rb_string rule %r/(q|qq|qw|qr|qx)\[/, Str::Other, :sb_string rule %r/(q|qq|qw|qr|qx)>|>=|<=|<=>|={3}|!=|=~|!~|&&?|\|\||\.{1,3}/, Operator rule %r/[()\[\]:;,<>\/?{}]/, Punctuation rule(/(?=\w)/) { push :name } end state :format do rule %r/\.\n/, Str::Interpol, :pop! rule %r/.*?\n/, Str::Interpol end state :fat_comma do rule %r/#.*/, Comment::Single rule %r/\w+/, Str rule %r/\s+/, Text rule %r/=>/, Operator, :pop! end state :name_common do rule %r/\w+::/, Name::Namespace rule %r/[\w:]+/, Name::Variable, :pop! end state :varname do rule %r/\s+/, Text rule %r/[{\[]/, Punctuation, :pop! # hash syntax rule %r/[),]/, Punctuation, :pop! # arg specifier rule %r/[;]/, Punctuation, :pop! # postfix mixin :name_common end state :name do mixin :name_common rule %r/[A-Z_]+(?=[^a-zA-Z0-9_])/, Name::Constant, :pop! rule(/(?=\W)/) { pop! } end state :modulename do rule %r/[a-z_]\w*/i, Name::Namespace, :pop! end state :funcname do rule %r/[a-zA-Z_]\w*[!?]?/, Name::Function rule %r/\s+/, Text # argument declaration rule %r/(\([$@%]*\))(\s*)/ do groups Punctuation, Text end rule %r/.*?{/, Punctuation, :pop! rule %r/;/, Punctuation, :pop! end state :sq do rule %r/\\[\\']/, Str::Escape rule %r/[^\\']+/, Str::Single rule %r/'/, Punctuation, :pop! rule %r/\\/, Str::Single end state :dq do mixin :string_intp rule %r/\\[\\tnrabefluLUE"$@]/, Str::Escape rule %r/\\0\d{2}/, Str::Escape rule %r/\\o\{\d+\}/, Str::Escape rule %r/\\x\h{2}/, Str::Escape rule %r/\\x\{\h+\}/, Str::Escape rule %r/\\c./, Str::Escape rule %r/\\N\{[^\}]+\}/, Str::Escape rule %r/[^\\"]+?/, Str::Double rule %r/"/, Punctuation, :pop! rule %r/\\/, Str::Escape end state :bq do mixin :string_intp rule %r/\\[\\tnr`]/, Str::Escape rule %r/[^\\`]+?/, Str::Backtick rule %r/`/, Punctuation, :pop! end [[:cb, '\{', '\}'], [:rb, '\(', '\)'], [:sb, '\[', '\]'], [:lt, '<', '>']].each do |name, open, close| tok = Str::Other state :"#{name}_string" do rule %r/\\[#{open}#{close}\\]/, tok rule %r/\\/, tok rule(/#{open}/) { token tok; push } rule %r/#{close}/, tok, :pop! rule %r/[^#{open}#{close}\\]+/, tok end end state :in_interp do rule %r/}/, Str::Interpol, :pop! rule %r/\s+/, Text rule %r/[a-z_]\w*/i, Str::Interpol end state :string_intp do rule %r/[$@][{]/, Str::Interpol, :in_interp rule %r/[$@][a-z_]\w*/i, Str::Interpol end state :end_part do # eat the rest of the stream rule %r/.+/m, Comment::Preproc, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/php.rb000066400000000000000000000246441417417255300172550ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class PHP < TemplateLexer title "PHP" desc "The PHP scripting language (php.net)" tag 'php' aliases 'php', 'php3', 'php4', 'php5' filenames '*.php', '*.php[345t]','*.phtml', # Support Drupal file extensions, see: # https://github.com/gitlabhq/gitlabhq/issues/8900 '*.module', '*.inc', '*.profile', '*.install', '*.test' mimetypes 'text/x-php' option :start_inline, 'Whether to start with inline php or require . (default: best guess)' option :funcnamehighlighting, 'Whether to highlight builtin functions (default: true)' option :disabledmodules, 'Disable certain modules from being highlighted as builtins (default: empty)' def initialize(*) super # if truthy, the lexer starts highlighting with php code # (no / do token Comment::Preproc reset_stack end end state :return do rule(//) { pop! } end state :start do # We enter this state if we aren't sure whether the PHP in the text is # delimited by \/@-]+/, Operator end state :string do rule %r/"/, Str::Double, :pop! rule %r/[^\\{$"]+/, Str::Double rule %r/\\u\{[0-9a-fA-F]+\}/, Str::Escape rule %r/\\([efrntv\"$\\]|[0-7]{1,3}|[xX][0-9a-fA-F]{1,2})/, Str::Escape rule %r/\$#{id}(\[\S+\]|->#{id})?/, Name::Variable rule %r/\{\$\{/, Str::Interpol, :string_interp_double rule %r/\{(?=\$)/, Str::Interpol, :string_interp_single rule %r/(\{)(\S+)(\})/ do groups Str::Interpol, Name::Variable, Str::Interpol end rule %r/[${\\]+/, Str::Double end state :string_interp_double do rule %r/\}\}/, Str::Interpol, :pop! mixin :php end state :string_interp_single do rule %r/\}/, Str::Interpol, :pop! mixin :php end state :values do # heredocs rule %r/<<<(["']?)(#{id})\1\n.*?\n\s*\2;?/im, Str::Heredoc # numbers rule %r/(\d[_\d]*)?\.(\d[_\d]*)?(e[+-]?\d[_\d]*)?/i, Num::Float rule %r/0[0-7][0-7_]*/, Num::Oct rule %r/0b[01][01_]*/i, Num::Bin rule %r/0x[a-f0-9][a-f0-9_]*/i, Num::Hex rule %r/\d[_\d]*/, Num::Integer # strings rule %r/'([^'\\]*(?:\\.[^'\\]*)*)'/, Str::Single rule %r/`([^`\\]*(?:\\.[^`\\]*)*)`/, Str::Backtick rule %r/"/, Str::Double, :string # functions rule %r/(function|fn)\b/i do push :in_function_return push :in_function_params push :in_function_name token Keyword end # constants rule %r/(true|false|null)\b/i, Keyword::Constant # objects rule %r/new\b/i, Keyword, :in_new end state :variables do rule %r/\$\{\$+#{id}\}/, Name::Variable rule %r/\$+#{id}/, Name::Variable end state :whitespace do rule %r/\s+/, Text rule %r/#.*?$/, Comment::Single rule %r(//.*?$), Comment::Single rule %r(/\*\*(?!/).*?\*/)m, Comment::Doc rule %r(/\*.*?\*/)m, Comment::Multiline end state :root do rule %r/<\?(php|=)?/i, Comment::Preproc, :php rule(/.*?(?=<\?)|.*/m) { delegate parent } end state :php do mixin :escape mixin :whitespace mixin :variables mixin :values rule %r/(namespace) (\s+) (#{id_with_ns})/ix do |m| groups Keyword::Namespace, Text, Name::Namespace end rule %r/(class|interface|trait|extends|implements) (\s+) (#{id_with_ns})/ix do |m| groups Keyword::Declaration, Text, Name::Class end mixin :names rule %r/[;,\(\)\{\}\[\]]/, Punctuation mixin :operators rule %r/[=?]/, Operator end state :in_assign do rule %r/,/, Punctuation, :pop! rule %r/[\[\]]/, Punctuation rule %r/\(/, Punctuation, :in_assign_function mixin :escape mixin :whitespace mixin :values mixin :variables mixin :names mixin :operators mixin :return end state :in_assign_function do rule %r/\)/, Punctuation, :pop! rule %r/,/, Punctuation mixin :in_assign end state :in_catch do rule %r/\(/, Punctuation rule %r/\|/, Operator rule id, Name::Class mixin :escape mixin :whitespace mixin :return end state :in_const do rule id, Name::Constant rule %r/=/, Operator, :in_assign mixin :escape mixin :whitespace mixin :return end state :in_function_body do rule %r/{/, Punctuation, :push rule %r/}/, Punctuation, :pop! mixin :php end state :in_function_name do rule %r/&/, Operator rule id, Name rule %r/\(/, Punctuation, :pop! mixin :escape mixin :whitespace mixin :return end state :in_function_params do rule %r/\)/, Punctuation, :pop! rule %r/,/, Punctuation rule %r/[.]{3}/, Punctuation rule %r/=/, Operator, :in_assign rule %r/\??#{id}/, Keyword::Type, :in_assign mixin :escape mixin :whitespace mixin :variables mixin :return end state :in_function_return do rule %r/:/, Punctuation rule %r/use\b/i, Keyword, :in_function_use rule %r/\??#{id}/, Keyword::Type, :in_assign rule %r/\{/ do token Punctuation goto :in_function_body end mixin :escape mixin :whitespace mixin :return end state :in_function_use do rule %r/[,\(]/, Punctuation rule %r/&/, Operator rule %r/\)/, Punctuation, :pop! mixin :escape mixin :whitespace mixin :variables mixin :return end state :in_new do rule %r/class\b/i do token Keyword::Declaration goto :in_new_class end rule id_with_ns, Name::Class, :pop! mixin :escape mixin :whitespace mixin :return end state :in_new_class do rule %r/\}/, Punctuation, :pop! rule %r/\{/, Punctuation mixin :php end state :in_use do rule %r/[,\}]/, Punctuation rule %r/(function|const)\b/i, Keyword rule %r/(#{ns})(\{)/ do groups Name::Namespace, Punctuation end rule %r/#{id_with_ns}(_#{id})+/, Name::Function mixin :escape mixin :whitespace mixin :names mixin :return end state :in_visibility do rule %r/(?=(abstract|const|function|static)\b)/i, Keyword, :pop! rule %r/\??#{id}/, Keyword::Type, :pop! mixin :escape mixin :whitespace mixin :return end end end end rouge-3.28.0/lib/rouge/lexers/php/000077500000000000000000000000001417417255300167165ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/lexers/php/keywords.rb000066400000000000000000003063241417417255300211220ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # DO NOT EDIT # This file is automatically generated by `rake builtins:php`. # See tasks/builtins/php.rake for more info. module Rouge module Lexers class PHP def self.builtins @builtins ||= {}.tap do |b| b["Apache"] = Set.new ["apache_child_terminate", "apache_get_modules", "apache_get_version", "apache_getenv", "apache_lookup_uri", "apache_note", "apache_request_headers", "apache_reset_timeout", "apache_response_headers", "apache_setenv", "getallheaders", "virtual"] b["APC"] = Set.new ["apc_add", "apc_bin_dump", "apc_bin_dumpfile", "apc_bin_load", "apc_bin_loadfile", "apc_cache_info", "apc_cas", "apc_clear_cache", "apc_compile_file", "apc_dec", "apc_define_constants", "apc_delete_file", "apc_delete", "apc_exists", "apc_fetch", "apc_inc", "apc_load_constants", "apc_sma_info", "apc_store"] b["APCu"] = Set.new ["apcu_add", "apcu_cache_info", "apcu_cas", "apcu_clear_cache", "apcu_dec", "apcu_delete", "apcu_enabled", "apcu_entry", "apcu_exists", "apcu_fetch", "apcu_inc", "apcu_sma_info", "apcu_store"] b["APD"] = Set.new ["apd_breakpoint", "apd_callstack", "apd_clunk", "apd_continue", "apd_croak", "apd_dump_function_table", "apd_dump_persistent_resources", "apd_dump_regular_resources", "apd_echo", "apd_get_active_symbols", "apd_set_pprof_trace", "apd_set_session_trace_socket", "apd_set_session_trace", "apd_set_session", "override_function", "rename_function"] b["Array"] = Set.new ["array_change_key_case", "array_chunk", "array_column", "array_combine", "array_count_values", "array_diff_assoc", "array_diff_key", "array_diff_uassoc", "array_diff_ukey", "array_diff", "array_fill_keys", "array_fill", "array_filter", "array_flip", "array_intersect_assoc", "array_intersect_key", "array_intersect_uassoc", "array_intersect_ukey", "array_intersect", "array_key_exists", "array_key_first", "array_key_last", "array_keys", "array_map", "array_merge_recursive", "array_merge", "array_multisort", "array_pad", "array_pop", "array_product", "array_push", "array_rand", "array_reduce", "array_replace_recursive", "array_replace", "array_reverse", "array_search", "array_shift", "array_slice", "array_splice", "array_sum", "array_udiff_assoc", "array_udiff_uassoc", "array_udiff", "array_uintersect_assoc", "array_uintersect_uassoc", "array_uintersect", "array_unique", "array_unshift", "array_values", "array_walk_recursive", "array_walk", "array", "arsort", "asort", "compact", "count", "current", "each", "end", "extract", "in_array", "key_exists", "key", "krsort", "ksort", "list", "natcasesort", "natsort", "next", "pos", "prev", "range", "reset", "rsort", "shuffle", "sizeof", "sort", "uasort", "uksort", "usort"] b["BBCode"] = Set.new ["bbcode_add_element", "bbcode_add_smiley", "bbcode_create", "bbcode_destroy", "bbcode_parse", "bbcode_set_arg_parser", "bbcode_set_flags"] b["BC Math"] = Set.new ["bcadd", "bccomp", "bcdiv", "bcmod", "bcmul", "bcpow", "bcpowmod", "bcscale", "bcsqrt", "bcsub"] b["bcompiler"] = Set.new ["bcompiler_load_exe", "bcompiler_load", "bcompiler_parse_class", "bcompiler_read", "bcompiler_write_class", "bcompiler_write_constant", "bcompiler_write_exe_footer", "bcompiler_write_file", "bcompiler_write_footer", "bcompiler_write_function", "bcompiler_write_functions_from_file", "bcompiler_write_header", "bcompiler_write_included_filename"] b["Blenc"] = Set.new ["blenc_encrypt"] b["Bzip2"] = Set.new ["bzclose", "bzcompress", "bzdecompress", "bzerrno", "bzerror", "bzerrstr", "bzflush", "bzopen", "bzread", "bzwrite"] b["Cairo"] = Set.new ["cairo_create", "cairo_font_options_create", "cairo_font_options_equal", "cairo_font_options_get_antialias", "cairo_font_options_get_hint_metrics", "cairo_font_options_get_hint_style", "cairo_font_options_get_subpixel_order", "cairo_font_options_hash", "cairo_font_options_merge", "cairo_font_options_set_antialias", "cairo_font_options_set_hint_metrics", "cairo_font_options_set_hint_style", "cairo_font_options_set_subpixel_order", "cairo_font_options_status", "cairo_format_stride_for_width", "cairo_image_surface_create_for_data", "cairo_image_surface_create_from_png", "cairo_image_surface_create", "cairo_image_surface_get_data", "cairo_image_surface_get_format", "cairo_image_surface_get_height", "cairo_image_surface_get_stride", "cairo_image_surface_get_width", "cairo_matrix_create_scale", "cairo_matrix_create_translate", "cairo_matrix_invert", "cairo_matrix_multiply", "cairo_matrix_transform_distance", "cairo_matrix_transform_point", "cairo_matrix_translate", "cairo_pattern_add_color_stop_rgb", "cairo_pattern_add_color_stop_rgba", "cairo_pattern_create_for_surface", "cairo_pattern_create_linear", "cairo_pattern_create_radial", "cairo_pattern_create_rgb", "cairo_pattern_create_rgba", "cairo_pattern_get_color_stop_count", "cairo_pattern_get_color_stop_rgba", "cairo_pattern_get_extend", "cairo_pattern_get_filter", "cairo_pattern_get_linear_points", "cairo_pattern_get_matrix", "cairo_pattern_get_radial_circles", "cairo_pattern_get_rgba", "cairo_pattern_get_surface", "cairo_pattern_get_type", "cairo_pattern_set_extend", "cairo_pattern_set_filter", "cairo_pattern_set_matrix", "cairo_pattern_status", "cairo_pdf_surface_create", "cairo_pdf_surface_set_size", "cairo_ps_get_levels", "cairo_ps_level_to_string", "cairo_ps_surface_create", "cairo_ps_surface_dsc_begin_page_setup", "cairo_ps_surface_dsc_begin_setup", "cairo_ps_surface_dsc_comment", "cairo_ps_surface_get_eps", "cairo_ps_surface_restrict_to_level", "cairo_ps_surface_set_eps", "cairo_ps_surface_set_size", "cairo_scaled_font_create", "cairo_scaled_font_extents", "cairo_scaled_font_get_ctm", "cairo_scaled_font_get_font_face", "cairo_scaled_font_get_font_matrix", "cairo_scaled_font_get_font_options", "cairo_scaled_font_get_scale_matrix", "cairo_scaled_font_get_type", "cairo_scaled_font_glyph_extents", "cairo_scaled_font_status", "cairo_scaled_font_text_extents", "cairo_surface_copy_page", "cairo_surface_create_similar", "cairo_surface_finish", "cairo_surface_flush", "cairo_surface_get_content", "cairo_surface_get_device_offset", "cairo_surface_get_font_options", "cairo_surface_get_type", "cairo_surface_mark_dirty_rectangle", "cairo_surface_mark_dirty", "cairo_surface_set_device_offset", "cairo_surface_set_fallback_resolution", "cairo_surface_show_page", "cairo_surface_status", "cairo_surface_write_to_png", "cairo_svg_surface_create", "cairo_svg_surface_restrict_to_version", "cairo_svg_version_to_string"] b["Calendar"] = Set.new ["cal_days_in_month", "cal_from_jd", "cal_info", "cal_to_jd", "easter_date", "easter_days", "frenchtojd", "gregoriantojd", "jddayofweek", "jdmonthname", "jdtofrench", "jdtogregorian", "jdtojewish", "jdtojulian", "jdtounix", "jewishtojd", "juliantojd", "unixtojd"] b["chdb"] = Set.new ["chdb_create"] b["Classkit"] = Set.new ["classkit_import", "classkit_method_add", "classkit_method_copy", "classkit_method_redefine", "classkit_method_remove", "classkit_method_rename"] b["Classes/Object"] = Set.new ["__autoload", "call_user_method_array", "call_user_method", "class_alias", "class_exists", "get_called_class", "get_class_methods", "get_class_vars", "get_class", "get_declared_classes", "get_declared_interfaces", "get_declared_traits", "get_object_vars", "get_parent_class", "interface_exists", "is_a", "is_subclass_of", "method_exists", "property_exists", "trait_exists"] b["CommonMark"] = Set.new ["CommonMark\\Parse", "CommonMark\\Render", "CommonMark\\Render\\HTML", "CommonMark\\Render\\Latex", "CommonMark\\Render\\Man", "CommonMark\\Render\\XML"] b["COM"] = Set.new ["com_create_guid", "com_event_sink", "com_get_active_object", "com_load_typelib", "com_message_pump", "com_print_typeinfo", "variant_abs", "variant_add", "variant_and", "variant_cast", "variant_cat", "variant_cmp", "variant_date_from_timestamp", "variant_date_to_timestamp", "variant_div", "variant_eqv", "variant_fix", "variant_get_type", "variant_idiv", "variant_imp", "variant_int", "variant_mod", "variant_mul", "variant_neg", "variant_not", "variant_or", "variant_pow", "variant_round", "variant_set_type", "variant_set", "variant_sub", "variant_xor"] b["Crack"] = Set.new ["crack_check", "crack_closedict", "crack_getlastmessage", "crack_opendict"] b["CSPRNG"] = Set.new ["random_bytes", "random_int"] b["Ctype"] = Set.new ["ctype_alnum", "ctype_alpha", "ctype_cntrl", "ctype_digit", "ctype_graph", "ctype_lower", "ctype_print", "ctype_punct", "ctype_space", "ctype_upper", "ctype_xdigit"] b["CUBRID"] = Set.new ["cubrid_bind", "cubrid_close_prepare", "cubrid_close_request", "cubrid_col_get", "cubrid_col_size", "cubrid_column_names", "cubrid_column_types", "cubrid_commit", "cubrid_connect_with_url", "cubrid_connect", "cubrid_current_oid", "cubrid_disconnect", "cubrid_drop", "cubrid_error_code_facility", "cubrid_error_code", "cubrid_error_msg", "cubrid_execute", "cubrid_fetch", "cubrid_free_result", "cubrid_get_autocommit", "cubrid_get_charset", "cubrid_get_class_name", "cubrid_get_client_info", "cubrid_get_db_parameter", "cubrid_get_query_timeout", "cubrid_get_server_info", "cubrid_get", "cubrid_insert_id", "cubrid_is_instance", "cubrid_lob_close", "cubrid_lob_export", "cubrid_lob_get", "cubrid_lob_send", "cubrid_lob_size", "cubrid_lob2_bind", "cubrid_lob2_close", "cubrid_lob2_export", "cubrid_lob2_import", "cubrid_lob2_new", "cubrid_lob2_read", "cubrid_lob2_seek64", "cubrid_lob2_seek", "cubrid_lob2_size64", "cubrid_lob2_size", "cubrid_lob2_tell64", "cubrid_lob2_tell", "cubrid_lob2_write", "cubrid_lock_read", "cubrid_lock_write", "cubrid_move_cursor", "cubrid_next_result", "cubrid_num_cols", "cubrid_num_rows", "cubrid_pconnect_with_url", "cubrid_pconnect", "cubrid_prepare", "cubrid_put", "cubrid_rollback", "cubrid_schema", "cubrid_seq_drop", "cubrid_seq_insert", "cubrid_seq_put", "cubrid_set_add", "cubrid_set_autocommit", "cubrid_set_db_parameter", "cubrid_set_drop", "cubrid_set_query_timeout", "cubrid_version"] b["cURL"] = Set.new ["curl_close", "curl_copy_handle", "curl_errno", "curl_error", "curl_escape", "curl_exec", "curl_file_create", "curl_getinfo", "curl_init", "curl_multi_add_handle", "curl_multi_close", "curl_multi_errno", "curl_multi_exec", "curl_multi_getcontent", "curl_multi_info_read", "curl_multi_init", "curl_multi_remove_handle", "curl_multi_select", "curl_multi_setopt", "curl_multi_strerror", "curl_pause", "curl_reset", "curl_setopt_array", "curl_setopt", "curl_share_close", "curl_share_errno", "curl_share_init", "curl_share_setopt", "curl_share_strerror", "curl_strerror", "curl_unescape", "curl_version"] b["Cyrus"] = Set.new ["cyrus_authenticate", "cyrus_bind", "cyrus_close", "cyrus_connect", "cyrus_query", "cyrus_unbind"] b["Date/Time"] = Set.new ["checkdate", "date_add", "date_create_from_format", "date_create_immutable_from_format", "date_create_immutable", "date_create", "date_date_set", "date_default_timezone_get", "date_default_timezone_set", "date_diff", "date_format", "date_get_last_errors", "date_interval_create_from_date_string", "date_interval_format", "date_isodate_set", "date_modify", "date_offset_get", "date_parse_from_format", "date_parse", "date_sub", "date_sun_info", "date_sunrise", "date_sunset", "date_time_set", "date_timestamp_get", "date_timestamp_set", "date_timezone_get", "date_timezone_set", "date", "getdate", "gettimeofday", "gmdate", "gmmktime", "gmstrftime", "idate", "localtime", "microtime", "mktime", "strftime", "strptime", "strtotime", "time", "timezone_abbreviations_list", "timezone_identifiers_list", "timezone_location_get", "timezone_name_from_abbr", "timezone_name_get", "timezone_offset_get", "timezone_open", "timezone_transitions_get", "timezone_version_get"] b["DBA"] = Set.new ["dba_close", "dba_delete", "dba_exists", "dba_fetch", "dba_firstkey", "dba_handlers", "dba_insert", "dba_key_split", "dba_list", "dba_nextkey", "dba_open", "dba_optimize", "dba_popen", "dba_replace", "dba_sync"] b["dBase"] = Set.new ["dbase_add_record", "dbase_close", "dbase_create", "dbase_delete_record", "dbase_get_header_info", "dbase_get_record_with_names", "dbase_get_record", "dbase_numfields", "dbase_numrecords", "dbase_open", "dbase_pack", "dbase_replace_record"] b["DB++"] = Set.new ["dbplus_add", "dbplus_aql", "dbplus_chdir", "dbplus_close", "dbplus_curr", "dbplus_errcode", "dbplus_errno", "dbplus_find", "dbplus_first", "dbplus_flush", "dbplus_freealllocks", "dbplus_freelock", "dbplus_freerlocks", "dbplus_getlock", "dbplus_getunique", "dbplus_info", "dbplus_last", "dbplus_lockrel", "dbplus_next", "dbplus_open", "dbplus_prev", "dbplus_rchperm", "dbplus_rcreate", "dbplus_rcrtexact", "dbplus_rcrtlike", "dbplus_resolve", "dbplus_restorepos", "dbplus_rkeys", "dbplus_ropen", "dbplus_rquery", "dbplus_rrename", "dbplus_rsecindex", "dbplus_runlink", "dbplus_rzap", "dbplus_savepos", "dbplus_setindex", "dbplus_setindexbynumber", "dbplus_sql", "dbplus_tcl", "dbplus_tremove", "dbplus_undo", "dbplus_undoprepare", "dbplus_unlockrel", "dbplus_unselect", "dbplus_update", "dbplus_xlockrel", "dbplus_xunlockrel"] b["dbx"] = Set.new ["dbx_close", "dbx_compare", "dbx_connect", "dbx_error", "dbx_escape_string", "dbx_fetch_row", "dbx_query", "dbx_sort"] b["Direct IO"] = Set.new ["dio_close", "dio_fcntl", "dio_open", "dio_read", "dio_seek", "dio_stat", "dio_tcsetattr", "dio_truncate", "dio_write"] b["Directory"] = Set.new ["chdir", "chroot", "closedir", "dir", "getcwd", "opendir", "readdir", "rewinddir", "scandir"] b["DOM"] = Set.new ["dom_import_simplexml"] b["Eio"] = Set.new ["eio_busy", "eio_cancel", "eio_chmod", "eio_chown", "eio_close", "eio_custom", "eio_dup2", "eio_event_loop", "eio_fallocate", "eio_fchmod", "eio_fchown", "eio_fdatasync", "eio_fstat", "eio_fstatvfs", "eio_fsync", "eio_ftruncate", "eio_futime", "eio_get_event_stream", "eio_get_last_error", "eio_grp_add", "eio_grp_cancel", "eio_grp_limit", "eio_grp", "eio_init", "eio_link", "eio_lstat", "eio_mkdir", "eio_mknod", "eio_nop", "eio_npending", "eio_nready", "eio_nreqs", "eio_nthreads", "eio_open", "eio_poll", "eio_read", "eio_readahead", "eio_readdir", "eio_readlink", "eio_realpath", "eio_rename", "eio_rmdir", "eio_seek", "eio_sendfile", "eio_set_max_idle", "eio_set_max_parallel", "eio_set_max_poll_reqs", "eio_set_max_poll_time", "eio_set_min_parallel", "eio_stat", "eio_statvfs", "eio_symlink", "eio_sync_file_range", "eio_sync", "eio_syncfs", "eio_truncate", "eio_unlink", "eio_utime", "eio_write"] b["Enchant"] = Set.new ["enchant_broker_describe", "enchant_broker_dict_exists", "enchant_broker_free_dict", "enchant_broker_free", "enchant_broker_get_dict_path", "enchant_broker_get_error", "enchant_broker_init", "enchant_broker_list_dicts", "enchant_broker_request_dict", "enchant_broker_request_pwl_dict", "enchant_broker_set_dict_path", "enchant_broker_set_ordering", "enchant_dict_add_to_personal", "enchant_dict_add_to_session", "enchant_dict_check", "enchant_dict_describe", "enchant_dict_get_error", "enchant_dict_is_in_session", "enchant_dict_quick_check", "enchant_dict_store_replacement", "enchant_dict_suggest"] b["Error Handling"] = Set.new ["debug_backtrace", "debug_print_backtrace", "error_clear_last", "error_get_last", "error_log", "error_reporting", "restore_error_handler", "restore_exception_handler", "set_error_handler", "set_exception_handler", "trigger_error", "user_error"] b["Program execution"] = Set.new ["escapeshellarg", "escapeshellcmd", "exec", "passthru", "proc_close", "proc_get_status", "proc_nice", "proc_open", "proc_terminate", "shell_exec", "system"] b["Exif"] = Set.new ["exif_imagetype", "exif_read_data", "exif_tagname", "exif_thumbnail", "read_exif_data"] b["Expect"] = Set.new ["expect_expectl", "expect_popen"] b["FAM"] = Set.new ["fam_cancel_monitor", "fam_close", "fam_monitor_collection", "fam_monitor_directory", "fam_monitor_file", "fam_next_event", "fam_open", "fam_pending", "fam_resume_monitor", "fam_suspend_monitor"] b["Fann"] = Set.new ["fann_cascadetrain_on_data", "fann_cascadetrain_on_file", "fann_clear_scaling_params", "fann_copy", "fann_create_from_file", "fann_create_shortcut_array", "fann_create_shortcut", "fann_create_sparse_array", "fann_create_sparse", "fann_create_standard_array", "fann_create_standard", "fann_create_train_from_callback", "fann_create_train", "fann_descale_input", "fann_descale_output", "fann_descale_train", "fann_destroy_train", "fann_destroy", "fann_duplicate_train_data", "fann_get_activation_function", "fann_get_activation_steepness", "fann_get_bias_array", "fann_get_bit_fail_limit", "fann_get_bit_fail", "fann_get_cascade_activation_functions_count", "fann_get_cascade_activation_functions", "fann_get_cascade_activation_steepnesses_count", "fann_get_cascade_activation_steepnesses", "fann_get_cascade_candidate_change_fraction", "fann_get_cascade_candidate_limit", "fann_get_cascade_candidate_stagnation_epochs", "fann_get_cascade_max_cand_epochs", "fann_get_cascade_max_out_epochs", "fann_get_cascade_min_cand_epochs", "fann_get_cascade_min_out_epochs", "fann_get_cascade_num_candidate_groups", "fann_get_cascade_num_candidates", "fann_get_cascade_output_change_fraction", "fann_get_cascade_output_stagnation_epochs", "fann_get_cascade_weight_multiplier", "fann_get_connection_array", "fann_get_connection_rate", "fann_get_errno", "fann_get_errstr", "fann_get_layer_array", "fann_get_learning_momentum", "fann_get_learning_rate", "fann_get_MSE", "fann_get_network_type", "fann_get_num_input", "fann_get_num_layers", "fann_get_num_output", "fann_get_quickprop_decay", "fann_get_quickprop_mu", "fann_get_rprop_decrease_factor", "fann_get_rprop_delta_max", "fann_get_rprop_delta_min", "fann_get_rprop_delta_zero", "fann_get_rprop_increase_factor", "fann_get_sarprop_step_error_shift", "fann_get_sarprop_step_error_threshold_factor", "fann_get_sarprop_temperature", "fann_get_sarprop_weight_decay_shift", "fann_get_total_connections", "fann_get_total_neurons", "fann_get_train_error_function", "fann_get_train_stop_function", "fann_get_training_algorithm", "fann_init_weights", "fann_length_train_data", "fann_merge_train_data", "fann_num_input_train_data", "fann_num_output_train_data", "fann_print_error", "fann_randomize_weights", "fann_read_train_from_file", "fann_reset_errno", "fann_reset_errstr", "fann_reset_MSE", "fann_run", "fann_save_train", "fann_save", "fann_scale_input_train_data", "fann_scale_input", "fann_scale_output_train_data", "fann_scale_output", "fann_scale_train_data", "fann_scale_train", "fann_set_activation_function_hidden", "fann_set_activation_function_layer", "fann_set_activation_function_output", "fann_set_activation_function", "fann_set_activation_steepness_hidden", "fann_set_activation_steepness_layer", "fann_set_activation_steepness_output", "fann_set_activation_steepness", "fann_set_bit_fail_limit", "fann_set_callback", "fann_set_cascade_activation_functions", "fann_set_cascade_activation_steepnesses", "fann_set_cascade_candidate_change_fraction", "fann_set_cascade_candidate_limit", "fann_set_cascade_candidate_stagnation_epochs", "fann_set_cascade_max_cand_epochs", "fann_set_cascade_max_out_epochs", "fann_set_cascade_min_cand_epochs", "fann_set_cascade_min_out_epochs", "fann_set_cascade_num_candidate_groups", "fann_set_cascade_output_change_fraction", "fann_set_cascade_output_stagnation_epochs", "fann_set_cascade_weight_multiplier", "fann_set_error_log", "fann_set_input_scaling_params", "fann_set_learning_momentum", "fann_set_learning_rate", "fann_set_output_scaling_params", "fann_set_quickprop_decay", "fann_set_quickprop_mu", "fann_set_rprop_decrease_factor", "fann_set_rprop_delta_max", "fann_set_rprop_delta_min", "fann_set_rprop_delta_zero", "fann_set_rprop_increase_factor", "fann_set_sarprop_step_error_shift", "fann_set_sarprop_step_error_threshold_factor", "fann_set_sarprop_temperature", "fann_set_sarprop_weight_decay_shift", "fann_set_scaling_params", "fann_set_train_error_function", "fann_set_train_stop_function", "fann_set_training_algorithm", "fann_set_weight_array", "fann_set_weight", "fann_shuffle_train_data", "fann_subset_train_data", "fann_test_data", "fann_test", "fann_train_epoch", "fann_train_on_data", "fann_train_on_file", "fann_train"] b["FrontBase"] = Set.new ["fbsql_affected_rows", "fbsql_autocommit", "fbsql_blob_size", "fbsql_change_user", "fbsql_clob_size", "fbsql_close", "fbsql_commit", "fbsql_connect", "fbsql_create_blob", "fbsql_create_clob", "fbsql_create_db", "fbsql_data_seek", "fbsql_database_password", "fbsql_database", "fbsql_db_query", "fbsql_db_status", "fbsql_drop_db", "fbsql_errno", "fbsql_error", "fbsql_fetch_array", "fbsql_fetch_assoc", "fbsql_fetch_field", "fbsql_fetch_lengths", "fbsql_fetch_object", "fbsql_fetch_row", "fbsql_field_flags", "fbsql_field_len", "fbsql_field_name", "fbsql_field_seek", "fbsql_field_table", "fbsql_field_type", "fbsql_free_result", "fbsql_get_autostart_info", "fbsql_hostname", "fbsql_insert_id", "fbsql_list_dbs", "fbsql_list_fields", "fbsql_list_tables", "fbsql_next_result", "fbsql_num_fields", "fbsql_num_rows", "fbsql_password", "fbsql_pconnect", "fbsql_query", "fbsql_read_blob", "fbsql_read_clob", "fbsql_result", "fbsql_rollback", "fbsql_rows_fetched", "fbsql_select_db", "fbsql_set_characterset", "fbsql_set_lob_mode", "fbsql_set_password", "fbsql_set_transaction", "fbsql_start_db", "fbsql_stop_db", "fbsql_table_name", "fbsql_tablename", "fbsql_username", "fbsql_warnings"] b["FDF"] = Set.new ["fdf_add_doc_javascript", "fdf_add_template", "fdf_close", "fdf_create", "fdf_enum_values", "fdf_errno", "fdf_error", "fdf_get_ap", "fdf_get_attachment", "fdf_get_encoding", "fdf_get_file", "fdf_get_flags", "fdf_get_opt", "fdf_get_status", "fdf_get_value", "fdf_get_version", "fdf_header", "fdf_next_field_name", "fdf_open_string", "fdf_open", "fdf_remove_item", "fdf_save_string", "fdf_save", "fdf_set_ap", "fdf_set_encoding", "fdf_set_file", "fdf_set_flags", "fdf_set_javascript_action", "fdf_set_on_import_javascript", "fdf_set_opt", "fdf_set_status", "fdf_set_submit_form_action", "fdf_set_target_frame", "fdf_set_value", "fdf_set_version"] b["Fileinfo"] = Set.new ["finfo_buffer", "finfo_close", "finfo_file", "finfo_open", "finfo_set_flags", "mime_content_type"] b["filePro"] = Set.new ["filepro_fieldcount", "filepro_fieldname", "filepro_fieldtype", "filepro_fieldwidth", "filepro_retrieve", "filepro_rowcount", "filepro"] b["Filesystem"] = Set.new ["basename", "chgrp", "chmod", "chown", "clearstatcache", "copy", "delete", "dirname", "disk_free_space", "disk_total_space", "diskfreespace", "fclose", "feof", "fflush", "fgetc", "fgetcsv", "fgets", "fgetss", "file_exists", "file_get_contents", "file_put_contents", "file", "fileatime", "filectime", "filegroup", "fileinode", "filemtime", "fileowner", "fileperms", "filesize", "filetype", "flock", "fnmatch", "fopen", "fpassthru", "fputcsv", "fputs", "fread", "fscanf", "fseek", "fstat", "ftell", "ftruncate", "fwrite", "glob", "is_dir", "is_executable", "is_file", "is_link", "is_readable", "is_uploaded_file", "is_writable", "is_writeable", "lchgrp", "lchown", "link", "linkinfo", "lstat", "mkdir", "move_uploaded_file", "parse_ini_file", "parse_ini_string", "pathinfo", "pclose", "popen", "readfile", "readlink", "realpath_cache_get", "realpath_cache_size", "realpath", "rename", "rewind", "rmdir", "set_file_buffer", "stat", "symlink", "tempnam", "tmpfile", "touch", "umask", "unlink"] b["Filter"] = Set.new ["filter_has_var", "filter_id", "filter_input_array", "filter_input", "filter_list", "filter_var_array", "filter_var"] b["FPM"] = Set.new ["fastcgi_finish_request"] b["FriBiDi"] = Set.new ["fribidi_log2vis"] b["FTP"] = Set.new ["ftp_alloc", "ftp_append", "ftp_cdup", "ftp_chdir", "ftp_chmod", "ftp_close", "ftp_connect", "ftp_delete", "ftp_exec", "ftp_fget", "ftp_fput", "ftp_get_option", "ftp_get", "ftp_login", "ftp_mdtm", "ftp_mkdir", "ftp_mlsd", "ftp_nb_continue", "ftp_nb_fget", "ftp_nb_fput", "ftp_nb_get", "ftp_nb_put", "ftp_nlist", "ftp_pasv", "ftp_put", "ftp_pwd", "ftp_quit", "ftp_raw", "ftp_rawlist", "ftp_rename", "ftp_rmdir", "ftp_set_option", "ftp_site", "ftp_size", "ftp_ssl_connect", "ftp_systype"] b["Function handling"] = Set.new ["call_user_func_array", "call_user_func", "create_function", "forward_static_call_array", "forward_static_call", "func_get_arg", "func_get_args", "func_num_args", "function_exists", "get_defined_functions", "register_shutdown_function", "register_tick_function", "unregister_tick_function"] b["GeoIP"] = Set.new ["geoip_asnum_by_name", "geoip_continent_code_by_name", "geoip_country_code_by_name", "geoip_country_code3_by_name", "geoip_country_name_by_name", "geoip_database_info", "geoip_db_avail", "geoip_db_filename", "geoip_db_get_all_info", "geoip_domain_by_name", "geoip_id_by_name", "geoip_isp_by_name", "geoip_netspeedcell_by_name", "geoip_org_by_name", "geoip_record_by_name", "geoip_region_by_name", "geoip_region_name_by_code", "geoip_setup_custom_directory", "geoip_time_zone_by_country_and_region"] b["Gettext"] = Set.new ["bind_textdomain_codeset", "bindtextdomain", "dcgettext", "dcngettext", "dgettext", "dngettext", "gettext", "ngettext", "textdomain"] b["GMP"] = Set.new ["gmp_abs", "gmp_add", "gmp_and", "gmp_binomial", "gmp_clrbit", "gmp_cmp", "gmp_com", "gmp_div_q", "gmp_div_qr", "gmp_div_r", "gmp_div", "gmp_divexact", "gmp_export", "gmp_fact", "gmp_gcd", "gmp_gcdext", "gmp_hamdist", "gmp_import", "gmp_init", "gmp_intval", "gmp_invert", "gmp_jacobi", "gmp_kronecker", "gmp_lcm", "gmp_legendre", "gmp_mod", "gmp_mul", "gmp_neg", "gmp_nextprime", "gmp_or", "gmp_perfect_power", "gmp_perfect_square", "gmp_popcount", "gmp_pow", "gmp_powm", "gmp_prob_prime", "gmp_random_bits", "gmp_random_range", "gmp_random_seed", "gmp_random", "gmp_root", "gmp_rootrem", "gmp_scan0", "gmp_scan1", "gmp_setbit", "gmp_sign", "gmp_sqrt", "gmp_sqrtrem", "gmp_strval", "gmp_sub", "gmp_testbit", "gmp_xor"] b["GnuPG"] = Set.new ["gnupg_adddecryptkey", "gnupg_addencryptkey", "gnupg_addsignkey", "gnupg_cleardecryptkeys", "gnupg_clearencryptkeys", "gnupg_clearsignkeys", "gnupg_decrypt", "gnupg_decryptverify", "gnupg_encrypt", "gnupg_encryptsign", "gnupg_export", "gnupg_geterror", "gnupg_getprotocol", "gnupg_import", "gnupg_init", "gnupg_keyinfo", "gnupg_setarmor", "gnupg_seterrormode", "gnupg_setsignmode", "gnupg_sign", "gnupg_verify"] b["Gupnp"] = Set.new ["gupnp_context_get_host_ip", "gupnp_context_get_port", "gupnp_context_get_subscription_timeout", "gupnp_context_host_path", "gupnp_context_new", "gupnp_context_set_subscription_timeout", "gupnp_context_timeout_add", "gupnp_context_unhost_path", "gupnp_control_point_browse_start", "gupnp_control_point_browse_stop", "gupnp_control_point_callback_set", "gupnp_control_point_new", "gupnp_device_action_callback_set", "gupnp_device_info_get_service", "gupnp_device_info_get", "gupnp_root_device_get_available", "gupnp_root_device_get_relative_location", "gupnp_root_device_new", "gupnp_root_device_set_available", "gupnp_root_device_start", "gupnp_root_device_stop", "gupnp_service_action_get", "gupnp_service_action_return_error", "gupnp_service_action_return", "gupnp_service_action_set", "gupnp_service_freeze_notify", "gupnp_service_info_get_introspection", "gupnp_service_info_get", "gupnp_service_introspection_get_state_variable", "gupnp_service_notify", "gupnp_service_proxy_action_get", "gupnp_service_proxy_action_set", "gupnp_service_proxy_add_notify", "gupnp_service_proxy_callback_set", "gupnp_service_proxy_get_subscribed", "gupnp_service_proxy_remove_notify", "gupnp_service_proxy_set_subscribed", "gupnp_service_thaw_notify"] b["Hash"] = Set.new ["hash_algos", "hash_copy", "hash_equals", "hash_file", "hash_final", "hash_hkdf", "hash_hmac_algos", "hash_hmac_file", "hash_hmac", "hash_init", "hash_pbkdf2", "hash_update_file", "hash_update_stream", "hash_update", "hash"] b["Hyperwave API"] = Set.new ["hwapi_attribute_new", "hwapi_content_new", "hwapi_hgcsp", "hwapi_object_new"] b["Firebird/InterBase"] = Set.new ["fbird_add_user", "fbird_affected_rows", "fbird_backup", "fbird_blob_add", "fbird_blob_cancel", "fbird_blob_close", "fbird_blob_create", "fbird_blob_echo", "fbird_blob_get", "fbird_blob_import", "fbird_blob_info", "fbird_blob_open", "fbird_close", "fbird_commit_ret", "fbird_commit", "fbird_connect", "fbird_db_info", "fbird_delete_user", "fbird_drop_db", "fbird_errcode", "fbird_errmsg", "fbird_execute", "fbird_fetch_assoc", "fbird_fetch_object", "fbird_fetch_row", "fbird_field_info", "fbird_free_event_handler", "fbird_free_query", "fbird_free_result", "fbird_gen_id", "fbird_maintain_db", "fbird_modify_user", "fbird_name_result", "fbird_num_fields", "fbird_num_params", "fbird_param_info", "fbird_pconnect", "fbird_prepare", "fbird_query", "fbird_restore", "fbird_rollback_ret", "fbird_rollback", "fbird_server_info", "fbird_service_attach", "fbird_service_detach", "fbird_set_event_handler", "fbird_trans", "fbird_wait_event", "ibase_add_user", "ibase_affected_rows", "ibase_backup", "ibase_blob_add", "ibase_blob_cancel", "ibase_blob_close", "ibase_blob_create", "ibase_blob_echo", "ibase_blob_get", "ibase_blob_import", "ibase_blob_info", "ibase_blob_open", "ibase_close", "ibase_commit_ret", "ibase_commit", "ibase_connect", "ibase_db_info", "ibase_delete_user", "ibase_drop_db", "ibase_errcode", "ibase_errmsg", "ibase_execute", "ibase_fetch_assoc", "ibase_fetch_object", "ibase_fetch_row", "ibase_field_info", "ibase_free_event_handler", "ibase_free_query", "ibase_free_result", "ibase_gen_id", "ibase_maintain_db", "ibase_modify_user", "ibase_name_result", "ibase_num_fields", "ibase_num_params", "ibase_param_info", "ibase_pconnect", "ibase_prepare", "ibase_query", "ibase_restore", "ibase_rollback_ret", "ibase_rollback", "ibase_server_info", "ibase_service_attach", "ibase_service_detach", "ibase_set_event_handler", "ibase_trans", "ibase_wait_event"] b["IBM DB2"] = Set.new ["db2_autocommit", "db2_bind_param", "db2_client_info", "db2_close", "db2_column_privileges", "db2_columns", "db2_commit", "db2_conn_error", "db2_conn_errormsg", "db2_connect", "db2_cursor_type", "db2_escape_string", "db2_exec", "db2_execute", "db2_fetch_array", "db2_fetch_assoc", "db2_fetch_both", "db2_fetch_object", "db2_fetch_row", "db2_field_display_size", "db2_field_name", "db2_field_num", "db2_field_precision", "db2_field_scale", "db2_field_type", "db2_field_width", "db2_foreign_keys", "db2_free_result", "db2_free_stmt", "db2_get_option", "db2_last_insert_id", "db2_lob_read", "db2_next_result", "db2_num_fields", "db2_num_rows", "db2_pclose", "db2_pconnect", "db2_prepare", "db2_primary_keys", "db2_procedure_columns", "db2_procedures", "db2_result", "db2_rollback", "db2_server_info", "db2_set_option", "db2_special_columns", "db2_statistics", "db2_stmt_error", "db2_stmt_errormsg", "db2_table_privileges", "db2_tables"] b["iconv"] = Set.new ["iconv_get_encoding", "iconv_mime_decode_headers", "iconv_mime_decode", "iconv_mime_encode", "iconv_set_encoding", "iconv_strlen", "iconv_strpos", "iconv_strrpos", "iconv_substr", "iconv", "ob_iconv_handler"] b["ID3"] = Set.new ["id3_get_frame_long_name", "id3_get_frame_short_name", "id3_get_genre_id", "id3_get_genre_list", "id3_get_genre_name", "id3_get_tag", "id3_get_version", "id3_remove_tag", "id3_set_tag"] b["Informix"] = Set.new ["ifx_affected_rows", "ifx_blobinfile_mode", "ifx_byteasvarchar", "ifx_close", "ifx_connect", "ifx_copy_blob", "ifx_create_blob", "ifx_create_char", "ifx_do", "ifx_error", "ifx_errormsg", "ifx_fetch_row", "ifx_fieldproperties", "ifx_fieldtypes", "ifx_free_blob", "ifx_free_char", "ifx_free_result", "ifx_get_blob", "ifx_get_char", "ifx_getsqlca", "ifx_htmltbl_result", "ifx_nullformat", "ifx_num_fields", "ifx_num_rows", "ifx_pconnect", "ifx_prepare", "ifx_query", "ifx_textasvarchar", "ifx_update_blob", "ifx_update_char", "ifxus_close_slob", "ifxus_create_slob", "ifxus_free_slob", "ifxus_open_slob", "ifxus_read_slob", "ifxus_seek_slob", "ifxus_tell_slob", "ifxus_write_slob"] b["IIS"] = Set.new ["iis_add_server", "iis_get_dir_security", "iis_get_script_map", "iis_get_server_by_comment", "iis_get_server_by_path", "iis_get_server_rights", "iis_get_service_state", "iis_remove_server", "iis_set_app_settings", "iis_set_dir_security", "iis_set_script_map", "iis_set_server_rights", "iis_start_server", "iis_start_service", "iis_stop_server", "iis_stop_service"] b["GD and Image"] = Set.new ["gd_info", "getimagesize", "getimagesizefromstring", "image_type_to_extension", "image_type_to_mime_type", "image2wbmp", "imageaffine", "imageaffinematrixconcat", "imageaffinematrixget", "imagealphablending", "imageantialias", "imagearc", "imagebmp", "imagechar", "imagecharup", "imagecolorallocate", "imagecolorallocatealpha", "imagecolorat", "imagecolorclosest", "imagecolorclosestalpha", "imagecolorclosesthwb", "imagecolordeallocate", "imagecolorexact", "imagecolorexactalpha", "imagecolormatch", "imagecolorresolve", "imagecolorresolvealpha", "imagecolorset", "imagecolorsforindex", "imagecolorstotal", "imagecolortransparent", "imageconvolution", "imagecopy", "imagecopymerge", "imagecopymergegray", "imagecopyresampled", "imagecopyresized", "imagecreate", "imagecreatefrombmp", "imagecreatefromgd2", "imagecreatefromgd2part", "imagecreatefromgd", "imagecreatefromgif", "imagecreatefromjpeg", "imagecreatefrompng", "imagecreatefromstring", "imagecreatefromwbmp", "imagecreatefromwebp", "imagecreatefromxbm", "imagecreatefromxpm", "imagecreatetruecolor", "imagecrop", "imagecropauto", "imagedashedline", "imagedestroy", "imageellipse", "imagefill", "imagefilledarc", "imagefilledellipse", "imagefilledpolygon", "imagefilledrectangle", "imagefilltoborder", "imagefilter", "imageflip", "imagefontheight", "imagefontwidth", "imageftbbox", "imagefttext", "imagegammacorrect", "imagegd2", "imagegd", "imagegetclip", "imagegif", "imagegrabscreen", "imagegrabwindow", "imageinterlace", "imageistruecolor", "imagejpeg", "imagelayereffect", "imageline", "imageloadfont", "imageopenpolygon", "imagepalettecopy", "imagepalettetotruecolor", "imagepng", "imagepolygon", "imagepsbbox", "imagepsencodefont", "imagepsextendfont", "imagepsfreefont", "imagepsloadfont", "imagepsslantfont", "imagepstext", "imagerectangle", "imageresolution", "imagerotate", "imagesavealpha", "imagescale", "imagesetbrush", "imagesetclip", "imagesetinterpolation", "imagesetpixel", "imagesetstyle", "imagesetthickness", "imagesettile", "imagestring", "imagestringup", "imagesx", "imagesy", "imagetruecolortopalette", "imagettfbbox", "imagettftext", "imagetypes", "imagewbmp", "imagewebp", "imagexbm", "iptcembed", "iptcparse", "jpeg2wbmp", "png2wbmp"] b["IMAP"] = Set.new ["imap_8bit", "imap_alerts", "imap_append", "imap_base64", "imap_binary", "imap_body", "imap_bodystruct", "imap_check", "imap_clearflag_full", "imap_close", "imap_create", "imap_createmailbox", "imap_delete", "imap_deletemailbox", "imap_errors", "imap_expunge", "imap_fetch_overview", "imap_fetchbody", "imap_fetchheader", "imap_fetchmime", "imap_fetchstructure", "imap_fetchtext", "imap_gc", "imap_get_quota", "imap_get_quotaroot", "imap_getacl", "imap_getmailboxes", "imap_getsubscribed", "imap_header", "imap_headerinfo", "imap_headers", "imap_last_error", "imap_list", "imap_listmailbox", "imap_listscan", "imap_listsubscribed", "imap_lsub", "imap_mail_compose", "imap_mail_copy", "imap_mail_move", "imap_mail", "imap_mailboxmsginfo", "imap_mime_header_decode", "imap_msgno", "imap_mutf7_to_utf8", "imap_num_msg", "imap_num_recent", "imap_open", "imap_ping", "imap_qprint", "imap_rename", "imap_renamemailbox", "imap_reopen", "imap_rfc822_parse_adrlist", "imap_rfc822_parse_headers", "imap_rfc822_write_address", "imap_savebody", "imap_scan", "imap_scanmailbox", "imap_search", "imap_set_quota", "imap_setacl", "imap_setflag_full", "imap_sort", "imap_status", "imap_subscribe", "imap_thread", "imap_timeout", "imap_uid", "imap_undelete", "imap_unsubscribe", "imap_utf7_decode", "imap_utf7_encode", "imap_utf8_to_mutf7", "imap_utf8"] b["inclued"] = Set.new ["inclued_get_data"] b["PHP Options/Info"] = Set.new ["assert_options", "assert", "cli_get_process_title", "cli_set_process_title", "dl", "extension_loaded", "gc_collect_cycles", "gc_disable", "gc_enable", "gc_enabled", "gc_mem_caches", "gc_status", "get_cfg_var", "get_current_user", "get_defined_constants", "get_extension_funcs", "get_include_path", "get_included_files", "get_loaded_extensions", "get_magic_quotes_gpc", "get_magic_quotes_runtime", "get_required_files", "get_resources", "getenv", "getlastmod", "getmygid", "getmyinode", "getmypid", "getmyuid", "getopt", "getrusage", "ini_alter", "ini_get_all", "ini_get", "ini_restore", "ini_set", "magic_quotes_runtime", "main", "memory_get_peak_usage", "memory_get_usage", "php_ini_loaded_file", "php_ini_scanned_files", "php_logo_guid", "php_sapi_name", "php_uname", "phpcredits", "phpinfo", "phpversion", "putenv", "restore_include_path", "set_include_path", "set_magic_quotes_runtime", "set_time_limit", "sys_get_temp_dir", "version_compare", "zend_logo_guid", "zend_thread_id", "zend_version"] b["Ingres"] = Set.new ["ingres_autocommit_state", "ingres_autocommit", "ingres_charset", "ingres_close", "ingres_commit", "ingres_connect", "ingres_cursor", "ingres_errno", "ingres_error", "ingres_errsqlstate", "ingres_escape_string", "ingres_execute", "ingres_fetch_array", "ingres_fetch_assoc", "ingres_fetch_object", "ingres_fetch_proc_return", "ingres_fetch_row", "ingres_field_length", "ingres_field_name", "ingres_field_nullable", "ingres_field_precision", "ingres_field_scale", "ingres_field_type", "ingres_free_result", "ingres_next_error", "ingres_num_fields", "ingres_num_rows", "ingres_pconnect", "ingres_prepare", "ingres_query", "ingres_result_seek", "ingres_rollback", "ingres_set_environment", "ingres_unbuffered_query"] b["Inotify"] = Set.new ["inotify_add_watch", "inotify_init", "inotify_queue_len", "inotify_read", "inotify_rm_watch"] b["Grapheme"] = Set.new ["grapheme_extract", "grapheme_stripos", "grapheme_stristr", "grapheme_strlen", "grapheme_strpos", "grapheme_strripos", "grapheme_strrpos", "grapheme_strstr", "grapheme_substr"] b["intl"] = Set.new ["intl_error_name", "intl_get_error_code", "intl_get_error_message", "intl_is_failure"] b["IDN"] = Set.new ["idn_to_ascii", "idn_to_utf8"] b["JSON"] = Set.new ["json_decode", "json_encode", "json_last_error_msg", "json_last_error"] b["Judy"] = Set.new ["judy_type", "judy_version"] b["KADM5"] = Set.new ["kadm5_chpass_principal", "kadm5_create_principal", "kadm5_delete_principal", "kadm5_destroy", "kadm5_flush", "kadm5_get_policies", "kadm5_get_principal", "kadm5_get_principals", "kadm5_init_with_password", "kadm5_modify_principal"] b["LDAP"] = Set.new ["ldap_8859_to_t61", "ldap_add_ext", "ldap_add", "ldap_bind_ext", "ldap_bind", "ldap_close", "ldap_compare", "ldap_connect", "ldap_control_paged_result_response", "ldap_control_paged_result", "ldap_count_entries", "ldap_delete_ext", "ldap_delete", "ldap_dn2ufn", "ldap_err2str", "ldap_errno", "ldap_error", "ldap_escape", "ldap_exop_passwd", "ldap_exop_refresh", "ldap_exop_whoami", "ldap_exop", "ldap_explode_dn", "ldap_first_attribute", "ldap_first_entry", "ldap_first_reference", "ldap_free_result", "ldap_get_attributes", "ldap_get_dn", "ldap_get_entries", "ldap_get_option", "ldap_get_values_len", "ldap_get_values", "ldap_list", "ldap_mod_add_ext", "ldap_mod_add", "ldap_mod_del_ext", "ldap_mod_del", "ldap_mod_replace_ext", "ldap_mod_replace", "ldap_modify_batch", "ldap_modify", "ldap_next_attribute", "ldap_next_entry", "ldap_next_reference", "ldap_parse_exop", "ldap_parse_reference", "ldap_parse_result", "ldap_read", "ldap_rename_ext", "ldap_rename", "ldap_sasl_bind", "ldap_search", "ldap_set_option", "ldap_set_rebind_proc", "ldap_sort", "ldap_start_tls", "ldap_t61_to_8859", "ldap_unbind"] b["Libevent"] = Set.new ["event_add", "event_base_free", "event_base_loop", "event_base_loopbreak", "event_base_loopexit", "event_base_new", "event_base_priority_init", "event_base_reinit", "event_base_set", "event_buffer_base_set", "event_buffer_disable", "event_buffer_enable", "event_buffer_fd_set", "event_buffer_free", "event_buffer_new", "event_buffer_priority_set", "event_buffer_read", "event_buffer_set_callback", "event_buffer_timeout_set", "event_buffer_watermark_set", "event_buffer_write", "event_del", "event_free", "event_new", "event_priority_set", "event_set", "event_timer_add", "event_timer_del", "event_timer_new", "event_timer_set"] b["libxml"] = Set.new ["libxml_clear_errors", "libxml_disable_entity_loader", "libxml_get_errors", "libxml_get_last_error", "libxml_set_external_entity_loader", "libxml_set_streams_context", "libxml_use_internal_errors"] b["LZF"] = Set.new ["lzf_compress", "lzf_decompress", "lzf_optimized_for"] b["Mail"] = Set.new ["ezmlm_hash", "mail"] b["Mailparse"] = Set.new ["mailparse_determine_best_xfer_encoding", "mailparse_msg_create", "mailparse_msg_extract_part_file", "mailparse_msg_extract_part", "mailparse_msg_extract_whole_part_file", "mailparse_msg_free", "mailparse_msg_get_part_data", "mailparse_msg_get_part", "mailparse_msg_get_structure", "mailparse_msg_parse_file", "mailparse_msg_parse", "mailparse_rfc822_parse_addresses", "mailparse_stream_encode", "mailparse_uudecode_all"] b["Math"] = Set.new ["abs", "acos", "acosh", "asin", "asinh", "atan2", "atan", "atanh", "base_convert", "bindec", "ceil", "cos", "cosh", "decbin", "dechex", "decoct", "deg2rad", "exp", "expm1", "floor", "fmod", "getrandmax", "hexdec", "hypot", "intdiv", "is_finite", "is_infinite", "is_nan", "lcg_value", "log10", "log1p", "log", "max", "min", "mt_getrandmax", "mt_rand", "mt_srand", "octdec", "pi", "pow", "rad2deg", "rand", "round", "sin", "sinh", "sqrt", "srand", "tan", "tanh"] b["MaxDB"] = Set.new ["maxdb_affected_rows", "maxdb_autocommit", "maxdb_bind_param", "maxdb_bind_result", "maxdb_change_user", "maxdb_character_set_name", "maxdb_client_encoding", "maxdb_close_long_data", "maxdb_close", "maxdb_commit", "maxdb_connect_errno", "maxdb_connect_error", "maxdb_connect", "maxdb_data_seek", "maxdb_debug", "maxdb_disable_reads_from_master", "maxdb_disable_rpl_parse", "maxdb_dump_debug_info", "maxdb_embedded_connect", "maxdb_enable_reads_from_master", "maxdb_enable_rpl_parse", "maxdb_errno", "maxdb_error", "maxdb_escape_string", "maxdb_execute", "maxdb_fetch_array", "maxdb_fetch_assoc", "maxdb_fetch_field_direct", "maxdb_fetch_field", "maxdb_fetch_fields", "maxdb_fetch_lengths", "maxdb_fetch_object", "maxdb_fetch_row", "maxdb_fetch", "maxdb_field_count", "maxdb_field_seek", "maxdb_field_tell", "maxdb_free_result", "maxdb_get_client_info", "maxdb_get_client_version", "maxdb_get_host_info", "maxdb_get_metadata", "maxdb_get_proto_info", "maxdb_get_server_info", "maxdb_get_server_version", "maxdb_info", "maxdb_init", "maxdb_insert_id", "maxdb_kill", "maxdb_master_query", "maxdb_more_results", "maxdb_multi_query", "maxdb_next_result", "maxdb_num_fields", "maxdb_num_rows", "maxdb_options", "maxdb_param_count", "maxdb_ping", "maxdb_prepare", "maxdb_query", "maxdb_real_connect", "maxdb_real_escape_string", "maxdb_real_query", "maxdb_report", "maxdb_rollback", "maxdb_rpl_parse_enabled", "maxdb_rpl_probe", "maxdb_rpl_query_type", "maxdb_select_db", "maxdb_send_long_data", "maxdb_send_query", "maxdb_server_end", "maxdb_server_init", "maxdb_set_opt", "maxdb_sqlstate", "maxdb_ssl_set", "maxdb_stat", "maxdb_stmt_affected_rows", "maxdb_stmt_bind_param", "maxdb_stmt_bind_result", "maxdb_stmt_close_long_data", "maxdb_stmt_close", "maxdb_stmt_data_seek", "maxdb_stmt_errno", "maxdb_stmt_error", "maxdb_stmt_execute", "maxdb_stmt_fetch", "maxdb_stmt_free_result", "maxdb_stmt_init", "maxdb_stmt_num_rows", "maxdb_stmt_param_count", "maxdb_stmt_prepare", "maxdb_stmt_reset", "maxdb_stmt_result_metadata", "maxdb_stmt_send_long_data", "maxdb_stmt_sqlstate", "maxdb_stmt_store_result", "maxdb_store_result", "maxdb_thread_id", "maxdb_thread_safe", "maxdb_use_result", "maxdb_warning_count"] b["Multibyte String"] = Set.new ["mb_check_encoding", "mb_chr", "mb_convert_case", "mb_convert_encoding", "mb_convert_kana", "mb_convert_variables", "mb_decode_mimeheader", "mb_decode_numericentity", "mb_detect_encoding", "mb_detect_order", "mb_encode_mimeheader", "mb_encode_numericentity", "mb_encoding_aliases", "mb_ereg_match", "mb_ereg_replace_callback", "mb_ereg_replace", "mb_ereg_search_getpos", "mb_ereg_search_getregs", "mb_ereg_search_init", "mb_ereg_search_pos", "mb_ereg_search_regs", "mb_ereg_search_setpos", "mb_ereg_search", "mb_ereg", "mb_eregi_replace", "mb_eregi", "mb_get_info", "mb_http_input", "mb_http_output", "mb_internal_encoding", "mb_language", "mb_list_encodings", "mb_ord", "mb_output_handler", "mb_parse_str", "mb_preferred_mime_name", "mb_regex_encoding", "mb_regex_set_options", "mb_scrub", "mb_send_mail", "mb_split", "mb_str_split", "mb_strcut", "mb_strimwidth", "mb_stripos", "mb_stristr", "mb_strlen", "mb_strpos", "mb_strrchr", "mb_strrichr", "mb_strripos", "mb_strrpos", "mb_strstr", "mb_strtolower", "mb_strtoupper", "mb_strwidth", "mb_substitute_character", "mb_substr_count", "mb_substr"] b["Mcrypt"] = Set.new ["mcrypt_cbc", "mcrypt_cfb", "mcrypt_create_iv", "mcrypt_decrypt", "mcrypt_ecb", "mcrypt_enc_get_algorithms_name", "mcrypt_enc_get_block_size", "mcrypt_enc_get_iv_size", "mcrypt_enc_get_key_size", "mcrypt_enc_get_modes_name", "mcrypt_enc_get_supported_key_sizes", "mcrypt_enc_is_block_algorithm_mode", "mcrypt_enc_is_block_algorithm", "mcrypt_enc_is_block_mode", "mcrypt_enc_self_test", "mcrypt_encrypt", "mcrypt_generic_deinit", "mcrypt_generic_end", "mcrypt_generic_init", "mcrypt_generic", "mcrypt_get_block_size", "mcrypt_get_cipher_name", "mcrypt_get_iv_size", "mcrypt_get_key_size", "mcrypt_list_algorithms", "mcrypt_list_modes", "mcrypt_module_close", "mcrypt_module_get_algo_block_size", "mcrypt_module_get_algo_key_size", "mcrypt_module_get_supported_key_sizes", "mcrypt_module_is_block_algorithm_mode", "mcrypt_module_is_block_algorithm", "mcrypt_module_is_block_mode", "mcrypt_module_open", "mcrypt_module_self_test", "mcrypt_ofb", "mdecrypt_generic"] b["MCVE"] = Set.new ["m_checkstatus", "m_completeauthorizations", "m_connect", "m_connectionerror", "m_deletetrans", "m_destroyconn", "m_destroyengine", "m_getcell", "m_getcellbynum", "m_getcommadelimited", "m_getheader", "m_initconn", "m_initengine", "m_iscommadelimited", "m_maxconntimeout", "m_monitor", "m_numcolumns", "m_numrows", "m_parsecommadelimited", "m_responsekeys", "m_responseparam", "m_returnstatus", "m_setblocking", "m_setdropfile", "m_setip", "m_setssl_cafile", "m_setssl_files", "m_setssl", "m_settimeout", "m_sslcert_gen_hash", "m_transactionssent", "m_transinqueue", "m_transkeyval", "m_transnew", "m_transsend", "m_uwait", "m_validateidentifier", "m_verifyconnection", "m_verifysslcert"] b["Memcache"] = Set.new ["memcache_debug"] b["Mhash"] = Set.new ["mhash_count", "mhash_get_block_size", "mhash_get_hash_name", "mhash_keygen_s2k", "mhash"] b["Ming"] = Set.new ["ming_keypress", "ming_setcubicthreshold", "ming_setscale", "ming_setswfcompression", "ming_useconstants", "ming_useswfversion"] b["Misc."] = Set.new ["connection_aborted", "connection_status", "constant", "define", "defined", "die", "eval", "exit", "get_browser", "__halt_compiler", "highlight_file", "highlight_string", "hrtime", "ignore_user_abort", "pack", "php_check_syntax", "php_strip_whitespace", "sapi_windows_cp_conv", "sapi_windows_cp_get", "sapi_windows_cp_is_utf8", "sapi_windows_cp_set", "sapi_windows_generate_ctrl_event", "sapi_windows_set_ctrl_handler", "sapi_windows_vt100_support", "show_source", "sleep", "sys_getloadavg", "time_nanosleep", "time_sleep_until", "uniqid", "unpack", "usleep"] b["mnoGoSearch"] = Set.new ["udm_add_search_limit", "udm_alloc_agent_array", "udm_alloc_agent", "udm_api_version", "udm_cat_list", "udm_cat_path", "udm_check_charset", "udm_clear_search_limits", "udm_crc32", "udm_errno", "udm_error", "udm_find", "udm_free_agent", "udm_free_ispell_data", "udm_free_res", "udm_get_doc_count", "udm_get_res_field", "udm_get_res_param", "udm_hash32", "udm_load_ispell_data", "udm_set_agent_param"] b["Mongo"] = Set.new ["bson_decode", "bson_encode"] b["mqseries"] = Set.new ["mqseries_back", "mqseries_begin", "mqseries_close", "mqseries_cmit", "mqseries_conn", "mqseries_connx", "mqseries_disc", "mqseries_get", "mqseries_inq", "mqseries_open", "mqseries_put1", "mqseries_put", "mqseries_set", "mqseries_strerror"] b["Msession"] = Set.new ["msession_connect", "msession_count", "msession_create", "msession_destroy", "msession_disconnect", "msession_find", "msession_get_array", "msession_get_data", "msession_get", "msession_inc", "msession_list", "msession_listvar", "msession_lock", "msession_plugin", "msession_randstr", "msession_set_array", "msession_set_data", "msession_set", "msession_timeout", "msession_uniq", "msession_unlock"] b["mSQL"] = Set.new ["msql_affected_rows", "msql_close", "msql_connect", "msql_create_db", "msql_createdb", "msql_data_seek", "msql_db_query", "msql_dbname", "msql_drop_db", "msql_error", "msql_fetch_array", "msql_fetch_field", "msql_fetch_object", "msql_fetch_row", "msql_field_flags", "msql_field_len", "msql_field_name", "msql_field_seek", "msql_field_table", "msql_field_type", "msql_fieldflags", "msql_fieldlen", "msql_fieldname", "msql_fieldtable", "msql_fieldtype", "msql_free_result", "msql_list_dbs", "msql_list_fields", "msql_list_tables", "msql_num_fields", "msql_num_rows", "msql_numfields", "msql_numrows", "msql_pconnect", "msql_query", "msql_regcase", "msql_result", "msql_select_db", "msql_tablename", "msql"] b["Mssql"] = Set.new ["mssql_bind", "mssql_close", "mssql_connect", "mssql_data_seek", "mssql_execute", "mssql_fetch_array", "mssql_fetch_assoc", "mssql_fetch_batch", "mssql_fetch_field", "mssql_fetch_object", "mssql_fetch_row", "mssql_field_length", "mssql_field_name", "mssql_field_seek", "mssql_field_type", "mssql_free_result", "mssql_free_statement", "mssql_get_last_message", "mssql_guid_string", "mssql_init", "mssql_min_error_severity", "mssql_min_message_severity", "mssql_next_result", "mssql_num_fields", "mssql_num_rows", "mssql_pconnect", "mssql_query", "mssql_result", "mssql_rows_affected", "mssql_select_db"] b["Mysql_xdevapi"] = Set.new ["expression", "getSession"] b["MySQL"] = Set.new ["mysql_affected_rows", "mysql_client_encoding", "mysql_close", "mysql_connect", "mysql_create_db", "mysql_data_seek", "mysql_db_name", "mysql_db_query", "mysql_drop_db", "mysql_errno", "mysql_error", "mysql_escape_string", "mysql_fetch_array", "mysql_fetch_assoc", "mysql_fetch_field", "mysql_fetch_lengths", "mysql_fetch_object", "mysql_fetch_row", "mysql_field_flags", "mysql_field_len", "mysql_field_name", "mysql_field_seek", "mysql_field_table", "mysql_field_type", "mysql_free_result", "mysql_get_client_info", "mysql_get_host_info", "mysql_get_proto_info", "mysql_get_server_info", "mysql_info", "mysql_insert_id", "mysql_list_dbs", "mysql_list_fields", "mysql_list_processes", "mysql_list_tables", "mysql_num_fields", "mysql_num_rows", "mysql_pconnect", "mysql_ping", "mysql_query", "mysql_real_escape_string", "mysql_result", "mysql_select_db", "mysql_set_charset", "mysql_stat", "mysql_tablename", "mysql_thread_id", "mysql_unbuffered_query"] b["Aliases and deprecated Mysqli"] = Set.new ["mysqli_bind_param", "mysqli_bind_result", "mysqli_client_encoding", "mysqli_connect", "mysqli_disable_rpl_parse", "mysqli_enable_reads_from_master", "mysqli_enable_rpl_parse", "mysqli_escape_string", "mysqli_execute", "mysqli_fetch", "mysqli_get_cache_stats", "mysqli_get_client_stats", "mysqli_get_links_stats", "mysqli_get_metadata", "mysqli_master_query", "mysqli_param_count", "mysqli_report", "mysqli_rpl_parse_enabled", "mysqli_rpl_probe", "mysqli_send_long_data", "mysqli_slave_query"] b["Mysqlnd_memcache"] = Set.new ["mysqlnd_memcache_get_config", "mysqlnd_memcache_set"] b["Mysqlnd_ms"] = Set.new ["mysqlnd_ms_dump_servers", "mysqlnd_ms_fabric_select_global", "mysqlnd_ms_fabric_select_shard", "mysqlnd_ms_get_last_gtid", "mysqlnd_ms_get_last_used_connection", "mysqlnd_ms_get_stats", "mysqlnd_ms_match_wild", "mysqlnd_ms_query_is_select", "mysqlnd_ms_set_qos", "mysqlnd_ms_set_user_pick_server", "mysqlnd_ms_xa_begin", "mysqlnd_ms_xa_commit", "mysqlnd_ms_xa_gc", "mysqlnd_ms_xa_rollback"] b["mysqlnd_qc"] = Set.new ["mysqlnd_qc_clear_cache", "mysqlnd_qc_get_available_handlers", "mysqlnd_qc_get_cache_info", "mysqlnd_qc_get_core_stats", "mysqlnd_qc_get_normalized_query_trace_log", "mysqlnd_qc_get_query_trace_log", "mysqlnd_qc_set_cache_condition", "mysqlnd_qc_set_is_select", "mysqlnd_qc_set_storage_handler", "mysqlnd_qc_set_user_handlers"] b["Mysqlnd_uh"] = Set.new ["mysqlnd_uh_convert_to_mysqlnd", "mysqlnd_uh_set_connection_proxy", "mysqlnd_uh_set_statement_proxy"] b["Ncurses"] = Set.new ["ncurses_addch", "ncurses_addchnstr", "ncurses_addchstr", "ncurses_addnstr", "ncurses_addstr", "ncurses_assume_default_colors", "ncurses_attroff", "ncurses_attron", "ncurses_attrset", "ncurses_baudrate", "ncurses_beep", "ncurses_bkgd", "ncurses_bkgdset", "ncurses_border", "ncurses_bottom_panel", "ncurses_can_change_color", "ncurses_cbreak", "ncurses_clear", "ncurses_clrtobot", "ncurses_clrtoeol", "ncurses_color_content", "ncurses_color_set", "ncurses_curs_set", "ncurses_def_prog_mode", "ncurses_def_shell_mode", "ncurses_define_key", "ncurses_del_panel", "ncurses_delay_output", "ncurses_delch", "ncurses_deleteln", "ncurses_delwin", "ncurses_doupdate", "ncurses_echo", "ncurses_echochar", "ncurses_end", "ncurses_erase", "ncurses_erasechar", "ncurses_filter", "ncurses_flash", "ncurses_flushinp", "ncurses_getch", "ncurses_getmaxyx", "ncurses_getmouse", "ncurses_getyx", "ncurses_halfdelay", "ncurses_has_colors", "ncurses_has_ic", "ncurses_has_il", "ncurses_has_key", "ncurses_hide_panel", "ncurses_hline", "ncurses_inch", "ncurses_init_color", "ncurses_init_pair", "ncurses_init", "ncurses_insch", "ncurses_insdelln", "ncurses_insertln", "ncurses_insstr", "ncurses_instr", "ncurses_isendwin", "ncurses_keyok", "ncurses_keypad", "ncurses_killchar", "ncurses_longname", "ncurses_meta", "ncurses_mouse_trafo", "ncurses_mouseinterval", "ncurses_mousemask", "ncurses_move_panel", "ncurses_move", "ncurses_mvaddch", "ncurses_mvaddchnstr", "ncurses_mvaddchstr", "ncurses_mvaddnstr", "ncurses_mvaddstr", "ncurses_mvcur", "ncurses_mvdelch", "ncurses_mvgetch", "ncurses_mvhline", "ncurses_mvinch", "ncurses_mvvline", "ncurses_mvwaddstr", "ncurses_napms", "ncurses_new_panel", "ncurses_newpad", "ncurses_newwin", "ncurses_nl", "ncurses_nocbreak", "ncurses_noecho", "ncurses_nonl", "ncurses_noqiflush", "ncurses_noraw", "ncurses_pair_content", "ncurses_panel_above", "ncurses_panel_below", "ncurses_panel_window", "ncurses_pnoutrefresh", "ncurses_prefresh", "ncurses_putp", "ncurses_qiflush", "ncurses_raw", "ncurses_refresh", "ncurses_replace_panel", "ncurses_reset_prog_mode", "ncurses_reset_shell_mode", "ncurses_resetty", "ncurses_savetty", "ncurses_scr_dump", "ncurses_scr_init", "ncurses_scr_restore", "ncurses_scr_set", "ncurses_scrl", "ncurses_show_panel", "ncurses_slk_attr", "ncurses_slk_attroff", "ncurses_slk_attron", "ncurses_slk_attrset", "ncurses_slk_clear", "ncurses_slk_color", "ncurses_slk_init", "ncurses_slk_noutrefresh", "ncurses_slk_refresh", "ncurses_slk_restore", "ncurses_slk_set", "ncurses_slk_touch", "ncurses_standend", "ncurses_standout", "ncurses_start_color", "ncurses_termattrs", "ncurses_termname", "ncurses_timeout", "ncurses_top_panel", "ncurses_typeahead", "ncurses_ungetch", "ncurses_ungetmouse", "ncurses_update_panels", "ncurses_use_default_colors", "ncurses_use_env", "ncurses_use_extended_names", "ncurses_vidattr", "ncurses_vline", "ncurses_waddch", "ncurses_waddstr", "ncurses_wattroff", "ncurses_wattron", "ncurses_wattrset", "ncurses_wborder", "ncurses_wclear", "ncurses_wcolor_set", "ncurses_werase", "ncurses_wgetch", "ncurses_whline", "ncurses_wmouse_trafo", "ncurses_wmove", "ncurses_wnoutrefresh", "ncurses_wrefresh", "ncurses_wstandend", "ncurses_wstandout", "ncurses_wvline"] b["Gopher"] = Set.new ["gopher_parsedir"] b["Network"] = Set.new ["checkdnsrr", "closelog", "define_syslog_variables", "dns_check_record", "dns_get_mx", "dns_get_record", "fsockopen", "gethostbyaddr", "gethostbyname", "gethostbynamel", "gethostname", "getmxrr", "getprotobyname", "getprotobynumber", "getservbyname", "getservbyport", "header_register_callback", "header_remove", "header", "headers_list", "headers_sent", "http_response_code", "inet_ntop", "inet_pton", "ip2long", "long2ip", "openlog", "pfsockopen", "setcookie", "setrawcookie", "socket_get_status", "socket_set_blocking", "socket_set_timeout", "syslog"] b["Newt"] = Set.new ["newt_bell", "newt_button_bar", "newt_button", "newt_centered_window", "newt_checkbox_get_value", "newt_checkbox_set_flags", "newt_checkbox_set_value", "newt_checkbox_tree_add_item", "newt_checkbox_tree_find_item", "newt_checkbox_tree_get_current", "newt_checkbox_tree_get_entry_value", "newt_checkbox_tree_get_multi_selection", "newt_checkbox_tree_get_selection", "newt_checkbox_tree_multi", "newt_checkbox_tree_set_current", "newt_checkbox_tree_set_entry_value", "newt_checkbox_tree_set_entry", "newt_checkbox_tree_set_width", "newt_checkbox_tree", "newt_checkbox", "newt_clear_key_buffer", "newt_cls", "newt_compact_button", "newt_component_add_callback", "newt_component_takes_focus", "newt_create_grid", "newt_cursor_off", "newt_cursor_on", "newt_delay", "newt_draw_form", "newt_draw_root_text", "newt_entry_get_value", "newt_entry_set_filter", "newt_entry_set_flags", "newt_entry_set", "newt_entry", "newt_finished", "newt_form_add_component", "newt_form_add_components", "newt_form_add_hot_key", "newt_form_destroy", "newt_form_get_current", "newt_form_run", "newt_form_set_background", "newt_form_set_height", "newt_form_set_size", "newt_form_set_timer", "newt_form_set_width", "newt_form_watch_fd", "newt_form", "newt_get_screen_size", "newt_grid_add_components_to_form", "newt_grid_basic_window", "newt_grid_free", "newt_grid_get_size", "newt_grid_h_close_stacked", "newt_grid_h_stacked", "newt_grid_place", "newt_grid_set_field", "newt_grid_simple_window", "newt_grid_v_close_stacked", "newt_grid_v_stacked", "newt_grid_wrapped_window_at", "newt_grid_wrapped_window", "newt_init", "newt_label_set_text", "newt_label", "newt_listbox_append_entry", "newt_listbox_clear_selection", "newt_listbox_clear", "newt_listbox_delete_entry", "newt_listbox_get_current", "newt_listbox_get_selection", "newt_listbox_insert_entry", "newt_listbox_item_count", "newt_listbox_select_item", "newt_listbox_set_current_by_key", "newt_listbox_set_current", "newt_listbox_set_data", "newt_listbox_set_entry", "newt_listbox_set_width", "newt_listbox", "newt_listitem_get_data", "newt_listitem_set", "newt_listitem", "newt_open_window", "newt_pop_help_line", "newt_pop_window", "newt_push_help_line", "newt_radio_get_current", "newt_radiobutton", "newt_redraw_help_line", "newt_reflow_text", "newt_refresh", "newt_resize_screen", "newt_resume", "newt_run_form", "newt_scale_set", "newt_scale", "newt_scrollbar_set", "newt_set_help_callback", "newt_set_suspend_callback", "newt_suspend", "newt_textbox_get_num_lines", "newt_textbox_reflowed", "newt_textbox_set_height", "newt_textbox_set_text", "newt_textbox", "newt_vertical_scrollbar", "newt_wait_for_key", "newt_win_choice", "newt_win_entries", "newt_win_menu", "newt_win_message", "newt_win_messagev", "newt_win_ternary"] b["YP/NIS"] = Set.new ["yp_all", "yp_cat", "yp_err_string", "yp_errno", "yp_first", "yp_get_default_domain", "yp_master", "yp_match", "yp_next", "yp_order"] b["NSAPI"] = Set.new ["nsapi_request_headers", "nsapi_response_headers", "nsapi_virtual"] b["OAuth"] = Set.new ["oauth_get_sbs", "oauth_urlencode"] b["OCI8"] = Set.new ["oci_bind_array_by_name", "oci_bind_by_name", "oci_cancel", "oci_client_version", "oci_close", "oci_commit", "oci_connect", "oci_define_by_name", "oci_error", "oci_execute", "oci_fetch_all", "oci_fetch_array", "oci_fetch_assoc", "oci_fetch_object", "oci_fetch_row", "oci_fetch", "oci_field_is_null", "oci_field_name", "oci_field_precision", "oci_field_scale", "oci_field_size", "oci_field_type_raw", "oci_field_type", "oci_free_descriptor", "oci_free_statement", "oci_get_implicit_resultset", "oci_internal_debug", "oci_lob_copy", "oci_lob_is_equal", "oci_new_collection", "oci_new_connect", "oci_new_cursor", "oci_new_descriptor", "oci_num_fields", "oci_num_rows", "oci_parse", "oci_password_change", "oci_pconnect", "oci_register_taf_callback", "oci_result", "oci_rollback", "oci_server_version", "oci_set_action", "oci_set_call_timeout", "oci_set_client_identifier", "oci_set_client_info", "oci_set_db_operation", "oci_set_edition", "oci_set_module_name", "oci_set_prefetch", "oci_statement_type", "oci_unregister_taf_callback"] b["OPcache"] = Set.new ["opcache_compile_file", "opcache_get_configuration", "opcache_get_status", "opcache_invalidate", "opcache_is_script_cached", "opcache_reset"] b["OpenAL"] = Set.new ["openal_buffer_create", "openal_buffer_data", "openal_buffer_destroy", "openal_buffer_get", "openal_buffer_loadwav", "openal_context_create", "openal_context_current", "openal_context_destroy", "openal_context_process", "openal_context_suspend", "openal_device_close", "openal_device_open", "openal_listener_get", "openal_listener_set", "openal_source_create", "openal_source_destroy", "openal_source_get", "openal_source_pause", "openal_source_play", "openal_source_rewind", "openal_source_set", "openal_source_stop", "openal_stream"] b["OpenSSL"] = Set.new ["openssl_cipher_iv_length", "openssl_csr_export_to_file", "openssl_csr_export", "openssl_csr_get_public_key", "openssl_csr_get_subject", "openssl_csr_new", "openssl_csr_sign", "openssl_decrypt", "openssl_dh_compute_key", "openssl_digest", "openssl_encrypt", "openssl_error_string", "openssl_free_key", "openssl_get_cert_locations", "openssl_get_cipher_methods", "openssl_get_curve_names", "openssl_get_md_methods", "openssl_get_privatekey", "openssl_get_publickey", "openssl_open", "openssl_pbkdf2", "openssl_pkcs12_export_to_file", "openssl_pkcs12_export", "openssl_pkcs12_read", "openssl_pkcs7_decrypt", "openssl_pkcs7_encrypt", "openssl_pkcs7_read", "openssl_pkcs7_sign", "openssl_pkcs7_verify", "openssl_pkey_export_to_file", "openssl_pkey_export", "openssl_pkey_free", "openssl_pkey_get_details", "openssl_pkey_get_private", "openssl_pkey_get_public", "openssl_pkey_new", "openssl_private_decrypt", "openssl_private_encrypt", "openssl_public_decrypt", "openssl_public_encrypt", "openssl_random_pseudo_bytes", "openssl_seal", "openssl_sign", "openssl_spki_export_challenge", "openssl_spki_export", "openssl_spki_new", "openssl_spki_verify", "openssl_verify", "openssl_x509_check_private_key", "openssl_x509_checkpurpose", "openssl_x509_export_to_file", "openssl_x509_export", "openssl_x509_fingerprint", "openssl_x509_free", "openssl_x509_parse", "openssl_x509_read", "openssl_x509_verify"] b["Output Control"] = Set.new ["flush", "ob_clean", "ob_end_clean", "ob_end_flush", "ob_flush", "ob_get_clean", "ob_get_contents", "ob_get_flush", "ob_get_length", "ob_get_level", "ob_get_status", "ob_gzhandler", "ob_implicit_flush", "ob_list_handlers", "ob_start", "output_add_rewrite_var", "output_reset_rewrite_vars"] b["Paradox"] = Set.new ["px_close", "px_create_fp", "px_date2string", "px_delete_record", "px_delete", "px_get_field", "px_get_info", "px_get_parameter", "px_get_record", "px_get_schema", "px_get_value", "px_insert_record", "px_new", "px_numfields", "px_numrecords", "px_open_fp", "px_put_record", "px_retrieve_record", "px_set_blob_file", "px_set_parameter", "px_set_tablename", "px_set_targetencoding", "px_set_value", "px_timestamp2string", "px_update_record"] b["Parsekit"] = Set.new ["parsekit_compile_file", "parsekit_compile_string", "parsekit_func_arginfo"] b["Password Hashing"] = Set.new ["password_get_info", "password_hash", "password_needs_rehash", "password_verify"] b["PCNTL"] = Set.new ["pcntl_alarm", "pcntl_async_signals", "pcntl_errno", "pcntl_exec", "pcntl_fork", "pcntl_get_last_error", "pcntl_getpriority", "pcntl_setpriority", "pcntl_signal_dispatch", "pcntl_signal_get_handler", "pcntl_signal", "pcntl_sigprocmask", "pcntl_sigtimedwait", "pcntl_sigwaitinfo", "pcntl_strerror", "pcntl_wait", "pcntl_waitpid", "pcntl_wexitstatus", "pcntl_wifexited", "pcntl_wifsignaled", "pcntl_wifstopped", "pcntl_wstopsig", "pcntl_wtermsig"] b["PCRE"] = Set.new ["preg_filter", "preg_grep", "preg_last_error", "preg_match_all", "preg_match", "preg_quote", "preg_replace_callback_array", "preg_replace_callback", "preg_replace", "preg_split"] b["PDF"] = Set.new ["PDF_activate_item", "PDF_add_annotation", "PDF_add_bookmark", "PDF_add_launchlink", "PDF_add_locallink", "PDF_add_nameddest", "PDF_add_note", "PDF_add_outline", "PDF_add_pdflink", "PDF_add_table_cell", "PDF_add_textflow", "PDF_add_thumbnail", "PDF_add_weblink", "PDF_arc", "PDF_arcn", "PDF_attach_file", "PDF_begin_document", "PDF_begin_font", "PDF_begin_glyph", "PDF_begin_item", "PDF_begin_layer", "PDF_begin_page_ext", "PDF_begin_page", "PDF_begin_pattern", "PDF_begin_template_ext", "PDF_begin_template", "PDF_circle", "PDF_clip", "PDF_close_image", "PDF_close_pdi_page", "PDF_close_pdi", "PDF_close", "PDF_closepath_fill_stroke", "PDF_closepath_stroke", "PDF_closepath", "PDF_concat", "PDF_continue_text", "PDF_create_3dview", "PDF_create_action", "PDF_create_annotation", "PDF_create_bookmark", "PDF_create_field", "PDF_create_fieldgroup", "PDF_create_gstate", "PDF_create_pvf", "PDF_create_textflow", "PDF_curveto", "PDF_define_layer", "PDF_delete_pvf", "PDF_delete_table", "PDF_delete_textflow", "PDF_delete", "PDF_encoding_set_char", "PDF_end_document", "PDF_end_font", "PDF_end_glyph", "PDF_end_item", "PDF_end_layer", "PDF_end_page_ext", "PDF_end_page", "PDF_end_pattern", "PDF_end_template", "PDF_endpath", "PDF_fill_imageblock", "PDF_fill_pdfblock", "PDF_fill_stroke", "PDF_fill_textblock", "PDF_fill", "PDF_findfont", "PDF_fit_image", "PDF_fit_pdi_page", "PDF_fit_table", "PDF_fit_textflow", "PDF_fit_textline", "PDF_get_apiname", "PDF_get_buffer", "PDF_get_errmsg", "PDF_get_errnum", "PDF_get_font", "PDF_get_fontname", "PDF_get_fontsize", "PDF_get_image_height", "PDF_get_image_width", "PDF_get_majorversion", "PDF_get_minorversion", "PDF_get_parameter", "PDF_get_pdi_parameter", "PDF_get_pdi_value", "PDF_get_value", "PDF_info_font", "PDF_info_matchbox", "PDF_info_table", "PDF_info_textflow", "PDF_info_textline", "PDF_initgraphics", "PDF_lineto", "PDF_load_3ddata", "PDF_load_font", "PDF_load_iccprofile", "PDF_load_image", "PDF_makespotcolor", "PDF_moveto", "PDF_new", "PDF_open_ccitt", "PDF_open_file", "PDF_open_gif", "PDF_open_image_file", "PDF_open_image", "PDF_open_jpeg", "PDF_open_memory_image", "PDF_open_pdi_document", "PDF_open_pdi_page", "PDF_open_pdi", "PDF_open_tiff", "PDF_pcos_get_number", "PDF_pcos_get_stream", "PDF_pcos_get_string", "PDF_place_image", "PDF_place_pdi_page", "PDF_process_pdi", "PDF_rect", "PDF_restore", "PDF_resume_page", "PDF_rotate", "PDF_save", "PDF_scale", "PDF_set_border_color", "PDF_set_border_dash", "PDF_set_border_style", "PDF_set_char_spacing", "PDF_set_duration", "PDF_set_gstate", "PDF_set_horiz_scaling", "PDF_set_info_author", "PDF_set_info_creator", "PDF_set_info_keywords", "PDF_set_info_subject", "PDF_set_info_title", "PDF_set_info", "PDF_set_layer_dependency", "PDF_set_leading", "PDF_set_parameter", "PDF_set_text_matrix", "PDF_set_text_pos", "PDF_set_text_rendering", "PDF_set_text_rise", "PDF_set_value", "PDF_set_word_spacing", "PDF_setcolor", "PDF_setdash", "PDF_setdashpattern", "PDF_setflat", "PDF_setfont", "PDF_setgray_fill", "PDF_setgray_stroke", "PDF_setgray", "PDF_setlinecap", "PDF_setlinejoin", "PDF_setlinewidth", "PDF_setmatrix", "PDF_setmiterlimit", "PDF_setpolydash", "PDF_setrgbcolor_fill", "PDF_setrgbcolor_stroke", "PDF_setrgbcolor", "PDF_shading_pattern", "PDF_shading", "PDF_shfill", "PDF_show_boxed", "PDF_show_xy", "PDF_show", "PDF_skew", "PDF_stringwidth", "PDF_stroke", "PDF_suspend_page", "PDF_translate", "PDF_utf16_to_utf8", "PDF_utf32_to_utf16", "PDF_utf8_to_utf16"] b["PostgreSQL"] = Set.new ["pg_affected_rows", "pg_cancel_query", "pg_client_encoding", "pg_close", "pg_connect_poll", "pg_connect", "pg_connection_busy", "pg_connection_reset", "pg_connection_status", "pg_consume_input", "pg_convert", "pg_copy_from", "pg_copy_to", "pg_dbname", "pg_delete", "pg_end_copy", "pg_escape_bytea", "pg_escape_identifier", "pg_escape_literal", "pg_escape_string", "pg_execute", "pg_fetch_all_columns", "pg_fetch_all", "pg_fetch_array", "pg_fetch_assoc", "pg_fetch_object", "pg_fetch_result", "pg_fetch_row", "pg_field_is_null", "pg_field_name", "pg_field_num", "pg_field_prtlen", "pg_field_size", "pg_field_table", "pg_field_type_oid", "pg_field_type", "pg_flush", "pg_free_result", "pg_get_notify", "pg_get_pid", "pg_get_result", "pg_host", "pg_insert", "pg_last_error", "pg_last_notice", "pg_last_oid", "pg_lo_close", "pg_lo_create", "pg_lo_export", "pg_lo_import", "pg_lo_open", "pg_lo_read_all", "pg_lo_read", "pg_lo_seek", "pg_lo_tell", "pg_lo_truncate", "pg_lo_unlink", "pg_lo_write", "pg_meta_data", "pg_num_fields", "pg_num_rows", "pg_options", "pg_parameter_status", "pg_pconnect", "pg_ping", "pg_port", "pg_prepare", "pg_put_line", "pg_query_params", "pg_query", "pg_result_error_field", "pg_result_error", "pg_result_seek", "pg_result_status", "pg_select", "pg_send_execute", "pg_send_prepare", "pg_send_query_params", "pg_send_query", "pg_set_client_encoding", "pg_set_error_verbosity", "pg_socket", "pg_trace", "pg_transaction_status", "pg_tty", "pg_unescape_bytea", "pg_untrace", "pg_update", "pg_version"] b["phpdbg"] = Set.new ["phpdbg_break_file", "phpdbg_break_function", "phpdbg_break_method", "phpdbg_break_next", "phpdbg_clear", "phpdbg_color", "phpdbg_end_oplog", "phpdbg_exec", "phpdbg_get_executable", "phpdbg_prompt", "phpdbg_start_oplog"] b["POSIX"] = Set.new ["posix_access", "posix_ctermid", "posix_errno", "posix_get_last_error", "posix_getcwd", "posix_getegid", "posix_geteuid", "posix_getgid", "posix_getgrgid", "posix_getgrnam", "posix_getgroups", "posix_getlogin", "posix_getpgid", "posix_getpgrp", "posix_getpid", "posix_getppid", "posix_getpwnam", "posix_getpwuid", "posix_getrlimit", "posix_getsid", "posix_getuid", "posix_initgroups", "posix_isatty", "posix_kill", "posix_mkfifo", "posix_mknod", "posix_setegid", "posix_seteuid", "posix_setgid", "posix_setpgid", "posix_setrlimit", "posix_setsid", "posix_setuid", "posix_strerror", "posix_times", "posix_ttyname", "posix_uname"] b["Proctitle"] = Set.new ["setproctitle", "setthreadtitle"] b["PS"] = Set.new ["ps_add_bookmark", "ps_add_launchlink", "ps_add_locallink", "ps_add_note", "ps_add_pdflink", "ps_add_weblink", "ps_arc", "ps_arcn", "ps_begin_page", "ps_begin_pattern", "ps_begin_template", "ps_circle", "ps_clip", "ps_close_image", "ps_close", "ps_closepath_stroke", "ps_closepath", "ps_continue_text", "ps_curveto", "ps_delete", "ps_end_page", "ps_end_pattern", "ps_end_template", "ps_fill_stroke", "ps_fill", "ps_findfont", "ps_get_buffer", "ps_get_parameter", "ps_get_value", "ps_hyphenate", "ps_include_file", "ps_lineto", "ps_makespotcolor", "ps_moveto", "ps_new", "ps_open_file", "ps_open_image_file", "ps_open_image", "ps_open_memory_image", "ps_place_image", "ps_rect", "ps_restore", "ps_rotate", "ps_save", "ps_scale", "ps_set_border_color", "ps_set_border_dash", "ps_set_border_style", "ps_set_info", "ps_set_parameter", "ps_set_text_pos", "ps_set_value", "ps_setcolor", "ps_setdash", "ps_setflat", "ps_setfont", "ps_setgray", "ps_setlinecap", "ps_setlinejoin", "ps_setlinewidth", "ps_setmiterlimit", "ps_setoverprintmode", "ps_setpolydash", "ps_shading_pattern", "ps_shading", "ps_shfill", "ps_show_boxed", "ps_show_xy2", "ps_show_xy", "ps_show2", "ps_show", "ps_string_geometry", "ps_stringwidth", "ps_stroke", "ps_symbol_name", "ps_symbol_width", "ps_symbol", "ps_translate"] b["Pspell"] = Set.new ["pspell_add_to_personal", "pspell_add_to_session", "pspell_check", "pspell_clear_session", "pspell_config_create", "pspell_config_data_dir", "pspell_config_dict_dir", "pspell_config_ignore", "pspell_config_mode", "pspell_config_personal", "pspell_config_repl", "pspell_config_runtogether", "pspell_config_save_repl", "pspell_new_config", "pspell_new_personal", "pspell_new", "pspell_save_wordlist", "pspell_store_replacement", "pspell_suggest"] b["Radius"] = Set.new ["radius_acct_open", "radius_add_server", "radius_auth_open", "radius_close", "radius_config", "radius_create_request", "radius_cvt_addr", "radius_cvt_int", "radius_cvt_string", "radius_demangle_mppe_key", "radius_demangle", "radius_get_attr", "radius_get_tagged_attr_data", "radius_get_tagged_attr_tag", "radius_get_vendor_attr", "radius_put_addr", "radius_put_attr", "radius_put_int", "radius_put_string", "radius_put_vendor_addr", "radius_put_vendor_attr", "radius_put_vendor_int", "radius_put_vendor_string", "radius_request_authenticator", "radius_salt_encrypt_attr", "radius_send_request", "radius_server_secret", "radius_strerror"] b["Rar"] = Set.new ["rar_wrapper_cache_stats"] b["Readline"] = Set.new ["readline_add_history", "readline_callback_handler_install", "readline_callback_handler_remove", "readline_callback_read_char", "readline_clear_history", "readline_completion_function", "readline_info", "readline_list_history", "readline_on_new_line", "readline_read_history", "readline_redisplay", "readline_write_history", "readline"] b["Recode"] = Set.new ["recode_file", "recode_string", "recode"] b["POSIX Regex"] = Set.new ["ereg_replace", "ereg", "eregi_replace", "eregi", "split", "spliti", "sql_regcase"] b["RpmInfo"] = Set.new ["rpmaddtag", "rpmdbinfo", "rpmdbsearch", "rpminfo", "rpmvercmp"] b["RPM Reader"] = Set.new ["rpm_close", "rpm_get_tag", "rpm_is_valid", "rpm_open", "rpm_version"] b["RRD"] = Set.new ["rrd_create", "rrd_error", "rrd_fetch", "rrd_first", "rrd_graph", "rrd_info", "rrd_last", "rrd_lastupdate", "rrd_restore", "rrd_tune", "rrd_update", "rrd_version", "rrd_xport", "rrdc_disconnect"] b["runkit"] = Set.new ["runkit_class_adopt", "runkit_class_emancipate", "runkit_constant_add", "runkit_constant_redefine", "runkit_constant_remove", "runkit_function_add", "runkit_function_copy", "runkit_function_redefine", "runkit_function_remove", "runkit_function_rename", "runkit_import", "runkit_lint_file", "runkit_lint", "runkit_method_add", "runkit_method_copy", "runkit_method_redefine", "runkit_method_remove", "runkit_method_rename", "runkit_return_value_used", "runkit_sandbox_output_handler", "runkit_superglobals"] b["runkit7"] = Set.new ["runkit7_constant_add", "runkit7_constant_redefine", "runkit7_constant_remove", "runkit7_function_add", "runkit7_function_copy", "runkit7_function_redefine", "runkit7_function_remove", "runkit7_function_rename", "runkit7_import", "runkit7_method_add", "runkit7_method_copy", "runkit7_method_redefine", "runkit7_method_remove", "runkit7_method_rename", "runkit7_object_id", "runkit7_superglobals", "runkit7_zval_inspect"] b["Scoutapm"] = Set.new ["scoutapm_get_calls", "scoutapm_list_instrumented_functions"] b["Seaslog"] = Set.new ["seaslog_get_author", "seaslog_get_version"] b["Semaphore"] = Set.new ["ftok", "msg_get_queue", "msg_queue_exists", "msg_receive", "msg_remove_queue", "msg_send", "msg_set_queue", "msg_stat_queue", "sem_acquire", "sem_get", "sem_release", "sem_remove", "shm_attach", "shm_detach", "shm_get_var", "shm_has_var", "shm_put_var", "shm_remove_var", "shm_remove"] b["Session PgSQL"] = Set.new ["session_pgsql_add_error", "session_pgsql_get_error", "session_pgsql_get_field", "session_pgsql_reset", "session_pgsql_set_field", "session_pgsql_status"] b["Session"] = Set.new ["session_abort", "session_cache_expire", "session_cache_limiter", "session_commit", "session_create_id", "session_decode", "session_destroy", "session_encode", "session_gc", "session_get_cookie_params", "session_id", "session_is_registered", "session_module_name", "session_name", "session_regenerate_id", "session_register_shutdown", "session_register", "session_reset", "session_save_path", "session_set_cookie_params", "session_set_save_handler", "session_start", "session_status", "session_unregister", "session_unset", "session_write_close"] b["Shared Memory"] = Set.new ["shmop_close", "shmop_delete", "shmop_open", "shmop_read", "shmop_size", "shmop_write"] b["SimpleXML"] = Set.new ["simplexml_import_dom", "simplexml_load_file", "simplexml_load_string"] b["SNMP"] = Set.new ["snmp_get_quick_print", "snmp_get_valueretrieval", "snmp_read_mib", "snmp_set_enum_print", "snmp_set_oid_numeric_print", "snmp_set_oid_output_format", "snmp_set_quick_print", "snmp_set_valueretrieval", "snmp2_get", "snmp2_getnext", "snmp2_real_walk", "snmp2_set", "snmp2_walk", "snmp3_get", "snmp3_getnext", "snmp3_real_walk", "snmp3_set", "snmp3_walk", "snmpget", "snmpgetnext", "snmprealwalk", "snmpset", "snmpwalk", "snmpwalkoid"] b["SOAP"] = Set.new ["is_soap_fault", "use_soap_error_handler"] b["Socket"] = Set.new ["socket_accept", "socket_addrinfo_bind", "socket_addrinfo_connect", "socket_addrinfo_explain", "socket_addrinfo_lookup", "socket_bind", "socket_clear_error", "socket_close", "socket_cmsg_space", "socket_connect", "socket_create_listen", "socket_create_pair", "socket_create", "socket_export_stream", "socket_get_option", "socket_getopt", "socket_getpeername", "socket_getsockname", "socket_import_stream", "socket_last_error", "socket_listen", "socket_read", "socket_recv", "socket_recvfrom", "socket_recvmsg", "socket_select", "socket_send", "socket_sendmsg", "socket_sendto", "socket_set_block", "socket_set_nonblock", "socket_set_option", "socket_setopt", "socket_shutdown", "socket_strerror", "socket_write", "socket_wsaprotocol_info_export", "socket_wsaprotocol_info_import", "socket_wsaprotocol_info_release"] b["Sodium"] = Set.new ["sodium_add", "sodium_base642bin", "sodium_bin2base64", "sodium_bin2hex", "sodium_compare", "sodium_crypto_aead_aes256gcm_decrypt", "sodium_crypto_aead_aes256gcm_encrypt", "sodium_crypto_aead_aes256gcm_is_available", "sodium_crypto_aead_aes256gcm_keygen", "sodium_crypto_aead_chacha20poly1305_decrypt", "sodium_crypto_aead_chacha20poly1305_encrypt", "sodium_crypto_aead_chacha20poly1305_ietf_decrypt", "sodium_crypto_aead_chacha20poly1305_ietf_encrypt", "sodium_crypto_aead_chacha20poly1305_ietf_keygen", "sodium_crypto_aead_chacha20poly1305_keygen", "sodium_crypto_aead_xchacha20poly1305_ietf_decrypt", "sodium_crypto_aead_xchacha20poly1305_ietf_encrypt", "sodium_crypto_aead_xchacha20poly1305_ietf_keygen", "sodium_crypto_auth_keygen", "sodium_crypto_auth_verify", "sodium_crypto_auth", "sodium_crypto_box_keypair_from_secretkey_and_publickey", "sodium_crypto_box_keypair", "sodium_crypto_box_open", "sodium_crypto_box_publickey_from_secretkey", "sodium_crypto_box_publickey", "sodium_crypto_box_seal_open", "sodium_crypto_box_seal", "sodium_crypto_box_secretkey", "sodium_crypto_box_seed_keypair", "sodium_crypto_box", "sodium_crypto_generichash_final", "sodium_crypto_generichash_init", "sodium_crypto_generichash_keygen", "sodium_crypto_generichash_update", "sodium_crypto_generichash", "sodium_crypto_kdf_derive_from_key", "sodium_crypto_kdf_keygen", "sodium_crypto_kx_client_session_keys", "sodium_crypto_kx_keypair", "sodium_crypto_kx_publickey", "sodium_crypto_kx_secretkey", "sodium_crypto_kx_seed_keypair", "sodium_crypto_kx_server_session_keys", "sodium_crypto_pwhash_scryptsalsa208sha256_str_verify", "sodium_crypto_pwhash_scryptsalsa208sha256_str", "sodium_crypto_pwhash_scryptsalsa208sha256", "sodium_crypto_pwhash_str_needs_rehash", "sodium_crypto_pwhash_str_verify", "sodium_crypto_pwhash_str", "sodium_crypto_pwhash", "sodium_crypto_scalarmult_base", "sodium_crypto_scalarmult", "sodium_crypto_secretbox_keygen", "sodium_crypto_secretbox_open", "sodium_crypto_secretbox", "sodium_crypto_secretstream_xchacha20poly1305_init_pull", "sodium_crypto_secretstream_xchacha20poly1305_init_push", "sodium_crypto_secretstream_xchacha20poly1305_keygen", "sodium_crypto_secretstream_xchacha20poly1305_pull", "sodium_crypto_secretstream_xchacha20poly1305_push", "sodium_crypto_secretstream_xchacha20poly1305_rekey", "sodium_crypto_shorthash_keygen", "sodium_crypto_shorthash", "sodium_crypto_sign_detached", "sodium_crypto_sign_ed25519_pk_to_curve25519", "sodium_crypto_sign_ed25519_sk_to_curve25519", "sodium_crypto_sign_keypair_from_secretkey_and_publickey", "sodium_crypto_sign_keypair", "sodium_crypto_sign_open", "sodium_crypto_sign_publickey_from_secretkey", "sodium_crypto_sign_publickey", "sodium_crypto_sign_secretkey", "sodium_crypto_sign_seed_keypair", "sodium_crypto_sign_verify_detached", "sodium_crypto_sign", "sodium_crypto_stream_keygen", "sodium_crypto_stream_xor", "sodium_crypto_stream", "sodium_hex2bin", "sodium_increment", "sodium_memcmp", "sodium_memzero", "sodium_pad", "sodium_unpad"] b["Solr"] = Set.new ["solr_get_version"] b["SPL"] = Set.new ["class_implements", "class_parents", "class_uses", "iterator_apply", "iterator_count", "iterator_to_array", "spl_autoload_call", "spl_autoload_extensions", "spl_autoload_functions", "spl_autoload_register", "spl_autoload_unregister", "spl_autoload", "spl_classes", "spl_object_hash", "spl_object_id"] b["SQLite"] = Set.new ["sqlite_array_query", "sqlite_busy_timeout", "sqlite_changes", "sqlite_close", "sqlite_column", "sqlite_create_aggregate", "sqlite_create_function", "sqlite_current", "sqlite_error_string", "sqlite_escape_string", "sqlite_exec", "sqlite_factory", "sqlite_fetch_all", "sqlite_fetch_array", "sqlite_fetch_column_types", "sqlite_fetch_object", "sqlite_fetch_single", "sqlite_fetch_string", "sqlite_field_name", "sqlite_has_more", "sqlite_has_prev", "sqlite_key", "sqlite_last_error", "sqlite_last_insert_rowid", "sqlite_libencoding", "sqlite_libversion", "sqlite_next", "sqlite_num_fields", "sqlite_num_rows", "sqlite_open", "sqlite_popen", "sqlite_prev", "sqlite_query", "sqlite_rewind", "sqlite_seek", "sqlite_single_query", "sqlite_udf_decode_binary", "sqlite_udf_encode_binary", "sqlite_unbuffered_query", "sqlite_valid"] b["SQLSRV"] = Set.new ["sqlsrv_begin_transaction", "sqlsrv_cancel", "sqlsrv_client_info", "sqlsrv_close", "sqlsrv_commit", "sqlsrv_configure", "sqlsrv_connect", "sqlsrv_errors", "sqlsrv_execute", "sqlsrv_fetch_array", "sqlsrv_fetch_object", "sqlsrv_fetch", "sqlsrv_field_metadata", "sqlsrv_free_stmt", "sqlsrv_get_config", "sqlsrv_get_field", "sqlsrv_has_rows", "sqlsrv_next_result", "sqlsrv_num_fields", "sqlsrv_num_rows", "sqlsrv_prepare", "sqlsrv_query", "sqlsrv_rollback", "sqlsrv_rows_affected", "sqlsrv_send_stream_data", "sqlsrv_server_info"] b["ssdeep"] = Set.new ["ssdeep_fuzzy_compare", "ssdeep_fuzzy_hash_filename", "ssdeep_fuzzy_hash"] b["SSH2"] = Set.new ["ssh2_auth_agent", "ssh2_auth_hostbased_file", "ssh2_auth_none", "ssh2_auth_password", "ssh2_auth_pubkey_file", "ssh2_connect", "ssh2_disconnect", "ssh2_exec", "ssh2_fetch_stream", "ssh2_fingerprint", "ssh2_methods_negotiated", "ssh2_publickey_add", "ssh2_publickey_init", "ssh2_publickey_list", "ssh2_publickey_remove", "ssh2_scp_recv", "ssh2_scp_send", "ssh2_sftp_chmod", "ssh2_sftp_lstat", "ssh2_sftp_mkdir", "ssh2_sftp_readlink", "ssh2_sftp_realpath", "ssh2_sftp_rename", "ssh2_sftp_rmdir", "ssh2_sftp_stat", "ssh2_sftp_symlink", "ssh2_sftp_unlink", "ssh2_sftp", "ssh2_shell", "ssh2_tunnel"] b["Statistic"] = Set.new ["stats_absolute_deviation", "stats_cdf_beta", "stats_cdf_binomial", "stats_cdf_cauchy", "stats_cdf_chisquare", "stats_cdf_exponential", "stats_cdf_f", "stats_cdf_gamma", "stats_cdf_laplace", "stats_cdf_logistic", "stats_cdf_negative_binomial", "stats_cdf_noncentral_chisquare", "stats_cdf_noncentral_f", "stats_cdf_noncentral_t", "stats_cdf_normal", "stats_cdf_poisson", "stats_cdf_t", "stats_cdf_uniform", "stats_cdf_weibull", "stats_covariance", "stats_dens_beta", "stats_dens_cauchy", "stats_dens_chisquare", "stats_dens_exponential", "stats_dens_f", "stats_dens_gamma", "stats_dens_laplace", "stats_dens_logistic", "stats_dens_normal", "stats_dens_pmf_binomial", "stats_dens_pmf_hypergeometric", "stats_dens_pmf_negative_binomial", "stats_dens_pmf_poisson", "stats_dens_t", "stats_dens_uniform", "stats_dens_weibull", "stats_harmonic_mean", "stats_kurtosis", "stats_rand_gen_beta", "stats_rand_gen_chisquare", "stats_rand_gen_exponential", "stats_rand_gen_f", "stats_rand_gen_funiform", "stats_rand_gen_gamma", "stats_rand_gen_ibinomial_negative", "stats_rand_gen_ibinomial", "stats_rand_gen_int", "stats_rand_gen_ipoisson", "stats_rand_gen_iuniform", "stats_rand_gen_noncentral_chisquare", "stats_rand_gen_noncentral_f", "stats_rand_gen_noncentral_t", "stats_rand_gen_normal", "stats_rand_gen_t", "stats_rand_get_seeds", "stats_rand_phrase_to_seeds", "stats_rand_ranf", "stats_rand_setall", "stats_skew", "stats_standard_deviation", "stats_stat_binomial_coef", "stats_stat_correlation", "stats_stat_factorial", "stats_stat_independent_t", "stats_stat_innerproduct", "stats_stat_paired_t", "stats_stat_percentile", "stats_stat_powersum", "stats_variance"] b["Stomp"] = Set.new ["stomp_connect_error", "stomp_version"] b["Stream"] = Set.new ["set_socket_blocking", "stream_bucket_append", "stream_bucket_make_writeable", "stream_bucket_new", "stream_bucket_prepend", "stream_context_create", "stream_context_get_default", "stream_context_get_options", "stream_context_get_params", "stream_context_set_default", "stream_context_set_option", "stream_context_set_params", "stream_copy_to_stream", "stream_filter_append", "stream_filter_prepend", "stream_filter_register", "stream_filter_remove", "stream_get_contents", "stream_get_filters", "stream_get_line", "stream_get_meta_data", "stream_get_transports", "stream_get_wrappers", "stream_is_local", "stream_isatty", "stream_notification_callback", "stream_register_wrapper", "stream_resolve_include_path", "stream_select", "stream_set_blocking", "stream_set_chunk_size", "stream_set_read_buffer", "stream_set_timeout", "stream_set_write_buffer", "stream_socket_accept", "stream_socket_client", "stream_socket_enable_crypto", "stream_socket_get_name", "stream_socket_pair", "stream_socket_recvfrom", "stream_socket_sendto", "stream_socket_server", "stream_socket_shutdown", "stream_supports_lock", "stream_wrapper_register", "stream_wrapper_restore", "stream_wrapper_unregister"] b["String"] = Set.new ["addcslashes", "addslashes", "bin2hex", "chop", "chr", "chunk_split", "convert_cyr_string", "convert_uudecode", "convert_uuencode", "count_chars", "crc32", "crypt", "echo", "explode", "fprintf", "get_html_translation_table", "hebrev", "hebrevc", "hex2bin", "html_entity_decode", "htmlentities", "htmlspecialchars_decode", "htmlspecialchars", "implode", "join", "lcfirst", "levenshtein", "localeconv", "ltrim", "md5_file", "md5", "metaphone", "money_format", "nl_langinfo", "nl2br", "number_format", "ord", "parse_str", "print", "printf", "quoted_printable_decode", "quoted_printable_encode", "quotemeta", "rtrim", "setlocale", "sha1_file", "sha1", "similar_text", "soundex", "sprintf", "sscanf", "str_getcsv", "str_ireplace", "str_pad", "str_repeat", "str_replace", "str_rot13", "str_shuffle", "str_split", "str_word_count", "strcasecmp", "strchr", "strcmp", "strcoll", "strcspn", "strip_tags", "stripcslashes", "stripos", "stripslashes", "stristr", "strlen", "strnatcasecmp", "strnatcmp", "strncasecmp", "strncmp", "strpbrk", "strpos", "strrchr", "strrev", "strripos", "strrpos", "strspn", "strstr", "strtok", "strtolower", "strtoupper", "strtr", "substr_compare", "substr_count", "substr_replace", "substr", "trim", "ucfirst", "ucwords", "vfprintf", "vprintf", "vsprintf", "wordwrap"] b["SVN"] = Set.new ["svn_add", "svn_auth_get_parameter", "svn_auth_set_parameter", "svn_blame", "svn_cat", "svn_checkout", "svn_cleanup", "svn_client_version", "svn_commit", "svn_delete", "svn_diff", "svn_export", "svn_fs_abort_txn", "svn_fs_apply_text", "svn_fs_begin_txn2", "svn_fs_change_node_prop", "svn_fs_check_path", "svn_fs_contents_changed", "svn_fs_copy", "svn_fs_delete", "svn_fs_dir_entries", "svn_fs_file_contents", "svn_fs_file_length", "svn_fs_is_dir", "svn_fs_is_file", "svn_fs_make_dir", "svn_fs_make_file", "svn_fs_node_created_rev", "svn_fs_node_prop", "svn_fs_props_changed", "svn_fs_revision_prop", "svn_fs_revision_root", "svn_fs_txn_root", "svn_fs_youngest_rev", "svn_import", "svn_log", "svn_ls", "svn_mkdir", "svn_repos_create", "svn_repos_fs_begin_txn_for_commit", "svn_repos_fs_commit_txn", "svn_repos_fs", "svn_repos_hotcopy", "svn_repos_open", "svn_repos_recover", "svn_revert", "svn_status", "svn_update"] b["Swoole"] = Set.new ["swoole_async_dns_lookup", "swoole_async_read", "swoole_async_readfile", "swoole_async_set", "swoole_async_write", "swoole_async_writefile", "swoole_client_select", "swoole_cpu_num", "swoole_errno", "swoole_event_add", "swoole_event_defer", "swoole_event_del", "swoole_event_exit", "swoole_event_set", "swoole_event_wait", "swoole_event_write", "swoole_get_local_ip", "swoole_last_error", "swoole_load_module", "swoole_select", "swoole_set_process_name", "swoole_strerror", "swoole_timer_after", "swoole_timer_exists", "swoole_timer_tick", "swoole_version"] b["Sybase"] = Set.new ["sybase_affected_rows", "sybase_close", "sybase_connect", "sybase_data_seek", "sybase_deadlock_retry_count", "sybase_fetch_array", "sybase_fetch_assoc", "sybase_fetch_field", "sybase_fetch_object", "sybase_fetch_row", "sybase_field_seek", "sybase_free_result", "sybase_get_last_message", "sybase_min_client_severity", "sybase_min_error_severity", "sybase_min_message_severity", "sybase_min_server_severity", "sybase_num_fields", "sybase_num_rows", "sybase_pconnect", "sybase_query", "sybase_result", "sybase_select_db", "sybase_set_message_handler", "sybase_unbuffered_query"] b["Taint"] = Set.new ["is_tainted", "taint", "untaint"] b["TCP"] = Set.new ["tcpwrap_check"] b["Tidy"] = Set.new ["ob_tidyhandler", "tidy_access_count", "tidy_config_count", "tidy_error_count", "tidy_get_output", "tidy_warning_count"] b["Tokenizer"] = Set.new ["token_get_all", "token_name"] b["Trader"] = Set.new ["trader_acos", "trader_ad", "trader_add", "trader_adosc", "trader_adx", "trader_adxr", "trader_apo", "trader_aroon", "trader_aroonosc", "trader_asin", "trader_atan", "trader_atr", "trader_avgprice", "trader_bbands", "trader_beta", "trader_bop", "trader_cci", "trader_cdl2crows", "trader_cdl3blackcrows", "trader_cdl3inside", "trader_cdl3linestrike", "trader_cdl3outside", "trader_cdl3starsinsouth", "trader_cdl3whitesoldiers", "trader_cdlabandonedbaby", "trader_cdladvanceblock", "trader_cdlbelthold", "trader_cdlbreakaway", "trader_cdlclosingmarubozu", "trader_cdlconcealbabyswall", "trader_cdlcounterattack", "trader_cdldarkcloudcover", "trader_cdldoji", "trader_cdldojistar", "trader_cdldragonflydoji", "trader_cdlengulfing", "trader_cdleveningdojistar", "trader_cdleveningstar", "trader_cdlgapsidesidewhite", "trader_cdlgravestonedoji", "trader_cdlhammer", "trader_cdlhangingman", "trader_cdlharami", "trader_cdlharamicross", "trader_cdlhighwave", "trader_cdlhikkake", "trader_cdlhikkakemod", "trader_cdlhomingpigeon", "trader_cdlidentical3crows", "trader_cdlinneck", "trader_cdlinvertedhammer", "trader_cdlkicking", "trader_cdlkickingbylength", "trader_cdlladderbottom", "trader_cdllongleggeddoji", "trader_cdllongline", "trader_cdlmarubozu", "trader_cdlmatchinglow", "trader_cdlmathold", "trader_cdlmorningdojistar", "trader_cdlmorningstar", "trader_cdlonneck", "trader_cdlpiercing", "trader_cdlrickshawman", "trader_cdlrisefall3methods", "trader_cdlseparatinglines", "trader_cdlshootingstar", "trader_cdlshortline", "trader_cdlspinningtop", "trader_cdlstalledpattern", "trader_cdlsticksandwich", "trader_cdltakuri", "trader_cdltasukigap", "trader_cdlthrusting", "trader_cdltristar", "trader_cdlunique3river", "trader_cdlupsidegap2crows", "trader_cdlxsidegap3methods", "trader_ceil", "trader_cmo", "trader_correl", "trader_cos", "trader_cosh", "trader_dema", "trader_div", "trader_dx", "trader_ema", "trader_errno", "trader_exp", "trader_floor", "trader_get_compat", "trader_get_unstable_period", "trader_ht_dcperiod", "trader_ht_dcphase", "trader_ht_phasor", "trader_ht_sine", "trader_ht_trendline", "trader_ht_trendmode", "trader_kama", "trader_linearreg_angle", "trader_linearreg_intercept", "trader_linearreg_slope", "trader_linearreg", "trader_ln", "trader_log10", "trader_ma", "trader_macd", "trader_macdext", "trader_macdfix", "trader_mama", "trader_mavp", "trader_max", "trader_maxindex", "trader_medprice", "trader_mfi", "trader_midpoint", "trader_midprice", "trader_min", "trader_minindex", "trader_minmax", "trader_minmaxindex", "trader_minus_di", "trader_minus_dm", "trader_mom", "trader_mult", "trader_natr", "trader_obv", "trader_plus_di", "trader_plus_dm", "trader_ppo", "trader_roc", "trader_rocp", "trader_rocr100", "trader_rocr", "trader_rsi", "trader_sar", "trader_sarext", "trader_set_compat", "trader_set_unstable_period", "trader_sin", "trader_sinh", "trader_sma", "trader_sqrt", "trader_stddev", "trader_stoch", "trader_stochf", "trader_stochrsi", "trader_sub", "trader_sum", "trader_t3", "trader_tan", "trader_tanh", "trader_tema", "trader_trange", "trader_trima", "trader_trix", "trader_tsf", "trader_typprice", "trader_ultosc", "trader_var", "trader_wclprice", "trader_willr", "trader_wma"] b["UI"] = Set.new ["UI\\Draw\\Text\\Font\\fontFamilies", "UI\\quit", "UI\\run"] b["ODBC"] = Set.new ["odbc_autocommit", "odbc_binmode", "odbc_close_all", "odbc_close", "odbc_columnprivileges", "odbc_columns", "odbc_commit", "odbc_connect", "odbc_cursor", "odbc_data_source", "odbc_do", "odbc_error", "odbc_errormsg", "odbc_exec", "odbc_execute", "odbc_fetch_array", "odbc_fetch_into", "odbc_fetch_object", "odbc_fetch_row", "odbc_field_len", "odbc_field_name", "odbc_field_num", "odbc_field_precision", "odbc_field_scale", "odbc_field_type", "odbc_foreignkeys", "odbc_free_result", "odbc_gettypeinfo", "odbc_longreadlen", "odbc_next_result", "odbc_num_fields", "odbc_num_rows", "odbc_pconnect", "odbc_prepare", "odbc_primarykeys", "odbc_procedurecolumns", "odbc_procedures", "odbc_result_all", "odbc_result", "odbc_rollback", "odbc_setoption", "odbc_specialcolumns", "odbc_statistics", "odbc_tableprivileges", "odbc_tables"] b["Uopz"] = Set.new ["uopz_add_function", "uopz_allow_exit", "uopz_backup", "uopz_compose", "uopz_copy", "uopz_del_function", "uopz_delete", "uopz_extend", "uopz_flags", "uopz_function", "uopz_get_exit_status", "uopz_get_hook", "uopz_get_mock", "uopz_get_property", "uopz_get_return", "uopz_get_static", "uopz_implement", "uopz_overload", "uopz_redefine", "uopz_rename", "uopz_restore", "uopz_set_hook", "uopz_set_mock", "uopz_set_property", "uopz_set_return", "uopz_set_static", "uopz_undefine", "uopz_unset_hook", "uopz_unset_mock", "uopz_unset_return"] b["URL"] = Set.new ["base64_decode", "base64_encode", "get_headers", "get_meta_tags", "http_build_query", "parse_url", "rawurldecode", "rawurlencode", "urldecode", "urlencode"] b["Variable handling"] = Set.new ["boolval", "debug_zval_dump", "doubleval", "empty", "floatval", "get_defined_vars", "get_resource_type", "gettype", "import_request_variables", "intval", "is_array", "is_bool", "is_callable", "is_countable", "is_double", "is_float", "is_int", "is_integer", "is_iterable", "is_long", "is_null", "is_numeric", "is_object", "is_real", "is_resource", "is_scalar", "is_string", "isset", "print_r", "serialize", "settype", "strval", "unserialize", "unset", "var_dump", "var_export"] b["vpopmail"] = Set.new ["vpopmail_add_alias_domain_ex", "vpopmail_add_alias_domain", "vpopmail_add_domain_ex", "vpopmail_add_domain", "vpopmail_add_user", "vpopmail_alias_add", "vpopmail_alias_del_domain", "vpopmail_alias_del", "vpopmail_alias_get_all", "vpopmail_alias_get", "vpopmail_auth_user", "vpopmail_del_domain_ex", "vpopmail_del_domain", "vpopmail_del_user", "vpopmail_error", "vpopmail_passwd", "vpopmail_set_user_quota"] b["WDDX"] = Set.new ["wddx_add_vars", "wddx_deserialize", "wddx_packet_end", "wddx_packet_start", "wddx_serialize_value", "wddx_serialize_vars"] b["win32ps"] = Set.new ["win32_ps_list_procs", "win32_ps_stat_mem", "win32_ps_stat_proc"] b["win32service"] = Set.new ["win32_continue_service", "win32_create_service", "win32_delete_service", "win32_get_last_control_message", "win32_pause_service", "win32_query_service_status", "win32_send_custom_control", "win32_set_service_exit_code", "win32_set_service_exit_mode", "win32_set_service_status", "win32_start_service_ctrl_dispatcher", "win32_start_service", "win32_stop_service"] b["WinCache"] = Set.new ["wincache_fcache_fileinfo", "wincache_fcache_meminfo", "wincache_lock", "wincache_ocache_fileinfo", "wincache_ocache_meminfo", "wincache_refresh_if_changed", "wincache_rplist_fileinfo", "wincache_rplist_meminfo", "wincache_scache_info", "wincache_scache_meminfo", "wincache_ucache_add", "wincache_ucache_cas", "wincache_ucache_clear", "wincache_ucache_dec", "wincache_ucache_delete", "wincache_ucache_exists", "wincache_ucache_get", "wincache_ucache_inc", "wincache_ucache_info", "wincache_ucache_meminfo", "wincache_ucache_set", "wincache_unlock"] b["xattr"] = Set.new ["xattr_get", "xattr_list", "xattr_remove", "xattr_set", "xattr_supported"] b["xdiff"] = Set.new ["xdiff_file_bdiff_size", "xdiff_file_bdiff", "xdiff_file_bpatch", "xdiff_file_diff_binary", "xdiff_file_diff", "xdiff_file_merge3", "xdiff_file_patch_binary", "xdiff_file_patch", "xdiff_file_rabdiff", "xdiff_string_bdiff_size", "xdiff_string_bdiff", "xdiff_string_bpatch", "xdiff_string_diff_binary", "xdiff_string_diff", "xdiff_string_merge3", "xdiff_string_patch_binary", "xdiff_string_patch", "xdiff_string_rabdiff"] b["Xhprof"] = Set.new ["xhprof_disable", "xhprof_enable", "xhprof_sample_disable", "xhprof_sample_enable"] b["XML Parser"] = Set.new ["utf8_decode", "utf8_encode", "xml_error_string", "xml_get_current_byte_index", "xml_get_current_column_number", "xml_get_current_line_number", "xml_get_error_code", "xml_parse_into_struct", "xml_parse", "xml_parser_create_ns", "xml_parser_create", "xml_parser_free", "xml_parser_get_option", "xml_parser_set_option", "xml_set_character_data_handler", "xml_set_default_handler", "xml_set_element_handler", "xml_set_end_namespace_decl_handler", "xml_set_external_entity_ref_handler", "xml_set_notation_decl_handler", "xml_set_object", "xml_set_processing_instruction_handler", "xml_set_start_namespace_decl_handler", "xml_set_unparsed_entity_decl_handler"] b["XML-RPC"] = Set.new ["xmlrpc_decode_request", "xmlrpc_decode", "xmlrpc_encode_request", "xmlrpc_encode", "xmlrpc_get_type", "xmlrpc_is_fault", "xmlrpc_parse_method_descriptions", "xmlrpc_server_add_introspection_data", "xmlrpc_server_call_method", "xmlrpc_server_create", "xmlrpc_server_destroy", "xmlrpc_server_register_introspection_callback", "xmlrpc_server_register_method", "xmlrpc_set_type"] b["Yaml"] = Set.new ["yaml_emit_file", "yaml_emit", "yaml_parse_file", "yaml_parse_url", "yaml_parse"] b["YAZ"] = Set.new ["yaz_addinfo", "yaz_ccl_conf", "yaz_ccl_parse", "yaz_close", "yaz_connect", "yaz_database", "yaz_element", "yaz_errno", "yaz_error", "yaz_es_result", "yaz_es", "yaz_get_option", "yaz_hits", "yaz_itemorder", "yaz_present", "yaz_range", "yaz_record", "yaz_scan_result", "yaz_scan", "yaz_schema", "yaz_search", "yaz_set_option", "yaz_sort", "yaz_syntax", "yaz_wait"] b["Zip"] = Set.new ["zip_close", "zip_entry_close", "zip_entry_compressedsize", "zip_entry_compressionmethod", "zip_entry_filesize", "zip_entry_name", "zip_entry_open", "zip_entry_read", "zip_open", "zip_read"] b["Zlib"] = Set.new ["deflate_add", "deflate_init", "gzclose", "gzcompress", "gzdecode", "gzdeflate", "gzencode", "gzeof", "gzfile", "gzgetc", "gzgets", "gzgetss", "gzinflate", "gzopen", "gzpassthru", "gzputs", "gzread", "gzrewind", "gzseek", "gztell", "gzuncompress", "gzwrite", "inflate_add", "inflate_get_read_len", "inflate_get_status", "inflate_init", "readgzfile", "zlib_decode", "zlib_encode", "zlib_get_coding_type"] b["ZooKeeper"] = Set.new ["zookeeper_dispatch"] end end end end endrouge-3.28.0/lib/rouge/lexers/plain_text.rb000066400000000000000000000010171417417255300206220ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class PlainText < Lexer title "Plain Text" desc "A boring lexer that doesn't highlight anything" tag 'plaintext' aliases 'text' filenames '*.txt', 'Messages' mimetypes 'text/plain' attr_reader :token def initialize(*) super @token = token_option(:token) || Text end def stream_tokens(string, &b) yield self.token, string end end end end rouge-3.28.0/lib/rouge/lexers/plist.rb000066400000000000000000000021371417417255300176120ustar00rootroot00000000000000# frozen_string_literal: true module Rouge module Lexers class Plist < RegexLexer desc 'plist' tag 'plist' aliases 'plist' filenames '*.plist', '*.pbxproj' mimetypes 'text/x-plist', 'application/x-plist' state :whitespace do rule %r/\s+/, Text::Whitespace end state :root do rule %r{//.*$}, Comment rule %r{/\*.+?\*/}m, Comment mixin :whitespace rule %r/{/, Punctuation, :dictionary rule %r/\(/, Punctuation, :array rule %r/"([^"\\]|\\.)*"/, Literal::String::Double rule %r/'([^'\\]|\\.)*'/, Literal::String::Single rule %r//, Punctuation, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/pony.rb000066400000000000000000000047731417417255300174540ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Pony < RegexLexer tag 'pony' filenames '*.pony' keywords = Set.new %w( actor addressof and as be break class compiler_intrinsic consume continue do else elseif embed end error for fun if ifdef in interface is isnt lambda let match new not object primitive recover repeat return struct then this trait try type until use var where while with ) capabilities = Set.new %w( box iso ref tag trn val ) types = Set.new %w( Number Signed Unsigned Float I8 I16 I32 I64 I128 U8 U32 U64 U128 F32 F64 EventID Align IntFormat NumberPrefix FloatFormat Type ) state :whitespace do rule %r/\s+/m, Text end state :root do mixin :whitespace rule %r/"""/, Str::Doc, :docstring rule %r{//.*}, Comment::Single rule %r{/(\\\n)?[*](.|\n)*?[*](\\\n)?/}, Comment::Multiline rule %r/"/, Str, :string rule %r([~!%^&*+=\|?:<>/-]), Operator rule %r/(true|false|NULL)\b/, Name::Constant rule %r{(?:[A-Z_][a-zA-Z0-9_]*)}, Name::Class rule %r/[()\[\],.';]/, Punctuation # Numbers rule %r/0[xX]([0-9a-fA-F_]*\.[0-9a-fA-F_]+|[0-9a-fA-F_]+)[pP][+\-]?[0-9_]+[fFL]?[i]?/, Num::Float rule %r/[0-9_]+(\.[0-9_]+[eE][+\-]?[0-9_]+|\.[0-9_]*|[eE][+\-]?[0-9_]+)[fFL]?[i]?/, Num::Float rule %r/\.(0|[1-9][0-9_]*)([eE][+\-]?[0-9_]+)?[fFL]?[i]?/, Num::Float rule %r/0[xX][0-9a-fA-F_]+/, Num::Hex rule %r/(0|[1-9][0-9_]*)([LUu]|Lu|LU|uL|UL)?/, Num::Integer rule %r/[a-z_][a-z0-9_]*/io do |m| match = m[0] if capabilities.include?(match) token Keyword::Declaration elsif keywords.include?(match) token Keyword::Reserved elsif types.include?(match) token Keyword::Type else token Name end end end state :string do rule %r/"/, Str, :pop! rule %r/\\([\\abfnrtv"']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})/, Str::Escape rule %r/[^\\"\n]+/, Str rule %r/\\\n/, Str rule %r/\\/, Str # stray backslash end state :docstring do rule %r/"""/, Str::Doc, :pop! rule %r/\n/, Str::Doc rule %r/./, Str::Doc end end end end rouge-3.28.0/lib/rouge/lexers/postscript.rb000066400000000000000000000065731417417255300207010ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # Adapted from pygments PostScriptLexer module Rouge module Lexers class PostScript < RegexLexer title "PostScript" desc "The PostScript language (adobe.com/devnet/postscript.html)" tag "postscript" aliases "postscr", "postscript", "ps", "eps" filenames "*.ps", "*.eps" mimetypes "application/postscript" def self.detect?(text) return true if /^%!/ =~ text end delimiter = %s"()<>\[\]{}/%\s" delimiter_end = Regexp.new("(?=[#{delimiter}])") valid_name_chars = Regexp.new("[^#{delimiter}]") valid_name = /#{valid_name_chars}+#{delimiter_end}/ # These keywords taken from # # Is there an authoritative list anywhere that doesn't involve # trawling documentation? keywords = %w/abs add aload arc arcn array atan begin bind ceiling charpath clip closepath concat concatmatrix copy cos currentlinewidth currentmatrix currentpoint curveto cvi cvs def defaultmatrix dict dictstackoverflow div dtransform dup end exch exec exit exp fill findfont floor get getinterval grestore gsave identmatrix idiv idtransform index invertmatrix itransform length lineto ln load log loop matrix mod moveto mul neg newpath pathforall pathbbox pop print pstack put quit rand rangecheck rcurveto repeat restore rlineto rmoveto roll rotate round run save scale scalefont setdash setfont setgray setlinecap setlinejoin setlinewidth setmatrix setrgbcolor shfill show showpage sin sqrt stack stringwidth stroke strokepath sub syntaxerror transform translate truncate typecheck undefined undefinedfilename undefinedresult/ state :root do # All comment types rule %r'^%!.+?$', Comment::Preproc rule %r'%%.*?$', Comment::Special rule %r'(^%.*?$){2,}', Comment::Multiline rule %r'%.*?$', Comment::Single # String literals are awkward; enter separate state. rule %r'\(', Str, :stringliteral # References rule %r'/#{valid_name}', Name::Variable rule %r'[{}<>\[\]]', Punctuation rule %r'(?:#{keywords.join('|')})#{delimiter_end}', Name::Builtin # Conditionals / flow control rule %r'(eq|ne|g[et]|l[et]|and|or|not|if(?:else)?|for(?:all)?)#{delimiter_end}', Keyword::Reserved rule %r'(false|true)#{delimiter_end}', Keyword::Constant # Numbers rule %r'<[0-9A-Fa-f]+>#{delimiter_end}', Num::Hex # Slight abuse: use Oct to signify any explicit base system rule %r'[0-9]+\#(\-|\+)?([0-9]+\.?|[0-9]*\.[0-9]+|[0-9]+\.[0-9]*)((e|E)[0-9]+)?#{delimiter_end}', Num::Oct rule %r'(\-|\+)?([0-9]+\.?|[0-9]*\.[0-9]+|[0-9]+\.[0-9]*)((e|E)[0-9]+)?#{delimiter_end}', Num::Float rule %r'(\-|\+)?[0-9]+#{delimiter_end}', Num::Integer # Names rule valid_name, Name::Function # Anything else is executed rule %r'\s+', Text end state :stringliteral do rule %r'[^()\\]+', Str rule %r'\\', Str::Escape, :escape rule %r'\(', Str, :stringliteral rule %r'\)', Str, :pop! end state :escape do rule %r'[0-8]{3}|n|r|t|b|f|\\|\(|\)', Str::Escape, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/powershell.rb000066400000000000000000000213231417417255300206410ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Powershell < RegexLexer title 'powershell' desc 'powershell' tag 'powershell' aliases 'posh', 'microsoftshell', 'msshell' filenames '*.ps1', '*.psm1', '*.psd1', '*.psrc', '*.pssc' mimetypes 'text/x-powershell' # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_functions_cmdletbindingattribute?view=powershell-6 ATTRIBUTES = %w( ConfirmImpact DefaultParameterSetName HelpURI PositionalBinding SupportsPaging SupportsShouldProcess ) # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-6 AUTO_VARS = %w( \$\$ \$\? \$\^ \$_ \$args \$ConsoleFileName \$Error \$Event \$EventArgs \$EventSubscriber \$ExecutionContext \$false \$foreach \$HOME \$Host \$input \$IsCoreCLR \$IsLinux \$IsMacOS \$IsWindows \$LastExitCode \$Matches \$MyInvocation \$NestedPromptLevel \$null \$PID \$PROFILE \$PSBoundParameters \$PSCmdlet \$PSCommandPath \$PSCulture \$PSDebugContext \$PSHOME \$PSItem \$PSScriptRoot \$PSSenderInfo \$PSUICulture \$PSVersionTable \$PWD \$REPORTERRORSHOWEXCEPTIONCLASS \$REPORTERRORSHOWINNEREXCEPTION \$REPORTERRORSHOWSOURCE \$REPORTERRORSHOWSTACKTRACE \$SENDER \$ShellId \$StackTrace \$switch \$this \$true ).join('|') # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_reserved_words?view=powershell-6 KEYWORDS = %w( assembly exit process base filter public begin finally return break for sequence catch foreach static class from switch command function throw configuration hidden trap continue if try data in type define inlinescript until do interface using dynamicparam module var else namespace while elseif parallel workflow end param enum private ).join('|') # https://devblogs.microsoft.com/scripting/powertip-find-a-list-of-powershell-type-accelerators/ # ([PSObject].Assembly.GetType("System.Management.Automation.TypeAccelerators")::Get).Keys -join ' ' KEYWORDS_TYPE = %w( Alias AllowEmptyCollection AllowEmptyString AllowNull ArgumentCompleter array bool byte char CmdletBinding datetime decimal double DscResource float single guid hashtable int int32 int16 long int64 ciminstance cimclass cimtype cimconverter IPEndpoint NullString OutputType ObjectSecurity Parameter PhysicalAddress pscredential PSDefaultValue pslistmodifier psobject pscustomobject psprimitivedictionary ref PSTypeNameAttribute regex DscProperty sbyte string SupportsWildcards switch cultureinfo bigint securestring timespan uint16 uint32 uint64 uri ValidateCount ValidateDrive ValidateLength ValidateNotNull ValidateNotNullOrEmpty ValidatePattern ValidateRange ValidateScript ValidateSet ValidateTrustedData ValidateUserDrive version void ipaddress DscLocalConfigurationManager WildcardPattern X509Certificate X500DistinguishedName xml CimSession adsi adsisearcher wmiclass wmi wmisearcher mailaddress scriptblock psvariable type psmoduleinfo powershell runspacefactory runspace initialsessionstate psscriptmethod psscriptproperty psnoteproperty psaliasproperty psvariableproperty ).join('|') OPERATORS = %w( -split -isplit -csplit -join -is -isnot -as -eq -ieq -ceq -ne -ine -cne -gt -igt -cgt -ge -ige -cge -lt -ilt -clt -le -ile -cle -like -ilike -clike -notlike -inotlike -cnotlike -match -imatch -cmatch -notmatch -inotmatch -cnotmatch -contains -icontains -ccontains -notcontains -inotcontains -cnotcontains -replace -ireplace -creplace -shl -shr -band -bor -bxor -and -or -xor -not \+= -= \*= \/= %= ).join('|') MULTILINE_KEYWORDS = %w( synopsis description parameter example inputs outputs notes link component role functionality forwardhelptargetname forwardhelpcategory remotehelprunspace externalhelp ).join('|') state :variable do rule %r/#{AUTO_VARS}/, Name::Builtin::Pseudo rule %r/(\$)(?:(\w+)(:))?(\w+|\{(?:[^`]|`.)+?\})/ do groups Name::Variable, Name::Namespace, Punctuation, Name::Variable end rule %r/\$\w+/, Name::Variable rule %r/\$\{(?:[^`]|`.)+?\}/, Name::Variable end state :multiline do rule %r/\.(?:#{MULTILINE_KEYWORDS})/i, Comment::Special rule %r/#>/, Comment::Multiline, :pop! rule %r/[^#.]+?/m, Comment::Multiline rule %r/[#.]+/, Comment::Multiline end state :interpol do rule %r/\)/, Str::Interpol, :pop! mixin :root end state :dq do # NB: "abc$" is literally the string abc$. # Here we prevent :interp from interpreting $" as a variable. rule %r/(?:\$#?)?"/, Str::Double, :pop! rule %r/\$\(/, Str::Interpol, :interpol rule %r/`$/, Str::Escape # line continuation rule %r/`./, Str::Escape rule %r/[^"`$]+/, Str::Double mixin :variable end state :sq do rule %r/'/, Str::Single, :pop! rule %r/[^']+/, Str::Single end state :heredoc do rule %r/(?:\$#?)?"@/, Str::Heredoc, :pop! rule %r/\$\(/, Str::Interpol, :interpol rule %r/`$/, Str::Escape # line continuation rule %r/`./, Str::Escape rule %r/[^"`$]+?/m, Str::Heredoc rule %r/"+/, Str::Heredoc mixin :variable end state :class do rule %r/\{/, Punctuation, :pop! rule %r/\s+/, Text::Whitespace rule %r/\w+/, Name::Class rule %r/[:,]/, Punctuation end state :expr do mixin :comments rule %r/"/, Str::Double, :dq rule %r/'/, Str::Single, :sq rule %r/@"/, Str::Heredoc, :heredoc rule %r/@'.*?'@/m, Str::Heredoc rule %r/\d*\.\d+/, Num::Float rule %r/\d+/, Num::Integer rule %r/@\{/, Punctuation, :hasht rule %r/@\(/, Punctuation, :array rule %r/{/, Punctuation, :brace rule %r/\[/, Punctuation, :bracket end state :hasht do rule %r/\}/, Punctuation, :pop! rule %r/=/, Operator rule %r/[,;]/, Punctuation mixin :expr rule %r/\w+/, Name::Other mixin :variable end state :array do rule %r/\s+/, Text::Whitespace rule %r/\)/, Punctuation, :pop! rule %r/[,;]/, Punctuation mixin :expr mixin :variable end state :brace do rule %r/[}]/, Punctuation, :pop! mixin :root end state :bracket do rule %r/\]/, Punctuation, :pop! rule %r/[A-Za-z]\w+\./, Name rule %r/([A-Za-z]\w+)/ do |m| if ATTRIBUTES.include? m[0] token Name::Builtin::Pseudo else token Name end end mixin :root end state :parameters do rule %r/`./m, Str::Escape rule %r/\s*?\n/, Text::Whitespace, :pop! rule %r/[;(){}\]]/, Punctuation, :pop! rule %r/[|=]/, Operator, :pop! rule %r/[\/\\~\w][-.:\/\\~\w]*/, Name::Other rule %r/\w[-\w]+/, Name::Other mixin :root end state :comments do rule %r/\s+/, Text::Whitespace rule %r/#.*/, Comment rule %r/<#/, Comment::Multiline, :multiline end state :root do mixin :comments rule %r/#requires\s-version \d(?:\.\d+)?/, Comment::Preproc rule %r/\.\.(?=\.?\d)/, Operator rule %r/(?:#{OPERATORS})\b/i, Operator rule %r/(class)(\s+)(\w+)/i do groups Keyword::Reserved, Text::Whitespace, Name::Class push :class end rule %r/(function)(\s+)(?:(\w+)(:))?(\w[-\w]+)/i do groups Keyword::Reserved, Text::Whitespace, Name::Namespace, Punctuation, Name::Function end rule %r/(?:#{KEYWORDS})\b(?![-.])/i, Keyword::Reserved rule %r/-{1,2}\w+/, Name::Tag rule %r/(\.)?([-\w]+)(\[)/ do |m| groups Operator, Name, Punctuation push :bracket end rule %r/([\/\\~[a-z]][-.:\/\\~\w]*)(\n)?/i do |m| groups Name, Text::Whitespace push :parameters end rule %r/(\.)([-\w]+)(?:(\()|(\n))?/ do |m| groups Operator, Name::Function, Punctuation, Text::Whitespace push :parameters unless m[3].nil? end rule %r/\?/, Name::Function, :parameters mixin :expr mixin :variable rule %r/[-+*\/%=!.&|]/, Operator rule %r/[{}(),:;]/, Punctuation end end end end rouge-3.28.0/lib/rouge/lexers/praat.rb000066400000000000000000000260071417417255300175700ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Praat < RegexLexer title "Praat" desc "The Praat scripting language (praat.org)" tag 'praat' filenames '*.praat', '*.proc', '*.psc' def self.detect?(text) return true if text.shebang? 'praat' end keywords = %w( if then else elsif elif endif fi for from to endfor endproc while endwhile repeat until select plus minus demo assert stopwatch nocheck nowarn noprogress editor endeditor clearinfo ) functions_string = %w( backslashTrigraphsToUnicode chooseDirectory chooseReadFile chooseWriteFile date demoKey do environment extractLine extractWord fixed info left mid percent readFile replace replace_regex right selected string unicodeToBackslashTrigraphs ) functions_numeric = %w( abs appendFile appendFileLine appendInfo appendInfoLine arccos arccosh arcsin arcsinh arctan arctan2 arctanh barkToHertz beginPause beginSendPraat besselI besselK beta beta2 binomialP binomialQ boolean ceiling chiSquareP chiSquareQ choice comment cos cosh createDirectory deleteFile demoClicked demoClickedIn demoCommandKeyPressed demoExtraControlKeyPressed demoInput demoKeyPressed demoOptionKeyPressed demoShiftKeyPressed demoShow demoWaitForInput demoWindowTitle demoX demoY differenceLimensToPhon do editor endPause endSendPraat endsWith erb erbToHertz erf erfc exitScript exp extractNumber fileReadable fisherP fisherQ floor gaussP gaussQ hash hertzToBark hertzToErb hertzToMel hertzToSemitones imax imin incompleteBeta incompleteGammaP index index_regex integer invBinomialP invBinomialQ invChiSquareQ invFisherQ invGaussQ invSigmoid invStudentQ length ln lnBeta lnGamma log10 log2 max melToHertz min minusObject natural number numberOfColumns numberOfRows numberOfSelected objectsAreIdentical option optionMenu pauseScript phonToDifferenceLimens plusObject positive randomBinomial randomGauss randomInteger randomPoisson randomUniform real readFile removeObject rindex rindex_regex round runScript runSystem runSystem_nocheck selectObject selected semitonesToHertz sentence sentencetext sigmoid sin sinc sincpi sinh soundPressureToPhon sqrt startsWith studentP studentQ tan tanh text variableExists word writeFile writeFileLine writeInfo writeInfoLine ) functions_array = %w( linear randomGauss randomInteger randomUniform zero ) objects = %w( Activation AffineTransform AmplitudeTier Art Artword Autosegment BarkFilter BarkSpectrogram CCA Categories Cepstrogram Cepstrum Cepstrumc ChebyshevSeries ClassificationTable Cochleagram Collection ComplexSpectrogram Configuration Confusion ContingencyTable Corpus Correlation Covariance CrossCorrelationTable CrossCorrelationTableList CrossCorrelationTables DTW DataModeler Diagonalizer Discriminant Dissimilarity Distance Distributions DurationTier EEG ERP ERPTier EditCostsTable EditDistanceTable Eigen Excitation Excitations ExperimentMFC FFNet FeatureWeights FileInMemory FilesInMemory Formant FormantFilter FormantGrid FormantModeler FormantPoint FormantTier GaussianMixture HMM HMM_Observation HMM_ObservationSequence HMM_State HMM_StateSequence HMMObservation HMMObservationSequence HMMState HMMStateSequence Harmonicity ISpline Index Intensity IntensityTier IntervalTier KNN KlattGrid KlattTable LFCC LPC Label LegendreSeries LinearRegression LogisticRegression LongSound Ltas MFCC MSpline ManPages Manipulation Matrix MelFilter MelSpectrogram MixingMatrix Movie Network OTGrammar OTHistory OTMulti PCA PairDistribution ParamCurve Pattern Permutation Photo Pitch PitchModeler PitchTier PointProcess Polygon Polynomial PowerCepstrogram PowerCepstrum Procrustes RealPoint RealTier ResultsMFC Roots SPINET SSCP SVD Salience ScalarProduct Similarity SimpleString SortedSetOfString Sound Speaker Spectrogram Spectrum SpectrumTier SpeechSynthesizer SpellingChecker Strings StringsIndex Table TableOfReal TextGrid TextInterval TextPoint TextTier Tier Transition VocalTract VocalTractTier Weight WordList ) variables_numeric = %w( all average e left macintosh mono pi praatVersion right stereo undefined unix windows ) variables_string = %w( praatVersion tab shellDirectory homeDirectory preferencesDirectory newline temporaryDirectory defaultDirectory ) object_attributes = %w( ncol nrow xmin ymin xmax ymax nx ny dx dy ) state :root do rule %r/(\s+)(#.*?$)/ do groups Text, Comment::Single end rule %r/^#.*?$/, Comment::Single rule %r/;[^\n]*/, Comment::Single rule %r/\s+/, Text rule %r/(\bprocedure)(\s+)/ do groups Keyword, Text push :procedure_definition end rule %r/(\bcall)(\s+)/ do groups Keyword, Text push :procedure_call end rule %r/@/, Name::Function, :procedure_call mixin :function_call rule %r/\b(?:select all)\b/, Keyword rule %r/\b(?:#{keywords.join('|')})\b/, Keyword rule %r/(\bform\b)(\s+)([^\n]+)/ do groups Keyword, Text, Literal::String push :old_form end rule %r/(print(?:line|tab)?|echo|exit|asserterror|pause|send(?:praat|socket)|include|execute|system(?:_nocheck)?)(\s+)/ do groups Keyword, Text push :string_unquoted end rule %r/(goto|label)(\s+)(\w+)/ do groups Keyword, Text, Name::Label end mixin :variable_name mixin :number rule %r/"/, Literal::String, :string rule %r/\b(?:#{objects.join('|')})(?=\s+\S+\n)/, Name::Class, :string_unquoted rule %r/\b(?=[A-Z])/, Text, :command rule %r/(\.{3}|[)(,\$])/, Punctuation end state :command do rule %r/( ?([^\s:\.'])+ ?)/, Keyword mixin :string_interpolated rule %r/\.{3}/ do token Keyword pop! push :old_arguments end rule %r/:/ do token Keyword pop! push :comma_list end rule %r/[\s]/, Text, :pop! end state :procedure_call do mixin :string_interpolated rule %r/(:|\s*\()/, Punctuation, :pop! rule %r/'/, Name::Function rule %r/[^:\('\s]+/, Name::Function rule %r/(?=\s+)/ do token Text pop! push :old_arguments end end state :procedure_definition do rule %r/(:|\s*\()/, Punctuation, :pop! rule %r/[^:\(\s]+/, Name::Function rule %r/(\s+)/, Text, :pop! end state :function_call do rule %r/\b(#{functions_string.join('|')})\$(?=\s*[:(])/, Name::Function, :function rule %r/\b(#{functions_array.join('|')})#(?=\s*[:(])/, Name::Function, :function rule %r/\b(#{functions_numeric.join('|')})(?=\s*[:(])/, Name::Function, :function end state :function do rule %r/\s+/, Text rule %r/(?::|\s*\()/ do token Text pop! push :comma_list end end state :comma_list do rule %r/(\s*\n\s*)(\.{3})/ do groups Text, Punctuation end rule %r/\s*[\])\n]/, Text, :pop! rule %r/\s+/, Text rule %r/"/, Literal::String, :string rule %r/\b(if|then|else|fi|endif)\b/, Keyword mixin :function_call mixin :variable_name mixin :operator mixin :number rule %r/[()]/, Text rule %r/,/, Punctuation end state :old_arguments do rule %r/\n/, Text, :pop! mixin :variable_name mixin :operator mixin :number rule %r/"/, Literal::String, :string rule %r/[^\n]/, Text end state :number do rule %r/\n/, Text, :pop! rule %r/\b\d+(\.\d*)?([eE][-+]?\d+)?%?/, Literal::Number end state :variable_name do mixin :operator mixin :number rule %r/\b(?:#{variables_string.join('|')})\$/, Name::Builtin rule %r/\b(?:#{variables_numeric.join('|')})(?!\$)\b/, Name::Builtin rule %r/\b(Object|#{objects.join('|')})_/ do token Name::Builtin push :object_reference end rule %r/\.?[a-z][a-zA-Z0-9_.]*(\$|#)?/, Text rule %r/[\[\]]/, Text, :comma_list mixin :string_interpolated end state :object_reference do mixin :string_interpolated rule %r/([a-z][a-zA-Z0-9_]*|\d+)/, Name::Builtin rule %r/\.(#{object_attributes.join('|')})\b/, Name::Builtin, :pop! rule %r/\$/, Name::Builtin rule %r/\[/, Text, :pop! end state :operator do # This rule incorrectly matches === or +++++, which are not operators rule %r/([+\/*<>=!-]=?|[&*|][&*|]?|\^|<>)/, Operator rule %r/(?/, Punctuation rule %r/"[^"]*"/, Str::Double rule %r/\d+\.\d+/, Num::Float rule %r/\d+/, Num end state :atoms do rule %r/[[:lower:]]([[:word:]])*/, Str::Symbol rule %r/'[^']*'/, Str::Symbol end state :operators do rule %r/(<|>|=<|>=|==|=:=|=|\/|\/\/|\*|\+|-)(?=\s|[a-zA-Z0-9\[])/, Operator rule %r/is/, Operator rule %r/(mod|div|not)/, Operator rule %r/[#&*+-.\/:<=>?@^~]+/, Operator end state :variables do rule %r/[A-Z]+\w*/, Name::Variable rule %r/_[[:word:]]*/, Name::Variable end state :root do mixin :basic mixin :atoms mixin :variables mixin :operators end state :nested_comment do rule %r(/\*), Comment::Multiline, :push rule %r/\s*\*[^*\/]+/, Comment::Multiline rule %r(\*/), Comment::Multiline, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/prometheus.rb000066400000000000000000000065101417417255300206510ustar00rootroot00000000000000# frozen_string_literal: true module Rouge module Lexers class Prometheus < RegexLexer desc 'prometheus' tag 'prometheus' aliases 'prometheus' filenames '*.prometheus' mimetypes 'text/x-prometheus', 'application/x-prometheus' def self.functions @functions ||= Set.new %w( abs absent ceil changes clamp_max clamp_min count_scalar day_of_month day_of_week days_in_month delta deriv drop_common_labels exp floor histogram_quantile holt_winters hour idelta increase irate label_replace ln log2 log10 month predict_linear rate resets round scalar sort sort_desc sqrt time vector year avg_over_time min_over_time max_over_time sum_over_time count_over_time quantile_over_time stddev_over_time stdvar_over_time ) end state :root do mixin :strings mixin :whitespace rule %r/-?\d+\.\d+/, Num::Float rule %r/-?\d+[smhdwy]?/, Num::Integer mixin :operators rule %r/(ignoring|on)(\()/ do groups Keyword::Pseudo, Punctuation push :label_list end rule %r/(group_left|group_right)(\()/ do groups Keyword::Type, Punctuation end rule %r/(bool|offset)\b/, Keyword rule %r/(without|by)\b/, Keyword, :label_list rule %r/[\w:]+/ do |m| if self.class.functions.include?(m[0]) token Name::Builtin else token Name end end mixin :metrics end state :metrics do rule %r/[a-zA-Z0-9_-]+/, Name rule %r/[\(\)\]:.,]/, Punctuation rule %r/\{/, Punctuation, :filters rule %r/\[/, Punctuation end state :strings do rule %r/"/, Str::Double, :double_string_escaped rule %r/'/, Str::Single, :single_string_escaped rule %r/`.*`/, Str::Backtick end [ [:double, Str::Double, '"'], [:single, Str::Single, "'"] ].each do |name, tok, fin| state :"#{name}_string_escaped" do rule %r/\\[\\abfnrtv#{fin}]/, Str::Escape rule %r/[^\\#{fin}]+/m, tok rule %r/#{fin}/, tok, :pop! end end state :filters do mixin :inline_whitespace rule %r/,/, Punctuation mixin :labels mixin :filter_matching_operators mixin :strings rule %r/}/, Punctuation, :pop! end state :label_list do rule %r/\(/, Punctuation rule %r/[a-zA-Z0-9_:-]+/, Name::Attribute rule %r/,/, Punctuation mixin :whitespace rule %r/\)/, Punctuation, :pop! end state :labels do rule %r/[a-zA-Z0-9_:-]+/, Name::Attribute end state :operators do rule %r([+\-\*/%\^]), Operator # Arithmetic rule %r(=|==|!=|<|>|<=|>=), Operator # Comparison rule %r/and|or|unless/, Operator # Logical/Set rule %r/(sum|min|max|avg|stddev|stdvar|count|count_values|bottomk|topk)\b/, Name::Function end state :filter_matching_operators do rule %r/!(=|~)|=~?/, Operator end state :inline_whitespace do rule %r/[ \t\r]+/, Text end state :whitespace do mixin :inline_whitespace rule %r/\n\s*/m, Text rule %r/#.*?$/, Comment end end end end rouge-3.28.0/lib/rouge/lexers/properties.rb000066400000000000000000000020671417417255300206550ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Properties < RegexLexer title ".properties" desc '.properties config files for Java' tag 'properties' filenames '*.properties' mimetypes 'text/x-java-properties' identifier = /[\w.-]+/ state :basic do rule %r/[!#].*?\n/, Comment rule %r/\s+/, Text rule %r/\\\n/, Str::Escape end state :root do mixin :basic rule %r/(#{identifier})(\s*)([=:])/ do groups Name::Property, Text, Punctuation push :value end end state :value do rule %r/\n/, Text, :pop! mixin :basic rule %r/"/, Str, :dq rule %r/'.*?'/, Str mixin :esc_str rule %r/[^\\\n]+/, Str end state :dq do rule %r/"/, Str, :pop! mixin :esc_str rule %r/[^\\"]+/m, Str end state :esc_str do rule %r/\\u[0-9]{4}/, Str::Escape rule %r/\\./m, Str::Escape end end end end rouge-3.28.0/lib/rouge/lexers/protobuf.rb000066400000000000000000000042251417417255300203170ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Protobuf < RegexLexer title 'Protobuf' desc 'Google\'s language-neutral, platform-neutral, extensible mechanism for serializing structured data' tag 'protobuf' aliases 'proto' filenames '*.proto' mimetypes 'text/x-proto' kw = /\b(ctype|default|extensions|import|max|oneof|option|optional|packed|repeated|required|returns|rpc|to)\b/ datatype = /\b(bool|bytes|double|fixed32|fixed64|float|int32|int64|sfixed32|sfixed64|sint32|sint64|string|uint32|uint64)\b/ state :root do rule %r/[\s]+/, Text rule %r/[,;{}\[\]()]/, Punctuation rule %r/\/(\\\n)?\/($|(.|\n)*?[^\\]$)/, Comment::Single rule %r/\/(\\\n)?\*(.|\n)*?\*(\\\n)?\//, Comment::Multiline rule kw, Keyword rule datatype, Keyword::Type rule %r/true|false/, Keyword::Constant rule %r/(package)(\s+)/ do groups Keyword::Namespace, Text push :package end rule %r/(message|extend)(\s+)/ do groups Keyword::Declaration, Text push :message end rule %r/(enum|group|service)(\s+)/ do groups Keyword::Declaration, Text push :type end rule %r/".*?"/, Str rule %r/'.*?'/, Str rule %r/(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*/, Num::Float rule %r/(\d+\.\d*|\.\d+|\d+[fF])[fF]?/, Num::Float rule %r/(\-?(inf|nan))\b/, Num::Float rule %r/0x[0-9a-fA-F]+[LlUu]*/, Num::Hex rule %r/0[0-7]+[LlUu]*/, Num::Oct rule %r/\d+[LlUu]*/, Num::Integer rule %r/[+-=]/, Operator rule %r/([a-zA-Z_][\w.]*)([ \t]*)(=)/ do groups Name::Attribute, Text, Operator end rule %r/[a-zA-Z_][\w.]*/, Name end state :package do rule %r/[a-zA-Z_]\w*/, Name::Namespace, :pop! rule(//) { pop! } end state :message do rule %r/[a-zA-Z_]\w*/, Name::Class, :pop! rule(//) { pop! } end state :type do rule %r/[a-zA-Z_]\w*/, Name, :pop! rule(//) { pop! } end end end end rouge-3.28.0/lib/rouge/lexers/puppet.rb000066400000000000000000000064041417417255300177750ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Puppet < RegexLexer title "Puppet" desc 'The Puppet configuration management language (puppetlabs.org)' tag 'puppet' aliases 'pp' filenames '*.pp' def self.detect?(text) return true if text.shebang? 'puppet-apply' return true if text.shebang? 'puppet' end def self.keywords @keywords ||= Set.new %w( and case class default define else elsif if in import inherits node unless ) end def self.constants @constants ||= Set.new %w( false true undef ) end def self.metaparameters @metaparameters ||= Set.new %w( before require notify subscribe ) end id = /[a-z]\w*/ cap_id = /[A-Z]\w*/ qualname = /(::)?(#{id}::)*\w+/ state :whitespace do rule %r/\s+/m, Text rule %r/#.*?\n/, Comment end state :root do mixin :whitespace rule %r/[$]#{qualname}/, Name::Variable rule %r/(#{id})(?=\s*[=+]>)/m do |m| if self.class.metaparameters.include? m[0] token Keyword::Pseudo else token Name::Property end end rule %r/(#{qualname})(?=\s*[(])/m, Name::Function rule cap_id, Name::Class rule %r/[+=|~-]>|<[|~-]/, Punctuation rule %r/[|:}();\[\]]/, Punctuation # HACK for case statements and selectors rule %r/{/, Punctuation, :regex_allowed rule %r/,/, Punctuation, :regex_allowed rule %r/(in|and|or)\b/, Operator::Word rule %r/[=!<>]=/, Operator rule %r/[=!]~/, Operator, :regex_allowed rule %r([.=<>!+*/-]), Operator rule %r/(class|include)(\s*)(#{qualname})/ do groups Keyword, Text, Name::Class end rule %r/node\b/, Keyword, :regex_allowed rule %r/'(\\[\\']|[^'])*'/m, Str::Single rule %r/"/, Str::Double, :dquotes rule %r/\d+([.]\d+)?(e[+-]\d+)?/, Num # a valid regex. TODO: regexes are only allowed # in certain places in puppet. rule qualname do |m| if self.class.keywords.include? m[0] token Keyword elsif self.class.constants.include? m[0] token Keyword::Constant else token Name end end end state :regex_allowed do mixin :whitespace rule %r(/), Str::Regex, :regex rule(//) { pop! } end state :regex do rule %r(/), Str::Regex, :pop! rule %r/\\./, Str::Escape rule %r/[(){}]/, Str::Interpol rule %r/\[/, Str::Interpol, :regex_class rule %r/./, Str::Regex end state :regex_class do rule %r/\]/, Str::Interpol, :pop! rule %r/(?>|\/\/|\*\*)=?/, Operator rule %r/[-~+\/*%=<>&^|@]=?|!=/, Operator rule %r/(from)((?:\\\s|\s)+)(#{dotted_identifier})((?:\\\s|\s)+)(import)/ do groups Keyword::Namespace, Text, Name::Namespace, Text, Keyword::Namespace end rule %r/(import)(\s+)(#{dotted_identifier})/ do groups Keyword::Namespace, Text, Name::Namespace end rule %r/(def)((?:\s|\\\s)+)/ do groups Keyword, Text push :funcname end rule %r/(class)((?:\s|\\\s)+)/ do groups Keyword, Text push :classname end # TODO: not in python 3 rule %r/`.*?`/, Str::Backtick rule %r/([rfbu]{0,2})('''|"""|['"])/i do |m| groups Str::Affix, Str current_string.register type: m[1].downcase, delim: m[2] push :generic_string end rule %r/@#{dotted_identifier}/i, Name::Decorator # using negative lookbehind so we don't match property names rule %r/(?=|<>|::)|[?:$%&|@._#*^\-+~,!><=]:?/, Operator) rule %r/[{}\[\]();]/, Punctuation # commands rule(/\\.*\n/, Text) end state :string do rule %r/\\"/, Str rule %r/"/, Str, :pop! rule %r/\\([\\nr]|[01][0-7]{2})/, Str::Escape rule %r/[^\\"\n]+/, Str rule %r/\\/, Str # stray backslash end state :bottom do rule %r/.+\z/m, Comment::Multiline end end end end rouge-3.28.0/lib/rouge/lexers/qml.rb000066400000000000000000000037061417417255300172530ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'javascript.rb' class Qml < Javascript title "QML" desc 'QML, a UI markup language' tag 'qml' aliases 'qml' filenames '*.qml' mimetypes 'application/x-qml', 'text/x-qml' id_with_dots = /[$a-zA-Z_][a-zA-Z0-9_.]*/ prepend :root do rule %r/(#{id_with_dots})(\s*)({)/ do groups Keyword::Type, Text, Punctuation push :type_block end rule %r/(#{id_with_dots})(\s+)(on)(\s+)(#{id_with_dots})(\s*)({)/ do groups Keyword::Type, Text, Keyword, Text, Name::Label, Text, Punctuation push :type_block end rule %r/[{]/, Punctuation, :push end state :type_block do rule %r/(id)(\s*)(:)(\s*)(#{id_with_dots})/ do groups Name::Label, Text, Punctuation, Text, Keyword::Declaration end rule %r/(#{id_with_dots})(\s*)(:)/ do groups Name::Label, Text, Punctuation push :expr_start end rule %r/(signal)(\s+)(#{id_with_dots})/ do groups Keyword::Declaration, Text, Name::Label push :signal end rule %r/(property)(\s+)(#{id_with_dots})(\s+)(#{id_with_dots})(\s*)(:?)/ do groups Keyword::Declaration, Text, Keyword::Type, Text, Name::Label, Text, Punctuation push :expr_start end rule %r/[}]/, Punctuation, :pop! mixin :root end state :signal do mixin :comments_and_whitespace rule %r/\(/ do token Punctuation goto :signal_args end rule %r//, Text, :pop! end state :signal_args do mixin :comments_and_whitespace rule %r/(#{id_with_dots})(\s+)(#{id_with_dots})(\s*)(,?)/ do groups Keyword::Type, Text, Name, Text, Punctuation end rule %r/\)/ , Punctuation, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/r.rb000066400000000000000000000064121417417255300167200ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class R < RegexLexer title "R" desc 'The R statistics language (r-project.org)' tag 'r' aliases 'r', 'R', 's', 'S' filenames '*.R', '*.r', '.Rhistory', '.Rprofile' mimetypes 'text/x-r-source', 'text/x-r', 'text/x-R' mimetypes 'text/x-r', 'application/x-r' KEYWORDS = %w(if else for while repeat in next break function) KEYWORD_CONSTANTS = %w( NULL Inf TRUE FALSE NaN NA NA_integer_ NA_real_ NA_complex_ NA_character_ ) BUILTIN_CONSTANTS = %w(LETTERS letters month.abb month.name pi T F) # These are all the functions in `base` that are implemented as a # `.Primitive`, minus those functions that are also keywords. PRIMITIVE_FUNCTIONS = %w( abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm ) def self.detect?(text) return true if text.shebang? 'Rscript' end state :root do rule %r/#'.*?$/, Comment::Doc rule %r/#.*?$/, Comment::Single rule %r/\s+/m, Text::Whitespace rule %r/`[^`]+?`/, Name rule %r/'(\\.|.)*?'/m, Str::Single rule %r/"(\\.|.)*?"/m, Str::Double rule %r/%[^%]*?%/, Operator rule %r/0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?/, Num::Hex rule %r/[+-]?(\d+([.]\d+)?|[.]\d+)([eE][+-]?\d+)?[Li]?/, Num # Only recognize built-in functions when they are actually used as a # function call, i.e. followed by an opening parenthesis. # `Name::Builtin` would be more logical, but is usually not # highlighted specifically; thus use `Name::Function`. rule %r/\b(??*+^/!=~$@:%&|]), Operator end end end end rouge-3.28.0/lib/rouge/lexers/racket.rb000066400000000000000000000733561417417255300177430ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Racket < RegexLexer title "Racket" desc "Racket is a Lisp descended from Scheme (racket-lang.org)" tag 'racket' filenames '*.rkt', '*.rktd', '*.rktl' mimetypes 'text/x-racket', 'application/x-racket' def self.detect?(text) text =~ /\A#lang\s*(.*?)$/ lang_attr = $1 return false unless lang_attr return true if lang_attr =~ /racket|scribble/ end def self.keywords @keywords ||= Set.new %w( ... and begin begin-for-syntax begin0 case case-lambda cond datum->syntax-object define define-for-syntax define-logger define-struct define-syntax define-syntax-rule define-syntaxes define-values define-values-for-syntax delay do expand-path fluid-let force hash-table-copy hash-table-count hash-table-for-each hash-table-get hash-table-iterate-first hash-table-iterate-key hash-table-iterate-next hash-table-iterate-value hash-table-map hash-table-put! hash-table-remove! hash-table? if lambda let let* let*-values let-struct let-syntax let-syntaxes let-values let/cc let/ec letrec letrec-syntax letrec-syntaxes letrec-syntaxes+values letrec-values list-immutable make-hash-table make-immutable-hash-table make-namespace module module* module-identifier=? module-label-identifier=? module-template-identifier=? module-transformer-identifier=? namespace-transformer-require or parameterize parameterize* parameterize-break promise? prop:method-arity-error provide provide-for-label provide-for-syntax quasiquote quasisyntax quasisyntax/loc quote quote-syntax quote-syntax/prune require require-for-label require-for-syntax require-for-template set! set!-values syntax syntax-case syntax-case* syntax-id-rules syntax-object->datum syntax-rules syntax/loc tcp-abandon-port tcp-accept tcp-accept-evt tcp-accept-ready? tcp-accept/enable-break tcp-addresses tcp-close tcp-connect tcp-connect/enable-break tcp-listen tcp-listener? tcp-port? time transcript-off transcript-on udp-addresses udp-bind! udp-bound? udp-close udp-connect! udp-connected? udp-multicast-interface udp-multicast-join-group! udp-multicast-leave-group! udp-multicast-loopback? udp-multicast-set-interface! udp-multicast-set-loopback! udp-multicast-set-ttl! udp-multicast-ttl udp-open-socket udp-receive! udp-receive!* udp-receive!-evt udp-receive!/enable-break udp-receive-ready-evt udp-send udp-send* udp-send-evt udp-send-ready-evt udp-send-to udp-send-to* udp-send-to-evt udp-send-to/enable-break udp-send/enable-break udp? unless unquote unquote-splicing unsyntax unsyntax-splicing when with-continuation-mark with-handlers with-handlers* with-syntax λ) end def self.builtins @builtins ||= Set.new %w( * + - / < <= = > >= abort-current-continuation abs absolute-path? acos add1 alarm-evt always-evt andmap angle append apply arithmetic-shift arity-at-least arity-at-least-value arity-at-least? asin assoc assq assv atan banner bitwise-and bitwise-bit-field bitwise-bit-set? bitwise-ior bitwise-not bitwise-xor boolean? bound-identifier=? box box-cas! box-immutable box? break-enabled break-thread build-path build-path/convention-type byte-pregexp byte-pregexp? byte-ready? byte-regexp byte-regexp? byte? bytes bytes->immutable-bytes bytes->list bytes->path bytes->path-element bytes->string/latin-1 bytes->string/locale bytes->string/utf-8 bytes-append bytes-close-converter bytes-convert bytes-convert-end bytes-converter? bytes-copy bytes-copy! bytes-environment-variable-name? bytes-fill! bytes-length bytes-open-converter bytes-ref bytes-set! bytes-utf-8-index bytes-utf-8-length bytes-utf-8-ref bytes? bytes? caaaar caaadr caaar caadar caaddr caadr caar cadaar cadadr cadar caddar cadddr caddr cadr call-in-nested-thread call-with-break-parameterization call-with-composable-continuation call-with-continuation-barrier call-with-continuation-prompt call-with-current-continuation call-with-default-reading-parameterization call-with-escape-continuation call-with-exception-handler call-with-immediate-continuation-mark call-with-input-file call-with-output-file call-with-parameterization call-with-semaphore call-with-semaphore/enable-break call-with-values call/cc call/ec car cdaaar cdaadr cdaar cdadar cdaddr cdadr cdar cddaar cddadr cddar cdddar cddddr cdddr cddr cdr ceiling channel-get channel-put channel-put-evt channel-put-evt? channel-try-get channel? chaperone-box chaperone-continuation-mark-key chaperone-evt chaperone-hash chaperone-of? chaperone-procedure chaperone-prompt-tag chaperone-struct chaperone-struct-type chaperone-vector chaperone? char->integer char-alphabetic? char-blank? char-ci<=? char-ci=? char-ci>? char-downcase char-foldcase char-general-category char-graphic? char-iso-control? char-lower-case? char-numeric? char-punctuation? char-ready? char-symbolic? char-title-case? char-titlecase char-upcase char-upper-case? char-utf-8-length char-whitespace? char<=? char=? char>? char? check-duplicate-identifier checked-procedure-check-and-extract choice-evt cleanse-path close-input-port close-output-port collect-garbage collection-file-path collection-path compile compile-allow-set!-undefined compile-context-preservation-enabled compile-enforce-module-constants compile-syntax compiled-expression? compiled-module-expression? complete-path? complex? cons continuation-mark-key? continuation-mark-set->context continuation-mark-set->list continuation-mark-set->list* continuation-mark-set-first continuation-mark-set? continuation-marks continuation-prompt-available? continuation-prompt-tag? continuation? copy-file cos current-break-parameterization current-code-inspector current-command-line-arguments current-compile current-compiled-file-roots current-continuation-marks current-custodian current-directory current-directory-for-user current-drive current-environment-variables current-error-port current-eval current-evt-pseudo-random-generator current-gc-milliseconds current-get-interaction-input-port current-inexact-milliseconds current-input-port current-inspector current-library-collection-paths current-load current-load-extension current-load-relative-directory current-load/use-compiled current-locale current-memory-use current-milliseconds current-module-declare-name current-module-declare-source current-module-name-resolver current-module-path-for-load current-namespace current-output-port current-parameterization current-preserved-thread-cell-values current-print current-process-milliseconds current-prompt-read current-pseudo-random-generator current-read-interaction current-reader-guard current-readtable current-seconds current-security-guard current-subprocess-custodian-mode current-thread current-thread-group current-thread-initial-stack-size current-write-relative-directory custodian-box-value custodian-box? custodian-limit-memory custodian-managed-list custodian-memory-accounting-available? custodian-require-memory custodian-shutdown-all custodian? custom-print-quotable-accessor custom-print-quotable? custom-write-accessor custom-write? date date* date*-nanosecond date*-time-zone-name date*? date-day date-dst? date-hour date-minute date-month date-second date-time-zone-offset date-week-day date-year date-year-day date? datum-intern-literal default-continuation-prompt-tag delete-directory delete-file denominator directory-exists? directory-list display displayln dump-memory-stats dynamic-require dynamic-require-for-syntax dynamic-wind environment-variables-copy environment-variables-names environment-variables-ref environment-variables-set! environment-variables? eof eof-object? ephemeron-value ephemeron? eprintf eq-hash-code eq? equal-hash-code equal-secondary-hash-code equal? equal?/recur eqv-hash-code eqv? error error-display-handler error-escape-handler error-print-context-length error-print-source-location error-print-width error-value->string-handler eval eval-jit-enabled eval-syntax even? evt? exact->inexact exact-integer? exact-nonnegative-integer? exact-positive-integer? exact? executable-yield-handler exit exit-handler exn exn-continuation-marks exn-message exn:break exn:break-continuation exn:break:hang-up exn:break:hang-up? exn:break:terminate exn:break:terminate? exn:break? exn:fail exn:fail:contract exn:fail:contract:arity exn:fail:contract:arity? exn:fail:contract:continuation exn:fail:contract:continuation? exn:fail:contract:divide-by-zero exn:fail:contract:divide-by-zero? exn:fail:contract:non-fixnum-result exn:fail:contract:non-fixnum-result? exn:fail:contract:variable exn:fail:contract:variable-id exn:fail:contract:variable? exn:fail:contract? exn:fail:filesystem exn:fail:filesystem:errno exn:fail:filesystem:errno-errno exn:fail:filesystem:errno? exn:fail:filesystem:exists exn:fail:filesystem:exists? exn:fail:filesystem:missing-module exn:fail:filesystem:missing-module-path exn:fail:filesystem:missing-module? exn:fail:filesystem:version exn:fail:filesystem:version? exn:fail:filesystem? exn:fail:network exn:fail:network:errno exn:fail:network:errno-errno exn:fail:network:errno? exn:fail:network? exn:fail:out-of-memory exn:fail:out-of-memory? exn:fail:read exn:fail:read-srclocs exn:fail:read:eof exn:fail:read:eof? exn:fail:read:non-char exn:fail:read:non-char? exn:fail:read? exn:fail:syntax exn:fail:syntax-exprs exn:fail:syntax:missing-module exn:fail:syntax:missing-module-path exn:fail:syntax:missing-module? exn:fail:syntax:unbound exn:fail:syntax:unbound? exn:fail:syntax? exn:fail:unsupported exn:fail:unsupported? exn:fail:user exn:fail:user? exn:fail? exn:missing-module-accessor exn:missing-module? exn:srclocs-accessor exn:srclocs? exn? exp expand expand-once expand-syntax expand-syntax-once expand-syntax-to-top-form expand-to-top-form expand-user-path explode-path expt file-exists? file-or-directory-identity file-or-directory-modify-seconds file-or-directory-permissions file-position file-position* file-size file-stream-buffer-mode file-stream-port? file-truncate filesystem-change-evt filesystem-change-evt-cancel filesystem-change-evt? filesystem-root-list find-executable-path find-library-collection-paths find-system-path fixnum? floating-point-bytes->real flonum? floor flush-output for-each format fprintf free-identifier=? gcd generate-temporaries gensym get-output-bytes get-output-string getenv global-port-print-handler guard-evt handle-evt handle-evt? hash hash-equal? hash-eqv? hash-has-key? hash-placeholder? hash-ref! hasheq hasheqv identifier-binding identifier-binding-symbol identifier-label-binding identifier-prune-lexical-context identifier-prune-to-source-module identifier-remove-from-definition-context identifier-template-binding identifier-transformer-binding identifier? imag-part immutable? impersonate-box impersonate-continuation-mark-key impersonate-hash impersonate-procedure impersonate-prompt-tag impersonate-struct impersonate-vector impersonator-ephemeron impersonator-of? impersonator-prop:application-mark impersonator-property-accessor-procedure? impersonator-property? impersonator? inexact->exact inexact-real? inexact? input-port? inspector? integer->char integer->integer-bytes integer-bytes->integer integer-length integer-sqrt integer-sqrt/remainder integer? internal-definition-context-seal internal-definition-context? keyword->string keywordbytes list->string list->vector list-ref list-tail list? load load-extension load-on-demand-enabled load-relative load-relative-extension load/cd load/use-compiled local-expand local-expand/capture-lifts local-transformer-expand local-transformer-expand/capture-lifts locale-string-encoding log log-max-level magnitude make-arity-at-least make-bytes make-channel make-continuation-mark-key make-continuation-prompt-tag make-custodian make-custodian-box make-date make-date* make-derived-parameter make-directory make-environment-variables make-ephemeron make-exn make-exn:break make-exn:break:hang-up make-exn:break:terminate make-exn:fail make-exn:fail:contract make-exn:fail:contract:arity make-exn:fail:contract:continuation make-exn:fail:contract:divide-by-zero make-exn:fail:contract:non-fixnum-result make-exn:fail:contract:variable make-exn:fail:filesystem make-exn:fail:filesystem:errno make-exn:fail:filesystem:exists make-exn:fail:filesystem:missing-module make-exn:fail:filesystem:version make-exn:fail:network make-exn:fail:network:errno make-exn:fail:out-of-memory make-exn:fail:read make-exn:fail:read:eof make-exn:fail:read:non-char make-exn:fail:syntax make-exn:fail:syntax:missing-module make-exn:fail:syntax:unbound make-exn:fail:unsupported make-exn:fail:user make-file-or-directory-link make-hash-placeholder make-hasheq-placeholder make-hasheqv make-hasheqv-placeholder make-immutable-hasheqv make-impersonator-property make-input-port make-inspector make-known-char-range-list make-output-port make-parameter make-phantom-bytes make-pipe make-placeholder make-polar make-prefab-struct make-pseudo-random-generator make-reader-graph make-readtable make-rectangular make-rename-transformer make-resolved-module-path make-security-guard make-semaphore make-set!-transformer make-shared-bytes make-sibling-inspector make-special-comment make-srcloc make-string make-struct-field-accessor make-struct-field-mutator make-struct-type make-struct-type-property make-syntax-delta-introducer make-syntax-introducer make-thread-cell make-thread-group make-vector make-weak-box make-weak-hasheqv make-will-executor map max mcar mcdr mcons member memq memv min module->exports module->imports module->language-info module->namespace module-compiled-cross-phase-persistent? module-compiled-exports module-compiled-imports module-compiled-language-info module-compiled-name module-compiled-submodules module-declared? module-path-index-join module-path-index-resolve module-path-index-split module-path-index-submodule module-path-index? module-path? module-predefined? module-provide-protected? modulo mpair? nack-guard-evt namespace-attach-module namespace-attach-module-declaration namespace-base-phase namespace-mapped-symbols namespace-module-identifier namespace-module-registry namespace-require namespace-require/constant namespace-require/copy namespace-require/expansion-time namespace-set-variable-value! namespace-symbol->identifier namespace-syntax-introduce namespace-undefine-variable! namespace-unprotect-module namespace-variable-value namespace? negative? never-evt newline normal-case-path not null null? number->string number? numerator object-name odd? open-input-bytes open-input-file open-input-output-file open-input-string open-output-bytes open-output-file open-output-string ormap output-port? pair? parameter-procedure=? parameter? parameterization? path->bytes path->complete-path path->directory-path path->string path-add-suffix path-convention-type path-element->bytes path-element->string path-for-some-system? path-list-string->path-list path-replace-suffix path-string? path? peek-byte peek-byte-or-special peek-bytes peek-bytes! peek-bytes-avail! peek-bytes-avail!* peek-bytes-avail!/enable-break peek-char peek-char-or-special peek-string peek-string! phantom-bytes? pipe-content-length placeholder-get placeholder-set! placeholder? poll-guard-evt port-closed-evt port-closed? port-commit-peeked port-count-lines! port-count-lines-enabled port-counts-lines? port-display-handler port-file-identity port-file-unlock port-next-location port-print-handler port-progress-evt port-provides-progress-evts? port-read-handler port-try-file-lock? port-write-handler port-writes-atomic? port-writes-special? port? positive? prefab-key->struct-type prefab-key? prefab-struct-key pregexp pregexp? primitive-closure? primitive-result-arity primitive? print print-as-expression print-boolean-long-form print-box print-graph print-hash-table print-mpair-curly-braces print-pair-curly-braces print-reader-abbreviations print-struct print-syntax-width print-unreadable print-vector-length printf procedure->method procedure-arity procedure-arity-includes? procedure-arity? procedure-closure-contents-eq? procedure-extract-target procedure-reduce-arity procedure-rename procedure-struct-type? procedure? progress-evt? prop:arity-string prop:checked-procedure prop:custom-print-quotable prop:custom-write prop:equal+hash prop:evt prop:exn:missing-module prop:exn:srclocs prop:impersonator-of prop:input-port prop:liberal-define-context prop:output-port prop:procedure prop:rename-transformer prop:set!-transformer pseudo-random-generator->vector pseudo-random-generator-vector? pseudo-random-generator? putenv quotient quotient/remainder raise raise-argument-error raise-arguments-error raise-arity-error raise-mismatch-error raise-range-error raise-result-error raise-syntax-error raise-type-error raise-user-error random random-seed rational? rationalize read read-accept-bar-quote read-accept-box read-accept-compiled read-accept-dot read-accept-graph read-accept-infix-dot read-accept-lang read-accept-quasiquote read-accept-reader read-byte read-byte-or-special read-bytes read-bytes! read-bytes-avail! read-bytes-avail!* read-bytes-avail!/enable-break read-bytes-line read-case-sensitive read-char read-char-or-special read-curly-brace-as-paren read-decimal-as-inexact read-eval-print-loop read-language read-line read-on-demand-source read-square-bracket-as-paren read-string read-string! read-syntax read-syntax/recursive read/recursive readtable-mapping readtable? real->double-flonum real->floating-point-bytes real->single-flonum real-part real? regexp regexp-match regexp-match-peek regexp-match-peek-immediate regexp-match-peek-positions regexp-match-peek-positions-immediate regexp-match-peek-positions-immediate/end regexp-match-peek-positions/end regexp-match-positions regexp-match-positions/end regexp-match/end regexp-match? regexp-max-lookbehind regexp-replace regexp-replace* regexp? relative-path? remainder rename-file-or-directory rename-transformer-target rename-transformer? reroot-path resolve-path resolved-module-path-name resolved-module-path? reverse round seconds->date security-guard? semaphore-peek-evt semaphore-peek-evt? semaphore-post semaphore-try-wait? semaphore-wait semaphore-wait/enable-break semaphore? set!-transformer-procedure set!-transformer? set-box! set-mcar! set-mcdr! set-phantom-bytes! set-port-next-location! shared-bytes shell-execute simplify-path sin single-flonum? sleep special-comment-value special-comment? split-path sqrt srcloc srcloc->string srcloc-column srcloc-line srcloc-position srcloc-source srcloc-span srcloc? string string->bytes/latin-1 string->bytes/locale string->bytes/utf-8 string->immutable-string string->keyword string->list string->number string->path string->path-element string->symbol string->uninterned-symbol string->unreadable-symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-copy! string-downcase string-environment-variable-name? string-fill! string-foldcase string-length string-locale-ci? string-locale-downcase string-locale-upcase string-locale? string-normalize-nfc string-normalize-nfd string-normalize-nfkc string-normalize-nfkd string-ref string-set! string-titlecase string-upcase string-utf-8-length string<=? string=? string>? string? struct->vector struct-accessor-procedure? struct-constructor-procedure? struct-info struct-mutator-procedure? struct-predicate-procedure? struct-type-info struct-type-make-constructor struct-type-make-predicate struct-type-property-accessor-procedure? struct-type-property? struct-type? struct:arity-at-least struct:date struct:date* struct:exn struct:exn:break struct:exn:break:hang-up struct:exn:break:terminate struct:exn:fail struct:exn:fail:contract struct:exn:fail:contract:arity struct:exn:fail:contract:continuation struct:exn:fail:contract:divide-by-zero struct:exn:fail:contract:non-fixnum-result struct:exn:fail:contract:variable struct:exn:fail:filesystem struct:exn:fail:filesystem:errno struct:exn:fail:filesystem:exists struct:exn:fail:filesystem:missing-module struct:exn:fail:filesystem:version struct:exn:fail:network struct:exn:fail:network:errno struct:exn:fail:out-of-memory struct:exn:fail:read struct:exn:fail:read:eof struct:exn:fail:read:non-char struct:exn:fail:syntax struct:exn:fail:syntax:missing-module struct:exn:fail:syntax:unbound struct:exn:fail:unsupported struct:exn:fail:user struct:srcloc struct? sub1 subbytes subprocess subprocess-group-enabled subprocess-kill subprocess-pid subprocess-status subprocess-wait subprocess? substring symbol->string symbol-interned? symbol-unreadable? symbol? sync sync/enable-break sync/timeout sync/timeout/enable-break syntax->list syntax-arm syntax-column syntax-disarm syntax-e syntax-line syntax-local-bind-syntaxes syntax-local-certifier syntax-local-context syntax-local-expand-expression syntax-local-get-shadower syntax-local-introduce syntax-local-lift-context syntax-local-lift-expression syntax-local-lift-module-end-declaration syntax-local-lift-provide syntax-local-lift-require syntax-local-lift-values-expression syntax-local-make-definition-context syntax-local-make-delta-introducer syntax-local-module-defined-identifiers syntax-local-module-exports syntax-local-module-required-identifiers syntax-local-name syntax-local-phase-level syntax-local-submodules syntax-local-transforming-module-provides? syntax-local-value syntax-local-value/immediate syntax-original? syntax-position syntax-property syntax-property-symbol-keys syntax-protect syntax-rearm syntax-recertify syntax-shift-phase-level syntax-source syntax-source-module syntax-span syntax-taint syntax-tainted? syntax-track-origin syntax-transforming-module-expression? syntax-transforming? syntax? system-big-endian? system-idle-evt system-language+country system-library-subpath system-path-convention-type system-type tan terminal-port? thread thread-cell-ref thread-cell-set! thread-cell-values? thread-cell? thread-dead-evt thread-dead? thread-group? thread-resume thread-resume-evt thread-rewind-receive thread-running? thread-suspend thread-suspend-evt thread-wait thread/suspend-to-kill thread? time-apply truncate unbox uncaught-exception-handler use-collection-link-paths use-compiled-file-paths use-user-specific-search-paths values variable-reference->empty-namespace variable-reference->module-base-phase variable-reference->module-declaration-inspector variable-reference->module-path-index variable-reference->module-source variable-reference->namespace variable-reference->phase variable-reference->resolved-module-path variable-reference-constant? variable-reference? vector vector->immutable-vector vector->list vector->pseudo-random-generator vector->pseudo-random-generator! vector->values vector-fill! vector-immutable vector-length vector-ref vector-set! vector-set-performance-stats! vector? version void void? weak-box-value weak-box? will-execute will-executor? will-register will-try-execute with-input-from-file with-output-to-file wrap-evt write write-byte write-bytes write-bytes-avail write-bytes-avail* write-bytes-avail-evt write-bytes-avail/enable-break write-char write-special write-special-avail* write-special-evt write-string zero? ) end # Since Racket allows identifiers to consist of nearly anything, # it's simpler to describe what an ID is _not_. id = /[^\s\(\)\[\]\{\}'`,.]+/i state :root do # comments rule %r/;.*$/, Comment::Single rule %r/#!.*/, Comment::Single rule %r/#\|/, Comment::Multiline, :block_comment rule %r/#;/, Comment::Multiline, :sexp_comment rule %r/\s+/m, Text rule %r/[+-]inf[.][f0]/, Num::Float rule %r/[+-]nan[.]0/, Num::Float rule %r/[-]min[.]0/, Num::Float rule %r/[+]max[.]0/, Num::Float rule %r/-?\d+\.\d+/, Num::Float rule %r/-?\d+/, Num::Integer rule %r/#:#{id}+/, Name::Tag # keyword rule %r/#b[01]+/, Num::Bin rule %r/#o[0-7]+/, Num::Oct rule %r/#d[0-9]+/, Num::Integer rule %r/#x[0-9a-f]+/i, Num::Hex rule %r/#[ei][\d.]+/, Num::Other rule %r/"(\\\\|\\"|[^"])*"/, Str rule %r/['`]#{id}/i, Str::Symbol rule %r/#\\([()\/'"._!\$%& ?=+-]{1}|[a-z0-9]+)/i, Str::Char rule %r/#t(rue)?|#f(alse)?/i, Name::Constant rule %r/(?:'|#|`|,@|,|\.)/, Operator rule %r/(['#])(\s*)(\()/m do groups Str::Symbol, Text, Punctuation end # () [] {} are all permitted as like pairs rule %r/\(|\[|\{/, Punctuation, :command rule %r/\)|\]|\}/, Punctuation rule id, Name::Variable end state :block_comment do rule %r/[^|#]+/, Comment::Multiline rule %r/\|#/, Comment::Multiline, :pop! rule %r/#\|/, Comment::Multiline, :block_comment rule %r/[|#]/, Comment::Multiline end state :sexp_comment do rule %r/[({\[]/, Comment::Multiline, :sexp_comment_inner rule %r/"(?:\\"|[^"])*?"/, Comment::Multiline, :pop! rule %r/[^\s]+/, Comment::Multiline, :pop! rule(//) { pop! } end state :sexp_comment_inner do rule %r/[^(){}\[\]]+/, Comment::Multiline rule %r/[)}\]]/, Comment::Multiline, :pop! rule %r/[({\[]/, Comment::Multiline, :sexp_comment_inner end state :command do rule id, Name::Function do |m| if self.class.keywords.include? m[0] token Keyword elsif self.class.builtins.include? m[0] token Name::Builtin else token Name::Function end pop! end rule(//) { pop! } end end end end rouge-3.28.0/lib/rouge/lexers/reasonml.rb000066400000000000000000000036071417417255300203020ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'ocaml/common.rb' class ReasonML < OCamlCommon title "ReasonML" desc 'New syntax on top of OCaml ecosystem (reasonml.github.io)' tag 'reasonml' filenames '*.re', '*.rei' mimetypes 'text/x-reasonml' def self.keywords @keywords ||= super + Set.new(%w( switch )) end state :root do rule %r/\s+/m, Text rule %r/false|true|[(][)]|\[\]/, Name::Builtin::Pseudo rule %r/#{@@upper_id}(?=\s*[.])/, Name::Namespace, :dotted rule %r/`#{@@id}/, Name::Tag rule @@upper_id, Name::Class rule %r(//.*), Comment::Single rule %r(/\*), Comment::Multiline, :comment rule @@id do |m| match = m[0] if self.class.keywords.include? match token Keyword elsif self.class.word_operators.include? match token Operator::Word elsif self.class.primitives.include? match token Keyword::Type else token Name end end rule %r/[(){}\[\];]+/, Punctuation rule @@operator, Operator rule %r/-?\d[\d_]*(.[\d_]*)?(e[+-]?\d[\d_]*)/i, Num::Float rule %r/0x\h[\h_]*/i, Num::Hex rule %r/0o[0-7][0-7_]*/i, Num::Oct rule %r/0b[01][01_]*/i, Num::Bin rule %r/\d[\d_]*/, Num::Integer rule %r/'(?:(\\[\\"'ntbr ])|(\\[0-9]{3})|(\\x\h{2}))'/, Str::Char rule %r/'[^'\/]'/, Str::Char rule %r/'/, Keyword rule %r/"/, Str::Double, :string rule %r/[~?]#{@@id}/, Name::Variable end state :comment do rule %r([^/*]+), Comment::Multiline rule %r(/\*), Comment::Multiline, :comment rule %r(\*/), Comment::Multiline, :pop! rule %r([*/]), Comment::Multiline end end end end rouge-3.28.0/lib/rouge/lexers/rego.rb000066400000000000000000000031451417417255300174130ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Rego < RegexLexer title "Rego" desc "The Rego open-policy-agent (OPA) policy language (openpolicyagent.org)" tag 'rego' filenames '*.rego' def self.constants @constants ||= Set.new %w( true false null ) end def self.operators @operators ||= Set.new %w( as default else import not package some with ) end state :basic do rule %r/\s+/, Text rule %r/#.*/, Comment::Single rule %r/[\[\](){}|.,;!]/, Punctuation rule %r/"[^"]*"/, Str::Double rule %r/-?\d+\.\d+([eE][+-]?\d+)?/, Num::Float rule %r/-?\d+([eE][+-]?\d+)?/, Num rule %r/\\u[0-9a-fA-F]{4}/, Num::Hex rule %r/\\["\/bfnrt]/, Str::Escape end state :operators do rule %r/(=|!=|>=|<=|>|<|\+|-|\*|%|\/|\||&|:=)/, Operator rule %r/[\/:?@^~]+/, Operator end state :root do mixin :basic mixin :operators rule %r/[[:word:]]+/ do |m| if self.class.constants.include? m[0] token Keyword::Constant elsif self.class.operators.include? m[0] token Operator::Word else token Name end end end end end end rouge-3.28.0/lib/rouge/lexers/rescript.rb000066400000000000000000000061501417417255300203110ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'ocaml/common.rb' class ReScript < OCamlCommon title "ReScript" desc "The ReScript programming language (rescript-lang.org)" tag 'rescript' filenames '*.res', '*.resi' mimetypes 'text/x-rescript' def self.keywords @keywords ||= Set.new(%w( open let rec and as exception assert lazy if else for in to downto while switch when external type private mutable constraint include module of with try import export )) end def self.types @types ||= Set.new(%w( bool int float char string unit list array option ref exn format )) end def self.word_operators @word_operators ||= Set.new(%w(mod land lor lxor lsl lsr asr or)) end state :root do rule %r/\s+/m, Text rule %r([,.:?~\\]), Text # Boolean Literal rule %r/\btrue|false\b/, Keyword::Constant # Module chain rule %r/#{@@upper_id}(?=\s*[.])/, Name::Namespace, :dotted # Decorator rule %r/@#{@@id}(\.#{@@id})*/, Name::Decorator # Poly variant rule %r/\##{@@id}/, Name::Class # Variant or Module rule @@upper_id, Name::Class # Comments rule %r(//.*), Comment::Single rule %r(/\*), Comment::Multiline, :comment # Keywords and identifiers rule @@id do |m| match = m[0] if self.class.keywords.include? match token Keyword elsif self.class.word_operators.include? match token Operator::Word elsif self.class.types.include? match token Keyword::Type else token Name end end # Braces rule %r/[(){}\[\];]+/, Punctuation # Operators rule %r([;_!$%&*+/<=>@^|-]+), Operator # Numbers rule %r/-?\d[\d_]*(.[\d_]*)?(e[+-]?\d[\d_]*)/i, Num::Float rule %r/0x\h[\h_]*/i, Num::Hex rule %r/0o[0-7][0-7_]*/i, Num::Oct rule %r/0b[01][01_]*/i, Num::Bin rule %r/\d[\d_]*/, Num::Integer # String and Char rule %r/'(?:(\\[\\"'ntbr ])|(\\[0-9]{3})|(\\x\h{2}))'/, Str::Char rule %r/'[^'\/]'/, Str::Char rule %r/'/, Keyword rule %r/"/, Str::Double, :string # Interpolated string rule %r/`/ do token Str::Double push :interpolated_string end end state :comment do rule %r([^/\*]+), Comment::Multiline rule %r(/\*), Comment::Multiline, :comment rule %r(\*/), Comment::Multiline, :pop! rule %r([*/]), Comment::Multiline end state :interpolated_string do rule %r/[$]{/, Punctuation, :interpolated_expression rule %r/`/, Str::Double, :pop! rule %r/\\[$`]/, Str::Escape rule %r/[^$`\\]+/, Str::Double rule %r/[\\$]/, Str::Double end state :interpolated_expression do rule %r/}/, Punctuation, :pop! mixin :root end end end end rouge-3.28.0/lib/rouge/lexers/robot_framework.rb000066400000000000000000000134711417417255300216640ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class RobotFramework < RegexLexer tag 'robot_framework' aliases 'robot', 'robot-framework' title "Robot Framework" desc 'Robot Framework is a generic open source automation testing framework (robotframework.org)' filenames '*.robot' mimetypes 'text/x-robot' def initialize(opts = {}) super(opts) @col = 0 @next = nil @is_template = false end def self.settings_with_keywords @settings_with_keywords ||= Set.new [ "library", "resource", "setup", "teardown", "template", "suite setup", "suite teardown", "task setup", "task teardown", "task template", "test setup", "test teardown", "test template", "variables" ] end def self.settings_with_args @settings_with_args ||= Set.new [ "arguments", "default tags", "documentation", "force tags", "metadata", "return", "tags", "timeout", "task timeout", "test timeout" ] end id = %r/(?:\\|[^|$@&% \t\n])+(?: (?:\\.|[^|$@&% \t\n])+)*/ bdd = %r/(?:Given|When|Then|And|But) /i sep = %r/ +\| +|[ ]{2,}|\t+/ start do push :prior_text end state :prior_text do rule %r/^[^*].*/, Text rule(//) { pop! } end # Mixins state :whitespace do rule %r/\s+/, Text::Whitespace end state :section_include do mixin :end_section mixin :sep mixin :newline end state :end_section do rule(/(?=^(?:\| )?\*)/) { pop! } end state :return do rule(//) { pop! } end state :sep do rule %r/\| /, Text::Whitespace rule sep do token Text::Whitespace @col = @col + 1 if @next push @next elsif @is_template push :args elsif @col == 1 @next = :keyword push :keyword else push :args end push :cell_start end rule %r/\.\.\. */ do token Text::Whitespace @col = @col + 1 push :args end rule %r/ ?\|/, Text::Whitespace end state :newline do rule %r/\n/ do token Text::Whitespace @col = 0 @next = nil push :cell_start end end # States state :root do mixin :whitespace rule %r/^(?:\| )?\*[* ]*([A-Z]+(?: [A-Z]+)?).*/i do |m| token Generic::Heading, m[0] case m[1].chomp("s").downcase when "setting" then push :section_settings when "test case" then push :section_tests when "task" then push :section_tasks when "keyword" then push :section_keywords when "variable" then push :section_variables end end end state :section_settings do mixin :section_include rule %r/([A-Z]+(?: [A-Z]+)?)(:?)/i do |m| match = m[1].downcase @next = if self.class.settings_with_keywords.include? match :keyword elsif self.class.settings_with_args.include? match :args end groups Name::Builtin::Pseudo, Punctuation end end state :section_tests do mixin :section_include rule %r/[$@&%{}]+/, Name::Label rule %r/( )(?![ |])/, Name::Label rule id do @is_template = false token Name::Label end end state :section_tasks do mixin :section_tests end state :section_keywords do mixin :section_include rule %r/[$@&%]\{/ do token Name::Variable push :var end rule %r/[$@&%{}]+/, Name::Label rule %r/( )(?![ |])/, Name::Label rule id, Name::Label end state :section_variables do mixin :section_include rule %r/[$@&%]\{/ do token Name::Variable @next = :args push :var end end state :cell_start do rule %r/#.*/, Comment mixin :return end state :keyword do rule %r/(\[)([A-Z]+(?: [A-Z]+)?)(\])/i do |m| groups Punctuation, Name::Builtin::Pseudo, Punctuation match = m[2].downcase @is_template = true if match == "template" if self.class.settings_with_keywords.include? match @next = :keyword elsif self.class.settings_with_args.include? match @next = :args end pop! end rule %r/[$@&%]\{/ do token Name::Variable @next = :keyword unless @next.nil? push :var end rule %r/FOR/i do token Name::Function @next = :keyword unless @next.nil? end rule %r/( )(?![ |])/, Name::Function rule bdd, Name::Builtin rule id do token Name::Function @next = nil end mixin :return end state :args do rule %r/[$@&%]\{/ do token Name::Variable @next = :keyword unless @next.nil? push :var end rule %r/[$@&%]+/, Str rule %r/( )(?![ |])/, Str rule id, Str mixin :return end state :var do rule %r/(\})( )(=)/ do groups Name::Variable, Text::Whitespace, Punctuation pop! end rule %r/[$@&%]\{/, Name::Variable, :var rule %r/[{\[]/, Name::Variable, :var rule %r/[}\]]/, Name::Variable, :pop! rule %r/[^$@&%{}\[\]]+/, Name::Variable rule %r/\}\[/, Name::Variable end end end end rouge-3.28.0/lib/rouge/lexers/ruby.rb000066400000000000000000000315271417417255300174450ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Ruby < RegexLexer title "Ruby" desc "The Ruby programming language (ruby-lang.org)" tag 'ruby' aliases 'rb' filenames '*.rb', '*.ruby', '*.rbw', '*.rake', '*.gemspec', '*.podspec', 'Rakefile', 'Guardfile', 'Gemfile', 'Capfile', 'Podfile', 'Vagrantfile', '*.ru', '*.prawn', 'Berksfile', '*.arb', 'Dangerfile', 'Fastfile', 'Deliverfile', 'Appfile' mimetypes 'text/x-ruby', 'application/x-ruby' def self.detect?(text) return true if text.shebang? 'ruby' end state :symbols do # symbols rule %r( : # initial : @{0,2} # optional ivar, for :@foo and :@@foo [a-z_]\w*[!?]? # the symbol )xi, Str::Symbol # special symbols rule %r(:(?:\*\*|[-+]@|[/\%&\|^`~]|\[\]=?|<<|>>|<=?>|<=?|===?)), Str::Symbol rule %r/:'(\\\\|\\'|[^'])*'/, Str::Symbol rule %r/:"/, Str::Symbol, :simple_sym end state :sigil_strings do # %-sigiled strings # %(abc), %[abc], %, %.abc., %r.abc., etc delimiter_map = { '{' => '}', '[' => ']', '(' => ')', '<' => '>' } rule %r/%([rqswQWxiI])?([^\w\s])/ do |m| open = Regexp.escape(m[2]) close = Regexp.escape(delimiter_map[m[2]] || m[2]) interp = /[rQWxI]/ === m[1] toktype = Str::Other puts " open: #{open.inspect}" if @debug puts " close: #{close.inspect}" if @debug # regexes if m[1] == 'r' toktype = Str::Regex push :regex_flags end token toktype push do uniq_chars = "#{open}#{close}".squeeze uniq_chars = '' if open == close && open == "\\#" rule %r/\\[##{uniq_chars}\\]/, Str::Escape # nesting rules only with asymmetric delimiters if open != close rule %r/#{open}/ do token toktype push end end rule %r/#{close}/, toktype, :pop! if interp mixin :string_intp_escaped rule %r/#/, toktype else rule %r/[\\#]/, toktype end rule %r/[^##{uniq_chars}\\]+/m, toktype end end end state :strings do mixin :symbols rule %r/\b[a-z_]\w*?[?!]?:\s+/, Str::Symbol, :expr_start rule %r/'(\\\\|\\'|[^'])*'/, Str::Single rule %r/"/, Str::Double, :simple_string rule %r/(?_*\$?:"]), Name::Variable::Global rule %r/\$-[0adFiIlpvw]/, Name::Variable::Global rule %r/::/, Operator mixin :strings rule %r/(?:#{keywords.join('|')})(?=\W|$)/, Keyword, :expr_start rule %r/(?:#{keywords_pseudo.join('|')})\b/, Keyword::Pseudo, :expr_start rule %r( (module) (\s+) ([a-zA-Z_][a-zA-Z0-9_]*(::[a-zA-Z_][a-zA-Z0-9_]*)*) )x do groups Keyword, Text, Name::Namespace end rule %r/(def\b)(\s*)/ do groups Keyword, Text push :funcname end rule %r/(class\b)(\s*)/ do groups Keyword, Text push :classname end rule %r/(?:#{builtins_q.join('|')})[?]/, Name::Builtin, :expr_start rule %r/(?:#{builtins_b.join('|')})!/, Name::Builtin, :expr_start rule %r/(?=])/ do groups Punctuation, Text, Name::Function push :method_call end rule %r/[a-zA-Z_]\w*[?!]/, Name, :expr_start rule %r/[a-zA-Z_]\w*/, Name, :method_call rule %r/\*\*|<>?|>=|<=|<=>|=~|={3}|!~|&&?|\|\||\./, Operator, :expr_start rule %r/[-+\/*%=<>&!^|~]=?/, Operator, :expr_start rule(/[?]/) { token Punctuation; push :ternary; push :expr_start } rule %r<[\[({,:\\;/]>, Punctuation, :expr_start rule %r<[\])}]>, Punctuation end state :has_heredocs do rule %r/(?>? | <=>? | >= | ===? ) )x do |m| puts "matches: #{[m[0], m[1], m[2], m[3]].inspect}" if @debug groups Name::Class, Operator, Name::Function pop! end rule(//) { pop! } end state :classname do rule %r/\s+/, Text rule %r/\w+(::\w+)+/, Name::Class rule %r/\(/ do token Punctuation push :defexpr push :expr_start end # class << expr rule %r/<=0?n[x]:"" rule %r( [?](\\[MC]-)* # modifiers (\\([\\abefnrstv\#"']|x[a-fA-F0-9]{1,2}|[0-7]{1,3})|\S) (?!\w) )x, Str::Char, :pop! # special case for using a single space. Ruby demands that # these be in a single line, otherwise it would make no sense. rule %r/(\s*)(%[rqswQWxiI]? \S* )/ do groups Text, Str::Other pop! end mixin :sigil_strings rule(//) { pop! } end state :slash_regex do mixin :string_intp rule %r(\\\\), Str::Regex rule %r(\\/), Str::Regex rule %r([\\#]), Str::Regex rule %r([^\\/#]+)m, Str::Regex rule %r(/) do token Str::Regex goto :regex_flags end end state :end_part do # eat up the rest of the stream as Comment::Preproc rule %r/.+/m, Comment::Preproc, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/rust.rb000066400000000000000000000206601417417255300174550ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Rust < RegexLexer title "Rust" desc 'The Rust programming language (rust-lang.org)' tag 'rust' aliases 'rs', # So that directives from https://github.com/budziq/rust-skeptic # do not prevent highlighting. 'rust,no_run', 'rs,no_run', 'rust,ignore', 'rs,ignore', 'rust,should_panic', 'rs,should_panic' filenames '*.rs' mimetypes 'text/x-rust' def self.detect?(text) return true if text.shebang? 'rustc' end def self.keywords @keywords ||= %w( as async await break const continue crate dyn else enum extern false fn for if impl in let log loop match mod move mut pub ref return self Self static struct super trait true type unsafe use where while abstract become box do final macro override priv typeof unsized virtual yield try union ) end def self.builtins @builtins ||= Set.new %w( Add BitAnd BitOr BitXor bool c_char c_double c_float char c_int clock_t c_long c_longlong Cons Const Copy c_schar c_short c_uchar c_uint c_ulong c_ulonglong c_ushort c_void dev_t DIR dirent Div Either Eq Err f32 f64 Failure FILE float fpos_t i16 i32 i64 i8 isize Index ino_t int intptr_t Left mode_t Modulo Mul Neg Nil None Num off_t Ok Option Ord Owned pid_t Ptr ptrdiff_t Right Send Shl Shr size_t Some ssize_t str Sub Success time_t u16 u32 u64 u8 usize uint uintptr_t Box Vec String Gc Rc Arc u128 i128 Result Sync Pin Unpin Sized Drop drop Fn FnMut FnOnce Clone PartialEq PartialOrd AsMut AsRef From Into Default DoubleEndedIterator ExactSizeIterator Extend IntoIterator Iterator ) end def macro_closed? @macro_delims.values.all?(&:zero?) end start { @macro_delims = { ']' => 0, ')' => 0, '}' => 0 } push :bol } delim_map = { '[' => ']', '(' => ')', '{' => '}' } id = /[\p{XID_Start}_]\p{XID_Continue}*/ hex = /[0-9a-f]/i escapes = %r( \\ ([nrt'"\\0] | x#{hex}{2} | u\{(#{hex}_*){1,6}\}) )x size = /8|16|32|64|128|size/ # Although not officially part of Rust, the rustdoc tool allows code in # comments to begin with `#`. Code like this will be evaluated but not # included in the HTML output produced by rustdoc. So that code intended # for these comments can be higlighted with Rouge, the Rust lexer needs # to check if the beginning of the line begins with a `# `. state :bol do mixin :whitespace rule %r/#\s[^\n]*/, Comment::Special rule(//) { pop! } end state :attribute do mixin :whitespace mixin :has_literals rule %r/[(,)=:]/, Name::Decorator rule %r/\]/, Name::Decorator, :pop! rule id, Name::Decorator end state :whitespace do rule %r/\s+/, Text mixin :comments end state :comments do # Only 3 slashes are doc comments, `////` and beyond become normal # comments again (for some reason), so match this before the # doc line comments rather than figure out a rule %r(////+[^\n]*), Comment::Single # doc line comments — either inner (`//!`), or outer (`///`). rule %r(//[/!][^\n]*), Comment::Doc # otherwise, `//` is just a plain line comme rule %r(//[^\n]*), Comment::Single # /**/ and /***/ are self-closing block comments, not doc. Because this # is self-closing, it doesn't enter the states for nested comments rule %r(/\*\*\*?/), Comment::Multiline # 3+ stars and it's a normal non-doc block comment. rule %r(/\*\*\*+), Comment::Multiline, :nested_plain_block # `/*!` and `/**` begin doc comments. These nest and can have internal # block/doc comments, but they're still part of the documentation # inside. rule %r(/[*][*!]), Comment::Doc, :nested_doc_block # any other /* is a plain multiline comment rule %r(/[*]), Comment::Multiline, :nested_plain_block end # Multiline/block comments fully nest. This is true for ones that are # marked as documentation too. The behavior here is: # # - Anything inside a block doc comment is still included in the # documentation, even if it's a nested non-doc block comment. For # example: `/** /* still docs */ */` # - Anything inside of a block non-doc comment is still just a normal # comment, even if it's a nested block documentation comment. For # example: `/* /** not docs */ */` # # This basically means: if (on the outermost level) the comment starts as # one kind of block comment (either doc/non-doc), then everything inside # of it, including nested block comments of the opposite type, needs to # stay that type. # # Also note that single line comments do nothing anywhere inside of block # comments, thankfully. # # We just define this as two states, because this seems easier than # tracking it with instance vars. [ [:nested_plain_block, Comment::Multiline], [:nested_doc_block, Comment::Doc] ].each do |state_name, comment_token| state state_name do rule %r(\*/), comment_token, :pop! rule %r(/\*), comment_token, state_name # We only want to eat at most one `[*/]` at a time, # but we can skip past non-`[*/]` in bulk. rule %r([^*/]+|[*/]), comment_token end end state :root do rule %r/\n/, Text, :bol mixin :whitespace rule %r/#!?\[/, Name::Decorator, :attribute rule %r/\b(?:#{Rust.keywords.join('|')})\b/, Keyword mixin :has_literals rule %r([=-]>), Keyword rule %r(<->), Keyword rule %r/[()\[\]{}|,:;]/, Punctuation rule %r/[*\/!@~&+%^<>=\?-]|\.{2,3}/, Operator rule %r/([.]\s*)?#{id}(?=\s*[(])/m, Name::Function rule %r/[.]\s*await\b/, Keyword rule %r/[.]\s*#{id}/, Name::Property rule %r/[.]\s*\d+/, Name::Attribute rule %r/(#{id})(::)/m do groups Name::Namespace, Punctuation end # macros rule %r/\bmacro_rules!/, Name::Decorator, :macro_rules rule %r/#{id}!/, Name::Decorator, :macro rule %r/'static\b/, Keyword rule %r/'#{id}/, Name::Variable rule %r/#{id}/ do |m| name = m[0] if self.class.builtins.include? name token Name::Builtin else token Name end end end state :macro do mixin :has_literals rule %r/[\[{(]/ do |m| @macro_delims[delim_map[m[0]]] += 1 puts " macro_delims: #{@macro_delims.inspect}" if @debug token Punctuation end rule %r/[\]})]/ do |m| @macro_delims[m[0]] -= 1 puts " macro_delims: #{@macro_delims.inspect}" if @debug pop! if macro_closed? token Punctuation end # same as the rule in root, but don't push another macro state rule %r/#{id}!/, Name::Decorator mixin :root # No syntax errors in macros rule %r/./, Text end state :macro_rules do rule %r/[$]#{id}(:#{id})?/, Name::Variable rule %r/[$]/, Name::Variable mixin :macro end state :has_literals do # constants rule %r/\b(?:true|false)\b/, Keyword::Constant # characters/bytes rule %r( b?' (?: #{escapes} | [^\\] ) ' )x, Str::Char rule %r/b?"/, Str, :string rule %r/b?r(#*)".*?"\1/m, Str # numbers dot = /[.][0-9][0-9_]*/ exp = /[eE][-+]?[0-9_]+/ flt = /f32|f64/ rule %r( [0-9][0-9_]* (#{dot} #{exp}? #{flt}? |#{dot}? #{exp} #{flt}? |#{dot}? #{exp}? #{flt} |[.](?![._\p{XID_Start}]) ) )x, Num::Float rule %r( ( 0b[10_]+ | 0x[0-9a-fA-F_]+ | 0o[0-7_]+ | [0-9][0-9_]* ) (u#{size}?|i#{size})? )x, Num::Integer end state :string do rule %r/"/, Str, :pop! rule escapes, Str::Escape rule %r/[^"\\]+/m, Str end end end end rouge-3.28.0/lib/rouge/lexers/sas.rb000066400000000000000000000630031417417255300172440ustar00rootroot00000000000000# -*- coding: utf-8 -*- # module Rouge module Lexers class SAS < RegexLexer title "SAS" desc "SAS (Statistical Analysis Software)" tag 'sas' filenames '*.sas' mimetypes 'application/x-sas', 'application/x-stat-sas', 'application/x-sas-syntax' def self.data_step_statements # from Data step statements - SAS 9.4 Statements reference # http://support.sas.com/documentation/cdl/en/lestmtsref/68024/PDF/default/lestmtsref.pdf @data_step_statements ||= Set.new %w( ABORT ARRAY ATTRIB BY CALL CARDS CARDS4 CATNAME CHECKPOINT EXECUTE_ALWAYS CONTINUE DATA DATALINES DATALINES4 DELETE DESCRIBE DISPLAY DM DO UNTIL WHILE DROP END ENDSAS ERROR EXECUTE FILE FILENAME FOOTNOTE FORMAT GO TO IF THEN ELSE INFILE INFORMAT INPUT KEEP LABEL LEAVE LENGTH LIBNAME LINK LIST LOCK LOSTCARD MERGE MISSING MODIFY OPTIONS OUTPUT PAGE PUT PUTLOG REDIRECT REMOVE RENAME REPLACE RESETLINE RETAIN RETURN RUN SASFILE SELECT SET SKIP STOP SYSECHO TITLE UPDATE WHERE WINDOW X ) # label: # Sum end def self.sas_functions # from SAS 9.4 Functions and CALL Routines reference # http://support.sas.com/documentation/cdl/en/lefunctionsref/67960/PDF/default/lefunctionsref.pdf @sas_functions ||= Set.new %w( ABS ADDR ADDRLONG AIRY ALLCOMB ALLPERM ANYALNUM ANYALPHA ANYCNTRL ANYDIGIT ANYFIRST ANYGRAPH ANYLOWER ANYNAME ANYPRINT ANYPUNCT ANYSPACE ANYUPPER ANYXDIGIT ARCOS ARCOSH ARSIN ARSINH ARTANH ATAN ATAN2 ATTRC ATTRN BAND BETA BETAINV BLACKCLPRC BLACKPTPRC BLKSHCLPRC BLKSHPTPRC BLSHIFT BNOT BOR BRSHIFT BXOR BYTE CAT CATQ CATS CATT CATX CDF CEIL CEILZ CEXIST CHAR CHOOSEC CHOOSEN CINV CLOSE CMISS CNONCT COALESCE COALESCEC COLLATE COMB COMPARE COMPBL COMPFUZZ COMPGED COMPLEV COMPOUND COMPRESS CONSTANT CONVX CONVXP COS COSH COT COUNT COUNTC COUNTW CSC CSS CUMIPMT CUMPRINC CUROBS CV DACCDB DACCDBSL DACCSL DACCSYD DACCTAB DAIRY DATDIF DATE DATEJUL DATEPART DATETIME DAY DCLOSE DCREATE DEPDB DEPDBSL DEPSL DEPSYD DEPTAB DEQUOTE DEVIANCE DHMS DIF DIGAMMA DIM DINFO DIVIDE DNUM DOPEN DOPTNAME DOPTNUM DOSUBL DREAD DROPNOTE DSNAME DSNCATLGD DUR DURP EFFRATE ENVLEN ERF ERFC EUCLID EXIST EXP FACT FAPPEND FCLOSE FCOL FCOPY FDELETE FETCH FETCHOBS FEXIST FGET FILEEXIST FILENAME FILEREF FINANCE FIND FINDC FINDW FINFO FINV FIPNAME FIPNAMEL FIPSTATE FIRST FLOOR FLOORZ FMTINFO FNONCT FNOTE FOPEN FOPTNAME FOPTNUM FPOINT FPOS FPUT FREAD FREWIND FRLEN FSEP FUZZ FWRITE GAMINV GAMMA GARKHCLPRC GARKHPTPRC GCD GEODIST GEOMEAN GEOMEANZ GETOPTION GETVARC GETVARN GRAYCODE HARMEAN HARMEANZ HBOUND HMS HOLIDAY HOLIDAYCK HOLIDAYCOUNT HOLIDAYNAME HOLIDAYNX HOLIDAYNY HOLIDAYTEST HOUR HTMLDECODE HTMLENCODE IBESSEL IFC IFN INDEX INDEXC INDEXW INPUT INPUTC INPUTN INT INTCINDEX INTCK INTCYCLE INTFIT INTFMT INTGET INTINDEX INTNX INTRR INTSEAS INTSHIFT INTTEST INTZ IORCMSG IPMT IQR IRR JBESSEL JULDATE JULDATE7 KURTOSIS LAG LARGEST LBOUND LCM LCOMB LEFT LENGTH LENGTHC LENGTHM LENGTHN LEXCOMB LEXCOMBI LEXPERK LEXPERM LFACT LGAMMA LIBNAME LIBREF LOG LOG1PX LOG10 LOG2 LOGBETA LOGCDF LOGISTIC LOGPDF LOGSDF LOWCASE LPERM LPNORM MAD MARGRCLPRC MARGRPTPRC MAX MD5 MDY MEAN MEDIAN MIN MINUTE MISSING MOD MODEXIST MODULE MODULEC MODULEN MODZ MONTH MOPEN MORT MSPLINT MVALID N NETPV NLITERAL NMISS NOMRATE NORMAL NOTALNUM NOTALPHA NOTCNTRL NOTDIGIT NOTE NOTFIRST NOTGRAPH NOTLOWER NOTNAME NOTPRINT NOTPUNCT NOTSPACE NOTUPPER NOTXDIGIT NPV NVALID NWKDOM OPEN ORDINAL PATHNAME PCTL PDF PEEK PEEKC PEEKCLONG PEEKLONG PERM PMT POINT POISSON PPMT PROBBETA PROBBNML PROBBNRM PROBCHI PROBF PROBGAM PROBHYPR PROBIT PROBMC PROBNEGB PROBNORM PROBT PROPCASE PRXCHANGE PRXMATCH PRXPAREN PRXPARSE PRXPOSN PTRLONGADD PUT PUTC PUTN PVP QTR QUANTILE QUOTE RANBIN RANCAU RAND RANEXP RANGAM RANGE RANK RANNOR RANPOI RANTBL RANTRI RANUNI RENAME REPEAT RESOLVE REVERSE REWIND RIGHT RMS ROUND ROUNDE ROUNDZ SAVING SAVINGS SCAN SDF SEC SECOND SHA256 SHA256HEX SHA256HMACHEX SIGN SIN SINH SKEWNESS SLEEP SMALLEST SOAPWEB SOAPWEBMETA SOAPWIPSERVICE SOAPWIPSRS SOAPWS SOAPWSMETA SOUNDEX SPEDIS SQRT SQUANTILE STD STDERR STFIPS STNAME STNAMEL STRIP SUBPAD SUBSTR SUBSTRN SUM SUMABS SYMEXIST SYMGET SYMGLOBL SYMLOCAL SYSEXIST SYSGET SYSMSG SYSPARM SYSPROCESSID SYSPROCESSNAME SYSPROD SYSRC SYSTEM TAN TANH TIME TIMEPART TIMEVALUE TINV TNONCT TODAY TRANSLATE TRANSTRN TRANWRD TRIGAMMA TRIM TRIMN TRUNC TSO TYPEOF TZONEID TZONENAME TZONEOFF TZONES2U TZONEU2S UNIFORM UPCASE URLDECODE URLENCODE USS UUIDGEN VAR VARFMT VARINFMT VARLABEL VARLEN VARNAME VARNUM VARRAY VARRAYX VARTYPE VERIFY VFORMAT VFORMATD VFORMATDX VFORMATN VFORMATNX VFORMATW VFORMATWX VFORMATX VINARRAY VINARRAYX VINFORMAT VINFORMATD VINFORMATDX VINFORMATN VINFORMATNX VINFORMATW VINFORMATWX VINFORMATX VLABEL VLABELX VLENGTH VLENGTHX VNAME VNAMEX VTYPE VTYPEX VVALUE VVALUEX WEEK WEEKDAY WHICHC WHICHN WTO YEAR YIELDP YRDIF YYQ ZIPCITY ZIPCITYDISTANCE ZIPFIPS ZIPNAME ZIPNAMEL ZIPSTATE ) end def self.sas_macro_statements # from SAS 9.4 Macro Language Reference # Chapter 12 @sas_macro_statements ||= Set.new %w( %COPY %DISPLAY %GLOBAL %INPUT %LET %MACRO %PUT %SYMDEL %SYSCALL %SYSEXEC %SYSLPUT %SYSMACDELETE %SYSMSTORECLEAR %SYSRPUT %WINDOW %ABORT %DO %TO %UNTIL %WHILE %END %GOTO %IF %THEN %ELSE %LOCAL %RETURN %INCLUDE %LIST %RUN ) # Omitted: # %label: Identifies the destination of a %GOTO statement. # %MEND end def self.sas_macro_functions # from SAS 9.4 Macro Language Reference # Chapter 12 @sas_macro_functions ||= Set.new %w( %BQUOTE %NRBQUOTE %EVAL %INDEX %LENGTH %QUOTE %NRQUOTE %SCAN %QSCAN %STR %NRSTR %SUBSTR %QSUBSTR %SUPERQ %SYMEXIST %SYMGLOBL %SYMLOCAL %SYSEVALF %SYSFUNC %QSYSFUNC %SYSGET %SYSMACEXEC %SYSMACEXIST %SYSMEXECDEPTH %SYSMEXECNAME %SYSPROD %UNQUOTE %UPCASE %QUPCASE ) end def self.sas_auto_macro_vars # from SAS 9.4 Macro Language Reference # Chapter 12 @sas_auto_macro_vars ||= Set.new %w( &SYSADDRBITS &SYSBUFFR &SYSCC &SYSCHARWIDTH &SYSCMD &SYSDATASTEPPHASE &SYSDATE &SYSDATE9 &SYSDAY &SYSDEVIC &SYSDMG &SYSDSN &SYSENCODING &SYSENDIAN &SYSENV &SYSERR &SYSERRORTEXT &SYSFILRC &SYSHOSTINFOLONG &SYSHOSTNAME &SYSINDEX &SYSINFO &SYSJOBID &SYSLAST &SYSLCKRC &SYSLIBRC &SYSLOGAPPLNAME &SYSMACRONAME &SYSMENV &SYSMSG &SYSNCPU &SYSNOBS &SYSODSESCAPECHAR &SYSODSPATH &SYSPARM &SYSPBUFF &SYSPRINTTOLIST &SYSPRINTTOLOG &SYSPROCESSID &SYSPROCESSMODE &SYSPROCESSNAME &SYSPROCNAME &SYSRC &SYSSCP &SYSSCPL &SYSSITE &SYSSIZEOFLONG &SYSSIZEOFPTR &SYSSIZEOFUNICODE &SYSSTARTID &SYSSTARTNAME &SYSTCPIPHOSTNAME &SYSTIME &SYSTIMEZONE &SYSTIMEZONEIDENT &SYSTIMEZONEOFFSET &SYSUSERID &SYSVER &SYSVLONG &SYSVLONG4 &SYSWARNINGTEXT ) end def self.proc_keywords # Create a hash with keywords for common PROCs, keyed by PROC name @proc_keywords ||= {} @proc_keywords["SQL"] ||= Set.new %w( ALTER TABLE CONNECT CREATE INDEX VIEW DELETE DESCRIBE DISCONNECT DROP EXECUTE INSERT RESET SELECT UPDATE VALIDATE ADD CONSTRAINT DROP FOREIGN KEY PRIMARY MODIFY LIKE AS ORDER BY USING FROM INTO SET VALUES RESET DISTINCT UNIQUE WHERE GROUP HAVING LEFT RIGHT INNER JOIN ON ) # from SAS 9.4 SQL Procedure User's Guide @proc_keywords["MEANS"] ||= Set.new %w( BY CLASS FREQ ID OUTPUT OUT TYPES VAR WAYS WEIGHT ATTRIB FORMAT LABEL WHERE DESCENDING NOTSORTED NOTHREADS NOTRAP PCTLDEF SUMSIZE THREADS CLASSDATA COMPLETETYPES EXCLUSIVE MISSING FW MAXDEC NONOBS NOPRINT ORDER FORMATTED FREQ UNFORMATTED PRINT PRINTALLTYPES PRINTIDVARS STACKODSOUTPUT CHARTYPE DESCENDTYPES IDMIN ALPHA EXCLNPWGT QMARKERS QMETHOD QNTLDEF VARDEF CLM CSS CV KURTOSIS KURT LCLM MAX MEAN MIN MODE N NMISS RANGE SKEWNESS SKEW STDDEV STD STDERR SUM SUMWGT UCLM USS VAR MEDIAN P50 Q1 P25 Q3 P75 P1 P90 P5 P95 P10 P99 P20 P30 P40 P60 P70 P80 QRANGE PROBT PRT T ASCENDING GROUPINTERNAL MLF PRELOADFMT MAXID AUTOLABEL AUTONAME KEEPLEN LEVELS NOINHERIT ) # from BASE SAS 9.4 Procedures Guide, Fifth Edition @proc_keywords["DATASETS"] ||= Set.new %w( AGE APPEND ATTRIB AUDIT CHANGE CONTENTS COPY DELETE EXCHANGE EXCLUDE FORMAT IC CREATE DELETE REACTIVATE INDEX CENTILES INFORMAT INITIATE LABEL LOG MODIFY REBUILD RENAME REPAIR RESUME SAVE SELECT SUSPEND TERMINATE USER_VAR XATTR ADD OPTIONS REMOVE SET ) # from BASE SAS 9.4 Procedures Guide, Fifth Edition @proc_keywords["SORT"] ||= Set.new %w( BY DESCENDING KEY ASCENDING ASC DESC DATECOPY FORCE OVERWRITE PRESORTED SORTSIZE TAGSORT DUPOUT OUT UNIQUEOUT NODUPKEY NOUNIQUEKEY NOTHREADS THREADS EQUALS NOEQUALS ATTRIB FORMAT LABEL WHERE ) # from BASE SAS 9.4 Procedures Guide, Fifth Edition @proc_keywords["PRINT"] ||= Set.new %w( BY DESCENDING NOTSORTED PAGEBY SUMBY ID STYLE SUM VAR CONTENTS DATA GRANDTOTAL_LABEL HEADING LABEL SPLIT SUMLABEL NOSUMLABEL BLANKLINE COUNT DOUBLE N NOOBS OBS ROUND ROWS UNIFORM WIDTH ATTRIB FORMAT LABEL WHERE ) # from BASE SAS 9.4 Procedures Guide, Fifth Edition @proc_keywords["APPEND"] ||= Set.new %w( BASE APPENDVER DATA ENCRYPTKEY FORCE GETSORT NOWARN ATTRIB FORMAT LABEL WHERE ) # from BASE SAS 9.4 Procedures Guide, Fifth Edition @proc_keywords["TRANSPOSE"] ||= Set.new %w( DELIMITER LABEL LET NAME OUT PREFIX SUFFIX BY DESCENDING NOTSORTED COPY ID IDLABEL VAR INDB ATTRIB FORMAT LABEL WHERE ) # from BASE SAS 9.4 Procedures Guide, Fifth Edition @proc_keywords["FREQ"] ||= Set.new %w( BY EXACT OUTPUT TABLES TEST WEIGHT COMPRESS DATA FORMCHAR NLEVELS NOPRINT ORDER PAGE FORMATTED FREQ INTERNAL AGREE BARNARD BINOMIAL BIN CHISQ COMOR EQOR ZELEN FISHER JT KAPPA KENTB TAUB LRCHI MCNEM MEASURES MHCHI OR ODDSRATIO PCHI PCORR RELRISK RISKDIFF SCORR SMDCR SMDRC STUTC TAUC TREND WTKAP WTKAPPA OUT AJCHI ALL BDCHI CMH CMH1 CMH2 CMHCOR CMHGA CMHRMS COCHQ CONTGY CRAMV EQKAP EQWKP GAMMA GS GAILSIMON LAMCR LAMDAS LAMRC LGOR LGRRC1 LGRRC2 MHOR MHRRC1 MHRRC2 N NMISS PHI PLCORR RDIF1 RDIF2 RISKDIFF1 RISKDIFF2 RRC1 RELRISK1 RRC2 RELRISK2 RSK1 RISK1 RSK11 RISK11 RSK12 RISK12 RSK21 RISK21 RSK22 RISK22 TSYMM BOWKER U UCR URC CELLCHI2 CUMCOL DEVIATION EXPECTED MISSPRINT PEARSONREF PRINTWKTS SCOROUT SPARSE STDRES TOTPCT CONTENTS CROSSLIST FORMAT LIST MAXLEVELS NOCOL NOCUM NOFREQ NOPERCENT NOPRINT NOROW NOSPARSE NOWARN PLOTS OUT OUTCUM OUTEXPECT OUTPCT ZEROS ) # from Base SAS 9.4 Procedures Guide: Statistical Procedures, Fourth Edition @proc_keywords["CORR"] ||= Set.new %w( BY FREQ ID PARTIAL VAR WEIGHT WITH DATA OUTH OUTK OUTP OUTPLC OUTPLS OUTS EXCLNPWGHT FISHER HOEFFDING KENDALL NOMISS PEARSON POLYCHORIC POLYSERIAL ALPHA COV CSSCP SINGULAR SSCP VARDEF PLOTS MATRIX SCATTER BEST NOCORR NOPRINT NOPROB NOSIMPLE RANK ) # from Base SAS 9.4 Procedures Guide: Statistical Procedures, Fourth Edition @proc_keywords["REPORT"] ||= Set.new %w( BREAK BY DESCENDING NOTSORTED COLUMN COMPUTE STYLE LINE ENDCOMP CALL DEFINE _ROW_ FREQ RBREAK WEIGHT ATTRIB FORMAT LABEL WHERE DATA NOALIAS NOCENTER NOCOMPLETECOLS NOCOMPLETEROWS NOTHREADS NOWINDOWS OUT PCTLDEF THREADS WINDOWS COMPLETECOLS NOCOMPLETECOLS COMPLETEROWS NOCOMPLETEROWS CONTENTS SPANROWS COMMAND HELP PROMPT BOX BYPAGENO CENTER NOCENTER COLWIDTH FORMCHAR LS MISSING PANELS PS PSPACE SHOWALL SPACING WRAP EXCLNPWGT QMARKERS QMETHOD QNTLDEF VARDEF NAMED NOHEADER SPLIT HEADLINE HEADSKIP LIST NOEXEC OUTREPT PROFILE REPORT COLOR DOL DUL OL PAGE SKIP SUMMARIZE SUPPRESS UL BLINK COMMAND HIGHLIGHT RVSVIDEO MERGE REPLACE URL URLBP URLP AFTER BEFORE _PAGE_ LEFT RIGHT CHARACTER LENGTH EXCLUSIVE MISSING MLF ORDER DATA FORMATTED FREQ INTERNAL PRELOADFMT WIDTH ACROSS ANALYSIS COMPUTED DISPLAY GROUP ORDER CONTENTS FLOW ID NOPRINT NOZERO PAGE CSS CV MAX MEAN MIN MODE N NMISS PCTN PCTSUM RANGE STD STDERR SUM SUMWGT USS VAR MEDIAN P50 Q1 P25 Q3 P75 P1 P90 P5 P95 P10 P99 P20 P30 P40 P60 P70 P80 QRANGE PROBT PRT T ) # from BASE SAS 9.4 Procedures Guide, Fifth Edition @proc_keywords["METALIB"] ||= Set.new %w( OMR DBAUTH DBUSER DBPASSWORD EXCLUDE SELECT READ FOLDER FOLDERID IMPACT_LIMIT NOEXEC PREFIX REPORT UPDATE_RULE DELETE NOADD NODELDUP NOUPDATE LIBID LIBRARY LIBURI TYPE DETAIL SUMMARY ) # from SAS 9.4 Language Interfaces to Metadata, Third Edition @proc_keywords["GCHART"] ||= Set.new %w( DATA ANNOTATE GOUT IMAGEMAP BLOCK HBAR HBAR3D VBAR VBAR3D PIE PIE3D DONUT STAR ANNO BY NOTE FORMAT LABEL WHERE BLOCKMAX CAXIS COUTLINE CTEXT LEGEND NOHEADING NOLEGEND PATTERNID GROUP MIDPOINT SUBGROUP WOUTLINE DESCRIPTION NAME DISCRETE LEVELS OLD MISSING HTML_LEGEND HTML URL FREQ G100 SUMVAR TYPE CAUTOREF CERROR CFRAME CLM CREF FRAME NOFRAME GSPACE IFRAME IMAGESTYLE TILE FIT LAUTOREF NOSYMBOL PATTERNID SHAPE SPACE SUBOUTSIDE WAUTOREF WIDTH WOUTLINE WREF ASCENDING AUTOREF CLIPREF DESCENDING FRONTREF GAXIS MAXIS MINOR NOAXIS NOBASEREF NOZERO RANGE AXIS REF CFREQ CFREQLABEL NONE CPERCENT CPERCENTLABEL ERRORBAR BARS BOTH TOP FREQLABEL INSIDE MEAN MEANLABEL NOSTATS OUTSIDE PERCENT PERCENTLABEL PERCENTSUM SUM CFILL COUTLINE DETAIL_RADIUS EXPLODE FILL SOLID X INVISIBLE NOHEADING RADIUS WOUTLINE DETAIL_THRESHOLD DETAIL_PERCENT DETAIL_SLICE DETAIL_VALUE DONUTPCT LABEL ACROSS DOWN GROUP NOGROUPHEADING SUBGROUP MATCHCOLOR OTHERCOLOR OTHERLABEL PERCENT ARROW PLABEL PPERCENT SLICE VALUE ANGLE ASCENDING CLOCKWISE DESCENDING JSTYLE NOCONNECT STARMAX STARMIN ) # from SAS GRAPH 9.4 Reference, Fourth Edition @proc_keywords["GPLOT"] ||= Set.new %w( DATA ANNOTATE GOUT IMAGEMAP UNIFORM BUBBLE BUBBLE2 PLOT PLOT2 BCOLOR BFILL BFONT BLABEL BSCALE AREA RADIUS BSIZE DESCRIPTION NAME AUTOHREF CAUTOHREF CHREF HAXIS HMINOR HREF HREVERSE HZERO LAUTOHREF LHREF WAUTOHREF WHREF HTML URL CAXIS CFRAME CTEXT DATAORDER FRAME NOFRAME FRONTREF GRID IFRAME IMAGESTYLE TILE FIT NOAXIS AUTOVREF CAUTOVREF CVREF LAUTOVREF LVREF VAXIS VMINOR VREF VREVERSE VZERO WAUTOVREF WVREF CBASELINE COUTLINE AREAS GRID LEGEND NOLASTAREA NOLEGEND OVERLAY REGEQN SKIPMISS ) # from SAS GRAPH 9.4 Reference, Fourth Edition @proc_keywords["REG"] ||= Set.new %w( MODEL BY FREQ ID VAR WEIGHT ADD CODE DELETE MTEST OUTPUT PAINT PLOT PRINT REFIT RESTRICT REWEIGHT STORE TEST ) # from SAS/STAT 15.1 User's Guide @proc_keywords["SGPLOT"] ||= Set.new %w( STYLEATTRS BAND X Y UPPER LOWER BLOCK BUBBLE DENSITY DOT DROPLINE ELLIPSE ELLIPSEPARM FRINGE GRADLEGEND HBAR HBARBASIC HBARPARM HBOX HEATMAP HEATMAPPARM HIGHLOW HISTOGRAM HLINE INSET KEYLEGEND LINEPARM LOESS NEEDLE PBSPLINE POLYGON REFLINE REG SCATTER SERIES SPLINE STEP SYMBOLCHAR SYMBOLIMAGE TEXT VBAR VBARBASIC VBARPARM VBOX VECTOR VLINE WATERFALL XAXIS X2AXIS XAXISTABLE YAXIS Y2AXIS YAXISTABLE ) # from ODS Graphics: Procedures Guide, Sixth Edition return @proc_keywords end def self.sas_proc_names # from SAS Procedures by Name # http://support.sas.com/documentation/cdl/en/allprodsproc/68038/HTML/default/viewer.htm#procedures.htm @sas_proc_names ||= Set.new %w( ACCESS ACECLUS ADAPTIVEREG ALLELE ANOM ANOVA APPEND APPSRV ARIMA AUTHLIB AUTOREG BCHOICE BOM BOXPLOT BTL BUILD CALENDAR CALIS CALLRFC CANCORR CANDISC CAPABILITY CASECONTROL CATALOG CATMOD CDISC CDISC CHART CIMPORT CLP CLUSTER COMPARE COMPILE COMPUTAB CONTENTS CONVERT COPULA COPY CORR CORRESP COUNTREG CPM CPORT CUSUM CV2VIEW DATEKEYS DATASETS DATASOURCE DB2EXT DB2UTIL DBCSTAB DBF DBLOAD DELETE DIF DISCRIM DISPLAY DISTANCE DMSRVADM DMSRVDATASVC DMSRVPROCESSSVC DOCUMENT DOWNLOAD DQLOCLST DQMATCH DQSCHEME DS2 DTREE ENTROPY ESM EXPAND EXPLODE EXPORT FACTEX FACTOR FAMILY FASTCLUS FCMP FEDSQL FMM FONTREG FORECAST FORMAT FORMS FREQ FSBROWSE FSEDIT FSLETTER FSLIST FSVIEW G3D G3GRID GA GAM GAMPL GANNO GANTT GAREABAR GBARLINE GCHART GCONTOUR GDEVICE GEE GENESELECT GENMOD GEOCODE GFONT GINSIDE GIS GKPI GLIMMIX GLM GLMMOD GLMPOWER GLMSELECT GMAP GOPTIONS GPLOT GPROJECT GRADAR GREDUCE GREMOVE GREPLAY GROOVY GSLIDE GTILE HADOOP HAPLOTYPE HDMD HPBIN HPCANDISC HPCDM HPCOPULA HPCORR HPCOUNTREG HPDMDB HPDS2 HPFMM HPGENSELECT HPIMPUTE HPLMIXED HPLOGISTIC HPMIXED HPNLMOD HPPANEL HPPLS HPPRINCOMP HPQUANTSELECT HPQLIM HPREG HPSAMPLE HPSEVERITY HPSPLIT HPSUMMARY HTSNP HTTP ICLIFETEST ICPHREG IML IMPORT IMSTAT IMXFER INBREED INFOMAPS INTPOINT IOMOPERATE IRT ISHIKAWA ITEMS JAVAINFO JSON KDE KRIGE2D LASR LATTICE LIFEREG LIFETEST LOAN LOCALEDATA LOESS LOGISTIC LP LUA MACONTROL MAPIMPORT MCMC MDC MDDB MDS MEANS METADATA METALIB METAOPERATE MI MIANALYZE MIGRATE MIXED MODECLUS MODEL MSCHART MULTTEST MVPDIAGNOSE MVPMODEL MVPMONITOR NESTED NETDRAW NETFLOW NLIN NLMIXED NLP NPAR1WAY ODSLIST ODSTABLE ODSTEXT OLAP OLAPCONTENTS OLAPOPERATE OPERATE OPTEX OPTGRAPH OPTIONS OPTLOAD OPTLP OPTLSO OPTMILP OPTMODEL OPTNET OPTQP OPTSAVE ORTHOREG PANEL PARETO PDLREG PDS PDSCOPY PHREG PLAN PLM PLOT PLS PM PMENU POWER PRESENV PRINCOMP PRINQUAL PRINT PRINTTO PROBIT PROTO PRTDEF PRTEXP PSMOOTH PWENCODE QDEVICE QLIM QUANTLIFE QUANTREG QUANTSELECT QUEST RANK RAREEVENTS RDC RDPOOL RDSEC RECOMMEND REG REGISTRY RELEASE RELIABILITY REPORT RISK ROBUSTREG RSREG SCAPROC SCORE SEQDESIGN SEQTEST SERVER SEVERITY SGDESIGN SGPANEL SGPLOT SGRENDER SGSCATTER SHEWHART SIM2D SIMILARITY SIMLIN SIMNORMAL SOAP SORT SOURCE SPECTRA SPP SQL SQOOP SSM STANDARD STATESPACE STDIZE STDRATE STEPDISC STP STREAM SUMMARY SURVEYFREQ SURVEYIMPUTE SURVEYLOGISTIC SURVEYMEANS SURVEYPHREG SURVEYREG SURVEYSELECT SYSLIN TABULATE TAPECOPY TAPELABEL TEMPLATE TIMEDATA TIMEID TIMEPLOT TIMESERIES TPSPLINE TRANSPOSE TRANSREG TRANTAB TREE TSCSREG TTEST UCM UNIVARIATE UPLOAD VARCLUS VARCOMP VARIOGRAM VARMAX VASMP X11 X12 X13 XSL ) end state :basics do # Rules to be parsed before the keywords (which are different depending # on the context) rule %r/\s+/m, Text # Single-line comments (between * and ;) - these can actually go onto multiple lines # case 1 - where it starts a line rule %r/^\s*%?\*[^;]*;/m, Comment::Single # case 2 - where it follows the previous statement on the line (after a semicolon) rule %r/(;)(\s*)(%?\*[^;]*;)/m do groups Punctuation, Text, Comment::Single end # True multiline comments! rule %r(/[*].*?[*]/)m, Comment::Multiline # date/time constants (Language Reference pp91-2) rule %r/'[0-9a-z]+?'d/i, Literal::Date rule %r/'.+?'dt/i, Literal::Date rule %r/'[0-9:]+?([a|p]m)?'t/i, Literal::Date rule %r/'/, Str::Single, :single_string rule %r/"/, Str::Double, :double_string rule %r/&[a-z0-9_&.]+/i, Name::Variable # numeric constants (Language Reference p91) rule %r/\d[0-9a-f]*x/i, Num::Hex rule %r/\d[0-9e\-.]+/i, Num # scientific notation # auto variables from DATA step (Language Reference p46, p37) rule %r/\b(_n_|_error_|_file_|_infile_|_msg_|_iorc_|_cmd_)\b/i, Name::Builtin::Pseudo # auto variable list names rule %r/\b(_character_|_numeric_|_all_)\b/i, Name::Builtin # datalines/cards etc rule %r/\b(datalines|cards)(\s*)(;)/i do groups Keyword, Text, Punctuation push :datalines end rule %r/\b(datalines4|cards4)(\s*)(;)/i do groups Keyword, Text, Punctuation push :datalines4 end # operators (Language Reference p96) rule %r(\*\*|[\*/\+-]), Operator rule %r/[^¬~]?=:?|[<>]=?:?/, Operator rule %r/\b(eq|ne|gt|lt|ge|le|in)\b/i, Operator::Word rule %r/[&|!¦¬∘~]/, Operator rule %r/\b(and|or|not)\b/i, Operator::Word rule %r/(<>|><)/, Operator # min/max rule %r/\|\|/, Operator # concatenation # The OF operator should also be highlighted (Language Reference p49) rule %r/\b(of)\b/i, Operator::Word rule %r/\b(like)\b/i, Operator::Word # Language Ref p181 rule %r/\d+/, Num::Integer rule %r/\$/, Keyword::Type # Macro definitions rule %r/(%macro|%mend)(\s*)(\w+)/i do groups Keyword, Text, Name::Function end rule %r/%mend/, Keyword rule %r/%\w+/ do |m| if self.class.sas_macro_statements.include? m[0].upcase token Keyword elsif self.class.sas_macro_functions.include? m[0].upcase token Keyword else token Name end end end state :basics2 do # Rules to be parsed after the keywords (which are different depending # on the context) # Missing values (Language Reference p81) rule %r/\s\.[;\s]/, Keyword::Constant # missing rule %r/\s\.[a-z_]/, Name::Constant # user-defined missing rule %r/[\(\),;:\{\}\[\]\\\.]/, Punctuation rule %r/@/, Str::Symbol # line hold specifiers rule %r/\?/, Str::Symbol # used for format modifiers rule %r/[^\s]+/, Text # Fallback for anything we haven't matched so far end state :root do mixin :basics # PROC definitions rule %r!(proc)(\s+)(\w+)!ix do |m| @proc_name = m[3].upcase puts " proc name: #{@proc_name}" if @debug if self.class.sas_proc_names.include? @proc_name groups Keyword, Text, Keyword else groups Keyword, Text, Name end push :proc end # Data step definitions rule %r/(data)(\s+)([\w\.]+)/i do groups Keyword, Text, Name::Variable end # Libname definitions rule %r/(libname)(\s+)(\w+)/i do groups Keyword, Text, Name::Variable end rule %r/\w+/ do |m| if self.class.data_step_statements.include? m[0].upcase token Keyword elsif self.class.sas_functions.include? m[0].upcase token Keyword else token Name end end mixin :basics2 end state :single_string do rule %r/''/, Str::Escape rule %r/'/, Str::Single, :pop! rule %r/[^']+/, Str::Single end state :double_string do rule %r/&[a-z0-9_&]+\.?/i, Str::Interpol rule %r/""/, Str::Escape rule %r/"/, Str::Double, :pop! rule %r/[^&"]+/, Str::Double # Allow & to be used as character if not already matched as macro variable rule %r/&/, Str::Double end state :datalines do rule %r/[^;]/, Literal::String::Heredoc rule %r/;/, Punctuation, :pop! end state :datalines4 do rule %r/;{4}/, Punctuation, :pop! rule %r/[^;]/, Literal::String::Heredoc rule %r/;{,3}/, Literal::String::Heredoc end # PROCS state :proc do rule %r/(quit|run)/i, Keyword, :pop! mixin :basics rule %r/\w+/ do |m| if self.class.data_step_statements.include? m[0].upcase token Keyword elsif self.class.sas_functions.include? m[0].upcase token Keyword elsif self.class.proc_keywords.has_key?(@proc_name) and self.class.proc_keywords[@proc_name].include? m[0].upcase token Keyword else token Name end end mixin :basics2 end end #class SAS end #module Lexers end #module Rouge rouge-3.28.0/lib/rouge/lexers/sass.rb000066400000000000000000000031251417417255300174260ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'sass/common.rb' class Sass < SassCommon include Indentation title "Sass" desc 'The Sass stylesheet language language (sass-lang.com)' tag 'sass' filenames '*.sass' mimetypes 'text/x-sass' id = /[\w-]+/ state :root do rule %r/[ \t]*\n/, Text rule(/[ \t]*/) { |m| token Text; indentation(m[0]) } end state :content do # block comments rule %r(//.*?$) do token Comment::Single pop!; starts_block :single_comment end rule %r(/[*].*?\n) do token Comment::Multiline pop!; starts_block :multi_comment end rule %r/@import\b/, Keyword, :import mixin :content_common rule %r(=#{id}), Name::Function, :value rule %r([+]#{id}), Name::Decorator, :value rule %r/:/, Name::Attribute, :old_style_attr rule(/(?=[^\[\n]+?:([^a-z]|$))/) { push :attribute } rule(//) { push :selector } end state :single_comment do rule %r/.*?$/, Comment::Single, :pop! end state :multi_comment do rule %r/.*?\n/, Comment::Multiline, :pop! end state :import do rule %r/[ \t]+/, Text rule %r/\S+/, Str rule %r/\n/, Text, :pop! end state :old_style_attr do mixin :attr_common rule(//) { pop!; push :value } end state :end_section do rule(/\n/) { token Text; reset_stack } end end end end rouge-3.28.0/lib/rouge/lexers/sass/000077500000000000000000000000001417417255300171005ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/lexers/sass/common.rb000066400000000000000000000105741417417255300207240ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers # shared states with SCSS class SassCommon < RegexLexer id = /[\w-]+/ state :content_common do rule %r/@for\b/, Keyword, :for rule %r/@(debug|warn|if|each|while|else|return|media)/, Keyword, :value rule %r/(@mixin)(\s+)(#{id})/ do groups Keyword, Text, Name::Function push :value end rule %r/(@function)(\s+)(#{id})/ do groups Keyword, Text, Name::Function push :value end rule %r/@extend\b/, Keyword, :selector rule %r/(@include)(\s+)(#{id})/ do groups Keyword, Text, Name::Decorator push :value end rule %r/@#{id}/, Keyword, :selector rule %r/&/, Keyword, :selector # $variable: assignment rule %r/([$]#{id})([ \t]*)(:)/ do groups Name::Variable, Text, Punctuation push :value end end state :value do mixin :end_section rule %r/[ \t]+/, Text rule %r/[$]#{id}/, Name::Variable rule %r/url[(]/, Str::Other, :string_url rule %r/#{id}(?=\s*[(])/, Name::Function rule %r/%#{id}/, Name::Decorator # named literals rule %r/(true|false)\b/, Name::Builtin::Pseudo rule %r/(and|or|not)\b/, Operator::Word # colors and numbers rule %r/#[a-z0-9]{1,6}/i, Num::Hex rule %r/-?\d+(%|[a-z]+)?/, Num rule %r/-?\d*\.\d+(%|[a-z]+)?/, Num::Integer mixin :has_strings mixin :has_interp rule %r/[~^*!&%<>\|+=@:,.\/?-]+/, Operator rule %r/[\[\]()]+/, Punctuation rule %r(/[*]), Comment::Multiline, :inline_comment rule %r(//[^\n]*), Comment::Single # identifiers rule(id) do |m| if CSS.builtins.include? m[0] token Name::Builtin elsif CSS.constants.include? m[0] token Name::Constant else token Name end end end state :has_interp do rule %r/[#][{]/, Str::Interpol, :interpolation end state :has_strings do rule %r/"/, Str::Double, :dq rule %r/'/, Str::Single, :sq end state :interpolation do rule %r/}/, Str::Interpol, :pop! mixin :value end state :selector do mixin :end_section mixin :has_strings mixin :has_interp rule %r/[ \t]+/, Text rule %r/:/, Name::Decorator, :pseudo_class rule %r/[.]/, Name::Class, :class rule %r/#/, Name::Namespace, :id rule %r/%/, Name::Variable, :placeholder rule id, Name::Tag rule %r/&/, Keyword rule %r/[~^*!&\[\]()<>\|+=@:;,.\/?-]/, Operator end state :dq do rule %r/"/, Str::Double, :pop! mixin :has_interp rule %r/(\\.|#(?![{])|[^\n"#])+/, Str::Double end state :sq do rule %r/'/, Str::Single, :pop! mixin :has_interp rule %r/(\\.|#(?![{])|[^\n'#])+/, Str::Single end state :string_url do rule %r/[)]/, Str::Other, :pop! rule %r/(\\.|#(?![{])|[^\n)#])+/, Str::Other mixin :has_interp end state :selector_piece do mixin :has_interp rule(//) { pop! } end state :pseudo_class do rule id, Name::Decorator mixin :selector_piece end state :class do rule id, Name::Class mixin :selector_piece end state :id do rule id, Name::Namespace mixin :selector_piece end state :placeholder do rule id, Name::Variable mixin :selector_piece end state :for do rule %r/(from|to|through)/, Operator::Word mixin :value end state :attr_common do mixin :has_interp rule id do |m| if CSS.attributes.include? m[0] token Name::Label else token Name::Attribute end end end state :attribute do mixin :attr_common rule %r/([ \t]*)(:)/ do groups Text, Punctuation push :value end end state :inline_comment do rule %r/(\\#|#(?=[^\n{])|\*(?=[^\n\/])|[^\n#*])+/, Comment::Multiline mixin :has_interp rule %r([*]/), Comment::Multiline, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/scala.rb000066400000000000000000000115071417417255300175430ustar00rootroot00000000000000# -*- coding: utf-8 # # frozen_string_literal: true module Rouge module Lexers class Scala < RegexLexer title "Scala" desc "The Scala programming language (scala-lang.org)" tag 'scala' aliases 'scala' filenames '*.scala', '*.sbt' mimetypes 'text/x-scala', 'application/x-scala' # As documented in the ENBF section of the scala specification # http://www.scala-lang.org/docu/files/ScalaReference.pdf whitespace = /\p{Space}/ letter = /[\p{L}$_]/ upper = /[\p{Lu}$_]/ digits = /[0-9]/ parens = /[(){}\[\]]/ delims = %r([‘’".;,]) # negative lookahead to filter out other classes op = %r( (?!#{whitespace}|#{letter}|#{digits}|#{parens}|#{delims}) [\u0020-\u007F\p{Sm}\p{So}] )x idrest = %r(#{letter}(?:#{letter}|#{digits})*(?:(?<=_)#{op}+)?)x keywords = %w( abstract case catch def do else extends final finally for forSome if implicit lazy match new override private protected requires return sealed super this throw try val var while with yield ) state :root do rule %r/(class|trait|object)(\s+)/ do groups Keyword, Text push :class end rule %r/'#{idrest}(?!')/, Str::Symbol rule %r/[^\S\n]+/, Text rule %r(//.*), Comment::Single rule %r(/\*), Comment::Multiline, :comment rule %r/@#{idrest}/, Name::Decorator rule %r/(def)(\s+)(#{idrest}|#{op}+|`[^`]+`)(\s*)/ do groups Keyword, Text, Name::Function, Text end rule %r/(val)(\s+)(#{idrest}|#{op}+|`[^`]+`)(\s*)/ do groups Keyword, Text, Name::Variable, Text end rule %r/(this)(\n*)(\.)(#{idrest})/ do groups Keyword, Text, Operator, Name::Property end rule %r/(#{idrest}|_)(\n*)(\.)(#{idrest})/ do groups Name::Variable, Text, Operator, Name::Property end rule %r/#{upper}#{idrest}\b/, Name::Class rule %r/(#{idrest})(#{whitespace}*)(\()/ do groups Name::Function, Text, Operator end rule %r/(\.)(#{idrest})/ do groups Operator, Name::Property end rule %r( (#{keywords.join("|")})\b| (<[%:-]|=>|>:|[#=@_\u21D2\u2190])(\b|(?=\s)|$) )x, Keyword rule %r/:(?!#{op})/, Keyword, :type rule %r/(true|false|null)\b/, Keyword::Constant rule %r/(import|package)(\s+)/ do groups Keyword, Text push :import end rule %r/(type)(\s+)/ do groups Keyword, Text push :type end rule %r/""".*?"""(?!")/m, Str rule %r/"(\\\\|\\"|[^"])*"/, Str rule %r/'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'/, Str::Char rule idrest, Name rule %r/`[^`]+`/, Name rule %r/\[/, Operator, :typeparam rule %r/[\(\)\{\};,.#]/, Operator rule %r/#{op}+/, Operator rule %r/([0-9][0-9]*\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?/, Num::Float rule %r/([0-9][0-9]*[fFdD])/, Num::Float rule %r/0x[0-9a-fA-F]+/, Num::Hex rule %r/[0-9]+L?/, Num::Integer rule %r/\n/, Text end state :class do rule %r/(#{idrest}|#{op}+|`[^`]+`)(\s*)(\[)/ do groups Name::Class, Text, Operator push :typeparam end rule %r/\s+/, Text rule %r/{/, Operator, :pop! rule %r/\(/, Operator, :pop! rule %r(//.*), Comment::Single, :pop! rule %r(#{idrest}|#{op}+|`[^`]+`), Name::Class, :pop! end state :type do rule %r/\s+/, Text rule %r/<[%:]|>:|[#_\u21D2]|forSome|type/, Keyword rule %r/([,\);}]|=>|=)(\s*)/ do groups Operator, Text pop! end rule %r/[\(\{]/, Operator, :type typechunk = /(?:#{idrest}|#{op}+\`[^`]+`)/ rule %r/(#{typechunk}(?:\.#{typechunk})*)(\s*)(\[)/ do groups Keyword::Type, Text, Operator pop! push :typeparam end rule %r/(#{typechunk}(?:\.#{typechunk})*)(\s*)$/ do groups Keyword::Type, Text pop! end rule %r(//.*), Comment::Single, :pop! rule %r/\.|#{idrest}|#{op}+|`[^`]+`/, Keyword::Type end state :typeparam do rule %r/[\s,]+/, Text rule %r/<[%:]|=>|>:|[#_\u21D2]|forSome|type/, Keyword rule %r/([\]\)\}])/, Operator, :pop! rule %r/[\(\[\{]/, Operator, :typeparam rule %r/\.|#{idrest}|#{op}+|`[^`]+`/, Keyword::Type end state :comment do rule %r([^/\*]+), Comment::Multiline rule %r(/\*), Comment::Multiline, :comment rule %r(\*/), Comment::Multiline, :pop! rule %r([*/]), Comment::Multiline end state :import do rule %r((#{idrest}|\.)+), Name::Namespace, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/scheme.rb000066400000000000000000000101161417417255300177170ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Scheme < RegexLexer title "Scheme" desc "The Scheme variant of Lisp" tag 'scheme' filenames '*.scm', '*.ss' mimetypes 'text/x-scheme', 'application/x-scheme' def self.keywords @keywords ||= Set.new %w( lambda define if else cond and or case let let* letrec begin do delay set! => quote quasiquote unquote unquote-splicing define-syntax let-syntax letrec-syntax syntax-rules ) end def self.builtins @builtins ||= Set.new %w( * + - / < <= = > >= abs acos angle append apply asin assoc assq assv atan boolean? caaaar caaadr caaar caadar caaddr caadr caar cadaar cadadr cadar caddar cadddr caddr cadr call-with-current-continuation call-with-input-file call-with-output-file call-with-values call/cc car cdaaar cdaadr cdaar cdadar cdaddr cdadr cdar cddaar cddadr cddar cdddar cddddr cdddr cddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display dynamic-wind eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor for-each force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector map max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! vector? with-input-from-file with-output-to-file write write-char zero? ) end id = /[a-z0-9!$\%&*+,\/:<=>?@^_~|-]+/i state :root do # comments rule %r/;.*$/, Comment::Single rule %r/\s+/m, Text rule %r/-?\d+\.\d+/, Num::Float rule %r/-?\d+/, Num::Integer # Racket infinitites rule %r/[+-]inf[.][f0]/, Num rule %r/#b[01]+/, Num::Bin rule %r/#o[0-7]+/, Num::Oct rule %r/#d[0-9]+/, Num::Integer rule %r/#x[0-9a-f]+/i, Num::Hex rule %r/#[ei][\d.]+/, Num::Other rule %r/"(\\\\|\\"|[^"])*"/, Str rule %r/'#{id}/i, Str::Symbol rule %r/#\\([()\/'"._!\$%& ?=+-]{1}|[a-z0-9]+)/i, Str::Char rule %r/#t|#f/, Name::Constant rule %r/(?:'|#|`|,@|,|\.)/, Operator rule %r/(['#])(\s*)(\()/m do groups Str::Symbol, Text, Punctuation end rule %r/\(|\[/, Punctuation, :command rule %r/\)|\]/, Punctuation rule id, Name::Variable end state :command do rule id, Name::Function do |m| if self.class.keywords.include? m[0] token Keyword elsif self.class.builtins.include? m[0] token Name::Builtin else token Name::Function end pop! end rule(//) { pop! } end end end end rouge-3.28.0/lib/rouge/lexers/scss.rb000066400000000000000000000014341417417255300174310ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'sass/common.rb' class Scss < SassCommon title "SCSS" desc "SCSS stylesheets (sass-lang.com)" tag 'scss' filenames '*.scss' mimetypes 'text/x-scss' state :root do rule %r/\s+/, Text rule %r(//.*?$), Comment::Single rule %r(/[*].*?[*]/)m, Comment::Multiline rule %r/@import\b/, Keyword, :value mixin :content_common rule(/(?=[^;{}][;}])/) { push :attribute } rule(/(?=[^;{}:\[]+:[^a-z])/) { push :attribute } rule(//) { push :selector } end state :end_section do rule %r/\n/, Text rule(/[;{}]/) { token Punctuation; reset_stack } end end end end rouge-3.28.0/lib/rouge/lexers/sed.rb000066400000000000000000000077541417417255300172440ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Sed < RegexLexer title "sed" desc 'sed, the ultimate stream editor' tag 'sed' filenames '*.sed' mimetypes 'text/x-sed' def self.detect?(text) return true if text.shebang? 'sed' end class Regex < RegexLexer state :root do rule %r/\\./, Str::Escape rule %r/\[/, Punctuation, :brackets rule %r/[$^.*]/, Operator rule %r/[()]/, Punctuation rule %r/./, Str::Regex end state :brackets do rule %r/\^/ do token Punctuation goto :brackets_int end rule(//) { goto :brackets_int } end state :brackets_int do # ranges rule %r/.-./, Name::Variable rule %r/\]/, Punctuation, :pop! rule %r/./, Str::Regex end end class Replacement < RegexLexer state :root do rule %r/\\./m, Str::Escape rule %r/&/, Operator rule %r/[^\\&]+/m, Text end end def regex @regex ||= Regex.new(options) end def replacement @replacement ||= Replacement.new(options) end start { regex.reset!; replacement.reset! } state :whitespace do rule %r/\s+/m, Text rule(/#.*?\n/) { token Comment; reset_stack } rule(/\n/) { token Text; reset_stack } rule(/;/) { token Punctuation; reset_stack } end state :root do mixin :addr_range end edot = /\\.|./m state :command do mixin :whitespace # subst and transliteration rule %r/(s)(.)(#{edot}*?)(\2)(#{edot}*?)(\2)/m do |m| token Keyword, m[1] token Punctuation, m[2] delegate regex, m[3] token Punctuation, m[4] delegate replacement, m[5] token Punctuation, m[6] goto :flags end rule %r/(y)(.)(#{edot}*?)(\2)(#{edot}*?)(\2)/m do |m| token Keyword, m[1] token Punctuation, m[2] delegate replacement, m[3] token Punctuation, m[4] delegate replacement, m[5] token Punctuation, m[6] pop! end # commands that take a text segment as an argument rule %r/([aic])(\s*)/ do groups Keyword, Text; goto :text end rule %r/[pd]/, Keyword # commands that take a number argument rule %r/([qQl])(\s+)(\d+)/i do groups Keyword, Text, Num pop! end # no-argument commands rule %r/[={}dDgGhHlnpPqx]/, Keyword, :pop! # commands that take a filename argument rule %r/([rRwW])(\s+)(\S+)/ do groups Keyword, Text, Name pop! end # commands that take a label argument rule %r/([:btT])(\s+)(\S+)/ do groups Keyword, Text, Name::Label pop! end end state :addr_range do mixin :whitespace ### address ranges ### addr_tok = Keyword::Namespace rule %r/\d+/, addr_tok rule %r/[$,~+!]/, addr_tok rule %r((/)((?:\\.|.)*?)(/)) do |m| token addr_tok, m[1]; delegate regex, m[2]; token addr_tok, m[3] end # alternate regex rage delimiters rule %r((\\)(.)((?:\\.|.)*?)(\2)) do |m| token addr_tok, m[1] + m[2] delegate regex, m[3] token addr_tok, m[4] end rule(//) { push :command } end state :text do rule %r/[^\\\n]+/, Str rule %r/\\\n/, Str::Escape rule %r/\\/, Str rule %r/\n/, Text, :pop! end state :flags do rule %r/[gp]+/, Keyword, :pop! # writing to a file with the subst command. # who'da thunk...? rule %r/([wW])(\s+)(\S+)/ do token Keyword; token Text; token Name end rule(//) { pop! } end end end end rouge-3.28.0/lib/rouge/lexers/shell.rb000066400000000000000000000135371417417255300175740ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Shell < RegexLexer title "shell" desc "Various shell languages, including sh and bash" tag 'shell' aliases 'bash', 'zsh', 'ksh', 'sh' filenames '*.sh', '*.bash', '*.zsh', '*.ksh', '.bashrc', '.zshrc', '.kshrc', '.profile', 'APKBUILD', 'PKGBUILD', '*.ebuild', '*.eclass', '*.exheres-0', '*.exlib' mimetypes 'application/x-sh', 'application/x-shellscript', 'text/x-sh', 'text/x-shellscript' def self.detect?(text) return true if text.shebang?(/(ba|z|k)?sh/) end KEYWORDS = %w( if fi else while do done for then return function select continue until esac elif in ).join('|') BUILTINS = %w( alias bg bind break builtin caller cd command compgen complete declare dirs disown enable eval exec exit export false fc fg getopts hash help history jobs let local logout mapfile popd pushd pwd read readonly set shift shopt source suspend test time times trap true type typeset ulimit umask unalias unset wait cat tac nl od base32 base64 fmt pr fold head tail split csplit wc sum cksum b2sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum sort shuf uniq comm ptx tsort cut paste join tr expand unexpand ls dir vdir dircolors cp dd install mv rm shred link ln mkdir mkfifo mknod readlink rmdir unlink chown chgrp chmod touch df du stat sync truncate echo printf yes expr tee basename dirname pathchk mktemp realpath pwd stty printenv tty id logname whoami groups users who date arch nproc uname hostname hostid uptime chcon runcon chroot env nice nohup stdbuf timeout kill sleep factor numfmt seq tar grep sudo awk sed gzip gunzip ).join('|') state :basic do rule %r/#.*$/, Comment rule %r/\b(#{KEYWORDS})\s*\b/, Keyword rule %r/\bcase\b/, Keyword, :case rule %r/\b(#{BUILTINS})\s*\b(?!(\.|-))/, Name::Builtin rule %r/[.](?=\s)/, Name::Builtin rule %r/(\b\w+)(=)/ do groups Name::Variable, Operator end rule %r/[\[\]{}()!=>]/, Operator rule %r/&&|\|\|/, Operator # here-string rule %r/<< ruby, 'erb' => ERB.new(options), 'javascript' => Javascript.new(options), 'css' => CSS.new(options), 'coffee' => Coffeescript.new(options), 'markdown' => Markdown.new(options), 'scss' => Scss.new(options), 'sass' => Sass.new(options) } end start { ruby.reset!; html.reset! } state :root do rule %r/\s*\n/, Text rule(/\s*/) { |m| token Text; indentation(m[0]) } end state :content do mixin :css rule %r/\/#{dot}*/, Comment, :indented_block rule %r/(doctype)(\s+)(.*)/ do groups Name::Namespace, Text::Whitespace, Text pop! end # filters, shamelessly ripped from HAML rule %r/(\w*):\s*\n/ do |m| token Name::Decorator pop! starts_block :filter_block filter_name = m[1].strip @filter_lexer = self.filters[filter_name] @filter_lexer.reset! unless @filter_lexer.nil? puts " slim: filter #{filter_name.inspect} #{@filter_lexer.inspect}" if @debug end # Text rule %r([\|'](?=\s)) do token Punctuation pop! starts_block :plain_block goto :plain_block end rule %r/-|==|=/, Punctuation, :ruby_line # Dynamic tags rule %r/(\*)(#{ruby_chars}+\(.*?\))/ do |m| token Punctuation, m[1] delegate ruby, m[2] push :tag end rule %r/(\*)(#{ruby_chars}+)/ do |m| token Punctuation, m[1] delegate ruby, m[2] push :tag end #rule %r/<\w+(?=.*>)/, Keyword::Constant, :tag # Maybe do this, look ahead and stuff rule %r(()) do |m| # Dirty html delegate html, m[1] pop! end # Ordinary slim tags rule %r/\w+/, Name::Tag, :tag end state :tag do mixin :css mixin :indented_block mixin :interpolation # Whitespace control rule %r/[<>]/, Punctuation # Trim whitespace rule %r/\s+?/, Text::Whitespace # Splats, these two might be mergable? rule %r/(\*)(#{ruby_chars}+)/ do |m| token Punctuation, m[1] delegate ruby, m[2] end rule %r/(\*)(\{#{dot}+?\})/ do |m| token Punctuation, m[1] delegate ruby, m[2] end # Attributes rule %r/([\w\-]+)(\s*)(\=)/ do |m| token Name::Attribute, m[1] token Text::Whitespace, m[2] token Punctuation, m[3] push :html_attr end # Ruby value rule %r/(\=)(#{dot}+)/ do |m| token Punctuation, m[1] #token Keyword::Constant, m[2] delegate ruby, m[2] end # HTML Entities rule(/&\S*?;/, Name::Entity) rule %r/#{dot}+?/, Text rule %r/\s*\n/, Text::Whitespace, :pop! end state :css do rule(/\.[\w-]*/) { token Name::Class; goto :tag } rule(/#[a-zA-Z][\w:-]*/) { token Name::Function; goto :tag } end state :html_attr do # Strings, double/single quoted rule(/\s*(['"])#{dot}*?\1/, Literal::String, :pop!) # Ruby stuff rule(/(#{ruby_chars}+\(.*?\))/) { |m| delegate ruby, m[1]; pop! } rule(/(#{ruby_chars}+)/) { |m| delegate ruby, m[1]; pop! } rule %r/\s+/, Text::Whitespace end state :ruby_line do # Need at top mixin :indented_block rule(/[,\\]\s*\n/) { delegate ruby } rule %r/[ ]\|[ \t]*\n/, Str::Escape rule(/.*?(?=([,\\]$| \|)?[ \t]*$)/) { delegate ruby } end state :filter_block do rule %r/([^#\n]|#[^{\n]|(\\\\)*\\#\{)+/ do if @filter_lexer delegate @filter_lexer else token Name::Decorator end end mixin :interpolation mixin :indented_block end state :plain_block do mixin :interpolation rule %r(()) do |m| # Dirty html delegate html, m[1] end # HTML Entities rule(/&\S*?;/, Name::Entity) #rule %r/([^#\n]|#[^{\n]|(\\\\)*\\#\{)+/ do rule %r/#{dot}+?/, Text mixin :indented_block end state :interpolation do rule %r/#[{]/, Str::Interpol, :ruby_interp end state :ruby_interp do rule %r/[}]/, Str::Interpol, :pop! mixin :ruby_interp_inner end state :ruby_interp_inner do rule(/[{]/) { delegate ruby; push :ruby_interp_inner } rule(/[}]/) { delegate ruby; pop! } rule(/[^{}]+/) { delegate ruby } end state :indented_block do rule(/(?=|&!?,@%]) state :root do rule %r/(<)(\w+:)(.*?)(>)/ do groups Punctuation, Keyword, Text, Punctuation end # mixin :squeak_fileout mixin :whitespaces mixin :method_definition rule %r/([|])([\w\s]*)([|])/ do groups Punctuation, Name::Variable, Punctuation end mixin :objects rule %r/\^|:=|_/, Operator rule %r/[)}\]]/, Punctuation, :after_object rule %r/[({\[!]/, Punctuation end state :method_definition do rule %r/([a-z]\w*:)(\s*)(\w+)/i do groups Name::Function, Text, Name::Variable end rule %r/^(\s*)(\b[a-z]\w*\b)(\s*)$/i do groups Text, Name::Function, Text end rule %r(^(\s*)(#{ops}+)(\s*)(\w+)(\s*)$) do groups Text, Name::Function, Text, Name::Variable, Text end end state :block_variables do mixin :whitespaces rule %r/(:)(\s*)(\w+)/ do groups Operator, Text, Name::Variable end rule %r/[|]/, Punctuation, :pop! rule(//) { pop! } end state :literals do rule %r/'(''|.)*?'/m, Str, :after_object rule %r/[$]./, Str::Char, :after_object rule %r/#[(]/, Str::Symbol, :parenth rule %r/(\d+r)?-?\d+(\.\d+)?(e-?\d+)?/, Num, :after_object rule %r/#("[^"]*"|#{ops}+|[\w:]+)/, Str::Symbol, :after_object end state :parenth do rule %r/[)]/ do token Str::Symbol goto :after_object end mixin :inner_parenth end state :inner_parenth do rule %r/#[(]/, Str::Symbol, :inner_parenth rule %r/[)]/, Str::Symbol, :pop! mixin :whitespaces mixin :literals rule %r/(#{ops}|[\w:])+/, Str::Symbol end state :whitespaces do rule %r/! !$/, Keyword # squeak chunk delimiter rule %r/\s+/m, Text rule %r/".*?"/m, Comment end state :objects do rule %r/\[/, Punctuation, :block_variables rule %r/(self|super|true|false|nil|thisContext)\b/, Name::Builtin::Pseudo, :after_object rule %r/[A-Z]\w*(?!:)\b/, Name::Class, :after_object rule %r/[a-z]\w*(?!:)\b/, Name::Variable, :after_object mixin :literals end state :after_object do mixin :whitespaces rule %r/(ifTrue|ifFalse|whileTrue|whileFalse|timesRepeat):/, Name::Builtin, :pop! rule %r/new(?!:)\b/, Name::Builtin rule %r/:=|_/, Operator, :pop! rule %r/[a-z]+\w*:/i, Name::Function, :pop! rule %r/[a-z]+\w*/i, Name::Function rule %r/#{ops}+/, Name::Function, :pop! rule %r/[.]/, Punctuation, :pop! rule %r/;/, Punctuation rule(//) { pop! } end end end end rouge-3.28.0/lib/rouge/lexers/smarty.rb000066400000000000000000000046021417417255300177750ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Smarty < TemplateLexer title "Smarty" desc 'Smarty Template Engine' tag 'smarty' aliases 'smarty' filenames '*.tpl', '*.smarty' mimetypes 'application/x-smarty', 'text/x-smarty' def self.builtins @builtins ||= %w( append assign block call capture config_load debug extends for foreach foreachelse break continue function if elseif else include include_php insert ldelim rdelim literal nocache php section sectionelse setfilter strip while counter cycle eval fetch html_checkboxes html_image html_options html_radios html_select_date html_select_time html_table mailto math textformat capitalize cat count_characters count_paragraphs count_sentences count_words date_format default escape from_charset indent lower nl2br regex_replace replace spacify string_format strip strip_tags to_charset truncate unescape upper wordwrap ) end state :root do rule(/\{\s+/) { delegate parent } # block comments rule %r/\{\*.*?\*\}/m, Comment rule %r/\{\/?(?![\s*])/ do token Keyword push :smarty end rule(/.+?(?={[\/a-zA-Z0-9$#*"'])/m) { delegate parent } rule(/.+/m) { delegate parent } end state :comment do rule(/{\*/) { token Comment; push } rule(/\*}/) { token Comment; pop! } rule(/[^{}]+/m) { token Comment } end state :smarty do # allow nested tags rule %r/\{\/?(?![\s*])/ do token Keyword push :smarty end rule %r/}/, Keyword, :pop! rule %r/\s+/m, Text rule %r([~!%^&*()+=|\[\]:;,.<>/@?-]), Operator rule %r/#[a-zA-Z_]\w*#/, Name::Variable rule %r/\$[a-zA-Z_]\w*(\.\w+)*/, Name::Variable rule %r/(true|false|null)\b/, Keyword::Constant rule %r/[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?/, Num rule %r/"(\\.|.)*?"/, Str::Double rule %r/'(\\.|.)*?'/, Str::Single rule %r/([a-zA-Z_]\w*)/ do |m| if self.class.builtins.include? m[0] token Name::Builtin else token Name::Attribute end end end end end end rouge-3.28.0/lib/rouge/lexers/sml.rb000066400000000000000000000203131417417255300172460ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class SML < RegexLexer title "SML" desc 'Standard ML' tag 'sml' aliases 'ml' filenames '*.sml', '*.sig', '*.fun' mimetypes 'text/x-standardml', 'application/x-standardml' def self.keywords @keywords ||= Set.new %w( abstype and andalso as case datatype do else end exception fn fun handle if in infix infixr let local nonfix of op open orelse raise rec then type val with withtype while eqtype functor include sharing sig signature struct structure where ) end def self.symbolic_reserved @symbolic_reserved ||= Set.new %w(: | = => -> # :>) end id = /[\w']+/i symbol = %r([!%&$#/:<=>?@\\~`^|*+-]+) state :whitespace do rule %r/\s+/m, Text rule %r/[(][*]/, Comment, :comment end state :delimiters do rule %r/[(\[{]/, Punctuation, :main rule %r/[)\]}]/, Punctuation, :pop! rule %r/\b(let|if|local)\b(?!')/ do token Keyword::Reserved push; push end rule %r/\b(struct|sig|while)\b(?!')/ do token Keyword::Reserved push end rule %r/\b(do|else|end|in|then)\b(?!')/, Keyword::Reserved, :pop! end def token_for_id_with_dot(id) if self.class.keywords.include? id Error else Name::Namespace end end def token_for_final_id(id) if self.class.keywords.include? id or self.class.symbolic_reserved.include? id Error else Name end end def token_for_id(id) if self.class.keywords.include? id Keyword::Reserved elsif self.class.symbolic_reserved.include? id Punctuation else Name end end state :core do rule %r/[()\[\]{},;_]|[.][.][.]/, Punctuation rule %r/#"/, Str::Char, :char rule %r/"/, Str::Double, :string rule %r/~?0x[0-9a-fA-F]+/, Num::Hex rule %r/0wx[0-9a-fA-F]+/, Num::Hex rule %r/0w\d+/, Num::Integer rule %r/~?\d+([.]\d+)?[eE]~?\d+/, Num::Float rule %r/~?\d+[.]\d+/, Num::Float rule %r/~?\d+/, Num::Integer rule %r/#\s*[1-9][0-9]*/, Name::Label rule %r/#\s*#{id}/, Name::Label rule %r/#\s+#{symbol}/, Name::Label rule %r/\b(datatype|abstype)\b(?!')/, Keyword::Reserved, :dname rule(/(?=\bexception\b(?!'))/) { push :ename } rule %r/\b(functor|include|open|signature|structure)\b(?!')/, Keyword::Reserved, :sname rule %r/\b(type|eqtype)\b(?!')/, Keyword::Reserved, :tname rule %r/'#{id}/, Name::Decorator rule %r/(#{id})([.])/ do |m| groups(token_for_id_with_dot(m[1]), Punctuation) push :dotted end rule id do |m| token token_for_id(m[0]) end rule symbol do |m| token token_for_id(m[0]) end end state :dotted do rule %r/(#{id})([.])/ do |m| groups(token_for_id_with_dot(m[1]), Punctuation) end rule id do |m| token token_for_id(m[0]) pop! end rule symbol do |m| token token_for_id(m[0]) pop! end end state :root do rule %r/#!.*?\n/, Comment::Preproc rule(//) { push :main } end state :main do mixin :whitespace rule %r/\b(val|and)\b(?!')/, Keyword::Reserved, :vname rule %r/\b(fun)\b(?!')/ do token Keyword::Reserved goto :main_fun push :fname end mixin :delimiters mixin :core end state :main_fun do mixin :whitespace rule %r/\b(fun|and)\b(?!')/, Keyword::Reserved, :fname rule %r/\bval\b(?!')/ do token Keyword::Reserved goto :main push :vname end rule %r/[|]/, Punctuation, :fname rule %r/\b(case|handle)\b(?!')/ do token Keyword::Reserved goto :main end mixin :delimiters mixin :core end state :has_escapes do rule %r/\\[\\"abtnvfr]/, Str::Escape rule %r/\\\^[\x40-\x5e]/, Str::Escape rule %r/\\[0-9]{3}/, Str::Escape rule %r/\\u\h{4}/, Str::Escape rule %r/\\\s+\\/, Str::Interpol end state :string do rule %r/[^"\\]+/, Str::Double rule %r/"/, Str::Double, :pop! mixin :has_escapes end state :char do rule %r/[^"\\]+/, Str::Char rule %r/"/, Str::Char, :pop! mixin :has_escapes end state :breakout do rule %r/(?=\b(#{SML.keywords.to_a.join('|')})\b(?!'))/ do pop! end end state :sname do mixin :whitespace mixin :breakout rule id, Name::Namespace rule(//) { pop! } end state :has_annotations do rule %r/'[\w']*/, Name::Decorator rule %r/[(]/, Punctuation, :tyvarseq end state :fname do mixin :whitespace mixin :has_annotations rule id, Name::Function, :pop! rule symbol, Name::Function, :pop! end state :vname do mixin :whitespace mixin :has_annotations rule %r/(#{id})(\s*)(=(?!#{symbol}))/m do groups Name::Variable, Text, Punctuation pop! end rule %r/(#{symbol})(\s*)(=(?!#{symbol}))/m do groups Name::Variable, Text, Punctuation end rule id, Name::Variable, :pop! rule symbol, Name::Variable, :pop! rule(//) { pop! } end state :tname do mixin :whitespace mixin :breakout mixin :has_annotations rule %r/'[\w']*/, Name::Decorator rule %r/[(]/, Punctuation, :tyvarseq rule %r(=(?!#{symbol})) do token Punctuation goto :typbind end rule id, Keyword::Type rule symbol, Keyword::Type end state :typbind do mixin :whitespace rule %r/\b(and)\b(?!')/ do token Keyword::Reserved goto :tname end mixin :breakout mixin :core end state :dname do mixin :whitespace mixin :breakout mixin :has_annotations rule %r/(=)(\s*)(datatype)\b/ do groups Punctuation, Text, Keyword::Reserved pop! end rule %r(=(?!#{symbol})) do token Punctuation goto :datbind push :datcon end rule id, Keyword::Type rule symbol, Keyword::Type end state :datbind do mixin :whitespace rule %r/\b(and)\b(?!')/ do token Keyword::Reserved; goto :dname end rule %r/\b(withtype)\b(?!')/ do token Keyword::Reserved; goto :tname end rule %r/\bof\b(?!')/, Keyword::Reserved rule %r/([|])(\s*)(#{id})/ do groups(Punctuation, Text, Name::Class) end rule %r/([|])(\s+)(#{symbol})/ do groups(Punctuation, Text, Name::Class) end mixin :breakout mixin :core end state :ename do mixin :whitespace rule %r/(exception|and)(\s+)(#{id})/ do groups Keyword::Reserved, Text, Name::Class end rule %r/(exception|and)(\s*)(#{symbol})/ do groups Keyword::Reserved, Text, Name::Class end rule %r/\b(of)\b(?!')/, Keyword::Reserved mixin :breakout mixin :core end state :datcon do mixin :whitespace rule id, Name::Class, :pop! rule symbol, Name::Class, :pop! end state :tyvarseq do mixin :whitespace rule %r/'[\w']*/, Name::Decorator rule id, Name rule %r/,/, Punctuation rule %r/[)]/, Punctuation, :pop! rule symbol, Name end state :comment do rule %r/[^(*)]+/, Comment::Multiline rule %r/[(][*]/ do token Comment::Multiline; push end rule %r/[*][)]/, Comment::Multiline, :pop! rule %r/[(*)]/, Comment::Multiline end end end end rouge-3.28.0/lib/rouge/lexers/solidity.rb000066400000000000000000000126301417417255300203160ustar00rootroot00000000000000# -*- coding: utf-8 -*- # module Rouge module Lexers class Solidity < RegexLexer title "Solidity" desc "Solidity, an Ethereum smart contract programming language" tag 'solidity' filenames '*.sol', '*.solidity' mimetypes 'text/x-solidity' # optional comment or whitespace ws = %r((?:\s|//.*?\n|/[*].*?[*]/)+) id = /[a-zA-Z$_][\w$_]*/ def self.detect?(text) return true if text.start_with? 'pragma solidity' end # TODO: seperate by "type" def self.keywords @keywords ||= Set.new %w( abstract anonymous as assembly break catch calldata constant constructor continue contract do delete else emit enum event external fallback for function hex if indexed interface internal import is library mapping memory modifier new override payable public pure pragma private receive return returns storage struct throw try type using var view virtual while ) end def self.builtins return @builtins if @builtins @builtins = Set.new %w( now false true balance now selector super this blockhash gasleft assert require revert selfdestruct suicide call callcode delegatecall send transfer addmod ecrecover keccak256 mulmod sha256 sha3 ripemd160 ) # TODO: use (currently shadowed by catch-all in :statements) abi = %w(decode encode encodePacked encodeWithSelector encodeWithSignature) @builtins.merge( abi.map { |i| "abi.#{i}" } ) block = %w(coinbase difficulty gaslimit hash number timestamp) @builtins.merge( block.map { |i| "block.#{i}" } ) msg = %w(data gas sender sig value) @builtins.merge( msg.map { |i| "msg.#{i}" } ) tx = %w(gasprice origin) @builtins.merge( tx.map { |i| "tx.#{i}" } ) end def self.constants @constants ||= Set.new %w( wei finney szabo ether seconds minutes hours days weeks years ) end def self.keywords_type @keywords_type ||= Set.new %w( address bool byte bytes int string uint ) end def self.reserved @reserved ||= Set.new %w( alias after apply auto case copyof default define final fixed immutable implements in inline let macro match mutable null of partial promise reference relocatable sealed sizeof static supports switch typedef typeof ufixed unchecked ) end start { push :bol } state :expr_bol do mixin :inline_whitespace rule(//) { pop! } end # :expr_bol is the same as :bol but without labels, since # labels can only appear at the beginning of a statement. state :bol do mixin :expr_bol end # TODO: natspec in comments state :inline_whitespace do rule %r/[ \t\r]+/, Text rule %r/\\\n/, Text # line continuation rule %r(/\*), Comment::Multiline, :comment_multi end state :whitespace do rule %r/\n+/m, Text, :bol rule %r(//(\\.|.)*?\n), Comment::Single, :bol mixin :inline_whitespace end state :expr_whitespace do rule %r/\n+/m, Text, :expr_bol mixin :whitespace end state :statements do mixin :whitespace rule %r/(hex)?\"/, Str, :string_double rule %r/(hex)?\'/, Str, :string_single rule %r('(\\.|\\[0-7]{1,3}|\\x[a-f0-9]{1,2}|[^\\'\n])')i, Str::Char rule %r/\d\d*\.\d+([eE]\d+)?/i, Num::Float rule %r/0x[0-9a-f]+/i, Num::Hex rule %r/\d+([eE]\d+)?/i, Num::Integer rule %r(\*/), Error rule %r([~!%^&*+=\|?:<>/-]), Operator rule %r/[()\[\],.]/, Punctuation rule %r/u?fixed\d+x\d+/, Keyword::Reserved rule %r/bytes\d+/, Keyword::Type rule %r/u?int\d+/, Keyword::Type rule id do |m| name = m[0] if self.class.keywords.include? name token Keyword elsif self.class.builtins.include? name token Name::Builtin elsif self.class.constants.include? name token Keyword::Constant elsif self.class.keywords_type.include? name token Keyword::Type elsif self.class.reserved.include? name token Keyword::Reserved else token Name end end end state :root do mixin :expr_whitespace rule(//) { push :statement } # TODO: function declarations end state :statement do rule %r/;/, Punctuation, :pop! mixin :expr_whitespace mixin :statements rule %r/[{}]/, Punctuation end state :string_common do rule %r/\\(u[a-fA-F0-9]{4}|x..|[^x])/, Str::Escape rule %r/[^\\\"\'\n]+/, Str rule %r/\\\n/, Str # line continuation rule %r/\\/, Str # stray backslash end state :string_double do mixin :string_common rule %r/\"/, Str, :pop! rule %r/\'/, Str end state :string_single do mixin :string_common rule %r/\'/, Str, :pop! rule %r/\"/, Str end state :comment_multi do rule %r(\*/), Comment::Multiline, :pop! rule %r([^*/]+), Comment::Multiline rule %r([*/]), Comment::Multiline end end end end rouge-3.28.0/lib/rouge/lexers/sparql.rb000066400000000000000000000074001417417255300177570ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class SPARQL < RegexLexer title "SPARQL" desc "Semantic Query Language, for RDF data" tag 'sparql' filenames '*.rq' mimetypes 'application/sparql-query' def self.builtins @builtins = Set.new %w[ ABS AVG BNODE BOUND CEIL COALESCE CONCAT CONTAINS COUNT DATATYPE DAY ENCODE_FOR_URI FLOOR GROUP_CONCAT HOURS IF IRI isBLANK isIRI isLITERAL isNUMERIC isURI LANG LANGMATCHES LCASE MAX MD5 MIN MINUTES MONTH NOW RAND REGEX REPLACE ROUND SAMETERM SAMPLE SECONDS SEPARATOR SHA1 SHA256 SHA384 SHA512 STR STRAFTER STRBEFORE STRDT STRENDS STRLANG STRLEN STRSTARTS STRUUID SUBSTR SUM TIMEZONE TZ UCASE URI UUID YEAR ] end def self.keywords @keywords = Set.new %w[ ADD ALL AS ASC ASK BASE BIND BINDINGS BY CLEAR CONSTRUCT COPY CREATE DATA DEFAULT DELETE DESC DESCRIBE DISTINCT DROP EXISTS FILTER FROM GRAPH GROUP BY HAVING IN INSERT LIMIT LOAD MINUS MOVE NAMED NOT OFFSET OPTIONAL ORDER PREFIX SELECT REDUCED SERVICE SILENT TO UNDEF UNION USING VALUES WHERE WITH ] end state :root do rule %r(\s+)m, Text::Whitespace rule %r(#.*), Comment::Single rule %r("""), Str::Double, :string_double_literal rule %r("), Str::Double, :string_double rule %r('''), Str::Single, :string_single_literal rule %r('), Str::Single, :string_single rule %r([$?][[:word:]]+), Name::Variable rule %r(([[:word:]-]*)(:)([[:word:]-]+)?) do |m| token Name::Namespace, m[1] token Operator, m[2] token Str::Symbol, m[3] end rule %r(<[^>]*>), Name::Namespace rule %r(true|false)i, Keyword::Constant rule %r/a\b/, Keyword rule %r([A-Z][[:word:]]+\b)i do |m| if self.class.builtins.include? m[0].upcase token Name::Builtin elsif self.class.keywords.include? m[0].upcase token Keyword else token Error end end rule %r([+\-]?(?:\d+\.\d*|\.\d+)(?:[e][+\-]?[0-9]+)?)i, Num::Float rule %r([+\-]?\d+), Num::Integer rule %r([\]\[(){}.,;=]), Punctuation rule %r([/?*+=!<>]|&&|\|\||\^\^), Operator end state :string_double_common do mixin :string_escapes rule %r(\\), Str::Double rule %r([^"\\]+), Str::Double end state :string_double do rule %r(") do token Str::Double goto :string_end end mixin :string_double_common end state :string_double_literal do rule %r(""") do token Str::Double goto :string_end end rule %r("), Str::Double mixin :string_double_common end state :string_single_common do mixin :string_escapes rule %r(\\), Str::Single rule %r([^'\\]+), Str::Single end state :string_single do rule %r(') do token Str::Single goto :string_end end mixin :string_single_common end state :string_single_literal do rule %r(''') do token Str::Single goto :string_end end rule %r('), Str::Single mixin :string_single_common end state :string_escapes do rule %r(\\[tbnrf"'\\]), Str::Escape rule %r(\\u\h{4}), Str::Escape rule %r(\\U\h{8}), Str::Escape end state :string_end do rule %r((@)([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)) do groups Operator, Name::Property end rule %r(\^\^), Operator rule(//) { pop! } end end end end rouge-3.28.0/lib/rouge/lexers/sqf.rb000066400000000000000000000064411417417255300172520ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class SQF < RegexLexer tag "sqf" filenames "*.sqf" title "SQF" desc "Status Quo Function, a Real Virtuality engine scripting language" def self.wordoperators @wordoperators ||= Set.new %w( and or not ) end def self.initializers @initializers ||= Set.new %w( private param params ) end def self.controlflow @controlflow ||= Set.new %w( if then else exitwith switch do case default while for from to step foreach ) end def self.constants @constants ||= Set.new %w( true false player confignull controlnull displaynull grpnull locationnull netobjnull objnull scriptnull tasknull teammembernull ) end def self.namespaces @namespaces ||= Set.new %w( currentnamespace missionnamespace parsingnamespace profilenamespace uinamespace ) end def self.diag_commands @diag_commands ||= Set.new %w( diag_activemissionfsms diag_activesqfscripts diag_activesqsscripts diag_activescripts diag_captureframe diag_captureframetofile diag_captureslowframe diag_codeperformance diag_drawmode diag_enable diag_enabled diag_fps diag_fpsmin diag_frameno diag_lightnewload diag_list diag_log diag_logslowframe diag_mergeconfigfile diag_recordturretlimits diag_setlightnew diag_ticktime diag_toggle ) end def self.commands Kernel::load File.join(Lexers::BASE_DIR, "sqf/keywords.rb") commands end state :root do # Whitespace rule %r"\s+", Text # Preprocessor instructions rule %r"/\*.*?\*/"m, Comment::Multiline rule %r"//.*", Comment::Single rule %r"#(define|undef|if(n)?def|else|endif|include)", Comment::Preproc rule %r"\\\r?\n", Comment::Preproc rule %r"__(EVAL|EXEC|LINE__|FILE__)", Name::Builtin # Literals rule %r"\".*?\"", Literal::String rule %r"'.*?'", Literal::String rule %r"(\$|0x)[0-9a-fA-F]+", Literal::Number::Hex rule %r"[0-9]+(\.)?(e[0-9]+)?", Literal::Number::Float # Symbols rule %r"[\!\%\&\*\+\-\/\<\=\>\^\|\#]", Operator rule %r"[\(\)\{\}\[\]\,\:\;]", Punctuation # Identifiers (variables and functions) rule %r"[a-zA-Z0-9_]+" do |m| name = m[0].downcase if self.class.wordoperators.include? name token Operator::Word elsif self.class.initializers.include? name token Keyword::Declaration elsif self.class.controlflow.include? name token Keyword::Reserved elsif self.class.constants.include? name token Keyword::Constant elsif self.class.namespaces.include? name token Keyword::Namespace elsif self.class.diag_commands.include? name token Name::Function elsif self.class.commands.include? name token Name::Function elsif %r"_.+" =~ name token Name::Variable else token Name::Variable::Global end end end end end end rouge-3.28.0/lib/rouge/lexers/sqf/000077500000000000000000000000001417417255300167205ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/lexers/sqf/keywords.rb000066400000000000000000001274551417417255300211320ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class SQF def self.commands @commands ||= Set.new ["abs", "acos", "actionids", "actionkeys", "actionkeysimages", "actionkeysnames", "actionkeysnamesarray", "actionname", "activateaddons", "activatekey", "add3denconnection", "add3deneventhandler", "addcamshake", "addforcegeneratorrtd", "additempool", "addmagazinepool", "addmissioneventhandler", "addmusiceventhandler", "addswitchableunit", "addtoremainscollector", "addweaponpool", "admin", "agent", "agltoasl", "aimpos", "airdensityrtd", "airplanethrottle", "airportside", "aisfinishheal", "alive", "allcontrols", "allmissionobjects", "allsimpleobjects", "allturrets", "allturrets", "allvariables", "allvariables", "allvariables", "allvariables", "allvariables", "allvariables", "allvariables", "animationnames", "animationstate", "asin", "asltoagl", "asltoatl", "assert", "assignedcargo", "assignedcommander", "assigneddriver", "assignedgunner", "assigneditems", "assignedtarget", "assignedteam", "assignedvehicle", "assignedvehiclerole", "atan", "atg", "atltoasl", "attachedobject", "attachedobjects", "attachedto", "attackenabled", "backpack", "backpackcargo", "backpackcontainer", "backpackitems", "backpackmagazines", "behaviour", "binocular", "boundingbox", "boundingboxreal", "boundingcenter", "breakout", "breakto", "buldozer_enableroaddiag", "buldozer_loadnewroads", "buttonaction", "buttonaction", "buttonsetaction", "calculatepath", "calculateplayervisibilitybyfriendly", "call", "camcommitted", "camdestroy", "cameraeffectenablehud", "camerainterest", "campreloaded", "camtarget", "camusenvg", "cancelsimpletaskdestination", "canfire", "canmove", "canstand", "cantriggerdynamicsimulation", "canunloadincombat", "captive", "captivenum", "case", "cbchecked", "ceil", "channelenabled", "checkaifeature", "classname", "clear3deninventory", "clearallitemsfrombackpack", "clearbackpackcargo", "clearbackpackcargoglobal", "cleargroupicons", "clearitemcargo", "clearitemcargoglobal", "clearmagazinecargo", "clearmagazinecargoglobal", "clearoverlay", "clearweaponcargo", "clearweaponcargoglobal", "closedialog", "closeoverlay", "collapseobjecttree", "collect3denhistory", "collectivertd", "combatmode", "commander", "commandgetout", "commandstop", "comment", "commitoverlay", "compile", "compilefinal", "completedfsm", "composetext", "confighierarchy", "configname", "configproperties", "configsourceaddonlist", "configsourcemod", "configsourcemodlist", "copytoclipboard", "cos", "count", "count", "count", "create3dencomposition", "create3denentity", "createagent", "createcenter", "createdialog", "creatediarylink", "creategeardialog", "creategroup", "createguardedpoint", "createlocation", "createmarker", "createmarkerlocal", "createmine", "createsimpleobject", "createsoundsource", "createteam", "createtrigger", "createvehicle", "createvehiclecrew", "crew", "ctaddheader", "ctaddrow", "ctclear", "ctcursel", "ctheadercount", "ctrlactivate", "ctrlangle", "ctrlautoscrolldelay", "ctrlautoscrollrewind", "ctrlautoscrollspeed", "ctrlchecked", "ctrlclassname", "ctrlcommitted", "ctrldelete", "ctrlenable", "ctrlenabled", "ctrlenabled", "ctrlfade", "ctrlhtmlloaded", "ctrlidc", "ctrlidd", "ctrlmapanimclear", "ctrlmapanimcommit", "ctrlmapanimdone", "ctrlmapmouseover", "ctrlmapscale", "ctrlmodel", "ctrlmodeldirandup", "ctrlmodelscale", "ctrlparent", "ctrlparentcontrolsgroup", "ctrlposition", "ctrlscale", "ctrlsetfocus", "ctrlsettext", "ctrlshow", "ctrlshown", "ctrltext", "ctrltext", "ctrltextheight", "ctrltextsecondary", "ctrltextwidth", "ctrltype", "ctrlvisible", "ctrowcount", "curatoraddons", "curatorcameraarea", "curatorcameraareaceiling", "curatoreditableobjects", "curatoreditingarea", "curatoreditingareatype", "curatorpoints", "curatorregisteredobjects", "curatorwaypointcost", "currentcommand", "currentmagazine", "currentmagazinedetail", "currentmuzzle", "currentpilot", "currenttask", "currenttasks", "currentthrowable", "currentvisionmode", "currentwaypoint", "currentweapon", "currentweaponmode", "currentzeroing", "cutobj", "cutrsc", "cuttext", "damage", "datetonumber", "deactivatekey", "debriefingtext", "debuglog", "decaygraphvalues", "default", "deg", "delete3denentities", "deletecenter", "deletecollection", "deletegroup", "deleteidentity", "deletelocation", "deletemarker", "deletemarkerlocal", "deletesite", "deletestatus", "deleteteam", "deletevehicle", "deletewaypoint", "detach", "detectedmines", "diag_captureframe", "diag_captureframetofile", "diag_captureslowframe", "diag_codeperformance", "diag_dynamicsimulationend", "diag_lightnewload", "diag_log", "diag_logslowframe", "diag_setlightnew", "didjipowner", "difficultyenabled", "difficultyoption", "direction", "direction", "disablemapindicators", "disableremotesensors", "disableuserinput", "displayparent", "dissolveteam", "do3denaction", "dogetout", "dostop", "drawicon3d", "drawline3d", "driver", "drop", "dynamicsimulationdistance", "dynamicsimulationdistancecoef", "dynamicsimulationenabled", "dynamicsimulationenabled", "echo", "edit3denmissionattributes", "effectivecommander", "enableaudiofeature", "enablecamshake", "enablecaustics", "enabledebriefingstats", "enablediaglegend", "enabledynamicsimulationsystem", "enableengineartillery", "enableenvironment", "enableradio", "enablesatnormalondetail", "enablesaving", "enablesentences", "enablestressdamage", "enableteamswitch", "enabletraffic", "enableweapondisassembly", "endmission", "enginesisonrtd", "enginespowerrtd", "enginesrpmrtd", "enginestorquertd", "entities", "entities", "estimatedtimeleft", "everybackpack", "everycontainer", "execfsm", "execvm", "exp", "expecteddestination", "exportjipmessages", "eyedirection", "eyepos", "face", "faction", "failmission", "fillweaponsfrompool", "finddisplay", "finite", "firstbackpack", "flag", "flaganimationphase", "flagowner", "flagside", "flagtexture", "fleeing", "floor", "for", "for", "forceatpositionrtd", "forcegeneratorrtd", "forcemap", "forcerespawn", "format", "formation", "formation", "formationdirection", "formationleader", "formationmembers", "formationposition", "formationtask", "formattext", "formleader", "fromeditor", "fuel", "fullcrew", "fullcrew", "gearidcammocount", "gearslotammocount", "gearslotdata", "get3denactionstate", "get3denconnections", "get3denentity", "get3denentityid", "get3dengrid", "get3denlayerentities", "get3denselected", "getaimingcoef", "getallenvsoundcontrollers", "getallhitpointsdamage", "getallownedmines", "getallsoundcontrollers", "getammocargo", "getanimaimprecision", "getanimspeedcoef", "getarray", "getartilleryammo", "getassignedcuratorlogic", "getassignedcuratorunit", "getbackpackcargo", "getbleedingremaining", "getburningvalue", "getcameraviewdirection", "getcenterofmass", "getconnecteduav", "getcontainermaxload", "getcustomaimcoef", "getcustomsoundcontroller", "getcustomsoundcontrollercount", "getdammage", "getdescription", "getdir", "getdirvisual", "getdiverstate", "getdlcassetsusagebyname", "getdlcs", "getdlcusagetime", "geteditorcamera", "geteditormode", "getenginetargetrpmrtd", "getfatigue", "getfieldmanualstartpage", "getforcedflagtexture", "getfuelcargo", "getgraphvalues", "getgroupiconparams", "getgroupicons", "getitemcargo", "getmagazinecargo", "getmarkercolor", "getmarkerpos", "getmarkerpos", "getmarkersize", "getmarkertype", "getmass", "getmissionconfig", "getmissionconfigvalue", "getmissionlayerentities", "getmissionpath", "getmodelinfo", "getnumber", "getobjectdlc", "getobjectfov", "getobjectmaterials", "getobjecttextures", "getobjecttype", "getoxygenremaining", "getpersonuseddlcs", "getpilotcameradirection", "getpilotcameraposition", "getpilotcamerarotation", "getpilotcameratarget", "getplatenumber", "getplayerchannel", "getplayerscores", "getplayeruid", "getpos", "getpos", "getposasl", "getposaslvisual", "getposaslw", "getposatl", "getposatlvisual", "getposvisual", "getposworld", "getposworldvisual", "getpylonmagazines", "getrepaircargo", "getrotorbrakertd", "getshotparents", "getslingload", "getstamina", "getstatvalue", "getsuppression", "getterrainheightasl", "gettext", "gettrimoffsetrtd", "getunitloadout", "getunitloadout", "getunitloadout", "getusermfdtext", "getusermfdvalue", "getvehiclecargo", "getweaponcargo", "getweaponsway", "getwingsorientationrtd", "getwingspositionrtd", "getwppos", "goggles", "goto", "group", "groupfromnetid", "groupid", "groupowner", "groupselectedunits", "gunner", "handgunitems", "handgunmagazine", "handgunweapon", "handshit", "haspilotcamera", "hcallgroups", "hcleader", "hcremoveallgroups", "hcselected", "hcshowbar", "headgear", "hidebody", "hideobject", "hideobjectglobal", "hint", "hintc", "hintcadet", "hintsilent", "hmd", "hostmission", "if", "image", "importallgroups", "importance", "incapacitatedstate", "inflamed", "infopanel", "infopanels", "ingameuiseteventhandler", "inheritsfrom", "inputaction", "isabletobreathe", "isagent", "isaimprecisionenabled", "isarray", "isautohoveron", "isautonomous", "isautostartupenabledrtd", "isautotrimonrtd", "isbleeding", "isburning", "isclass", "iscollisionlighton", "iscopilotenabled", "isdamageallowed", "isdlcavailable", "isengineon", "isforcedwalk", "isformationleader", "isgroupdeletedwhenempty", "ishidden", "isinremainscollector", "iskeyactive", "islaseron", "islighton", "islocalized", "ismanualfire", "ismarkedforcollection", "isnil", "isnull", "isnull", "isnull", "isnull", "isnull", "isnull", "isnull", "isnull", "isnull", "isnumber", "isobjecthidden", "isobjectrtd", "isonroad", "isplayer", "isrealtime", "isshowing3dicons", "issimpleobject", "issprintallowed", "isstaminaenabled", "istext", "istouchingground", "isturnedout", "isuavconnected", "isvehiclecargo", "isvehicleradaron", "iswalking", "isweapondeployed", "isweaponrested", "itemcargo", "items", "itemswithmagazines", "keyimage", "keyname", "landresult", "lasertarget", "lbadd", "lbclear", "lbclear", "lbcolor", "lbcolorright", "lbcursel", "lbcursel", "lbdata", "lbdelete", "lbpicture", "lbpictureright", "lbselection", "lbsetcolor", "lbsetcolorright", "lbsetcursel", "lbsetdata", "lbsetpicture", "lbsetpicturecolor", "lbsetpicturecolordisabled", "lbsetpicturecolorselected", "lbsetpictureright", "lbsetselectcolor", "lbsetselectcolorright", "lbsettext", "lbsettooltip", "lbsetvalue", "lbsize", "lbsize", "lbsort", "lbsort", "lbsort", "lbsortbyvalue", "lbsortbyvalue", "lbtext", "lbtextright", "lbvalue", "leader", "leader", "leader", "leaderboarddeinit", "leaderboardgetrows", "leaderboardinit", "leaderboardrequestrowsfriends", "leaderboardrequestrowsglobal", "leaderboardrequestrowsglobalarounduser", "leaderboardsrequestuploadscore", "leaderboardsrequestuploadscorekeepbest", "leaderboardstate", "lifestate", "lightdetachobject", "lightison", "linearconversion", "lineintersects", "lineintersectsobjs", "lineintersectssurfaces", "lineintersectswith", "list", "listremotetargets", "listvehiclesensors", "ln", "lnbaddarray", "lnbaddcolumn", "lnbaddrow", "lnbclear", "lnbclear", "lnbcolor", "lnbcolorright", "lnbcurselrow", "lnbcurselrow", "lnbdata", "lnbdeletecolumn", "lnbdeleterow", "lnbgetcolumnsposition", "lnbgetcolumnsposition", "lnbpicture", "lnbpictureright", "lnbsetcolor", "lnbsetcolorright", "lnbsetcolumnspos", "lnbsetcurselrow", "lnbsetdata", "lnbsetpicture", "lnbsetpicturecolor", "lnbsetpicturecolorright", "lnbsetpicturecolorselected", "lnbsetpicturecolorselectedright", "lnbsetpictureright", "lnbsettext", "lnbsettextright", "lnbsettooltip", "lnbsetvalue", "lnbsize", "lnbsize", "lnbsort", "lnbsortbyvalue", "lnbtext", "lnbtextright", "lnbvalue", "load", "loadabs", "loadbackpack", "loadfile", "loaduniform", "loadvest", "local", "local", "localize", "locationposition", "locked", "lockeddriver", "lockidentity", "log", "lognetwork", "lognetworkterminate", "magazinecargo", "magazines", "magazinesallturrets", "magazinesammo", "magazinesammocargo", "magazinesammofull", "magazinesdetail", "magazinesdetailbackpack", "magazinesdetailuniform", "magazinesdetailvest", "mapanimadd", "mapcenteroncamera", "mapgridposition", "markeralpha", "markerbrush", "markercolor", "markerdir", "markerpos", "markerpos", "markershape", "markersize", "markertext", "markertype", "matrixtranspose", "members", "menuaction", "menuadd", "menuchecked", "menuclear", "menuclear", "menucollapse", "menudata", "menudelete", "menuenable", "menuenabled", "menuexpand", "menuhover", "menuhover", "menupicture", "menusetaction", "menusetcheck", "menusetdata", "menusetpicture", "menusetvalue", "menushortcut", "menushortcuttext", "menusize", "menusort", "menutext", "menuurl", "menuvalue", "mineactive", "missiletarget", "missiletargetpos", "modparams", "moonphase", "morale", "move3dencamera", "moveout", "movetime", "movetocompleted", "movetofailed", "name", "name", "namesound", "nearestbuilding", "nearestbuilding", "nearestlocation", "nearestlocations", "nearestlocationwithdubbing", "nearestobject", "nearestobjects", "nearestterrainobjects", "needreload", "netid", "netid", "nextmenuitemindex", "not", "numberofenginesrtd", "numbertodate", "objectcurators", "objectfromnetid", "objectparent", "onbriefinggroup", "onbriefingnotes", "onbriefingplan", "onbriefingteamswitch", "oncommandmodechanged", "oneachframe", "ongroupiconclick", "ongroupiconoverenter", "ongroupiconoverleave", "onhcgroupselectionchanged", "onmapsingleclick", "onplayerconnected", "onplayerdisconnected", "onpreloadfinished", "onpreloadstarted", "onteamswitch", "opendlcpage", "openmap", "openmap", "opensteamapp", "openyoutubevideo", "owner", "param", "params", "parsenumber", "parsenumber", "parsesimplearray", "parsetext", "pickweaponpool", "pitch", "playableslotsnumber", "playersnumber", "playmission", "playmusic", "playmusic", "playscriptedmission", "playsound", "playsound", "playsound3d", "position", "position", "positioncameratoworld", "ppeffectcommitted", "ppeffectcommitted", "ppeffectcreate", "ppeffectdestroy", "ppeffectdestroy", "ppeffectenabled", "precision", "preloadcamera", "preloadsound", "preloadtitleobj", "preloadtitlersc", "preprocessfile", "preprocessfilelinenumbers", "primaryweapon", "primaryweaponitems", "primaryweaponmagazine", "priority", "private", "processdiarylink", "progressloadingscreen", "progressposition", "publicvariable", "publicvariableserver", "putweaponpool", "queryitemspool", "querymagazinepool", "queryweaponpool", "rad", "radiochannelcreate", "random", "random", "rank", "rankid", "rating", "rectangular", "registeredtasks", "reload", "reloadenabled", "remoteexec", "remoteexeccall", "remove3denconnection", "remove3deneventhandler", "remove3denlayer", "removeall3deneventhandlers", "removeallactions", "removeallassigneditems", "removeallcontainers", "removeallcuratoraddons", "removeallcuratorcameraareas", "removeallcuratoreditingareas", "removeallhandgunitems", "removeallitems", "removeallitemswithmagazines", "removeallmissioneventhandlers", "removeallmusiceventhandlers", "removeallownedmines", "removeallprimaryweaponitems", "removeallweapons", "removebackpack", "removebackpackglobal", "removefromremainscollector", "removegoggles", "removeheadgear", "removemissioneventhandler", "removemusiceventhandler", "removeswitchableunit", "removeuniform", "removevest", "requiredversion", "resetsubgroupdirection", "resources", "restarteditorcamera", "reverse", "roadat", "roadsconnectedto", "roledescription", "ropeattachedobjects", "ropeattachedto", "ropeattachenabled", "ropecreate", "ropecut", "ropedestroy", "ropeendposition", "ropelength", "ropes", "ropeunwind", "ropeunwound", "rotorsforcesrtd", "rotorsrpmrtd", "round", "save3deninventory", "saveoverlay", "savevar", "scopename", "score", "scoreside", "screenshot", "screentoworld", "scriptdone", "scriptname", "scudstate", "secondaryweapon", "secondaryweaponitems", "secondaryweaponmagazine", "selectbestplaces", "selectededitorobjects", "selectionnames", "selectmax", "selectmin", "selectplayer", "selectrandom", "selectrandomweighted", "sendaumessage", "sendudpmessage", "servercommand", "servercommandavailable", "servercommandexecutable", "set3denattributes", "set3dengrid", "set3deniconsvisible", "set3denlinesvisible", "set3denmissionattributes", "set3denmodelsvisible", "set3denselected", "setacctime", "setaperture", "setaperturenew", "setarmorypoints", "setcamshakedefparams", "setcamshakeparams", "setcompassoscillation", "setcurrentchannel", "setcustommissiondata", "setcustomsoundcontroller", "setdate", "setdefaultcamera", "setdetailmapblendpars", "setgroupiconsselectable", "setgroupiconsvisible", "sethorizonparallaxcoef", "sethudmovementlevels", "setinfopanel", "setlocalwindparams", "setmouseposition", "setmusiceventhandler", "setobjectviewdistance", "setobjectviewdistance", "setplayable", "setplayerrespawntime", "setshadowdistance", "setsimulweatherlayers", "setstaminascheme", "setstatvalue", "setsystemofunits", "setterraingrid", "settimemultiplier", "settrafficdensity", "settrafficdistance", "settrafficgap", "settrafficspeed", "setviewdistance", "setwind", "setwinddir", "showchat", "showcinemaborder", "showcommandingmenu", "showcompass", "showcuratorcompass", "showgps", "showhud", "showhud", "showmap", "showpad", "showradio", "showscoretable", "showsubtitles", "showuavfeed", "showwarrant", "showwatch", "showwaypoints", "side", "side", "side", "simpletasks", "simulationenabled", "simulclouddensity", "simulcloudocclusion", "simulinclouds", "sin", "size", "sizeof", "skill", "skiptime", "sleep", "sliderposition", "sliderposition", "sliderrange", "sliderrange", "slidersetposition", "slidersetrange", "slidersetspeed", "sliderspeed", "sliderspeed", "soldiermagazines", "someammo", "speaker", "speed", "speedmode", "sqrt", "squadparams", "stance", "startloadingscreen", "stopenginertd", "stopped", "str", "supportinfo", "surfaceiswater", "surfacenormal", "surfacetype", "switch", "switchcamera", "synchronizedobjects", "synchronizedtriggers", "synchronizedwaypoints", "synchronizedwaypoints", "systemchat", "tan", "taskalwaysvisible", "taskchildren", "taskcompleted", "taskcustomdata", "taskdescription", "taskdestination", "taskhint", "taskmarkeroffset", "taskparent", "taskresult", "taskstate", "tasktype", "teammember", "teamname", "teamtype", "terminate", "terrainintersect", "terrainintersectasl", "terrainintersectatasl", "text", "text", "textlog", "textlogformat", "tg", "throw", "titlecut", "titlefadeout", "titleobj", "titlersc", "titletext", "toarray", "tofixed", "tolower", "toloweransi", "tostring", "toupper", "toupperansi", "triggeractivated", "triggeractivation", "triggerammo", "triggerarea", "triggerattachedvehicle", "triggerstatements", "triggertext", "triggertimeout", "triggertimeoutcurrent", "triggertype", "try", "tvadd", "tvclear", "tvclear", "tvcollapse", "tvcollapseall", "tvcollapseall", "tvcount", "tvcursel", "tvcursel", "tvdata", "tvdelete", "tvexpand", "tvexpandall", "tvexpandall", "tvpicture", "tvpictureright", "tvsetcursel", "tvsetdata", "tvsetpicture", "tvsetpicturecolor", "tvsetpictureright", "tvsetpicturerightcolor", "tvsettext", "tvsettooltip", "tvsetvalue", "tvsort", "tvsortbyvalue", "tvtext", "tvtooltip", "tvvalue", "type", "type", "typename", "typeof", "uavcontrol", "uisleep", "unassigncurator", "unassignteam", "unassignvehicle", "underwater", "uniform", "uniformcontainer", "uniformitems", "uniformmagazines", "unitaddons", "unitaimposition", "unitaimpositionvisual", "unitbackpack", "unitisuav", "unitpos", "unitready", "unitrecoilcoefficient", "units", "units", "unlockachievement", "updateobjecttree", "useaiopermapobstructiontest", "useaisteeringcomponent", "vectordir", "vectordirvisual", "vectorlinearconversion", "vectormagnitude", "vectormagnitudesqr", "vectornormalized", "vectorup", "vectorupvisual", "vehicle", "vehiclecargoenabled", "vehiclereceiveremotetargets", "vehiclereportownposition", "vehiclereportremotetargets", "vehiclevarname", "velocity", "velocitymodelspace", "verifysignature", "vest", "vestcontainer", "vestitems", "vestmagazines", "visibleposition", "visiblepositionasl", "waituntil", "waypointattachedobject", "waypointattachedvehicle", "waypointbehaviour", "waypointcombatmode", "waypointcompletionradius", "waypointdescription", "waypointforcebehaviour", "waypointformation", "waypointhouseposition", "waypointloiterradius", "waypointloitertype", "waypointname", "waypointposition", "waypoints", "waypointscript", "waypointsenableduav", "waypointshow", "waypointspeed", "waypointstatements", "waypointtimeout", "waypointtimeoutcurrent", "waypointtype", "waypointvisible", "weaponcargo", "weaponinertia", "weaponlowered", "weapons", "weaponsitems", "weaponsitemscargo", "weaponstate", "weaponstate", "weightrtd", "wfsidetext", "wfsidetext", "wfsidetext", "while", "wingsforcesrtd", "with", "worldtoscreen", "action", "actionparams", "add3denlayer", "addaction", "addbackpack", "addbackpackcargo", "addbackpackcargoglobal", "addbackpackglobal", "addcuratoraddons", "addcuratorcameraarea", "addcuratoreditableobjects", "addcuratoreditingarea", "addcuratorpoints", "addeditorobject", "addeventhandler", "addforce", "addgoggles", "addgroupicon", "addhandgunitem", "addheadgear", "additem", "additemcargo", "additemcargoglobal", "additemtobackpack", "additemtouniform", "additemtovest", "addlivestats", "addmagazine", "addmagazine", "addmagazineammocargo", "addmagazinecargo", "addmagazinecargoglobal", "addmagazineglobal", "addmagazines", "addmagazineturret", "addmenu", "addmenuitem", "addmpeventhandler", "addownedmine", "addplayerscores", "addprimaryweaponitem", "addpublicvariableeventhandler", "addpublicvariableeventhandler", "addrating", "addresources", "addscore", "addscoreside", "addsecondaryweaponitem", "addteammember", "addtorque", "adduniform", "addvehicle", "addvest", "addwaypoint", "addweapon", "addweaponcargo", "addweaponcargoglobal", "addweaponglobal", "addweaponitem", "addweaponturret", "addweaponwithattachmentscargo", "addweaponwithattachmentscargoglobal", "aimedattarget", "allow3dmode", "allowcrewinimmobile", "allowcuratorlogicignoreareas", "allowdamage", "allowdammage", "allowfileoperations", "allowfleeing", "allowgetin", "allowsprint", "ammo", "ammoonpylon", "and", "and", "animate", "animatebay", "animatedoor", "animatepylon", "animatesource", "animationphase", "animationsourcephase", "append", "apply", "arrayintersect", "assignascargo", "assignascargoindex", "assignascommander", "assignasdriver", "assignasgunner", "assignasturret", "assigncurator", "assignitem", "assignteam", "assigntoairport", "atan2", "attachobject", "attachto", "backpackspacefor", "bezierinterpolation", "boundingbox", "boundingboxreal", "breakout", "buildingexit", "buildingpos", "buttonsetaction", "call", "callextension", "callextension", "camcommand", "camcommit", "camcommitprepared", "camconstuctionsetparams", "camcreate", "cameraeffect", "campreload", "campreparebank", "campreparedir", "campreparedive", "campreparefocus", "campreparefov", "campreparefovrange", "campreparepos", "campreparerelpos", "campreparetarget", "campreparetarget", "camsetbank", "camsetdir", "camsetdive", "camsetfocus", "camsetfov", "camsetfovrange", "camsetpos", "camsetrelpos", "camsettarget", "camsettarget", "canadd", "canadditemtobackpack", "canadditemtouniform", "canadditemtovest", "canslingload", "canvehiclecargo", "catch", "cbsetchecked", "checkaifeature", "checkvisibility", "clear3denattribute", "closedisplay", "commandartilleryfire", "commandchat", "commandfire", "commandfollow", "commandfsm", "commandmove", "commandradio", "commandsuppressivefire", "commandtarget", "commandwatch", "commandwatch", "configclasses", "confirmsensortarget", "connectterminaltouav", "controlsgroupctrl", "copywaypoints", "count", "countenemy", "countfriendly", "countside", "counttype", "countunknown", "create3denentity", "creatediaryrecord", "creatediarysubject", "createdisplay", "createmenu", "createmissiondisplay", "createmissiondisplay", "creatempcampaigndisplay", "createsimpletask", "createsite", "createtask", "createunit", "createunit", "createvehicle", "createvehiclelocal", "ctdata", "ctfindheaderrows", "ctfindrowheader", "ctheadercontrols", "ctremoveheaders", "ctremoverows", "ctrladdeventhandler", "ctrlanimatemodel", "ctrlanimationphasemodel", "ctrlchecked", "ctrlcommit", "ctrlcreate", "ctrlenable", "ctrlmapanimadd", "ctrlmapcursor", "ctrlmapscreentoworld", "ctrlmapworldtoscreen", "ctrlremovealleventhandlers", "ctrlremoveeventhandler", "ctrlsetactivecolor", "ctrlsetangle", "ctrlsetautoscrolldelay", "ctrlsetautoscrollrewind", "ctrlsetautoscrollspeed", "ctrlsetbackgroundcolor", "ctrlsetchecked", "ctrlsetchecked", "ctrlsetdisabledcolor", "ctrlseteventhandler", "ctrlsetfade", "ctrlsetfont", "ctrlsetfonth1", "ctrlsetfonth1b", "ctrlsetfonth2", "ctrlsetfonth2b", "ctrlsetfonth3", "ctrlsetfonth3b", "ctrlsetfonth4", "ctrlsetfonth4b", "ctrlsetfonth5", "ctrlsetfonth5b", "ctrlsetfonth6", "ctrlsetfonth6b", "ctrlsetfontheight", "ctrlsetfontheighth1", "ctrlsetfontheighth2", "ctrlsetfontheighth3", "ctrlsetfontheighth4", "ctrlsetfontheighth5", "ctrlsetfontheighth6", "ctrlsetfontheightsecondary", "ctrlsetfontp", "ctrlsetfontp", "ctrlsetfontpb", "ctrlsetfontsecondary", "ctrlsetforegroundcolor", "ctrlsetmodel", "ctrlsetmodeldirandup", "ctrlsetmodelscale", "ctrlsetpixelprecision", "ctrlsetpixelprecision", "ctrlsetposition", "ctrlsetpositionh", "ctrlsetpositionw", "ctrlsetpositionx", "ctrlsetpositiony", "ctrlsetscale", "ctrlsetstructuredtext", "ctrlsettext", "ctrlsettextcolor", "ctrlsettextcolorsecondary", "ctrlsettextsecondary", "ctrlsettooltip", "ctrlsettooltipcolorbox", "ctrlsettooltipcolorshade", "ctrlsettooltipcolortext", "ctrlshow", "ctrowcontrols", "ctsetcursel", "ctsetdata", "ctsetheadertemplate", "ctsetrowtemplate", "ctsetvalue", "ctvalue", "curatorcoef", "currentmagazinedetailturret", "currentmagazineturret", "currentweaponturret", "customchat", "customradio", "cutfadeout", "cutfadeout", "cutobj", "cutobj", "cutrsc", "cutrsc", "cuttext", "cuttext", "debugfsm", "deleteat", "deleteeditorobject", "deletegroupwhenempty", "deleterange", "deleteresources", "deletevehiclecrew", "diarysubjectexists", "directsay", "disableai", "disablecollisionwith", "disableconversation", "disablenvgequipment", "disabletiequipment", "disableuavconnectability", "displayaddeventhandler", "displayctrl", "displayremovealleventhandlers", "displayremoveeventhandler", "displayseteventhandler", "distance", "distance", "distance", "distance", "distance2d", "distancesqr", "distancesqr", "distancesqr", "distancesqr", "do", "do", "do", "do", "doartilleryfire", "dofire", "dofollow", "dofsm", "domove", "doorphase", "dosuppressivefire", "dotarget", "dowatch", "dowatch", "drawarrow", "drawellipse", "drawicon", "drawline", "drawlink", "drawlocation", "drawpolygon", "drawrectangle", "drawtriangle", "editobject", "editorseteventhandler", "else", "emptypositions", "enableai", "enableaifeature", "enableaifeature", "enableaimprecision", "enableattack", "enableautostartuprtd", "enableautotrimrtd", "enablechannel", "enablechannel", "enablecollisionwith", "enablecopilot", "enabledynamicsimulation", "enabledynamicsimulation", "enablefatigue", "enablegunlights", "enableinfopanelcomponent", "enableirlasers", "enablemimics", "enablepersonturret", "enablereload", "enableropeattach", "enablesimulation", "enablesimulationglobal", "enablestamina", "enableuavconnectability", "enableuavwaypoints", "enablevehiclecargo", "enablevehiclesensor", "enableweapondisassembly", "engineon", "evalobjectargument", "exec", "execeditorscript", "execfsm", "execvm", "exitwith", "fademusic", "faderadio", "fadesound", "fadespeech", "find", "find", "findcover", "findeditorobject", "findeditorobject", "findemptyposition", "findemptypositionready", "findif", "findnearestenemy", "fire", "fire", "fireattarget", "flyinheight", "flyinheightasl", "forceadduniform", "forceflagtexture", "forcefollowroad", "forcespeed", "forcewalk", "forceweaponfire", "foreach", "foreachmember", "foreachmemberagent", "foreachmemberteam", "forgettarget", "from", "get3denattribute", "get3denattribute", "get3denattribute", "get3denattribute", "get3denattribute", "get3denmissionattribute", "getartilleryeta", "getcargoindex", "getcompatiblepylonmagazines", "getcompatiblepylonmagazines", "getdir", "geteditorobjectscope", "getenvsoundcontroller", "getfriend", "getfsmvariable", "getgroupicon", "gethidefrom", "gethit", "gethitindex", "gethitpointdamage", "getobjectargument", "getobjectchildren", "getobjectproxy", "getpos", "getreldir", "getrelpos", "getsoundcontroller", "getsoundcontrollerresult", "getspeed", "getunittrait", "getvariable", "getvariable", "getvariable", "getvariable", "getvariable", "getvariable", "getvariable", "getvariable", "getvariable", "getvariable", "getvariable", "getvariable", "getvariable", "getvariable", "glanceat", "globalchat", "globalradio", "groupchat", "groupradio", "groupselectunit", "hasweapon", "hcgroupparams", "hcremovegroup", "hcselectgroup", "hcsetgroup", "hideobject", "hideobjectglobal", "hideselection", "hintc", "hintc", "hintc", "htmlload", "in", "in", "in", "in", "inarea", "inarea", "inarea", "inarea", "inarea", "inareaarray", "inareaarray", "inareaarray", "inareaarray", "inflame", "infopanelcomponentenabled", "infopanelcomponents", "inpolygon", "inrangeofartillery", "inserteditorobject", "intersect", "isequalto", "isequaltype", "isequaltypeall", "isequaltypeany", "isequaltypearray", "isequaltypeparams", "isflashlighton", "isflatempty", "isirlaseron", "iskindof", "iskindof", "iskindof", "issensortargetconfirmed", "isuavconnectable", "isuniformallowed", "isvehiclesensorenabled", "join", "joinas", "joinassilent", "joinsilent", "joinstring", "kbadddatabase", "kbadddatabasetargets", "kbaddtopic", "kbhastopic", "kbreact", "kbremovetopic", "kbtell", "kbwassaid", "knowsabout", "knowsabout", "land", "landat", "lbadd", "lbcolor", "lbcolorright", "lbdata", "lbdelete", "lbisselected", "lbpicture", "lbpictureright", "lbsetcolor", "lbsetcolorright", "lbsetcursel", "lbsetdata", "lbsetpicture", "lbsetpicturecolor", "lbsetpicturecolordisabled", "lbsetpicturecolorselected", "lbsetpictureright", "lbsetpicturerightcolor", "lbsetpicturerightcolordisabled", "lbsetpicturerightcolorselected", "lbsetselectcolor", "lbsetselectcolorright", "lbsetselected", "lbsettext", "lbsettextright", "lbsettooltip", "lbsetvalue", "lbtext", "lbtextright", "lbvalue", "leavevehicle", "leavevehicle", "lightattachobject", "limitspeed", "linkitem", "listobjects", "lnbaddcolumn", "lnbaddrow", "lnbcolor", "lnbcolorright", "lnbdata", "lnbdeletecolumn", "lnbdeleterow", "lnbpicture", "lnbpictureright", "lnbsetcolor", "lnbsetcolorright", "lnbsetcolumnspos", "lnbsetcurselrow", "lnbsetdata", "lnbsetpicture", "lnbsetpicturecolor", "lnbsetpicturecolorright", "lnbsetpicturecolorselected", "lnbsetpicturecolorselectedright", "lnbsetpictureright", "lnbsettext", "lnbsettextright", "lnbsettooltip", "lnbsetvalue", "lnbsort", "lnbsortbyvalue", "lnbtext", "lnbtextright", "lnbvalue", "loadidentity", "loadmagazine", "loadoverlay", "loadstatus", "lock", "lock", "lockcamerato", "lockcargo", "lockcargo", "lockdriver", "lockedcargo", "lockedturret", "lockturret", "lockwp", "lookat", "lookatpos", "magazinesturret", "magazineturretammo", "mapcenteroncamera", "matrixmultiply", "max", "menuaction", "menuadd", "menuchecked", "menucollapse", "menudata", "menudelete", "menuenable", "menuenabled", "menuexpand", "menupicture", "menusetaction", "menusetcheck", "menusetdata", "menusetpicture", "menusetvalue", "menushortcut", "menushortcuttext", "menusize", "menusort", "menutext", "menuurl", "menuvalue", "min", "minedetectedby", "mod", "modeltoworld", "modeltoworldvisual", "modeltoworldvisualworld", "modeltoworldworld", "move", "moveinany", "moveincargo", "moveincargo", "moveincommander", "moveindriver", "moveingunner", "moveinturret", "moveobjecttoend", "moveto", "nearentities", "nearestobject", "nearestobject", "nearobjects", "nearobjectsready", "nearroads", "nearsupplies", "neartargets", "newoverlay", "nmenuitems", "objstatus", "ondoubleclick", "onmapsingleclick", "onshownewobject", "or", "or", "ordergetin", "param", "params", "playaction", "playactionnow", "playgesture", "playmove", "playmovenow", "posscreentoworld", "posworldtoscreen", "ppeffectadjust", "ppeffectadjust", "ppeffectcommit", "ppeffectcommit", "ppeffectcommit", "ppeffectenable", "ppeffectenable", "ppeffectenable", "ppeffectforceinnvg", "preloadobject", "progresssetposition", "publicvariableclient", "pushback", "pushbackunique", "radiochanneladd", "radiochannelremove", "radiochannelsetcallsign", "radiochannelsetlabel", "random", "registertask", "remotecontrol", "remoteexec", "remoteexeccall", "removeaction", "removealleventhandlers", "removeallmpeventhandlers", "removecuratoraddons", "removecuratorcameraarea", "removecuratoreditableobjects", "removecuratoreditingarea", "removediaryrecord", "removediarysubject", "removedrawicon", "removedrawlinks", "removeeventhandler", "removegroupicon", "removehandgunitem", "removeitem", "removeitemfrombackpack", "removeitemfromuniform", "removeitemfromvest", "removeitems", "removemagazine", "removemagazineglobal", "removemagazines", "removemagazinesturret", "removemagazineturret", "removemenuitem", "removemenuitem", "removempeventhandler", "removeownedmine", "removeprimaryweaponitem", "removesecondaryweaponitem", "removesimpletask", "removeteammember", "removeweapon", "removeweaponattachmentcargo", "removeweaponcargo", "removeweaponglobal", "removeweaponturret", "reportremotetarget", "resize", "respawnvehicle", "reveal", "reveal", "revealmine", "ropeattachto", "ropedetach", "saveidentity", "savestatus", "say", "say", "say2d", "say2d", "say3d", "say3d", "select", "select", "select", "select", "select", "select", "selectdiarysubject", "selecteditorobject", "selectionposition", "selectleader", "selectrandomweighted", "selectweapon", "selectweaponturret", "sendsimplecommand", "sendtask", "sendtaskresult", "servercommand", "set", "set3denattribute", "set3denlayer", "set3denlogictype", "set3denmissionattribute", "set3denobjecttype", "setactualcollectivertd", "setairplanethrottle", "setairportside", "setammo", "setammocargo", "setammoonpylon", "setanimspeedcoef", "setattributes", "setautonomous", "setbehaviour", "setbehaviourstrong", "setbleedingremaining", "setbrakesrtd", "setcamerainterest", "setcamuseti", "setcaptive", "setcenterofmass", "setcollisionlight", "setcombatmode", "setcombatmode", "setconvoyseparation", "setcuratorcameraareaceiling", "setcuratorcoef", "setcuratoreditingareatype", "setcuratorwaypointcost", "setcurrenttask", "setcurrentwaypoint", "setcustomaimcoef", "setcustomweightrtd", "setdamage", "setdammage", "setdebriefingtext", "setdestination", "setdiaryrecordtext", "setdir", "setdirection", "setdrawicon", "setdriveonpath", "setdropinterval", "setdynamicsimulationdistance", "setdynamicsimulationdistancecoef", "seteditormode", "seteditorobjectscope", "seteffectcondition", "seteffectivecommander", "setenginerpmrtd", "setface", "setfaceanimation", "setfatigue", "setfeaturetype", "setflaganimationphase", "setflagowner", "setflagside", "setflagtexture", "setfog", "setforcegeneratorrtd", "setformation", "setformation", "setformationtask", "setformdir", "setfriend", "setfromeditor", "setfsmvariable", "setfuel", "setfuelcargo", "setgroupicon", "setgroupiconparams", "setgroupid", "setgroupidglobal", "setgroupowner", "setgusts", "sethidebehind", "sethit", "sethitindex", "sethitpointdamage", "setidentity", "setimportance", "setleader", "setlightambient", "setlightattenuation", "setlightbrightness", "setlightcolor", "setlightdaylight", "setlightflaremaxdistance", "setlightflaresize", "setlightintensity", "setlightnings", "setlightuseflare", "setmagazineturretammo", "setmarkeralpha", "setmarkeralphalocal", "setmarkerbrush", "setmarkerbrushlocal", "setmarkercolor", "setmarkercolorlocal", "setmarkerdir", "setmarkerdirlocal", "setmarkerpos", "setmarkerposlocal", "setmarkershape", "setmarkershapelocal", "setmarkersize", "setmarkersizelocal", "setmarkertext", "setmarkertextlocal", "setmarkertype", "setmarkertypelocal", "setmass", "setmimic", "setmissiletarget", "setmissiletargetpos", "setmusiceffect", "setname", "setname", "setname", "setnamesound", "setobjectarguments", "setobjectmaterial", "setobjectmaterialglobal", "setobjectproxy", "setobjecttexture", "setobjecttextureglobal", "setovercast", "setowner", "setoxygenremaining", "setparticlecircle", "setparticleclass", "setparticlefire", "setparticleparams", "setparticlerandom", "setpilotcameradirection", "setpilotcamerarotation", "setpilotcameratarget", "setpilotlight", "setpipeffect", "setpitch", "setplatenumber", "setpos", "setposasl", "setposasl2", "setposaslw", "setposatl", "setposition", "setposworld", "setpylonloadout", "setpylonspriority", "setradiomsg", "setrain", "setrainbow", "setrandomlip", "setrank", "setrectangular", "setrepaircargo", "setrotorbrakertd", "setshotparents", "setside", "setsimpletaskalwaysvisible", "setsimpletaskcustomdata", "setsimpletaskdescription", "setsimpletaskdestination", "setsimpletasktarget", "setsimpletasktype", "setsize", "setskill", "setskill", "setslingload", "setsoundeffect", "setspeaker", "setspeech", "setspeedmode", "setstamina", "setsuppression", "settargetage", "settaskmarkeroffset", "settaskresult", "settaskstate", "settext", "settitleeffect", "settriggeractivation", "settriggerarea", "settriggerstatements", "settriggertext", "settriggertimeout", "settriggertype", "settype", "setunconscious", "setunitability", "setunitloadout", "setunitloadout", "setunitloadout", "setunitpos", "setunitposweak", "setunitrank", "setunitrecoilcoefficient", "setunittrait", "setunloadincombat", "setuseractiontext", "setusermfdtext", "setusermfdvalue", "setvariable", "setvariable", "setvariable", "setvariable", "setvariable", "setvariable", "setvariable", "setvariable", "setvectordir", "setvectordirandup", "setvectorup", "setvehicleammo", "setvehicleammodef", "setvehiclearmor", "setvehiclecargo", "setvehicleid", "setvehiclelock", "setvehicleposition", "setvehicleradar", "setvehiclereceiveremotetargets", "setvehiclereportownposition", "setvehiclereportremotetargets", "setvehicletipars", "setvehiclevarname", "setvelocity", "setvelocitymodelspace", "setvelocitytransformation", "setvisibleiftreecollapsed", "setwantedrpmrtd", "setwaves", "setwaypointbehaviour", "setwaypointcombatmode", "setwaypointcompletionradius", "setwaypointdescription", "setwaypointforcebehaviour", "setwaypointformation", "setwaypointhouseposition", "setwaypointloiterradius", "setwaypointloitertype", "setwaypointname", "setwaypointposition", "setwaypointscript", "setwaypointspeed", "setwaypointstatements", "setwaypointtimeout", "setwaypointtype", "setwaypointvisible", "setweaponreloadingtime", "setwinddir", "setwindforce", "setwindstr", "setwingforcescalertd", "setwppos", "show3dicons", "showlegend", "showneweditorobject", "showwaypoint", "sidechat", "sideradio", "skill", "skillfinal", "slidersetposition", "slidersetrange", "slidersetspeed", "sort", "spawn", "splitstring", "step", "stop", "suppressfor", "swimindepth", "switchaction", "switchcamera", "switchgesture", "switchlight", "switchmove", "synchronizeobjectsadd", "synchronizeobjectsremove", "synchronizetrigger", "synchronizewaypoint", "synchronizewaypoint", "targetknowledge", "targets", "targetsaggregate", "targetsquery", "then", "then", "throw", "to", "tofixed", "triggerattachobject", "triggerattachvehicle", "triggerdynamicsimulation", "try", "turretlocal", "turretowner", "turretunit", "tvadd", "tvcollapse", "tvcount", "tvdata", "tvdelete", "tvexpand", "tvpicture", "tvpictureright", "tvsetcolor", "tvsetcursel", "tvsetdata", "tvsetpicture", "tvsetpicturecolor", "tvsetpicturecolordisabled", "tvsetpicturecolorselected", "tvsetpictureright", "tvsetpicturerightcolor", "tvsetpicturerightcolordisabled", "tvsetpicturerightcolorselected", "tvsetselectcolor", "tvsettext", "tvsettooltip", "tvsetvalue", "tvsort", "tvsortbyvalue", "tvtext", "tvtooltip", "tvvalue", "unassignitem", "unitsbelowheight", "unitsbelowheight", "unlinkitem", "unregistertask", "updatedrawicon", "updatemenuitem", "useaudiotimeformoves", "vectoradd", "vectorcos", "vectorcrossproduct", "vectordiff", "vectordistance", "vectordistancesqr", "vectordotproduct", "vectorfromto", "vectormodeltoworld", "vectormodeltoworldvisual", "vectormultiply", "vectorworldtomodel", "vectorworldtomodelvisual", "vehiclechat", "vehicleradio", "waypointattachobject", "waypointattachvehicle", "weaponaccessories", "weaponaccessoriescargo", "weapondirection", "weaponsturret", "worldtomodel", "worldtomodelvisual", "acctime", "activatedaddons", "agents", "airdensitycurvertd", "all3denentities", "allairports", "allcurators", "allcutlayers", "alldead", "alldeadmen", "alldisplays", "allgroups", "allmapmarkers", "allmines", "allplayers", "allsites", "allunits", "allunitsuav", "armorypoints", "benchmark", "blufor", "briefingname", "buldozer_isenabledroaddiag", "buldozer_reloadopermap", "cadetmode", "cameraon", "cameraview", "campaignconfigfile", "cansuspend", "cheatsenabled", "civilian", "clearforcesrtd", "clearitempool", "clearmagazinepool", "clearradio", "clearweaponpool", "clientowner", "commandingmenu", "configfile", "confignull", "controlnull", "copyfromclipboard", "curatorcamera", "curatormouseover", "curatorselected", "current3denoperation", "currentchannel", "currentnamespace", "cursorobject", "cursortarget", "customwaypointposition", "date", "daytime", "diag_activemissionfsms", "diag_activescripts", "diag_activesqfscripts", "diag_activesqsscripts", "diag_deltatime", "diag_fps", "diag_fpsmin", "diag_frameno", "diag_ticktime", "dialog", "didjip", "difficulty", "difficultyenabledrtd", "disabledebriefingstats", "disableserialization", "displaynull", "distributionregion", "dynamicsimulationsystemenabled", "east", "enableenddialog", "endl", "endloadingscreen", "environmentenabled", "estimatedendservertime", "exit", "false", "finishmissioninit", "fog", "fogforecast", "fogparams", "forcedmap", "forceend", "forceweatherchange", "freelook", "get3dencamera", "get3deniconsvisible", "get3denlinesvisible", "get3denmouseover", "getartillerycomputersettings", "getaudiooptionvolumes", "getcalculateplayervisibilitybyfriendly", "getclientstate", "getclientstatenumber", "getcursorobjectparams", "getdlcassetsusage", "getelevationoffset", "getmissiondlcs", "getmissionlayers", "getmouseposition", "getmusicplayedtime", "getobjectviewdistance", "getremotesensorsdisabled", "getresolution", "getshadowdistance", "getsubtitleoptions", "getterraingrid", "gettotaldlcusagetime", "groupiconselectable", "groupiconsvisible", "grpnull", "gusts", "halt", "hasinterface", "hcshownbar", "hudmovementlevels", "humidity", "independent", "initambientlife", "is3den", "is3denmultiplayer", "isactionmenuvisible", "isautotest", "isdedicated", "isfilepatchingenabled", "isgamefocused", "isgamepaused", "isinstructorfigureenabled", "ismultiplayer", "ismultiplayersolo", "ispipenabled", "isremoteexecuted", "isremoteexecutedjip", "isserver", "issteammission", "isstreamfriendlyuienabled", "isstressdamageenabled", "istuthintsenabled", "isuicontext", "language", "librarycredits", "librarydisclaimers", "lightnings", "linebreak", "loadgame", "locationnull", "logentities", "mapanimclear", "mapanimcommit", "mapanimdone", "markasfinishedonsteam", "missionconfigfile", "missiondifficulty", "missionname", "missionnamespace", "missionstart", "missionversion", "moonintensity", "musicvolume", "netobjnull", "nextweatherchange", "nil", "objnull", "opencuratorinterface", "opfor", "overcast", "overcastforecast", "parsingnamespace", "particlesquality", "pi", "pixelgrid", "pixelgridbase", "pixelgridnouiscale", "pixelh", "pixelw", "playableunits", "player", "playerrespawntime", "playerside", "productversion", "profilename", "profilenamespace", "profilenamesteam", "radiovolume", "rain", "rainbow", "remoteexecutedowner", "resetcamshake", "resistance", "reversedmousey", "runinitscript", "safezoneh", "safezonew", "safezonewabs", "safezonex", "safezonexabs", "safezoney", "savegame", "savejoysticks", "saveprofilenamespace", "savingenabled", "scriptnull", "selectnoplayer", "servername", "servertime", "shownartillerycomputer", "shownchat", "showncompass", "showncuratorcompass", "showngps", "shownhud", "shownmap", "shownpad", "shownradio", "shownscoretable", "shownuavfeed", "shownwarrant", "shownwatch", "sideambientlife", "sideempty", "sideenemy", "sidefriendly", "sidelogic", "sideunknown", "simulweathersync", "slingloadassistantshown", "soundvolume", "sunormoon", "switchableunits", "systemofunits", "tasknull", "teammembernull", "teams", "teamswitch", "teamswitchenabled", "time", "timemultiplier", "true", "uinamespace", "userinputdisabled", "vehicles", "viewdistance", "visiblecompass", "visiblegps", "visiblemap", "visiblescoretable", "visiblewatch", "waves", "west", "wind", "winddir", "windrtd", "windstr", "worldname", "worldsize"] end end end endrouge-3.28.0/lib/rouge/lexers/sql.rb000066400000000000000000000172251417417255300172620ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class SQL < RegexLexer title "SQL" desc "Structured Query Language, for relational databases" tag 'sql' filenames '*.sql' mimetypes 'text/x-sql' def self.keywords @keywords ||= Set.new %w( ABORT ABS ABSOLUTE ACCESS ADA ADD ADMIN AFTER AGGREGATE ALIAS ALL ALLOCATE ALTER ANALYSE ANALYZE AND ANY ARE AS ASC ASENSITIVE ASSERTION ASSIGNMENT ASYMMETRIC AT ATOMIC AUTHORIZATION AVG BACKWARD BEFORE BEGIN BETWEEN BITVAR BIT_LENGTH BOTH BREADTH BY C CACHE CALL CALLED CARDINALITY CASCADE CASCADED CASE CAST CATALOG CATALOG_NAME CHAIN CHARACTERISTICS CHARACTER_LENGTH CHARACTER_SET_CATALOG CHARACTER_SET_NAME CHARACTER_SET_SCHEMA CHAR_LENGTH CHECK CHECKED CHECKPOINT CLASS CLASS_ORIGIN CLOB CLOSE CLUSTER COALSECE COBOL COLLATE COLLATION COLLATION_CATALOG COLLATION_NAME COLLATION_SCHEMA COLUMN COLUMN_NAME COMMAND_FUNCTION COMMAND_FUNCTION_CODE COMMENT COMMIT COMMITTED COMPLETION CONDITION_NUMBER CONNECT CONNECTION CONNECTION_NAME CONSTRAINT CONSTRAINTS CONSTRAINT_CATALOG CONSTRAINT_NAME CONSTRAINT_SCHEMA CONSTRUCTOR CONTAINS CONTINUE CONVERSION CONVERT COPY CORRESPONTING COUNT CREATE CREATEDB CREATEUSER CROSS CUBE CURRENT CURRENT_DATE CURRENT_PATH CURRENT_ROLE CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURSOR CURSOR_NAME CYCLE DATA DATABASE DATETIME_INTERVAL_CODE DATETIME_INTERVAL_PRECISION DAY DEALLOCATE DECLARE DEFAULT DEFAULTS DEFERRABLE DEFERRED DEFINED DEFINER DELETE DELIMITER DELIMITERS DEREF DESC DESCRIBE DESCRIPTOR DESTROY DESTRUCTOR DETERMINISTIC DIAGNOSTICS DICTIONARY DISCONNECT DISPATCH DISTINCT DO DOMAIN DROP DYNAMIC DYNAMIC_FUNCTION DYNAMIC_FUNCTION_CODE EACH ELSE ENCODING ENCRYPTED END END-EXEC EQUALS ESCAPE EVERY EXCEPT ESCEPTION EXCLUDING EXCLUSIVE EXEC EXECUTE EXISTING EXISTS EXPLAIN EXTERNAL EXTRACT FALSE FETCH FINAL FIRST FOLLOWING FOR FORCE FOREIGN FORTRAN FORWARD FOUND FREE FREEZE FROM FULL FUNCTION G GENERAL GENERATED GET GLOBAL GO GOTO GRANT GRANTED GROUP GROUPING HANDLER HAVING HIERARCHY HOLD HOST IDENTITY IGNORE ILIKE IMMEDIATE IMMUTABLE IMPLEMENTATION IMPLICIT IN INCLUDING INCREMENT INDEX INDITCATOR INFIX INHERITS INITIALIZE INITIALLY INNER INOUT INPUT INSENSITIVE INSERT INSTANTIABLE INSTEAD INTERSECT INTO INVOKER IS ISNULL ISOLATION ITERATE JOIN KEY KEY_MEMBER KEY_TYPE LANCOMPILER LANGUAGE LARGE LAST LATERAL LEADING LEFT LENGTH LESS LEVEL LIKE LIMIT LISTEN LOAD LOCAL LOCALTIME LOCALTIMESTAMP LOCATION LOCATOR LOCK LOWER MAP MATCH MAX MAXVALUE MESSAGE_LENGTH MESSAGE_OCTET_LENGTH MESSAGE_TEXT METHOD MIN MINUTE MINVALUE MOD MODE MODIFIES MODIFY MONTH MORE MOVE MUMPS NAMES NATURAL NCLOB NEW NEXT NO NOCREATEDB NOCREATEUSER NONE NOT NOTHING NOTIFY NOTNULL NULL NULLABLE NULLIF OBJECT OCTET_LENGTH OF OFF OFFSET OIDS OLD ON ONLY OPEN OPERATION OPERATOR OPTION OPTIONS OR ORDER ORDINALITY OUT OUTER OUTPUT OVERLAPS OVERLAY OVERRIDING OWNER PAD PARAMETER PARAMETERS PARAMETER_MODE PARAMATER_NAME PARAMATER_ORDINAL_POSITION PARAMETER_SPECIFIC_CATALOG PARAMETER_SPECIFIC_NAME PARAMATER_SPECIFIC_SCHEMA PARTIAL PARTITION PASCAL PENDANT PLACING PLI POSITION POSTFIX PREFIX PRECEDING PREORDER PREPARE PRESERVE PRIMARY PRIOR PRIVILEGES PROCEDURAL PROCEDURE PUBLIC RANGE READ READS RECHECK RECURSIVE REF REFERENCES REFERENCING REINDEX RELATIVE RENAME REPEATABLE REPLACE RESET RESTART RESTRICT RESULT RETURN RETURNED_LENGTH RETURNED_OCTET_LENGTH RETURNED_SQLSTATE RETURNS REVOKE RIGHT ROLE ROLLBACK ROLLUP ROUTINE ROUTINE_CATALOG ROUTINE_NAME ROUTINE_SCHEMA ROW ROWS ROW_COUNT RULE SAVE_POINT SCALE SCHEMA SCHEMA_NAME SCOPE SCROLL SEARCH SECOND SECURITY SELECT SELF SENSITIVE SERIALIZABLE SERVER_NAME SESSION SESSION_USER SET SETOF SETS SHARE SHOW SIMILAR SIMPLE SIZE SOME SOURCE SPACE SPECIFIC SPECIFICTYPE SPECIFIC_NAME SQL SQLCODE SQLERROR SQLEXCEPTION SQLSTATE SQLWARNINIG STABLE START STATE STATEMENT STATIC STATISTICS STDIN STDOUT STORAGE STRICT STRUCTURE STYPE SUBCLASS_ORIGIN SUBLIST SUBSTRING SUM SYMMETRIC SYSID SYSTEM SYSTEM_USER TABLE TABLE_NAME TEMP TEMPLATE TEMPORARY TERMINATE THAN THEN TIMEZONE_HOUR TIMEZONE_MINUTE TO TOAST TRAILING TRANSATION TRANSACTIONS_COMMITTED TRANSACTIONS_ROLLED_BACK TRANSATION_ACTIVE TRANSFORM TRANSFORMS TRANSLATE TRANSLATION TREAT TRIGGER TRIGGER_CATALOG TRIGGER_NAME TRIGGER_SCHEMA TRIM TRUE TRUNCATE TRUSTED TYPE UNCOMMITTED UNDER UNENCRYPTED UNION UNIQUE UNKNOWN UNLISTEN UNNAMED UNNEST UNTIL UPDATE UPPER USAGE USER USER_DEFINED_TYPE_CATALOG USER_DEFINED_TYPE_NAME USER_DEFINED_TYPE_SCHEMA USING VACUUM VALID VALIDATOR VALUES VARIABLE VERBOSE VERSION VIEW VOLATILE WHEN WHENEVER WHERE WINDOW WITH WITHOUT WORK WRITE ZONE ) end def self.keywords_type # sources: # https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html # https://dev.mysql.com/doc/refman/5.7/en/date-and-time-type-overview.html # https://dev.mysql.com/doc/refman/5.7/en/string-type-overview.html @keywords_type ||= Set.new(%w( ZEROFILL UNSIGNED SIGNED SERIAL BIT TINYINT BOOL BOOLEAN SMALLINT MEDIUMINT INT INTEGER BIGINT DECIMAL DEC NUMERIC FIXED FLOAT DOUBLE PRECISION REAL DATE DATETIME TIMESTAMP TIME YEAR NATIONAL CHAR CHARACTER NCHAR BYTE VARCHAR VARYING BINARY VARBINARY TINYBLOB TINYTEXT BLOB TEXT MEDIUMBLOB MEDIUMTEXT LONGBLOB LONGTEXT ENUM )) end state :root do rule %r/\s+/m, Text rule %r/--.*/, Comment::Single rule %r(/\*), Comment::Multiline, :multiline_comments rule %r/\d+/, Num::Integer rule %r/'/, Str::Single, :single_string # A double-quoted string refers to a database object in our default SQL # dialect, which is apropriate for e.g. MS SQL and PostgreSQL. rule %r/"/, Name::Variable, :double_string rule %r/`/, Name::Variable, :backtick rule %r/\w[\w\d]*/ do |m| if self.class.keywords_type.include? m[0].upcase token Name::Builtin elsif self.class.keywords.include? m[0].upcase token Keyword else token Name end end rule %r([+*/<>=~!@#%&|?^-]), Operator rule %r/[;:()\[\]\{\},.]/, Punctuation end state :multiline_comments do rule %r(/[*]), Comment::Multiline, :multiline_comments rule %r([*]/), Comment::Multiline, :pop! rule %r([^/*]+), Comment::Multiline rule %r([/*]), Comment::Multiline end state :backtick do rule %r/\\./, Str::Escape rule %r/``/, Str::Escape rule %r/`/, Name::Variable, :pop! rule %r/[^\\`]+/, Name::Variable end state :single_string do rule %r/\\./, Str::Escape rule %r/''/, Str::Escape rule %r/'/, Str::Single, :pop! rule %r/[^\\']+/, Str::Single end state :double_string do rule %r/\\./, Str::Escape rule %r/""/, Str::Escape rule %r/"/, Name::Variable, :pop! rule %r/[^\\"]+/, Name::Variable end end end end rouge-3.28.0/lib/rouge/lexers/ssh.rb000066400000000000000000000012611417417255300172510ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class SSH < RegexLexer tag 'ssh' title "SSH Config File" desc 'A lexer for SSH configuration files' filenames 'ssh_config' state :root do rule %r/[a-z0-9]+/i, Keyword, :statement mixin :base end state :statement do rule %r/\n/, Text, :pop! rule %r/(?:yes|no|confirm|ask|always|auto|none|force)\b/, Name::Constant rule %r/\d+/, Num rule %r/[^#\s;{}$\\]+/, Text mixin :base end state :base do rule %r/\s+/, Text rule %r/#.*/, Comment::Single end end end end rouge-3.28.0/lib/rouge/lexers/stan.rb000066400000000000000000000345551417417255300174350ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Stan < RegexLexer title "Stan" desc 'Stan Modeling Language (mc-stan.org)' tag 'stan' filenames '*.stan', '*.stanfunctions' # optional comment or whitespace WS = %r((?:\s|//.*?\n|/[*].*?[*]/)+) ID = /[a-zA-Z_][a-zA-Z0-9_]*/ RT = /(?:(?:[a-z_]\s*(?:\[[0-9, ]\])?)\s+)*/ OP = Regexp.new([ # Assigment operators "=", # Comparison operators "<", "<=", ">", ">=", "==", "!=", # Boolean operators "!", "&&", "\\|\\|", # Real-valued arithmetic operators "\\+", "-", "\\*", "/", "\\^", # Transposition operator "'", # Elementwise functions "\\.\\+", "\\.-", "\\.\\*", "\\./", "\\.\\^", # Matrix division operators "\\\\", # Compound assigment operators "\\+=", "-=", "\\*=", "/=", "\\.\\*=", "\\./=", # Sampling "~", # Conditional operator "\\?", ":" ].join("|")) def self.keywords @keywords ||= Set.new %w( if else while for break continue print reject return ) end def self.types @types ||= Set.new %w( int real vector ordered positive_ordered simplex unit_vector row_vector matrix cholesky_factor_corr cholesky_factor_cov corr_matrix cov_matrix data void complex array ) end def self.reserved @reserved ||= Set.new [ # Reserved words from Stan language "for", "in", "while", "repeat", "until", "if", "then", "else", "true", "false", "target", "functions", "model", "data", "parameters", "quantities", "transformed", "generated", # Reserved names from Stan implementation "var", "fvar", "STAN_MAJOR", "STAN_MINOR", "STAN_PATCH", "STAN_MATH_MAJOR", "STAN_MATH_MINOR", "STAN_MATH_PATCH", # Reserved names from C++ "alignas", "alignof", "and", "and_eq", "asm", "auto", "bitand", "bitor", "bool", "break", "case", "catch", "char", "char16_t", "char32_t", "class", "compl", "const", "constexpr", "const_cast", "continue", "decltype", "default", "delete", "do", "double", "dynamic_cast", "else", "enum", "explicit", "export", "extern", "false", "float", "for", "friend", "goto", "if", "inline", "int", "long", "mutable", "namespace", "new", "noexcept", "not", "not_eq", "nullptr", "operator", "or", "or_eq", "private", "protected", "public", "register", "reinterpret_cast", "return", "short", "signed", "sizeof", "static", "static_assert", "static_cast", "struct", "switch", "template", "this", "thread_local", "throw", "true", "try", "typedef", "typeid", "typename", "union", "unsigned", "using", "virtual", "void", "volatile", "wchar_t", "while", "xor", "xor_eq" ] end def self.builtin_functions @builtin_functions ||= Set.new [ # Integer-Valued Basic Functions ## Absolute functions "abs", "int_step", ## Bound functions "min", "max", ## Size functions "size", # Real-Valued Basic Functions ## Log probability function "target", "get_lp", ## Logical functions "step", "is_inf", "is_nan", ## Step-like functions "fabs", "fdim", "fmin", "fmax", "fmod", "floor", "ceil", "round", "trunc", ## Power and logarithm functions "sqrt", "cbrt", "square", "exp", "exp2", "log", "log2", "log10", "pow", "inv", "inv_sqrt", "inv_square", ## Trigonometric functions "hypot", "cos", "sin", "tan", "acos", "asin", "atan", "atan2", ## Hyperbolic trigonometric functions "cosh", "sinh", "tanh", "acosh", "asinh", "atanh", ## Link functions "logit", "inv_logit", "inv_cloglog", ## Probability-related functions "erf", "erfc", "Phi", "inv_Phi", "Phi_approx", "binary_log_loss", "owens_t", ## Combinatorial functions "beta", "inc_beta", "lbeta", "tgamma", "lgamma", "digamma", "trigamma", "lmgamma", "gamma_p", "gamma_q", "binomial_coefficient_log", "choose", "bessel_first_kind", "bessel_second_kind", "modified_bessel_first_kind", "log_modified_bessel_first_kind", "modified_bessel_second_kind", "falling_factorial", "lchoose", "log_falling_factorial", "rising_factorial", "log_rising_factorial", ## Composed functions "expm1", "fma", "multiply_log", "ldexp", "lmultiply", "log1p", "log1m", "log1p_exp", "log1m_exp", "log_diff_exp", "log_mix", "log_sum_exp", "log_inv_logit", "log_inv_logit_diff", "log1m_inv_logit", ## Special functions "lambert_w0", "lambert_wm1", # Complex-Valued Basic Functions ## Complex constructors and accessors "to_complex", "get_real", "get_imag", ## Complex special functions "arg", "norm", "conj", "proj", "polar", # Array Operations ## Reductions "sum", "prod", "log_sum_exp", "mean", "variance", "sd", "distance", "squared_distance", "quantile", ## Array size and dimension function "dims", "num_elements", ## Array broadcasting "rep_array", ## Array concatenation "append_array", ## Sorting functions "sort_asc", "sort_desc", "sort_indices_asc", "sort_indices_desc", "rank", ## Reversing functions "reverse", # Matrix Operations ## Integer-valued matrix size functions "num_elements", "rows", "cols", ## Dot products and specialized products "dot_product", "columns_dot_product", "rows_dot_product", "dot_self", "columns_dot_self", "rows_dot_self", "tcrossprod", "crossprod", "quad_form", "quad_form_diag", "quad_form_sym", "trace_quad_form", "trace_gen_quad_form", "multiply_lower_tri_self_transpose", "diag_pre_multiply", "diag_post_multiply", ## Broadcast functions "rep_vector", "rep_row_vector", "rep_matrix", "symmetrize_from_lower_tri", ## Diagonal matrix functions "add_diag", "diagonal", "diag_matrix", "identity_matrix", ## Container construction functions "linspaced_array", "linspaced_int_array", "linspaced_vector", "linspaced_row_vector", "one_hot_int_array", "one_hot_array", "one_hot_vector", "one_hot_row_vector", "ones_int_array", "ones_array", "ones_vector", "ones_row_vector", "zeros_int_array", "zeros_array", "zeros_vector", "zeros_row_vector", "uniform_simplex", ## Slicing and blocking functions "col", "row", "block", "sub_col", "sub_row", "head", "tail", "segment", ## Matrix concatenation "append_col", "append_row", ## Special matrix functions "softmax", "log_softmax", "cumulative_sum", ## Covariance functions "cov_exp_quad", ## Linear algebra functions and solvers "mdivide_left_tri_low", "mdivide_right_tri_low", "mdivide_left_spd", "mdivide_right_spd", "matrix_exp", "matrix_exp_multiply", "scale_matrix_exp_multiply", "matrix_power", "trace", "determinant", "log_determinant", "inverse", "inverse_spd", "chol2inv", "generalized_inverse", "eigenvalues_sym", "eigenvectors_sym", "qr_thin_Q", "qr_thin_R", "qr_Q", "qr_R", "cholseky_decompose", "singular_values", "svd_U", "svd_V", # Sparse Matrix Operations ## Conversion functions "csr_extract_w", "csr_extract_v", "csr_extract_u", "csr_to_dense_matrix", ## Sparse matrix arithmetic "csr_matrix_times_vector", # Mixed Operations "to_matrix", "to_vector", "to_row_vector", "to_array_2d", "to_array_1d", # Higher-Order Functions ## Algebraic equation solver "algebra_solver", "algebra_solver_newton", ## Ordinary differential equation "ode_rk45", "ode_rk45_tol", "ode_ckrk", "ode_ckrk_tol", "ode_adams", "ode_adams_tol", "ode_bdf", "ode_bdf_tol", "ode_adjoint_tol_ctl", ## 1D integrator "integrate_1d", ## Reduce-sum function "reduce_sum", "reduce_sum_static", ## Map-rect function "map_rect", # Deprecated Functions "integrate_ode_rk45", "integrate_ode", "integrate_ode_adams", "integrate_ode_bdf", # Hidden Markov Models "hmm_marginal", "hmm_latent_rng", "hmm_hidden_state_prob" ] end def self.distributions @distributions ||= Set.new( [ # Discrete Distributions ## Binary Distributions "bernoulli", "bernoulli_logit", "bernoulli_logit_glm", ## Bounded Discrete Distributions "binomial", "binomial_logit", "beta_binomial", "hypergeometric", "categorical", "categorical_logit_glm", "discrete_range", "ordered_logistic", "ordered_logistic_glm", "ordered_probit", ## Unbounded Discrete Distributions "neg_binomial", "neg_binomial_2", "neg_binomial_2_log", "neg_binomial_2_log_glm", "poisson", "poisson_log", "poisson_log_glm", ## Multivariate Discrete Distributions "multinomial", "multinomial_logit", # Continuous Distributions ## Unbounded Continuous Distributions "normal", "std_normal", "normal_id_glm", "exp_mod_normal", "skew_normal", "student_t", "cauchy", "double_exponential", "logistic", "gumbel", "skew_double_exponential", ## Positive Continuous Distributions "lognormal", "chi_square", "inv_chi_square", "scaled_inv_chi_square", "exponential", "gamma", "inv_gamma", "weibull", "frechet", "rayleigh", ## Positive Lower-Bounded Distributions "pareto", "pareto_type_2", "wiener", ## Continuous Distributions on [0, 1] "beta", "beta_proportion", ## Circular Distributions "von_mises", ## Bounded Continuous Distributions "uniform", ## Distributions over Unbounded Vectors "multi_normal", "multi_normal_prec", "multi_normal_cholesky", "multi_gp", "multi_gp_cholesky", "multi_student_t", "gaussian_dlm_obs", ## Simplex Distributions "dirichlet", ## Correlation Matrix Distributions "lkj_corr", "lkj_corr_cholesky", ## Covariance Matrix Distributions "wishart", "inv_wishart" ].product([ "", "_lpmf", "_lupmf", "_lpdf", "_lcdf", "_lccdf", "_rng", "_log", "_cdf_log", "_ccdf_log" ]).map {|s| "#{s[0]}#{s[1]}"} ) end def self.constants @constants ||= Set.new [ # Mathematical constants "pi", "e", "sqrt2", "log2", "log10", # Special values "not_a_number", "positive_infinity", "negative_infinity", "machine_precision" ] end state :root do mixin :whitespace rule %r/#include/, Comment::Preproc, :include rule %r/#.*$/, Generic::Deleted rule %r( functions |(?:transformed\s+)?data |(?:transformed\s+)?parameters |model |generated\s+quantities )x, Name::Namespace rule %r(\{), Punctuation, :bracket_scope mixin :scope end state :include do rule %r((\s+)(\S+)(\s*)) do |m| token Text, m[1] token Comment::PreprocFile, m[2] token Text, m[3] pop! end end state :whitespace do rule %r(\n+)m, Text rule %r(//(\\.|.)*?$), Comment::Single mixin :inline_whitespace end state :inline_whitespace do rule %r([ \t\r]+), Text rule %r(/(\\\n)?[*].*?[*](\\\n)?/)m, Comment::Multiline end state :statements do mixin :whitespace rule %r/#include/, Comment::Preproc, :include rule %r/#.*$/, Generic::Deleted rule %r("), Str, :string rule %r( ( ((\d+[.]\d*|[.]?\d+)e[+-]?\d+|\d*[.]\d+|\d+) (#{WS})[+-](#{WS}) ((\d+[.]\d*|[.]?\d+)e[+-]?\d+|\d*[.]\d+|\d+)i ) |((\d+[.]\d*|[.]?\d+)e[+-]?\d+|\d*[.]\d+|\d+)i |((\d+[.]\d*|[.]?\d+)e[+-]?\d+|\d*[.]\d+) )mx, Num::Float rule %r/\d+/, Num::Integer rule %r(\*/), Error rule OP, Operator rule %r([\[\],.;]), Punctuation rule %r([|](?![|])), Punctuation rule %r(T\b), Keyword::Reserved rule %r((lower|upper)\b), Name::Attribute rule ID do |m| name = m[0] if self.class.keywords.include? name token Keyword elsif self.class.types.include? name token Keyword::Type elsif self.class.reserved.include? name token Keyword::Reserved else token Name::Variable end end end state :scope do mixin :whitespace rule %r( (#{RT}) # Return type (#{ID}) # Function name (?=\([^;]*?\)) # Signature or arguments )mx do |m| recurse m[1] name = m[2] if self.class.builtin_functions.include? name token Name::Builtin, name elsif self.class.distributions.include? name token Name::Builtin, name elsif self.class.constants.include? name token Keyword::Constant else token Name::Function, name end end rule %r(\{), Punctuation, :bracket_scope rule %r(\(), Punctuation, :parens_scope mixin :statements end state :bracket_scope do mixin :scope rule %r(\}), Punctuation, :pop! end state :parens_scope do mixin :scope rule %r(\)), Punctuation, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/stata.rb000066400000000000000000000227221417417255300175750ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Stata < RegexLexer title "Stata" desc "The Stata programming language (www.stata.com)" tag 'stata' filenames '*.do', '*.ado' mimetypes 'application/x-stata', 'text/x-stata' ### # Stata reference manual is available online at: https://www.stata.com/features/documentation/ ### # Partial list of common programming and estimation commands, as of Stata 16 # Note: not all abbreviations are included KEYWORDS = %w( do run include clear assert set mata log by bys bysort cap capt capture char class classutil which cdir confirm new existence creturn _datasignature discard di dis disp displ displa display ereturn error _estimates exit file open read write seek close query findfile fvexpand gettoken java home heapmax java_heapmax icd9 icd9p icd10 icd10cm icd10pcs initialize javacall levelsof tempvar tempname tempfile macro shift uniq dups retokenize clean sizeof posof makecns matcproc marksample mark markout markin svymarkout matlist accum define dissimilarity eigenvalues get rowjoinbyname rownames score svd symeigen dir list ren rename more pause plugin call postfile _predict preserve restore program define drop end python qui quietly noi noisily _return return _rmcoll rmsg _robust serset locale_functions locale_ui signestimationsample checkestimationsample sleep syntax sysdir adopath adosize tabdisp timer tokenize trace unab unabcmd varabbrev version viewsource window fopen fsave manage menu push stopbox net from cd link search install sj stb ado update uninstall pwd ssc ls using insheet outsheet mkmat svmat sum summ summarize graph gr_edit twoway histogram kdensity spikeplot mi miss missing var varname order compress append gen gene gener genera generat generate egen replace duplicates estimates nlcom lincom test testnl predict suest _regress reg regr regre regres regress probit logit ivregress logistic svy gmm ivprobit ivtobit bsample assert codebook collapse compare contract copy count cross datasignature d ds desc describe destring tostring drawnorm edit encode decode erase expand export filefilter fillin format frame frget frlink gsort import dbase delimited excel fred haver sas sasxport5 sasxport8 spss infile infix input insobs inspect ipolate isid joinby label language labelbook lookfor memory mem merge mkdir mvencode notes obs odbc order outfile pctile xtile _pctile putmata range recast recode rename group reshape rm rmdir sample save saveold separate shell snapshot sort split splitsample stack statsby sysuse type unicode use varmanage vl webuse xpose zipfile number keep tab table tabulate stset stcox tsset xtset ) # Complete list of functions by name, as of Stata 16 PRIMITIVE_FUNCTIONS = %w( abbrev abs acos acosh age age_frac asin asinh atan atan2 atanh autocode betaden binomial binomialp binomialtail binormal birthday bofd byteorder c _caller cauchy cauchyden cauchytail Cdhms ceil char chi2 chi2den chi2tail Chms chop cholesky clip Clock clock clockdiff cloglog Cmdyhms Cofc cofC Cofd cofd coleqnumb collatorlocale collatorversion colnfreeparms colnumb colsof comb cond corr cos cosh daily date datediff datediff_frac day det dgammapda dgammapdada dgammapdadx dgammapdxdx dhms diag diag0cnt digamma dofb dofC dofc dofh dofm dofq dofw dofy dow doy dunnettprob e el epsdouble epsfloat exp expm1 exponential exponentialden exponentialtail F Fden fileexists fileread filereaderror filewrite float floor fmtwidth frval _frval Ftail fammaden gammap gammaptail get hadamard halfyear halfyearly has_eprop hh hhC hms hofd hours hypergeometric hypergeometricp I ibeta ibetatail igaussian igaussianden igaussiantail indexnot inlist inrange int inv invbinomial invbinomialtail invcauchy invcauchytail invchi2 invchi2tail invcloglog invdunnettprob invexponential invexponentialtail invF invFtail invgammap invgammaptail invibeta invibetatail invigaussian invigaussiantail invlaplace invlaplacetail invlogistic invlogistictail invlogit invnbinomial invnbinomialtail invnchi2 invnchi2tail invnF invnFtail invnibeta invnormal invnt invnttail invpoisson invpoissontail invsym invt invttail invtukeyprob invweibull invweibullph invweibullphtail invweibulltail irecode islepyear issymmetric J laplace laplaceden laplacetail ln ln1m ln1p lncauchyden lnfactorial lngamma lnigammaden lnigaussianden lniwishartden lnlaplaceden lnmvnormalden lnnormal lnnormalden lnnormalden lnnormalden lnwishartden log log10 log1m log1p logistic logisticden logistictail logit matmissing matrix matuniform max maxbyte maxdouble maxfloat maxint maxlong mdy mdyhms mi min minbyte mindouble minfloat minint minlong minutes missing mm mmC mod mofd month monthly mreldif msofhours msofminutes msofseconds nbetaden nbinomial nbinomialp nbinomialtail nchi2 nchi2den nchi2tail nextbirthday nextleapyear nF nFden nFtail nibeta normal normalden npnchi2 npnF npnt nt ntden nttail nullmat plural poisson poissonp poissontail previousbirthday previousleapyear qofd quarter quarterly r rbeta rbinomial rcauchy rchi2 recode real regexm regexr regexs reldif replay return rexponential rgamma rhypergeometric rigaussian rlaplace rlogistic rnormal round roweqnumb rownfreeparms rownumb rowsof rpoisson rt runiform runiformint rweibull rweibullph s scalar seconds sign sin sinh smallestdouble soundex soundex_nara sqrt ss ssC strcat strdup string stritrim strlen strlower strltrim strmatch strofreal strpos strproper strreverse strrpos strrtrim strtoname strtrim strupper subinstr subinword substr sum sweep t tan tanh tC tc td tden th tin tm tobytes tq trace trigamma trunc ttail tukeyprob tw twithin uchar udstrlen udsubstr uisdigit uisletter uniform ustrcompare ustrcompareex ustrfix ustrfrom ustrinvalidcnt ustrleft ustrlen ustrlower ustrltrim ustrnormalize ustrpos ustrregexm ustrregexra ustrregexrf ustrregexs ustrreverse ustrright ustrrpos ustrrtrim ustrsortkey ustrsortkeyex ustrtitle ustrto ustrtohex ustrtoname ustrtrim ustrunescape ustrupper ustrword ustrwordcount usubinstr usubstr vec vecdiag week weekly weibull weibullden weibullph weibullphden weibullphtail weibulltail wofd word wordbreaklocale wordcount year yearly yh ym yofd yq yw ) # Note: types `str1-str2045` handled separately below def self.type_keywords @type_keywords ||= Set.new %w(byte int long float double str strL numeric string integer scalar matrix local global numlist varlist newlist) end # Stata commands used with braces. Includes all valid abbreviations for 'forvalues'. def self.reserved_keywords @reserved_keywords ||= Set.new %w(if else foreach forv forva forval forvalu forvalue forvalues to while in of continue break nobreak) end ### # Lexer state and rules ### state :root do # Pre-processor commands: # rule %r/^\s*#.*$/, Comment::Preproc # Hashbang comments: *! rule %r/^\*!.*$/, Comment::Hashbang # Single-line comment: * rule %r/^\s*\*.*$/, Comment::Single # Keywords: recognize only when they are the first word rule %r/^\s*(#{KEYWORDS.join('|')})\b/, Keyword # Whitespace. Classify `\n` as `Text` to avoid interference with `Comment` and `Keyword` above rule(/[ \t]+/, Text::Whitespace) rule(/[\n\r]+/, Text) # In-line comment: // rule %r/\/\/.*?$/, Comment::Single # Multi-line comment: /* and */ rule %r(/(\\\n)?[*].*?[*](\\\n)?/)m, Comment::Multiline # Strings indicated by compound double-quotes (`""') and double-quotes ("") rule %r/`"(\\.|.)*?"'/, Str::Double rule %r/"(\\.|.)*?"/, Str::Double # Format locals (`') and globals ($) as strings rule %r/`(\\.|.)*?'/, Str::Double rule %r/(??*+'^/\\!#.=~:&|]), Operator end end end end rouge-3.28.0/lib/rouge/lexers/supercollider.rb000066400000000000000000000056341417417255300213400ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class SuperCollider < RegexLexer tag 'supercollider' filenames '*.sc', '*.scd' title "SuperCollider" desc 'A cross-platform interpreted programming language for sound synthesis, algorithmic composition, and realtime performance' def self.keywords @keywords ||= Set.new %w( var arg classvar const super this ) end # these aren't technically keywords, but we treat # them as such because it makes things clearer 99% # of the time def self.reserved @reserved ||= Set.new %w( case do for forBy loop if while new newCopyArgs ) end def self.constants @constants ||= Set.new %w( true false nil inf thisThread thisMethod thisFunction thisProcess thisFunctionDef currentEnvironment topEnvironment ) end state :whitespace do rule %r/\s+/m, Text end state :comments do rule %r(//.*?$), Comment::Single rule %r(/[*]) do token Comment::Multiline push :nested_comment end end state :nested_comment do rule %r(/[*]), Comment::Multiline, :nested_comment rule %r([*]/), Comment::Multiline, :pop! rule %r([^*/]+)m, Comment::Multiline rule %r/./, Comment::Multiline end state :root do mixin :whitespace mixin :comments rule %r/[\-+]?0[xX]\h+/, Num::Hex # radix float rule %r/[\-+]?\d+r[0-9a-zA-Z]*(\.[0-9A-Z]*)?/, Num::Float # normal float rule %r/[\-+]?((\d+(\.\d+)?([eE][\-+]?\d+)?(pi)?)|pi)/, Num::Float rule %r/[\-+]?\d+/, Num::Integer rule %r/\$(\\.|.)/, Str::Char rule %r/"([^\\"]|\\.)*"/, Str # symbols (single-quote notation) rule %r/'([^\\']|\\.)*'/, Str::Other # symbols (backslash notation) rule %r/\\\w+/, Str::Other # symbol arg rule %r/[A-Za-z_]\w*:/, Name::Label rule %r/[A-Z]\w*/, Name::Class # primitive rule %r/_\w+/, Name::Function # main identifiers section rule %r/[a-z]\w*/ do |m| if self.class.keywords.include? m[0] token Keyword elsif self.class.constants.include? m[0] token Keyword::Constant elsif self.class.reserved.include? m[0] token Keyword::Reserved else token Name end end # environment variables rule %r/~\w+/, Name::Variable::Global rule %r/[\{\}()\[\];,\.]/, Punctuation # operators. treat # (array unpack) as an operator rule %r/[\+\-\*\/&\|%<>=]+/, Operator rule %r/[\^:#]/, Operator # treat curry argument as a special operator rule %r/\b_\b/, Name::Builtin end end end end rouge-3.28.0/lib/rouge/lexers/swift.rb000066400000000000000000000131521417417255300176120ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Swift < RegexLexer tag 'swift' filenames '*.swift' title "Swift" desc 'Multi paradigm, compiled programming language developed by Apple for iOS and OS X development. (developer.apple.com/swift)' id_head = /_|(?!\p{Mc})\p{Alpha}|[^\u0000-\uFFFF]/ id_rest = /[\p{Alnum}_]|[^\u0000-\uFFFF]/ id = /#{id_head}#{id_rest}*/ keywords = Set.new %w( await break case continue default do else fallthrough if in for return switch where while try catch throw guard defer repeat as dynamicType is new super self Self Type __COLUMN__ __FILE__ __FUNCTION__ __LINE__ associativity async didSet get infix inout isolated mutating none nonmutating operator override postfix precedence prefix set unowned weak willSet throws rethrows precedencegroup #available #colorLiteral #column #else #elseif #endif #error #file #fileLiteral #function #if #imageLiteral #line #selector #sourceLocation #warning ) declarations = Set.new %w( actor class deinit enum convenience extension final func import init internal lazy let nonisolated optional private protocol public required static struct subscript typealias var dynamic indirect associatedtype open fileprivate some ) constants = Set.new %w( true false nil ) start { push :bol } # beginning of line state :bol do rule %r/#.*/, Comment::Preproc mixin :inline_whitespace rule(//) { pop! } end state :inline_whitespace do rule %r/\s+/m, Text mixin :has_comments end state :whitespace do rule %r/\n+/m, Text, :bol rule %r(\/\/.*?$), Comment::Single, :bol mixin :inline_whitespace end state :has_comments do rule %r(/[*]), Comment::Multiline, :nested_comment end state :nested_comment do mixin :has_comments rule %r([*]/), Comment::Multiline, :pop! rule %r([^*/]+)m, Comment::Multiline rule %r/./, Comment::Multiline end state :root do mixin :whitespace rule %r/\$(([1-9]\d*)?\d)/, Name::Variable rule %r{[()\[\]{}:;,?\\]}, Punctuation rule %r([-/=+*%<>!&|^.~]+), Operator rule %r/@?"/, Str, :dq rule %r/'(\\.|.)'/, Str::Char rule %r/(\d+(?:_\d+)*\*|(?:\d+(?:_\d+)*)*\.\d+(?:_\d)*)(e[+-]?\d+(?:_\d)*)?/i, Num::Float rule %r/\d+e[+-]?[0-9]+/i, Num::Float rule %r/0o?[0-7]+(?:_[0-7]+)*/, Num::Oct rule %r/0x[0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*((\.[0-9A-F]+(?:_[0-9A-F]+)*)?p[+-]?\d+)?/, Num::Hex rule %r/0b[01]+(?:_[01]+)*/, Num::Bin rule %r{[\d]+(?:_\d+)*}, Num::Integer rule %r/@#{id}/, Keyword::Declaration rule %r/(private|internal)(\([ ]*)(\w+)([ ]*\))/ do |m| if m[3] == 'set' token Keyword::Declaration else groups Keyword::Declaration, Keyword::Declaration, Error, Keyword::Declaration end end rule %r/(unowned\([ ]*)(\w+)([ ]*\))/ do |m| if m[2] == 'safe' || m[2] == 'unsafe' token Keyword::Declaration else groups Keyword::Declaration, Error, Keyword::Declaration end end rule %r/#available\([^)]+\)/, Keyword::Declaration rule %r/(#(?:selector|keyPath)\()([^)]+?(?:[(].*?[)])?)(\))/ do groups Keyword::Declaration, Name::Function, Keyword::Declaration end rule %r/#(line|file|column|function|dsohandle)/, Keyword::Declaration rule %r/(let|var)\b(\s*)(#{id})/ do groups Keyword, Text, Name::Variable end rule %r/(let|var)\b(\s*)([(])/ do groups Keyword, Text, Punctuation push :tuple end rule %r/(?!\b(if|while|for|private|internal|unowned|switch|case)\b)\b#{id}(?=(\?|!)?\s*[(])/ do |m| if m[0] =~ /^[[:upper:]]/ token Keyword::Type else token Name::Function end end rule %r/as[?!]?(?=\s)/, Keyword rule %r/try[!]?(?=\s)/, Keyword rule %r/(#?(?!default)(?![[:upper:]])#{id})(\s*)(:)/ do groups Name::Variable, Text, Punctuation end rule id do |m| if keywords.include? m[0] token Keyword elsif declarations.include? m[0] token Keyword::Declaration elsif constants.include? m[0] token Keyword::Constant elsif m[0] =~ /^[[:upper:]]/ token Keyword::Type else token Name end end rule %r/(`)(#{id})(`)/ do groups Punctuation, Name::Variable, Punctuation end end state :tuple do rule %r/(#{id})/, Name::Variable rule %r/(`)(#{id})(`)/ do groups Punctuation, Name::Variable, Punctuation end rule %r/,/, Punctuation rule %r/[(]/, Punctuation, :push rule %r/[)]/, Punctuation, :pop! mixin :inline_whitespace end state :dq do rule %r/\\[\\0tnr'"]/, Str::Escape rule %r/\\[(]/, Str::Escape, :interp rule %r/\\u\{\h{1,8}\}/, Str::Escape rule %r/[^\\"]+/, Str rule %r/"""/, Str, :pop! rule %r/"/, Str, :pop! end state :interp do rule %r/[(]/, Punctuation, :interp_inner rule %r/[)]/, Str::Escape, :pop! mixin :root end state :interp_inner do rule %r/[(]/, Punctuation, :push rule %r/[)]/, Punctuation, :pop! mixin :root end end end end rouge-3.28.0/lib/rouge/lexers/systemd.rb000066400000000000000000000014431417417255300201460ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class SystemD < RegexLexer tag 'systemd' aliases 'unit-file' filenames '*.service' mimetypes 'text/x-systemd-unit' desc 'A lexer for systemd unit files' state :root do rule %r/\s+/, Text rule %r/[;#].*/, Comment rule %r/\[.*?\]$/, Keyword rule %r/(.*?)(=)(.*)(\\\n)/ do groups Name::Tag, Punctuation, Text, Str::Escape push :continuation end rule %r/(.*?)(=)(.*)/ do groups Name::Tag, Punctuation, Text end end state :continuation do rule %r/(.*?)(\\\n)/ do groups Text, Str::Escape end rule %r/(.*)'/, Text, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/tap.rb000066400000000000000000000040401417417255300172360ustar00rootroot00000000000000# frozen_string_literal: true module Rouge module Lexers class Tap < RegexLexer title 'TAP' desc 'Test Anything Protocol' tag 'tap' aliases 'tap' filenames '*.tap' mimetypes 'text/x-tap', 'application/x-tap' state :root do # A TAP version may be specified. rule %r/^TAP version \d+\n/, Name::Namespace # Specify a plan with a plan line. rule %r/^1\.\.\d+/, Keyword::Declaration, :plan # A test failure rule %r/^(not ok)([^\S\n]*)(\d*)/ do groups Generic::Error, Text, Literal::Number::Integer push :test end # A test success rule %r/^(ok)([^\S\n]*)(\d*)/ do groups Keyword::Reserved, Text, Literal::Number::Integer push :test end # Diagnostics start with a hash. rule %r/^#.*\n/, Comment # TAP's version of an abort statement. rule %r/^Bail out!.*\n/, Generic::Error # # TAP ignores any unrecognized lines. rule %r/^.*\n/, Text end state :plan do # Consume whitespace (but not newline). rule %r/[^\S\n]+/, Text # A plan may have a directive with it. rule %r/#/, Comment, :directive # Or it could just end. rule %r/\n/, Comment, :pop! # Anything else is wrong. rule %r/.*\n/, Generic::Error, :pop! end state :test do # Consume whitespace (but not newline). rule %r/[^\S\n]+/, Text # A test may have a directive with it. rule %r/#/, Comment, :directive rule %r/\S+/, Text rule %r/\n/, Text, :pop! end state :directive do # Consume whitespace (but not newline). rule %r/[^\S\n]+/, Comment # Extract todo items. rule %r/(?i)\bTODO\b/, Comment::Preproc # Extract skip items. rule %r/(?i)\bSKIP\S*/, Comment::Preproc rule %r/\S+/, Comment rule %r/\n/ do token Comment pop! 2 end end end end end rouge-3.28.0/lib/rouge/lexers/tcl.rb000066400000000000000000000127241417417255300172440ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class TCL < RegexLexer title "Tcl" desc "The Tool Command Language (tcl.tk)" tag 'tcl' filenames '*.tcl' mimetypes 'text/x-tcl', 'text/x-script.tcl', 'application/x-tcl' def self.detect?(text) return true if text.shebang? 'tclsh' return true if text.shebang? 'wish' return true if text.shebang? 'jimsh' end KEYWORDS = %w( after apply array break catch continue elseif else error eval expr for foreach global if namespace proc rename return set switch then trace unset update uplevel upvar variable vwait while ) BUILTINS = %w( append bgerror binary cd chan clock close concat dde dict encoding eof exec exit fblocked fconfigure fcopy file fileevent flush format gets glob history http incr info interp join lappend lassign lindex linsert list llength load loadTk lrange lrepeat lreplace lreverse lsearch lset lsort mathfunc mathop memory msgcat open package pid pkg::create pkg_mkIndex platform platform::shell puts pwd re_syntax read refchan regexp registry regsub scan seek socket source split string subst tell time tm unknown unload ) OPEN = %w| \( \[ \{ " | CLOSE = %w| \) \] \} | ALL = OPEN + CLOSE END_LINE = CLOSE + %w(; \n) END_WORD = END_LINE + %w(\r \t \v) CHARS = lambda { |list| Regexp.new %/[#{list.join}]/ } NOT_CHARS = lambda { |list| Regexp.new %/[^#{list.join}]/ } state :word do rule %r/\{\*\}/, Keyword mixin :brace_abort mixin :interp rule %r/\{/, Punctuation, :brace rule %r/\(/, Punctuation, :paren rule %r/"/, Str::Double, :string rule %r/#{NOT_CHARS[END_WORD]}+?(?=#{CHARS[OPEN+['\\\\']]})/, Text end def self.gen_command_state(name='') state(:"command#{name}") do mixin :word rule %r/##{NOT_CHARS[END_LINE]}+/, Comment::Single rule %r/(?=#{CHARS[END_WORD]})/ do push :"params#{name}" end rule %r/#{NOT_CHARS[END_WORD]}+/ do |m| if KEYWORDS.include? m[0] token Keyword elsif BUILTINS.include? m[0] token Name::Builtin else token Text end end mixin :whitespace end end def self.gen_delimiter_states(name, close, opts={}) gen_command_state("_in_#{name}") state :"params_in_#{name}" do rule close do token Punctuation pop! 2 end # mismatched delimiters. Braced strings with mismatched # closing delimiters should be okay, since this is standard # practice, like {]]]]} if opts[:strict] rule CHARS[CLOSE - [close]], Error else rule CHARS[CLOSE - [close]], Text end mixin :params end state name do rule close, Punctuation, :pop! mixin :"command_in_#{name}" end end # tcl is freaking impossible. If we're in braces and we encounter # a close brace, we have to drop everything and close the brace. # This is so silly things like {abc"def} and {abc]def} don't b0rk # everything after them. # TODO: TCL seems to have this aborting behavior quite a lot. # such things as [ abc" ] are a runtime error, but will still # parse. Currently something like this will muck up the lex. state :brace_abort do rule %r/}/ do if in_state? :brace pop! until state? :brace pop! token Punctuation else token Error end end end state :params do rule %r/;/, Punctuation, :pop! rule %r/\n/, Text, :pop! rule %r/else|elseif|then/, Keyword mixin :word mixin :whitespace rule %r/#{NOT_CHARS[END_WORD]}+/, Text end gen_delimiter_states :brace, /\}/, :strict => false gen_delimiter_states :paren, /\)/, :strict => true gen_delimiter_states :bracket, /\]/, :strict => true gen_command_state state :root do mixin :command end state :whitespace do # not a multiline regex because we want to capture \n sometimes rule %r/\s+/, Text end state :interp do rule %r/\[/, Punctuation, :bracket rule %r/\$[a-z0-9.:-]+/, Name::Variable rule %r/\$\{.*?\}/m, Name::Variable rule %r/\$/, Text # escape sequences rule %r/\\[0-7]{3}/, Str::Escape rule %r/\\x[0-9a-f]{2}/i, Str::Escape rule %r/\\u[0-9a-f]{4}/i, Str::Escape rule %r/\\./m, Str::Escape end state :string do rule %r/"/, Str::Double, :pop! mixin :interp rule %r/[^\\\[\$"{}]+/m, Str::Double # strings have to keep count of their internal braces, to support # for example { "{ }" }. rule %r/{/ do @brace_count ||= 0 @brace_count += 1 token Str::Double end rule %r/}/ do if in_state? :brace and @brace_count.to_i == 0 pop! until state? :brace pop! token Punctuation else @brace_count -= 1 token Str::Double end end end end end end rouge-3.28.0/lib/rouge/lexers/terraform.rb000066400000000000000000000054531417417255300204640ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'hcl.rb' class Terraform < Hcl title "Terraform" desc "Terraform HCL Interpolations" tag 'terraform' aliases 'tf' filenames '*.tf' def self.keywords @keywords ||= Set.new %w( terraform module provider variable resource data provisioner output ) end def self.declarations @declarations ||= Set.new %w( var local ) end def self.reserved @reserved ||= Set.new %w() end def self.constants @constants ||= Set.new %w(true false null) end def self.builtins @builtins ||= %w() end prepend :hash do rule %r/[.,()*]/, Punctuation end prepend :array do rule %r/[.,()*]/, Punctuation end state :strings do rule %r/\\./, Str::Escape rule %r/\$\{/ do token Keyword push :interpolation end end state :dq do rule %r/[^\\"\$]+/, Str::Double mixin :strings rule %r/"/, Str::Double, :pop! end state :sq do rule %r/[^\\'\$]+/, Str::Single mixin :strings rule %r/'/, Str::Single, :pop! end state :heredoc do rule %r/\n/, Str::Heredoc, :heredoc_nl rule %r/[^$\n]+/, Str::Heredoc rule %r/[$]/, Str::Heredoc mixin :strings end state :interpolation do rule %r/\}/ do token Keyword pop! end mixin :expression end state :regexps do rule %r/"\// do token Str::Delimiter goto :regexp_inner end end state :regexp_inner do rule %r/[^"\/\\]+/, Str::Regex rule %r/\\./, Str::Regex rule %r/\/"/, Str::Delimiter, :pop! rule %r/["\/]/, Str::Regex end id = /[$a-z_\-][a-z0-9_\-]*/io state :expression do mixin :regexps mixin :primitives rule %r/\s+/, Text rule %r(\+\+ | -- | ~ | && | \|\| | \\(?=\n) | << | >>>? | == | != )x, Operator rule %r([-<>+*%&|\^/!=?:]=?), Operator rule %r/[(\[,]/, Punctuation rule %r/[)\].]/, Punctuation rule id do |m| if self.class.keywords.include? m[0] token Keyword elsif self.class.declarations.include? m[0] token Keyword::Declaration elsif self.class.reserved.include? m[0] token Keyword::Reserved elsif self.class.constants.include? m[0] token Keyword::Constant elsif self.class.builtins.include? m[0] token Name::Builtin else token Name::Other end end end end end end rouge-3.28.0/lib/rouge/lexers/tex.rb000066400000000000000000000034421417417255300172570ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class TeX < RegexLexer title "TeX" desc "The TeX typesetting system" tag 'tex' aliases 'TeX', 'LaTeX', 'latex' filenames '*.tex', '*.aux', '*.toc', '*.sty', '*.cls' mimetypes 'text/x-tex', 'text/x-latex' def self.detect?(text) return true if text =~ /\A\s*\\(documentclass|input|documentstyle|relax|ProvidesPackage|ProvidesClass)/ end command = /\\([a-z]+|\s+|.)/i state :general do rule %r/%.*$/, Comment rule %r/[{}&_^]/, Punctuation end state :root do rule %r/\\\[/, Punctuation, :displaymath rule %r/\\\(/, Punctuation, :inlinemath rule %r/\$\$/, Punctuation, :displaymath rule %r/\$/, Punctuation, :inlinemath rule %r/\\(begin|end)\{.*?\}/, Name::Tag rule %r/(\\verb)\b(\S)(.*?)(\2)/ do groups Name::Builtin, Keyword::Pseudo, Str::Other, Keyword::Pseudo end rule command, Keyword, :command mixin :general rule %r/[^\\$%&_^{}]+/, Text end state :math do rule command, Name::Variable mixin :general rule %r/[0-9]+/, Num rule %r/[-=!+*\/()\[\]]/, Operator rule %r/[^=!+*\/()\[\]\\$%&_^{}0-9-]+/, Name::Builtin end state :inlinemath do rule %r/\\\)/, Punctuation, :pop! rule %r/\$/, Punctuation, :pop! mixin :math end state :displaymath do rule %r/\\\]/, Punctuation, :pop! rule %r/\$\$/, Punctuation, :pop! rule %r/\$/, Name::Builtin mixin :math end state :command do rule %r/\[.*?\]/, Name::Attribute rule %r/\*/, Keyword rule(//) { pop! } end end end end rouge-3.28.0/lib/rouge/lexers/toml.rb000066400000000000000000000046101417417255300174300ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class TOML < RegexLexer title "TOML" desc 'the TOML configuration format (https://github.com/mojombo/toml)' tag 'toml' filenames '*.toml', 'Pipfile' mimetypes 'text/x-toml' # bare keys and quoted keys identifier = %r/(?:\S+|"[^"]+"|'[^']+')/ state :basic do rule %r/\s+/, Text rule %r/#.*?$/, Comment rule %r/(true|false)/, Keyword::Constant rule %r/(#{identifier})(\s*)(=)(\s*)(\{)/ do groups Name::Namespace, Text, Operator, Text, Punctuation push :inline end rule %r/(?/-]), Operator rule %r/[()\[\]{},.;:]/, Punctuation rule %r/(?:true|false|null)\b/, Name::Builtin rule id do |m| name = m[0] if self.class.keywords.include? name token Keyword elsif self.class.types.include? name token Keyword::Type elsif self.class.reserved.include? name token Keyword::Reserved else token Name end end end state :root do rule %r/module\b/, Keyword::Declaration, :module rule %r/import\b/, Keyword::Namespace, :import mixin :statements end state :string do rule %r/"/, Str, :pop! rule %r/\\([\\abfnrtv"']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})/, Str::Escape rule %r/[^\\"\n]+/, Str rule %r/\\\n/, Str rule %r/\\/, Str # stray backslash end state :module do rule %r/\s+/m, Text rule id, Name::Class, :pop! end state :import do rule %r/\s+/m, Text rule %r/[\w.]+\*?/, Name::Namespace, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/tulip.rb000066400000000000000000000047131417417255300176160ustar00rootroot00000000000000# frozen_string_literal: true module Rouge module Lexers class Tulip < RegexLexer desc 'the tulip programming language (twitter.com/tuliplang)' tag 'tulip' aliases 'tulip' filenames '*.tlp' mimetypes 'text/x-tulip', 'application/x-tulip' def self.detect?(text) return true if text.shebang? 'tulip' end id = /[a-z][\w-]*/i upper_id = /[A-Z][\w-]*/ state :comments_and_whitespace do rule %r/\s+/, Text rule %r/#.*?$/, Comment end state :root do mixin :comments_and_whitespace rule %r/@#{id}/, Keyword rule %r/(\\#{id})([{])/ do groups Name::Function, Str push :nested_string end rule %r/([+]#{id})([{])/ do groups Name::Decorator, Str push :nested_string end rule %r/\\#{id}/, Name::Function rule %r/[+]#{id}/, Name::Decorator rule %r/"[{]/, Str, :dqi rule %r/"/, Str, :dq rule %r/'{/, Str, :nested_string rule %r/'#{id}/, Str rule %r/[.]#{id}/, Name::Tag rule %r/[$]#{id}?/, Name::Variable rule %r/-#{id}:?/, Name::Label rule %r/%#{id}/, Name::Function rule %r/`#{id}/, Operator::Word rule %r/[?~%._>,!\[\]:{}()=;\/-]/, Punctuation rule %r/[0-9]+([.][0-9]+)?/, Num rule %r/#{id}/, Name rule %r//, Comment::Preproc, :pop! rule %r/[*:]/, Punctuation rule %r/#{upper_id}/, Keyword::Type rule %r/#{id}/, Name::Variable end end end end rouge-3.28.0/lib/rouge/lexers/turtle.rb000066400000000000000000000034211417417255300177730ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Turtle < RegexLexer title "Turtle/TriG" desc "Terse RDF Triple Language, TriG" tag 'turtle' filenames '*.ttl', '*.trig' mimetypes 'text/turtle', 'application/trig' state :root do rule %r/@base\b/, Keyword::Declaration rule %r/@prefix\b/, Keyword::Declaration rule %r/true\b/, Keyword::Constant rule %r/false\b/, Keyword::Constant rule %r/""".*?"""/m, Literal::String rule %r/"([^"\\]|\\.)*"/, Literal::String rule %r/'''.*?'''/m, Literal::String rule %r/'([^'\\]|\\.)*'/, Literal::String rule %r/#.*$/, Comment::Single rule %r/@[^\s,.;]+/, Name::Attribute rule %r/[+-]?[0-9]+\.[0-9]*E[+-]?[0-9]+/, Literal::Number::Float rule %r/[+-]?\.[0-9]+E[+-]?[0-9]+/, Literal::Number::Float rule %r/[+-]?[0-9]+E[+-]?[0-9]+/, Literal::Number::Float rule %r/[+-]?[0-9]*\.[0-9]+?/, Literal::Number::Float rule %r/[+-]?[0-9]+/, Literal::Number::Integer rule %r/\./, Punctuation rule %r/,/, Punctuation rule %r/;/, Punctuation rule %r/\(/, Punctuation rule %r/\)/, Punctuation rule %r/\{/, Punctuation rule %r/\}/, Punctuation rule %r/\[/, Punctuation rule %r/\]/, Punctuation rule %r/\^\^/, Punctuation rule %r/<[^>]*>/, Name::Label rule %r/base\b/i, Keyword::Declaration rule %r/prefix\b/i, Keyword::Declaration rule %r/GRAPH\b/, Keyword rule %r/a\b/, Keyword rule %r/\s+/, Text::Whitespace rule %r/[^:;<>#\@"\(\).\[\]\{\} ]*:/, Name::Namespace rule %r/[^:;<>#\@"\(\).\[\]\{\} ]+/, Name end end end end rouge-3.28.0/lib/rouge/lexers/twig.rb000066400000000000000000000020611417417255300174250ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'jinja.rb' class Twig < Jinja title "Twig" desc "Twig template engine (twig.sensiolabs.org)" tag "twig" filenames '*.twig' mimetypes 'application/x-twig', 'text/html+twig' def self.keywords @@keywords ||= %w(as do extends flush from import include use else starts ends with without autoescape endautoescape block endblock embed endembed filter endfilter for endfor if endif macro endmacro sandbox endsandbox set endset spaceless endspaceless) end def self.tests @@tests ||= %w(constant defined divisibleby empty even iterable null odd sameas) end def self.pseudo_keywords @@pseudo_keywords ||= %w(true false none) end def self.word_operators @@word_operators ||= %w(b-and b-or b-xor is in and or not) end end end end rouge-3.28.0/lib/rouge/lexers/typescript.rb000066400000000000000000000006521417417255300206650ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'javascript.rb' load_lexer 'typescript/common.rb' class Typescript < Javascript extend TypescriptCommon title "TypeScript" desc "TypeScript, a superset of JavaScript" tag 'typescript' aliases 'ts' filenames '*.ts', '*.d.ts' mimetypes 'text/typescript' end end end rouge-3.28.0/lib/rouge/lexers/typescript/000077500000000000000000000000001417417255300203355ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/lexers/typescript/common.rb000066400000000000000000000021261417417255300221530ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers module TypescriptCommon def keywords @keywords ||= super + Set.new(%w( is namespace static private protected public implements readonly )) end def declarations @declarations ||= super + Set.new(%w( type abstract )) end def reserved @reserved ||= super + Set.new(%w( string any void number namespace module declare default interface keyof )) end def builtins @builtins ||= super + %w( Pick Partial Readonly Record ) end def self.extended(base) base.prepend :root do rule %r/[?][.]/, base::Punctuation rule %r/[?]{2}/, base::Operator end base.prepend :statement do rule %r/(#{Javascript.id_regex})(\??)(\s*)(:)/ do groups base::Name::Label, base::Punctuation, base::Text, base::Punctuation push :expr_start end end end end end end rouge-3.28.0/lib/rouge/lexers/vala.rb000066400000000000000000000043161417417255300174030ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Vala < RegexLexer tag 'vala' filenames '*.vala' mimetypes 'text/x-vala' title "Vala" desc 'A programming language similar to csharp.' id = /@?[_a-z]\w*/i keywords = %w( abstract as async base break case catch const construct continue default delegate delete do dynamic else ensures enum errordomain extern false finally for foreach get global if in inline interface internal is lock new null out override owned private protected public ref requires return set signal sizeof static switch this throw throws true try typeof unowned var value virtual void weak while yield ) keywords_type = %w( bool char double float int int8 int16 int32 int64 long short size_t ssize_t string unichar uint uint8 uint16 uint32 uint64 ulong ushort ) state :whitespace do rule %r/\s+/m, Text rule %r(//.*?$), Comment::Single rule %r(/[*].*?[*]/)m, Comment::Multiline end state :root do mixin :whitespace rule %r/^\s*\[.*?\]/, Name::Attribute rule %r/(<\[)\s*(#{id}:)?/, Keyword rule %r/\]>/, Keyword rule %r/[~!%^&*()+=|\[\]{}:;,.<>\/?-]/, Punctuation rule %r/@"(\\.|.)*?"/, Str rule %r/"(\\.|.)*?["\n]/, Str rule %r/'(\\.|.)'/, Str::Char rule %r/0x[0-9a-f]+[lu]?/i, Num rule %r( [0-9] ([.][0-9]*)? # decimal (e[+-][0-9]+)? # exponent [fldu]? # type )ix, Num rule %r/\b(#{keywords.join('|')})\b/, Keyword rule %r/\b(#{keywords_type.join('|')})\b/, Keyword::Type rule %r/class|struct/, Keyword, :class rule %r/namespace|using/, Keyword, :namespace rule %r/#{id}(?=\s*[(])/, Name::Function rule id, Name rule %r/#.*/, Comment::Preproc end state :class do mixin :whitespace rule id, Name::Class, :pop! end state :namespace do mixin :whitespace rule %r/(?=[(])/, Text, :pop! rule %r/(#{id}|[.])+/, Name::Namespace, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/varnish.rb000066400000000000000000000116561417417255300201370ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Varnish < RegexLexer title 'VCL: Varnish Configuration Language' desc 'The configuration language for Varnish HTTP Cache (varnish-cache.org)' tag 'vcl' aliases 'varnishconf', 'varnish' filenames '*.vcl' mimetypes 'text/x-varnish', 'text/x-vcl' SPACE = '[ \f\n\r\t\v]+' # backend acl def self.keywords @keywords ||= Set.new %w[ vcl set unset include import if else elseif elif elsif director probe backend acl declare local BOOL FLOAT INTEGER IP RTIME STRING TIME ] end def self.functions @functions ||= Set.new %w[ ban call hash_data new regsub regsuball return rollback std.cache_req_body std.collect std.duration std.fileread std.healthy std.integer std.ip std.log std.port std.querysort std.random std.real std.real2time std.rollback std.set_ip_tos std.strstr std.syslog std.time std.time2integer std.time2real std.timestamp std.tolower std.toupper synth synthetic ] end def self.variables @variables ||= Set.new %w[ bereq bereq.backend bereq.between_bytes_timeout bereq.connect_timeout bereq.first_byte_timeout bereq.method bereq.proto bereq.retries bereq.uncacheable bereq.url bereq.xid beresp beresp.age beresp.backend beresp.backend.ip beresp.backend.name beresp.do_esi beresp.do_gunzip beresp.do_gzip beresp.do_stream beresp.grace beresp.keep beresp.proto beresp.reason beresp.status beresp.storage_hint beresp.ttl beresp.uncacheable beresp.was_304 client.identity client.ip local.ip now obj.age obj.grace obj.hits obj.keep obj.proto obj.reason obj.status obj.ttl obj.uncacheable remote.ip req req.backend_hint req.can_gzip req.esi req.esi_level req.hash_always_miss req.hash_ignore_busy req.method req.proto req.restarts req.ttl req.url req.xid resp resp.proto resp.reason resp.status server.hostname server.identity server.ip ] end # This is never used # def self.routines # @routines ||= Set.new %w[ # backend_error backend_fetch backend_response purge deliver fini hash # hit init miss pass pipe recv synth # ] # end state :root do # long strings ({" ... "}) rule %r/\{".*?"}/m, Str::Single # heredoc style long strings ({xyz"..."xyz}) rule %r/\{(\w+)".*?"(\1)\}/m, Str::Single # comments rule %r'/\*.*?\*/'m, Comment::Multiline rule %r'(?://|#).*', Comment::Single rule %r/true|false/, Keyword::Constant # "wildcard variables" var_prefix = Regexp.union(%w(beresp bereq resp req obj)) rule %r/(?:#{var_prefix})\.http\.[\w.-]+/ do token Name::Variable end # local variables (var.*) rule %r/(?:var)\.[\w.-]+/ do token Name::Variable end rule %r/(sub)(#{SPACE})([\w-]+)/ do groups Keyword, Text, Name::Function end # inline C (C{ ... }C) rule %r/C\{/ do token Comment::Preproc push :inline_c end rule %r/\.?[a-z_][\w.-]*/i do |m| next token Keyword if self.class.keywords.include? m[0] next token Name::Function if self.class.functions.include? m[0] next token Name::Variable if self.class.variables.include? m[0] token Text end ## for number literals decimal = %r/[0-9]+/ hex = %r/[0-9a-f]+/i numeric = %r{ (?: 0x#{hex} (?:\.#{hex})? (?:p[+-]?#{hex})? ) | (?: #{decimal} (?:\.#{decimal})? (?:e[+-]?#{decimal})? ) }xi # duration literals duration_suffix = Regexp.union(%w(ms s m h d w y)) rule %r/#{numeric}#{duration_suffix}/, Num::Other # numeric literals (integer / float) rule numeric do |m| case m[0] when /^#{decimal}$/ token Num::Integer when /^0x#{hex}$/ token Num::Integer else token Num::Float end end # standard strings rule %r/"/, Str::Double, :string rule %r'[&|+-]{2}|[<=>!*/+-]=|<<|>>|!~|[-+*/%><=!&|~]', Operator rule %r/[{}();.,]/, Punctuation rule %r/\r\n?|\n/, Text rule %r/./, Text end state :string do rule %r/"/, Str::Double, :pop! rule %r/\\[\\"nt]/, Str::Escape rule %r/\r\n?|\n/, Str::Double rule %r/./, Str::Double end state :inline_c do rule %r/}C/, Comment::Preproc, :pop! rule %r/.*?(?=}C)/m do delegate C end end end end end rouge-3.28.0/lib/rouge/lexers/vb.rb000066400000000000000000000115551417417255300170720ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class VisualBasic < RegexLexer title "Visual Basic" desc "Visual Basic" tag 'vb' aliases 'visualbasic' filenames '*.vbs', '*.vb' mimetypes 'text/x-visualbasic', 'application/x-visualbasic' def self.keywords @keywords ||= Set.new %w( AddHandler Alias ByRef ByVal CBool CByte CChar CDate CDbl CDec CInt CLng CObj CSByte CShort CSng CStr CType CUInt CULng CUShort Call Case Catch Class Const Continue Declare Default Delegate Dim DirectCast Do Each Else ElseIf End EndIf Enum Erase Error Event Exit False Finally For Friend Function Get Global GoSub GoTo Handles If Implements Imports Inherits Interface Let Lib Loop Me Module MustInherit MustOverride MyBase MyClass Namespace Narrowing New Next Not NotInheritable NotOverridable Nothing Of On Operator Option Optional Overloads Overridable Overrides ParamArray Partial Private Property Protected Public RaiseEvent ReDim ReadOnly RemoveHandler Resume Return Select Set Shadows Shared Single Static Step Stop Structure Sub SyncLock Then Throw To True Try TryCast Using Wend When While Widening With WithEvents WriteOnly ) end def self.keywords_type @keywords_type ||= Set.new %w( Boolean Byte Char Date Decimal Double Integer Long Object SByte Short Single String Variant UInteger ULong UShort ) end def self.operator_words @operator_words ||= Set.new %w( AddressOf And AndAlso As GetType In Is IsNot Like Mod Or OrElse TypeOf Xor ) end def self.builtins @builtins ||= Set.new %w( Console ConsoleColor ) end id = /[a-z_]\w*/i upper_id = /[A-Z]\w*/ state :whitespace do rule %r/\s+/, Text rule %r/\n/, Text, :bol rule %r/rem\b.*?$/i, Comment::Single rule %r(%\{.*?%\})m, Comment::Multiline rule %r/'.*$/, Comment::Single end state :bol do rule %r/\s+/, Text rule %r/<.*?>/, Name::Attribute rule(//) { :pop! } end state :root do mixin :whitespace rule %r( [#]If\b .*? \bThen | [#]ElseIf\b .*? \bThen | [#]End \s+ If | [#]Const | [#]ExternalSource .*? \n | [#]End \s+ ExternalSource | [#]Region .*? \n | [#]End \s+ Region | [#]ExternalChecksum )x, Comment::Preproc rule %r/[.]/, Punctuation, :dotted rule %r/[(){}!#,:]/, Punctuation rule %r/Option\s+(Strict|Explicit|Compare)\s+(On|Off|Binary|Text)/, Keyword::Declaration rule %r/End\b/, Keyword, :end rule %r/(Dim|Const)\b/, Keyword, :dim rule %r/(Function|Sub|Property)\b/, Keyword, :funcname rule %r/(Class|Structure|Enum)\b/, Keyword, :classname rule %r/(Module|Namespace|Imports)\b/, Keyword, :namespace rule upper_id do |m| match = m[0] if self.class.keywords.include? match token Keyword elsif self.class.keywords_type.include? match token Keyword::Type elsif self.class.operator_words.include? match token Operator::Word elsif self.class.builtins.include? match token Name::Builtin else token Name end end rule( %r(&=|[*]=|/=|\\=|\^=|\+=|-=|<<=|>>=|<<|>>|:=|<=|>=|<>|[-&*/\\^+=<>.]), Operator ) rule %r/"/, Str, :string rule %r/#{id}[%&@!#\$]?/, Name rule %r/#.*?#/, Literal::Date rule %r/(\d+\.\d*|\d*\.\d+)(f[+-]?\d+)?/i, Num::Float rule %r/\d+([SILDFR]|US|UI|UL)?/, Num::Integer rule %r/&H[0-9a-f]+([SILDFR]|US|UI|UL)?/, Num::Integer rule %r/&O[0-7]+([SILDFR]|US|UI|UL)?/, Num::Integer rule %r/_\n/, Keyword end state :dotted do mixin :whitespace rule id, Name, :pop! end state :string do rule %r/""/, Str::Escape rule %r/"C?/, Str, :pop! rule %r/[^"]+/, Str end state :dim do mixin :whitespace rule id, Name::Variable, :pop! rule(//) { pop! } end state :funcname do mixin :whitespace rule id, Name::Function, :pop! end state :classname do mixin :whitespace rule id, Name::Class, :pop! end state :namespace do mixin :whitespace rule %r/#{id}([.]#{id})*/, Name::Namespace, :pop! end state :end do mixin :whitespace rule %r/(Function|Sub|Property|Class|Structure|Enum|Module|Namespace)\b/, Keyword, :pop! rule(//) { pop! } end end end end rouge-3.28.0/lib/rouge/lexers/velocity.rb000066400000000000000000000037301417417255300203150ustar00rootroot00000000000000# -*- coding: utf-8 -*- # module Rouge module Lexers class Velocity < TemplateLexer title 'Velocity' desc 'Velocity is a Java-based template engine (velocity.apache.org)' tag 'velocity' filenames '*.vm', '*.velocity', '*.fhtml' mimetypes 'text/html+velocity' id = /[a-z_]\w*/i state :root do rule %r/[^{#$]+/ do delegate parent end rule %r/(#)(\*.*?\*)(#)/m, Comment::Multiline rule %r/(##)(.*?$)/, Comment::Single rule %r/(#\{?)(#{id})(\}?)(\s?\()/m do groups Punctuation, Name::Function, Punctuation, Punctuation push :directive_params end rule %r/(#\{?)(#{id})(\}|\b)/m do groups Punctuation, Name::Function, Punctuation end rule %r/\$\{?/, Punctuation, :variable end state :variable do rule %r/#{id}/, Name::Variable rule %r/\(/, Punctuation, :func_params rule %r/(\.)(#{id})/ do groups Punctuation, Name::Variable end rule %r/\}/, Punctuation, :pop! rule(//) { pop! } end state :directive_params do rule %r/(&&|\|\||==?|!=?|[-<>+*%&|^\/])|\b(eq|ne|gt|lt|ge|le|not|in)\b/, Operator rule %r/\[/, Operator, :range_operator rule %r/\b#{id}\b/, Name::Function mixin :func_params end state :range_operator do rule %r/[.]{2}/, Operator mixin :func_params rule %r/\]/, Operator, :pop! end state :func_params do rule %r/\$\{?/, Punctuation, :variable rule %r/\s+/, Text rule %r/,/, Punctuation rule %r/"(\\\\|\\"|[^"])*"/, Str::Double rule %r/'(\\\\|\\'|[^'])*'/, Str::Single rule %r/0[xX][0-9a-fA-F]+[Ll]?/, Num::Hex rule %r/\b[0-9]+\b/, Num::Integer rule %r/(true|false|null)\b/, Keyword::Constant rule %r/[(\[]/, Punctuation, :push rule %r/[)\]}]/, Punctuation, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/verilog.rb000066400000000000000000000151441417417255300201300ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Verilog < RegexLexer title "Verilog and System Verilog" desc "The System Verilog hardware description language" tag 'verilog' filenames '*.v', '*.sv', '*.svh' mimetypes 'text/x-verilog', 'text/x-systemverilog' id = /[a-zA-Z_][a-zA-Z0-9_]*/ def self.keywords @keywords ||= Set.new %w( alias always always_comb always_ff always_latch assert assert_strobe assign assume automatic attribute before begin bind bins binsof break case casex casez clocking config constraint context continue cover covergroup coverpoint cross deassign defparam default design dist do else end endattribute endcase endclass endclocking endconfig endfunction endgenerate endgroup endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask expect export extends extern final first_match for force foreach fork forkjoin forever function generate genvar if iff ifnone ignore_bins illegal_bins import incdir include initial inside instance interface intersect join join_any join_none liblist library local localparam matches module modport new noshowcancelled null package parameter primitive priority program property protected pulsestyle_onevent pulsestyle_ondetect pure rand randc randcase randsequence release return sequence showcancelled solve specify super table task this throughout timeprecision timeunit type typedef unique use wait wait_order while wildcard with within ) end def self.keywords_type @keywords_type ||= Set.new %w( and bit buf bufif0 bufif1 byte cell chandle class cmos const disable edge enum event highz0 highz1 initial inout input int integer join logic longint macromodule medium nand negedge nmos nor not notif0 notif1 or output packed parameter pmos posedge pull0 pull1 pulldown pullup rcmos real realtime ref reg repeat rnmos rpmos rtran rtranif0 rtranif1 scalared shortint shortreal signed specparam static string strength strong0 strong1 struct supply0 supply1 tagged time tran tranif0 tranif1 tri tri0 tri1 triand trior trireg union unsigned uwire var vectored virtual void wait wand weak[01] wire wor xnor xor ) end def self.keywords_system_task @keyword_system_task ||= Set.new %w( acos acosh asin asinh assertfailoff assertfailon assertkill assertnonvacuouson assertoff asserton assertpassoff assertpasson assertvacuousoff atan atan2 atanh bits bitstoreal bitstoshortreal cast ceil changed changed_gclk changing_gclk clog2 cos cosh countones coverage_control coverage_get coverage_get_max coverage_merge coverage_save dimensions display displayb displayh displayo dist_chi_square dist_erlang dist_exponential dist_normal dist_poisson dist_t dist_uniform dumpall dumpfile dumpflush dumplimit dumpoff dumpon dumpports dumpportsall dumpportsflush dumpportslimit dumpportsoff dumpportson dumpvars error exit exp falling_gclk fclose fdisplay fdisplayb fdisplayh fdisplayo fell fell_gclk feof ferror fflush fgetc fgets finish floor fmonitor fmonitorb fmonitorh fmonitoro fopen fread fscanf fseek fstrobe fstrobeb fstrobeh fstrobeo ftell future_gclk fwrite fwriteb fwriteh fwriteo get_coverage high hypot increment info isunbounded isunknown itor left ln load_coverage_db log10 low monitor monitorb monitorh monitoro monitoroff monitoron onehot onehot0 past past_gclk pow printtimescale q_add q_exam q_full q_initialize q_remove random readmemb readmemh realtime realtobits rewind right rising_gclk rose rose_gclk rtoi sampled set_coverage_db_name sformat sformatf shortrealtobits signed sin sinh size sqrt sscanf stable stable_gclk steady_gclk stime stop strobe strobeb strobeh strobeo swrite swriteb swriteh swriteo system tan tanh time timeformat typename ungetc unpacked_dimensions unsigned warning write writeb writeh writememb writememh writeo ) end state :expr_bol do mixin :inline_whitespace rule %r/`define/, Comment::Preproc, :macro rule(//) { pop! } end # :expr_bol is the same as :bol but without labels, since # labels can only appear at the beginning of a statement. state :bol do rule %r/#{id}:(?!:)/, Name::Label mixin :expr_bol end state :inline_whitespace do rule %r/[ \t\r]+/, Text rule %r/\\\n/, Text # line continuation rule %r(/(\\\n)?[*].*?[*](\\\n)?/)m, Comment::Multiline end state :whitespace do rule %r/\n+/m, Text, :bol rule %r(//(\\.|.)*?$), Comment::Single, :bol mixin :inline_whitespace end state :expr_whitespace do rule %r/\n+/m, Text, :expr_bol mixin :whitespace end state :string do rule %r/"/, Str, :pop! rule %r/\\([\\abfnrtv"']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})/, Str::Escape rule %r/[^\\"\n]+/, Str rule %r/\\\n/, Str rule %r/\\/, Str # stray backslash end state :statement do mixin :whitespace rule %r/L?"/, Str, :string rule %r/([0-9_]+\.[0-9_]*|[0-9_]*\.[0-9_]+)(e[+-]?[0-9_]+)?/i, Num::Float rule %r/[0-9_]+e[+-]?[0-9_]+/i, Num::Float rule %r/[0-9]*'h[0-9a-fA-F_?]+/, Num::Hex rule %r/[0-9]*'b?[01xz_?]+/, Num::Bin rule %r/[0-9]*'d[0-9_?]+/, Num::Integer rule %r/[0-9_]+[lu]*/i, Num::Integer rule %r([-~!%^&*+=\|?:<>/@{}]), Operator rule %r/[()\[\],.$\#;]/, Punctuation rule %r/`(\w+)/, Comment::Preproc rule id do |m| name = m[0] if self.class.keywords.include? name token Keyword elsif self.class.keywords_type.include? name token Keyword::Type elsif self.class.keywords_system_task.include? name token Name::Builtin else token Name end end end state :root do mixin :expr_whitespace rule(//) { push :statement } end state :macro do rule %r/\n/, Comment::Preproc, :pop! mixin :inline_whitespace rule %r/;/, Punctuation rule %r/\=/, Operator rule %r/(\w+)/, Text end end end end rouge-3.28.0/lib/rouge/lexers/vhdl.rb000066400000000000000000000056011417417255300174130ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class VHDL < RegexLexer title "VHDL 2008" desc "Very High Speed Integrated Circuit Hardware Description Language" tag 'vhdl' filenames '*.vhd', '*.vhdl', '*.vho' mimetypes 'text/x-vhdl' def self.keywords @keywords ||= Set.new %w( access after alias all architecture array assert assume assume_guarantee attribute begin block body buffer bus case component configuration constant context cover default disconnect downto else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map new next null of on open others out package parameter port postponed procedure process property protected pure range record register reject release report return select sequence severity shared signal strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with ) end def self.keywords_type @keywords_type ||= Set.new %w( bit bit_vector boolean boolean_vector character integer integer_vector natural positive real real_vector severity_level signed std_logic std_logic_vector std_ulogic std_ulogic_vector string unsigned time time_vector ) end def self.operator_words @operator_words ||= Set.new %w( abs and mod nand nor not or rem rol ror sla sll sra srl xnor xor ) end id = /[a-zA-Z][a-zA-Z0-9_]*/ state :whitespace do rule %r/\s+/, Text rule %r/\n/, Text # Find Comments (VHDL doesn't support multiline comments) rule %r/--.*$/, Comment::Single end state :statements do # Find Numbers rule %r/-?\d+/i, Num::Integer rule %r/-?\d+[.]\d+/i, Num::Float # Find Strings rule %r/[box]?"[^"]*"/i, Str::Single rule %r/'[^']?'/i, Str::Char # Find Attributes rule %r/'#{id}/i, Name::Attribute # Punctuations rule %r/[(),:;]/, Punctuation # Boolean and NULL rule %r/(?:true|false|null)\b/i, Name::Builtin rule id do |m| match = m[0].downcase #convert to lower case if self.class.keywords.include? match token Keyword elsif self.class.keywords_type.include? match token Keyword::Type elsif self.class.operator_words.include? match token Operator::Word else token Name end end rule( %r(=>|[*][*]|:=|\/=|>=|<=|<>|\?\?|\?=|\?\/=|\?>|\?<|\?>=|\?<=|<<|>>|[#&'*+-.\/:<=>\?@^]), Operator ) end state :root do mixin :whitespace mixin :statements end end end end rouge-3.28.0/lib/rouge/lexers/viml.rb000066400000000000000000000036301417417255300174250ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class VimL < RegexLexer title "VimL" desc "VimL, the scripting language for the Vim editor (vim.org)" tag 'viml' aliases 'vim', 'vimscript', 'ex' filenames '*.vim', '*.vba', '.vimrc', '.exrc', '.gvimrc', '_vimrc', '_exrc', '_gvimrc' # _ names for windows mimetypes 'text/x-vim' def self.keywords Kernel::load File.join(Lexers::BASE_DIR, 'viml/keywords.rb') self.keywords end state :root do rule %r/^(\s*)(".*?)$/ do groups Text, Comment end rule %r/^\s*\\/, Str::Escape rule %r/[ \t]+/, Text # TODO: regexes can have other delimiters rule %r(/(\\\\|\\/|[^\n/])*/), Str::Regex rule %r("(\\\\|\\"|[^\n"])*"), Str::Double rule %r('(\\\\|\\'|[^\n'])*'), Str::Single # if it's not a string, it's a comment. rule %r/(?<=\s)"[^-:.%#=*].*?$/, Comment rule %r/-?\d+/, Num rule %r/#[0-9a-f]{6}/i, Num::Hex rule %r/^:/, Punctuation rule %r/[():<>+=!\[\]{}\|,~.-]/, Punctuation rule %r/\b(let|if|else|endif|elseif|fun|function|endfunction)\b/, Keyword rule %r/\b(NONE|bold|italic|underline|dark|light)\b/, Name::Builtin rule %r/[absg]:\w+\b/, Name::Variable rule %r/\b\w+\b/ do |m| name = m[0] keywords = self.class.keywords if keywords[:command].include? name token Keyword elsif keywords[:function].include? name token Name::Builtin elsif keywords[:option].include? name token Name::Builtin elsif keywords[:auto].include? name token Name::Builtin else token Text end end # no errors in VimL! rule %r/./m, Text end end end end rouge-3.28.0/lib/rouge/lexers/viml/000077500000000000000000000000001417417255300170765ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/lexers/viml/keywords.rb000066400000000000000000000770431417417255300213050ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # DO NOT EDIT # This file is automatically generated by `rake builtins:viml`. # See tasks/builtins/viml.rake for more info. module Rouge module Lexers class VimL def self.keywords @keywords ||= {}.tap do |kw| kw[:command] = Set.new ["a", "ar", "args", "argl", "arglocal", "ba", "ball", "bm", "bmodified", "breaka", "breakadd", "bun", "bunload", "cabc", "cabclear", "cal", "call", "cc", "cf", "cfile", "changes", "cla", "clast", "cnf", "cnfile", "comc", "comclear", "cp", "cprevious", "cstag", "debugg", "debuggreedy", "deletl", "dep", "diffpu", "diffput", "dl", "dr", "drop", "ec", "em", "emenu", "ene", "enew", "files", "fini", "finish", "folddoc", "folddoclosed", "gr", "grep", "helpc", "helpclose", "his", "history", "il", "ilist", "isp", "isplit", "keepa", "l", "list", "laf", "lafter", "lbel", "lbelow", "lcscope", "lfdo", "lgrepa", "lgrepadd", "lma", "lo", "loadview", "lop", "lopen", "lua", "m", "move", "mes", "mkvie", "mkview", "nbc", "nbclose", "noh", "nohlsearch", "ol", "oldfiles", "pa", "packadd", "po", "pop", "prof", "profile", "pta", "ptag", "ptr", "ptrewind", "py3f", "py3file", "pythonx", "quita", "quitall", "redraws", "redrawstatus", "rew", "rewind", "rubyf", "rubyfile", "sIg", "sa", "sargument", "sba", "sball", "sbr", "sbrewind", "scl", "scscope", "sfir", "sfirst", "sgl", "sic", "sin", "sm", "smap", "snoreme", "spelld", "spelldump", "spellw", "spellwrong", "srg", "st", "stop", "stj", "stjump", "sunmenu", "syn", "tN", "tNext", "tabd", "tabdo", "tabm", "tabmove", "tabr", "tabrewind", "tch", "tchdir", "tf", "tfirst", "tlmenu", "tm", "tmenu", "to", "topleft", "tu", "tunmenu", "undol", "undolist", "up", "update", "vi", "visual", "vmapc", "vmapclear", "wa", "wall", "winp", "winpos", "wundo", "xme", "xr", "xrestore", "ab", "arga", "argadd", "argu", "argument", "bad", "badd", "bn", "bnext", "breakd", "breakdel", "bw", "bwipeout", "cabo", "cabove", "cat", "catch", "ccl", "cclose", "cfdo", "chd", "chdir", "cle", "clearjumps", "cnor", "comp", "compiler", "cpf", "cpfile", "cun", "delc", "delcommand", "deletp", "di", "display", "diffs", "diffsplit", "dli", "dlist", "ds", "dsearch", "echoe", "echoerr", "en", "endif", "eval", "filet", "fir", "first", "foldo", "foldopen", "grepa", "grepadd", "helpf", "helpfind", "i", "imapc", "imapclear", "iuna", "iunabbrev", "keepalt", "la", "last", "lan", "language", "lbo", "lbottom", "ld", "ldo", "lfir", "lfirst", "lh", "lhelpgrep", "lmak", "lmake", "loadk", "lp", "lprevious", "luado", "ma", "mark", "messages", "mod", "mode", "nbs", "nbstart", "nor", "omapc", "omapclear", "packl", "packloadall", "popu", "popup", "profd", "profdel", "ptf", "ptfirst", "pts", "ptselect", "pyx", "r", "read", "redrawt", "redrawtabline", "ri", "right", "rundo", "sIl", "sal", "sall", "sbf", "sbfirst", "sc", "scp", "se", "set", "sg", "sgn", "sie", "sip", "sme", "snoremenu", "spelli", "spellinfo", "spr", "sprevious", "sri", "sta", "stag", "stopi", "stopinsert", "sus", "suspend", "sync", "ta", "tag", "tabe", "tabedit", "tabn", "tabnext", "tabs", "tcld", "tcldo", "th", "throw", "tln", "tma", "tmap", "tp", "tprevious", "tunma", "tunmap", "unh", "unhide", "v", "vie", "view", "vne", "vnew", "wh", "while", "wn", "wnext", "wv", "wviminfo", "xmenu", "xunme", "abc", "abclear", "argd", "argdelete", "as", "ascii", "bd", "bdelete", "bo", "botright", "breakl", "breaklist", "cN", "cNext", "cad", "caddbuffer", "cb", "cbuffer", "cd", "cfir", "cfirst", "che", "checkpath", "clo", "close", "co", "copy", "con", "continue", "cq", "cquit", "cuna", "cunabbrev", "delel", "delf", "delfunction", "dif", "diffupdate", "difft", "diffthis", "do", "dsp", "dsplit", "echom", "echomsg", "endf", "endfunction", "ex", "filetype", "fix", "fixdel", "for", "gui", "helpg", "helpgrep", "ia", "in", "j", "join", "keepj", "keepjumps", "lab", "labove", "lat", "lc", "lcd", "le", "left", "lg", "lgetfile", "lhi", "lhistory", "lmapc", "lmapclear", "loadkeymap", "lpf", "lpfile", "luafile", "mak", "make", "mk", "mkexrc", "mz", "mzscheme", "new", "nore", "on", "only", "pc", "pclose", "pp", "ppop", "promptf", "promptfind", "ptj", "ptjump", "pu", "put", "py", "python", "pyxdo", "rec", "recover", "reg", "registers", "rightb", "rightbelow", "rv", "rviminfo", "sIn", "san", "sandbox", "sbl", "sblast", "scI", "scr", "scriptnames", "setf", "setfiletype", "sgI", "sgp", "sig", "sir", "smenu", "so", "source", "spellr", "spellrare", "sr", "srl", "star", "startinsert", "sts", "stselect", "sv", "sview", "syncbind", "tab", "tabf", "tabfind", "tabnew", "tags", "tclf", "tclfile", "tj", "tjump", "tlnoremenu", "tmapc", "tmapclear", "tr", "trewind", "u", "undo", "unl", "ve", "version", "vim", "vimgrep", "vs", "vsplit", "win", "winsize", "wp", "wprevious", "x", "xit", "xnoreme", "xunmenu", "abo", "aboveleft", "argdo", "au", "bel", "belowright", "bp", "bprevious", "bro", "browse", "cNf", "cNfile", "cadde", "caddexpr", "cbe", "cbefore", "cdo", "cg", "cgetfile", "checkt", "checktime", "cmapc", "cmapclear", "col", "colder", "conf", "confirm", "cr", "crewind", "cw", "cwindow", "delep", "dell", "diffg", "diffget", "dig", "digraphs", "doau", "e", "edit", "echon", "endfo", "endfor", "exi", "exit", "filt", "filter", "fo", "fold", "fu", "function", "gvim", "helpt", "helptags", "iabc", "iabclear", "inor", "ju", "jumps", "keepp", "keeppatterns", "lad", "laddexpr", "later", "lch", "lchdir", "lefta", "leftabove", "lgetb", "lgetbuffer", "ll", "lne", "lnext", "loc", "lockmarks", "lr", "lrewind", "lv", "lvimgrep", "marks", "mks", "mksession", "mzf", "mzfile", "nmapc", "nmapclear", "nos", "noswapfile", "opt", "options", "pe", "perl", "pre", "preserve", "promptr", "promptrepl", "ptl", "ptlast", "pw", "pwd", "pydo", "pyxfile", "red", "redo", "res", "resize", "ru", "runtime", "sI", "sIp", "sav", "saveas", "sbm", "sbmodified", "sce", "scripte", "scriptencoding", "setg", "setglobal", "sgc", "sgr", "sign", "sl", "sleep", "smile", "sor", "sort", "spellrepall", "srI", "srn", "startg", "startgreplace", "sun", "sunhide", "sw", "swapname", "syntime", "tabN", "tabNext", "tabfir", "tabfirst", "tabo", "tabonly", "tc", "tcl", "te", "tearoff", "tl", "tlast", "tlu", "tn", "tnext", "try", "una", "unabbreviate", "unlo", "unlockvar", "verb", "verbose", "vimgrepa", "vimgrepadd", "wN", "wNext", "winc", "wincmd", "wq", "xa", "xall", "xnoremenu", "xwininfo", "addd", "arge", "argedit", "bN", "bNext", "bf", "bfirst", "br", "brewind", "bufdo", "c", "change", "caddf", "caddfile", "cbel", "cbelow", "ce", "center", "cgetb", "cgetbuffer", "chi", "chistory", "cn", "cnext", "colo", "colorscheme", "cons", "const", "cs", "d", "delete", "deletel", "delm", "delmarks", "diffo", "diffoff", "dir", "doaut", "ea", "el", "else", "endt", "endtry", "exu", "exusage", "fin", "find", "foldc", "foldclose", "g", "h", "help", "hi", "if", "intro", "k", "lN", "lNext", "laddb", "laddbuffer", "lb", "lbuffer", "lcl", "lclose", "lex", "lexpr", "lgete", "lgetexpr", "lla", "llast", "lnew", "lnewer", "lockv", "lockvar", "ls", "lvimgrepa", "lvimgrepadd", "mat", "match", "mksp", "mkspell", "n", "next", "noa", "nu", "number", "ownsyntax", "ped", "pedit", "prev", "previous", "ps", "psearch", "ptn", "ptnext", "py3", "pyf", "pyfile", "q", "quit", "redi", "redir", "ret", "retab", "rub", "ruby", "sIc", "sIr", "sbN", "sbNext", "sbn", "sbnext", "scg", "scriptv", "scriptversion", "setl", "setlocal", "sge", "sh", "shell", "sil", "silent", "sla", "slast", "sn", "snext", "sp", "split", "spellrrare", "src", "srp", "startr", "startreplace", "sunme", "sy", "t", "tabc", "tabclose", "tabl", "tablast", "tabp", "tabprevious", "tcd", "ter", "terminal", "tlm", "tlunmenu", "tno", "tnoremap", "ts", "tselect", "undoj", "undojoin", "uns", "unsilent", "vert", "vertical", "viu", "viusage", "w", "write", "windo", "wqa", "wqall", "xmapc", "xmapclear", "xprop", "y", "yank", "al", "all", "argg", "argglobal", "b", "buffer", "bl", "blast", "brea", "break", "buffers", "ca", "caf", "cafter", "cbo", "cbottom", "cex", "cexpr", "cgete", "cgetexpr", "cl", "clist", "cnew", "cnewer", "com", "cope", "copen", "cscope", "debug", "deletep", "delp", "diffp", "diffpatch", "dj", "djump", "dp", "earlier", "elsei", "elseif", "endw", "endwhile", "f", "file", "fina", "finally", "foldd", "folddoopen", "go", "goto", "ha", "hardcopy", "hid", "hide", "ij", "ijump", "is", "isearch", "kee", "keepmarks", "lNf", "lNfile", "laddf", "laddfile", "lbe", "lbefore", "lcs", "lf", "lfile", "lgr", "lgrep", "lli", "llist", "lnf", "lnfile", "lol", "lolder", "lt", "ltag", "lw", "lwindow", "menut", "menutranslate", "mkv", "mkvimrc", "nb", "nbkey", "noautocmd", "o", "open", "p", "print", "perld", "perldo", "pro", "ptN", "ptNext", "ptp", "ptprevious", "py3do", "python3", "qa", "qall", "redr", "redraw", "retu", "return", "rubyd", "rubydo", "sIe", "sN", "sNext", "sb", "sbuffer", "sbp", "sbprevious", "sci", "scs", "sf", "sfind", "sgi", "si", "sim", "simalt", "smagic", "sno", "snomagic", "spe", "spellgood", "spellu", "spellundo", "sre", "srewind", "def", "endd", "enddef", "disa", "disassemble", "vim9", "vim9script", "imp", "import", "exp", "export"] kw[:option] = Set.new ["acd", "ambw", "arshape", "background", "ballooneval", "bex", "bl", "brk", "buftype", "cf", "cinkeys", "cmdwinheight", "com", "completeslash", "cpoptions", "cscoperelative", "csre", "cursorcolumn", "delcombine", "digraph", "eadirection", "emo", "equalprg", "expandtab", "fdls", "fex", "fileignorecase", "fml", "foldlevel", "formatexpr", "gcr", "go", "guifontset", "helpheight", "history", "hlsearch", "imaf", "ims", "includeexpr", "infercase", "iskeyword", "keywordprg", "laststatus", "lispwords", "lrm", "magic", "maxfuncdepth", "menuitems", "mm", "modifiable", "mousemodel", "mzq", "numberwidth", "opfunc", "patchexpr", "pfn", "pp", "printfont", "pumwidth", "pythonthreehome", "redrawtime", "ri", "rs", "sb", "scroll", "sect", "sft", "shellredir", "shiftwidth", "showmatch", "signcolumn", "smarttab", "sp", "spf", "srr", "startofline", "suffixes", "switchbuf", "ta", "tagfunc", "tbi", "term", "termwintype", "tgc", "titlelen", "toolbariconsize", "ttimeout", "ttymouse", "twt", "undofile", "varsofttabstop", "verbosefile", "viminfofile", "wak", "weirdinvert", "wig", "wildoptions", "winheight", "wm", "wrapscan", "ai", "anti", "autochdir", "backspace", "balloonevalterm", "bexpr", "bo", "browsedir", "casemap", "cfu", "cino", "cmp", "comments", "concealcursor", "cpp", "cscopetag", "cst", "cursorline", "dex", "dip", "eb", "emoji", "errorbells", "exrc", "fdm", "ff", "filetype", "fmr", "foldlevelstart", "formatlistpat", "gd", "gp", "guifontwide", "helplang", "hk", "ic", "imak", "imsearch", "incsearch", "insertmode", "isp", "km", "lazyredraw", "list", "ls", "makeef", "maxmapdepth", "mfd", "mmd", "modified", "mouses", "mzquantum", "nuw", "osfiletype", "patchmode", "ph", "preserveindent", "printheader", "pvh", "pyx", "regexpengine", "rightleft", "rtp", "sbo", "scrollbind", "sections", "sh", "shellslash", "shm", "showmode", "siso", "smc", "spc", "spl", "ss", "statusline", "suffixesadd", "sws", "tabline", "taglength", "tbidi", "termbidi", "terse", "tgst", "titleold", "top", "ttimeoutlen", "ttyscroll", "tx", "undolevels", "vartabstop", "vfile", "virtualedit", "warn", "wfh", "wildchar", "wim", "winminheight", "wmh", "write", "akm", "antialias", "autoindent", "backup", "balloonexpr", "bg", "bomb", "bs", "cb", "ch", "cinoptions", "cms", "commentstring", "conceallevel", "cpt", "cscopetagorder", "csto", "cursorlineopt", "dg", "dir", "ed", "enc", "errorfile", "fcl", "fdn", "ffs", "fillchars", "fo", "foldmarker", "formatoptions", "gdefault", "grepformat", "guiheadroom", "hf", "hkmap", "icon", "imc", "imsf", "inde", "is", "isprint", "kmp", "lbr", "listchars", "lsp", "makeencoding", "maxmem", "mh", "mmp", "more", "mouseshape", "mzschemedll", "odev", "pa", "path", "pheader", "previewheight", "printmbcharset", "pvp", "pyxversion", "relativenumber", "rightleftcmd", "ru", "sbr", "scrollfocus", "secure", "shcf", "shelltemp", "shortmess", "showtabline", "sj", "smd", "spell", "splitbelow", "ssl", "stl", "sw", "sxe", "tabpagemax", "tagrelative", "tbis", "termencoding", "textauto", "thesaurus", "titlestring", "tpm", "ttm", "ttytype", "uc", "undoreload", "vb", "vi", "visualbell", "wb", "wfw", "wildcharm", "winaltkeys", "winminwidth", "wmnu", "writeany", "al", "ar", "autoread", "backupcopy", "bdir", "bh", "breakat", "bsdir", "cc", "charconvert", "cinw", "co", "compatible", "confirm", "crb", "cscopeverbose", "csverb", "cwh", "dict", "directory", "edcompatible", "encoding", "errorformat", "fcs", "fdo", "fic", "fixendofline", "foldclose", "foldmethod", "formatprg", "gfm", "grepprg", "guioptions", "hh", "hkmapp", "iconstring", "imcmdline", "imst", "indentexpr", "isf", "joinspaces", "kp", "lcs", "lm", "luadll", "makeprg", "maxmempattern", "mis", "mmt", "mouse", "mouset", "mzschemegcdll", "oft", "packpath", "pdev", "pi", "previewpopup", "printmbfont", "pvw", "qe", "remap", "rl", "rubydll", "sc", "scrolljump", "sel", "shell", "shelltype", "shortname", "shq", "slm", "sn", "spellcapcheck", "splitright", "ssop", "stmp", "swapfile", "sxq", "tabstop", "tags", "tbs", "termguicolors", "textmode", "tildeop", "tl", "tr", "tty", "tw", "udf", "updatecount", "vbs", "viewdir", "vop", "wc", "wh", "wildignore", "wincolor", "winptydll", "wmw", "writebackup", "aleph", "arab", "autowrite", "backupdir", "bdlay", "bin", "breakindent", "bsk", "ccv", "ci", "cinwords", "cocu", "complete", "copyindent", "cryptmethod", "csl", "cuc", "debug", "dictionary", "display", "ef", "endofline", "esckeys", "fdc", "fdt", "fileencoding", "fixeol", "foldcolumn", "foldminlines", "fp", "gfn", "gtl", "guipty", "hi", "hkp", "ignorecase", "imd", "imstatusfunc", "indentkeys", "isfname", "js", "langmap", "linebreak", "lmap", "lw", "mat", "maxmemtot", "mkspellmem", "mod", "mousef", "mousetime", "nf", "ofu", "para", "penc", "pm", "previewwindow", "printoptions", "pw", "quoteescape", "renderoptions", "rlc", "ruf", "scb", "scrolloff", "selection", "shellcmdflag", "shellxescape", "showbreak", "si", "sm", "so", "spellfile", "spr", "st", "sts", "swapsync", "syn", "tag", "tagstack", "tc", "termwinkey", "textwidth", "timeout", "tm", "ts", "ttybuiltin", "twk", "udir", "updatetime", "vdir", "viewoptions", "vsts", "wcm", "whichwrap", "wildignorecase", "window", "winwidth", "wop", "writedelay", "allowrevins", "arabic", "autowriteall", "backupext", "belloff", "binary", "breakindentopt", "bt", "cd", "cin", "clipboard", "cole", "completefunc", "cot", "cscopepathcomp", "cspc", "cul", "deco", "diff", "dy", "efm", "eol", "et", "fde", "fen", "fileencodings", "fk", "foldenable", "foldnestmax", "fs", "gfs", "gtt", "guitablabel", "hid", "hl", "im", "imdisable", "imstyle", "indk", "isi", "key", "langmenu", "lines", "lnr", "lz", "matchpairs", "mco", "ml", "modeline", "mousefocus", "mp", "nrformats", "omnifunc", "paragraphs", "perldll", "pmbcs", "printdevice", "prompt", "pythondll", "rdt", "report", "rnu", "ruler", "scf", "scrollopt", "selectmode", "shellpipe", "shellxquote", "showcmd", "sidescroll", "smartcase", "softtabstop", "spelllang", "sps", "sta", "su", "swb", "synmaxcol", "tagbsearch", "tal", "tcldll", "termwinscroll", "tf", "timeoutlen", "to", "tsl", "ttyfast", "tws", "ul", "ur", "ve", "vif", "vts", "wcr", "wi", "wildmenu", "winfixheight", "wiv", "wrap", "ws", "altkeymap", "arabicshape", "aw", "backupskip", "beval", "bk", "bri", "bufhidden", "cdpath", "cindent", "cm", "colorcolumn", "completeopt", "cp", "cscopeprg", "csprg", "culopt", "def", "diffexpr", "ea", "ei", "ep", "eventignore", "fdi", "fenc", "fileformat", "fkmap", "foldexpr", "foldopen", "fsync", "gfw", "guicursor", "guitabtooltip", "hidden", "hlg", "imactivatefunc", "imi", "inc", "inex", "isident", "keymap", "langnoremap", "linespace", "loadplugins", "ma", "matchtime", "mef", "mle", "modelineexpr", "mousehide", "mps", "nu", "opendevice", "paste", "pex", "pmbfn", "printencoding", "pt", "pythonhome", "re", "restorescreen", "ro", "rulerformat", "scl", "scs", "sessionoptions", "shellquote", "shiftround", "showfulltag", "sidescrolloff", "smartindent", "sol", "spellsuggest", "sr", "stal", "sua", "swf", "syntax", "tagcase", "tb", "tenc", "termwinsize", "tfu", "title", "toolbar", "tsr", "ttym", "twsl", "undodir", "ut", "verbose", "viminfo", "wa", "wd", "wic", "wildmode", "winfixwidth", "wiw", "wrapmargin", "ww", "ambiwidth", "ari", "awa", "balloondelay", "bevalterm", "bkc", "briopt", "buflisted", "cedit", "cink", "cmdheight", "columns", "completepopup", "cpo", "cscopequickfix", "csqf", "cursorbind", "define", "diffopt", "ead", "ek", "equalalways", "ex", "fdl", "fencs", "fileformats", "flp", "foldignore", "foldtext", "ft", "ghr", "guifont", "helpfile", "highlight", "hls", "imactivatekey", "iminsert", "include", "inf", "isk", "keymodel", "langremap", "lisp", "lpl", "macatsui", "maxcombine", "menc", "mls", "modelines", "mousem", "msm", "number", "operatorfunc", "pastetoggle", "pexpr", "popt", "printexpr", "pumheight", "pythonthreedll", "readonly", "revins", "rop", "runtimepath", "scr", "noacd", "noallowrevins", "noantialias", "noarabic", "noarshape", "noautoread", "noaw", "noballooneval", "nobevalterm", "nobk", "nobreakindent", "nocf", "nocindent", "nocopyindent", "nocscoperelative", "nocsre", "nocuc", "nocursorcolumn", "nodelcombine", "nodigraph", "noed", "noemo", "noeol", "noesckeys", "noexpandtab", "nofic", "nofixeol", "nofoldenable", "nogd", "nohid", "nohkmap", "nohls", "noicon", "noimc", "noimdisable", "noinfercase", "nojoinspaces", "nolangremap", "nolinebreak", "nolnr", "nolrm", "nomacatsui", "noml", "nomod", "nomodelineexpr", "nomodified", "nomousef", "nomousehide", "nonumber", "noopendevice", "nopi", "nopreviewwindow", "nopvw", "norelativenumber", "norestorescreen", "nori", "norl", "noro", "noru", "nosb", "noscb", "noscrollbind", "noscs", "nosft", "noshelltemp", "noshortname", "noshowfulltag", "noshowmode", "nosm", "nosmartindent", "nosmd", "nosol", "nosplitbelow", "nospr", "nossl", "nostartofline", "noswapfile", "nota", "notagrelative", "notbi", "notbs", "noterse", "notextmode", "notgst", "notimeout", "noto", "notr", "nottybuiltin", "notx", "noundofile", "novisualbell", "nowarn", "noweirdinvert", "nowfw", "nowildignorecase", "nowinfixheight", "nowiv", "nowrap", "nowrite", "nowritebackup", "noai", "noaltkeymap", "noar", "noarabicshape", "noautochdir", "noautowrite", "noawa", "noballoonevalterm", "nobin", "nobl", "nobri", "noci", "nocompatible", "nocp", "nocscopetag", "nocst", "nocul", "nocursorline", "nodg", "noea", "noedcompatible", "noemoji", "noequalalways", "noet", "noexrc", "nofileignorecase", "nofk", "nofs", "nogdefault", "nohidden", "nohkmapp", "nohlsearch", "noignorecase", "noimcmdline", "noincsearch", "noinsertmode", "nojs", "nolazyredraw", "nolisp", "noloadplugins", "nolz", "nomagic", "nomle", "nomodeline", "nomodifiable", "nomore", "nomousefocus", "nonu", "noodev", "nopaste", "nopreserveindent", "noprompt", "noreadonly", "noremap", "norevins", "norightleft", "nornu", "nors", "noruler", "nosc", "noscf", "noscrollfocus", "nosecure", "noshellslash", "noshiftround", "noshowcmd", "noshowmatch", "nosi", "nosmartcase", "nosmarttab", "nosn", "nospell", "nosplitright", "nosr", "nosta", "nostmp", "noswf", "notagbsearch", "notagstack", "notbidi", "notermbidi", "notextauto", "notf", "notildeop", "notitle", "notop", "nottimeout", "nottyfast", "noudf", "novb", "nowa", "nowb", "nowfh", "nowic", "nowildmenu", "nowinfixwidth", "nowmnu", "nowrapscan", "nowriteany", "nows", "noakm", "noanti", "noarab", "noari", "noautoindent", "noautowriteall", "nobackup", "nobeval", "nobinary", "nobomb", "nobuflisted", "nocin", "noconfirm", "nocrb", "nocscopeverbose", "nocsverb", "nocursorbind", "nodeco", "nodiff", "noeb", "noek", "noendofline", "noerrorbells", "noex", "nofen", "nofixendofline", "nofkmap", "nofsync", "noguipty", "nohk", "nohkp", "noic", "noim", "noimd", "noinf", "nois", "nolangnoremap", "nolbr", "nolist", "nolpl", "noma", "nomh", "invacd", "invallowrevins", "invantialias", "invarabic", "invarshape", "invautoread", "invaw", "invballooneval", "invbevalterm", "invbk", "invbreakindent", "invcf", "invcindent", "invcopyindent", "invcscoperelative", "invcsre", "invcuc", "invcursorcolumn", "invdelcombine", "invdigraph", "inved", "invemo", "inveol", "invesckeys", "invexpandtab", "invfic", "invfixeol", "invfoldenable", "invgd", "invhid", "invhkmap", "invhls", "invicon", "invimc", "invimdisable", "invinfercase", "invjoinspaces", "invlangremap", "invlinebreak", "invlnr", "invlrm", "invmacatsui", "invml", "invmod", "invmodelineexpr", "invmodified", "invmousef", "invmousehide", "invnumber", "invopendevice", "invpi", "invpreviewwindow", "invpvw", "invrelativenumber", "invrestorescreen", "invri", "invrl", "invro", "invru", "invsb", "invscb", "invscrollbind", "invscs", "invsft", "invshelltemp", "invshortname", "invshowfulltag", "invshowmode", "invsm", "invsmartindent", "invsmd", "invsol", "invsplitbelow", "invspr", "invssl", "invstartofline", "invswapfile", "invta", "invtagrelative", "invtbi", "invtbs", "invterse", "invtextmode", "invtgst", "invtimeout", "invto", "invtr", "invttybuiltin", "invtx", "invundofile", "invvisualbell", "invwarn", "invweirdinvert", "invwfw", "invwildignorecase", "invwinfixheight", "invwiv", "invwrap", "invwrite", "invwritebackup", "invai", "invaltkeymap", "invar", "invarabicshape", "invautochdir", "invautowrite", "invawa", "invballoonevalterm", "invbin", "invbl", "invbri", "invci", "invcompatible", "invcp", "invcscopetag", "invcst", "invcul", "invcursorline", "invdg", "invea", "invedcompatible", "invemoji", "invequalalways", "invet", "invexrc", "invfileignorecase", "invfk", "invfs", "invgdefault", "invhidden", "invhkmapp", "invhlsearch", "invignorecase", "invimcmdline", "invincsearch", "invinsertmode", "invjs", "invlazyredraw", "invlisp", "invloadplugins", "invlz", "invmagic", "invmle", "invmodeline", "invmodifiable", "invmore", "invmousefocus", "invnu", "invodev", "invpaste", "invpreserveindent", "invprompt", "invreadonly", "invremap", "invrevins", "invrightleft", "invrnu", "invrs", "invruler", "invsc", "invscf", "invscrollfocus", "invsecure", "invshellslash", "invshiftround", "invshowcmd", "invshowmatch", "invsi", "invsmartcase", "invsmarttab", "invsn", "invspell", "invsplitright", "invsr", "invsta", "invstmp", "invswf", "invtagbsearch", "invtagstack", "invtbidi", "invtermbidi", "invtextauto", "invtf", "invtildeop", "invtitle", "invtop", "invttimeout", "invttyfast", "invudf", "invvb", "invwa", "invwb", "invwfh", "invwic", "invwildmenu", "invwinfixwidth", "invwmnu", "invwrapscan", "invwriteany", "invws", "invakm", "invanti", "invarab", "invari", "invautoindent", "invautowriteall", "invbackup", "invbeval", "invbinary", "invbomb", "invbuflisted", "invcin", "invconfirm", "invcrb", "invcscopeverbose", "invcsverb", "invcursorbind", "invdeco", "invdiff", "inveb", "invek", "invendofline", "inverrorbells", "invex", "invfen", "invfixendofline", "invfkmap", "invfsync", "invguipty", "invhk", "invhkp", "invic", "invim", "invimd", "invinf", "invis", "invlangnoremap", "invlbr", "invlist", "invlpl", "invma", "invmh", "t_8b", "t_AB", "t_al", "t_bc", "t_BE", "t_ce", "t_cl", "t_Co", "t_Cs", "t_CV", "t_db", "t_DL", "t_EI", "t_F2", "t_F4", "t_F6", "t_F8", "t_fs", "t_IE", "t_k1", "t_k2", "t_K3", "t_K4", "t_K5", "t_K6", "t_K7", "t_K8", "t_K9", "t_kb", "t_KB", "t_kd", "t_KD", "t_ke", "t_KE", "t_KF", "t_KG", "t_kh", "t_KH", "t_kI", "t_KI", "t_KJ", "t_KK", "t_kl", "t_KL", "t_kN", "t_kP", "t_kr", "t_ks", "t_ku", "t_le", "t_mb", "t_md", "t_me", "t_mr", "t_ms", "t_nd", "t_op", "t_PE", "t_PS", "t_RB", "t_RC", "t_RF", "t_Ri", "t_RI", "t_RS", "t_RT", "t_RV", "t_Sb", "t_SC", "t_se", "t_Sf", "t_SH", "t_Si", "t_SI", "t_so", "t_sr", "t_SR", "t_ST", "t_te", "t_Te", "t_TE", "t_ti", "t_TI", "t_ts", "t_Ts", "t_u7", "t_ue", "t_us", "t_ut", "t_vb", "t_ve", "t_vi", "t_vs", "t_VS", "t_WP", "t_WS", "t_xn", "t_xs", "t_ZH", "t_ZR", "t_8f", "t_AF", "t_AL", "t_BD", "t_cd", "t_Ce", "t_cm", "t_cs", "t_CS", "t_da", "t_dl", "t_EC", "t_F1", "t_F3", "t_F5", "t_F7", "t_F9", "t_GP", "t_IS", "t_K1", "t_k3", "t_k4", "t_k5", "t_k6", "t_k7", "t_k8", "t_k9", "t_KA", "t_kB", "t_KC", "t_kD"] kw[:auto] = Set.new ["BufAdd", "BufDelete", "BufFilePost", "BufHidden", "BufNew", "BufRead", "BufReadPost", "BufUnload", "BufWinEnter", "BufWinLeave", "BufWipeout", "BufWrite", "BufWriteCmd", "BufWritePost", "BufWritePre", "CmdlineChanged", "CmdlineEnter", "CmdlineLeave", "CmdUndefined", "CmdwinEnter", "CmdwinLeave", "ColorScheme", "ColorSchemePre", "CompleteChanged", "CompleteDone", "CompleteDonePre", "CursorHold", "CursorHoldI", "CursorMoved", "CursorMovedI", "DiffUpdated", "DirChanged", "EncodingChanged", "ExitPre", "FileAppendCmd", "FileAppendPost", "FileAppendPre", "FileChangedRO", "FileChangedShell", "FileChangedShellPost", "FileEncoding", "FileReadCmd", "FileReadPost", "FileReadPre", "FileType", "FileWriteCmd", "FileWritePost", "FileWritePre", "FilterReadPost", "FilterReadPre", "FilterWritePost", "FilterWritePre", "FocusGained", "FocusLost", "FuncUndefined", "GUIEnter", "GUIFailed", "InsertChange", "InsertCharPre", "InsertEnter", "InsertLeave", "MenuPopup", "OptionSet", "QuickFixCmdPost", "QuickFixCmdPre", "QuitPre", "RemoteReply", "SafeState", "SafeStateAgain", "SessionLoadPost", "ShellCmdPost", "ShellFilterPost", "SourceCmd", "SourcePost", "SourcePre", "SpellFileMissing", "StdinReadPost", "StdinReadPre", "SwapExists", "Syntax", "TabClosed", "TabEnter", "TabLeave", "TabNew", "TermChanged", "TerminalOpen", "TerminalWinOpen", "TermResponse", "TextChanged", "TextChangedI", "TextChangedP", "TextYankPost", "User", "VimEnter", "VimLeave", "VimLeavePre", "VimResized", "WinEnter", "WinLeave", "WinNew", "BufCreate", "BufEnter", "BufFilePre", "BufLeave", "BufNewFile", "BufReadCmd", "BufReadPre"] kw[:function] = Set.new ["abs", "appendbufline", "asin", "assert_fails", "assert_notmatch", "balloon_gettext", "bufadd", "bufname", "byteidx", "char2nr", "ch_evalexpr", "ch_log", "ch_readraw", "cindent", "complete_check", "cosh", "deepcopy", "diff_hlID", "eval", "exists", "feedkeys", "findfile", "fnamemodify", "foldtextresult", "get", "getchar", "getcmdtype", "getenv", "getftype", "getmatches", "getreg", "gettagstack", "getwinvar", "has_key", "histget", "iconv", "inputlist", "interrupt", "isnan", "job_start", "js_encode", "libcall", "list2str", "log", "mapcheck", "matchdelete", "max", "nextnonblank", "popup_atcursor", "popup_dialog", "popup_getoptions", "popup_notification", "prevnonblank", "prop_add", "prop_type_add", "pum_getpos", "rand", "reg_recording", "remote_foreground", "remove", "round", "screencol", "searchdecl", "serverlist", "setenv", "setpos", "settagstack", "sign_define", "sign_placelist", "sin", "sound_playevent", "split", "str2list", "strftime", "strpart", "submatch", "synID", "systemlist", "taglist", "term_dumpload", "term_getcursor", "term_getstatus", "term_sendkeys", "term_setsize", "test_autochdir", "test_getvalue", "test_null_dict", "test_null_string", "test_scrollbar", "test_unknown", "timer_start", "toupper", "type", "values", "winbufnr", "win_findbuf", "winheight", "winline", "winsaveview", "winwidth", "acos", "argc", "assert_beeps", "assert_false", "assert_report", "balloon_show", "bufexists", "bufnr", "byteidxcomp", "ch_canread", "ch_evalraw", "ch_logfile", "ch_sendexpr", "clearmatches", "complete_info", "count", "delete", "echoraw", "eventhandler", "exp", "filereadable", "float2nr", "foldclosed", "foreground", "getbufinfo", "getcharmod", "getcmdwintype", "getfontname", "getimstatus", "getmousepos", "getregtype", "getwininfo", "glob", "haslocaldir", "histnr", "indent", "inputrestore", "invert", "items", "job_status", "json_decode", "libcallnr", "listener_add", "log10", "match", "matchend", "min", "nr2char", "popup_beval", "popup_filter_menu", "popup_getpos", "popup_setoptions", "printf", "prop_clear", "prop_type_change", "pumvisible", "range", "reltime", "remote_peek", "rename", "rubyeval", "screenpos", "searchpair", "setbufline", "setfperm", "setqflist", "setwinvar", "sign_getdefined", "sign_undefine", "sinh", "sound_playfile", "sqrt", "str2nr", "strgetchar", "strptime", "substitute", "synIDattr", "tabpagebuflist", "tan", "term_dumpwrite", "term_getjob", "term_gettitle", "term_setansicolors", "term_start", "test_feedinput", "test_ignore_error", "test_null_job", "test_option_not_set", "test_setmouse", "test_void", "timer_stop", "tr", "undofile", "virtcol", "wincol", "win_getid", "win_id2tabwin", "winnr", "win_screenpos", "wordcount", "add", "argidx", "assert_equal", "assert_inrange", "assert_true", "balloon_split", "buflisted", "bufwinid", "call", "ch_close", "ch_getbufnr", "ch_open", "ch_sendraw", "col", "confirm", "cscope_connection", "deletebufline", "empty", "executable", "expand", "filewritable", "floor", "foldclosedend", "funcref", "getbufline", "getcharsearch", "getcompletion", "getfperm", "getjumplist", "getpid", "gettabinfo", "getwinpos", "glob2regpat", "hasmapto", "hlexists", "index", "inputsave", "isdirectory", "job_getchannel", "job_stop", "json_encode", "line", "listener_flush", "luaeval", "matchadd", "matchlist", "mkdir", "or", "popup_clear", "popup_filter_yesno", "popup_hide", "popup_settext", "prompt_setcallback", "prop_find", "prop_type_delete", "py3eval", "readdir", "reltimefloat", "remote_read", "repeat", "screenattr", "screenrow", "searchpairpos", "setbufvar", "setline", "setreg", "sha256", "sign_getplaced", "sign_unplace", "sort", "sound_stop", "srand", "strcharpart", "stridx", "strridx", "swapinfo", "synIDtrans", "tabpagenr", "tanh", "term_getaltscreen", "term_getline", "term_gettty", "term_setapi", "term_wait", "test_garbagecollect_now", "test_null_blob", "test_null_list", "test_override", "test_settime", "timer_info", "timer_stopall", "trim", "undotree", "visualmode", "windowsversion", "win_gettype", "win_id2win", "winrestcmd", "win_splitmove", "writefile", "and", "arglistid", "assert_equalfile", "assert_match", "atan", "browse", "bufload", "bufwinnr", "ceil", "ch_close_in", "ch_getjob", "ch_read", "ch_setoptions", "complete", "copy", "cursor", "did_filetype", "environ", "execute", "expandcmd", "filter", "fmod", "foldlevel", "function", "getbufvar", "getcmdline", "getcurpos", "getfsize", "getline", "getpos", "gettabvar", "getwinposx", "globpath", "histadd", "hlID", "input", "inputsecret", "isinf", "job_info", "join", "keys", "line2byte", "listener_remove", "map", "matchaddpos", "matchstr", "mode", "pathshorten", "popup_close", "popup_findinfo", "popup_menu", "popup_show", "prompt_setinterrupt", "prop_list", "prop_type_get", "pyeval", "readfile", "reltimestr", "remote_send", "resolve", "screenchar", "screenstring", "searchpos", "setcharsearch", "setloclist", "settabvar", "shellescape", "sign_jump", "sign_unplacelist", "sound_clear", "spellbadword", "state", "strchars", "string", "strtrans", "swapname", "synstack", "tabpagewinnr", "tempname", "term_getansicolors", "term_getscrolled", "term_list", "term_setkill", "test_alloc_fail", "test_garbagecollect_soon", "test_null_channel", "test_null_partial", "test_refcount", "test_srand_seed", "timer_pause", "tolower", "trunc", "uniq", "wildmenumode", "win_execute", "win_gotoid", "winlayout", "winrestview", "win_type", "xor", "append", "argv", "assert_exception", "assert_notequal", "atan2", "browsedir", "bufloaded", "byte2line", "changenr", "chdir", "ch_info", "ch_readblob", "ch_status", "complete_add", "cos", "debugbreak", "diff_filler", "escape", "exepath", "extend", "finddir", "fnameescape", "foldtext", "garbagecollect", "getchangelist", "getcmdpos", "getcwd", "getftime", "getloclist", "getqflist", "gettabwinvar", "getwinposy", "has", "histdel", "hostname", "inputdialog", "insert", "islocked", "job_setoptions", "js_decode", "len", "lispindent", "localtime", "maparg", "matcharg", "matchstrpos", "mzeval", "perleval", "popup_create", "popup_findpreview", "popup_move", "pow", "prompt_setprompt", "prop_remove", "prop_type_list", "pyxeval", "reg_executing", "remote_expr", "remote_startserver", "reverse", "screenchars", "search", "server2client", "setcmdpos", "setmatches", "settabwinvar", "shiftwidth", "sign_place", "simplify", "soundfold", "spellsuggest", "str2float", "strdisplaywidth", "strlen", "strwidth", "synconcealed", "system", "tagfiles", "term_dumpdiff", "term_getattr", "term_getsize", "term_scrape", "term_setrestore"] end end end end endrouge-3.28.0/lib/rouge/lexers/vue.rb000066400000000000000000000054211417417255300172550ustar00rootroot00000000000000# frozen_string_literal: true module Rouge module Lexers load_lexer 'html.rb' class Vue < HTML desc 'Vue.js single-file components' tag 'vue' aliases 'vuejs' filenames '*.vue' mimetypes 'text/x-vue', 'application/x-vue' def initialize(*) super @js = Javascript.new(options) end def lookup_lang(lang) lang.downcase! lang = lang.gsub(/["']*/, '') case lang when 'html' then HTML when 'css' then CSS when 'javascript' then Javascript when 'sass' then Sass when 'scss' then Scss when 'coffee' then Coffeescript # TODO: add more when the lexers are done else PlainText end end start { @js.reset! } prepend :root do rule %r/(<)(\s*)(template)/ do groups Name::Tag, Text, Keyword @lang = HTML push :template push :lang_tag end rule %r/(<)(\s*)(style)/ do groups Name::Tag, Text, Keyword @lang = CSS push :style push :lang_tag end rule %r/(<)(\s*)(script)/ do groups Name::Tag, Text, Keyword @lang = Javascript push :script push :lang_tag end end prepend :tag do rule %r/[a-zA-Z0-9_:#\[\]()*.-]+\s*=\s*/m, Name::Attribute, :attr end state :style do rule %r/(<\s*\/\s*)(style)(\s*>)/ do groups Name::Tag, Keyword, Name::Tag pop! end mixin :style_content mixin :embed end state :script do rule %r/(<\s*\/\s*)(script)(\s*>)/ do groups Name::Tag, Keyword, Name::Tag pop! end mixin :script_content mixin :embed end state :lang_tag do rule %r/(lang\s*=)(\s*)("(?:\\.|[^\\])*?"|'(\\.|[^\\])*?'|[^\s>]+)/ do |m| groups Name::Attribute, Text, Str @lang = lookup_lang(m[3]) end mixin :tag end state :template do rule %r((<\s*/\s*)(template)(\s*>)) do groups Name::Tag, Keyword, Name::Tag pop! end rule %r/{{/ do token Str::Interpol push :template_interpol @js.reset! end mixin :embed end state :template_interpol do rule %r/}}/, Str::Interpol, :pop! rule %r/}/, Error mixin :template_interpol_inner end state :template_interpol_inner do rule(/{/) { delegate @js; push } rule(/}/) { delegate @js; pop! } rule(/[^{}]+/) { delegate @js } end state :embed do rule(/[^{<]+/) { delegate @lang } rule(/[<{][^<{]*/) { delegate @lang } end end end end rouge-3.28.0/lib/rouge/lexers/wollok.rb000066400000000000000000000054071417417255300177710ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Wollok < RegexLexer title 'Wollok' desc 'Wollok lang' tag 'wollok' filenames '*.wlk', '*.wtest', '*.wpgm' keywords = %w(new super return if else var const override constructor) entity_name = /[a-zA-Z][a-zA-Z0-9]*/ variable_naming = /_?#{entity_name}/ entities = [] state :whitespaces_and_comments do rule %r/\s+/m, Text::Whitespace rule %r(//.*$), Comment::Single rule %r(/\*(.|\s)*?\*/)m, Comment::Multiline end state :root do mixin :whitespaces_and_comments rule %r/(import)(.+$)/ do groups Keyword::Reserved, Text end rule %r/(class|object|mixin)/, Keyword::Reserved, :foo rule %r/test|program/, Keyword::Reserved #, :chunk_naming rule %r/(package)(\s+)(#{entity_name})/ do groups Keyword::Reserved, Text::Whitespace, Name::Class end rule %r/{|}/, Text mixin :keywords mixin :symbols mixin :objects end state :foo do mixin :whitespaces_and_comments rule %r/inherits|mixed|with|and/, Keyword::Reserved rule %r/#{entity_name}(?=\s*{)/ do |m| token Name::Class entities << m[0] pop! end rule %r/#{entity_name}/ do |m| token Name::Class entities << m[0] end end state :keywords do def any(expressions) /#{expressions.map { |keyword| "#{keyword}\\b" }.join('|')}/ end rule %r/self\b/, Name::Builtin::Pseudo rule any(keywords), Keyword::Reserved rule %r/(method)(\s+)(#{variable_naming})/ do groups Keyword::Reserved, Text::Whitespace, Text end end state :objects do rule variable_naming do |m| variable = m[0] if entities.include?(variable) || ('A'..'Z').cover?(variable[0]) token Name::Class else token Keyword::Variable end end rule %r/\.#{entity_name}/, Text mixin :literals end state :literals do mixin :whitespaces_and_comments rule %r/[0-9]+\.?[0-9]*/, Literal::Number rule %r/"[^"]*"/m, Literal::String rule %r/\[|\#{/, Punctuation, :lists end state :lists do rule %r/,/, Punctuation rule %r/]|}/, Punctuation, :pop! mixin :objects end state :symbols do rule %r/\+\+|--|\+=|-=|\*\*|!/, Operator rule %r/\+|-|\*|\/|%/, Operator rule %r/<=|=>|===|==|<|>/, Operator rule %r/and\b|or\b|not\b/, Operator rule %r/\(|\)|=/, Text rule %r/,/, Punctuation end end end end rouge-3.28.0/lib/rouge/lexers/xml.rb000066400000000000000000000031371417417255300172600ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class XML < RegexLexer title "XML" desc %q(XML) tag 'xml' filenames '*.xml', '*.xsl', '*.rss', '*.xslt', '*.xsd', '*.wsdl', '*.svg', '*.plist' mimetypes 'text/xml', 'application/xml', 'image/svg+xml', 'application/rss+xml', 'application/atom+xml' # Documentation: https://www.w3.org/TR/xml11/#charsets and https://www.w3.org/TR/xml11/#sec-suggested-names def self.detect?(text) return false if text.doctype?(/html/) return true if text =~ /\A<\?xml\b/ return true if text.doctype? end state :root do rule %r/[^<&]+/, Text rule %r/&\S*?;/, Name::Entity rule %r//, Comment::Preproc rule %r//, Comment, :pop! rule %r/-/, Comment end state :tag do rule %r/\s+/m, Text rule %r/[\p{L}:_][\p{Word}\p{Cf}:.·-]*\s*=/m, Name::Attribute, :attr rule %r(/?\s*>), Name::Tag, :pop! end state :attr do rule %r/\s+/m, Text rule %r/".*?"|'.*?'|[^\s>]+/m, Str, :pop! end end end end rouge-3.28.0/lib/rouge/lexers/xojo.rb000066400000000000000000000043221417417255300174340ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class Xojo < RegexLexer title "Xojo" desc "Xojo" tag 'xojo' aliases 'realbasic' filenames '*.xojo_code', '*.xojo_window', '*.xojo_toolbar', '*.xojo_menu', '*.xojo_image', '*.rbbas', '*.rbfrm', '*.rbmnu', '*.rbres', '*.rbtbar' keywords = %w( addhandler aggregates array asc assigns attributes begin break byref byval call case catch class const continue char ctype declare delegate dim do downto each else elseif end enum event exception exit extends false finally for function global goto if implements inherits interface lib loop mod module new next nil object of optional paramarray private property protected public raise raiseevent rect redim removehandler return select shared soft static step sub super then to true try until using uend uhile ) keywords_type = %w( boolean cfstringref cgfloat cstring curency date double int8 int16 int32 int64 integer ostype pstring ptr short single single string structure variant uinteger uint8 uint16 uint32 uint64 ushort windowptr wstring ) operator_words = %w( addressof weakaddressof and as in is isa mod not or xor ) state :root do rule %r/\s+/, Text::Whitespace rule %r/rem\b.*?$/i, Comment::Single rule %r([//'].*$), Comment::Single rule %r/\#tag Note.*?\#tag EndNote/mi, Comment::Preproc rule %r/\s*[#].*$/x, Comment::Preproc rule %r/".*?"/, Literal::String::Double rule %r/[(){}!#,:]/, Punctuation rule %r/\b(?:#{keywords.join('|')})\b/i, Keyword rule %r/\b(?:#{keywords_type.join('|')})\b/i, Keyword::Declaration rule %r/\b(?:#{operator_words.join('|')})\b/i, Operator rule %r/[+-]?(\d+\.\d*|\d*\.\d+)/i, Literal::Number::Float rule %r/[+-]?\d+/, Literal::Number::Integer rule %r/&[CH][0-9a-f]+/i, Literal::Number::Hex rule %r/&O[0-7]+/i, Literal::Number::Oct rule %r/\b[\w\.]+\b/i, Text rule(%r(<=|>=|<>|[=><\+\-\*\/\\]), Operator) end end end end rouge-3.28.0/lib/rouge/lexers/xpath.rb000066400000000000000000000223611417417255300176040ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class XPath < RegexLexer title 'XPath' desc 'XML Path Language (XPath) 3.1' tag 'xpath' filenames '*.xpath' # Terminal literals: # https://www.w3.org/TR/xpath-31/#terminal-symbols def self.digits @digits ||= %r/[0-9]+/ end def self.decimalLiteral @decimalLiteral ||= %r/\.#{digits}|#{digits}\.[0-9]*/ end def self.doubleLiteral @doubleLiteral ||= %r/(\.#{digits})|#{digits}(\.[0-9]*)?[eE][+-]?#{digits}/ end def self.stringLiteral @stringLiteral ||= %r/("(("")|[^"])*")|('(('')|[^'])*')/ end def self.ncName @ncName ||= %r/[a-z_][a-z_\-.0-9]*/i end def self.qName @qName ||= %r/(?:#{ncName})(?::#{ncName})?/ end def self.uriQName @uriQName ||= %r/Q\{[^{}]*\}#{ncName}/ end def self.eqName @eqName ||= %r/(?:#{uriQName}|#{qName})/ end def self.commentStart @commentStart ||= %r/\(:/ end def self.openParen @openParen ||= %r/\((?!:)/ end # Terminal symbols: # https://www.w3.org/TR/xpath-30/#id-terminal-delimitation def self.kindTest @kindTest ||= Regexp.union %w( element attribute schema-element schema-attribute comment text node document-node namespace-node ) end def self.kindTestForPI @kindTestForPI ||= Regexp.union %w(processing-instruction) end def self.axes @axes ||= Regexp.union %w( child descendant attribute self descendant-or-self following-sibling following namespace parent ancestor preceding-sibling preceding ancestor-or-self ) end def self.operators @operators ||= Regexp.union %w(, => = := : >= >> > <= << < - * != + // / || |) end def self.keywords @keywords ||= Regexp.union %w(let for some every if then else return in satisfies) end def self.word_operators @word_operators ||= Regexp.union %w( and or eq ge gt le lt ne is div mod idiv intersect except union to ) end def self.constructorTypes @constructorTypes ||= Regexp.union %w(function array map empty-sequence) end # Mixin states: state :commentsAndWhitespace do rule XPath.commentStart, Comment, :comment rule %r/\s+/m, Text::Whitespace end # Lexical states: # https://www.w3.org/TR/xquery-xpath-parsing/#XPath-lexical-states # https://lists.w3.org/Archives/Public/public-qt-comments/2004Aug/0127.html # https://www.w3.org/TR/xpath-30/#id-revision-log # https://www.w3.org/TR/xpath-31/#id-revision-log state :root do mixin :commentsAndWhitespace # Literals rule XPath.doubleLiteral, Num::Float rule XPath.decimalLiteral, Num::Float rule XPath.digits, Num rule XPath.stringLiteral, Literal::String # Variables rule %r/\$/, Name::Variable, :varname # Operators rule XPath.operators, Operator rule %r/#{XPath.word_operators}\b/, Operator::Word rule %r/#{XPath.keywords}\b/, Keyword rule %r/[?,{}()\[\]]/, Punctuation # Functions rule %r/(function)(\s*)(#{XPath.openParen})/ do # function declaration groups Keyword, Text::Whitespace, Punctuation end rule %r/(map|array|empty-sequence)/, Keyword # constructors rule %r/(#{XPath.kindTest})(\s*)(#{XPath.openParen})/ do # kindtest groups Keyword, Text::Whitespace, Punctuation push :kindtest end rule %r/(#{XPath.kindTestForPI})(\s*)(#{XPath.openParen})/ do # processing instruction kindtest groups Keyword, Text::Whitespace, Punctuation push :kindtestforpi end rule %r/(#{XPath.eqName})(\s*)(#{XPath.openParen})/ do # function call groups Name::Function, Text::Whitespace, Punctuation end rule %r/(#{XPath.eqName})(\s*)(#)(\s*)(\d+)/ do # namedFunctionRef groups Name::Function, Text::Whitespace, Name::Function, Text::Whitespace, Name::Function end # Type commands rule %r/(cast|castable)(\s+)(as)/ do groups Keyword, Text::Whitespace, Keyword push :singletype end rule %r/(treat)(\s+)(as)/ do groups Keyword, Text::Whitespace, Keyword push :itemtype end rule %r/(instance)(\s+)(of)/ do groups Keyword, Text::Whitespace, Keyword push :itemtype end rule %r/(as)\b/ do token Keyword push :itemtype end # Paths rule %r/(#{XPath.ncName})(\s*)(:)(\s*)(\*)/ do groups Name::Tag, Text::Whitespace, Punctuation, Text::Whitespace, Operator end rule %r/(\*)(\s*)(:)(\s*)(#{XPath.ncName})/ do groups Operator, Text::Whitespace, Punctuation, Text::Whitespace, Name::Tag end rule %r/(#{XPath.axes})(\s*)(::)/ do groups Keyword, Text::Whitespace, Operator end rule %r/\.\.|\.|\*/, Operator rule %r/@/, Name::Attribute, :attrname rule XPath.eqName, Name::Tag end state :singletype do mixin :commentsAndWhitespace # Type name rule XPath.eqName do token Keyword::Type pop! end end state :itemtype do mixin :commentsAndWhitespace # Type tests rule %r/(#{XPath.kindTest})(\s*)(#{XPath.openParen})/ do groups Keyword::Type, Text::Whitespace, Punctuation # go to kindtest then occurrenceindicator goto :occurrenceindicator push :kindtest end rule %r/(#{XPath.kindTestForPI})(\s*)(#{XPath.openParen})/ do groups Keyword::Type, Text::Whitespace, Punctuation # go to kindtestforpi then occurrenceindicator goto :occurrenceindicator push :kindtestforpi end rule %r/(item)(\s*)(#{XPath.openParen})(\s*)(\))/ do groups Keyword::Type, Text::Whitespace, Punctuation, Text::Whitespace, Punctuation goto :occurrenceindicator end rule %r/(#{XPath.constructorTypes})(\s*)(#{XPath.openParen})/ do groups Keyword::Type, Text::Whitespace, Punctuation end # Type commands rule %r/(cast|castable)(\s+)(as)/ do groups Keyword, Text::Whitespace, Keyword goto :singletype end rule %r/(treat)(\s+)(as)/ do groups Keyword, Text::Whitespace, Keyword goto :itemtype end rule %r/(instance)(\s+)(of)/ do groups Keyword, Text::Whitespace, Keyword goto :itemtype end rule %r/(as)\b/, Keyword # Operators rule XPath.operators do token Operator pop! end rule %r/#{XPath.word_operators}\b/ do token Operator::Word pop! end rule %r/#{XPath.keywords}\b/ do token Keyword pop! end rule %r/[\[),]/ do token Punctuation pop! end # Other types (e.g. xs:double) rule XPath.eqName do token Keyword::Type goto :occurrenceindicator end end # For pseudo-parameters for the KindTest productions state :kindtest do mixin :commentsAndWhitespace # Pseudo-parameters: rule %r/[?*]/, Operator rule %r/,/, Punctuation rule %r/(element|schema-element)(\s*)(#{XPath.openParen})/ do groups Keyword::Type, Text::Whitespace, Punctuation push :kindtest end rule XPath.eqName, Name::Tag # End of pseudo-parameters rule %r/\)/, Punctuation, :pop! end # Similar to :kindtest, but recognizes NCNames instead of EQNames state :kindtestforpi do mixin :commentsAndWhitespace # Pseudo-parameters rule XPath.ncName, Name rule XPath.stringLiteral, Literal::String # End of pseudo-parameters rule %r/\)/, Punctuation, :pop! end state :occurrenceindicator do mixin :commentsAndWhitespace # Occurrence indicator rule %r/[?*+]/ do token Operator pop! end # Otherwise, lex it in root state: rule %r/(?![?*+])/ do pop! end end state :varname do mixin :commentsAndWhitespace # Function call rule %r/(#{XPath.eqName})(\s*)(#{XPath.openParen})/ do groups Name::Variable, Text::Whitespace, Punctuation pop! end # Variable name rule XPath.eqName, Name::Variable, :pop! end state :attrname do mixin :commentsAndWhitespace # Attribute name rule XPath.eqName, Name::Attribute, :pop! rule %r/\*/, Operator, :pop! end state :comment do # Comment end rule %r/:\)/, Comment, :pop! # Nested comment rule XPath.commentStart, Comment, :comment # Comment contents rule %r/[^:(]+/m, Comment rule %r/[:(]/, Comment end end end end rouge-3.28.0/lib/rouge/lexers/xquery.rb000066400000000000000000000076521417417255300200230ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'xpath.rb' class XQuery < XPath title 'XQuery' desc 'XQuery 3.1: An XML Query Language' tag 'xquery' filenames '*.xquery', '*.xq' mimetypes 'application/xquery' def self.keywords @keywords ||= Regexp.union super, Regexp.union(%w( xquery encoding version declare module namespace copy-namespaces boundary-space construction default collation base-uri preserve strip ordering ordered unordered order empty greatest least preserve no-preserve inherit no-inherit decimal-format decimal-separator grouping-separator infinity minus-sign NaN percent per-mille zero-digit digit pattern-separator exponent-separator import schema at element option function external context item typeswitch switch case try catch validate lax strict type document element attribute text comment processing-instruction for let where order group by return allowing tumbling stable sliding window start end only when previous next count collation ascending descending )) end # Mixin states: state :tags do rule %r/<#{XPath.qName}/, Name::Tag, :start_tag rule %r//, Comment, :pop! rule %r/-/, Comment end state :start_tag do rule %r/\s+/m, Text::Whitespace rule %r/([\w.:-]+\s*=)(")/m do groups Name::Attribute, Str push :quot_attr end rule %r/([\w.:-]+\s*=)(')/m do groups Name::Attribute, Str push :apos_attr end rule %r/>/, Name::Tag, :tag_content rule %r(/>), Name::Tag, :pop! end state :quot_attr do rule %r/"/, Str, :pop! rule %r/\{\{/, Str rule %r/\{/, Punctuation, :root rule %r/[^"{>]+/m, Str end state :apos_attr do rule %r/'/, Str, :pop! rule %r/\{\{/, Str rule %r/\{/, Punctuation, :root rule %r/[^'{>]+/m, Str end state :tag_content do rule %r/\s+/m, Text::Whitespace mixin :tags rule %r/(\{\{|\}\})/, Text rule %r/\{/, Punctuation, :root rule %r/[^{}<&]/, Text rule %r() do token Name::Tag pop! 2 # pop self and tag_start end end end end end rouge-3.28.0/lib/rouge/lexers/yaml.rb000066400000000000000000000235521417417255300174250ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class YAML < RegexLexer title "YAML" desc "Yaml Ain't Markup Language (yaml.org)" mimetypes 'text/x-yaml' tag 'yaml' aliases 'yml' filenames '*.yaml', '*.yml' # Documentation: https://yaml.org/spec/1.2/spec.html def self.detect?(text) # look for the %YAML directive return true if text =~ /\A\s*%YAML/m end SPECIAL_VALUES = Regexp.union(%w(true false null)) # NB: Tabs are forbidden in YAML, which is why you see things # like /[ ]+/. # reset the indentation levels def reset_indent puts " yaml: reset_indent" if @debug @indent_stack = [0] @next_indent = 0 @block_scalar_indent = nil end def indent raise 'empty indent stack!' if @indent_stack.empty? @indent_stack.last end def dedent?(level) level < self.indent end def indent?(level) level > self.indent end # Save a possible indentation level def save_indent(match) @next_indent = match.size puts " yaml: indent: #{self.indent}/#@next_indent" if @debug puts " yaml: popping indent stack - before: #@indent_stack" if @debug if dedent?(@next_indent) @indent_stack.pop while dedent?(@next_indent) puts " yaml: popping indent stack - after: #@indent_stack" if @debug puts " yaml: indent: #{self.indent}/#@next_indent" if @debug # dedenting to a state not previously indented to is an error [match[0...self.indent], match[self.indent..-1]] else [match, ''] end end def continue_indent(match) puts " yaml: continue_indent" if @debug @next_indent += match.size end def set_indent(match, opts={}) if indent < @next_indent puts " yaml: indenting #{indent}/#{@next_indent}" if @debug @indent_stack << @next_indent end @next_indent += match.size unless opts[:implicit] end plain_scalar_start = /[^ \t\n\r\f\v?:,\[\]{}#&*!\|>'"%@`]/ start { reset_indent } state :basic do rule %r/#.*$/, Comment::Single end state :root do mixin :basic rule %r/\n+/, Text # trailing or pre-comment whitespace rule %r/[ ]+(?=#|$)/, Text rule %r/^%YAML\b/ do token Name::Tag reset_indent push :yaml_directive end rule %r/^%TAG\b/ do token Name::Tag reset_indent push :tag_directive end # doc-start and doc-end indicators rule %r/^(?:---|\.\.\.)(?= |$)/ do token Name::Namespace reset_indent push :block_line end # indentation spaces rule %r/[ ]*(?!\s|$)/ do |m| text, err = save_indent(m[0]) token Text, text token Error, err push :block_line; push :indentation end end state :indentation do rule(/\s*?\n/) { token Text; pop! 2 } # whitespace preceding block collection indicators rule %r/[ ]+(?=[-:?](?:[ ]|$))/ do |m| token Text continue_indent(m[0]) end # block collection indicators rule(/[?:-](?=[ ]|$)/) do |m| set_indent m[0] token Punctuation::Indicator end # the beginning of a block line rule(/[ ]*/) { |m| token Text; continue_indent(m[0]); pop! } end # indented line in the block context state :block_line do # line end rule %r/[ ]*(?=#|$)/, Text, :pop! rule %r/[ ]+/, Text # tags, anchors, and aliases mixin :descriptors # block collections and scalars mixin :block_nodes # flow collections and quoed scalars mixin :flow_nodes # a plain scalar rule %r/(?=#{plain_scalar_start}|[?:-][^ \t\n\r\f\v])/ do token Name::Variable push :plain_scalar_in_block_context end end state :descriptors do # a full-form tag rule %r/!<[0-9A-Za-z;\/?:@&=+$,_.!~*'()\[\]%-]+>/, Keyword::Type # a tag in the form '!', '!suffix' or '!handle!suffix' rule %r( (?:![\w-]+)? # handle !(?:[\w;/?:@&=+$,.!~*\'()\[\]%-]*) # suffix )x, Keyword::Type # an anchor rule %r/&[\p{L}\p{Nl}\p{Nd}_-]+/, Name::Label # an alias rule %r/\*[\p{L}\p{Nl}\p{Nd}_-]+/, Name::Variable end state :block_nodes do # implicit key rule %r/([^#,:?\[\]{}"'\n]+)(:)(?=\s|$)/ do |m| groups Name::Attribute, Punctuation::Indicator set_indent m[0], :implicit => true end # literal and folded scalars rule %r/[\|>][+-]?/ do token Punctuation::Indicator push :block_scalar_content push :block_scalar_header end end state :flow_nodes do rule %r/\[/, Punctuation::Indicator, :flow_sequence rule %r/\{/, Punctuation::Indicator, :flow_mapping rule %r/'/, Str::Single, :single_quoted_scalar rule %r/"/, Str::Double, :double_quoted_scalar end state :flow_collection do rule %r/\s+/m, Text mixin :basic rule %r/[?:,]/, Punctuation::Indicator mixin :descriptors mixin :flow_nodes rule %r/(?=#{plain_scalar_start})/ do push :plain_scalar_in_flow_context end end state :flow_sequence do rule %r/\]/, Punctuation::Indicator, :pop! mixin :flow_collection end state :flow_mapping do rule %r/\}/, Punctuation::Indicator, :pop! mixin :flow_collection end state :block_scalar_content do rule %r/\n+/, Text # empty lines never dedent, but they might be part of the scalar. rule %r/^[ ]+$/ do |m| text = m[0] indent_size = text.size indent_mark = @block_scalar_indent || indent_size token Text, text[0...indent_mark] token Name::Constant, text[indent_mark..-1] end # TODO: ^ doesn't actually seem to affect the match at all. # Find a way to work around this limitation. rule %r/^[ ]*/ do |m| token Text indent_size = m[0].size dedent_level = @block_scalar_indent || self.indent @block_scalar_indent ||= indent_size if indent_size < dedent_level save_indent m[0] pop! push :indentation end end rule %r/[^\n\r\f\v]+/, Str end state :block_scalar_header do # optional indentation indicator and chomping flag, in either order rule %r( ( ([1-9])[+-]? | [+-]?([1-9])? )(?=[ ]|$) )x do |m| @block_scalar_indent = nil goto :ignored_line next if m[0].empty? increment = m[1] || m[2] if increment @block_scalar_indent = indent + increment.to_i end token Punctuation::Indicator end end state :ignored_line do mixin :basic rule %r/[ ]+/, Text rule %r/\n/, Text, :pop! end state :quoted_scalar_whitespaces do # leading and trailing whitespace is ignored rule %r/^[ ]+/, Text rule %r/[ ]+$/, Text rule %r/\n+/m, Text rule %r/[ ]+/, Name::Variable end state :single_quoted_scalar do mixin :quoted_scalar_whitespaces rule %r/\\'/, Str::Escape rule %r/'/, Str, :pop! rule %r/[^\s']+/, Str end state :double_quoted_scalar do rule %r/"/, Str, :pop! mixin :quoted_scalar_whitespaces # escapes rule %r/\\[0abt\tn\nvfre "\\N_LP]/, Str::Escape rule %r/\\(?:x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/, Str::Escape rule %r/[^ \t\n\r\f\v"\\]+/, Str end state :plain_scalar_in_block_context_new_line do rule %r/^[ ]+\n/, Text rule %r/\n+/m, Text rule %r/^(?=---|\.\.\.)/ do pop! 3 end # dedent detection rule %r/^[ ]*/ do |m| token Text pop! indent_size = m[0].size # dedent = end of scalar if indent_size <= self.indent pop! save_indent(m[0]) push :indentation end end end state :plain_scalar_in_block_context do # the : indicator ends a scalar rule %r/[ ]*(?=:[ \n]|:$)/, Text, :pop! rule %r/[ ]*:\S+/, Str rule %r/[ ]+(?=#)/, Text, :pop! rule %r/[ ]+$/, Text # check for new documents or dedents at the new line rule %r/\n+/ do token Text push :plain_scalar_in_block_context_new_line end rule %r/[ ]+/, Str rule SPECIAL_VALUES, Name::Constant rule %r/\d+(?:\.\d+)?(?=(\r?\n)| +#)/, Literal::Number, :pop! # regular non-whitespace characters rule %r/[^\s:]+/, Str end state :plain_scalar_in_flow_context do rule %r/[ ]*(?=[,:?\[\]{}])/, Text, :pop! rule %r/[ ]+(?=#)/, Text, :pop! rule %r/^[ ]+/, Text rule %r/[ ]+$/, Text rule %r/\n+/, Text rule %r/[ ]+/, Name::Variable rule %r/[^\s,:?\[\]{}]+/, Name::Variable end state :yaml_directive do rule %r/([ ]+)(\d+\.\d+)/ do groups Text, Num goto :ignored_line end end state :tag_directive do rule %r( ([ ]+)(!|![\w-]*!) # prefix ([ ]+)(!|!?[\w;/?:@&=+$,.!~*'()\[\]%-]+) # tag handle )x do groups Text, Keyword::Type, Text, Keyword::Type goto :ignored_line end end end end end rouge-3.28.0/lib/rouge/lexers/yang.rb000066400000000000000000000110701417417255300174110ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers class YANG < RegexLexer title 'YANG' desc "Lexer for the YANG 1.1 modeling language (RFC7950)" tag 'yang' filenames '*.yang' mimetypes 'application/yang' id = /[\w_-]+(?=[^\w\-\:])\b/ #Keywords from RFC7950 ; oriented at BNF style def self.top_stmts_keywords @top_stms_keywords ||= Set.new %w( module submodule ) end def self.module_header_stmts_keywords @module_header_stmts_keywords ||= Set.new %w( belongs-to namespace prefix yang-version ) end def self.meta_stmts_keywords @meta_stmts_keywords ||= Set.new %w( contact description organization reference revision ) end def self.linkage_stmts_keywords @linkage_stmts_keywords ||= Set.new %w( import include revision-date ) end def self.body_stmts_keywords @body_stms_keywords ||= Set.new %w( action argument augment deviation extension feature grouping identity if-feature input notification output rpc typedef ) end def self.data_def_stmts_keywords @data_def_stms_keywords ||= Set.new %w( anydata anyxml case choice config container deviate leaf leaf-list list must presence refine uses when ) end def self.type_stmts_keywords @type_stmts_keywords ||= Set.new %w( base bit default enum error-app-tag error-message fraction-digits length max-elements min-elements modifier ordered-by path pattern position range require-instance status type units value yin-element ) end def self.list_stmts_keywords @list_stmts_keywords ||= Set.new %w( key mandatory unique ) end #RFC7950 other keywords def self.constants_keywords @constants_keywords ||= Set.new %w( add current delete deprecated false invert-match max min not-supported obsolete replace true unbounded user ) end #RFC7950 Built-In Types def self.types @types ||= Set.new %w( binary bits boolean decimal64 empty enumeration identityref instance-identifier int16 int32 int64 int8 leafref string uint16 uint32 uint64 uint8 union ) end state :comment do rule %r/[^*\/]/, Comment rule %r/\/\*/, Comment, :comment rule %r/\*\//, Comment, :pop! rule %r/[*\/]/, Comment end #Keyword::Reserved #groups Name::Tag, Text::Whitespace state :root do rule %r/\s+/, Text::Whitespace rule %r/[\{\}\;]+/, Punctuation rule %r/(?=\?-]|\.{1,3}/, Operator end state :literals do rule %r/\b(?:true|false|null)\b/, Keyword::Constant rule %r( ' (?: #{escapes} | [^\\] ) ' )x, Str::Char rule %r/"/, Str, :string rule %r/r(#*)".*?"\1/m, Str dot = /[.][0-9_]+/ exp = /e[-+]?[0-9_]+/ rule %r( [0-9]+ (#{dot} #{exp}? |#{dot}? #{exp} ) )x, Num::Float rule %r( ( 0b[10_]+ | 0x[0-9a-fA-F_]+ | [0-9_]+ ) )x, Num::Integer end state :string do rule %r/"/, Str, :pop! rule escapes, Str::Escape rule %r/[^"\\]+/m, Str end end end end rouge-3.28.0/lib/rouge/plugins/000077500000000000000000000000001417417255300163065ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/plugins/redcarpet.rb000066400000000000000000000017621417417255300206120ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # this file is not require'd from the root. To use this plugin, run: # # require 'rouge/plugins/redcarpet' module Rouge module Plugins module Redcarpet def block_code(code, language) lexer = begin Lexer.find_fancy(language, code) rescue Guesser::Ambiguous => e e.alternatives.first end lexer ||= Lexers::PlainText # XXX HACK: Redcarpet strips hard tabs out of code blocks, # so we assume you're not using leading spaces that aren't tabs, # and just replace them here. if lexer.tag == 'make' code.gsub! %r/^ /, "\t" end formatter = rouge_formatter(lexer) formatter.format(lexer.lex(code)) end # override this method for custom formatting behavior def rouge_formatter(lexer) Formatters::HTMLLegacy.new(:css_class => "highlight #{lexer.tag}") end end end end rouge-3.28.0/lib/rouge/regex_lexer.rb000066400000000000000000000335101417417255300174650ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge # @abstract # A stateful lexer that uses sets of regular expressions to # tokenize a string. Most lexers are instances of RegexLexer. class RegexLexer < Lexer class InvalidRegex < StandardError def initialize(re) @re = re end def to_s "regex #{@re.inspect} matches empty string, but has no predicate!" end end class ClosedState < StandardError attr_reader :state def initialize(state) @state = state end def rule @state.rules.last end def to_s rule = @state.rules.last msg = "State :#{state.name} cannot continue after #{rule.inspect}, which will always match." if rule.re.source.include?('*') msg += " Consider replacing * with +." end msg end end # A rule is a tuple of a regular expression to test, and a callback # to perform if the test succeeds. # # @see StateDSL#rule class Rule attr_reader :callback attr_reader :re attr_reader :beginning_of_line def initialize(re, callback) @re = re @callback = callback @beginning_of_line = re.source[0] == ?^ end def inspect "#" end end # a State is a named set of rules that can be tested for or # mixed in. # # @see RegexLexer.state class State attr_reader :name, :rules def initialize(name, rules) @name = name @rules = rules end def inspect "#<#{self.class.name} #{@name.inspect}>" end end class StateDSL attr_reader :rules, :name def initialize(name, &defn) @name = name @defn = defn @rules = [] @loaded = false @closed = false end def to_state(lexer_class) load! rules = @rules.map do |rule| rule.is_a?(String) ? lexer_class.get_state(rule) : rule end State.new(@name, rules) end def prepended(&defn) parent_defn = @defn StateDSL.new(@name) do instance_eval(&defn) instance_eval(&parent_defn) end end def appended(&defn) parent_defn = @defn StateDSL.new(@name) do instance_eval(&parent_defn) instance_eval(&defn) end end protected # Define a new rule for this state. # # @overload rule(re, token, next_state=nil) # @overload rule(re, &callback) # # @param [Regexp] re # a regular expression for this rule to test. # @param [String] tok # the token type to yield if `re` matches. # @param [#to_s] next_state # (optional) a state to push onto the stack if `re` matches. # If `next_state` is `:pop!`, the state stack will be popped # instead. # @param [Proc] callback # a block that will be evaluated in the context of the lexer # if `re` matches. This block has access to a number of lexer # methods, including {RegexLexer#push}, {RegexLexer#pop!}, # {RegexLexer#token}, and {RegexLexer#delegate}. The first # argument can be used to access the match groups. def rule(re, tok=nil, next_state=nil, &callback) raise ClosedState.new(self) if @closed if tok.nil? && callback.nil? raise "please pass `rule` a token to yield or a callback" end matches_empty = re =~ '' callback ||= case next_state when :pop! proc do |stream| puts " yielding: #{tok.qualname}, #{stream[0].inspect}" if @debug @output_stream.call(tok, stream[0]) puts " popping stack: 1" if @debug @stack.pop or raise 'empty stack!' end when :push proc do |stream| puts " yielding: #{tok.qualname}, #{stream[0].inspect}" if @debug @output_stream.call(tok, stream[0]) puts " pushing :#{@stack.last.name}" if @debug @stack.push(@stack.last) end when Symbol proc do |stream| puts " yielding: #{tok.qualname}, #{stream[0].inspect}" if @debug @output_stream.call(tok, stream[0]) state = @states[next_state] || self.class.get_state(next_state) puts " pushing :#{state.name}" if @debug @stack.push(state) end when nil # cannot use an empty-matching regexp with no predicate raise InvalidRegex.new(re) if matches_empty proc do |stream| puts " yielding: #{tok.qualname}, #{stream[0].inspect}" if @debug @output_stream.call(tok, stream[0]) end else raise "invalid next state: #{next_state.inspect}" end rules << Rule.new(re, callback) close! if matches_empty && !context_sensitive?(re) end def context_sensitive?(re) source = re.source return true if source =~ /[(][?] MAX_NULL_SCANS puts " warning: too many scans without consuming the string!" if @debug return false end else @null_steps = 0 end return true end end end false end # Yield a token. # # @param tok # the token type # @param val # (optional) the string value to yield. If absent, this defaults # to the entire last match. def token(tok, val=@current_stream[0]) yield_token(tok, val) end # @deprecated # # Yield a token with the next matched group. Subsequent calls # to this method will yield subsequent groups. def group(tok) raise "RegexLexer#group is deprecated: use #groups instead" end # Yield tokens corresponding to the matched groups of the current # match. def groups(*tokens) tokens.each_with_index do |tok, i| yield_token(tok, @current_stream[i+1]) end end # Delegate the lex to another lexer. We use the `continue_lex` method # so that #reset! will not be called. In this way, a single lexer # can be repeatedly delegated to while maintaining its own internal # state stack. # # @param [#lex] lexer # The lexer or lexer class to delegate to # @param [String] text # The text to delegate. This defaults to the last matched string. def delegate(lexer, text=nil) puts " delegating to: #{lexer.inspect}" if @debug text ||= @current_stream[0] lexer.continue_lex(text) do |tok, val| puts " delegated token: #{tok.inspect}, #{val.inspect}" if @debug yield_token(tok, val) end end def recurse(text=nil) delegate(self.class, text) end # Push a state onto the stack. If no state name is given and you've # passed a block, a state will be dynamically created using the # {StateDSL}. def push(state_name=nil, &b) push_state = if state_name get_state(state_name) elsif block_given? StateDSL.new(b.inspect, &b).to_state(self.class) else # use the top of the stack by default self.state end puts " pushing: :#{push_state.name}" if @debug stack.push(push_state) end # Pop the state stack. If a number is passed in, it will be popped # that number of times. def pop!(times=1) raise 'empty stack!' if stack.empty? puts " popping stack: #{times}" if @debug stack.pop(times) nil end # replace the head of the stack with the given state def goto(state_name) raise 'empty stack!' if stack.empty? puts " going to: state :#{state_name} " if @debug stack[-1] = get_state(state_name) end # reset the stack back to `[:root]`. def reset_stack puts ' resetting stack' if @debug stack.clear stack.push get_state(:root) end # Check if `state_name` is in the state stack. def in_state?(state_name) state_name = state_name.to_sym stack.any? do |state| state.name == state_name.to_sym end end # Check if `state_name` is the state on top of the state stack. def state?(state_name) state_name.to_sym == state.name end private def yield_token(tok, val) return if val.nil? || val.empty? puts " yielding: #{tok.qualname}, #{val.inspect}" if @debug @output_stream.yield(tok, val) end end end rouge-3.28.0/lib/rouge/template_lexer.rb000066400000000000000000000011771417417255300201720ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge # @abstract # A TemplateLexer is one that accepts a :parent option, to specify # which language is being templated. The lexer class can specify its # own default for the parent lexer, which is otherwise defaulted to # HTML. class TemplateLexer < RegexLexer # the parent lexer - the one being templated. def parent return @parent if instance_variable_defined? :@parent @parent = lexer_option(:parent) || Lexers::HTML.new(@options) end option :parent, "the parent language (default: html)" start { parent.reset! } end end rouge-3.28.0/lib/rouge/tex_theme_renderer.rb000066400000000000000000000100001417417255300210110ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge class TexThemeRenderer def initialize(theme, opts={}) @theme = theme @prefix = opts.fetch(:prefix) { 'RG' } end # Our general strategy is this: # # * First, define the \RG{tokname}{content} command, which will # expand into \RG@tok@tokname{content}. We use \csname...\endcsname # to interpolate into a command. # # * Define the default RG* environment, which will enclose the whole # thing. By default this will simply set \ttfamily (select monospace font) # but it can be overridden with \renewcommand by the user to be # any other formatting. # # * Define all the colors using xcolors \definecolor command. First we define # every palette color with a name such as RG@palette@themneame@colorname. # Then we find all foreground and background colors that have literal html # colors embedded in them and define them with names such as # RG@palette@themename@000000. While html allows three-letter colors such # as #FFF, xcolor requires all six characters to be present, so we make sure # to normalize that as well as the case convention in #inline_name. # # * Define the token commands RG@tok@xx. These will take the content as the # argument and format it according to the theme, referring to the color # in the palette. def render(&b) yield <<'END'.gsub('RG', @prefix) \makeatletter \def\RG#1#2{\csname RG@tok@#1\endcsname{#2}}% \newenvironment{RG*}{\ttfamily}{\relax}% END base = @theme.class.base_style yield "\\definecolor{#{@prefix}@fgcolor}{HTML}{#{inline_name(base.fg || '#000000')}}" yield "\\definecolor{#{@prefix}@bgcolor}{HTML}{#{inline_name(base.bg || '#FFFFFF')}}" render_palette(@theme.palette, &b) @theme.styles.each do |tok, style| render_inline_pallete(style, &b) end Token.each_token do |tok| style = @theme.class.get_own_style(tok) style ? render_style(tok, style, &b) : render_blank(tok, &b) end yield '\makeatother' end def render_palette(palette, &b) palette.each do |name, color| hex = inline_name(color) yield "\\definecolor{#{palette_name(name)}}{HTML}{#{hex}}%" end end def render_inline_pallete(style, &b) gen_inline(style[:fg], &b) gen_inline(style[:bg], &b) end def inline_name(color) color =~ /^#(\h+)/ or return nil # xcolor does not support 3-character HTML colors, # so we convert them here case $1.size when 6 $1 when 3 # duplicate every character: abc -> aabbcc $1.gsub(/\h/, '\0\0') else raise "invalid HTML color: #{$1}" end.upcase end def gen_inline(name, &b) # detect inline colors hex = inline_name(name) return unless hex @gen_inline ||= {} @gen_inline[hex] ||= begin yield "\\definecolor{#{palette_name(hex)}}{HTML}{#{hex}}%" end end def camelize(name) name.gsub(/_(.)/) { $1.upcase } end def palette_name(name) name = inline_name(name) || name.to_s "#{@prefix}@palette@#{camelize(@theme.name)}@#{camelize(name.to_s)}" end def token_name(tok) "\\csname #@prefix@tok@#{tok.shortname}\\endcsname" end def render_blank(tok, &b) out = "\\expandafter\\def#{token_name(tok)}#1{#1}" end def render_style(tok, style, &b) out = String.new('') out << "\\expandafter\\def#{token_name(tok)}#1{" out << "\\fboxsep=0pt\\colorbox{#{palette_name(style[:bg])}}{" if style[:bg] out << '\\textbf{' if style[:bold] out << '\\textit{' if style[:italic] out << "\\textcolor{#{palette_name(style[:fg])}}{" if style[:fg] out << "#1" # close the right number of curlies out << "}" if style[:bold] out << "}" if style[:italic] out << "}" if style[:fg] out << "}" if style[:bg] out << "}%" yield out end end end rouge-3.28.0/lib/rouge/text_analyzer.rb000066400000000000000000000023751417417255300200520ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge class TextAnalyzer < String # Find a shebang. Returns nil if no shebang is present. def shebang return @shebang if instance_variable_defined? :@shebang self =~ /\A\s*#!(.*)$/ @shebang = $1 end # Check if the given shebang is present. # # This normalizes things so that `text.shebang?('bash')` will detect # `#!/bash`, '#!/bin/bash', '#!/usr/bin/env bash', and '#!/bin/bash -x' def shebang?(match) return false unless shebang match = /\b#{match}(\s|$)/ match === shebang end # Return the contents of the doctype tag if present, nil otherwise. def doctype return @doctype if instance_variable_defined? :@doctype self =~ %r(\A\s* (?:<\?.*?\?>\s*)? # possible tag )xm @doctype = $1 end # Check if the doctype matches a given regexp or string def doctype?(type=//) type === doctype end # Return true if the result of lexing with the given lexer contains no # error tokens. def lexes_cleanly?(lexer) lexer.lex(self) do |(tok, _)| return false if tok.name == 'Error' end true end end end rouge-3.28.0/lib/rouge/theme.rb000066400000000000000000000107731417417255300162640ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge class Theme include Token::Tokens class Style < Hash def initialize(theme, hsh={}) super() @theme = theme merge!(hsh) end [:fg, :bg].each do |mode| define_method mode do return self[mode] unless @theme @theme.palette(self[mode]) if self[mode] end end def render(selector, &b) return enum_for(:render, selector).to_a.join("\n") unless b return if empty? yield "#{selector} {" rendered_rules.each do |rule| yield " #{rule};" end yield "}" end def rendered_rules(&b) return enum_for(:rendered_rules) unless b yield "color: #{fg}" if fg yield "background-color: #{bg}" if bg yield "font-weight: bold" if self[:bold] yield "font-style: italic" if self[:italic] yield "text-decoration: underline" if self[:underline] (self[:rules] || []).each(&b) end end def styles @styles ||= self.class.styles.dup end @palette = {} def self.palette(arg={}) @palette ||= InheritableHash.new(superclass.palette) if arg.is_a? Hash @palette.merge! arg @palette else case arg when /#[0-9a-f]+/i arg else @palette[arg] or raise "not in palette: #{arg.inspect}" end end end def palette(*a) self.class.palette(*a) end @styles = {} def self.styles @styles ||= InheritableHash.new(superclass.styles) end def self.render(opts={}, &b) new(opts).render(&b) end def get_own_style(token) self.class.get_own_style(token) end def get_style(token) self.class.get_style(token) end def name self.class.name end class << self def style(*tokens) style = tokens.last.is_a?(Hash) ? tokens.pop : {} tokens.each do |tok| styles[tok] = style end end def get_own_style(token) token.token_chain.reverse_each do |anc| return Style.new(self, styles[anc]) if styles[anc] end nil end def get_style(token) get_own_style(token) || base_style end def base_style get_own_style(Token::Tokens::Text) end def name(n=nil) return @name if n.nil? @name = n.to_s register(@name) end def register(name) Theme.registry[name.to_s] = self end def find(n) registry[n.to_s] end def registry @registry ||= {} end end end module HasModes def mode(arg=:absent) return @mode if arg == :absent @modes ||= {} @modes[arg] ||= get_mode(arg) end def get_mode(mode) return self if self.mode == mode new_name = "#{self.name}.#{mode}" Class.new(self) { name(new_name); set_mode!(mode) } end def set_mode!(mode) @mode = mode send("make_#{mode}!") end def mode!(arg) alt_name = "#{self.name}.#{arg}" register(alt_name) set_mode!(arg) end end class CSSTheme < Theme def initialize(opts={}) @scope = opts[:scope] || '.highlight' end def render(&b) return enum_for(:render).to_a.join("\n") unless b # shared styles for tableized line numbers yield "#{@scope} table td { padding: 5px; }" yield "#{@scope} table pre { margin: 0; }" styles.each do |tok, style| Style.new(self, style).render(css_selector(tok), &b) end end def render_base(selector, &b) self.class.base_style.render(selector, &b) end def style_for(tok) self.class.get_style(tok) end private def css_selector(token) inflate_token(token).map do |tok| raise "unknown token: #{tok.inspect}" if tok.shortname.nil? single_css_selector(tok) end.join(', ') end def single_css_selector(token) return @scope if token == Text "#{@scope} .#{token.shortname}" end # yield all of the tokens that should be styled the same # as the given token. Essentially this recursively all of # the subtokens, except those which are more specifically # styled. def inflate_token(tok, &b) return enum_for(:inflate_token, tok) unless block_given? yield tok tok.sub_tokens.each do |(_, st)| next if styles[st] inflate_token(st, &b) end end end end rouge-3.28.0/lib/rouge/themes/000077500000000000000000000000001417417255300161125ustar00rootroot00000000000000rouge-3.28.0/lib/rouge/themes/base16.rb000066400000000000000000000067651417417255300175360ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Themes # default base16 theme # by Chris Kempson (http://chriskempson.com) class Base16 < CSSTheme name 'base16' palette base00: "#151515" palette base01: "#202020" palette base02: "#303030" palette base03: "#505050" palette base04: "#b0b0b0" palette base05: "#d0d0d0" palette base06: "#e0e0e0" palette base07: "#f5f5f5" palette base08: "#ac4142" palette base09: "#d28445" palette base0A: "#f4bf75" palette base0B: "#90a959" palette base0C: "#75b5aa" palette base0D: "#6a9fb5" palette base0E: "#aa759f" palette base0F: "#8f5536" extend HasModes def self.light! mode :dark # indicate that there is a dark variant mode! :light end def self.dark! mode :light # indicate that there is a light variant mode! :dark end def self.make_dark! style Text, :fg => :base05, :bg => :base00 end def self.make_light! style Text, :fg => :base02 end light! style Error, :fg => :base00, :bg => :base08 style Comment, :fg => :base03 style Comment::Preproc, Name::Tag, :fg => :base0A style Operator, Punctuation, :fg => :base05 style Generic::Inserted, :fg => :base0B style Generic::Deleted, :fg => :base08 style Generic::Heading, :fg => :base0D, :bg => :base00, :bold => true style Keyword, :fg => :base0E style Keyword::Constant, Keyword::Type, :fg => :base09 style Keyword::Declaration, :fg => :base09 style Literal::String, :fg => :base0B style Literal::String::Affix, :fg => :base0E style Literal::String::Regex, :fg => :base0C style Literal::String::Interpol, Literal::String::Escape, :fg => :base0F style Name::Namespace, Name::Class, Name::Constant, :fg => :base0A style Name::Attribute, :fg => :base0D style Literal::Number, Literal::String::Symbol, :fg => :base0B class Solarized < Base16 name 'base16.solarized' light! # author "Ethan Schoonover (http://ethanschoonover.com/solarized)" palette base00: "#002b36" palette base01: "#073642" palette base02: "#586e75" palette base03: "#657b83" palette base04: "#839496" palette base05: "#93a1a1" palette base06: "#eee8d5" palette base07: "#fdf6e3" palette base08: "#dc322f" palette base09: "#cb4b16" palette base0A: "#b58900" palette base0B: "#859900" palette base0C: "#2aa198" palette base0D: "#268bd2" palette base0E: "#6c71c4" palette base0F: "#d33682" end class Monokai < Base16 name 'base16.monokai' dark! # author "Wimer Hazenberg (http://www.monokai.nl)" palette base00: "#272822" palette base01: "#383830" palette base02: "#49483e" palette base03: "#75715e" palette base04: "#a59f85" palette base05: "#f8f8f2" palette base06: "#f5f4f1" palette base07: "#f9f8f5" palette base08: "#f92672" palette base09: "#fd971f" palette base0A: "#f4bf75" palette base0B: "#a6e22e" palette base0C: "#a1efe4" palette base0D: "#66d9ef" palette base0E: "#ae81ff" palette base0F: "#cc6633" end end end end rouge-3.28.0/lib/rouge/themes/bw.rb000066400000000000000000000030111417417255300170420ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Themes # A port of the bw style from Pygments. # See https://bitbucket.org/birkenfeld/pygments-main/src/default/pygments/styles/bw.py class BlackWhiteTheme < CSSTheme name 'bw' style Text, :fg => '#000000', :bg => '#ffffff' style Comment, :italic => true style Comment::Preproc, :italic => false style Keyword, :bold => true style Keyword::Pseudo, :bold => false style Keyword::Type, :bold => false style Operator, :bold => true style Name::Class, :bold => true style Name::Namespace, :bold => true style Name::Exception, :bold => true style Name::Entity, :bold => true style Name::Tag, :bold => true style Literal::String, :italic => true style Literal::String::Affix, :bold => true style Literal::String::Interpol, :bold => true style Literal::String::Escape, :bold => true style Generic::Heading, :bold => true style Generic::Subheading, :bold => true style Generic::Emph, :italic => true style Generic::Strong, :bold => true style Generic::Prompt, :bold => true style Error, :fg => '#FF0000' end end end rouge-3.28.0/lib/rouge/themes/colorful.rb000066400000000000000000000063441417417255300202730ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Themes # stolen from pygments class Colorful < CSSTheme name 'colorful' style Text, :fg => "#bbbbbb", :bg => '#000' style Comment, :fg => "#888" style Comment::Preproc, :fg => "#579" style Comment::Special, :fg => "#cc0000", :bold => true style Keyword, :fg => "#080", :bold => true style Keyword::Pseudo, :fg => "#038" style Keyword::Type, :fg => "#339" style Operator, :fg => "#333" style Operator::Word, :fg => "#000", :bold => true style Name::Builtin, :fg => "#007020" style Name::Function, :fg => "#06B", :bold => true style Name::Class, :fg => "#B06", :bold => true style Name::Namespace, :fg => "#0e84b5", :bold => true style Name::Exception, :fg => "#F00", :bold => true style Name::Variable, :fg => "#963" style Name::Variable::Instance, :fg => "#33B" style Name::Variable::Class, :fg => "#369" style Name::Variable::Global, :fg => "#d70", :bold => true style Name::Constant, :fg => "#036", :bold => true style Name::Label, :fg => "#970", :bold => true style Name::Entity, :fg => "#800", :bold => true style Name::Attribute, :fg => "#00C" style Name::Tag, :fg => "#070" style Name::Decorator, :fg => "#555", :bold => true style Literal::String, :bg => "#fff0f0" style Literal::String::Affix, :fg => "#080", :bold => true style Literal::String::Char, :fg => "#04D" style Literal::String::Doc, :fg => "#D42" style Literal::String::Interpol, :bg => "#eee" style Literal::String::Escape, :fg => "#666", :bold => true style Literal::String::Regex, :fg => "#000", :bg => "#fff0ff" style Literal::String::Symbol, :fg => "#A60" style Literal::String::Other, :fg => "#D20" style Literal::Number, :fg => "#60E", :bold => true style Literal::Number::Integer, :fg => "#00D", :bold => true style Literal::Number::Float, :fg => "#60E", :bold => true style Literal::Number::Hex, :fg => "#058", :bold => true style Literal::Number::Oct, :fg => "#40E", :bold => true style Generic::Heading, :fg => "#000080", :bold => true style Generic::Subheading, :fg => "#800080", :bold => true style Generic::Deleted, :fg => "#A00000" style Generic::Inserted, :fg => "#00A000" style Generic::Error, :fg => "#FF0000" style Generic::Emph, :italic => true style Generic::Strong, :bold => true style Generic::Prompt, :fg => "#c65d09", :bold => true style Generic::Output, :fg => "#888" style Generic::Traceback, :fg => "#04D" style Error, :fg => "#F00", :bg => "#FAA" end end end rouge-3.28.0/lib/rouge/themes/github.rb000066400000000000000000000105041417417255300177210ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Themes class Github < CSSTheme name 'github' style Comment::Multiline, :fg => '#999988', :italic => true style Comment::Preproc, :fg => '#999999', :bold => true style Comment::Single, :fg => '#999988', :italic => true style Comment::Special, :fg => '#999999', :italic => true, :bold => true style Comment, :fg => '#999988', :italic => true style Error, :fg => '#a61717', :bg => '#e3d2d2' style Generic::Deleted, :fg => '#000000', :bg => '#ffdddd' style Generic::Emph, :fg => '#000000', :italic => true style Generic::Error, :fg => '#aa0000' style Generic::Heading, :fg => '#999999' style Generic::Inserted, :fg => '#000000', :bg => '#ddffdd' style Generic::Output, :fg => '#888888' style Generic::Prompt, :fg => '#555555' style Generic::Strong, :bold => true style Generic::Subheading, :fg => '#aaaaaa' style Generic::Traceback, :fg => '#aa0000' style Keyword::Constant, :fg => '#000000', :bold => true style Keyword::Declaration, :fg => '#000000', :bold => true style Keyword::Namespace, :fg => '#000000', :bold => true style Keyword::Pseudo, :fg => '#000000', :bold => true style Keyword::Reserved, :fg => '#000000', :bold => true style Keyword::Type, :fg => '#445588', :bold => true style Keyword, :fg => '#000000', :bold => true style Literal::Number::Float, :fg => '#009999' style Literal::Number::Hex, :fg => '#009999' style Literal::Number::Integer::Long, :fg => '#009999' style Literal::Number::Integer, :fg => '#009999' style Literal::Number::Oct, :fg => '#009999' style Literal::Number, :fg => '#009999' style Literal::String::Affix, :fg => '#000000', :bold => true style Literal::String::Backtick, :fg => '#d14' style Literal::String::Char, :fg => '#d14' style Literal::String::Doc, :fg => '#d14' style Literal::String::Double, :fg => '#d14' style Literal::String::Escape, :fg => '#d14' style Literal::String::Heredoc, :fg => '#d14' style Literal::String::Interpol, :fg => '#d14' style Literal::String::Other, :fg => '#d14' style Literal::String::Regex, :fg => '#009926' style Literal::String::Single, :fg => '#d14' style Literal::String::Symbol, :fg => '#990073' style Literal::String, :fg => '#d14' style Name::Attribute, :fg => '#008080' style Name::Builtin::Pseudo, :fg => '#999999' style Name::Builtin, :fg => '#0086B3' style Name::Class, :fg => '#445588', :bold => true style Name::Constant, :fg => '#008080' style Name::Decorator, :fg => '#3c5d5d', :bold => true style Name::Entity, :fg => '#800080' style Name::Exception, :fg => '#990000', :bold => true style Name::Function, :fg => '#990000', :bold => true style Name::Label, :fg => '#990000', :bold => true style Name::Namespace, :fg => '#555555' style Name::Tag, :fg => '#000080' style Name::Variable::Class, :fg => '#008080' style Name::Variable::Global, :fg => '#008080' style Name::Variable::Instance, :fg => '#008080' style Name::Variable, :fg => '#008080' style Operator::Word, :fg => '#000000', :bold => true style Operator, :fg => '#000000', :bold => true style Text::Whitespace, :fg => '#bbbbbb' style Text, :bg => '#f8f8f8' end end end rouge-3.28.0/lib/rouge/themes/gruvbox.rb000066400000000000000000000103471417417255300201400ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true # TODO how are we going to handle soft/hard contrast? module Rouge module Themes # Based on https://github.com/morhetz/gruvbox, with help from # https://github.com/daveyarwood/gruvbox-pygments class Gruvbox < CSSTheme name 'gruvbox' # global Gruvbox colours {{{ C_dark0_hard = '#1d2021' C_dark0 ='#282828' C_dark0_soft = '#32302f' C_dark1 = '#3c3836' C_dark2 = '#504945' C_dark3 = '#665c54' C_dark4 = '#7c6f64' C_dark4_256 = '#7c6f64' C_gray_245 = '#928374' C_gray_244 = '#928374' C_light0_hard = '#f9f5d7' C_light0 = '#fbf1c7' C_light0_soft = '#f2e5bc' C_light1 = '#ebdbb2' C_light2 = '#d5c4a1' C_light3 = '#bdae93' C_light4 = '#a89984' C_light4_256 = '#a89984' C_bright_red = '#fb4934' C_bright_green = '#b8bb26' C_bright_yellow = '#fabd2f' C_bright_blue = '#83a598' C_bright_purple = '#d3869b' C_bright_aqua = '#8ec07c' C_bright_orange = '#fe8019' C_neutral_red = '#cc241d' C_neutral_green = '#98971a' C_neutral_yellow = '#d79921' C_neutral_blue = '#458588' C_neutral_purple = '#b16286' C_neutral_aqua = '#689d6a' C_neutral_orange = '#d65d0e' C_faded_red = '#9d0006' C_faded_green = '#79740e' C_faded_yellow = '#b57614' C_faded_blue = '#076678' C_faded_purple = '#8f3f71' C_faded_aqua = '#427b58' C_faded_orange = '#af3a03' # }}} extend HasModes def self.light! mode :dark # indicate that there is a dark variant mode! :light end def self.dark! mode :light # indicate that there is a light variant mode! :dark end def self.make_dark! palette bg0: C_dark0 palette bg1: C_dark1 palette bg2: C_dark2 palette bg3: C_dark3 palette bg4: C_dark4 palette gray: C_gray_245 palette fg0: C_light0 palette fg1: C_light1 palette fg2: C_light2 palette fg3: C_light3 palette fg4: C_light4 palette fg4_256: C_light4_256 palette red: C_bright_red palette green: C_bright_green palette yellow: C_bright_yellow palette blue: C_bright_blue palette purple: C_bright_purple palette aqua: C_bright_aqua palette orange: C_bright_orange end def self.make_light! palette bg0: C_light0 palette bg1: C_light1 palette bg2: C_light2 palette bg3: C_light3 palette bg4: C_light4 palette gray: C_gray_244 palette fg0: C_dark0 palette fg1: C_dark1 palette fg2: C_dark2 palette fg3: C_dark3 palette fg4: C_dark4 palette fg4_256: C_dark4_256 palette red: C_faded_red palette green: C_faded_green palette yellow: C_faded_yellow palette blue: C_faded_blue palette purple: C_faded_purple palette aqua: C_faded_aqua palette orange: C_faded_orange end dark! mode :light style Text, :fg => :fg0, :bg => :bg0 style Error, :fg => :red, :bg => :bg0, :bold => true style Comment, :fg => :gray, :italic => true style Comment::Preproc, :fg => :aqua style Name::Tag, :fg => :red style Operator, Punctuation, :fg => :fg0 style Generic::Inserted, :fg => :green, :bg => :bg0 style Generic::Deleted, :fg => :red, :bg => :bg0 style Generic::Heading, :fg => :green, :bold => true style Keyword, :fg => :red style Keyword::Constant, :fg => :purple style Keyword::Type, :fg => :yellow style Keyword::Declaration, :fg => :orange style Literal::String, Literal::String::Interpol, Literal::String::Regex, :fg => :green, :italic => true style Literal::String::Affix, :fg => :red style Literal::String::Escape, :fg => :orange style Name::Namespace, Name::Class, :fg => :aqua style Name::Constant, :fg => :purple style Name::Attribute, :fg => :green style Literal::Number, :fg => :purple style Literal::String::Symbol, :fg => :blue end end end rouge-3.28.0/lib/rouge/themes/igor_pro.rb000066400000000000000000000015201417417255300202550ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Themes class IgorPro < CSSTheme name 'igorpro' style Text, :fg => '#444444' style Comment::Preproc, :fg => '#CC00A3' style Comment::Special, :fg => '#CC00A3' style Comment, :fg => '#FF0000' style Keyword::Constant, :fg => '#C34E00' style Keyword::Declaration, :fg => '#0000FF' style Keyword::Reserved, :fg => '#007575' style Keyword, :fg => '#0000FF' style Literal::String, :fg => '#009C00' style Literal::String::Affix, :fg => '#0000FF' style Name::Builtin, :fg => '#C34E00' end end end rouge-3.28.0/lib/rouge/themes/magritte.rb000066400000000000000000000063721417417255300202630ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Themes class Magritte < CSSTheme name 'magritte' palette :dragon => '#006c6c' palette :black => '#000000' palette :forest => '#007500' palette :candy => '#ff0089' palette :wine => '#7c0000' palette :grape => '#4c48fe' palette :dark => '#000707' palette :cherry => '#f22700' palette :white => '#ffffff' palette :royal => '#19003a' palette :purple => '#840084' palette :chocolate => '#920241' palette :lavender => '#d8d9ff' palette :eggshell => '#f3ffff' palette :yellow => '#ffff3f' palette :lightgray => '#BBBBBB' palette :darkgray => '#999999' style Text, :fg => :dark, :bg => :eggshell style Generic::Lineno, :fg => :eggshell, :bg => :dark # style Generic::Prompt, :fg => :chilly, :bold => true style Comment, :fg => :dragon, :italic => true style Comment::Preproc, :fg => :chocolate, :bold => true style Error, :fg => :eggshell, :bg => :cherry style Generic::Error, :fg => :cherry, :italic => true, :bold => true style Keyword, :fg => :royal, :bold => true style Operator, :fg => :grape, :bold => true style Punctuation, :fg => :grape style Generic::Deleted, :fg => :cherry style Generic::Inserted, :fg => :forest style Generic::Emph, :italic => true style Generic::Strong, :bold => true style Generic::Traceback, :fg => :black, :bg => :lavender style Keyword::Constant, :fg => :forest, :bold => true style Keyword::Namespace, Keyword::Pseudo, Keyword::Reserved, Generic::Heading, Generic::Subheading, :fg => :forest, :bold => true style Keyword::Type, Name::Constant, Name::Class, Name::Decorator, Name::Namespace, Name::Builtin::Pseudo, Name::Exception, :fg => :chocolate, :bold => true style Name::Label, Name::Tag, :fg => :purple, :bold => true style Literal::Number, Literal::Date, :fg => :forest, :bold => true style Literal::String::Symbol, :fg => :forest style Literal::String, :fg => :wine, :bold => true style Literal::String::Affix, :fg => :royal, :bold => true style Literal::String::Escape, Literal::String::Char, Literal::String::Interpol, :fg => :purple, :bold => true style Name::Builtin, :bold => true style Name::Entity, :fg => :darkgray, :bold => true style Text::Whitespace, :fg => :lightgray style Generic::Output, :fg => :royal style Name::Function, Name::Property, Name::Attribute, :fg => :candy style Name::Variable, :fg => :candy, :bold => true end end end rouge-3.28.0/lib/rouge/themes/molokai.rb000066400000000000000000000065231417417255300201000ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Themes class Molokai < CSSTheme name 'molokai' palette :black => '#1b1d1e' palette :white => '#f8f8f2' palette :blue => '#66d9ef' palette :green => '#a6e22e' palette :grey => '#403d3d' palette :red => '#f92672' palette :light_grey => '#465457' palette :dark_blue => '#5e5d83' palette :violet => '#af87ff' palette :yellow => '#d7d787' style Comment, Comment::Multiline, Comment::Single, :fg => :dark_blue, :italic => true style Comment::Preproc, :fg => :light_grey, :bold => true style Comment::Special, :fg => :light_grey, :italic => true, :bold => true style Error, :fg => :white, :bg => :grey style Generic::Inserted, :fg => :green style Generic::Deleted, :fg => :red style Generic::Emph, :fg => :black, :italic => true style Generic::Error, Generic::Traceback, :fg => :red style Generic::Heading, :fg => :grey style Generic::Output, :fg => :grey style Generic::Prompt, :fg => :blue style Generic::Strong, :bold => true style Generic::Subheading, :fg => :light_grey style Keyword, Keyword::Constant, Keyword::Declaration, Keyword::Pseudo, Keyword::Reserved, Keyword::Type, :fg => :blue, :bold => true style Keyword::Namespace, Operator::Word, Operator, :fg => :red, :bold => true style Literal::Number::Float, Literal::Number::Hex, Literal::Number::Integer::Long, Literal::Number::Integer, Literal::Number::Oct, Literal::Number, Literal::String::Escape, :fg => :violet style Literal::String::Backtick, Literal::String::Char, Literal::String::Doc, Literal::String::Double, Literal::String::Heredoc, Literal::String::Interpol, Literal::String::Other, Literal::String::Regex, Literal::String::Single, Literal::String::Symbol, Literal::String, :fg => :yellow style Name::Attribute, :fg => :green style Name::Class, Name::Decorator, Name::Exception, Name::Function, :fg => :green, :bold => true style Name::Constant, :fg => :blue style Name::Builtin::Pseudo, Name::Builtin, Name::Entity, Name::Namespace, Name::Variable::Class, Name::Variable::Global, Name::Variable::Instance, Name::Variable, Text::Whitespace, :fg => :white style Name::Label, :fg => :white, :bold => true style Name::Tag, :fg => :red style Text, :fg => :white, :bg => :black end end end rouge-3.28.0/lib/rouge/themes/monokai.rb000066400000000000000000000076701417417255300201060ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Themes class Monokai < CSSTheme name 'monokai' palette :black => '#000000' palette :bright_green => '#a6e22e' palette :bright_pink => '#f92672' palette :carmine => '#960050' palette :dark => '#49483e' palette :dark_grey => '#888888' palette :dark_red => '#aa0000' palette :dimgrey => '#75715e' palette :dimgreen => '#324932' palette :dimred => '#493131' palette :emperor => '#555555' palette :grey => '#999999' palette :light_grey => '#aaaaaa' palette :light_violet => '#ae81ff' palette :soft_cyan => '#66d9ef' palette :soft_yellow => '#e6db74' palette :very_dark => '#1e0010' palette :whitish => '#f8f8f2' palette :orange => '#f6aa11' palette :white => '#ffffff' style Comment, Comment::Multiline, Comment::Single, :fg => :dimgrey, :italic => true style Comment::Preproc, :fg => :dimgrey, :bold => true style Comment::Special, :fg => :dimgrey, :italic => true, :bold => true style Error, :fg => :carmine, :bg => :very_dark style Generic::Inserted, :fg => :white, :bg => :dimgreen style Generic::Deleted, :fg => :white, :bg => :dimred style Generic::Emph, :fg => :black, :italic => true style Generic::Error, Generic::Traceback, :fg => :dark_red style Generic::Heading, :fg => :grey style Generic::Output, :fg => :dark_grey style Generic::Prompt, :fg => :emperor style Generic::Strong, :bold => true style Generic::Subheading, :fg => :light_grey style Keyword, Keyword::Constant, Keyword::Declaration, Keyword::Pseudo, Keyword::Reserved, Keyword::Type, :fg => :soft_cyan, :bold => true style Keyword::Namespace, Operator::Word, Operator, :fg => :bright_pink, :bold => true style Literal::Number::Float, Literal::Number::Hex, Literal::Number::Integer::Long, Literal::Number::Integer, Literal::Number::Oct, Literal::Number, Literal::String::Escape, :fg => :light_violet style Literal::String::Affix, :fg => :soft_cyan, :bold => true style Literal::String::Backtick, Literal::String::Char, Literal::String::Doc, Literal::String::Double, Literal::String::Heredoc, Literal::String::Interpol, Literal::String::Other, Literal::String::Regex, Literal::String::Single, Literal::String::Symbol, Literal::String, :fg => :soft_yellow style Name::Attribute, :fg => :bright_green style Name::Class, Name::Decorator, Name::Exception, Name::Function, :fg => :bright_green, :bold => true style Name::Constant, :fg => :soft_cyan style Name::Builtin::Pseudo, Name::Builtin, Name::Entity, Name::Namespace, Name::Variable::Class, Name::Variable::Global, Name::Variable::Instance, Name::Variable, Text::Whitespace, :fg => :whitish style Name::Label, :fg => :whitish, :bold => true style Name::Tag, :fg => :bright_pink style Text, :fg => :whitish, :bg => :dark end end end rouge-3.28.0/lib/rouge/themes/monokai_sublime.rb000066400000000000000000000066061417417255300216240ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Themes class MonokaiSublime < CSSTheme name 'monokai.sublime' palette :black => '#000000' palette :bright_green => '#a6e22e' palette :bright_pink => '#f92672' palette :carmine => '#960050' palette :dark => '#49483e' palette :dark_graphite => '#272822' palette :dark_grey => '#888888' palette :dark_red => '#aa0000' palette :dimgrey => '#75715e' palette :emperor => '#555555' palette :grey => '#999999' palette :light_grey => '#aaaaaa' palette :light_violet => '#ae81ff' palette :soft_cyan => '#66d9ef' palette :soft_yellow => '#e6db74' palette :very_dark => '#1e0010' palette :whitish => '#f8f8f2' palette :orange => '#f6aa11' palette :white => '#ffffff' style Generic::Heading, :fg => :grey style Literal::String::Regex, :fg => :orange style Generic::Output, :fg => :dark_grey style Generic::Prompt, :fg => :emperor style Generic::Strong, :bold => false style Generic::Subheading, :fg => :light_grey style Name::Builtin, :fg => :orange style Comment::Multiline, Comment::Preproc, Comment::Single, Comment::Special, Comment, :fg => :dimgrey style Error, Generic::Error, Generic::Traceback, :fg => :carmine style Generic::Deleted, Generic::Inserted, Generic::Emph, :fg => :dark style Keyword::Constant, Keyword::Declaration, Keyword::Reserved, Name::Constant, Keyword::Type, :fg => :soft_cyan style Literal::Number::Float, Literal::Number::Hex, Literal::Number::Integer::Long, Literal::Number::Integer, Literal::Number::Oct, Literal::Number, Literal::String::Char, Literal::String::Escape, Literal::String::Symbol, :fg => :light_violet style Literal::String::Doc, Literal::String::Double, Literal::String::Backtick, Literal::String::Heredoc, Literal::String::Interpol, Literal::String::Other, Literal::String::Single, Literal::String, :fg => :soft_yellow style Name::Attribute, Name::Class, Name::Decorator, Name::Exception, Name::Function, :fg => :bright_green style Name::Variable::Class, Name::Namespace, Name::Label, Name::Entity, Name::Builtin::Pseudo, Name::Variable::Global, Name::Variable::Instance, Name::Variable, Text::Whitespace, Text, Name, :fg => :white, :bg => :dark_graphite style Operator::Word, Name::Tag, Keyword, Keyword::Namespace, Keyword::Pseudo, Operator, :fg => :bright_pink end end end rouge-3.28.0/lib/rouge/themes/pastie.rb000066400000000000000000000064531417417255300177340ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Themes # A port of the pastie style from Pygments. # See https://bitbucket.org/birkenfeld/pygments-main/src/default/pygments/styles/pastie.py class Pastie < CSSTheme name 'pastie' style Comment, :fg => '#888888' style Comment::Preproc, :fg => '#cc0000', :bold => true style Comment::Special, :fg => '#cc0000', :bg => '#fff0f0', :bold => true style Error, :fg => '#a61717', :bg => '#e3d2d2' style Generic::Error, :fg => '#aa0000' style Generic::Heading, :fg => '#333333' style Generic::Subheading, :fg => '#666666' style Generic::Deleted, :fg => '#000000', :bg => '#ffdddd' style Generic::Inserted, :fg => '#000000', :bg => '#ddffdd' style Generic::Emph, :italic => true style Generic::Strong, :bold => true style Generic::Lineno, :fg => '#888888' style Generic::Output, :fg => '#888888' style Generic::Prompt, :fg => '#555555' style Generic::Traceback, :fg => '#aa0000' style Keyword, :fg => '#008800', :bold => true style Keyword::Pseudo, :fg => '#008800' style Keyword::Type, :fg => '#888888', :bold => true style Num, :fg => '#0000dd', :bold => true style Str, :fg => '#dd2200', :bg => '#fff0f0' style Str::Affix, :fg => '#008800', :bold => true style Str::Escape, :fg => '#0044dd', :bg => '#fff0f0' style Str::Interpol, :fg => '#3333bb', :bg => '#fff0f0' style Str::Other, :fg => '#22bb22', :bg => '#f0fff0' #style Str::Regex, :fg => '#008800', :bg => '#fff0ff' # The background color on regex really doesn't look good, so let's drop it style Str::Regex, :fg => '#008800' style Str::Symbol, :fg => '#aa6600', :bg => '#fff0f0' style Name::Attribute, :fg => '#336699' style Name::Builtin, :fg => '#003388' style Name::Class, :fg => '#bb0066', :bold => true style Name::Constant, :fg => '#003366', :bold => true style Name::Decorator, :fg => '#555555' style Name::Exception, :fg => '#bb0066', :bold => true style Name::Function, :fg => '#0066bb', :bold => true #style Name::Label, :fg => '#336699', :italic => true # Name::Label is used for built-in CSS properties in Rouge, so let's drop italics style Name::Label, :fg => '#336699' style Name::Namespace, :fg => '#bb0066', :bold => true style Name::Property, :fg => '#336699', :bold => true style Name::Tag, :fg => '#bb0066', :bold => true style Name::Variable, :fg => '#336699' style Name::Variable::Global, :fg => '#dd7700' style Name::Variable::Instance, :fg => '#3333bb' style Operator::Word, :fg => '#008800' style Text, {} style Text::Whitespace, :fg => '#bbbbbb' end end end rouge-3.28.0/lib/rouge/themes/thankful_eyes.rb000066400000000000000000000056751417417255300213150ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Themes class ThankfulEyes < CSSTheme name 'thankful_eyes' # pallette, from GTKSourceView's ThankfulEyes palette :cool_as_ice => '#6c8b9f' palette :slate_blue => '#4e5d62' palette :eggshell_cloud => '#dee5e7' palette :krasna => '#122b3b' palette :aluminum1 => '#fefeec' palette :scarletred2 => '#cc0000' palette :butter3 => '#c4a000' palette :go_get_it => '#b2fd6d' palette :chilly => '#a8e1fe' palette :unicorn => '#faf6e4' palette :sandy => '#f6dd62' palette :pink_merengue => '#f696db' palette :dune => '#fff0a6' palette :backlit => '#4df4ff' palette :schrill => '#ffb000' style Text, :fg => :unicorn, :bg => :krasna style Generic::Lineno, :fg => :eggshell_cloud, :bg => :slate_blue style Generic::Prompt, :fg => :chilly, :bold => true style Comment, :fg => :cool_as_ice, :italic => true style Comment::Preproc, :fg => :go_get_it, :bold => true style Error, :fg => :aluminum1, :bg => :scarletred2 style Generic::Error, :fg => :scarletred2, :italic => true, :bold => true style Keyword, :fg => :sandy, :bold => true style Operator, :fg => :backlit, :bold => true style Punctuation, :fg => :backlit style Generic::Deleted, :fg => :scarletred2 style Generic::Inserted, :fg => :go_get_it style Generic::Emph, :italic => true style Generic::Strong, :bold => true style Generic::Traceback, :fg => :eggshell_cloud, :bg => :slate_blue style Keyword::Constant, :fg => :pink_merengue, :bold => true style Keyword::Namespace, Keyword::Pseudo, Keyword::Reserved, Generic::Heading, Generic::Subheading, :fg => :schrill, :bold => true style Keyword::Type, Name::Constant, Name::Class, Name::Decorator, Name::Namespace, Name::Builtin::Pseudo, Name::Exception, :fg => :go_get_it, :bold => true style Name::Label, Name::Tag, :fg => :schrill, :bold => true style Literal::Number, Literal::Date, Literal::String::Symbol, :fg => :pink_merengue, :bold => true style Literal::String, :fg => :dune, :bold => true style Literal::String::Affix, :fg => :sandy, :bold => true style Literal::String::Escape, Literal::String::Char, Literal::String::Interpol, :fg => :backlit, :bold => true style Name::Builtin, :bold => true style Name::Entity, :fg => '#999999', :bold => true style Text::Whitespace, Generic::Output, :fg => '#BBBBBB' style Name::Function, Name::Property, Name::Attribute, :fg => :chilly style Name::Variable, :fg => :chilly, :bold => true end end end rouge-3.28.0/lib/rouge/themes/tulip.rb000066400000000000000000000050211417417255300175720ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Themes class Tulip < CSSTheme name 'tulip' palette :purple => '#766DAF' palette :lpurple => '#9f93e6' palette :orange => '#FAAF4C' palette :green => '#3FB34F' palette :lgreen => '#41ff5b' palette :yellow => '#FFF02A' palette :black => '#000000' palette :gray => '#6D6E70' palette :red => '#CC0000' palette :dark_purple => '#231529' palette :lunicorn => '#faf8ed' palette :white => '#FFFFFF' palette :earth => '#181a27' palette :dune => '#fff0a6' style Text, :fg => :white, :bg => :dark_purple style Comment, :fg => :gray, :italic => true style Comment::Preproc, :fg => :lgreen, :bold => true style Error, Generic::Error, :fg => :white, :bg => :red style Keyword, :fg => :yellow, :bold => true style Operator, Punctuation, :fg => :lgreen style Generic::Deleted, :fg => :red style Generic::Inserted, :fg => :green style Generic::Emph, :italic => true style Generic::Strong, :bold => true style Generic::Traceback, Generic::Lineno, :fg => :white, :bg => :purple style Keyword::Constant, :fg => :lpurple, :bold => true style Keyword::Namespace, Keyword::Pseudo, Keyword::Reserved, Generic::Heading, Generic::Subheading, :fg => :white, :bold => true style Keyword::Type, Name::Constant, Name::Class, Name::Decorator, Name::Namespace, Name::Builtin::Pseudo, Name::Exception, :fg => :orange, :bold => true style Name::Label, Name::Tag, :fg => :lpurple, :bold => true style Literal::Number, Literal::Date, Literal::String::Symbol, :fg => :lpurple, :bold => true style Literal::String, :fg => :dune, :bold => true style Literal::String::Affix, :fg => :yellow, :bold => true style Literal::String::Escape, Literal::String::Char, Literal::String::Interpol, :fg => :orange, :bold => true style Name::Builtin, :bold => true style Name::Entity, :fg => '#999999', :bold => true style Text::Whitespace, :fg => '#BBBBBB' style Name::Function, Name::Property, Name::Attribute, :fg => :lgreen style Name::Variable, :fg => :lgreen, :bold => true end end end rouge-3.28.0/lib/rouge/token.rb000066400000000000000000000110201417417255300162640ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge class Token class << self attr_reader :name attr_reader :parent attr_reader :shortname def cache @cache ||= {} end def sub_tokens @sub_tokens ||= {} end def [](qualname) return qualname unless qualname.is_a? ::String Token.cache[qualname] end def inspect "" end def matches?(other) other.token_chain.include? self end def token_chain @token_chain ||= ancestors.take_while { |x| x != Token }.reverse end def qualname @qualname ||= token_chain.map(&:name).join('.') end def register! Token.cache[self.qualname] = self parent.sub_tokens[self.name] = self end def make_token(name, shortname, &b) parent = self Class.new(parent) do @parent = parent @name = name @shortname = shortname register! class_eval(&b) if b end end def token(name, shortname, &b) tok = make_token(name, shortname, &b) const_set(name, tok) end def each_token(&b) Token.cache.each do |(_, t)| b.call(t) end end end module Tokens def self.token(name, shortname, &b) tok = Token.make_token(name, shortname, &b) const_set(name, tok) end # XXX IMPORTANT XXX # For compatibility, this list must be kept in sync with # pygments.token.STANDARD_TYPES # please see https://github.com/jneen/rouge/wiki/List-of-tokens token :Text, '' do token :Whitespace, 'w' end token :Escape, 'esc' token :Error, 'err' token :Other, 'x' token :Keyword, 'k' do token :Constant, 'kc' token :Declaration, 'kd' token :Namespace, 'kn' token :Pseudo, 'kp' token :Reserved, 'kr' token :Type, 'kt' token :Variable, 'kv' end token :Name, 'n' do token :Attribute, 'na' token :Builtin, 'nb' do token :Pseudo, 'bp' end token :Class, 'nc' token :Constant, 'no' token :Decorator, 'nd' token :Entity, 'ni' token :Exception, 'ne' token :Function, 'nf' do token :Magic, 'fm' end token :Property, 'py' token :Label, 'nl' token :Namespace, 'nn' token :Other, 'nx' token :Tag, 'nt' token :Variable, 'nv' do token :Class, 'vc' token :Global, 'vg' token :Instance, 'vi' token :Magic, 'vm' end end token :Literal, 'l' do token :Date, 'ld' token :String, 's' do token :Affix, 'sa' token :Backtick, 'sb' token :Char, 'sc' token :Delimiter, 'dl' token :Doc, 'sd' token :Double, 's2' token :Escape, 'se' token :Heredoc, 'sh' token :Interpol, 'si' token :Other, 'sx' token :Regex, 'sr' token :Single, 's1' token :Symbol, 'ss' end token :Number, 'm' do token :Bin, 'mb' token :Float, 'mf' token :Hex, 'mh' token :Integer, 'mi' do token :Long, 'il' end token :Oct, 'mo' token :Other, 'mx' end end token :Operator, 'o' do token :Word, 'ow' end token :Punctuation, 'p' do token :Indicator, 'pi' end token :Comment, 'c' do token :Hashbang, 'ch' token :Doc, 'cd' token :Multiline, 'cm' token :Preproc, 'cp' token :PreprocFile, 'cpf' token :Single, 'c1' token :Special, 'cs' end token :Generic, 'g' do token :Deleted, 'gd' token :Emph, 'ge' token :Error, 'gr' token :Heading, 'gh' token :Inserted, 'gi' token :Output, 'go' token :Prompt, 'gp' token :Strong, 'gs' token :Subheading, 'gu' token :Traceback, 'gt' token :Lineno, 'gl' end # convenience Num = Literal::Number Str = Literal::String end end end rouge-3.28.0/lib/rouge/util.rb000066400000000000000000000041171417417255300161320ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge class InheritableHash < Hash def initialize(parent=nil) @parent = parent end def [](k) value = super return value if own_keys.include?(k) value || parent[k] end def parent @parent ||= {} end def include?(k) super or parent.include?(k) end def each(&b) keys.each do |k| b.call(k, self[k]) end end alias own_keys keys def keys keys = own_keys.concat(parent.keys) keys.uniq! keys end end class InheritableList include Enumerable def initialize(parent=nil) @parent = parent end def parent @parent ||= [] end def each(&b) return enum_for(:each) unless block_given? parent.each(&b) own_entries.each(&b) end def own_entries @own_entries ||= [] end def push(o) own_entries << o end alias << push end # shared methods for some indentation-sensitive lexers module Indentation def reset! super @block_state = @block_indentation = nil end # push a state for the next indented block def starts_block(block_state) @block_state = block_state @block_indentation = @last_indentation || '' puts " starts_block: #{block_state.inspect}" if @debug puts " block_indentation: #{@block_indentation.inspect}" if @debug end # handle a single indented line def indentation(indent_str) puts " indentation: #{indent_str.inspect}" if @debug puts " block_indentation: #{@block_indentation.inspect}" if @debug @last_indentation = indent_str # if it's an indent and we know where to go next, # push that state. otherwise, push content and # clear the block state. if (@block_state && indent_str.start_with?(@block_indentation) && indent_str != @block_indentation ) push @block_state else @block_state = @block_indentation = nil push :content end end end end rouge-3.28.0/lib/rouge/version.rb000066400000000000000000000001601417417255300166340ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge def self.version "3.28.0" end end rouge-3.28.0/rouge.gemspec000066400000000000000000000017401417417255300154260ustar00rootroot00000000000000# frozen_string_literal: true require './lib/rouge/version' Gem::Specification.new do |s| s.name = "rouge" s.version = Rouge.version s.authors = ["Jeanine Adkisson"] s.email = ["jneen@jneen.net"] s.summary = "A pure-ruby colorizer based on pygments" s.description = <<-desc.strip.gsub(/\s+/, ' ') Rouge aims to a be a simple, easy-to-extend drop-in replacement for pygments. desc s.homepage = "http://rouge.jneen.net/" s.files = Dir['Gemfile', 'LICENSE', 'rouge.gemspec', 'lib/**/*.rb', 'lib/**/*.yml', 'bin/rougify', 'lib/rouge/demos/*'] s.executables = %w(rougify) s.licenses = ['MIT', 'BSD-2-Clause'] s.required_ruby_version = '>= 2.0' s.metadata = { "bug_tracker_uri" => "https://github.com/rouge-ruby/rouge/issues", "changelog_uri" => "https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md", "documentation_uri" => "https://rouge-ruby.github.io/docs/", "source_code_uri" => "https://github.com/rouge-ruby/rouge" } end rouge-3.28.0/spec/000077500000000000000000000000001417417255300136705ustar00rootroot00000000000000rouge-3.28.0/spec/cli_spec.rb000066400000000000000000000047371417417255300160110ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true require 'rouge/cli' describe Rouge::CLI do let(:argv) { [] } subject { Rouge::CLI.parse(argv) } describe Rouge::CLI::Help do describe '-h' do let(:argv) { %w(-h) } it('parses') { assert { Rouge::CLI::Help === subject } } end describe '--help' do let(:argv) { %w(--help) } it('parses') { assert { Rouge::CLI::Help === subject } } end describe 'help' do let(:argv) { %w(help) } it('parses') { assert { Rouge::CLI::Help === subject } } end describe 'nil' do let(:argv) { %w() } it('parses') { assert { Rouge::CLI::Help === subject } } end end describe Rouge::CLI::Highlight do describe 'specifying a lexer' do let(:argv) { %w(highlight -l ruby) } it('parses') { assert { Rouge::CLI::Highlight === subject } assert { Rouge::Lexers::Ruby === subject.lexer } } end describe 'guessing a lexer by mimetype' do let(:argv) { %w(highlight -m application/javascript) } it('parses') { assert { Rouge::Lexers::Javascript === subject.lexer } } end describe 'guessing a lexer by file contents' do let(:argv) { %w(highlight -i bin/rougify) } it('parses') { assert { Rouge::Lexers::Ruby === subject.lexer } } end describe 'escaping by default' do let(:argv) { %w(highlight --escape -l ruby) } it('parses') { assert { Rouge::Lexers::Escape === subject.lexer } assert { Rouge::Lexers::Ruby === subject.lexer.lang } assert { subject.lexer.start == '' } } end describe 'escaping with custom delimiters' do let(:argv) { %w(highlight --escape-with [===[ ]===] -l ruby) } it('parses') { assert { Rouge::Lexers::Escape === subject.lexer } assert { Rouge::Lexers::Ruby === subject.lexer.lang } assert { subject.lexer.start == '[===[' } assert { subject.lexer.end == ']===]' } } end end describe Rouge::CLI::List do describe 'list' do let(:argv) { %w(list) } it('parses') { assert { Rouge::CLI::List === subject } } it 'lists available lexers' do out, err = capture_io { subject.run } expected_tags = Rouge::Lexer.all.map(&:tag).sort actual_tags = out.scan(/^([^\s]*?):/).flatten assert_equal expected_tags, actual_tags, "err: #{err.inspect}" end end end end rouge-3.28.0/spec/formatter_spec.rb000066400000000000000000000016601417417255300172350ustar00rootroot00000000000000# frozen_string_literal: true describe Rouge::Formatter do it 'finds terminal256' do assert { Rouge::Formatter.find('terminal256') } end it 'is found by Rouge.highlight' do assert { Rouge.highlight('puts "Hello"', 'ruby', 'terminal256') } end it 'does not escape by default' do assert { not Rouge::Formatter.escape_enabled? } end it 'escapes in all threads with #enable_escape!' do begin Rouge::Formatter.enable_escape! assert { Rouge::Formatter.escape_enabled? } ensure Rouge::Formatter.disable_escape! end end it 'escapes locally with #with_escape' do Rouge::Formatter.with_escape do assert { Rouge::Formatter.escape_enabled? } assert { not Thread.new { Rouge::Formatter.escape_enabled? }.value } Rouge::Formatter.disable_escape! assert { not Rouge::Formatter.escape_enabled? } end assert { not Rouge::Formatter.escape_enabled? } end end rouge-3.28.0/spec/formatters/000077500000000000000000000000001417417255300160565ustar00rootroot00000000000000rouge-3.28.0/spec/formatters/html_line_highlighter_spec.rb000066400000000000000000000021221417417255300237430ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true describe Rouge::Formatters::HTMLLineHighlighter do let(:subject) { Rouge::Formatters::HTMLLineHighlighter.new(formatter, options) } let(:formatter) { Rouge::Formatters::HTML.new } let(:options) { {} } let(:output) { subject.format(input_stream) } describe 'highlight lines' do let(:input_stream) { [[Token['Text'], "foo\n"], [Token['Name'], "bar\n"]] } let(:options) { { highlight_lines: [2] } } it 'should add highlight line class to lines specified by :highlight_lines option' do assert { output == %(foo\nbar\n) } end end describe 'configure highlight line class' do let(:input_stream) { [[Token['Text'], "foo\n"], [Token['Name'], "bar\n"]] } let(:options) { { highlight_lines: [1, 2], highlight_line_class: 'hiline' } } it 'should add highlight line class to lines specified by :highlight_lines option' do assert { output == %(foo\nbar\n) } end end end rouge-3.28.0/spec/formatters/html_line_table_spec.rb000066400000000000000000000057261417417255300225510ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true describe Rouge::Formatters::HTMLLineTable do let(:formatter) { Rouge::Formatters::HTML.new } let(:options) { {} } let(:subject) { Rouge::Formatters::HTMLLineTable.new(formatter, options) } let(:output) { subject.format(input_stream) } let(:cell_style) do "-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none;user-select: none;" end describe 'a simple token stream' do let(:input_stream) { [[Token['Name'], 'foo']] } it 'is formatted into a table with tagged rows' do expected = <<-HTML
1
foo\n
HTML expected = expected.gsub(%r{>\s+<(?!/pre)}, '><').rstrip assert_includes output, 'id="line-1"' assert { output == expected } end end describe 'a multiline token stream' do let(:input_stream) { [[Token['Text'], "foo\n"], [Token['Name'], "bar\n"], [Token['Text'], "foo\nbar"]] } it 'is formatted into a table-row for every newline' do expected = <<-HTML
1
foo\n
2
bar\n
3
foo\n
4
bar\n
HTML expected = expected.gsub(%r{>\s+<(?!/pre)}, '><').rstrip assert_includes output, 'id="line-4"' assert { output == expected } end end describe 'the rendered table' do let(:options) do { start_line: 15, table_class: 'code-table', gutter_class: 'code-gutter', code_class: 'fenced-code', line_class: 'line-no', line_id: 'L%i', } end let(:input_stream) { [[Token['Name'], 'foo'], [Token['Text'], "bar\n"]] } it 'is customizable' do expected = <<-HTML
15
foobar\n
HTML expected = expected.gsub(%r{>\s+<(?!/pre)}, '><').rstrip refute_includes output, 'id="L1"' assert { output == expected } end end end rouge-3.28.0/spec/formatters/html_linewise_spec.rb000066400000000000000000000036101417417255300222600ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # frozen_string_literal: true describe Rouge::Formatters::HTMLLinewise do let(:subject) { Rouge::Formatters::HTMLLinewise.new(formatter, options) } let(:formatter) { Rouge::Formatters::HTML.new } let(:options) { {} } let(:output) { subject.format(input_stream) } describe 'a simple token stream' do let(:input_stream) { [[Token['Name'], 'foo']] } it 'formats' do assert { output == %(
foo\n
) } end end describe 'final newlines' do let(:input_stream) { [[Token['Text'], "foo\n"], [Token['Name'], "bar\n"]] } it 'formats' do assert { output == %(
foo\n
bar\n
) } end end describe 'intermediate newlines' do let(:input_stream) { [[Token['Name'], "foo\nbar"]] } it 'formats' do assert { output == %(
foo\n
bar\n
) } end end describe 'alternate tag name' do let(:input_stream) { [[Token['Text'], "foo\n"], [Token['Name'], "bar\n"]] } let(:options) { { tag_name: 'span' } } it 'should use tag name specified by :tag_name option' do assert { output == %(foo\nbar\n) } end end describe 'inside html table formatter' do let(:input_stream) { [[Token['Text'], "foo\n"], [Token['Name'], "bar\n"]] } it 'should delegate to linewise formatter' do assert { Rouge::Formatters::HTMLTable.new(subject).format(input_stream) == %(
1\n2\n
foo\n
bar\n
) } end end end rouge-3.28.0/spec/formatters/html_pygments_spec.rb000066400000000000000000000010441417417255300223060ustar00rootroot00000000000000# frozen_string_literal: true describe Rouge::Formatters::HTMLPygments do let(:formatter) { Rouge::Formatters::HTML.new } let(:source) { 'echo "Hello World"' } let(:lexer) { Rouge::Lexers::Shell.new } let(:subject) { Rouge::Formatters::HTMLPygments.new(formatter, lexer.tag) } let(:output) { subject.format(lexer.lex(source)) } it 'wrap with div.highlight' do assert { output =~ /\A
.+<\/div>\Z/ } end it 'contain pre with class name "shell"' do assert { output =~ /
/ }
  end
end
rouge-3.28.0/spec/formatters/html_spec.rb000066400000000000000000000047061417417255300203700ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Formatters::HTML do
  let(:subject) { Rouge::Formatters::HTMLLegacy.new(options) }
  let(:options) { {} }

  describe 'skipping the wrapper' do
    let(:subject) { Rouge::Formatters::HTML.new }
    let(:output) { subject.format([[Token['Name'], 'foo']]) }
    let(:options) { { :wrap => false } }

    it 'skips the wrapper' do
      assert { output == 'foo' }
    end
  end

  describe '#inline_theme' do
    class InlineTheme < Rouge::CSSTheme
      style Name, :bold => true
    end

    let(:options) { { :inline_theme => InlineTheme.new, :wrap => false } }

    let(:output) {
      subject.format([[Token['Name'], 'foo']])
    }

    it 'inlines styles given a theme' do
      assert { output == 'foo' }
    end
  end

  describe 'format using lexer instance called with options' do
    let(:text) { %(\n) }
    let(:subject) { Rouge::Formatters::HTML.new }
    let(:tokens) { Rouge::Lexers::HTML.new.lex text, {} }
    let(:output) { subject.format(tokens) }

    it 'should format token stream' do
      assert { output == '<meta name="description" content="foo">
<script>alert("bar")</script>' }
    end
  end

  describe 'tableized line numbers' do
    let(:options) { { :line_numbers => true } }

    let(:tokens) { Rouge::Lexers::Clojure.lex(text) }

    let(:output) { subject.format(tokens) }
    let(:line_numbers) { output[%r[
]m].scan(/\d+/m).size }

    let(:output_code) {
      output =~ %r((.*?))m
      $1
    }

    let(:code_lines) { output_code.scan(/\n/).size }

    describe 'newline-terminated text' do
      let(:text) { Rouge::Lexers::Clojure.demo }

      it 'preserves the number of lines' do
        assert { code_lines == line_numbers }
      end
    end

    describe 'non-newline-terminated text' do
      let(:text) { Rouge::Lexers::Clojure.demo.chomp }

      it 'preserves the number of lines' do
        assert { code_lines == line_numbers }
      end
    end
  end
end
rouge-3.28.0/spec/formatters/null_spec.rb000066400000000000000000000006731417417255300203750ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Formatters::Null do
  let(:subject) { Rouge::Formatters::Null.new }

  it 'renders nothing' do
    result = subject.format([[Token['Name.Constant'], 'foo']])

    assert { result == %|Name.Constant "foo"\n| }
  end

  it 'consumes tokens' do
    consumed = false
    tokens = Enumerator.new { consumed = true }

    subject.format(tokens)

    assert consumed
  end
end
rouge-3.28.0/spec/formatters/terminal256_spec.rb000066400000000000000000000004501417417255300214640ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Formatters::Terminal256 do
  let(:subject) { Rouge::Formatters::Terminal256.new }

  it 'renders a thing' do
    result = subject.format([[Token['Text'], 'foo']])

    assert { result == "\e[38;5;230mfoo\e[39m" }
  end
end
rouge-3.28.0/spec/formatters/terminal_truecolor_spec.rb000066400000000000000000000004741417417255300233330ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Formatters::TerminalTruecolor do
  let(:subject) { Rouge::Formatters::TerminalTruecolor.new }

  it 'renders a thing' do
    result = subject.format([[Token['Text'], 'foo']])

    assert { result == "\e[38;2;250;246;228mfoo\e[39m" }
  end
end
rouge-3.28.0/spec/formatters/tex_spec.rb000066400000000000000000000024541417417255300202220ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Formatters::Tex do
  let(:subject) { Rouge::Formatters::Tex.new }
  let(:options) { {} }
  let(:tokens) { [] }
  let(:output) { subject.format(tokens) }
  let(:expected) { '' }

  describe 'a basic example' do
    let(:tokens) { [[Token['Name'], 'foo']] }
    let(:options) { { :wrap => false } }

    let(:expected) do
<<-'OUT'
\begin{RG*}%
\RG{n}{foo}%
\end{RG*}%
    OUT
    end

    it 'renders' do
      assert { output == expected }
    end
  end

  describe "escaping strategies" do
    # some fake code that might look like:
    #
    # foo {
    #   ~100%
    # }
    #
    # we must escape the braces, the percent sign, the tilde, 
    # and the initial space on the second line.
    let(:tokens) do
      [[Token['Keyword'], 'foo'],
       [Token['Text'], ' '],
       [Token['Punctuation'], '{'],
       [Token['Text'], "\n  "],
       [Token['Name.Constant'], '~100%'],
       [Token['Text'], "\n"],
       [Token['Punctuation'], '}'],
       [Token['Text'], "\n"]]
    end

    let(:expected) do
      <<-'OUT'
\begin{RG*}%
\RG{k}{foo}\hphantom{x}\RG{p}{\{}\newline%
\hphantom{xx}\RG{no}{{\textasciitilde}100\%}\newline%
\RG{p}{\}}%
\end{RG*}%
      OUT
    end

    it 'renders' do
      assert { output == expected }
    end
  end
end
rouge-3.28.0/spec/guesser_spec.rb000066400000000000000000000036751417417255300167170ustar00rootroot00000000000000# frozen_string_literal: true

describe Rouge::Guesser do
  include Support::Guessing

  describe 'guessing with custom globs' do
    it 'guesses correctly' do
      assert_guess(Rouge::Lexers::Javascript,
        :custom_globs => [['*.pl', 'javascript']],
        :filename => 'oddly-named.pl'
      )
    end
  end

  describe 'guessing with custom guessing strategies' do
    it 'guesses in order' do
      assert_guess(Rouge::Lexers::Ruby,
        :guessers => [
          Rouge::Guessers::Source.new('#!/usr/bin/env ruby'),
          Rouge::Guessers::Filename.new('foo.md'),
        ]
      )

      assert_guess(Rouge::Lexers::Markdown,
        :guessers => [
          Rouge::Guessers::Filename.new('foo.md'),
          Rouge::Guessers::Source.new('#!/usr/bin/env ruby'),
        ]
      )
    end

    it 'uses custom guessers' do
      passed_lexers = nil

      custom = Class.new(Rouge::Guesser) {
        define_method(:filter) { |lexers|
          passed_lexers = lexers

          [Rouge::Lexers::Javascript]
        }
      }.new

      assert_guess(Rouge::Lexers::Javascript, :guessers => [custom])
      assert { passed_lexers.size == Rouge::Lexer.all.size }
    end

    it 'sequentially filters' do
      custom = Class.new(Rouge::Guesser) {
        define_method(:filter) { |lexers|
          passed_lexers = lexers

          [Rouge::Lexers::Javascript, Rouge::Lexers::Prolog]
        }
      }.new

      assert_guess(Rouge::Lexers::Prolog,
        :guessers => [
          custom,
          Rouge::Guessers::Filename.new('foo.pl'),
        ]
      )
    end

    it 'filters with a lambda' do
      assert_guess(Rouge::Lexers::C,
        :guessers => [
          ->(lexers) { [ Rouge::Lexers::C ] }
        ]
      )
    end
  end

  describe 'modeline guessing' do
    it 'guesses by modeline' do
      # don't confuse actual editors when opening this file lol
      assert_guess(Rouge::Lexers::Ruby, :source => '# v' + 'im: syntax=ruby')
    end
  end
end
rouge-3.28.0/spec/lexer_spec.rb000066400000000000000000000131601417417255300163470ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexer do
  include Support::Lexing

  it 'guesses the lexer with Lexer.guess' do
    assert { Rouge::Lexer.guess(filename: 'foo.rb').tag == 'ruby' }
  end

  it 'guesses lexers with Lexer.guesses' do
    assert { Rouge::Lexer.guesses(filename: 'foo.pl').map { |c| c.tag }.sort == ['perl', 'prolog'].sort }
  end

  it 'raises errors in .guess by default' do
    assert { (Rouge::Lexer.guess(filename: 'foo.pl') rescue nil) == nil }
  end

  it 'customizes ambiguous cases in .guess' do
    assert { Rouge::Lexer.guess(filename: 'foo.pl') { :fallback } == :fallback }
  end

  it 'makes a simple lexer' do
    a_lexer = Class.new(Rouge::RegexLexer) do
      state :root do
        rule %r/a/, 'A'
        rule %r/b/, 'B'
      end
    end

    # consolidation
    result = a_lexer.lex('aa').to_a
    assert { result.size == 1 }
    assert { result == [['A', 'aa']] }

    result = a_lexer.lex('abab').to_a
    assert { result.size == 4 }
    assert { result == [['A', 'a'], ['B', 'b']] * 2 }
  end

  it 'pushes and pops states' do
    a_lexer = Class.new(Rouge::RegexLexer) do
      state :brace do
        rule %r/b/, 'B'
        rule %r/}/, 'Brace', :pop!
      end

      state :root do
        rule %r/{/, 'Brace', :brace
        rule %r/a/, 'A'
      end
    end

    result = a_lexer.lex('a{b}a').to_a
    assert { result.size == 5 }

    # failed parses

    t = Rouge::Token
    assert {
      a_lexer.lex('{a}').to_a ==
        [['Brace', '{'], [t['Error'], 'a'], ['Brace', '}']]
    }

    assert { a_lexer.lex('b').to_a == [[t['Error'], 'b']] }
    assert { a_lexer.lex('}').to_a == [[t['Error'], '}']] }
  end

  it 'does callbacks and grouping' do
    callback_lexer = Class.new(Rouge::RegexLexer) do
      state :root do
        rule %r/(a)(b)/ do |s|
          groups('A', 'B')
        end
      end
    end

    result = callback_lexer.lex('ab').to_a

    assert { result.size == 2 }
    assert { result[0] == ['A', 'a'] }
    assert { result[1] == ['B', 'b'] }
  end

  it 'pops from the callback' do
    callback_lexer = Class.new(Rouge::RegexLexer) do
      state :root do
        rule %r/a/, 'A', :a
        rule %r/d/, 'D'
      end

      state :a do
        rule %r/b/, 'B', :b
      end

      state :b do
        rule %r/c/ do |ss|
          token 'C'
          pop!; pop! # go back to the root
        end
      end
    end

    assert_no_errors 'abcd', callback_lexer
  end

  it 'supports stateful lexes' do
    stateful = Class.new(Rouge::RegexLexer) do
      def incr
        @count += 1
      end

      state :root do
        rule %r/\d+/ do |ss|
          token 'digit'
          @count = ss[0].to_i
        end

        rule %r/\+/ do |ss|
          incr
          token(@count <= 5 ? 'lt' : 'gt')
        end
      end
    end

    result = stateful.lex('4++')
    types = result.map { |(t,_)| t }
    assert { types == %w(digit lt gt) }
  end

  it 'delegates' do
    class MasterLexer < Rouge::RegexLexer
      state :root do
        rule %r/a/, 'A'
        rule %r/{(.*?)}/ do |m|
          token 'brace', '{'
          delegate BracesLexer.new, m[1]
          token 'brace', '}'
        end
      end
    end

    class BracesLexer < Rouge::RegexLexer
      state :root do
        rule %r/b/, 'B'
      end
    end

    assert_no_errors 'a{b}a', MasterLexer
  end

  it 'detects the beginnings of lines with ^ rules' do
    class MyLexer < Rouge::RegexLexer
      state :root do
        rule %r/^a/, 'start'
        rule %r/a/, 'not-start'
      end
    end

    assert_has_token('start', 'a', MyLexer)
    assert_has_token('start', "\na", MyLexer)
    deny_has_token('not-start', 'a', MyLexer)
    assert_has_token('not-start', 'aa', MyLexer)
  end

  it 'is undetectable by default' do
    UndetectableLexer = Class.new(Rouge::Lexer)

    refute { UndetectableLexer.methods(false).include?(:detect?) }
    refute { UndetectableLexer.detectable? }
  end

  it 'can only be detectable within current scope' do
    class DetectableLexer < Rouge::Lexer
      def self.detect?
        text.shebang?('foobar')
      end
    end

    assert { DetectableLexer.methods(false).include?(:detect?) }
    assert { DetectableLexer.detectable? }

    NonDetectableLexer = Class.new(DetectableLexer)

    refute { NonDetectableLexer.methods(false).include?(:detect?) }
    refute { NonDetectableLexer.detectable? }
  end

  it 'handles boolean options' do
    option_lexer = Class.new(Rouge::RegexLexer) do
      option :bool_opt, 'An example boolean option'

      def initialize(*)
        super
        @bool_opt = bool_option(:bool_opt) { nil }
      end
    end

    assert_equal true, option_lexer.new({bool_opt: 'true'}).instance_variable_get(:@bool_opt)
    assert_equal false, option_lexer.new({bool_opt: nil}).instance_variable_get(:@bool_opt)
    assert_equal false, option_lexer.new({bool_opt: false}).instance_variable_get(:@bool_opt)
    assert_equal false, option_lexer.new({bool_opt: 0}).instance_variable_get(:@bool_opt)
    assert_equal false, option_lexer.new({bool_opt: '0'}).instance_variable_get(:@bool_opt)
    assert_equal false, option_lexer.new({bool_opt: 'false'}).instance_variable_get(:@bool_opt)
    assert_equal false, option_lexer.new({bool_opt: 'off'}).instance_variable_get(:@bool_opt)
  end

  it 'extends options with #with' do
    php = Rouge::Lexers::PHP.new

    assert { php.instance_variable_get(:@start_inline) == :guess }

    inline_php = php.with(start_inline: true)
    assert { inline_php.is_a?(Rouge::Lexers::PHP) }
    assert { inline_php != php }
    assert { php.instance_variable_get(:@start_inline) == :guess }
    assert { inline_php.instance_variable_get(:@start_inline) == true }
  end
end
rouge-3.28.0/spec/lexers/000077500000000000000000000000001417417255300151725ustar00rootroot00000000000000rouge-3.28.0/spec/lexers/abap_spec.rb000066400000000000000000000005621417417255300174370ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::ABAP do
  let(:subject) { Rouge::Lexers::ABAP.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.abap'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-abap'
    end
  end
end
rouge-3.28.0/spec/lexers/ada_spec.rb000066400000000000000000000147211417417255300172630ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Ada do
  let(:subject) { Rouge::Lexers::Ada.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.ada'
      assert_guess :filename => 'foo.adb'
      assert_guess :filename => 'foo.ads'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-ada'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    it 'classifies identifiers' do
      assert_tokens_equal 'constant Boolean := A and B',
                           ['Keyword', 'constant'],
                           ['Text', ' '],
                           ['Name.Builtin', 'Boolean'],
                           ['Text', ' '],
                           ['Operator', ':='],
                           ['Text', ' '],
                           ['Name', 'A'],
                           ['Text', ' '],
                           ['Operator.Word', 'and'],
                           ['Text', ' '],
                           ['Name', 'B']
    end

    it 'accepts Unicode identifiers' do
      assert_tokens_equal '東京', ['Name', '東京']
      assert_tokens_equal '0東京', ['Error', '0'], ['Name', '東京']
      assert_tokens_equal '東京0', ['Name', '東京0']
    end

    it 'rejects identifiers with double or trailing underscores' do
      assert_tokens_equal '_ab', ['Error', '_ab']
      assert_tokens_equal 'a__b', ['Error', 'a__b']
      assert_tokens_equal 'a_b', ['Name', 'a_b']
      assert_tokens_equal 'ab_', ['Error', 'ab_']
    end

    it 'understands other connecting punctuation' do
      assert_tokens_equal 'a﹏b', ['Name', 'a﹏b']
      assert_tokens_equal '﹏ab', ['Error', '﹏ab']
      assert_tokens_equal 'a﹏﹏b', ['Error', 'a﹏﹏b']
      assert_tokens_equal 'ab﹏', ['Error', 'ab﹏']
    end

    it 'classifies based number literals' do
      assert_tokens_equal '2#0001_1110#', ['Literal.Number.Bin', '2#0001_1110#']
      assert_tokens_equal '2#0001__1110#', ['Error', '2#0001__1110#']
      assert_tokens_equal '8#1234_0000#', ['Literal.Number.Oct', '8#1234_0000#']
      assert_tokens_equal '16#abc_BBB_12#', ['Literal.Number.Hex', '16#abc_BBB_12#']
      assert_tokens_equal '4#1230000#e+5', ['Literal.Number.Integer', '4#1230000#e+5']
      assert_tokens_equal '2#0001_1110#e3', ['Literal.Number.Bin', '2#0001_1110#e3']

      assert_tokens_equal '16#abc_BBB.12#', ['Literal.Number.Float', '16#abc_BBB.12#']
    end

    it 'recognizes exponents in integers and reals' do
      assert_tokens_equal '1e6', ['Literal.Number.Integer', '1e6']
      assert_tokens_equal '123_456', ['Literal.Number.Integer', '123_456']
      assert_tokens_equal '3.14159_26', ['Literal.Number.Float', '3.14159_26']
      assert_tokens_equal '3.141_592e-20', ['Literal.Number.Float', '3.141_592e-20']
    end

    it 'highlights escape sequences inside doubly quoted strings' do
      assert_tokens_equal '"Archimedes said ""Εύρηκα"""',
                          ['Literal.String.Double', '"Archimedes said '],
                          ['Literal.String.Escape', '""'],
                          ['Literal.String.Double', 'Εύρηκα'],
                          ['Literal.String.Escape', '""'],
                          ['Literal.String.Double', '"']
    end

    it 'marks function names in declarations' do
      assert_tokens_equal 'Entry Foo IS',
                          ['Keyword.Declaration', 'Entry'],
                          ['Text', ' '],
                          ['Name.Function', 'Foo'],
                          ['Text', ' '],
                          ['Keyword', 'IS']

      assert_tokens_equal 'package body Ada.Foo IS',
                          ['Keyword.Declaration', 'package'],
                          ['Text', ' '],
                          ['Keyword.Declaration', 'body'],
                          ['Text', ' '],
                          ['Name.Namespace', 'Ada'],
                          ['Punctuation', '.'],
                          ['Name.Function', 'Foo'],
                          ['Text', ' '],
                          ['Keyword', 'IS']
    end

    it 'allows both names and builtin names in context clauses' do
      assert_tokens_equal 'limited with Math.Integer;',
                          ['Keyword.Namespace', 'limited'],
                          ['Text', ' '],
                          ['Keyword.Namespace', 'with'],
                          ['Text', ' '],
                          ['Name.Namespace', 'Math'],
                          ['Punctuation', '.'],
                          ['Name.Namespace', 'Integer'],
                          ['Punctuation', ';']
    end

    it 'recovers quickly after mistakenly entering :libunit_name' do
      # A `with` keyword at the beginning of a line is 99.9% sure to be
      # a context clause, but there are things that could be mistaken if
      # they are indented strangely:
      #
      # generic
      #    with function Random return Integer is <>;
      # procedure Foo;
      #
      # If that `with` is not indented, we should recover immediately:
      assert_tokens_equal 'with function Random',
                          ['Keyword.Namespace', 'with'],
                          ['Text', ' '],
                          ['Keyword.Declaration', 'function'],
                          ['Text', ' '],
                          ['Name.Function', 'Random']

      # Another case that's even less likely to be at BOL:
      #
      # type Painted_Point is new Point with
      #    record
      #       Paint : Color := White;
      #    end record;
      #
      # type Addition is new Binary_Operation with null record;
      assert_tokens_equal 'with record Paint',
                          ['Keyword.Namespace', 'with'],
                          ['Text', ' '],
                          ['Keyword', 'record'],
                          ['Text', ' '],
                          ['Name', 'Paint']
      assert_tokens_equal 'with null record;',
                          ['Keyword.Namespace', 'with'],
                          ['Text', ' '],
                          ['Keyword', 'null'],
                          ['Text', ' '],
                          ['Keyword', 'record'],
                          ['Punctuation', ';']

      # Finally: raise Runtime_Error with "NO!"
      assert_tokens_equal 'with "NO!"',
                          ['Keyword.Namespace', 'with'],
                          ['Text', ' '],
                          ['Literal.String.Double', '"NO!"']
    end
  end
end
rouge-3.28.0/spec/lexers/apache_spec.rb000066400000000000000000000017251417417255300177570ustar00rootroot00000000000000# frozen_string_literal: true

describe Rouge::Lexers::Apache do
  let(:subject) { Rouge::Lexers::Apache.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => '.htaccess'
      assert_guess :filename => 'httpd.conf'
      deny_guess   :filename => 'foo.conf'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-apache-conf'
      assert_guess :mimetype => 'text/x-httpd-conf'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    it 'does not drop non directives' do
      assert_tokens_equal 'foo bar', ['Text', 'foo bar']
    end

    it 'lexes case insensitively directives' do
      assert_tokens_equal 'setenv foo bar', ['Name.Class', 'setenv'], ['Text', ' foo bar']
    end

    it 'recognizes one line comment on last line even when not terminated by a new line (#360)' do
      assert_tokens_equal '# comment', ['Comment', '# comment']
    end
  end
end
rouge-3.28.0/spec/lexers/apex_spec.rb000066400000000000000000000006141417417255300174670ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Apex do
  let(:subject) { Rouge::Lexers::Apex.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.cls', :source => '// A comment'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-apex'
    end
  end
end
rouge-3.28.0/spec/lexers/apiblueprint_spec.rb000066400000000000000000000004211417417255300212240ustar00rootroot00000000000000# frozen_string_literal: true

describe Rouge::Lexers::APIBlueprint do
  let(:subject) { Rouge::Lexers::APIBlueprint.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.apib'
    end
  end
end
rouge-3.28.0/spec/lexers/apple_script_spec.rb000066400000000000000000000007001417417255300212130ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::AppleScript do
  let(:subject) { Rouge::Lexers::AppleScript.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.applescript'
      assert_guess :filename => 'foo.scpt'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'application/x-applescript'
    end
  end
end
rouge-3.28.0/spec/lexers/armasm_spec.rb000066400000000000000000000004341417417255300200120ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::ArmAsm do
  let(:subject) { Rouge::Lexers::ArmAsm.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.s'
    end
  end
end
rouge-3.28.0/spec/lexers/augeas_spec.rb000066400000000000000000000005661417417255300200050ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Augeas do
  let(:subject) { Rouge::Lexers::Augeas.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.aug'
    end

    it 'guess by mimetype' do
      assert_guess :mimetype => 'text/x-augeas'
    end
  end
end

rouge-3.28.0/spec/lexers/awk_spec.rb000066400000000000000000000013541417417255300173160ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Awk do
  let(:subject) { Rouge::Lexers::Awk.new }

  describe 'lexing' do
    include Support::Lexing

    it %(doesn't let a bad regex mess up the whole lex) do
      assert_has_token 'Error',          "a = /foo;\n1"
      assert_has_token 'Literal.Number', "a = /foo;\n1"
    end
  end

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.awk'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'application/x-awk'
    end

    it 'guesses by source' do
      assert_guess :source => '#!/usr/bin/awk'
      assert_guess :source => '#!/usr/bin/env awk'
    end
  end
end
rouge-3.28.0/spec/lexers/batch_spec.rb000066400000000000000000000007771417417255300176250ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Batchfile do
  let(:subject) { Rouge::Lexers::Batchfile.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.bat'
      assert_guess :filename => 'foo.cmd'
    end

  end

  describe 'lexing' do
    include Support::Lexing

    it 'recognizes one-line comments' do
      assert_tokens_equal 'REM comment', ['Comment', 'REM comment']
    end
  end
end
rouge-3.28.0/spec/lexers/bbcbasic_spec.rb000066400000000000000000000004421417417255300202610ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::BBCBASIC do
  let(:subject) { Rouge::Lexers::BBCBASIC.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo,fd1'
    end
  end
end
rouge-3.28.0/spec/lexers/bibtex_spec.rb000066400000000000000000000004371417417255300200120ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::BibTeX do
  let(:subject) { Rouge::Lexers::BibTeX.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.bib'
    end
  end
end

rouge-3.28.0/spec/lexers/biml_spec.rb000066400000000000000000000005601417417255300174550ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::BIML do
  let(:subject) { Rouge::Lexers::BIML.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.biml'
    end

    it 'guesses by source' do
      assert_guess :source => ''
    end
  end
end
rouge-3.28.0/spec/lexers/brainfuck_spec.rb000066400000000000000000000012111417417255300204700ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Brainfuck do
  let(:subject) { Rouge::Lexers::Brainfuck.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.b'
      assert_guess :filename => 'FOO.bf', :source => 'foo'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-brainfuck'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    it 'recognizes one-line comments not followed by a newline (#796)' do
      assert_tokens_equal 'comment', ['Comment.Single', 'comment']
    end
  end
end
rouge-3.28.0/spec/lexers/brightscript_spec.rb000066400000000000000000000004521417417255300212360ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Brightscript do
  let(:subject) { Rouge::Lexers::Brightscript.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.brs'
    end
  end
end
rouge-3.28.0/spec/lexers/bsl_spec.rb000066400000000000000000000005011417417255300173050ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Bsl do
  let(:subject) { Rouge::Lexers::Bsl.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.bsl'
      assert_guess :filename => 'foo.os'
    end
  end
end
rouge-3.28.0/spec/lexers/c_spec.rb000066400000000000000000000012411417417255300167510ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::C do
  let(:subject) { Rouge::Lexers::C.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.c'
      assert_guess :filename => 'FOO.C'
      assert_guess :filename => 'foo.h', :source => 'foo'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-csrc'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    it 'recognizes one-line comments not followed by a newline (#796)' do
      assert_tokens_equal '// comment', ['Comment.Single', '// comment']
    end
  end
end
rouge-3.28.0/spec/lexers/ceylon_spec.rb000066400000000000000000000005721417417255300200260ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Ceylon do
  let(:subject) { Rouge::Lexers::Ceylon.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.ceylon'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-ceylon'
    end
  end
end
rouge-3.28.0/spec/lexers/cfscript_spec.rb000066400000000000000000000004431417417255300203470ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Cfscript do
  let(:subject) { Rouge::Lexers::Cfscript.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.cfc'
    end

  end
end
rouge-3.28.0/spec/lexers/clean_spec.rb000066400000000000000000000005061417417255300176140ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Clean do
  let(:subject) { Rouge::Lexers::Clean.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.dcl'
      assert_guess :filename => 'foo.icl'
    end
  end
end
rouge-3.28.0/spec/lexers/clojure_spec.rb000066400000000000000000000007351417417255300202010ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Clojure do
  let(:subject) { Rouge::Lexers::Clojure.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.clj'
      assert_guess :filename => 'foo.cljs'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-clojure'
      assert_guess :mimetype => 'application/x-clojure'
    end
  end
end
rouge-3.28.0/spec/lexers/cmake_spec.rb000066400000000000000000000012021417417255300176040ustar00rootroot00000000000000# frozen_string_literal: true

describe Rouge::Lexers::CMake do
  let(:subject) { Rouge::Lexers::CMake.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'CMakeLists.txt'
      assert_guess :filename => 'cmake_clean.cmake'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-cmake'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    it 'recognizes one line comment on last line even when not terminated by a new line (#360)' do
      assert_tokens_equal '# comment', ['Comment.Single', '# comment']
    end
  end
end
rouge-3.28.0/spec/lexers/cmhg_spec.rb000066400000000000000000000004331417417255300174470ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::CMHG do
  let(:subject) { Rouge::Lexers::CMHG.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.cmhg'
    end
  end
end
rouge-3.28.0/spec/lexers/coffeescript_spec.rb000066400000000000000000000010221417417255300212000ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Coffeescript do
  let(:subject) { Rouge::Lexers::Coffeescript.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.coffee'
      assert_guess :filename => 'Cakefile'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/coffeescript'
    end

    it 'guesses by source' do
      assert_guess :source => '#!/usr/bin/env coffee'
    end
  end
end
rouge-3.28.0/spec/lexers/common_lisp_spec.rb000066400000000000000000000012271417417255300210520ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::CommonLisp do
  let(:subject) { Rouge::Lexers::CommonLisp.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.cl'
      assert_guess :filename => 'foo.lisp'
      assert_guess :filename => 'foo.el'
      assert_guess :filename => 'foo.asd'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-common-lisp'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    it 'does not crash on unbalanced parentheses' do
      subject.lex(")\n").to_a
    end
  end
end
rouge-3.28.0/spec/lexers/conf_spec.rb000066400000000000000000000006241417417255300174600ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Conf do
  let(:subject) { Rouge::Lexers::Conf.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess   :filename => 'foo.conf'

      # this should be lexed with the special nginx lexer
      # instead.
      deny_guess :filename => 'nginx.conf'
    end
  end
end
rouge-3.28.0/spec/lexers/console_spec.rb000066400000000000000000000037351417417255300202030ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::ConsoleLexer do
  let(:subject) { Rouge::Lexers::ConsoleLexer.new }
  let(:klass) { Rouge::Lexers::ConsoleLexer }

  include Support::Lexing
  
  it 'parses a basic prompt' do
    assert_tokens_equal '$ foo',
      ['Generic.Prompt', '$'],
      ['Text.Whitespace', ' '],
      ['Text', 'foo']
  end

  it 'parses a custom prompt' do
    subject_with_options = klass.new({ prompt: '%' })
    assert_tokens_equal '% foo', subject_with_options,
      ['Generic.Prompt', '%'],
      ['Text.Whitespace', ' '],
      ['Text', 'foo']
  end

  it 'does not crash if argument ends with backslash' do
    assert_tokens_equal '$ cd application\\bin\\',
      ['Generic.Prompt', '$'],
      ['Text.Whitespace', ' '],
      ['Name.Builtin', 'cd '],
      ['Text', 'application'],
      ['Literal.String.Escape', '\\b'],
      ['Keyword', 'in'],
      ['Literal.String.Escape', '\\']
  end

  it 'parses a custom error' do
    subject_with_options = klass.new({ error: 'No command,Unhandled' })
    assert_tokens_equal 'No command \'foo\' found, did you mean:', subject_with_options,
      ['Generic.Error', 'No command \'foo\' found, did you mean:']
    assert_tokens_equal 'Unhandled condition in test.lisp', subject_with_options,
      ['Generic.Error', 'Unhandled condition in test.lisp']
    assert_tokens_equal 'foo', subject_with_options,
      ['Generic.Output', 'foo']
  end

  it 'parses single-line comments' do
    subject_with_options = klass.new({ comments: true })
    assert_tokens_equal '# this is a comment', subject_with_options,
      ['Comment', '# this is a comment']
  end

  it 'ignores single-line comments' do
    assert_tokens_equal '# this is not a comment',
      ['Generic.Prompt', '#'],
      ['Text.Whitespace', ' '],
      ['Text', 'this is not a comment']
  end

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.cap'
    end
  end
end
rouge-3.28.0/spec/lexers/coq_spec.rb000066400000000000000000000004331417417255300173130ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Coq do
  let(:subject) { Rouge::Lexers::Coq.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-coq'
    end
  end
end
rouge-3.28.0/spec/lexers/cpp_spec.rb000066400000000000000000000021141417417255300173110ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Cpp do
  let(:subject) { Rouge::Lexers::Cpp.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.cpp'
      assert_guess :filename => 'foo.c++'
      assert_guess :filename => 'foo.cc'
      assert_guess :filename => 'foo.cxx'

      assert_guess :filename => 'foo.hpp'
      assert_guess :filename => 'foo.h++'
      assert_guess :filename => 'foo.hxx'

      # Disambiguate with C
      assert_guess :filename => 'foo.h', :source => 'namespace'
      deny_guess :filename => 'foo.h', :source => 'namespaces'
      deny_guess :filename => 'foo.h', :source => 'struct namespace'

      # Disambiguate with hacklang.org
      assert_guess :filename => 'foo.hh', :source => 'foo'

      # Arduino stuff
      assert_guess :filename => 'foo.pde'
      assert_guess :filename => 'foo.ino'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-c++hdr'
      assert_guess :mimetype => 'text/x-c++src'
    end
  end
end
rouge-3.28.0/spec/lexers/crystal_spec.rb000066400000000000000000000010211417417255300202040ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Crystal do
  let(:subject) { Rouge::Lexers::Crystal.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.cr'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-crystal'
      assert_guess :mimetype => 'application/x-crystal'
    end

    it 'guesses by source' do
      assert_guess :source => '#!/usr/local/bin/crystal'
    end
  end
end
rouge-3.28.0/spec/lexers/csharp_spec.rb000066400000000000000000000005661417417255300200200ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::CSharp do
  let(:subject) { Rouge::Lexers::CSharp.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.cs'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-csharp'
    end
  end
end
rouge-3.28.0/spec/lexers/css_spec.rb000066400000000000000000000005531417417255300173240ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::CSS do
  let(:subject) { Rouge::Lexers::CSS.new }

  describe 'guessing' do
    include Support::Guessing
    it 'guesses by filename' do
      assert_guess :filename => 'foo.css'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/css'
    end
  end
end
rouge-3.28.0/spec/lexers/csvs_spec.rb000066400000000000000000000004331417417255300175070ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::CSVS do
  let(:subject) { Rouge::Lexers::CSVS.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.csvs'
    end
  end
end
rouge-3.28.0/spec/lexers/cuda_spec.rb000066400000000000000000000004451417417255300174500ustar00rootroot00000000000000# -*- coding: utf-8 -*- #

describe Rouge::Lexers::CUDA do
  let(:subject) { Rouge::Lexers::CUDA.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.cu'
      assert_guess :filename => 'foo.cuh'
    end
  end
end
rouge-3.28.0/spec/lexers/cypher_spec.rb000066400000000000000000000021231417417255300200210ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Cypher do
  let(:subject) { Rouge::Lexers::Cypher.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.cypher'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'application/x-cypher-query'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    describe 'comments' do
      describe 'inline comment' do
        it 'handles inline comment' do
          assert_tokens_includes "RETURN point({longitude: 2.2105491 /* x */, latitude: 48.9250016 /* y */, srid: 4326}) AS home",
                                 ["Comment.Multiline", "/* x */"],
                                 ["Comment.Multiline", "/* y */"]
        end

        it 'handles multiline comment' do
          assert_tokens_includes "RETURN /* drum\nrolls */ 42",
                                 ["Comment.Multiline", "/* drum\nrolls */"],
                                 ["Literal.Number.Integer", "42"]
        end
      end
    end
  end
end
rouge-3.28.0/spec/lexers/cython_spec.rb000066400000000000000000000010031417417255300200270ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Cython do
  let(:subject) { Rouge::Lexers::Cython.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.pyx'
      assert_guess :filename => 'foo.pxd'
      assert_guess :filename => 'foo.pxi'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-cython'
      assert_guess :mimetype => 'application/x-cython'
    end
  end
end

rouge-3.28.0/spec/lexers/d_spec.rb000066400000000000000000000012261417417255300167550ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::D do
  let(:subject) { Rouge::Lexers::D.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.d'
      assert_guess :filename => 'foo.di'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-dsrc'
      assert_guess :mimetype => 'application/x-dsrc'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    it 'recognizes one-line comments not followed by a newline' do
      assert_tokens_equal '// comment', ['Comment.Single', '// comment']
    end
  end
end
rouge-3.28.0/spec/lexers/dafny_spec.rb000066400000000000000000000005641417417255300176370ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Dafny do
  let(:subject) { Rouge::Lexers::Dafny.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.dfy'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-dafny'
    end
  end
end
rouge-3.28.0/spec/lexers/dart_spec.rb000066400000000000000000000022521417417255300174640ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Dart do
  let(:subject) { Rouge::Lexers::Dart.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.dart'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-dart'
    end
  end
  
  describe 'lexer' do
    include Support::Lexing

    it 'lexes exponential float values' do
      assert_tokens_equal '34.3e-7', ['Literal.Number.Float', '34.3e-7']
    end

    it 'lexes variable interpolation' do
      assert_tokens_equal %('Value: $value'),
        ['Literal.String', "'Value: "],
        ['Literal.String.Interpol', '$value'],
        ['Literal.String', "'"]
    end

    it 'lexes interpolated expression' do
      assert_tokens_equal %('Value: ${value + 1}'),
        ['Literal.String', "'Value: "],
        ['Literal.String.Interpol', '${value + 1}'],
        ['Literal.String', "'"]
    end

    it 'lexes escapes' do
      assert_tokens_equal %q('Line1\nLine2'),
        ['Literal.String', "'Line1"],
        ['Literal.String.Escape', '\n'],
        ['Literal.String', "Line2'"]
    end
  end
end
rouge-3.28.0/spec/lexers/datastudio.rb000066400000000000000000000006031417417255300176570ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Datastudio do
  let(:subject) { Rouge::Lexers::Datastudio.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.job'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-datastudio'
    end
  end
end
rouge-3.28.0/spec/lexers/diff_spec.rb000066400000000000000000000026321417417255300174440ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Diff do
  let(:subject) { Rouge::Lexers::Diff.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.diff'
      assert_guess :filename => 'foo.patch'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-diff'
      assert_guess :mimetype => 'text/x-patch'
    end

    it 'guesses by source' do
      assert_guess :source => <<-source
diff --git a/lib/rouge.rb b/lib/rouge.rb
index d228e4b..560b687 100644
--- a/lib/rouge.rb
+++ b/lib/rouge.rb
@@ -13,6 +13,7 @@ module Rouge
 end
 
 load_dir = Pathname.new(__FILE__).dirname
+load load_dir.join('rouge/text_analyzer.rb')
 load load_dir.join('rouge/token.rb')
 load load_dir.join('rouge/lexer.rb')
 load load_dir.join('rouge/lexers/text.rb')
      source

      assert_guess :source => <<-source
--- a/lib/rouge.rb
+++ b/lib/rouge.rb
@@ -13,6 +13,7 @@ module Rouge
 end
 
 load_dir = Pathname.new(__FILE__).dirname
+load load_dir.join('rouge/text_analyzer.rb')
 load load_dir.join('rouge/token.rb')
 load load_dir.join('rouge/lexer.rb')
 load load_dir.join('rouge/lexers/text.rb')
      source
    end

    it 'does not detect invalid diff-like sources' do
      deny_guess :source => <<-source
---4
---2
      source

      deny_guess :source => <<-source
+++4
+++2
      source
    end
  end
end
rouge-3.28.0/spec/lexers/digdag_spec.rb000066400000000000000000000014061417417255300177510ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Digdag do
  let(:subject) { Rouge::Lexers::Digdag.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.dig'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'application/x-digdag'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    it 'recognizes one line comment on last line even when not terminated by a new line (#360)' do
      assert_tokens_equal "+step1:\n  echo> Hello!\n",
        ["Name.Attribute", "+step1"],
        ["Punctuation.Indicator", ":"],
        ["Text", "\n  "],
        ["Literal.String", "echo> Hello!"],
        ["Text", "\n"]
    end
  end
end
rouge-3.28.0/spec/lexers/docker_spec.rb000066400000000000000000000007471417417255300200100ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Docker do
  let(:subject) { Rouge::Lexers::Docker.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'Dockerfile'
      assert_guess :filename => 'docker.docker'
      assert_guess :filename => 'some.Dockerfile'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-dockerfile-config'
    end
  end
end
rouge-3.28.0/spec/lexers/dot_spec.rb000066400000000000000000000013401417417255300173150ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Dot do
  let(:subject) { Rouge::Lexers::Dot.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.dot'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/vnd.graphviz'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    it 'recognizes one-line "//" comments not followed by a newline' do
      assert_tokens_equal '// comment', ['Comment.Single', '// comment']
    end

    it 'recognizes one-line "#" comments not followed by a newline' do
      assert_tokens_equal '# comment', ['Comment.Single', '# comment']
    end
  end
end
rouge-3.28.0/spec/lexers/ecl_spec.rb000066400000000000000000000011131417417255300172700ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::ECL do
  let(:subject) { Rouge::Lexers::ECL.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.ecl'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'application/x-ecl'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    it 'recognizes one-line comments not followed by a newline (#796)' do
      assert_tokens_equal '// comment', ['Comment.Single', '// comment']
    end
  end
end
rouge-3.28.0/spec/lexers/eex_spec.rb000066400000000000000000000006111417417255300173100ustar00rootroot00000000000000# -*- coding: utf-8 -*- #

describe Rouge::Lexers::EEX do
  let(:subject) { Rouge::Lexers::EEX.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.eex'
      assert_guess :filename => 'foo.html.eex'
      assert_guess :filename => 'foo.html.leex'
      assert_guess :filename => 'foo.html.heex'
    end
  end
end
rouge-3.28.0/spec/lexers/eiffel_spec.rb000066400000000000000000000005651417417255300177710ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Eiffel do
  let(:subject) { Rouge::Lexers::Eiffel.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.e'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-eiffel'
    end
  end
end
rouge-3.28.0/spec/lexers/elixir_spec.rb000066400000000000000000000007271417417255300200330ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Elixir do
  let(:subject) { Rouge::Lexers::Elixir.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.ex'
      assert_guess :filename => 'foo.exs'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-elixir'
      assert_guess :mimetype => 'application/x-elixir'
    end
  end
end
rouge-3.28.0/spec/lexers/elm_spec.rb000066400000000000000000000005561417417255300173140ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Elm do
  let(:subject) { Rouge::Lexers::Elm.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.elm'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-elm'
    end
  end
end
rouge-3.28.0/spec/lexers/email_spec.rb000066400000000000000000000005661417417255300176270ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Email do
  let(:subject) { Rouge::Lexers::Email.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.eml'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'message/rfc822'
    end
  end
end
rouge-3.28.0/spec/lexers/epp_spec.rb000066400000000000000000000003771417417255300173240ustar00rootroot00000000000000# -*- coding: utf-8 -*- #

describe Rouge::Lexers::EPP do
  let(:subject) { Rouge::Lexers::EPP.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.html.epp'
    end
  end
end
rouge-3.28.0/spec/lexers/erb_spec.rb000066400000000000000000000005651417417255300173070ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::ERB do
  let(:subject) { Rouge::Lexers::ERB.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.html.erb'
      assert_guess :filename => 'foo.eruby'
      assert_guess :filename => 'foo.rhtml'
    end
  end
end
rouge-3.28.0/spec/lexers/erlang_spec.rb000066400000000000000000000007301417417255300200010ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Erlang do
  let(:subject) { Rouge::Lexers::Erlang.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.erl'
      assert_guess :filename => 'foo.hrl'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-erlang'
      assert_guess :mimetype => 'application/x-erlang'
    end
  end
end
rouge-3.28.0/spec/lexers/escape_spec.rb000066400000000000000000000012461417417255300177740ustar00rootroot00000000000000describe Rouge::Lexers::Escape do
  let(:lexer) { Rouge::Lexers::Escape.new(lang: 'json') }
  let(:text) { '{ "foo": !> }' }
  let(:result) {
    Rouge::Formatter.with_escape do
      formatter.format(lexer.lex(text))
    end
  }

  describe 'html' do
    let(:formatter) { Rouge::Formatters::HTML.new }

    it 'unescapes' do
      assert { result =~ // }
    end
  end

  describe 'terminal256' do
    let(:formatter) { Rouge::Formatters::Terminal256.new }
    let(:text) { %({ "foo": \n  }) }

    it 'unescapes' do
      assert { result =~ /\e123/ }

      # shouldn't escape the term codes around \n
      assert { result =~ /\n\e/ }
    end
  end
end
rouge-3.28.0/spec/lexers/factor_spec.rb000066400000000000000000000007311417417255300200100ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Factor do
  let(:subject) { Rouge::Lexers::Factor.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.factor'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-factor'
    end

    it 'guesses by source' do
      assert_guess :source => '#!/usr/local/bin/factor'
    end
  end
end
rouge-3.28.0/spec/lexers/fluent_spec.rb000066400000000000000000000004361417417255300200310ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Fluent do
  let(:subject) { Rouge::Lexers::Fluent.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.ftl'
    end
  end
end
rouge-3.28.0/spec/lexers/fortran_spec.rb000066400000000000000000000024021417417255300202020ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Fortran do
  let(:subject) { Rouge::Lexers::Fortran.new }

  include Support::Lexing

  it 'highlights "double precision" and "double" correctly' do
    tokens = subject.lex('double precision :: double').to_a
    assert { tokens.size == 5 }
    assert { tokens.first[0] == Token['Keyword.Type'] }
    assert { tokens.last[0] == Token['Name'] }
  end

  it 'highlights "error stop" but not "error"' do
    tokens = subject.lex('error stop').to_a
    assert { tokens.size == 1 }
    assert { tokens.first[0] == Token['Keyword'] }
    tokens = subject.lex('error').to_a
    assert { tokens.size == 1 }
    assert { tokens.first[0] != Token['Keyword'] }
  end

  it 'highlights "sync images" but not "sync"' do
    tokens = subject.lex('sync images').to_a
    assert { tokens.size == 1 }
    assert { tokens.first[0] == Token['Keyword'] }
    tokens = subject.lex('sync').to_a
    assert { tokens.size == 1 }
    assert { tokens.first[0] != Token['Keyword'] }
  end

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.f90'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-fortran'
    end
  end
end
rouge-3.28.0/spec/lexers/freefem_spec.rb000066400000000000000000000006641417417255300201500ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::FreeFEM do
  let(:subject) { Rouge::Lexers::FreeFEM.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.edp'
      assert_guess :filename => 'foo.idp', :source => 'foo'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-ffsrc'
    end
  end
end
rouge-3.28.0/spec/lexers/fsharp_spec.rb000066400000000000000000000010061417417255300200110ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::FSharp do
  let(:subject) { Rouge::Lexers::FSharp.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.fs'
      assert_guess :filename => 'foo.fsx'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'application/fsharp-script'
	    assert_guess :mimetype => 'text/x-fsharp'
	    assert_guess :mimetype => 'text/x-fsi'
    end
  end
endrouge-3.28.0/spec/lexers/gdscript_spec.rb000066400000000000000000000006651417417255300203570ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::GDScript do
  let(:subject) { Rouge::Lexers::GDScript.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.gd'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-gdscript'
      assert_guess :mimetype => 'application/x-gdscript'
    end
  end
end
rouge-3.28.0/spec/lexers/ghc_cmm_spec.rb000066400000000000000000001320421417417255300201300ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::GHCCmm do
  let(:subject) { Rouge::Lexers::GHCCmm.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'Main.cmm'
      assert_guess :filename => 'Main.dump-cmm'
      assert_guess :filename => 'Main.dump-cmm-switch'
      assert_guess :filename => 'Main.dump-cmm-sp'
      assert_guess :filename => 'Main.dump-cmm-sink'
      assert_guess :filename => 'Main.dump-cmm-raw'
      assert_guess :filename => 'Main.dump-cmm-info'
      assert_guess :filename => 'Main.dump-cmm-from-stg'
      assert_guess :filename => 'Main.dump-cmm-cps'
      assert_guess :filename => 'Main.dump-cmm-cfg'
      assert_guess :filename => 'Main.dump-cmm-cbe'
      assert_guess :filename => 'Main.dump-cmm-caf'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    it 'should lex section markers as headings' do
      core = '==================== Output Cmm ===================='
      assert_tokens_equal core, ['Generic.Heading', core]
    end

    it 'should lex timestamps as comments' do
      core = '2019-12-24 13:23:29.666399 UTC'
      assert_tokens_equal core, ['Comment.Single', core]
    end

    it 'should lex brackets as punctuation' do
      core = '[]'
      assert_tokens_equal core, ['Punctuation', '[]']
    end

    it 'should lex a simple section' do
      core = '[section ""data" . Main.fib1_closure" {
     Main.fib1_closure:
         const GHC.Integer.Type.S#_con_info;
         const 0;
 }]'

      assert_tokens_equal core,
                          ['Punctuation', '['],
                          ['Keyword', 'section'],
                          ['Text', ' '],
                          ['Literal.String.Double', '"'],
                          ['Name.Builtin', '"data"'],
                          ['Text', ' '],
                          ['Punctuation', '.'],
                          ['Text', ' '],
                          ['Name.Namespace', 'Main'], ['Punctuation', '.'], ['Name.Label', 'fib1_closure'],
                          ['Literal.String.Double', '"'],
                          ['Text', ' '],
                          ['Punctuation', '{'],
                          ['Text', "\n     "],
                          ['Name.Namespace', 'Main'], ['Punctuation', '.'], ['Name.Label', 'fib1_closure'],
                          ['Punctuation', ':'],
                          ['Text', "\n         "],
                          ['Keyword.Constant', 'const'],
                          ['Text', ' '],
                          ['Name.Namespace', 'GHC'], ['Punctuation', '.'], ['Name.Namespace', 'Integer'], ['Punctuation', '.'], ['Name.Namespace', 'Type'], ['Punctuation', '.'], ['Name.Label', 'S#_con_info'],
                          ['Punctuation', ';'],
                          ['Text', "\n         "],
                          ['Keyword.Constant', 'const'],
                          ['Text', ' '],
                          ['Literal.Number.Integer', '0'],
                          ['Punctuation', ';'],
                          ['Text', "\n "],
                          ['Punctuation', '}]']
    end

    it 'should lex sections with function definitions' do
      core = '[section ""data" . u4uh_srt" {
     u4uh_srt:
         const stg_SRT_1_info;
         const GHC.Integer.Type.plusInteger_closure;
         const 0;
 },
 Main.fib_fib_entry() //  [R2]'

      assert_tokens_equal core,
                          ['Punctuation', '['],
                          ['Keyword', 'section'],
                          ['Text', ' '],
                          ['Literal.String.Double', '"'],
                          ['Name.Builtin', '"data"'],
                          ['Text', ' '],
                          ['Punctuation', '.'],
                          ['Text', ' '],
                          ['Name.Label', 'u4uh_srt'],
                          ['Literal.String.Double', '"'],
                          ['Text', ' '],
                          ['Punctuation', '{'],

                          ['Text', "\n     "],
                          ['Name.Label', 'u4uh_srt'],
                          ['Punctuation', ':'],
                          ['Text', "\n         "],
                          ['Keyword.Constant', 'const'],
                          ['Text', ' '],
                          ['Name.Label', 'stg_SRT_1_info'],
                          ['Punctuation', ';'],

                          ['Text', "\n         "],
                          ['Keyword.Constant', 'const'],
                          ['Text', ' '],
                          ['Name.Namespace', 'GHC'], ['Punctuation', '.'], ['Name.Namespace', 'Integer'], ['Punctuation', '.'], ['Name.Namespace', 'Type'], ['Punctuation', '.'], ['Name.Label', 'plusInteger_closure'],
                          ['Punctuation', ';'],

                          ['Text', "\n         "],
                          ['Keyword.Constant', 'const'],
                          ['Text', ' '],
                          ['Literal.Number.Integer', '0'],
                          ['Punctuation', ';'],

                          ['Text', "\n "],
                          ['Punctuation', '},'],

                          ['Text', "\n "],
                          ['Name.Namespace', 'Main'], ['Punctuation', '.'], ['Name.Function', 'fib_fib_entry'],
                          ['Punctuation', '()'],
                          ['Text', ' '],
                          ['Comment.Single', '//  [R2]']
    end

    it 'should lex cstring sections' do
      core = '[section ""cstring" . Main.$trModule2_bytes" {
     Main.$trModule2_bytes:
         I8[] [77,97,105,110]
 }]'
      assert_tokens_equal core,
                          ['Punctuation', '['],
                          ['Keyword', 'section'],
                          ['Text', ' '],
                          ['Literal.String.Double', '"'],
                          ['Name.Builtin', '"cstring"'],
                          ['Text', ' '],
                          ['Punctuation', '.'],
                          ['Text', ' '],
                          ['Name.Namespace', 'Main'], ['Punctuation', '.'], ['Name.Label', '$trModule2_bytes'],
                          ['Literal.String.Double', '"'],
                          ['Text', ' '],
                          ['Punctuation', '{'],
                          ['Text', "\n     "],
                          ['Name.Namespace', 'Main'], ['Punctuation', '.'], ['Name.Label', '$trModule2_bytes'],
                          ['Punctuation', ':'],
                          ['Text', "\n         "],
                          ['Keyword.Type', 'I8[]'],
                          ['Text', ' '],
                          ['Punctuation', '['],
                          ['Literal.Number.Integer', '77'],
                          ['Punctuation', ','],
                          ['Literal.Number.Integer', '97'],
                          ['Punctuation', ','],
                          ['Literal.Number.Integer', '105'],
                          ['Punctuation', ','],
                          ['Literal.Number.Integer', '110'],
                          ['Punctuation', ']'],
                          ['Text', "\n "],
                          ['Punctuation', '}]']
    end

    it 'should lex handwritten sections' do
      core = 'section "data" {
  no_break_on_exception: W_[1];
}'

      assert_tokens_equal core,
                          ['Keyword', 'section'],
                          ['Text', ' '],
                          ['Name.Builtin', '"data"'],
                          ['Text', ' '],
                          ['Punctuation', '{'],
                          ['Text', "\n  "],
                          ['Name.Label', 'no_break_on_exception'],
                          ['Punctuation', ':'],
                          ['Text', ' '],
                          ['Keyword.Type', 'W_'],
                          ['Punctuation', '['],
                          ['Literal.Number.Integer', '1'],
                          ['Punctuation', '];'],
                          ['Text', "\n"],
                          ['Punctuation', '}']
    end

    it 'should lex operators and comparisons' do
      core = 'if ((Sp + -16) < SpLim) (likely: False) goto c4tE; else goto c4tF;'

      assert_tokens_equal core,
                          ['Keyword', 'if'],
                          ['Text', ' '],
                          ['Punctuation', '(('],
                          ['Name.Variable.Global', 'Sp'],
                          ['Text', ' '],
                          ['Operator', '+'],
                          ['Text', ' '],
                          ['Literal.Number.Integer', '-16'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Operator', '<'],
                          ['Text', ' '],
                          ['Name.Variable.Global', 'SpLim'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Comment', '(likely: False)'],
                          ['Text', ' '],
                          ['Keyword', 'goto'],
                          ['Text', ' '],
                          ['Name.Label', 'c4tE'],
                          ['Punctuation', ';'],
                          ['Text', ' '],
                          ['Keyword', 'else'],
                          ['Text', ' '],
                          ['Keyword', 'goto'],
                          ['Text', ' '],
                          ['Name.Label', 'c4tF'],
                          ['Punctuation', ';']
    end

    it 'should lex Hp and HpLim as global variables' do
      core = 'if (Hp > HpLim) (likely: False) goto c4vy; else goto c4vx;'

      assert_tokens_equal core,
                          ['Keyword', 'if'],
                          ['Text', ' '],
                          ['Punctuation', '('],
                          ['Name.Variable.Global', 'Hp'],
                          ['Text', ' '],
                          ['Operator', '>'],
                          ['Text', ' '],
                          ['Name.Variable.Global', 'HpLim'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Comment', '(likely: False)'],
                          ['Text', ' '],
                          ['Keyword', 'goto'],
                          ['Text', ' '],
                          ['Name.Label', 'c4vy'],
                          ['Punctuation', ';'],
                          ['Text', ' '],
                          ['Keyword', 'else'],
                          ['Text', ' '],
                          ['Keyword', 'goto'],
                          ['Text', ' '],
                          ['Name.Label', 'c4vx'],
                          ['Punctuation', ';']
    end

    it 'should lex registers as global variables' do
      core = 'R2 = R2;'

      assert_tokens_equal core,
                          ['Name.Variable.Global', 'R2'],
                          ['Text', ' '],
                          ['Operator', '='],
                          ['Text', ' '],
                          ['Name.Variable.Global', 'R2'],
                          ['Punctuation', ';']
    end

    it 'should lex calls' do
      core = 'call GHC.Integer.Type.eqInteger#_info(R3,
                     R2) returns to c4ty, args: 8, res: 8, upd: 8;'

      assert_tokens_equal core,
                          ['Keyword', 'call'],
                          ['Text', ' '],
                          ['Name.Namespace', 'GHC'], ['Punctuation', '.'], ['Name.Namespace', 'Integer'], ['Punctuation', '.'], ['Name.Namespace', 'Type'], ['Punctuation', '.'], ['Name.Function', 'eqInteger#_info'],
                          ['Punctuation', '('],
                          ['Name.Variable.Global', 'R3'],
                          ['Punctuation', ','],
                          ['Text', "\n                     "],
                          ['Name.Variable.Global', 'R2'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Keyword', 'returns'],
                          ['Text', ' '],
                          ['Keyword', 'to'],
                          ['Text', ' '],
                          ['Name.Label', 'c4ty'],
                          ['Punctuation', ','],
                          ['Text', ' '],
                          ['Name.Property', 'args'],
                          ['Punctuation', ':'],
                          ['Text', ' '],
                          ['Literal.Number.Integer', '8'],
                          ['Punctuation', ','],
                          ['Text', ' '],
                          ['Name.Property', 'res'],
                          ['Punctuation', ':'],
                          ['Text', ' '],
                          ['Literal.Number.Integer', '8'],
                          ['Punctuation', ','],
                          ['Text', ' '],
                          ['Name.Property', 'upd'],
                          ['Punctuation', ':'],
                          ['Text', ' '],
                          ['Literal.Number.Integer', '8'],
                          ['Punctuation', ';']
    end

    it 'should lex offset' do
      core = 'offset
'

      assert_tokens_equal core, ['Keyword', 'offset'], ['Text', "\n"]
    end

    it 'should lex array accesses' do
      core = 'I64[Sp] = c4tZ;'

      assert_tokens_equal core,
                          ['Keyword.Type', 'I64'],
                          ['Punctuation', '['],
                          ['Name.Variable.Global', 'Sp'],
                          ['Punctuation', ']'],
                          ['Text', ' '],
                          ['Operator', '='],
                          ['Text', ' '],
                          ['Name.Label', 'c4tZ'],
                          ['Punctuation', ';']

    end

    it 'should lex multi-line comments' do
      core = '/* for objects that are *less* than the size of a word, make sure we
 * round up to the nearest word for the size of the array.
 */'

      assert_tokens_equal core,
                          ['Comment.Multiline', core]
    end

    it 'should lex function calls that start with a register name "prefix"' do
      core = 'Sp_adj(-1);'

      assert_tokens_equal core,
                          ['Name.Function', 'Sp_adj'],
                          ['Punctuation', '('],
                          ['Literal.Number.Integer', '-1'],
                          ['Punctuation', ');']
    end

    it 'should lex #include' do
      core = '#include "Cmm.h"'

      assert_tokens_equal core,
                          ['Comment.Preproc', '#include'],
                          ['Text', ' '],
                          ['Literal.String.Delimiter', '"'],
                          ['Literal.String', 'Cmm.h'],
                          ['Literal.String.Delimiter', '"']
    end

    it 'should lex #if' do
      core = '#if defined(__PIC__)
import pthread_mutex_lock;
import pthread_mutex_unlock;
#endif'

      assert_tokens_equal core,
                          ['Comment.Preproc', '#if'],
                          ['Text', ' '],
                          ['Name.Function', 'defined'],
                          ['Punctuation', '('],
                          ['Name.Label', '__PIC__'],
                          ['Punctuation', ')'],
                          ['Text', "\n"],
                          ['Keyword', 'import'],
                          ['Text', ' '],
                          ['Name.Label', 'pthread_mutex_lock'],
                          ['Punctuation', ';'],
                          ['Text', "\n"],
                          ['Keyword', 'import'],
                          ['Text', ' '],
                          ['Name.Label', 'pthread_mutex_unlock'],
                          ['Punctuation', ';'],
                          ['Text', "\n"],
                          ['Comment.Preproc', '#endif']
    end

    it 'should lex #else' do
      core = '#else'

      assert_tokens_equal core,
                          ['Comment.Preproc', '#else']
    end

    it 'should lex a simple #define statement' do
      core = '#define BA_ALIGN 16'

      assert_tokens_equal core,
                          ['Comment.Preproc', '#define'],
                          ['Text', ' '],
                          ['Name.Label', 'BA_ALIGN'],
                          ['Text', ' '],
                          ['Literal.Number.Integer', '16']
    end

    it 'should lex a simple #define statement with comment' do
      core = '#define /* comment */ BA_ALIGN /* comment */ 16'

      assert_tokens_equal core,
                          ['Comment.Preproc', '#define'],
                          ['Text', ' '],
                          ['Comment.Multiline', '/* comment */'],
                          ['Text', ' '],
                          ['Name.Label', 'BA_ALIGN'],
                          ['Text', ' '],
                          ['Comment.Multiline', '/* comment */'],
                          ['Text', ' '],
                          ['Literal.Number.Integer', '16']
    end

    it 'should lex a #define statement with an expression' do
      core = '#define BA_MASK  (BA_ALIGN-1)'

      assert_tokens_equal core,
                          ['Comment.Preproc', '#define'],
                          ['Text', ' '],
                          ['Name.Label', 'BA_MASK'],
                          ['Text', '  '],
                          ['Punctuation', '('],
                          ['Name.Label', 'BA_ALIGN'],
                          ['Literal.Number.Integer', '-1'],
                          ['Punctuation', ')']
    end

    it 'should lex functions with comments' do
      core = '/* comment */ stg_isEmptyMVarzh /* comment */ ( /* comment */ P_ mvar /* comment */ ) // single line comment
{'
      assert_tokens_equal core,
                          ['Comment.Multiline', '/* comment */'],
                          ['Text', ' '],
                          ['Name.Function', 'stg_isEmptyMVarzh'],
                          ['Text', ' '],
                          ['Comment.Multiline', '/* comment */'],
                          ['Text', ' '],
                          ['Punctuation', '('],
                          ['Text', ' '],
                          ['Comment.Multiline', '/* comment */'],
                          ['Text', ' '],
                          ['Keyword.Type', 'P_'],
                          ['Text', ' '],
                          ['Name.Label', 'mvar'],
                          ['Text', ' '],
                          ['Comment.Multiline', '/* comment */'],
                          ['Text', ' '],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Comment.Single', '// single line comment'],
                          ['Text', "\n"],
                          ['Punctuation', '{']
    end

    it 'should lex functions and return statements' do
      core = 'stg_isEmptyMVarzh ( P_ mvar /* :: MVar a */ )
{
    if (StgMVar_value(mvar) == stg_END_TSO_QUEUE_closure) {
        return (1);
    } else {
        return (0);
    }
}'
      assert_tokens_equal core,
                          ['Name.Function', 'stg_isEmptyMVarzh'],
                          ['Text', ' '],
                          ['Punctuation', '('],
                          ['Text', ' '],
                          ['Keyword.Type', 'P_'],
                          ['Text', ' '],
                          ['Name.Label', 'mvar'],
                          ['Text', ' '],
                          ['Comment.Multiline', '/* :: MVar a */'],
                          ['Text', ' '],
                          ['Punctuation', ')'],
                          ['Text', "\n"],
                          ['Punctuation', '{'],
                          ['Text', "\n    "],
                          ['Keyword', 'if'],
                          ['Text', ' '],
                          ['Punctuation', '('],
                          ['Name.Function', 'StgMVar_value'],
                          ['Punctuation', '('],
                          ['Name.Label', 'mvar'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Operator', '=='],
                          ['Text', ' '],
                          ['Name.Label', 'stg_END_TSO_QUEUE_closure'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Punctuation', '{'],
                          ['Text', "\n        "],
                          ['Keyword', 'return'],
                          ['Text', ' '],
                          ['Punctuation', '('],
                          ['Literal.Number.Integer', '1'],
                          ['Punctuation', ');'],
                          ['Text', "\n    "],
                          ['Punctuation', '}'],
                          ['Text', ' '],
                          ['Keyword', 'else'],
                          ['Text', ' '],
                          ['Punctuation', '{'],
                          ['Text', "\n        "],
                          ['Keyword', 'return'],
                          ['Text', ' '],
                          ['Punctuation', '('],
                          ['Literal.Number.Integer', '0'],
                          ['Punctuation', ');'],
                          ['Text', "\n    "],
                          ['Punctuation', '}'],
                          ['Text', "\n"],
                          ['Punctuation', '}']
    end

    it 'should lex ccall' do
      core = 'ccall runCFinalizers(list);'

      assert_tokens_equal core,
                          ['Keyword', 'ccall'],
                          ['Text', ' '],
                          ['Name.Function', 'runCFinalizers'],
                          ['Punctuation', '('],
                          ['Name.Label', 'list'],
                          ['Punctuation', ');']
    end

    it 'should lex jump' do
      core = 'jump stg_yield_noregs();'

      assert_tokens_equal core,
                          ['Keyword', 'jump'],
                          ['Text', ' '],
                          ['Name.Function', 'stg_yield_noregs'],
                          ['Punctuation', '();']
    end

    it 'should lex foreign calls' do
      core = '(len) = foreign "C" heap_view_closureSize(UNTAG(clos) "ptr");'

      assert_tokens_equal core,
                          ['Punctuation', '('],
                          ['Name.Label', 'len'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Operator', '='],
                          ['Text', ' '],
                          ['Keyword', 'foreign'],
                          ['Text', ' '],
                          ['Literal.String.Delimiter', '"'],
                          ['Literal.String', 'C'],
                          ['Literal.String.Delimiter', '"'],
                          ['Text', ' '],
                          ['Name.Function', 'heap_view_closureSize'],
                          ['Punctuation', '('],
                          ['Name.Function', 'UNTAG'],
                          ['Punctuation', '('],
                          ['Name.Label', 'clos'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Literal.String.Delimiter', '"'],
                          ['Literal.String', 'ptr'],
                          ['Literal.String.Delimiter', '"'],
                          ['Punctuation', ');']
    end

    it 'should lex prim calls' do
      core = 'prim %memcpy(BYTE_ARR_CTS(new_mba), BYTE_ARR_CTS(mba),
             StgArrBytes_bytes(mba), SIZEOF_W);'

      assert_tokens_equal core,
                          ['Keyword', 'prim'],
                          ['Text', ' '],
                          ['Name.Builtin', '%memcpy'],
                          ['Punctuation', '('],
                          ['Name.Function', 'BYTE_ARR_CTS'],
                          ['Punctuation', '('],
                          ['Name.Label', 'new_mba'],
                          ['Punctuation', '),'],
                          ['Text', ' '],
                          ['Name.Function', 'BYTE_ARR_CTS'],
                          ['Punctuation', '('],
                          ['Name.Label', 'mba'],
                          ['Punctuation', '),'],
                          ['Text', "\n             "],
                          ['Name.Function', 'StgArrBytes_bytes'],
                          ['Punctuation', '('],
                          ['Name.Label', 'mba'],
                          ['Punctuation', '),'],
                          ['Text', ' '],
                          ['Name.Label', 'SIZEOF_W'],
                          ['Punctuation', ');']
    end

    it 'should lex switch statements and .. operators' do
      core = 'switch [INVALID_OBJECT .. N_CLOSURE_TYPES]
        (TO_W_( %INFO_TYPE(%STD_INFO(info)) )) {
        case
            IND,
            IND_STATIC:
        {
            fun = StgInd_indirectee(fun);
            goto again;
        }
        default:
        {
            jump %ENTRY_CODE(info) (UNTAG(fun));
        }
    }'

      assert_tokens_equal core,
                          ['Keyword', 'switch'],
                          ['Text', ' '],
                          ['Punctuation', '['],
                          ['Name.Label', 'INVALID_OBJECT'],
                          ['Text', ' '],
                          ['Operator', '..'],
                          ['Text', ' '],
                          ['Name.Label', 'N_CLOSURE_TYPES'],
                          ['Punctuation', ']'],
                          ['Text', "\n        "],
                          ['Punctuation', '('],
                          ['Name.Function', 'TO_W_'],
                          ['Punctuation', '('],
                          ['Text', ' '],
                          ['Name.Builtin', '%INFO_TYPE'],
                          ['Punctuation', '('],
                          ['Name.Builtin', '%STD_INFO'],
                          ['Punctuation', '('],
                          ['Name.Label', 'info'],
                          ['Punctuation', '))'],
                          ['Text', ' '],
                          ['Punctuation', '))'],
                          ['Text', ' '],
                          ['Punctuation', '{'],
                          ['Text', "\n        "],
                          ['Keyword', 'case'],
                          ['Text', "\n            "],
                          ['Name.Label', 'IND'],
                          ['Punctuation', ','],
                          ['Text', "\n            "],
                          ['Name.Label', 'IND_STATIC'],
                          ['Punctuation', ':'],
                          ['Text', "\n        "],
                          ['Punctuation', '{'],
                          ['Text', "\n            "],
                          ['Name.Label', 'fun'],
                          ['Text', ' '],
                          ['Operator', '='],
                          ['Text', ' '],
                          ['Name.Function', 'StgInd_indirectee'],
                          ['Punctuation', '('],
                          ['Name.Label', 'fun'],
                          ['Punctuation', ');'],
                          ['Text', "\n            "],
                          ['Keyword', 'goto'],
                          ['Text', ' '],
                          ['Name.Label', 'again'],
                          ['Punctuation', ';'],
                          ['Text', "\n        "],
                          ['Punctuation', '}'],
                          ['Text', "\n        "],
                          ['Keyword', 'default'],
                          ['Punctuation', ':'],
                          ['Text', "\n        "],
                          ['Punctuation', '{'],
                          ['Text', "\n            "],
                          ['Keyword', 'jump'],
                          ['Text', ' '],
                          ['Name.Builtin', '%ENTRY_CODE'],
                          ['Punctuation', '('],
                          ['Name.Label', 'info'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Punctuation', '('],
                          ['Name.Function', 'UNTAG'],
                          ['Punctuation', '('],
                          ['Name.Label', 'fun'],
                          ['Punctuation', '));'],
                          ['Text', "\n        "],
                          ['Punctuation', '}'],
                          ['Text', "\n    "],
                          ['Punctuation', '}']
    end

    it 'should lex switch statements with two expressions' do
      core = 'switch [0 .. N_CLOSURE_TYPES] type {'

      assert_tokens_equal core,
                          ['Keyword', 'switch'],
                          ['Text', ' '],
                          ['Punctuation', '['],
                          ['Literal.Number.Integer', '0'],
                          ['Text', ' '],
                          ['Operator', '..'],
                          ['Text', ' '],
                          ['Name.Label', 'N_CLOSURE_TYPES'],
                          ['Punctuation', ']'],
                          ['Text', ' '],
                          ['Name.Label', 'type'],
                          ['Text', ' '],
                          ['Punctuation', '{']
    end

    it 'should lex a "never returns" ccall' do
      core = 'ccall barf("PAP object (%p) entered!", R1) never returns;'

      assert_tokens_equal core,
                          ['Keyword', 'ccall'],
                          ['Text', ' '],
                          ['Name.Function', 'barf'],
                          ['Punctuation', '('],
                          ['Literal.String.Delimiter', '"'],
                          ['Literal.String', 'PAP object ('],
                          ['Literal.String.Symbol', '%p'],
                          ['Literal.String', ') entered!'],
                          ['Literal.String.Delimiter', '"'],
                          ['Punctuation', ','],
                          ['Text', ' '],
                          ['Name.Variable.Global', 'R1'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Keyword', 'never'],
                          ['Text', ' '],
                          ['Keyword', 'returns'],
                          ['Punctuation', ';']
    end

    it 'should lex type annotations' do
      core = '0::CBool'

      assert_tokens_equal core,
                          ['Literal.Number.Integer', '0'],
                          ['Operator', '::'],
                          ['Keyword.Type', 'CBool']
    end

    it 'should lex unwind' do
      core = 'unwind Sp = Sp + WDS(1);'

      assert_tokens_equal core,
                          ['Keyword', 'unwind'],
                          ['Text', ' '],
                          ['Name.Variable.Global', 'Sp'],
                          ['Text', ' '],
                          ['Operator', '='],
                          ['Text', ' '],
                          ['Name.Variable.Global', 'Sp'],
                          ['Text', ' '],
                          ['Operator', '+'],
                          ['Text', ' '],
                          ['Name.Function', 'WDS'],
                          ['Punctuation', '('],
                          ['Literal.Number.Integer', '1'],
                          ['Punctuation', ');']
    end

    it 'should lex functions with explicit stack handling' do
      core = 'stg_maskAsyncExceptionszh /* explicit stack */
{'

      assert_tokens_equal core,
                          ['Name.Function', 'stg_maskAsyncExceptionszh'],
                          ['Text', ' '],
                          ['Comment.Multiline', '/* explicit stack */'],
                          ['Text', "\n"],
                          ['Punctuation', '{']
    end

    it 'should lex functions with explicit stack handling and multiline comment' do
      core = 'stg_raisezh
/*
 * comment
 */
{'

      assert_tokens_equal core,
                          ['Name.Function', 'stg_raisezh'],
                          ['Text', "\n"],
                          ['Comment.Multiline', "/*\n * comment\n */"],
                          ['Text', "\n"],
                          ['Punctuation', '{']
    end

    it 'should lex functions that are prefixed with % as builtin' do
      core = 'jump %GET_ENTRY(UNTAG(R1)) [R1];'

      assert_tokens_equal core,
                          ['Keyword', 'jump'],
                          ['Text', ' '],
                          ['Name.Builtin', '%GET_ENTRY'],
                          ['Punctuation', '('],
                          ['Name.Function', 'UNTAG'],
                          ['Punctuation', '('],
                          ['Name.Variable.Global', 'R1'],
                          ['Punctuation', '))'],
                          ['Text', ' '],
                          ['Punctuation', '['],
                          ['Name.Variable.Global', 'R1'],
                          ['Punctuation', '];']
    end

    it 'should lex typed memory accesses' do
      core = 'Sp(i) = W_[p];'

      assert_tokens_equal core,
                          ['Name.Variable.Global', 'Sp'],
                          ['Punctuation', '('],
                          ['Name.Label', 'i'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Operator', '='],
                          ['Text', ' '],
                          ['Keyword.Type', 'W_'],
                          ['Punctuation', '['],
                          ['Name.Label', 'p'],
                          ['Punctuation', '];']
    end

    it 'should lex return' do
      core = 'return(h);'

      assert_tokens_equal core,
                          ['Keyword', 'return'],
                          ['Punctuation', '('],
                          ['Name.Label', 'h'],
                          ['Punctuation', ');']

      core = 'return ();'

      assert_tokens_equal core,
                          ['Keyword', 'return'],
                          ['Text', ' '],
                          ['Punctuation', '();']
    end

    it 'should lex literal floating point numbers' do
      core = 'const 1.5 :: W64;'

      assert_tokens_equal core,
                          ['Keyword.Constant', 'const'],
                          ['Text', ' '],
                          ['Literal.Number.Float', '1.5'],
                          ['Text', ' '],
                          ['Operator', '::'],
                          ['Text', ' '],
                          ['Keyword.Type', 'W64'],
                          ['Punctuation', ';']
    end

    it 'should lex names in statements correctly' do
      core = 'R4 = GHC.Types.True_closure+2;'

      assert_tokens_equal core,
                          ['Name.Variable.Global', 'R4'],
                          ['Text', ' '],
                          ['Operator', '='],
                          ['Text', ' '],
                          ['Name.Namespace', 'GHC'],
                          ['Punctuation', '.'],
                          ['Name.Namespace', 'Types'],
                          ['Punctuation', '.'],
                          ['Name.Label', 'True_closure'],
                          ['Operator', '+'],
                          ['Literal.Number.Integer', '2'],
                          ['Punctuation', ';']
    end

    it 'should lex info_tbls' do
      core =
          '{ info_tbls: [(c3zg,
  label: Main.string_info
  rep: HeapRep static { Thunk }
  srt: Nothing)]
  stack_info: arg_space: 8 updfr_space: Just 8
}'
      assert_tokens_equal core,
                          ['Punctuation', '{ '],
                          ['Name.Entity', 'info_tbls'],
                          ['Punctuation', ':'],
                          ['Text', ' '],
                          ['Punctuation', '[('],
                          ['Name.Label', 'c3zg'],
                          ['Punctuation', ','],
                          ['Text', "\n  "],
                          ['Name.Property', 'label'],
                          ['Punctuation', ':'],
                          ['Text', ' '],
                          ['Name.Namespace', 'Main'],
                          ['Punctuation', '.'],
                          ['Name.Label', 'string_info'],
                          ['Text', "\n  "],
                          ['Name.Property', 'rep'],
                          ['Punctuation', ':'],
                          ['Text', ' HeapRep static '],
                          ['Punctuation', '{'],
                          ['Text', ' Thunk '],
                          ['Punctuation', '}'],
                          ['Text', "\n  "],
                          ['Name.Property', 'srt'],
                          ['Punctuation', ':'],
                          ['Text', ' Nothing'],
                          ['Punctuation', ')]'],
                          ['Text', "\n  "],
                          ['Name.Entity', 'stack_info'],
                          ['Punctuation', ':'],
                          ['Text', ' '],
                          ['Name.Property', 'arg_space'],
                          ['Punctuation', ':'],
                          ['Text', ' '],
                          ['Literal.Number.Integer', '8'],
                          ['Text', ' '],
                          ['Name.Property', 'updfr_space'],
                          ['Punctuation', ':'],
                          ['Text', ' Just '],
                          ['Literal.Number.Integer', '8'],
                          ['Text', "\n"],
                          ['Punctuation', '}']
    end

    it 'should lex a ccall with hints' do
      core = '(_c3zB::I64) = call "ccall" arg hints:  [PtrHint, PtrHint]  result hints:  [PtrHint] newCAF(BaseReg, R1);'

      assert_tokens_equal core,
                          ['Punctuation', '('],
                          ['Name.Label', '_c3zB'],
                          ['Operator', '::'],
                          ['Keyword.Type', 'I64'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Operator', '='],
                          ['Text', ' '],
                          ['Keyword', 'call'],
                          ['Text', ' '],
                          ['Literal.String.Delimiter', '"'],
                          ['Literal.String', 'ccall'],
                          ['Literal.String.Delimiter', '"'],
                          ['Text', ' '],
                          ['Name.Property', 'arg'],
                          ['Text', ' '],
                          ['Name.Property', 'hints'],
                          ['Punctuation', ':'],
                          ['Text', '  '],
                          ['Punctuation', '['],
                          ['Name.Label', 'PtrHint'],
                          ['Punctuation', ','],
                          ['Text', ' '],
                          ['Name.Label', 'PtrHint'],
                          ['Punctuation', ']'],
                          ['Text', '  '],
                          ['Name.Property', 'result'],
                          ['Text', ' '],
                          ['Name.Property', 'hints'],
                          ['Punctuation', ':'],
                          ['Text', '  '],
                          ['Punctuation', '['],
                          ['Name.Label', 'PtrHint'],
                          ['Punctuation', ']'],
                          ['Text', ' '],
                          ['Name.Function', 'newCAF'],
                          ['Punctuation', '('],
                          ['Name.Variable.Global', 'BaseReg'],
                          ['Punctuation', ','],
                          ['Text', ' '],
                          ['Name.Variable.Global', 'R1'],
                          ['Punctuation', ');']
    end

    it 'should lex escaped newlines' do
      core = '#define SELECTOR_CODE_NOUPD(offset)                                     \
'
      assert_tokens_equal core,
                          ['Comment.Preproc', '#define'],
                          ['Text', ' '],
                          ['Name.Label', 'SELECTOR_CODE_NOUPD'],
                          ['Punctuation', '('],
                          ['Name.Label', 'offset'],
                          ['Punctuation', ')'],
                          ['Text', "                                     \\\n"]
    end

    it 'should respect #define when it lexes types' do
      core = '#define Char_hash_con_info _imp__ghczmprim_GHCziTypes_Czh_con_info
#define Int_hash_con_info _imp__ghczmprim_GHCziTypes_Izh_con_info'

      assert_tokens_equal core,
                          ['Comment.Preproc', '#define'],
                          ['Text', ' '],
                          ['Name.Label', 'Char_hash_con_info'],
                          ['Text', ' '],
                          ['Name.Label', '_imp__ghczmprim_GHCziTypes_Czh_con_info'],
                          ['Text', "\n"],
                          ['Comment.Preproc', '#define'],
                          ['Text', ' '],
                          ['Name.Label', 'Int_hash_con_info'],
                          ['Text', ' '],
                          ['Name.Label', '_imp__ghczmprim_GHCziTypes_Izh_con_info']
    end

    it 'should respect functions when it lexes types' do
      core = 'SAVE_STGREGS
SAVE_THREAD_STATE();'

      assert_tokens_equal core,
                          ['Name.Label', 'SAVE_STGREGS'],
                          ['Text', "\n"],
                          ['Name.Function', 'SAVE_THREAD_STATE'],
                          ['Punctuation', '();']
    end

    it 'should lex inline function calls' do
      core = 'StgTSO_alloc_limit(CurrentTSO) `lt` (0::I64)'

      assert_tokens_equal core,
                          ['Name.Function', 'StgTSO_alloc_limit'],
                          ['Punctuation', '('],
                          ['Name.Variable.Global', 'CurrentTSO'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Punctuation', '`'],
                          ['Name.Function', 'lt'],
                          ['Punctuation', '`'],
                          ['Text', ' '],
                          ['Punctuation', '('],
                          ['Literal.Number.Integer', '0'],
                          ['Operator', '::'],
                          ['Keyword.Type', 'I64'],
                          ['Punctuation', ')']
    end

    it 'should lex  (codegen variables)' do
      core = ''

      assert_tokens_equal core,
                          ['Name.Builtin', '']
    end

    it 'should lex special character ids in names with module prefix' do
      core = 'GHC.Tuple.()_closure+1;'

      assert_tokens_equal core,
                          ['Name.Namespace', 'GHC'],
                          ['Punctuation', '.'],
                          ['Name.Namespace', 'Tuple'],
                          ['Punctuation', '.'],
                          ['Name.Label', '()_closure'],
                          ['Operator', '+'],
                          ['Literal.Number.Integer', '1'],
                          ['Punctuation', ';']
    end

    it 'should lex complex function names' do
      core = 'foo()_(1);'

      assert_tokens_equal core,
                          ['Name.Function', 'foo()_'],
                          ['Punctuation', '('],
                          ['Literal.Number.Integer', '1'],
                          ['Punctuation', ');']
    end

    it 'should lex complex function names' do
      core = 'foo()_(1);'

      assert_tokens_equal core,
                          ['Name.Function', 'foo()_'],
                          ['Punctuation', '('],
                          ['Literal.Number.Integer', '1'],
                          ['Punctuation', ');']

      core = 'foo(,)3_(1);'

      assert_tokens_equal core,
                          ['Name.Function', 'foo(,)3_'],
                          ['Punctuation', '('],
                          ['Literal.Number.Integer', '1'],
                          ['Punctuation', ');']

      core = '()_closure+1;'

      assert_tokens_equal core,
                          ['Name.Label', '()_closure'],
                          ['Operator', '+'],
                          ['Literal.Number.Integer', '1'],
                          ['Punctuation', ';']
    end

    it 'should lex complex names in an expression' do
      core = 'const GHC.Types.[]_closure+1;'

      assert_tokens_equal core,
                          ['Keyword.Constant', 'const'],
                          ['Text', ' '],
                          ['Name.Namespace', 'GHC'],
                          ['Punctuation', '.'],
                          ['Name.Namespace', 'Types'],
                          ['Punctuation', '.'],
                          ['Name.Label', '[]_closure'],
                          ['Operator', '+'],
                          ['Literal.Number.Integer', '1'],
                          ['Punctuation', ';']

      core = 'R1 = ()_closure+1;'

      assert_tokens_equal core,
                          ['Name.Variable.Global', 'R1'],
                          ['Text', ' '],
                          ['Operator', '='],
                          ['Text', ' '],
                          ['Name.Label', '()_closure'],
                          ['Operator', '+'],
                          ['Literal.Number.Integer', '1'],
                          ['Punctuation', ';']
    end
  end
end


rouge-3.28.0/spec/lexers/ghc_core_spec.rb000066400000000000000000000423141417417255300203060ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::GHCCore do
  let(:subject) { Rouge::Lexers::GHCCore.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'Main.dump-simpl'
      assert_guess :filename => 'Main.dump-ds'
      assert_guess :filename => 'Main.dump-cse'
      assert_guess :filename => 'Main.dump-spec'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    # see ruby_spec.rb
    it 'should lex section markers as comments' do
      core = '==================== Tidy Core ===================='
      assert_tokens_equal core, ['Generic.Heading', core]

      core = '==================== Common sub-expression ===================='
      assert_tokens_equal core, ['Generic.Heading', core]
    end

    it 'should lex timestamps as comments' do
      core = '2019-11-23 17:25:18.138996323 UTC'
      assert_tokens_equal core, ['Comment.Single', core]
    end

    it 'should lex result sizes as comments' do
      core = "Result size of Tidy Core
  = {terms: 8,052, types: 9,956, coercions: 0, joins: 41/225}"

      assert_tokens_equal core, ['Comment.Multiline', core]
    end

    it 'should lex single line comments' do
      core = '-- RHS size: {terms: 6, types: 42, coercions: 0, joins: 0/0}'
      assert_tokens_equal core, ['Comment.Single', core]
    end

    it "should lex type declarations with type constraints" do
      core = 'GHC.Real.$p1RealFrac :: forall a. RealFrac a => Real a'
      assert_tokens_equal core,
                          ['Name.Function', 'GHC.Real.$p1RealFrac'],
                          ['Text', ' '],
                          ['Operator', '::'],
                          ['Text', ' '],
                          ['Keyword', 'forall'],
                          ['Text', ' '],
                          ['Name.Variable', 'a'],
                          ['Punctuation', '.'],
                          ['Text', ' '],
                          ['Keyword.Type', 'RealFrac'],
                          ['Text', ' '],
                          ['Name.Variable', 'a'],
                          ['Text', ' '],
                          ['Operator', '=>'],
                          ['Text', ' '],
                          ['Keyword.Type', 'Real'],
                          ['Text', ' '],
                          ['Name.Variable', 'a']
    end

    it "should lex type declarations with hints and special characters in the name" do
      core = 'GHC.Real.$w$slcm1 [InlPrag=NOINLINE[1]] :: Int -> Int# -> Int#'

      assert_tokens_equal core,
                          ['Name.Function', 'GHC.Real.$w$slcm1'],
                          ['Text', ' '],
                          ['Comment.Special', '[InlPrag=NOINLINE[1]]'],
                          ['Text', ' '],
                          ['Operator', '::'],
                          ['Text', ' '],
                          ['Keyword.Type', 'Int'],
                          ['Text', ' '],
                          ['Operator', '->'],
                          ['Text', ' '],
                          ['Keyword.Type', 'Int#'],
                          ['Text', ' '],
                          ['Operator', '->'],
                          ['Text', ' '],
                          ['Keyword.Type', 'Int#']

    end

    it "should lex type declarations with # as type" do
      core = 'GHC.Real.$w$s$c/ [InlPrag=NOUSERINLINE[2]]
  :: Integer
     -> Integer -> Integer -> Integer -> (# Integer, Integer #)
'

      assert_tokens_equal core,
                          ['Name.Function', 'GHC.Real.$w$s$c/'],
                          ['Text', ' '],
                          ['Comment.Special', '[InlPrag=NOUSERINLINE[2]]'],
                          ['Text', "\n  "],
                          ['Operator', '::'],
                          ['Text', ' '],
                          ['Keyword.Type', 'Integer'],
                          ['Text', "\n     "],
                          ['Operator', '->'],
                          ['Text', ' '],
                          ['Keyword.Type', 'Integer'],
                          ['Text', ' '],
                          ['Operator', '->'],
                          ['Text', ' '],
                          ['Keyword.Type', 'Integer'],
                          ['Text', ' '],
                          ['Operator', '->'],
                          ['Text', ' '],
                          ['Keyword.Type', 'Integer'],
                          ['Text', ' '],
                          ['Operator', '->'],
                          ['Text', ' '],
                          ['Punctuation', '('],
                          ['Name.Variable', '#'],
                          ['Text', ' '],
                          ['Keyword.Type', 'Integer'],
                          ['Punctuation', ','],
                          ['Text', ' '],
                          ['Keyword.Type', 'Integer'],
                          ['Text', ' '],
                          ['Name.Variable', '#'],
                          ['Punctuation', ')'],
                          ['Text', "\n"]
    end

    it 'should lex type declarations with parentheses and arrows' do
      core = 'properFraction
  :: forall a b. (RealFrac a, Integral b) => a -> (b, a)'

      assert_tokens_equal core,
                          ['Name.Function', 'properFraction'],
                          ['Text', "\n  "],
                          ['Operator', '::'],
                          ['Text', ' '],
                          ['Keyword', 'forall'],
                          ['Text', ' '],
                          ['Name.Variable', 'a'],
                          ['Text', ' '],
                          ['Name.Variable', 'b'],
                          ['Punctuation', '.'],
                          ['Text', ' '],
                          ['Punctuation', '('],
                          ['Keyword.Type', 'RealFrac'],
                          ['Text', ' '],
                          ['Name.Variable', 'a'],
                          ['Punctuation', ','],
                          ['Text', ' '],
                          ['Keyword.Type', 'Integral'],
                          ['Text', ' '],
                          ['Name.Variable', 'b'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Operator', '=>'],
                          ['Text', ' '],
                          ['Name.Variable', 'a'],
                          ['Text', ' '],
                          ['Operator', '->'],
                          ['Text', ' '],
                          ['Punctuation', '('],
                          ['Name.Variable', 'b'],
                          ['Punctuation', ','],
                          ['Text', ' '],
                          ['Name.Variable', 'a'],
                          ['Punctuation', ')']
    end

    it 'should lex function definitions with special characters in the name' do
      core = 'GHC.Real.$W:%
  ='

      assert_tokens_equal core,
                          ['Name.Function', 'GHC.Real.$W:%'],
                          ['Text', "\n  "],
                          ['Operator', '=']
    end

    it 'should lex full functions' do
      core = 'GHC.Real.$p1RealFrac
  = \ (@ a_a1S3) (v_B1 :: RealFrac a_a1S3) ->
      case v_B1 of v_B1
      { GHC.Real.C:RealFrac v_B2 v_B3 v_B4 v_B5 v_B6 v_B7 v_B8 ->
      v_B2
      }'

      assert_tokens_equal core,
                          # Function
                          ['Name.Function', 'GHC.Real.$p1RealFrac'],
                          ['Text', "\n  "],
                          ['Operator', '='],
                          ['Text', ' '],
                          # Lambda
                          ['Operator', '\\'],
                          ['Text', ' '],
                          ['Punctuation', '('],
                          ['Operator', '@'],
                          ['Text', ' '],
                          ['Name.Variable', 'a_a1S3'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Punctuation', '('],
                          ['Name.Variable', 'v_B1'],
                          ['Text', ' '],
                          ['Operator', '::'],
                          ['Text', ' '],
                          ['Keyword.Type', 'RealFrac'],
                          ['Text', ' '],
                          ['Name.Variable', 'a_a1S3'],
                          ['Punctuation', ')'],
                          ['Text', ' '],
                          ['Operator', '->'],
                          ['Text', "\n      "],
                          # Case
                          ['Keyword', 'case'],
                          ['Text', ' '],
                          ['Name.Variable', 'v_B1'],
                          ['Text', ' '],
                          ['Keyword', 'of'],
                          ['Text', ' '],
                          ['Name.Variable', 'v_B1'],
                          ['Text', "\n      "],
                          ['Punctuation', '{'],
                          ['Text', ' '],
                          ["Keyword.Type", "GHC"], ["Punctuation", "."], ["Keyword.Type", "Real"], ["Punctuation", "."], ["Keyword.Type", "C:RealFrac"],
                          ['Text', ' '],
                          ['Name.Variable', 'v_B2'],
                          ['Text', ' '],
                          ['Name.Variable', 'v_B3'],
                          ['Text', ' '],
                          ['Name.Variable', 'v_B4'],
                          ['Text', ' '],
                          ['Name.Variable', 'v_B5'],
                          ['Text', ' '],
                          ['Name.Variable', 'v_B6'],
                          ['Text', ' '],
                          ['Name.Variable', 'v_B7'],
                          ['Text', ' '],
                          ['Name.Variable', 'v_B8'],
                          ['Text', ' '],
                          ['Operator', '->'],
                          ['Text', "\n      "],
                          # Body
                          ['Name.Variable', 'v_B2'],
                          ['Text', "\n      "],
                          ['Punctuation', '}']
    end

    it 'should lex annotations' do
      core = '[GblId[ClassOp],
 Arity=1,
 Caf=NoCafRefs,
 Str=,
 RULES: Built in rule for GHC.Real.$p1RealFrac: "Class op $p1RealFrac"]'

      assert_tokens_equal core, ['Comment.Special', core]
    end

    it 'should lex integers' do
      core = "GHC.Real.$tc':%
  = GHC.Types.TyCon
      11952989868638128372##
      6861245286732044789##
      GHC.Real.$trModule
      GHC.Real.$tc':%2
      1#
      GHC.Real.$tc':%1"

      assert_tokens_equal core,
                          ['Name.Function', "GHC.Real.$tc':%"],
                          ['Text', "\n  "],
                          ['Operator', '='],
                          ['Text', ' '],
                          ["Keyword.Type", "GHC"], ["Punctuation", "."], ["Keyword.Type", "Types"], ["Punctuation", "."], ["Keyword.Type", "TyCon"],
                          ['Text', "\n      "],
                          ['Literal.Number.Integer', '11952989868638128372##'],
                          ['Text', "\n      "],
                          ['Literal.Number.Integer', '6861245286732044789##'],
                          ['Text', "\n      "],
                          ["Keyword.Type", "GHC"], ["Punctuation", "."], ["Keyword.Type", "Real"], ["Punctuation", "."], ['Name.Variable', '$trModule'],
                          ['Text', "\n      "],
                          ["Keyword.Type", "GHC"], ["Punctuation", "."], ["Keyword.Type", "Real"], ["Punctuation", "."], ['Name.Variable', "$tc':%2"],
                          ['Text', "\n      "],
                          ['Literal.Number.Integer', '1#'],
                          ['Text', "\n      "],
                          ["Keyword.Type", "GHC"], ["Punctuation", "."], ["Keyword.Type", "Real"], ["Punctuation", "."], ['Name.Variable', "$tc':%1"]
    end

    it 'should lex floats' do
      core = 'number = ghc-prim-0.5.3:GHC.Types.D# 1.5##'

      assert_tokens_equal core,
                          ['Name.Function', 'number'],
                          ['Text', ' '],
                          ['Operator', '='],
                          ['Text', ' '],
                          ['Name.Namespace', 'ghc-prim-0.5.3'],
                          ['Punctuation', ':'],
                          ['Keyword.Type', 'GHC'], ['Punctuation', '.'], ['Keyword.Type', 'Types'], ['Punctuation', '.'], ['Keyword.Type', 'D#'],
                          ['Text', ' '],
                          ['Literal.Number.Float', '1.5##']

    end

    it 'should lex strings' do
      core = 'lvl_s2UY = "I am a \"String\""#'

      assert_tokens_equal core,
                          ['Name.Function', "lvl_s2UY"],
                          ['Text', ' '],
                          ['Operator', '='],
                          ['Text', ' '],
                          ['Literal.String', "\"I am a \\\"String\\\"\"#"]
    end

    it 'should lex character literals' do
      core = "Main.main4 = GHC.Show.$wshowLitChar 'C'# Main.main5"

      assert_tokens_equal core,
                          ['Name.Function', 'Main.main4'],
                          ['Text', ' '],
                          ['Operator', '='],
                          ['Text', ' '],
                          ['Keyword.Type', 'GHC'], ['Punctuation', '.'], ['Keyword.Type', 'Show'], ['Punctuation', '.'], ['Name.Variable', '$wshowLitChar'],
                          ['Text', ' '],
                          ['Literal.String.Char', "'C'#"],
                          ['Text', ' '],
                          ['Keyword.Type', 'Main'], ['Punctuation', '.'], ['Name.Variable', 'main5']
    end

    it 'should lex recursive bindings' do
      core = 'Rec {

end Rec }'

      assert_tokens_equal core,
                          ['Keyword', 'Rec'],
                          ['Text', ' '],
                          ['Punctuation', '{'],
                          ['Text', "\n\n"],
                          ['Keyword', 'end'],
                          ['Text', ' '],
                          ['Keyword', 'Rec'],
                          ['Text', ' '],
                          ['Punctuation', '}']
    end

    it 'should lex GHC rules' do
      core = '"SPEC $c== @ Integer"
    forall ($dEq_s61e :: Eq Integer).
      GHC.Real.$fEqRatio_$c== @ Integer $dEq_s61e
      = GHC.Real.$fEqRatio_$s$c=='

      assert_tokens_equal core,
                          ['Name.Label', "\"SPEC $c== @ Integer\""],
                          ['Text', "\n    "],
                          ['Keyword', 'forall'],
                          ['Text', ' '],
                          ['Punctuation', '('],
                          ['Name.Variable', '$dEq_s61e'],
                          ['Text', ' '],
                          ['Operator', '::'],
                          ['Text', ' '],
                          ['Keyword.Type', 'Eq'],
                          ['Text', ' '],
                          ['Keyword.Type', 'Integer'],
                          ['Punctuation', ').'],
                          ['Text', "\n      "],
                          ['Keyword.Type', 'GHC'], ['Punctuation', '.'], ['Keyword.Type', 'Real'], ['Punctuation', '.'], ['Name.Variable', '$fEqRatio_$c=='],
                          ['Text', ' '],
                          ['Operator', '@'],
                          ['Text', ' '],
                          ['Keyword.Type', 'Integer'],
                          ['Text', ' '],
                          ['Name.Variable', '$dEq_s61e'],
                          ['Text', "\n      "],
                          ['Operator', '='],
                          ['Text', ' '],
                          ['Keyword.Type', 'GHC'], ['Punctuation', '.'], ['Keyword.Type', 'Real'], ['Punctuation', '.'], ['Name.Variable', '$fEqRatio_$s$c==']
    end

    it 'should lex names with numbers' do
      core = 'Main.main1
  = ghc-prim-0.5.3:GHC.Types.: @ Char GHC.Show.$fShow(,)3 Main.main2'

      assert_tokens_equal core,
                          ['Name.Function', 'Main.main1'],
                          ['Text', "\n  "],
                          ['Operator', '='],
                          ['Text', " "],
                          ['Name.Namespace', 'ghc-prim-0.5.3'],
                          ['Punctuation', ':'],
                          ['Keyword.Type', 'GHC'], ['Punctuation', '.'], ['Keyword.Type', 'Types'], ['Punctuation', '.'], ['Name.Variable', ':'],
                          ['Text', ' '],
                          ['Operator', '@'],
                          ['Text', " "],
                          ['Keyword.Type', 'Char'],
                          ['Text', " "],
                          ['Keyword.Type', 'GHC'], ['Punctuation', '.'], ['Keyword.Type', 'Show'], ['Punctuation', '.'], ['Name.Variable', '$fShow(,)3'],
                          ['Text', " "],
                          ['Keyword.Type', 'Main'], ['Punctuation', '.'], ['Name.Variable', 'main2']
    end

    it 'should lex array types' do
      core = 'Main.main5 :: [Char]'

      assert_tokens_equal core,
                          ['Name.Function', 'Main.main5'],
                          ['Text', ' '],
                          ['Operator', '::'],
                          ['Text', ' '],
                          ['Keyword.Type', '[Char]']
    end
  end
end
rouge-3.28.0/spec/lexers/gherkin_spec.rb000066400000000000000000000025511417417255300201630ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Gherkin do
  let(:subject) { Rouge::Lexers::Gherkin.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.feature'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-gherkin'
    end

    it 'guesses by source' do
      assert_guess :source => '#!/usr/bin/env cucumber'
    end
  end

  describe 'lexing' do
    it 'highlights multiline steps correctly' do
      tokens = subject.lex("When this\nAnd that").to_a

      assert { tokens.size == 4 }
      assert { tokens[0][0] == Token['Name.Function'] }
      assert { tokens[1][0] == Token['Text'] }
      assert { tokens[2][0] == Token['Name.Function'] }
      assert { tokens[3][0] == Token['Text'] }
    end

    it 'highlights placeholders correctly' do
      tokens = subject.lex('When  (, )< garbage').to_a

      assert { tokens.size == 7 }
      assert { tokens[0][0] == Token['Name.Function'] }
      assert { tokens[1][0] == Token['Name.Variable'] }
      assert { tokens[2][0] == Token['Text'] }
      assert { tokens[3][0] == Token['Name.Variable'] }
      assert { tokens[4][0] == Token['Text'] }
      assert { tokens[5][0] == Token['Name.Variable'] }
      assert { tokens[6][0] == Token['Text'] }
    end
  end
end
rouge-3.28.0/spec/lexers/go_spec.rb000066400000000000000000000006361417417255300171430ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Go do
  let(:subject) { Rouge::Lexers::Go.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.go'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-go'
      assert_guess :mimetype => 'application/x-go'
    end
  end
end

rouge-3.28.0/spec/lexers/gradle_spec.rb000066400000000000000000000005741417417255300177750ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Gradle do
  let(:subject) { Rouge::Lexers::Gradle.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'build.gradle'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-gradle'
    end
  end
end
rouge-3.28.0/spec/lexers/graphql_spec.rb000066400000000000000000000006231417417255300201700ustar00rootroot00000000000000# frozen_string_literal: true

describe Rouge::Lexers::GraphQL do
  let(:subject) { Rouge::Lexers::GraphQL.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.graphql'
      assert_guess :filename => 'bar.gql'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'application/graphql'
    end
  end
end
rouge-3.28.0/spec/lexers/groovy_spec.rb000066400000000000000000000005721417417255300200620ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Groovy do
  let(:subject) { Rouge::Lexers::Groovy.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.groovy'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-groovy'
    end
  end
end
rouge-3.28.0/spec/lexers/hack_spec.rb000066400000000000000000000011711417417255300174370ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Hack do
  let(:subject) { Rouge::Lexers::Hack.new }

  describe 'guessing' do
    include Support::Guessing


    it 'Guesses .php and .hh files that contain Hack code' do
      assert_guess :filename => 'foo.php', :source => ' 'foo.hh', :source => ' 'foo.php', :source => ' 'foo.hh', :source => '#include '
    end
  end
end
rouge-3.28.0/spec/lexers/haml_spec.rb000066400000000000000000000012111417417255300174450ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Haml do
  let(:subject) { Rouge::Lexers::Haml.new }
  include Support::Lexing

  it 'lexes custom filters' do
    lexer = Rouge::Lexers::Haml.new(:filters => { :tex => 'tex' })

    assert_has_token 'Comment', <<-tex, lexer
      :tex
        % this is a tex comment!
    tex
  end

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.html.haml'
      assert_guess :filename => 'foo.haml'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-haml'
    end
  end

end
rouge-3.28.0/spec/lexers/handlebars_spec.rb000066400000000000000000000007431417417255300206400ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Handlebars do
  let(:subject) { Rouge::Lexers::Handlebars.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.handlebars'
      assert_guess :filename => 'foo.hbs'
      assert_guess :filename => 'foo.mustache'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-handlebars'
    end
  end
end
rouge-3.28.0/spec/lexers/haskell_spec.rb000066400000000000000000000010101417417255300201440ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Haskell do
  let(:subject) { Rouge::Lexers::Haskell.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.hs'
      assert_guess :filename => 'foo.hs-boot'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-haskell'
    end

    it 'guesses by source' do
      assert_guess :source => '#!/usr/bin/env runhaskell'
    end
  end
end
rouge-3.28.0/spec/lexers/haxe_spec.rb000066400000000000000000000010071417417255300174540ustar00rootroot00000000000000# -*- coding: utf-8 -*- #

describe Rouge::Lexers::Haxe do
  let(:subject) { Rouge::Lexers::Haxe.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.hx'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/haxe'
      assert_guess :mimetype => 'text/x-haxe'
      assert_guess :mimetype => 'text/x-hx'
    end

    it 'guesses by source' do
      assert_guess :source => '#!/usr/local/bin/haxe'
    end
  end
end
rouge-3.28.0/spec/lexers/hcl_spec.rb000066400000000000000000000005041417417255300172760ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Hcl do
  let(:subject) { Rouge::Lexers::Hcl.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.hcl'
      assert_guess :filename => 'foo.nomad'
    end
  end
end
rouge-3.28.0/spec/lexers/hlsl_spec.rb000066400000000000000000000006361417417255300175000ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::HLSL do
  let(:subject) { Rouge::Lexers::HLSL.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.hlsl'
      assert_guess :filename => 'foo.hlsli'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-hlsl'
    end
  end
end
rouge-3.28.0/spec/lexers/hocon_spec.rb000066400000000000000000000004461417417255300176430ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::HOCON do
  let(:subject) { Rouge::Lexers::HOCON.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'application.hocon'
    end
  end
end
rouge-3.28.0/spec/lexers/hql_spec.rb000066400000000000000000000011061417417255300173130ustar00rootroot00000000000000# -*- coding: utf-8 -*- #

describe Rouge::Lexers::HQL do
  let(:subject) { Rouge::Lexers::HQL.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.hql'
    end

  end

  describe 'lexing' do
    include Support::Lexing

    it 'recognizes variable interpolation within a string' do
      assert_tokens_equal '"${var1}.${var2}"', ['Literal.String.Double', '"'], ['Name.Variable', '${var1}'], ['Literal.String.Double', '.'], ['Name.Variable', '${var2}'], ['Literal.String.Double', '"']
    end
  end
end
rouge-3.28.0/spec/lexers/html_spec.rb000066400000000000000000000070271417417255300175030ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::HTML do
  let(:subject) { Rouge::Lexers::HTML.new }
  include Support::Lexing

  it 'lexes embedded script tags' do
    assert_no_errors ''
  end

  describe 'lexing' do
    include Support::Lexing

    describe 'element names' do
      it 'allow dashes to support custom elements' do
        assert_tokens_equal '',
                            ['Name.Tag', '']
      end
    end
    describe 'attribute names' do
      it 'allow * to support Angular 2+ structural Directives' do
        assert_tokens_equal '',
                            ['Name.Tag', '']
      end
    end
    describe 'attribute names' do
      it 'allow # to support Angular 2+ template reference variables' do
        assert_tokens_equal '',
                            ['Name.Tag', '']
      end
    end
    describe 'attribute names' do
      it 'allow [] to support Angular 2+ data binding inputs' do
        assert_tokens_equal '',
                            ['Name.Tag', '']
      end
    end
    describe 'attribute names' do
      it 'allow () to support Angular 2+ data binding outputs' do
        assert_tokens_equal '',
                            ['Name.Tag', '']
      end
    end
  end

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.html'
      assert_guess :filename => 'foo.htm'
      assert_guess :filename => 'foo.xhtml'
      assert_guess :filename => 'foo.cshtml'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/html'
      assert_guess :mimetype => 'application/xhtml+xml'
    end

    it 'guesses by source' do
      assert_guess :source => ''
      assert_guess :source => <<-source
        
        
        
        
      source

      assert_guess :source => <<-source
        
        
        
      source

      assert_guess :source => ''
    end
  end
end
rouge-3.28.0/spec/lexers/http_spec.rb000066400000000000000000000026761417417255300175230ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::HTTP do
  let(:subject) { Rouge::Lexers::HTTP.new }
  include Support::Lexing

  it 'lexes a HTTP/2 request' do
    request = "GET / HTTP/2"
    assert_tokens_equal request, ["Name.Function", "GET"],
                                 ["Text", " "],
                                 ["Name.Namespace", "/"],
                                 ["Text", " "],
                                 ["Keyword", "HTTP"],
                                 ["Operator", "/"],
                                 ["Literal.Number", "2"]
  end
  
  it 'lexes a HTTP/1.1 request' do
    request = "GET / HTTP/1.1"
    assert_tokens_equal request, ["Name.Function", "GET"],
                                 ["Text", " "],
                                 ["Name.Namespace", "/"],
                                 ["Text", " "],
                                 ["Keyword", "HTTP"],
                                 ["Operator", "/"],
                                 ["Literal.Number", "1.1"]
  end

  it 'lexes an empty HTTP/1.1 response' do
    response = "HTTP/1.1 200 "
    assert_tokens_equal response, ["Keyword", "HTTP"],
                                  ["Operator", "/"], 
                                  ["Literal.Number", "1.1"],
                                  ["Text", " "],
                                  ["Literal.Number", "200"],
                                  ["Text", " "]
  end
end
rouge-3.28.0/spec/lexers/hylang_spec.rb000066400000000000000000000006451417417255300200200ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::HyLang do
  let(:subject) { Rouge::Lexers::HyLang.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.hy'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-hy'
      assert_guess :mimetype => 'application/x-hy'
    end
  end
end
rouge-3.28.0/spec/lexers/idlang_spec.rb000066400000000000000000000005111417417255300177640ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::IDLang do
  let(:subject) { Rouge::Lexers::IDLang.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      #assert_guess :filename => 'foo.pro'
      assert_guess :filename => 'foo.idl'
    end
  end
end
rouge-3.28.0/spec/lexers/igorpro_spec.rb000066400000000000000000000005721417417255300202160ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::IgorPro do
  let(:subject) { Rouge::Lexers::IgorPro.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.ipf'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-igorpro'
    end
  end
end
rouge-3.28.0/spec/lexers/ini_spec.rb000066400000000000000000000006331417417255300173120ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::INI do
  let(:subject) { Rouge::Lexers::INI.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.ini'
      assert_guess :filename => '.gitconfig'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-ini'
    end
  end
end
rouge-3.28.0/spec/lexers/io_spec.rb000066400000000000000000000014631417417255300171440ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::IO do
  let(:subject) { Rouge::Lexers::IO.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.io'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-iosrc'
    end

    it 'guesses by source' do
      assert_guess :source => '#!/usr/local/bin/io'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    it 'recognizes one-line "//" comments not followed by a newline' do
      assert_tokens_equal '// comment', ['Comment.Single', '// comment']
    end

    it 'recognizes one-line "#" comments not followed by a newline' do
      assert_tokens_equal '# comment', ['Comment.Single', '# comment']
    end
  end
end
rouge-3.28.0/spec/lexers/isbl_spec.rb000066400000000000000000000004331417417255300174620ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::ISBL do
  let(:subject) { Rouge::Lexers::ISBL.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.isbl'
    end
  end
end
rouge-3.28.0/spec/lexers/j_spec.rb000066400000000000000000000204441417417255300167660ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::J do
  let(:subject) { Rouge::Lexers::J.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.ijs'
      assert_guess :filename => 'foo.ijt'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    describe 'primitives' do
      #        noun        => Keyword.Constant
      #        verb        => Name.Function
      # adverb/conjunction => Operator
      #       copula       => Punctuation

      it 'covers all the verbs' do
        %w'
          =           < <. <:     > >. >:
          + +. +:     - -. -:     * *. *:     % %. %:
          ^ ^.        $ $. $:       ~. ~:     | |. |:
          , ,. ,:     ;    ;:     # #. #:     !
               /:          \:     [    [:     ]
          { {. {: {::   }. }:       ". ":     ? ?.
          A. C. e. E. i. i: I. j. L. o. p. p.. p: q:
          r. s: u. u: v. x: Z:
          _9: _8: _7: _6: _5: _4: _3: _2: _1: 0: 1: 2:
          3: 4: 5: 6: 7: 8: 9: _:
        '.each do |verb|
          assert_tokens_equal verb, ['Name.Function', verb]
        end
      end

      it 'covers all the modifiers' do
        %w'
               ^:     ~           . .. .:     : :. ::
            ;.          !. !:     / /.       \\ \.
          }       }:: "           `    `:     @ @. @:
          & &. &: &.:
          d. D. D: f. F. F.. F.: F: F:. F:: H. L: M. S:
          t. t: T.
        '.each do |modifier|
          assert_tokens_equal modifier, ['Operator', modifier]
        end
      end

      it 'recognizes the other primitives' do
        %w'a. a:'.each do |noun|
          assert_tokens_equal noun, ['Keyword.Constant', noun]
        end
        %w'=. =:'.each do |copula|
          assert_tokens_equal copula, ['Punctuation', copula]
        end
      end

      it 'validates the inflection' do
        assert_tokens_equal '[.q::F:.:. .::',
          ['Error', '[.q::F:.:.'], ['Text', ' '],
          ['Error', '.::']
      end
    end

    describe 'words' do
      it 'accepts names/locatives' do
        assert_tokens_equal 'c',
          ['Name', 'c']
        assert_tokens_equal 'foo_bar',
          ['Name', 'foo_bar']
        assert_tokens_equal 'F00barBAZ',
          ['Name', 'F00barBAZ']
        assert_tokens_equal 'foo_loc_',
          ['Name', 'foo_loc_']
        assert_tokens_equal 'foo_1_',
          ['Name', 'foo_1_']
        assert_tokens_equal 'foo__',
          ['Name', 'foo__']
        assert_tokens_equal 'foo_bar__obj',
          ['Name', 'foo_bar__obj']
        assert_tokens_equal 'foo__obj1__obj2',
          ['Name', 'foo__obj1__obj2']
      end

      it 'rejects non-ascii characters' do
        assert_tokens_equal 'á',
          ['Error', 'á']
      end

      it 'recognizes control words' do
        assert_tokens_equal 'if. do. return. end.',
          ['Keyword', 'if.'], ['Text', ' '],
          ['Keyword', 'do.'],
          ['Text', ' '],
          ['Keyword', 'return.'],
          ['Text', ' '],
          ['Keyword', 'end.']
      end

      it 'recognizes control words that include identifiers' do
        assert_tokens_equal 'for_foo.a.do.end.',
          ['Keyword', 'for_'],
          ['Name', 'foo'],
          ['Keyword', '.'],
          ['Keyword.Constant', 'a.'],
          ['Keyword', 'do.end.']
        assert_tokens_equal 'label_0a.',
          ['Keyword', 'label_'],
          ['Name.Label', '0a'],
          ['Keyword', '.']
      end

      it 'validates the inflection' do
        assert_tokens_equal 'foo. bar: do.. goto_.',
          ['Error', 'foo.'], ['Text', ' '],
          ['Error', 'bar:'], ['Text', ' '],
          ['Error', 'do..'], ['Text', ' '],
          ['Error', 'goto_.']
      end
    end

    describe 'numerics' do
      it 'accepts various forms of numeric constants' do
        assert_tokens_equal '1 _2.4e9 _.j__ _.01 16bff.ee 12345x 3r2p_1',
          ['Literal.Number', '1'], ['Text', ' '],
          ['Literal.Number', '_2.4e9'], ['Text', ' '],
          ['Literal.Number', '_.j__'], ['Text', ' '],
          ['Literal.Number', '_.01'], ['Text', ' '],
          ['Literal.Number', '16bff.ee'], ['Text', ' '],
          ['Literal.Number', '12345x'], ['Text', ' '],
          ['Literal.Number', '3r2p_1']
      end

      it 'validates the inflection' do
        assert_tokens_equal '10: 2.:',
          ['Error', '10:'], ['Text', ' '],
          ['Error', '2.:']
      end
    end

    describe 'strings' do
      it 'recognizes single-quoted text' do
        assert_tokens_equal "'foo bar 12345á!#$@?'",
          ['Literal.String.Single', "'foo bar 12345á!#$@?'"]
      end

      it 'recognizes escape sequences' do
        assert_tokens_equal "'foo''bar'''",
          ['Literal.String.Single', "'foo"],
          ['Literal.String.Escape', "''"],
          ['Literal.String.Single', "bar"],
          ['Literal.String.Escape', "''"],
          ['Literal.String.Single', "'"]
      end

      it 'recognizes no inflection' do
        assert_tokens_equal "'foo'.'bar':",
          ['Literal.String.Single', "'foo'"],
          ['Operator', '.'],
          ['Literal.String.Single', "'bar'"],
          ['Operator', ':']
      end
    end

    describe 'comments' do
      it 'recognizes single line comments' do
        assert_tokens_equal 'NB.foo bar á',
          ['Comment.Single', 'NB.foo bar á']
        assert_tokens_equal "123 NB. foo\nbar",
          ['Literal.Number', '123'],
          ['Text', ' '],
          ['Comment.Single', 'NB. foo'],
          ['Text', "\n"],
          ['Name', 'bar']
      end

      it 'recognizes multiline comments' do
        assert_tokens_equal "Note ''\nfoo\nbar\nbaz\n12345á\n)",
          ['Name', 'Note'], ['Text', ' '],
          ['Literal.String.Single', "''"], ['Text', "\n"],
          ['Comment.Multiline', "foo\nbar\nbaz\n12345á\n"],
          ['Punctuation', ')']
        assert_tokens_equal "0 Note ''",
          ['Literal.Number', '0'], ['Text', ' '],
          ['Name', 'Note'], ['Text', ' '],
          ['Literal.String.Single', "''"]
        assert_tokens_equal "Note\n",
          ['Name', 'Note'], ['Text', "\n"]
        assert_tokens_equal 'Note=: [',
          ['Name', 'Note'],
          ['Punctuation', '=:'], ['Text', ' '],
          ['Name.Function', '[']
      end

      it 'rejects inflected NB./Note' do
        assert_tokens_equal 'NB..foo',
          ['Error', 'NB..'],
          ['Name', 'foo']
        assert_tokens_equal 'Note.1',
          ['Error', 'Note.'],
          ['Literal.Number', '1']
      end
    end

    describe 'explicit definitions' do
      it 'recognizes multiline noun' do
        assert_tokens_equal "noun define\nFOO bar\n*!'~\n  á1`_(\n)",
          ['Keyword.Pseudo', 'noun'], ['Text', ' '],
          ['Keyword.Pseudo', 'define'], ['Text', "\n"],
          ['Literal.String.Heredoc', "FOO bar\n*!'~\n  á1`_(\n"],
          ['Punctuation', ')']
      end

      it 'recognizes multiline code' do
        assert_tokens_equal "verb define\n>:y\n:\nx + y\n)",
          ['Keyword.Pseudo', 'verb'], ['Text', ' '],
          ['Keyword.Pseudo', 'define'], ['Text', "\n"],
          ['Name.Function', '>:'],
          ['Name.Builtin.Pseudo', 'y'], ['Text', "\n"],
          ['Punctuation', ':'], ['Text', "\n"],
          ['Name.Builtin.Pseudo', 'x'], ['Text', ' '],
          ['Name.Function', '+'], ['Text', ' '],
          ['Name.Builtin.Pseudo', 'y'], ['Text', "\n"],
          ['Punctuation', ')']
        assert_tokens_equal "1 :0\nm :\n)",
          ['Keyword.Pseudo', '1'], ['Text', ' '],
          ['Keyword.Pseudo', ':0'], ['Text', "\n"],
          ['Name.Builtin.Pseudo', 'm'], ['Text', ' '],
          ['Operator', ':'], ['Text', "\n"],
          ['Punctuation', ')']
      end

      it 'lexes inside explicit definition literals' do
        assert_tokens_equal "conjunction def '1 -@u ''foo''&v NB.bar'",
          ['Keyword.Pseudo', 'conjunction'], ['Text', ' '],
          ['Keyword.Pseudo', 'def'], ['Text', ' '],
          ['Punctuation', "'"],
          ['Literal.Number', '1'], ['Text', ' '],
          ['Name.Function', '-'],
          ['Operator', '@'],
          ['Name.Builtin.Pseudo', 'u'], ['Text', ' '],
          ['Literal.String.Single', "''foo''"],
          ['Operator', '&'],
          ['Name.Builtin.Pseudo', 'v'], ['Text', ' '],
          ['Comment.Single', 'NB.bar'],
          ['Punctuation', "'"]
      end
    end
  end
end
rouge-3.28.0/spec/lexers/janet_spec.rb000066400000000000000000000007261417417255300176370ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Janet do
  let(:subject) { Rouge::Lexers::Janet.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.janet'
      assert_guess :filename => 'foo.jdn'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-janet'
      assert_guess :mimetype => 'application/x-janet'
    end
  end
end
rouge-3.28.0/spec/lexers/java_spec.rb000066400000000000000000000005621417417255300174550ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Java do
  let(:subject) { Rouge::Lexers::Java.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.java'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-java'
    end
  end
end
rouge-3.28.0/spec/lexers/javascript_spec.rb000066400000000000000000000015321417417255300207000ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Javascript do
  let(:subject) { Rouge::Lexers::Javascript.new }

  describe 'lexing' do
    include Support::Lexing

    it %(doesn't let a bad regex mess up the whole lex) do
      assert_has_token 'Error',          "var a = /foo;\n1"
      assert_has_token 'Literal.Number', "var a = /foo;\n1"
    end
  end

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.cjs'
      assert_guess :filename => 'foo.js'
      assert_guess :filename => 'foo.mjs'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/javascript'
    end

    it 'guesses by source' do
      assert_guess :source => '#!/usr/bin/env node'
      assert_guess :source => '#!/usr/local/bin/jsc'
    end
  end
end
rouge-3.28.0/spec/lexers/jinja_spec.rb000066400000000000000000000007031417417255300176240ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Jinja do
  let(:subject) { Rouge::Lexers::Jinja.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by mimetype' do
      assert_guess mimetype: 'application/x-django-templating'
      assert_guess mimetype: 'application/x-jinja'
      assert_guess mimetype: 'text/html+django'
      assert_guess mimetype: 'text/html+jinja'
    end
  end
end
rouge-3.28.0/spec/lexers/jsl_spec.rb000066400000000000000000000004351417417255300173230ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::JSL do
  let(:subject) { Rouge::Lexers::JSL.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.jsl'
    end
    
  end
end
rouge-3.28.0/spec/lexers/json_spec.rb000066400000000000000000000014071417417255300175040ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::JSON do
  let(:subject) { Rouge::Lexers::JSON.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.json'
      assert_guess :filename => 'Pipfile.lock'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'application/json'
      assert_guess :mimetype => 'application/vnd.api+json'
      assert_guess :mimetype => 'application/hal+json'
      assert_guess :mimetype => 'application/problem+json'
      assert_guess :mimetype => 'application/schema+json'
    end

    it 'guesses by source' do
      assert_guess :mimetype => 'application/json', :source => '{"name": "value"}'
    end
  end
end
rouge-3.28.0/spec/lexers/jsonnet_spec.rb000066400000000000000000000006561417417255300202200ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::Jsonnet do
  let(:subject) { Rouge::Lexers::Jsonnet.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.jsonnet'
      assert_guess :filename => 'foo.libsonnet'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-jsonnet'
    end
  end
end
rouge-3.28.0/spec/lexers/jsp_spec.rb000066400000000000000000000007661417417255300173360ustar00rootroot00000000000000# -*- coding: utf-8 -*- #
# frozen_string_literal: true

describe Rouge::Lexers::JSP do
    let(:subject) { Rouge::Lexers::JSP.new }
    let(:bom) { "\xEF\xBB\xBF" }
  
    describe 'guessing' do
      include Support::Guessing
  
      it 'guesses by filename' do
        assert_guess :filename => 'file.jsp'
      end
  
      it 'guesses by mimetype' do
        assert_guess :mimetype => 'text/x-jsp'
        assert_guess :mimetype => 'application/x-jsp'
      end
  
    end
endrouge-3.28.0/spec/lexers/jsx_spec.rb000066400000000000000000000014201417417255300173320ustar00rootroot00000000000000# frozen_string_literal: true

describe Rouge::Lexers::JSX do
  let(:subject) { Rouge::Lexers::JSX.new }

  describe 'guessing' do
    include Support::Guessing

    it 'guesses by filename' do
      assert_guess :filename => 'foo.jsx'
    end

    it 'guesses by mimetype' do
      assert_guess :mimetype => 'text/x-jsx'
      assert_guess :mimetype => 'application/x-jsx'
    end
  end

  describe 'lexing' do
    include Support::Lexing

    it 'parse attribute with dashes' do
      assert_tokens_equal '
Hello broken world!
Hello nested world!
Hello tagless world! <œuvre> <书名 语言="français">Les Misérables rouge-3.28.0/spec/visual/samples/http000066400000000000000000000070051417417255300175430ustar00rootroot00000000000000HTTP/1.1 200 OK Date: Tue, 13 Dec 2011 00:11:44 GMT Status: 200 OK X-Transaction: 50b85fff78dab4a3 X-RateLimit-Limit: 150 ETag: "b31143be48ebfe7512b65fe64fe092f3" X-Frame-Options: SAMEORIGIN Last-Modified: Tue, 13 Dec 2011 00:11:44 GMT X-RateLimit-Remaining: 145 X-Runtime: 0.01190 X-Transaction-Mask: a6183ffa5f8ca943ff1b53b5644ef1145f6f285d Content-Type: application/json; charset=utf-8 Content-Length: 2389 Pragma: no-cache X-RateLimit-Class: api X-Revision: DEV Expires: Tue, 31 Mar 1981 05:00:00 GMT Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 X-MID: a55f21733bc52bb11d1fc58f9b51b4974fbb8f83 X-RateLimit-Reset: 1323738416 Set-Cookie: k=10.34.234.116.1323735104238974; path=/; expires=Tue, 20-Dec-11 00:11:44 GMT; domain=.twitter.com Set-Cookie: guest_id=v1%3A13237351042425496; domain=.twitter.com; path=/; expires=Thu, 12-Dec-2013 12:11:44 GMT Set-Cookie: _twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCPS6wjQ0AToHaWQiJTFiMTlhY2E1ZjczYThk%250ANDUwMWQxNjMwZGU2YTQ1ODBhIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--6b502f30a083e8a41a64f10930e142ea362b1561; domain=.twitter.com; path=/; HttpOnly Vary: Accept-Encoding Server: tfe [{"contributors_enabled":false,"profile_background_tile":true,"followers_count":644,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/69064242\/gb_normal.jpg","screen_name":"birkenfeld","default_profile_image":false,"following":null,"friends_count":88,"profile_sidebar_fill_color":"7AC3EE","url":"http:\/\/pythonic.pocoo.org\/","name":"Georg Brandl","default_profile":false,"is_translator":false,"utc_offset":3600,"profile_sidebar_border_color":"65B0DA","description":"","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme10\/bg.gif","favourites_count":0,"profile_use_background_image":true,"created_at":"Tue Dec 30 22:25:11 +0000 2008","status":{"retweet_count":10,"favorited":false,"geo":null,"possibly_sensitive":false,"coordinates":null,"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"retweeted":false,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"created_at":"Sat Jul 09 13:42:35 +0000 2011","truncated":false,"id_str":"89690914515206144","contributors":null,"place":null,"source":"web","in_reply_to_user_id":null,"id":89690914515206144,"retweeted_status":{"retweet_count":10,"favorited":false,"geo":null,"possibly_sensitive":false,"coordinates":null,"in_reply_to_screen_name":null,"in_reply_to_status_id_str":null,"retweeted":false,"in_reply_to_status_id":null,"in_reply_to_user_id_str":null,"created_at":"Sat Jul 09 13:07:04 +0000 2011","truncated":false,"id_str":"89681976755372032","contributors":null,"place":null,"source":"web","in_reply_to_user_id":null,"id":89681976755372032,"text":"Excellent Python posts from @mitsuhiko - http:\/\/t.co\/k1wt6e4 and @ncoghlan_dev - http:\/\/t.co\/eTxacgZ (links fixed)"},"text":"RT @jessenoller: Excellent Python posts from @mitsuhiko - http:\/\/t.co\/k1wt6e4 and @ncoghlan_dev - http:\/\/t.co\/eTxacgZ (links fixed)"},"follow_request_sent":null,"statuses_count":553,"geo_enabled":false,"notifications":null,"profile_text_color":"3D1957","id_str":"18490730","lang":"en","profile_background_image_url":"http:\/\/a1.twimg.com\/images\/themes\/theme10\/bg.gif","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/69064242\/gb_normal.jpg","show_all_inline_media":true,"listed_count":65,"profile_link_color":"FF0000","verified":false,"id":18490730,"time_zone":"Berlin","profile_background_color":"642D8B","location":"Bavaria, Germany"}] rouge-3.28.0/spec/visual/samples/hylang000066400000000000000000000042151417417255300200460ustar00rootroot00000000000000#!/usr/bin/env hy (import hy.core) (defn hyghlight-names [] (-> (hy.core.reserved.names) (sorted))) (defn hyghlight-keywords [] (sorted hy.core.reserved.keyword.kwlist)) (defn hyghlight-builtins [] (sorted (- (hy.core.reserved.names) (frozenset hy.core.reserved.keyword.kwlist)))) (defmacro replace-line [spaces line-format end-of-line keywords] `(+ line (.join ~end-of-line (list-comp (.format ~line-format :space (* " " ~spaces) :line (.join " " keyword-line)) [keyword-line (partition ~keywords 10)])) "\n")) (defn generate-highlight-js-file [] (defn replace-highlight-js-keywords [line] (cond [(in "// keywords" line) (replace-line 6 "{space}'{line} '" " +\n" (hyghlight-names))] [True line])) (with [f (open "templates/highlight_js/hy.js")] (.join "" (list-comp (replace-highlight-js-keywords line) [line (.readlines f)])))) (defn generate-rouge-file [] (defn replace-rouge-keywords [line] (cond [(in "@keywords" line) (replace-line 10 "{space}{line}" "\n" (hyghlight-keywords))] [(in "@builtins" line) (replace-line 10 "{space}{line}" "\n" (hyghlight-builtins))] [True line])) (with [f (open "templates/rouge/hylang.rb")] (.join "" (list-comp (replace-rouge-keywords line) [line (.readlines f)])))) (defmain [&rest args] (let [highlight-library (second args)] (print (cond [(= highlight-library "highlight.js") (generate-highlight-js-file)] [(= highlight-library "rouge") (generate-rouge-file)] [True "Usage: hy hyghlight.hy [highlight.js | rouge]"])))) rouge-3.28.0/spec/visual/samples/idlang000066400000000000000000000076061417417255300200310ustar00rootroot00000000000000; vim: set ts=4 sw=4 et ft=idlang: ;+ ; Greatest common divisor function ;- function gcd, a, b compile_opt idl2, hidden j = a & k = b while (finite(k) and (k /= 0)) do begin t = j mod k j = k k = t endwhile return, a end ;+ ; Least common multiple funcion ;- function lcm, a, b compile_opt idl2, hidden return, abs(a * b) / gcd(a, b) end pro rat::normalize compile_opt idl2, hidden n = gcd(abs(self.numerator), abs(self.denominator)) ; Note: This only works in IDL >= 8.3 new_numerator = (self.numerator / n) * $ signum(signum(self.numerator) * signum(self.denominator)) new_denominator = self.denominator / n self.numerator = temporary(new_numerator) self.denominator = temporary(new_denominator) end function rat::numerator compile_opt idl2, hidden return, self.numerator end function rat::denominator compile_opt idl2, hidden return, self.denominator end pro rat::add, q compile_opt idl2, hidden n = lcm(self.denominator, q->denominator()) new_numerator = (n / self.denominator) * self.numerator + $ (n / q->denominator()) * q->numerator() new_denominator = n self.numerator = temporary(new_numerator) self.denominator = temporary(new_denominator) self.normalize end pro rat::sub, q compile_opt idl2, hidden r = obj_new('rat', -q->numerator(), q->denominator()) self.add, r obj_destroy, r end pro rat::mul, r, q compile_opt idl2, hidden self.numerator = self.numerator * q->numerator() self.denominator = self.denominator * q->denominator() self.normalize end pro rat::div, q compile_opt idl2, hidden r = obj_new('rat', q->denominator(), q->numerator()) self.mul, r obj_destroy, r end function rat::INIT, numerator, denominator compile_opt idl2, hidden if (n_params() eq 2) then begin self.numerator = numerator self.denominator = denominator endif $ else if (obj_valid(numerator)) then begin ; numerator is actually a "rat" object self.numerator = numerator->numerator() self.denominator = numerator->denominator() endif return, 1 end pro rat__define, class compile_opt idl2, hidden class = { rat, $ numerator: 0., $ denominator: 0. $ } end pro print_bottle, n, verbose=verbose compile_opt idl2 on_error, 2 verbose = keyword_set(verbose) !quiet = ~verbose if (verbose) then begin case (n) of 2: begin print, n, format='(I0, 1X, "bottles of beer on the wall,")' print, n, format='(I0, 1X, "bottles of beer.")' print, format='("Take one down, pass it around,")' print, format='("one last bottle of beer on the wall.", /)' end 1: begin print, n, format='("One last bottle of beer on the wall,")' print, n, format='("one last bottle of beer.")' print, format='("Take one down, pass it around,")' print, format='("no more bottles of beer on the wall.", /)' end default: begin print, n, format='(I0, 1X, "bottles of beer on the wall,")' print, n, format='(I0, 1X, "bottles of beer.")' print, format='("Take one down, pass it around,")' print, n - 1, format='(I0, 1X, "bottles of beer on the wall.", /)' end endcase endif end pro bottles compile_opt idl2 on_error, 2 towels = 'Don''t Panic!' nbottles = 99S r = obj_new('rat', 1, 2) q = obj_new('rat', 1, 6) while (nbottles gt '0'XULL) do begin print_bottle, nbottles nbottles -= 1 endwhile print, (towels ne '') ? towels : 'Panic!' stop r->sub, q print, r->numerator(), r->denominator(), format='(I0, "/", I0)' end rouge-3.28.0/spec/visual/samples/igorpro000066400000000000000000000776051417417255300202620ustar00rootroot00000000000000#pragma rtGlobals=3 #pragma version=1.0 #pragma IgorVersion = 6.3.0 #pragma IndependentModule=CodeBrowserModule // This file was created by () byte physics Thomas Braun, support@byte-physics.de // (c) 2013 Menu "CodeBrowser" // CTRL+0 is the keyboard shortcut "Open/0", /Q, CodeBrowserModule#CreatePanel() End // Markers for the different listbox elements StrConstant strConstantMarker = "\\W539" StrConstant constantMarker = "\\W534" StrConstant functionMarker = "\\W529" StrConstant macroMarker = "\\W519" StrConstant windowMarker = "\\W520" StrConstant procMarker = "\\W521" StrConstant structureMarker = "\\W522" // the idea here: static functions have less intense colors StrConstant plainColor = "0,0,0" // black StrConstant staticColor = "47872,47872,47872" // grey StrConstant tsColor = "0,0,65280" // blue StrConstant tsStaticColor = "32768,40704,65280" // light blue StrConstant overrideColor = "65280,0,0" // red StrConstant overrideTSColor= "26368,0,52224" // purple StrConstant pkgFolder = "root:Packages:CodeBrowser" // 2D Wave // first column : marker depending on the function/macro type // second column: full declaration of the function/macro // one row for each function/macro StrConstant declarations = "declarations" // 1D Wave in each row having the line of the function or -1 for macros StrConstant declarationLines = "lines" // database-like global multidimensional waves for storing parsing results to minimize time. static StrConstant CsaveStrings = "saveStrings" static Strconstant CSaveVariables = "saveVariables" static StrConstant CsaveWaves = "saveWaves" // Maximum Waves that will be saved in Experiment. first in first out. static Constant CsaveMaximum = 1024 Constant openKey = 46 // ".", the dot // List of available macro subtypes StrConstant subTypeList = "Graph;GraphStyle;GraphMarquee;Table;TableStyle;Layout;LayoutStyle;LayoutMarquee;ListBoxControl;Panel;ButtonControl;CheckBoxControl;PopupMenuControl;SetVariableControl" // List of igor7 structure elements. static strConstant cstrTypes = "Variable|String|WAVE|NVAR|SVAR|DFREF|FUNCREF|STRUCT|char|uchar|int16|uint16|int32|uint32|int64|uint64|float|double" // Loosely based on the WM procedure from the documentation // Returns a human readable string for the given parameter/return type. // See the documentation for FunctionInfo for the exact values. Function/S interpretParamType(ptype, paramOrReturn) variable ptype, paramOrReturn string typeStr = "" if(paramOrReturn != 0 && paramOrReturn != 1) Abort "paramOrReturn must be 1 or 0" endif if(ptype & 0x4000) typeStr += "wave" // type addon if(ptype & 0x1) typeStr += "/C" endif // text wave for parameters only. Seems to be a bug in the documentation or Igor. Already reported to WM. if(ptype == 0x4000 && paramOrReturn) typeStr += "/T" elseif(ptype & 0x4) typeStr += "/D" elseif(ptype & 0x2) // this is the default wave type, this is printed 99% of the time so we don't output it // typeStr += "/R" elseif(ptype & 0x8) typeStr += "/B" elseif(ptype & 0x10) typeStr += "/W" elseif(ptype & 0x20) typeStr += "/I" elseif(ptype & 0x80) // undocumented typeStr += "/WAVE" elseif(ptype & 0x100) typeStr += "/DF" endif if(ptype & 0x40) typeStr += "/U" endif // if(getGlobalVar("debuggingEnabled") == 1) // string msg // sprintf msg, "type:%d, str:%s", ptype, typeStr // debugPrint(msg) // endif return typeStr endif // special casing if(ptype == 0x5) return "imag" elseif(ptype == 0x1005) return "imag&" endif if(ptype & 0x2000) typeStr += "str" elseif(ptype & 0x4) typeStr += "var" elseif(ptype & 0x100) typeStr += "dfref" elseif(ptype & 0x200) typeStr += "struct" elseif(ptype & 0x400) typeStr += "funcref" endif if(ptype & 0x1) typeStr += " imag" endif if(ptype & 0x1000) typeStr += "&" endif return typeStr End // Convert the SPECIAL tag from FunctionInfo Function/S interpretSpecialTag(specialTag) string specialTag strswitch(specialTag) case "no": return "" break default: return specialTag break endswitch End // Convert the THREADSAFE tag from FunctionInfo Function/S interpretThreadsafeTag(threadsafeTag) string threadsafeTag strswitch(threadsafeTag) case "yes": return "threadsafe" break case "no": return "" break default: debugPrint("Unknown default value") return "" break endswitch End // Convert the SUBTYPE tag from FunctionInfo Function/S interpretSubtypeTag(subtypeTag) string subtypeTag strswitch(subtypeTag) case "NONE": return "" break default: return subtypeTag break endswitch End // Returns a human readable interpretation of the function info string Function/S interpretParameters(funcInfo) string funcInfo variable numParams = NumberByKey("N_PARAMS", funcInfo) variable i string str = "", key, paramType variable numOptParams = NumberByKey("N_OPT_PARAMS", funcInfo) for(i = 0; i < numParams; i += 1) sprintf key, "PARAM_%d_TYPE", i paramType = interpretParamType(NumberByKey(key, funcInfo), 1) if(i == numParams - numOptParams) str += "[" endif str += paramType if(i != numParams - 1) str += ", " endif endfor if(numOptParams > 0) str += "]" endif return str End // Returns a cmd for the given fill *and* stroke color Function/S getColorDef(color) string color string str sprintf str, "\k(%s)\K(%s)", color, color return str End // Creates a colored marker based on the function type Function/S createMarkerForType(type) string type string marker if(strsearch(type, "function", 0) != -1) marker = functionMarker elseif(strsearch(type, "macro", 0) != -1) marker = macroMarker elseif(strsearch(type, "window", 0) != -1) marker = windowMarker elseif(strsearch(type, "proc", 0) != -1) marker = procMarker elseif(strsearch(type, "strconstant", 0) != -1) marker = strConstantMarker elseif(strsearch(type, "constant", 0) != -1) marker = constantMarker elseif(strsearch(type, "structure", 0) != -1) marker = structureMarker endif // plain definitions if(cmpstr(type,"function") == 0 || cmpstr(type,"macro") == 0 || cmpstr(type,"window") == 0 || cmpstr(type,"proc") == 0 || cmpstr(type,"constant") == 0 || cmpstr(type,"strconstant") == 0 || cmpstr(type,"structure") == 0) return getColorDef(plainColor) + marker endif if(strsearch(type,"threadsafe",0) != -1) if(strsearch(type,"static",0) != -1) // threadsafe + static return getColorDef(tsStaticColor) + marker elseif(strsearch(type,"override",0) != -1) // threadsafe + override return getColorDef(overrideTSColor) + marker else return getColorDef(tsColor) + marker // plain threadsafe endif elseif(strsearch(type,"static",0) != -1) return getColorDef(staticColor) + marker // plain static elseif(strsearch(type,"override",0) != -1) return getColorDef(overrideColor) + marker // plain override endif Abort "Unknown type" End // Pretty printing of function/macro with additional info Function/S formatDecl(funcOrMacro, params, subtypeTag, [returnType]) string funcOrMacro, params, subtypeTag, returnType if(!isEmpty(subtypeTag)) subtypeTag = " : " + subtypeTag endif string decl if(ParamIsDefault(returnType)) sprintf decl, "%s(%s)%s", funcOrMacro, params, subtypeTag else sprintf decl, "%s(%s) -> %s%s", funcOrMacro, params, returnType, subtypeTag endif return decl End // Adds all kind of information to a list of function in current procedure Function addDecoratedFunctions(module, procedure, declWave, lineWave) string module, procedure Wave/T declWave Wave/D lineWave String options, funcList string func, funcDec, fi string threadsafeTag, specialTag, params, subtypeTag, returnType variable idx, numMatches, numEntries // list normal, userdefined, override and static functions options = "KIND:18,WIN:" + procedure funcList = FunctionList("*", ";", options) numMatches = ItemsInList(funcList) numEntries = DimSize(declWave, 0) Redimension/N=(numEntries + numMatches, -1) declWave, lineWave for(idx = numEntries; idx < (numEntries + numMatches); idx += 1) func = StringFromList(idx, funcList) fi = FunctionInfo(module + "#" + func, procedure) if(isEmpty(fi)) debugPrint("macro or other error for " + module + "#" + func) endif returnType = interpretParamType(NumberByKey("RETURNTYPE", fi),0) threadsafeTag = interpretThreadsafeTag(StringByKey("THREADSAFE", fi)) specialTag = interpretSpecialTag(StringByKey("SPECIAL", fi)) subtypeTag = interpretSubtypeTag(StringByKey("SUBTYPE", fi)) params = interpretParameters(fi) declWave[idx][0] = createMarkerForType("function" + specialTag + threadsafeTag) declWave[idx][1] = formatDecl(func, params, subtypeTag, returnType = returnType) lineWave[idx] = NumberByKey("PROCLINE", fi) endfor string msg sprintf msg, "decl rows=%d\r", DimSize(declWave, 0) debugPrint(msg) End // Adds Constants/StrConstants by searching for them in the Procedure with a Regular Expression Function addDecoratedConstants(module, procedureWithoutModule, declWave, lineWave) String module, procedureWithoutModule WAVE/T declWave WAVE/D lineWave Variable numLines, i, idx, numEntries, numMatches String procText, re, def, name // get procedure code procText = getProcedureText(module, procedureWithoutModule) numLines = ItemsInList(procText, "\r") // search code and return wavLineNumber Make/FREE/N=(numLines)/T text = StringFromList(p, procText, "\r") re = "^(?i)[[:space:]]*((?:override)?(?:static)?[[:space:]]*(?:Str)?Constant)[[:space:]]+(.*)=.*" Grep/Q/INDX/E=re text Wave W_Index Duplicate/FREE W_Index wavLineNumber KillWaves/Z W_Index KillStrings/Z S_fileName WaveClear W_Index if(!V_Value) // no matches return 0 endif numMatches = DimSize(wavLineNumber, 0) numEntries = DimSize(declWave, 0) Redimension/N=(numEntries + numMatches, -1) declWave, lineWave idx = numEntries for(i = 0; i < numMatches; i += 1) SplitString/E=re text[wavLineNumber[i]], def, name declWave[idx][0] = createMarkerForType(LowerStr(def)) declWave[idx][1] = name lineWave[idx] = wavLineNumber[i] idx += 1 endfor KillWaves/Z W_Index End Function addDecoratedMacros(module, procedureWithoutModule, declWave, lineWave) String module, procedureWithoutModule WAVE/T declWave WAVE/D lineWave Variable numLines, i, idx, numEntries, numMatches String procText, re, def, name, arguments, type // get procedure code procText = getProcedureText(module, procedureWithoutModule) numLines = ItemsInList(procText, "\r") // search code and return wavLineNumber Make/FREE/N=(numLines)/T text = StringFromList(p, procText, "\r") // regexp: match case insensitive (?i) spaces don't matter. search for window or macro or proc. Macro Name is the the next non-space character followed by brackets () where the arguments are. At the end there might be a colon, specifying the type of macro and a comment beginning with / // macro should have no arguments. Handled for backwards compatibility. // help for regex on https://regex101.com/ re = "^(?i)[[:space:]]*(window|macro|proc)[[:space:]]+([^[:space:]]+)[[:space:]]*\((.*)\)[[:space:]]*[:]?[[:space:]]*([^[:space:]\/]*).*" Grep/Q/INDX/E=re text Wave W_Index Duplicate/FREE W_Index wavLineNumber KillWaves/Z W_Index KillStrings/Z S_fileName WaveClear W_Index if(!V_Value) // no matches return 0 endif numMatches = DimSize(wavLineNumber, 0) numEntries = DimSize(declWave, 0) Redimension/N=(numEntries + numMatches, -1) declWave, lineWave for(idx = numEntries; idx < (numEntries + numMatches); idx += 1) SplitString/E=re text[wavLineNumber[(idx - numEntries)]], def, name, arguments, type // def containts window/macro/proc // type contains Panel/Layout for subclasses of window macros declWave[idx][0] = createMarkerForType(LowerStr(def)) declWave[idx][1] = name + "(" + trimArgument(arguments, ",", strListSepStringOutput = ", ") + ")" + " : " + type lineWave[idx] = wavLineNumber[(idx - numEntries)] endfor End Function addDecoratedStructure(module, procedureWithoutModule, declWave, lineWave, [parseVariables]) String module, procedureWithoutModule WAVE/T declWave WAVE/D lineWave Variable parseVariables if(paramIsDefault(parseVariables) | parseVariables != 1) parseVariables = 1 // added for debugging endif variable numLines, i, idx, numEntries, numMatches string procText, reStart, reEnd, name, StaticKeyword // get procedure code procText = getProcedureText(module, procedureWithoutModule) numLines = ItemsInList(procText, "\r") if(numLines == 0) debugPrint("no Content in Procedure " + procedureWithoutModule) endif // search code and return wavLineNumber Make/FREE/N=(numLines)/T text = StringFromList(p, procText, "\r") // regexp: match case insensitive (?i) leading spaces don't matter. optional static statement. search for structure name which contains no spaces. followed by an optional space and nearly anything like inline comments // help for regex on https://regex101.com/ reStart = "^(?i)[[:space:]]*((?:static[[:space:]])?)[[:space:]]*structure[[:space:]]+([^[:space:]\/]+)[[:space:]\/]?.*" Grep/Q/INDX/E=reStart text Wave W_Index Duplicate/FREE W_Index wavStructureStart KillWaves/Z W_Index KillStrings/Z S_fileName WaveClear W_Index if(!V_Value) // no matches return 0 endif numMatches = DimSize(wavStructureStart, 0) // optionally analyze structure elements if(parseVariables) // regexp: match case insensitive endstructure followed by (space or /) and anything else or just a lineend // does not match endstructure23 but endstructure// reEnd = "^(?i)[[:space:]]*(?:endstructure(?:[[:space:]]|\/).*)|endstructure$" Grep/Q/INDX/E=reEnd text Wave W_Index Duplicate/FREE W_Index wavStructureEnd KillWaves/Z W_Index KillStrings/Z S_fileName WaveClear W_Index if(numMatches != DimSize(wavStructureEnd, 0)) numMatches = 0 return 0 endif endif numEntries = DimSize(declWave, 0) Redimension/N=(numEntries + numMatches, -1) declWave, lineWave for(idx = numEntries; idx < (numEntries + numMatches); idx +=1) SplitString/E=reStart text[wavStructureStart[(idx - numEntries)]], StaticKeyword, name declWave[idx][0] = createMarkerForType(LowerStr(StaticKeyword) + "structure") // no " " between static and structure needed declWave[idx][1] = name // optionally parse structure elements if(parseVariables) Duplicate/FREE/R=[(wavStructureStart[(idx - numEntries)]),(wavStructureEnd[(idx - numEntries)])] text, temp declWave[idx][1] += getStructureElements(temp) WaveClear temp endif lineWave[idx] = wavStructureStart[(idx - numEntries)] endfor WaveClear wavStructureStart, wavStructureEnd End // input wave (wavStructure) contains text of Structure lineseparated. // wavStructure begins with "Structure" definition in first line and ends with "EndStructure" in last line. Function/S getStructureElements(wavStructure) WAVE/T wavStructure String regExp = "", strType String lstVariables, lstTypes, lstNames Variable numElements, numMatches, numVariables, i, j // check for minimum structure definition structure/endstructure numElements = Dimsize(wavStructure, 0) if(numElements <= 2) DebugPrint("Structure has no Elements") return "" endif // search code and return wavLineNumber and wavContent Duplicate/T/FREE/R=[1, (numElements - 1)] wavStructure wavContent regExp = "^(?i)[[:space:]]*(" + cstrTypes + ")[[:space:]]+(?:\/[a-z]+[[:space:]]*)*([^\/]*)(?:[\/].*)?" Grep/Q/INDX/E=regExp wavContent Wave W_Index Duplicate/FREE W_Index wavLineNumber KillWaves/Z W_Index KillStrings/Z S_fileName WaveClear W_Index if(!V_Value) // no matches DebugPrint("Structure with no Elements found") return "()" endif // extract Variable types and names inside each content line to return lstTypes and lstNames lstTypes = "" lstNames = "" numMatches = DimSize(wavLineNumber, 0) for(i = 0; i < numMatches; i += 1) SplitString/E=regExp wavContent[(wavLineNumber[i])], strType, lstVariables numVariables = ItemsInList(lstVariables, ",") for(j = 0; j < numVariables; j += 1) lstTypes = AddListItem(strType, lstNames) lstNames = AddListItem(getVariableName(StringFromList(j, lstVariables, ",")), lstNames) endfor endfor // sort elements depending on checkbox status lstNames = RemoveEnding(lstNames, ", ") // do not sort last element. if(returnCheckBoxSort()) lstNames = Sortlist(lstNames, ", ",16) endif // format output lstTypes = RemoveEnding(lstTypes, ";") lstNames = RemoveEnding(lstNames, ";") lstNames = ReplaceString(";", lstNames, ", ") lstTypes = ReplaceString(";", lstTypes, ", ") return "{" + lstNames + "}" End Function/S getVariableName(strDefinition) String strDefinition String strVariableName, strStartValue String regExp regExp = "^(?i)[[:space:]]*([^\=\/[:space:]]+)[[:space:]]*(?:\=[[:space:]]*([^\,\=\/[:space:]]+))?.*" SplitString/E=regExp strDefinition, strVariableName, strStartValue // there must be sth. wrong if the variable could not be found. if(strlen(strVariableName) == 0) DebugPrint("Could not analyze Name of Variable in String: '" + strDefinition + "'") Abort "Could not analyze Name of Variable in String: " + strDefinition endif return strVariableName End static Function resetLists(decls, lines) Wave/T decls Wave/D lines Redimension/N=(0, -1) decls, lines End static Function sortListByLineNumber(decls, lines) Wave/T decls Wave/D lines // check if sort is necessary if(Dimsize(decls, 0) * Dimsize(lines, 0) == 0) return 0 endif Duplicate/T/FREE/R=[][0] decls, declCol0 Duplicate/T/FREE/R=[][1] decls, declCol1 Sort/A lines, lines, declCol0, declCol1 decls[][0] = declCol0[p][0] decls[][1] = declCol1[p][0] End static Function sortListByName(decls, lines) Wave/T decls Wave/D lines // check if sort is necessary if(Dimsize(decls, 0) * Dimsize(lines, 0) == 0) return 0 endif Duplicate/T/FREE/R=[][0] decls, declCol0 Duplicate/T/FREE/R=[][1] decls, declCol1 Sort/A declCol1, lines, declCol0, declCol1 decls[][0] = declCol0[p][0] decls[][1] = declCol1[p][0] End // Parses all procedure windows and write into the decl and line waves Function/S parseProcedure(procedure, [checksumIsCalculated]) STRUCT procedure &procedure Variable checksumIsCalculated if(ParamIsDefault(checksumIsCalculated)) checksumIsCalculated = 0 endif DebugPrint("Checksum recalc:" + num2str(checksumIsCalculated)) // start timer Variable timer = timerStart() // load global lists Wave/T decls = getDeclWave() Wave/I lines = getLineWave() // scan and add elements to lists resetLists(decls, lines) addDecoratedFunctions(procedure.module, procedure.fullName, decls, lines) addDecoratedConstants(procedure.module, procedure.name, decls, lines) addDecoratedMacros(procedure.module, procedure.name, decls, lines) addDecoratedStructure(procedure.module, procedure.name, decls, lines) // stop timer setParsingTime(timerStop(timer)) End // Identifier = module#procedure static Function saveResults(procedure) STRUCT procedure &procedure Wave/T declWave = getDeclWave() Wave/I lineWave = getLineWave() Wave/WAVE SaveWavesWave = getSaveWaves() Wave/T SaveStringsWave = getSaveStrings() Wave SaveVariablesWave = getSaveVariables() Variable endOfWave = Dimsize(SaveWavesWave, 0) debugPrint("saving Results for " + procedure.id) // prepare Waves for data storage. if(procedure.row < 0) // maximum data storage was reached, push elements to free last item. savePush() procedure.row = endOfWave - 1 elseif(procedure.row == endOfWave) // redimension waves to fit new elements Redimension/N=((endOfWave + 1), -1) SaveStringsWave Redimension/N=((endOfWave + 1), -1) SaveWavesWave Redimension/N=((endOfWave + 1), -1) SaveVariablesWave endif // save Results. Waves as References to free waves and the Id-Identifier Duplicate/FREE declWave myFreeDeclWave Duplicate/FREE lineWave myFreeLineWave SaveStringsWave[procedure.row][0] = procedure.id SaveStringsWave[procedure.row][1] = getChecksum() SaveWavesWave[procedure.row][0] = myFreeDeclWave SaveWavesWave[procedure.row][1] = myFreeLineWave SaveVariablesWave[procedure.row][0] = 1 // mark as valid SaveVariablesWave[procedure.row][1] = getParsingTime() // time in micro seconds SaveVariablesWave[procedure.row][2] = getCheckSumTime() // time in micro seconds // if function list could not be acquired don't save the checksum if(!numpnts(declWave) || !cmpstr(declWave[0][1], "Procedures Not Compiled() -> ")) DebugPrint("Function list is not complete") SaveStringsWave[procedure.row][1] = "no checksum" endif End static Function saveLoad(procedure) STRUCT procedure &procedure Variable numResults Wave/T declWave = getDeclWave() Wave/I lineWave = getLineWave() Wave/WAVE SaveWavesWave = getSaveWaves() Wave/T SaveStringsWave = getSaveStrings() Wave SaveVariablesWave = getSaveVariables() if((procedure.row < 0) || (procedure.row == Dimsize(SaveStringsWave, 0)) || (Dimsize(SaveStringsWave, 0) == 0)) // if maximum storage capacity was reached (procedure.row == -1) or Element not found (procedure.row == endofWave) there is nothing to load. debugPrint("save state not found") return -1 elseif(SaveVariablesWave[procedure.row][0] == 0) // procedure marked as non valid by AfterRecompileHook // checksum needs to be compared. // getting checksum if(setChecksum(procedure) != 1) debugPrint("error creating variable") return -1 endif // comparing checksum if(cmpstr(SaveStringsWave[procedure.row][1],getChecksum()) != 0) // checksum changed. return -2 to indicate that calculation was already done by setChecksum. debugPrint("Checksum missmatch: Procedure has to be reloaded.") return -2 else //mark as valid debugPrint("Checksum match: Procedure marked valid.") SaveVariablesWave[procedure.row][0] = 1 endif endif // load results from free waves numResults = Dimsize(SaveWavesWave[procedure.row][0], 0) Redimension/N=(numResults, -1) declWave, lineWave if(numResults > 0) WAVE/T load0 = SaveWavesWave[procedure.row][0] WAVE/I load1 = SaveWavesWave[procedure.row][1] declWave[][0] = load0[p][0] declWave[][1] = load0[p][1] lineWave[] = load1[p] debugPrint("save state loaded successfully") return 1 else debugPrint("no elements in save state") return 0 endif End // Identifier = module#procedure static Function getSaveRow(Identifier) String Identifier Wave/T SaveStrings = getSaveStrings() Variable found, endOfWave FindValue/TEXT=Identifier/TXOP=4/Z SaveStrings if(V_value == -1) // element not found return Dimsize(SaveStrings, 0) else // element found at position V_value // check for inconsistency. if(V_value > CsaveMaximum ) DebugPrint("Storage capacity exceeded") // should only happen if(CsaveMaximum) was touched on runtime. // Redimension/Deletion of Wave could be possible. return (CsaveMaximum - 1) endif return V_value endif End // drop first item at position 0. push all elements upward by 1 element. Free last Position. static Function savePush() Wave/T SaveStrings = getSaveStrings() Wave/WAVE SaveWavesWave = getSaveWaves() Wave SaveVariables = getSaveVariables() Variable i, endOfWave = Dimsize(SaveStrings, 0) // moving items. MatrixOp/O SaveVariables = rotateRows(SaveVariables, (endofWave - 1)) // MatrixOP is strictly numeric (but fast) for(i=0; i 0) searchAndDelete(decls, lines, searchString) endif // switch sort type if(returnCheckBoxSort()) sortListByName(decls, lines) else sortListByLineNumber(decls, lines) endif return DimSize(decls, 0) End Function searchAndDelete(decls, lines, searchString) Wave/T decls Wave/I lines String searchString Variable i, numEntries // search and delete backwards for simplicity reasons numEntries = Dimsize(decls, 0) for(i = numEntries - 1; i > 0; i -= 1) if(strsearch(decls[i][1], searchString, 0, 2) == -1) DeletePoints/M=0 i, 1, decls, lines endif endfor // prevent loss of dimension if no match was found at all. if(strsearch(decls[0][1], searchString, 0, 2) == -1) if(Dimsize(decls, 0) == 1) Redimension/N=(0, -1) decls, lines else DeletePoints/M=0 i, 1, decls, lines endif endif End Function searchReset() setGlobalStr("search","") End Function DeletePKGfolder() if(CountObjects(pkgFolder, 1) + CountObjects(pkgFolder, 2) + CountObjects(pkgFolder, 3) == 0) KillDataFolder/Z $pkgFolder endif if(CountObjects("root:Packages", 4) == 0) KillDataFolder root:Packages endif End // Shows the line/function for the function/macro with the given index into decl // With no index just the procedure file is shown Function showCode(procedure,[index]) string procedure variable index if(ParamIsDefault(index)) DisplayProcedure/W=$procedure return NaN endif Wave/T decl = getDeclWave() Wave/I lines = getLineWave() if(!(index >= 0) || index >= DimSize(decl, 0) || index >= DimSize(lines, 0)) Abort "Index out of range" endif if(lines[index] < 0) string func = getShortFuncOrMacroName(decl[index][1]) DisplayProcedure/W=$procedure func else DisplayProcedure/W=$procedure/L=(lines[index]) endif End // Returns a list of all procedures windows in ProcGlobal context Function/S getGlobalProcWindows() string procList = getProcWindows("*","INDEPENDENTMODULE:0") return AddToItemsInList(procList, suffix=" [ProcGlobal]") End // Returns a list of all procedures windows in the given independent module Function/S getIMProcWindows(moduleName) string moduleName string regexp sprintf regexp, "* [%s]", moduleName return getProcWindows(regexp,"INDEPENDENTMODULE:1") End // Low level implementation, returns a sorted list of procedure windows matching regexp and options Function/S getProcWindows(regexp, options) string regexp, options string procList = WinList(regexp, ";", options) return SortList(procList, ";", 4) End // Returns a list of independent modules // Includes ProcGlobal but skips all WM modules and the current module in release mode Function/S getModuleList() String moduleList moduleList = IndependentModuleList(";") moduleList = ListMatch(moduleList, "!WM*", ";") // skip WM modules moduleList = ListMatch(moduleList, "!RCP*", ";") // skip WM's Resize Controls modul String module = GetIndependentModuleName() moduleList = "ProcGlobal;" + SortList(moduleList) return moduleList End // Returns declarations: after parsing the object names and variables are stored in this wave. // Return refrence to (text) Wave/T Function/Wave getDeclWave() DFREF dfr = createDFWithAllParents(pkgFolder) WAVE/Z/T/SDFR=dfr wv = $declarations if(!WaveExists(wv)) Make/T/N=(128, 2) dfr:$declarations/Wave=wv endif return wv End // Returns linenumbers: each parsing result of decl has a corresponding line number. // Return refrence to (integer) Wave/I Function/Wave getLineWave() DFREF dfr = createDFWithAllParents(pkgFolder) WAVE/Z/I/SDFR=dfr wv = $declarationLines if(!WaveExists(wv)) Make/I dfr:$declarationLines/Wave=wv endif return wv End // 2D-Wave with Strings // Return refrence to (string) Wave/T static Function/Wave getSaveStrings() DFREF dfr = createDFWithAllParents(pkgFolder) WAVE/Z/T/SDFR=dfr wv = $CsaveStrings if(!WaveExists(wv)) // Textwave: // Column 1: Id (Identification String) // Column 2: CheckSum Make/T/N=(0,2) dfr:$CsaveStrings/Wave=wv endif return wv End // 2D-Wave with references to Declaration- and LineNumber-Waves as free waves. // Return refrence to (wave) Wave/WAVE static Function/Wave getSaveWaves() DFREF dfr = createDFWithAllParents(pkgFolder) WAVE/Z/WAVE/SDFR=dfr wv = $CsaveWaves if(!WaveExists(wv)) Make/WAVE/N=(0,2) dfr:$CsaveWaves/Wave=wv // wave of wave references // Wave with Free Waves: // Column 1: decl (a (text) Wave/T with the results of parsing the procedure file) // Column 1: line (a (integer) Wave/I with the corresponding line numbers within the procedure file) endif return wv End // 2D-Wave where Numbers can be stored. // Return refrence to (numeric) Wave static Function/Wave getSaveVariables() DFREF dfr = createDFWithAllParents(pkgFolder) WAVE/Z/SDFR=dfr wv = $CsaveVariables if(!WaveExists(wv)) // Numeric Wave: // Column 1: valid (0: no, 1: yes) used to mark waves for parsing after "compile" was done. // Column 2: time for parsing (time consumption of compilation in us) // Column 3: time for checksum Make/N=(0,3) dfr:$CsaveVariables/Wave=wv endif return wv End // Returns a list of all procedure files of the given independent module/ProcGlobal Function/S getProcList(module) String module if( isProcGlobal(module) ) return getGlobalProcWindows() else return getIMProcWindows(module) endif End static Function getParsingTime() return getGlobalVar("parsingTime") End static Function setParsingTime(numTime) Variable numTime return setGlobalVar("parsingTime", numTime) End static Function getCheckSumTime() return getGlobalVar("checksumTime") End static Function setCheckSumTime(numTime) Variable numTime return setGlobalVar("checksumTime", numTime) End static Function setCheckSum(procedure) STRUCT procedure &procedure String procText, checksum Variable returnValue, timer timer = timerStart() procText = getProcedureText(procedure.module, procedure.name) procText = ProcedureText("", 0, procedure.fullname) returnValue = setGlobalStr("parsingChecksum", Hash(procText, 1)) setCheckSumTime(timerStop(timer)) return (returnValue == 1) End static Function/S getCheckSum() return getGlobalStr("parsingChecksum") End static Structure procedure String id Variable row String name String module String fullName Endstructure rouge-3.28.0/spec/visual/samples/ini000066400000000000000000000021411417417255300173370ustar00rootroot00000000000000##### a gitconfig ##### [core] editor = gvim -v excludesfile = ~/.gitignore # autocrlf = input [user] name = Jeanine Adkisson email = somebody@somewhere.place [github] user = jneen token = "asdfasdfasdf" [color] branch = auto diff = auto interactive = auto status = auto [merge] defaultToUpstream = true conflictStyle = diff3 [push] default = upstream [alias] co = checkout rs = reset ci = commit -v c = commit -v st = status s = status b = branch br = branch d = diff dc = diff --cached a = add ap = add --patch ae = add --edit ps = push fe = fetch sh = stash # fast-forward ff = merge --ff-only # merge-commit mc = merge --no-ff rr = rebase origin lg = log --decorate --graph --date=local root = rev-parse --show-toplevel head = rev-parse HEAD ;;;;;; SYSTEM.INI ;;;;;; ; for 16-bit app support [drivers] wave=mmdrv.dll timer=timer.drv [mci] [driver32] [386enh] woafont=dosapp.FON EGA80WOA.FON=EGA80WOA.FON EGA40WOA.FON=EGA40WOA.FON CGA80WOA.FON=CGA80WOA.FON CGA40WOA.FON=CGA40WOA.FON ## Other ## [section-name] foo-bar_ = baz rouge-3.28.0/spec/visual/samples/io000066400000000000000000000012561417417255300171750ustar00rootroot00000000000000/+ nested /+ comments +/ ftw +/ foo @bar foo @@bar(baz) #!/usr/bin/env io /* The Computer Language Shootout http://shootout.alioth.debian.org contributed by Robert Brandner */ mkbuf := method(n, b := List clone b preallocateToSize(n) n repeat(b append(true)) return b ) nsieve := method(n, primes := mkbuf(n) cnt := 0 for(i, 2, n, if(primes at(i), k := i + i while (k < n, primes atPut(k, false) k = k + i ) cnt = cnt + 1 ) ) writeln("Primes up to", n asString alignRight(9, " "), cnt asString alignRight(9, " ")) ) n := System args at(1) asNumber nsieve( (2^n)*10000 ) nsieve( (2^(n-1))*10000 ) nsieve( (2^(n-2))*10000 ) // comment at eofrouge-3.28.0/spec/visual/samples/irb000066400000000000000000000071011417417255300173350ustar00rootroot00000000000000irb(main):001:0> puts < nil irb(main):005:0> [1] pry(main)> o = Object.new => # [2] pry(main)> o.instance_variable_set(:@foo, Object.new); o => #> [3] pry(main)> o.instance_variable_get(:@foo).instance_variable_set(:@bar, 3) => 3 [4] pry(main)> o => #> [5] pry(main)> irb(main):001:0> puts "Hello, world!"; 3 Hello, world! => 3 [1] pry(main)> User => User(id: integer, email: string, encrypted_password: string, reset_password_token: string, reset_password_sent_at: datetime, remember_created_at: datetime, sign_in_count: integer, current_sign_in_at: datetime, last_sign_in_at: datetime, current_sign_in_ip: string, last_sign_in_ip: string, created_at: datetime, updated_at: datetime, name: string, admin: boolean, projects_limit: integer, skype: string, linkedin: string, twitter: string, authentication_token: string, bio: string, failed_attempts: integer, locked_at: datetime, username: string, can_create_group: boolean, can_create_team: boolean, state: string, color_scheme_id: integer, password_expires_at: datetime, created_by_id: integer, last_credential_check_at: datetime, avatar: string, confirmation_token: string, confirmed_at: datetime, confirmation_sent_at: datetime, unconfirmed_email: string, hide_no_ssh_key: boolean, website_url: string, notification_email: string, hide_no_password: boolean, password_automatically_set: boolean, location: string, encrypted_otp_secret: string, encrypted_otp_secret_iv: string, encrypted_otp_secret_salt: string, otp_required_for_login: boolean, otp_backup_codes: text, public_email: string, dashboard: integer, project_view: integer, consumed_timestep: integer, layout: integer, hide_project_limit: boolean, unlock_token: string, otp_grace_period_started_at: datetime, ldap_email: boolean, external: boolean, incoming_email_token: string, organization: string, authorized_projects_populated: boolean, ghost: boolean, last_activity_on: date, notified_of_own_activity: boolean, require_two_factor_authentication_from_group: boolean, two_factor_grace_period: integer) [2] pry(main)> User.new ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" => # [5] pry(main)> raise 'hello' RuntimeError: hello from (pry):5:in `__pry__' [6] pry(main)> puts 'hello' hello rouge-3.28.0/spec/visual/samples/irb_output000066400000000000000000000001401417417255300207510ustar00rootroot00000000000000{ this => is stdout text } => #> rouge-3.28.0/spec/visual/samples/isbl000066400000000000000000000044421417417255300175170ustar00rootroot00000000000000// Types App : IApplication Employees : IReference.РАБ = References.ReferenceFactory("РАБ").GetComponent // Operators Result = 1 + 1 / 2 // Numbers Integer = 5 Float = 5.5 WordBool = True // Strings Double_Quotes = "An example" Single_Quotes = 'An example' // Comments /******************************************** * Получить список кодов или ИД работников, * * соответствующих пользователю. * ********************************************/ // Example code ADD_EQUAL_NUMBER_TEMPLATE = "%s.%s = %s" ADD_EQUAL_STATE_TEMPLATE = "%s.%s = '%s'" EMPLOYEES_REFERENCE = "РАБ" // Проверить, сущуствует ли пользователь с ИД UserID ExceptionsOff() FreeException() ServiceFactory.GetUserByID(UserID) ExceptionsOn() if ExceptionExists() Raise(CreateException("EDIRInvalidTypeOfParam"; LoadStringFmt("DIR21A2F148_1B41_40F3_9152_6E09E712025A"; "COMMON"; ArrayOf(UserID)); ecException)) // Не существует пользователя с ИД = %s endif Employees : IReference.РАБ = CreateReference(EMPLOYEES_REFERENCE; ArrayOf("Пользователь"; SYSREQ_STATE); FALSE) Employees.Events.DisableAll EmployeesTableName = Employees.TableName EmployeesUserWhereID = Employees.AddWhere(Format(ADD_EQUAL_NUMBER_TEMPLATE; ArrayOf(EmployeesTableName; Employees.Requisites("Пользователь").SQLFieldName; UserID))) if OnlyActive EmployeesStateWhereID = Employees.AddWhere(Format(ADD_EQUAL_STATE_TEMPLATE; ArrayOf(EmployeesTableName; Employees.Requisites(SYSREQ_STATE).SQLFieldName; Employees.Requisites(SYSREQ_STATE).Items.IDByValue("Действующая")))) endif if Assigned(OurOrgID) EmployeesOurOrgIDWhereID = Employees.AddWhere(Format(ADD_EQUAL_STATE_TEMPLATE; ArrayOf(EmployeesTableName; Employees.Requisites("НашаОрг").SQLFieldName; OurOrgID))) endif Employees.Open() Result = CreateStringList() foreach Employee in Employees if IsResultCode Result.Add(Employee.SYSREQ_CODE) else Result.Add(Employee.SYSREQ_ID) endif endforeach Employees.Close() Employees.DelWhere(EmployeesUserWhereID) if OnlyActive Employees.DelWhere(EmployeesStateWhereID) endif if Assigned(OurOrgID) Employees.DelWhere(EmployeesOurOrgIDWhereID) endif Employees.Events.EnableAll rouge-3.28.0/spec/visual/samples/j000066400000000000000000000037341417417255300170220ustar00rootroot00000000000000NB. Single line comment Note 'Multiline comment' The verb `Note` starts a multiline comment. ')' in the next line ends this comment. ) Note=: 'This is not a comment' NB. Primitives = =. =: < <. <: > >. >: + +. +: - -. -: * *. *: % %. %: ^ ^. ^: $ $. $: ~ ~. ~: | |. |: . .. .: : :. :: , ,. ,: ; ;. ;: # #. #: ! !. !: / /. /: \ \. \: [ [: ] { {. {: {:: } }. }: }:: " ". ": ` `: @ @. @: & &. &: &.: ? ?. a. a: A. b. C. d. D. D: e. E. f. F. F.. F.: F: F:. F:: H. i. i: I. j. L. L: M. o. p. p.. p: q: r. s: S: t. t: T. u. u: v. x: Z: _9: _8: _7: _6: _5: _4: _3: _2: _1: 0: 1: 2: 3: 4: 5: 6: 7: 8: 9: _: NB. Control words do. end. if. elseif. else. select. case. fcase. for. while. whilst. break. continue. assert. try. catch. catchd. catcht. throw. return. NB. Control words with identifiers for_elem. label_lbl. goto_lbl. NB. Names foo foo_bar foo_loc_ foo_bar_loc_ foo_1_ foo__ NB. Explicit locatives foo__obj foo_bar__obj foo__o1__o2 NB. Object locatives NB. Numeric constants 0 1 _1 NB. Integers 0, 1, -1 _ __ _. NB. Infinity, negative infinity, NaN 0.8 1.23e_9 _3e15 NB. Floating-point numbers 1.5j2 3.3ar1 2ad60 NB. Complex numbers 5r3 _1r2 NB. Rational numbers 1.2p3 7x_1.5 NB. 1.2*π^3, 7*e^-1.5 2b0010 16babc789.12 NB. Binary/hexadecimal numbers 9999999999999999999x NB. An extended precision integer NB. String literals 'foo bar' 'foo ''bar''' NB. `''` escapes single-quote NB. Invalid tokens foo: for_. {::. .:. 10: NB.. NB. Multiline String noun define This is a 'heredoc' string. You can include LF or single-quote ' here. ) NB. Explicit definitions verb define NB. Monadic case if. #y do. echo y end. : NB. Dyadic case if. x <: #y do. echo x {. y end. ) adverb def '[: u^:_1 u/' NB. Single line form NB. More complicated example 0 define 13 def 0 noun : 0 the right noun ) x , y ) the left noun ) rouge-3.28.0/spec/visual/samples/janet000066400000000000000000000033651417417255300176720ustar00rootroot00000000000000# Constants nil true false # Symbols symbol kebab-case-symbol snake_case_symbol my-module/my-fuction ***** !%$^*__--__._+++===~-crazy-symbol *global-var* 你好 symbols:with:colons _ # Keywords :keyword :range :0x0x0x0 :a-keyword :: : # Numbers 0 +0.0 -10_000 16r1234abcd 0x23.23 1e10 1.6e-4 7r343_111_266.6&+10 # Strings "This is a string." "This\nis\na\nstring." "\u004a" "\U01F5DD" "This is a string." `` This is a string `` ` This is a string. ` # Buffers @"" @"Buffer." @``Another buffer`` @` Yet another buffer ` # Tuples (do 1 2 3) [do 1 2 3] # Arrays @(:one :two :three) @[:one :two :three] # Structs {} {:key1 "value1" :key2 :value2 :key3 3} {(1 2 3) (4 5 6)} {@[] @[]} {1 2 3 4 5 6} # Tables @{} @{:key1 "value1" :key2 :value2 :key3 3} @{(1 2 3) (4 5 6)} @{@[] @[]} @{1 2 3 4 5 6} # Special forms (def anumber (+ 1 2 3 4 5)) (var a 1) (fn identity [x] x) # Function definitions (defn triangle-area "Calculates the area of a triangle." [base height] (print "calculating area of a triangle...") (* base height 0.5)) (defn ignore-extra [x &] (+ x 1)) # Function calls (print (triangle-area 5 10)) (nil? nil) (not= 1 1) (put @{:a 1} :b 2) (type @{:a 1}) (type {:a 1}) (in [:a :b :c] 1) (type [:a :b]) (type '(:a :b)) (tuple/type '[]) (tuple/type '()) (first [1 2 3]) (drop [1 2 3]) (+ 1 2 3) (apply + [1 2 3]) (+ ;[2 3 5 7 11]) (|(+ 1 1 2 3 5 $) 8) # Quotes (quote 1) (quote hi) (quote quote) '(1 2 3) '(print 1 2 3) 'x '(print "hello world") (quote (print "hello world")) (def name 'myfunction) (def args '[x y z]) (defn body '[(print x) (print y) (print z)]) '{:foo (print "bar")} '@(print 1 2 3) # Quasiquotes ~x ~(def ,name (fn ,name ,args ,body)) ~(+ 1 ,(inc 1)) (quasiquote (+ 1 (unquote (inc 1)))) (quasiquote (+ 1 (unquote (inc (inc 1))))) rouge-3.28.0/spec/visual/samples/java000066400000000000000000000506051417417255300175110ustar00rootroot00000000000000////// badcase.java ////// // this used to take ages void foo() throws xxxxxxxxxxxxxxxxxxxxxx{ } // numbers // [jneen] via http://docs.oracle.com/javase/7/docs/technotes/guides/language/underscores-literals.html float pi1 = 3_.1415F; // Invalid; cannot put underscores adjacent to a decimal point float pi2 = 3._1415F; // Invalid; cannot put underscores adjacent to a decimal point long socialSecurityNumber1 = 999_99_9999_L; // Invalid; cannot put underscores prior to an L suffix int x1 = _52; // This is an identifier, not a numeric literal int x2 = 5_2; // OK (decimal literal) int x3 = 52_; // Invalid; cannot put underscores at the end of a literal int x4 = 5_______2; // OK (decimal literal) int x5 = 0_x52; // Invalid; cannot put underscores in the 0x radix prefix int x6 = 0x_52; // Invalid; cannot put underscores at the beginning of a number int x7 = 0x5_2; // OK (hexadecimal literal) int x8 = 0x52_; // Invalid; cannot put underscores at the end of a number int x9 = 0_52; // OK (octal literal) int x10 = 05_2; // OK (octal literal) int x11 = 052_; // Invalid; cannot put underscores at the end of a number ////// test.java ///////// /* * Created on 13-Mar-2004 * Created by James Yeh * Copyright (C) 2004, 2005, 2006 Aelitis, All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * AELITIS, SAS au capital de 46,603.30 euros * 8 Allee Lenotre, La Grille Royale, 78600 Le Mesnil le Roi, France. * */ package org.gudy.azureus2.platform.macosx; import org.gudy.azureus2.core3.logging.*; import org.gudy.azureus2.core3.util.AEMonitor; import org.gudy.azureus2.core3.util.Debug; import org.gudy.azureus2.core3.util.SystemProperties; import org.gudy.azureus2.platform.PlatformManager; import org.gudy.azureus2.platform.PlatformManagerCapabilities; import org.gudy.azureus2.platform.PlatformManagerListener; import org.gudy.azureus2.platform.macosx.access.jnilib.OSXAccess; import org.gudy.azureus2.plugins.platform.PlatformManagerException; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.text.MessageFormat; import java.util.HashSet; /** * Performs platform-specific operations with Mac OS X * * @author James Yeh * @version 1.0 Initial Version * @see PlatformManager */ public class PlatformManagerImpl implements PlatformManager { private static final LogIDs LOGID = LogIDs.CORE; protected static PlatformManagerImpl singleton; protected static AEMonitor class_mon = new AEMonitor("PlatformManager"); private static final String USERDATA_PATH = new File(System.getProperty("user.home") + "/Library/Application Support/").getPath(); //T: PlatformManagerCapabilities private final HashSet capabilitySet = new HashSet(); /** * Gets the platform manager singleton, which was already initialized */ public static PlatformManagerImpl getSingleton() { return singleton; } /** * Tries to enable cocoa-java access and instantiates the singleton */ static { initializeSingleton(); } /** * Instantiates the singleton */ private static void initializeSingleton() { try { class_mon.enter(); singleton = new PlatformManagerImpl(); } catch (Throwable e) { Logger.log(new LogEvent(LOGID, "Failed to initialize platform manager" + " for Mac OS X", e)); } finally { class_mon.exit(); } } /** * Creates a new PlatformManager and initializes its capabilities */ public PlatformManagerImpl() { capabilitySet.add(PlatformManagerCapabilities.RecoverableFileDelete); capabilitySet.add(PlatformManagerCapabilities.ShowFileInBrowser); capabilitySet.add(PlatformManagerCapabilities.ShowPathInCommandLine); capabilitySet.add(PlatformManagerCapabilities.CreateCommandLineProcess); capabilitySet.add(PlatformManagerCapabilities.GetUserDataDirectory); capabilitySet.add(PlatformManagerCapabilities.UseNativeScripting); capabilitySet.add(PlatformManagerCapabilities.PlaySystemAlert); if (OSXAccess.isLoaded()) { capabilitySet.add(PlatformManagerCapabilities.GetVersion); } } /** * {@inheritDoc} */ public int getPlatformType() { return PT_MACOSX; } /** * {@inheritDoc} */ public String getVersion() throws PlatformManagerException { if (!OSXAccess.isLoaded()) { throw new PlatformManagerException("Unsupported capability called on platform manager"); } return OSXAccess.getVersion(); } /** * {@inheritDoc} * @see org.gudy.azureus2.core3.util.SystemProperties#getUserPath() */ public String getUserDataDirectory() throws PlatformManagerException { return USERDATA_PATH; } public File getLocation( long location_id ) throws PlatformManagerException { if ( location_id == LOC_USER_DATA ){ return( new File( USERDATA_PATH )); } return( null ); } /** * Not implemented; returns True */ public boolean isApplicationRegistered() throws PlatformManagerException { return true; } public String getApplicationCommandLine() throws PlatformManagerException { try{ String bundle_path = System.getProperty("user.dir") +SystemProperties.SEP+ SystemProperties.getApplicationName() + ".app"; File osx_app_bundle = new File( bundle_path ).getAbsoluteFile(); if( !osx_app_bundle.exists() ) { String msg = "OSX app bundle not found: [" +osx_app_bundle.toString()+ "]"; System.out.println( msg ); if (Logger.isEnabled()) Logger.log(new LogEvent(LOGID, msg)); throw new PlatformManagerException( msg ); } return "open -a \"" +osx_app_bundle.toString()+ "\""; //return osx_app_bundle.toString() +"/Contents/MacOS/JavaApplicationStub"; } catch( Throwable t ){ t.printStackTrace(); return null; } } public boolean isAdditionalFileTypeRegistered( String name, // e.g. "BitTorrent" String type ) // e.g. ".torrent" throws PlatformManagerException { throw new PlatformManagerException("Unsupported capability called on platform manager"); } public void unregisterAdditionalFileType( String name, // e.g. "BitTorrent" String type ) // e.g. ".torrent" throws PlatformManagerException { throw new PlatformManagerException("Unsupported capability called on platform manager"); } public void registerAdditionalFileType( String name, // e.g. "BitTorrent" String description, // e.g. "BitTorrent File" String type, // e.g. ".torrent" String content_type ) // e.g. "application/x-bittorrent" throws PlatformManagerException { throw new PlatformManagerException("Unsupported capability called on platform manager"); } /** * Not implemented; does nothing */ public void registerApplication() throws PlatformManagerException { // handled by LaunchServices and/0r user interaction } /** * {@inheritDoc} */ public void createProcess(String cmd, boolean inheritsHandles) throws PlatformManagerException { try { performRuntimeExec(cmd.split(" ")); } catch (Throwable e) { throw new PlatformManagerException("Failed to create process", e); } } /** * {@inheritDoc} */ public void performRecoverableFileDelete(String path) throws PlatformManagerException { File file = new File(path); if(!file.exists()) { if (Logger.isEnabled()) Logger.log(new LogEvent(LOGID, LogEvent.LT_WARNING, "Cannot find " + file.getName())); return; } boolean useOSA = !NativeInvocationBridge.sharedInstance().isEnabled() || !NativeInvocationBridge.sharedInstance().performRecoverableFileDelete(file); if(useOSA) { try { StringBuffer sb = new StringBuffer(); sb.append("tell application \""); sb.append("Finder"); sb.append("\" to move (posix file \""); sb.append(path); sb.append("\" as alias) to the trash"); performOSAScript(sb); } catch (Throwable e) { throw new PlatformManagerException("Failed to move file", e); } } } /** * {@inheritDoc} */ public boolean hasCapability(PlatformManagerCapabilities capability) { return capabilitySet.contains(capability); } /** * {@inheritDoc} */ public void dispose() { NativeInvocationBridge.sharedInstance().dispose(); } /** * {@inheritDoc} */ public void setTCPTOSEnabled(boolean enabled) throws PlatformManagerException { throw new PlatformManagerException("Unsupported capability called on platform manager"); } public void copyFilePermissions( String from_file_name, String to_file_name ) throws PlatformManagerException { throw new PlatformManagerException("Unsupported capability called on platform manager"); } /** * {@inheritDoc} */ public void showFile(String path) throws PlatformManagerException { File file = new File(path); if(!file.exists()) { if (Logger.isEnabled()) Logger.log(new LogEvent(LOGID, LogEvent.LT_WARNING, "Cannot find " + file.getName())); throw new PlatformManagerException("File not found"); } showInFinder(file); } // Public utility methods not shared across the interface /** * Plays the system alert (the jingle is specified by the user in System Preferences) */ public void playSystemAlert() { try { performRuntimeExec(new String[]{"beep"}); } catch (IOException e) { if (Logger.isEnabled()) Logger.log(new LogEvent(LOGID, LogEvent.LT_WARNING, "Cannot play system alert")); Logger.log(new LogEvent(LOGID, "", e)); } } /** *

Shows the given file or directory in Finder

* @param path Absolute path to the file or directory */ public void showInFinder(File path) { boolean useOSA = !NativeInvocationBridge.sharedInstance().isEnabled() || !NativeInvocationBridge.sharedInstance().showInFinder(path); if(useOSA) { StringBuffer sb = new StringBuffer(); sb.append("tell application \""); sb.append(getFileBrowserName()); sb.append("\" to reveal (posix file \""); sb.append(path); sb.append("\" as alias)"); try { performOSAScript(sb); } catch (IOException e) { Logger.log(new LogAlert(LogAlert.UNREPEATABLE, LogAlert.AT_ERROR, e .getMessage())); } } } /** *

Shows the given file or directory in Terminal by executing cd /absolute/path/to

* @param path Absolute path to the file or directory */ public void showInTerminal(String path) { showInTerminal(new File(path)); } /** *

Shows the given file or directory in Terminal by executing cd /absolute/path/to

* @param path Absolute path to the file or directory */ public void showInTerminal(File path) { if (path.isFile()) { path = path.getParentFile(); } if (path != null && path.isDirectory()) { StringBuffer sb = new StringBuffer(); sb.append("tell application \""); sb.append("Terminal"); sb.append("\" to do script \"cd "); sb.append(path.getAbsolutePath().replaceAll(" ", "\\ ")); sb.append("\""); try { performOSAScript(sb); } catch (IOException e) { Logger.log(new LogAlert(LogAlert.UNREPEATABLE, LogAlert.AT_ERROR, e .getMessage())); } } else { if (Logger.isEnabled()) Logger.log(new LogEvent(LOGID, LogEvent.LT_WARNING, "Cannot find " + path.getName())); } } // Internal utility methods /** * Compiles a new AppleScript instance and runs it * @param cmd AppleScript command to execute; do not surround command with extra quotation marks * @return Output of the script * @throws IOException If the script failed to execute */ protected static String performOSAScript(CharSequence cmd) throws IOException { return performOSAScript(new CharSequence[]{cmd}); } /** * Compiles a new AppleScript instance and runs it * @param cmds AppleScript Sequence of commands to execute; do not surround command with extra quotation marks * @return Output of the script * @throws IOException If the script failed to execute */ protected static String performOSAScript(CharSequence[] cmds) throws IOException { long start = System.currentTimeMillis(); Debug.outNoStack("Executing OSAScript: "); for (int i = 0; i < cmds.length; i++) { Debug.outNoStack("\t" + cmds[i]); } String[] cmdargs = new String[2 * cmds.length + 1]; cmdargs[0] = "osascript"; for (int i = 0; i < cmds.length; i++) { cmdargs[i * 2 + 1] = "-e"; cmdargs[i * 2 + 2] = String.valueOf(cmds[i]); } Process osaProcess = performRuntimeExec(cmdargs); BufferedReader reader = new BufferedReader(new InputStreamReader(osaProcess.getInputStream())); String line = reader.readLine(); reader.close(); Debug.outNoStack("OSAScript Output: " + line); reader = new BufferedReader(new InputStreamReader(osaProcess.getErrorStream())); String errorMsg = reader.readLine(); reader.close(); Debug.outNoStack("OSAScript Error (if any): " + errorMsg); Debug.outNoStack(MessageFormat.format("OSAScript execution ended ({0}ms)", new Object[]{String.valueOf(System.currentTimeMillis() - start)})); if (errorMsg != null) { throw new IOException(errorMsg); } return line; } /** * Compiles a new AppleScript instance and runs it * @param script AppleScript file (.scpt) to execute * @return Output of the script * @throws IOException If the script failed to execute */ protected static String performOSAScript(File script) throws IOException { long start = System.currentTimeMillis(); Debug.outNoStack("Executing OSAScript from file: " + script.getPath()); Process osaProcess = performRuntimeExec(new String[]{"osascript", script.getPath()}); BufferedReader reader = new BufferedReader(new InputStreamReader(osaProcess.getInputStream())); String line = reader.readLine(); reader.close(); Debug.outNoStack("OSAScript Output: " + line); reader = new BufferedReader(new InputStreamReader(osaProcess.getErrorStream())); String errorMsg = reader.readLine(); reader.close(); Debug.outNoStack("OSAScript Error (if any): " + errorMsg); Debug.outNoStack(MessageFormat.format("OSAScript execution ended ({0}ms)", new Object[]{String.valueOf(System.currentTimeMillis() - start)})); if (errorMsg != null) { throw new IOException(errorMsg); } return line; } /** * Compiles a new AppleScript instance to the specified location * @param cmd Command to compile; do not surround command with extra quotation marks * @param destination Destination location of the AppleScript file * @return True if compiled successfully */ protected static boolean compileOSAScript(CharSequence cmd, File destination) { return compileOSAScript(new CharSequence[]{cmd}, destination); } /** * Compiles a new AppleScript instance to the specified location * @param cmds Sequence of commands to compile; do not surround command with extra quotation marks * @param destination Destination location of the AppleScript file * @return True if compiled successfully */ protected static boolean compileOSAScript(CharSequence[] cmds, File destination) { long start = System.currentTimeMillis(); Debug.outNoStack("Compiling OSAScript: " + destination.getPath()); for (int i = 0; i < cmds.length; i++) { Debug.outNoStack("\t" + cmds[i]); } String[] cmdargs = new String[2 * cmds.length + 3]; cmdargs[0] = "osacompile"; for (int i = 0; i < cmds.length; i++) { cmdargs[i * 2 + 1] = "-e"; cmdargs[i * 2 + 2] = String.valueOf(cmds[i]); } cmdargs[cmdargs.length - 2] = "-o"; cmdargs[cmdargs.length - 1] = destination.getPath(); String errorMsg; try { Process osaProcess = performRuntimeExec(cmdargs); BufferedReader reader = new BufferedReader(new InputStreamReader(osaProcess.getErrorStream())); errorMsg = reader.readLine(); reader.close(); } catch (IOException e) { Debug.outNoStack("OSACompile Execution Failed: " + e.getMessage()); Debug.printStackTrace(e); return false; } Debug.outNoStack("OSACompile Error (if any): " + errorMsg); Debug.outNoStack(MessageFormat.format("OSACompile execution ended ({0}ms)", new Object[]{String.valueOf(System.currentTimeMillis() - start)})); return (errorMsg == null); } /** * @see Runtime#exec(String[]) */ protected static Process performRuntimeExec(String[] cmdargs) throws IOException { try { return Runtime.getRuntime().exec(cmdargs); } catch (IOException e) { Logger.log(new LogAlert(LogAlert.UNREPEATABLE, e.getMessage(), e)); throw e; } } /** *

Gets the preferred file browser name

*

Currently supported browsers are Path Finder and Finder. If Path Finder is currently running * (not just installed), then "Path Finder is returned; else, "Finder" is returned.

* @return "Path Finder" if it is currently running; else "Finder" */ private static String getFileBrowserName() { try { // slowwwwwwww if ("true".equalsIgnoreCase(performOSAScript("tell application \"System Events\" to exists process \"Path Finder\""))) { Debug.outNoStack("Path Finder is running"); return "Path Finder"; } else { return "Finder"; } } catch (IOException e) { Debug.printStackTrace(e); Logger.log(new LogEvent(LOGID, e.getMessage(), e)); return "Finder"; } } public boolean testNativeAvailability( String name ) throws PlatformManagerException { throw new PlatformManagerException("Unsupported capability called on platform manager"); } public void addListener( PlatformManagerListener listener ) { } public void removeListener( PlatformManagerListener listener ) { } } // Permit Unicode characters in identifiers getHauptadresse().setPLZ("91126"); getHauptadresse().setStraßePostfach("Am Hundsacker 6"); rouge-3.28.0/spec/visual/samples/javascript000066400000000000000000000114241417417255300207320ustar00rootroot00000000000000// vim: ft=javascript var myFloat = 0.123; var myOctal = 0x123; var myRegex = /asdf/; var myComplicatedRegex = /.[.](?=x\h\[[)])[^.{}abc]{foo}{3,}x{2,3}/ var myObject = { a: 1, b: 2 } var someText = "hi"; someText += "\nthere"; var test = 123 var foo = { a: "\test", b: "\nest", c: "\\test", d: "\\nest", e: "\\", f: "Using \\ in a string", g: "\error" }; switch(test) { case 123: console.log(123) break default: console.log('default') break } switch(1) { case { foo: 1 }.foo: console.log('oh my fucking god') break case { bar: 2 }.bar ? baz: zot: case { zot: 3 }.zot ? { quux : 4 } .quux: 5: console.log('ahahahahahaha') } var ternary = 0 ? 1 : {object_key : 2 ? variable : 3 }; var ternary2 = a ? { object_key : c } + variable : e; var ternary3 = a ? { key1 : var1, key2: var2 ? function() { label1: // break label, not an object key! while(true) { break label1; } label2: // also a break label while (true) { break label2; } } + var3: var4, // ternary, not object key key3: 'foo' } : 2 var a = { num: 0, func: function() {}, str: '', bool: true } var obj = { // comment key: val } /*! * multiline comment */ var quotedKeys = { "one": 1, "two": 2, "three": 3, }; var doc = { "first": { "key": "value", "func" : function() { label: while (true) break label; return foo ? "bar" : { baz: zot } } }, "hello": "world" }; // not an object is OK var doc = { "first": "value", "hello": "world" }; // not quoted is OK var doc = { first: { "key": "value" }, "hello": "world" }; Blag = {}; jQuery.noConflict(); if (cond) { label1: while (cond) break label1; } Blag.ReadMore = (function($) { function getFold(button) { return $(button).siblings('.fold'); } function expand(e) { e.preventDefault(); var self = $(this); getFold(self).show(); self.html('« less'); } function contract(e) { e.preventDefault(); var self = $(this); getFold(self).hide(); self.html('more »') } function init() { $('a.read-more').toggle(expand, contract); } $(document).ready(init); })(jQuery); // evil regexes, from pygments /regexp/.test(foo) || x = [/regexp/,/regexp/, /regexp/, // comment // comment /regexp/]; if (/regexp/.test(string)) {/regexp/.test(string);}; x =/regexp/; x = /regexp/; if (0/regexp/.exec(string)) x = { u:/regexp/, v: /regexp/ }; foo();/regexp/.test(string); /regexp/.test(string); if (!/regexp/) foobar(); x = u %/regexp/.exec(string) */regexp/.exec(string) / /regexp/.exec(string); x = u?/regexp/.exec(string) : v +/regexp/.exec(string) -/regexp/.exec(string); a = u^/regexp/.exec(string) &/regexp/.exec(string) |/regexp/.exec(string) +~/regexp/.exec(string); x = /regexp/ /* a comment */ ; x = /[reg/exp]/; x = 4/2/i; x = (a == b) ?/* this is a comment */ c : d; /// a comment // a = /regex//2/1; //syntactically correct, returns NaN // bad regexen - should have an error token at the last char and recover // on the next line var a = /foo var b = /[foo var c = /valid-regex/ var template = "{{current}} of beer on the wall"; var stanza = template.replace(/{{current}}/g, "99 bottles"); /* original examples */ // regex blah(/abc/); x = /abc/; x = /abc/.match; // math blah(1/2); //comment x = 1 / 2 / 3; x = 1/1/.1; x=/1/; // regex x=1/a/g; // division x=a/a/g; // division // real-world var x = 1/(1+Math.sqrt(sum)); // convert to number between 1-0 return Math.round((num / den) * 100)/100; // generator function* range(from, to) { to++; while (from > to) { yield from++; } } // string interpolation `this is ${"sparta".toUpperCase()}`; // nasty string interpolation `this\n \` \${2} $\` is\n ${"sparta".toUpperCase() + function() { return 4; } + "h"}`; `hello ${"${re}" + `curs${1}on`}`; `$`; `$${1 + 2 + 3}`; `${ 'multiline template' }`; `${ 1 + 2 }`; var notATernary = `${obj?.prop}`; @(function(thing) { return thing; }) class Person { @deprecate facepalm() {} @deprecate('We stopped facepalming') facepalmHard() {} @deprecate('We stopped facepalming', { url: 'http://knowyourmeme.com/memes/facepalm' }) facepalmHarder() {} } // ES6 module import * as foo from 'foo' import { bar as baz } from 'bar' export * from 'baz' export function hoge() {} export class fuga extends baz { constructor () { super() } async doit (stuff) { await stuff() this.dont(stuff) } dont (stuff) { return arguments.length } } eval('false') global.foo = { * [Symbol.iterator] () { return } } for (const x of global.foo) {} // ES6 numbers var myBin = 0b10; var myOct = 0o67; // ES6 regexes let x = /abc/u; let x = /abc/y; // Unicode example class Œuvre { résumer(语言 = "français") { 书名 = "Les Misérables"; } } rouge-3.28.0/spec/visual/samples/jinja000066400000000000000000000017021417417255300176550ustar00rootroot00000000000000{% include 'header.html' ignore missing with context %} {% include 'subheader.html' without context %}
    {% for href, caption in [('index.html', 'Index'), ('about.html', 'About')] %}
  • {{ caption }}
  • {% endfor %}
{% set navigation = [('index.html', 'Index'), ('about.html', 'About')] %} {% set key, value = call_something() %} {# A comment #} Hello {{ user.name|capitalize }} ! ## Comment Cool list filter {{ listx | join(', ') }} {% if user.admin is true %} You're an admin ! {% else %} You're a normal user. {% endif %} {# A comment on multiple lines to hide a piece of code or whatever #} {# note: commented-out template because we no longer use this {% for user in users %} ... {% endfor %} #} {% raw %} {% for item in seq %}
  • {{ item }}
  • {% endfor %} {% endraw %} {% raw %} One line {{ raw }} block {% endraw %} {% include 'footer.html' %} rouge-3.28.0/spec/visual/samples/jsl000066400000000000000000000016141417417255300173540ustar00rootroot00000000000000// Single Line Comment dt = open( "$sample_data\big class.jmp" ); dt << Distribution( Column( :age ), Histograms Only( 1 ) ); /* Multi-line comment */ /* Single line block comment */ /* Nested /* Comments */ Work */ escapeSequence = "This is an \!b escaped sequence"; escapeQuote = "This is a \!" quotation mark"; escapeStr = "\[This is """"""" an escaped string]\" list = List( 1, 3, 5 ); alsoAList = {7,9,11}; index = 1::10::2; a name with spaces = 5; "a-name!with\!"special\characters"n = 5; ::globalVar = 1; here:scopedVar = 2; scientificNotation = 5e9; decimal = 1.234; missing = .; date = 01jan00; dateTime = 12dec1999:12:30:00.45; New Window( "Rouge Test", tb = Text Box( "Syntax highlighting is great!" ) ); If(tb << Get Text != "", "I'm still formatted correctly!"); New Namespace("rouge"); rouge:scoped.func = function({x, y}, x + y); rouge:scoped.func(1, 2); rouge-3.28.0/spec/visual/samples/json000066400000000000000000000173511417417255300175420ustar00rootroot00000000000000{ "problems": [ {"question": "how many miles?", "answer": "6"}, {"question": "how many kilometers?", "answer": "10"} ], "testing \" something \"": 1, "firstName": "John", "lastName": "Smith", "age": 25, "address": { "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": "10021" }, "strings": ["one", "two", "three", "four"], "nested1": [[1], [2], [3]], "numbers": [1, 2, 3, 4], "phoneNumber": [ { "type": "home", "number": "212 555-1234" }, { "type": "fax", "number": "646 555-4567" } ], "life_is_good": true, "life_is_bad": 10e-4, "errors": { "object": { "a": 1, "b": 2, "c": "some string" } }, "emptyObject": {}, "color": { "rgba": [0,255,0,1], "string": "black", "hex": "#0F0" } } "this": { "is": "not syntactically correct JSON but is here for backwards compatibility" } true 100 null "a": "test" "string" { "statement": "SELECT (CASE WHEN (SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\"))=0 THEN NULL WHEN (SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\"))=(SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\") AND \"ci_builds\".\"status\" = 'skipped') THEN 'skipped' WHEN (SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\"))=(SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\") AND \"ci_builds\".\"status\" = 'success')+(SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\") AND \"ci_builds\".\"allow_failure\" = 't' AND \"ci_builds\".\"status\" IN ('failed', 'canceled'))+(SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\") AND \"ci_builds\".\"status\" = 'skipped') THEN 'success' WHEN (SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\"))=(SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\") AND \"ci_builds\".\"status\" = 'pending')+(SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\") AND \"ci_builds\".\"status\" = 'skipped') THEN 'pending' WHEN (SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\"))=(SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\") AND \"ci_builds\".\"status\" = 'canceled')+(SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\") AND \"ci_builds\".\"status\" = 'success')+(SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\") AND \"ci_builds\".\"allow_failure\" = 't' AND \"ci_builds\".\"status\" IN ('failed', 'canceled'))+(SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\") AND \"ci_builds\".\"status\" = 'skipped') THEN 'canceled' WHEN (SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\") AND \"ci_builds\".\"status\" = 'running')+(SELECT count(*) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = 77 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\") AND \"ci_builds\".\"status\" = 'pending')>0 THEN 'running' ELSE 'failed' END) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = $1 AND \"ci_builds\".\"id\" IN (SELECT max(\"ci_builds\".id) FROM \"ci_builds\" WHERE \"ci_builds\".\"commit_id\" = $2 GROUP BY \"ci_builds\".\"name\", \"ci_builds\".\"commit_id\")" } {"message":"\\\"retry_count\\\":0}\"}"} "This is a test": "of missing an opening brace" } "This is a test": "of missing an opening bracket" ] {"This is a correct": "JSON object"} rouge-3.28.0/spec/visual/samples/json-doc000066400000000000000000000016241417417255300203010ustar00rootroot00000000000000{ // bare keys bareKey: "Hello", $: "Dollar", foo : "Foo", bar : { "bar": true } "firstName": "John", "lastName": "Smith", "age": 25, "address": { "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": "10021", "country": "US" }, "ellipsis": { "object": { ... }, ... "list": [ ... ], "locations": { ... "city": "New York", ... "postalCode": "10021", ... }, "key": ..., ... }, "comments": { // comments "key": "value", // in "list": [ // most ], // locations "key": "value", "emptyObject": { // comment } }, ... "errors": { "object": { "a", "b" } }, "emptyObject": {} // comment } rouge-3.28.0/spec/visual/samples/jsonnet000066400000000000000000000022711417417255300202440ustar00rootroot00000000000000/* Here is a multi-line comment. */ local foo = import "bar/baz.jsonnet"; // Single line comment. local CCompiler = { cFlags: [], out: "a.out", local flags_str = std.join(" ", self.cFlags), local files_str = std.join(" ", self.files), cmd: "%s %s %s -o %s" % [self.compiler, flags_str, files_str, self.out], }; // Compiler specializations local Gcc = CCompiler { compiler: "gcc" }; local Clang = CCompiler { compiler: "clang" }; // Mixins - append flags local Opt = { cFlags: super.cFlags + ["-O3", "-DNDEBUG"] }; local Dbg = { cflags: super.cFlags + ["-g"] }; local script = ||| #!/bin/bash if [ $# -lt 1 ]; then echo "No arguments!" else echo "$# arguments!" fi |||; { targets: [ Gcc { files: ["a.c", "b.c"] }, Clang { files: ["test.c"], out: "test" }, Clang + Opt { files: ['test2.c'], out: "test2" } Gcc + Opt + Dbg { files: ["foo.c", "bar.c"], out: "baz" }, ], values: { string: "newline \n tab quote\" \tunicode\u0af4", integer: 12, negativeInteger: -12, integerExponent: 12e+4, float: 0.04, floatExponent: 4.0e-2, boolean: true, nullValue: null, targets: $.targets, } } rouge-3.28.0/spec/visual/samples/jsp000066400000000000000000000101231417417255300173530ustar00rootroot00000000000000<%@ taglib uri="uri" prefix="prefixOfTag" %> <%@taglib prefix="c" uri="uri"%> <%@ page isELIgnored = "false" %> <%-- This is a multiline comment --%> Hello World Hello World!
    &h_pageNumber=1&h_pageSize=10"> A link! <%-- Interpolations --%> " /> ${myViewModel.myProperty} <%-- Scriptlets --%> <% out.println("Your IP address is " + request.getRemoteAddr()); %> out.println("Your IP address is " + request.getRemoteAddr()); <%-- Declarations --%> <%! int i=0; %> <%! int a, b, c; %> <%! Circle a=new Circle(2.0); %> Rectangle r=new Rectangle(2.0); <%-- Expressions --%>

    Today's date: <%= (new java.util.Date()).toLocaleString()%>

    (new java.util.Date()).toLocaleString(); <%-- Directives --%> <%@ page attribute="value" %> <%@ include file="relative url" %> <%@ taglib uri="uri" prefix="prefixOfTag" %> <%-- Actions --%> Unable to initialize Java Plugin Value for the attribute Body for XML element Template data <%-- Using tag libraries --%>

    Condition is true!

    out.println("Your IP address is " + request.getRemoteAddr());

    Boo! Condition is false!

    rouge-3.28.0/spec/visual/samples/jsx000066400000000000000000000036751417417255300174010ustar00rootroot00000000000000
    Hello React!
    var myDivElement =
    ; ReactDOM.render(myDivElement, document.getElementById('example')); var MyComponent = React.createClass({/*...*/}); var myElement = ; ReactDOM.render(myElement, document.getElementById('example')); var myElement = ; var myElement = thing.otherThing2}> hello, world! var content = {window.isLoggedIn ?