diff --git a/.travis.yml b/.travis.yml index 91a527aefa..6e6f092d4e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,8 @@ cache: bundler: true bundler_args: --without development before_install: + - gem install bundler - gem update --system - - gem update bundler script: - bundle exec rake - bundle exec rubocop diff --git a/CHANGELOG.md b/CHANGELOG.md index 26f67970bb..5fea9d3d36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,58 @@ This log summarizes the changes in each released version of rouge. The versionin we use is semver, although we will often release new lexers in minor versions, as a practical matter. +## version 3.2.1: (2018/08/16) + +https://github.com/jneen/rouge/compare/v3.2.0...v3.2.1 + +* Perl Lexer + * Allow any non-whitespace character to delimit regexes ([#974](https://github.com/jneen/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) + +https://github.com/jneen/rouge/compare/v3.1.1...v3.2.0 + +* General + * Load pastie theme ([#809](https://github.com/jneen/rouge/pull/809) by rramsden) + * Fix build failures ([#892](https://github.com/jneen/rouge/pull/892) by olleolleolle) + * Update CLI style help text ([#923](https://github.com/jneen/rouge/pull/923) by nixpulvis) + * Fix HTMLLinewise formatter documentation in README.md ([#910](https://github.com/jneen/rouge/pull/910) by rohitpaulk) +* Terraform Lexer (NEW - [#917](https://github.com/jneen/rouge/pull/917) by lowjoel) +* Crystal Lexer (NEW - [#441](https://github.com/jneen/rouge/pull/441) by splattael) +* Scheme Lexer + * Allow square brackets ([#849](https://github.com/jneen/rouge/pull/849) by EFanZh) +* Haskell Lexer + * Support for Quasiquotations ([#868](https://github.com/jneen/rouge/pull/868) by enolan) +* Java Lexer + * Support for Java 10 `var` keyword ([#888](https://github.com/jneen/rouge/pull/888) by lc-soft) +* VHDL Lexer + * Fix `time_vector` keyword typo ([#911](https://github.com/jneen/rouge/pull/911) by ttobsen) +* Perl Lexer + * Recognize `.t` as valid file extension ([#918](https://github.com/jneen/rouge/pull/918) by miparnisari) +* Nix Lexer + * Improved escaping sequences for indented strings ([#926](https://github.com/jneen/rouge/pull/926) by veprbl) +* Fortran Lexer + * Recognize `.f` as valid file extension ([#931](https://github.com/jneen/rouge/pull/931) by veprbl) +* Igor Pro Lexer + * Update functions and operations for Igor Pro 8 ([#921](https://github.com/jneen/rouge/pull/921) by t-b) +* Julia Lexer + * Various improvements and fixes ([#912](https://github.com/jneen/rouge/pull/912) by ararslan) +* Kotlin Lexer + * Recognize `.kts` as valid file extension ([#908](https://github.com/jneen/rouge/pull/908) by mkobit) +* CSS Lexer + * Minor fixes ([#916](https://github.com/jneen/rouge/pull/916) by miparnisari) +* HTML Lexer + * Minor fixes ([#916](https://github.com/jneen/rouge/pull/916) by miparnisari) +* Javascript Lexer + * Minor fixes ([#916](https://github.com/jneen/rouge/pull/916) by miparnisari) +* Markdown Lexer + * Images may not have alt text ([#904](https://github.com/jneen/rouge/pull/904) by Himura2la) +* ERB Lexer + * Fix greedy comment matching ([#902](https://github.com/jneen/rouge/pull/902) by ananace) + ## version 3.1.1: 2018/01/31 https://github.com/jneen/rouge/compare/v3.1.0...v3.1.1 diff --git a/README.md b/README.md index 810b4bdfe7..cdfa2b3c79 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,9 @@ Builtin formatters include: * `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_format: 'line-%i')` +* `Rouge::Formatters::HTMLLinewise.new(formatter, class: 'line-%i')` This formatter will split your code into lines, each contained in its own div. The - `class_format` option will be used to add a class name to the div, given the line + `class` option will be used to add a class name to the div, given the line number. * `Rouge::Formatters::HTMLPygments.new(formatter, css_class='codehilite')` wraps the given formatter with div wrappers generally expected by stylesheets designed for diff --git a/lib/rouge.rb b/lib/rouge.rb index 0877d8536e..6aa9c55c7b 100644 --- a/lib/rouge.rb +++ b/lib/rouge.rb @@ -81,3 +81,4 @@ def highlight(text, lexer, formatter, &b) load load_dir.join('rouge/themes/monokai_sublime.rb') load load_dir.join('rouge/themes/gruvbox.rb') load load_dir.join('rouge/themes/tulip.rb') +load load_dir.join('rouge/themes/pastie.rb') diff --git a/lib/rouge/cli.rb b/lib/rouge/cli.rb index f120c0cb08..80ff051e8a 100644 --- a/lib/rouge/cli.rb +++ b/lib/rouge/cli.rb @@ -305,7 +305,9 @@ def self.doc yield %|usage: rougify style [] []| yield %|| yield %|Print CSS styles for the given theme. Extra options are| - yield %|passed to the theme. Theme defaults to thankful_eyes.| + 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| diff --git a/lib/rouge/demos/crystal b/lib/rouge/demos/crystal new file mode 100644 index 0000000000..988753e96d --- /dev/null +++ b/lib/rouge/demos/crystal @@ -0,0 +1,45 @@ +lib 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 diff --git a/lib/rouge/demos/hcl b/lib/rouge/demos/hcl new file mode 100644 index 0000000000..42287dae54 --- /dev/null +++ b/lib/rouge/demos/hcl @@ -0,0 +1,7 @@ +service { + key = "value" +} + +variable "ami" { + description = "the AMI to use" +} diff --git a/lib/rouge/demos/jsp b/lib/rouge/demos/jsp new file mode 100644 index 0000000000..9f4fb8d1c9 --- /dev/null +++ b/lib/rouge/demos/jsp @@ -0,0 +1,29 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ page import="java.time.LocalDateTime" %> + +<%! int day = 3; %> + + + + + Simple JSP Application + + + <%-- This is a JSP comment --%> +

Hello world!

+

Current time is <%= LocalDateTime.now() %>

+ + <% if (day == 1 || day == 7) { %> +

Today is weekend

+ <% } else { %> +

Today is not weekend

+ <% } %> + + h2>Using JavaBeans in JSP + + + +

Got message:

+ + + \ No newline at end of file diff --git a/lib/rouge/demos/m68k b/lib/rouge/demos/m68k new file mode 100644 index 0000000000..bf41adb9de --- /dev/null +++ b/lib/rouge/demos/m68k @@ -0,0 +1,16 @@ +initialize: ; go into super user mode + clr.l -(a7) + move.w #32,-(a7) + trap #1 + addq.l #6,a7 + move.l d0,oldstack + rts + +restore: ; go back into user mode + move.l oldstack,-(a7) + move.w #32,-(a7) + trap #1 + addq.l #6,a7 + rts + +oldstack dc.l 0 diff --git a/lib/rouge/demos/mathematica b/lib/rouge/demos/mathematica new file mode 100644 index 0000000000..b650247f42 --- /dev/null +++ b/lib/rouge/demos/mathematica @@ -0,0 +1,8 @@ +(* Fibonacci numbers with memoization *) + +fib::usage = "f[n] calculates the n'th Fibonacci number."; +fib[0] = fib[1] = 1; +fib[n_Integer?Positive]:= fib[n] = fib[n-1] + fib[n-2]; + +In[4]:= fib[42] +Out[4]= 433494437 diff --git a/lib/rouge/demos/sqf b/lib/rouge/demos/sqf new file mode 100644 index 0000000000..9f54383c70 --- /dev/null +++ b/lib/rouge/demos/sqf @@ -0,0 +1,14 @@ +// 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; diff --git a/lib/rouge/demos/terraform b/lib/rouge/demos/terraform new file mode 100644 index 0000000000..7baae924f7 --- /dev/null +++ b/lib/rouge/demos/terraform @@ -0,0 +1,31 @@ +# From: https://github.com/terraform-providers/terraform-provider-aws/blob/master/examples/count/main.tf + +# Specify the provider and access details +provider "aws" { + region = "${var.aws_region}" +} + +resource "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}"] +} + +resource "aws_instance" "web" { + instance_type = "m1.small" + ami = "${lookup(var.aws_amis, var.aws_region)}" + + # This will create 4 instances + count = 4 +} diff --git a/lib/rouge/guessers/disambiguation.rb b/lib/rouge/guessers/disambiguation.rb index de4af450e7..f78654fb34 100644 --- a/lib/rouge/guessers/disambiguation.rb +++ b/lib/rouge/guessers/disambiguation.rb @@ -83,6 +83,9 @@ def match?(filename) next ObjectiveC if matches?(/@(end|implementation|protocol|property)\b/) next ObjectiveC if contains?('@"') + next Mathematica if contains?('(*') + next Mathematica if contains?(':=') + next Matlab if matches?(/^\s*?%/) end diff --git a/lib/rouge/lexers/crystal.rb b/lib/rouge/lexers/crystal.rb new file mode 100644 index 0000000000..4db3b6a0c3 --- /dev/null +++ b/lib/rouge/lexers/crystal.rb @@ -0,0 +1,429 @@ +# -*- coding: utf-8 -*- # + +module Rouge + module Lexers + class Crystal < RegexLexer + title "Crystal" + desc "Crystal The Programming Language (crystal-lang.org)" + tag 'crystal' + aliases 'cr' + filenames '*.cr' + + mimetypes 'text/x-crystal', 'application/x-crystal' + + def self.detect?(text) + return true if text.shebang? 'crystal' + 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 /:'(\\\\|\\'|[^'])*'/, Str::Symbol + rule /:"/, Str::Symbol, :simple_sym + end + + state :sigil_strings do + # %-sigiled strings + # %(abc), %[abc], %, %.abc., %r.abc., etc + delimiter_map = { '{' => '}', '[' => ']', '(' => ')', '<' => '>' } + rule /%([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 + rule /\\[##{open}#{close}\\]/, Str::Escape + # nesting rules only with asymmetric delimiters + if open != close + rule /#{open}/ do + token toktype + push + end + end + rule /#{close}/, toktype, :pop! + + if interp + mixin :string_intp_escaped + rule /#/, toktype + else + rule /[\\#]/, toktype + end + + rule /[^##{open}#{close}\\]+/m, toktype + end + end + end + + state :strings do + mixin :symbols + rule /\b[a-z_]\w*?[?!]?:\s+/, Str::Symbol, :expr_start + rule /'(\\\\|\\'|[^'])*'/, Str::Single + rule /"/, Str::Double, :simple_string + rule /(?_*\$?:"]), Name::Variable::Global + rule /\$-[0adFiIlpvw]/, Name::Variable::Global + rule /::/, Operator + + mixin :strings + + rule /(?:#{keywords.join('|')})\b/, Keyword, :expr_start + rule /(?:#{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 /(def\b)(\s*)/ do + groups Keyword, Text + push :funcname + end + + rule /(class\b)(\s*)/ do + groups Keyword, Text + push :classname + end + + rule /(?:#{builtins_q.join('|')})[?]/, Name::Builtin, :expr_start + rule /(?:#{builtins_b.join('|')})!/, Name::Builtin, :expr_start + rule /(?=])/ do + groups Punctuation, Text, Name::Function + push :method_call + end + + rule /[a-zA-Z_]\w*[?!]/, Name, :expr_start + rule /[a-zA-Z_]\w*/, Name, :method_call + rule /\*\*|<>?|>=|<=|<=>|=~|={3}|!~|&&?|\|\||\./, + Operator, :expr_start + rule /[-+\/*%=<>&!^|~]=?/, 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 /(?>? | <=>? | >= | ===? + ) + )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 /\s+/, Text + rule /\(/ do + token Punctuation + push :defexpr + push :expr_start + end + + # class << expr + rule /<=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 /(\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 /.+/m, Comment::Preproc, :pop! + end + end + end +end diff --git a/lib/rouge/lexers/css.rb b/lib/rouge/lexers/css.rb index 4792434470..c19aa4519d 100644 --- a/lib/rouge/lexers/css.rb +++ b/lib/rouge/lexers/css.rb @@ -265,7 +265,7 @@ def self.vendor_prefixes state :stanza_value do rule /;/, Punctuation, :pop! rule(/(?=})/) { pop! } - rule /!important\b/, Comment::Preproc + rule /!\s*important\b/, Comment::Preproc rule /^@.*?$/, Comment::Preproc mixin :value end diff --git a/lib/rouge/lexers/elixir.rb b/lib/rouge/lexers/elixir.rb index 68175e3ce4..866a3763d5 100644 --- a/lib/rouge/lexers/elixir.rb +++ b/lib/rouge/lexers/elixir.rb @@ -21,7 +21,7 @@ class Elixir < RegexLexer rule /#.*$/, Comment::Single rule %r{\b(case|cond|end|bc|lc|if|unless|try|loop|receive|fn|defmodule| defp?|defprotocol|defimpl|defrecord|defmacrop?|defdelegate| - defexception|exit|raise|throw|after|rescue|catch|else)\b(?![?!])| + defexception|defguardp?|defstruct|exit|raise|throw|after|rescue|catch|else)\b(?![?!])| (?)\b}x, Keyword rule /\b(import|require|use|recur|quote|unquote|super|refer)\b(?![?!])/, Keyword::Namespace rule /(?)m, Name::Tag, :pop! end diff --git a/lib/rouge/lexers/igorpro.rb b/lib/rouge/lexers/igorpro.rb index ae8a606926..e3934d0bf5 100644 --- a/lib/rouge/lexers/igorpro.rb +++ b/lib/rouge/lexers/igorpro.rb @@ -49,202 +49,460 @@ def self.igorConstants def self.igorFunction @igorFunction ||= Set.new %w( - axontelegraphsettimeoutms axontelegraphgettimeoutms - axontelegraphgetdatanum axontelegraphagetdatanum - axontelegraphgetdatastring axontelegraphagetdatastring - axontelegraphgetdatastruct axontelegraphagetdatastruct hdf5datasetinfo - hdf5attributeinfo hdf5typeinfo hdf5libraryinfo - mpfxgausspeak mpfxlorenzianpeak mpfxvoigtpeak mpfxemgpeak mpfxexpconvexppeak - abs acos acosh airya airyad airyb airybd - alog area areaxy asin asinh atan atan2 atanh axisvalfrompixel besseli - besselj besselk bessely beta betai binarysearch binarysearchinterp - binomial binomialln binomialnoise cabs capturehistorystart ceil cequal - char2num chebyshev chebyshevu checkname cmplx cmpstr conj contourz cos - cosh cosintegral cot coth countobjects countobjectsdfr cpowi - creationdate csc csch datafolderexists datafolderrefsequal - datafolderrefstatus date2secs datetime datetojulian dawson defined - deltax digamma dilogarithm dimdelta dimoffset dimsize ei enoise - equalwaves erf erfc erfcw exists exp expint expintegrale1 expnoise - factorial fakedata faverage faveragexy finddimlabel findlistitem floor - fontsizeheight fontsizestringwidth fresnelcos fresnelsin gamma - gammaeuler gammainc gammanoise gammln gammp gammq gauss gauss1d gauss2d - gcd getbrowserline getdefaultfontsize getdefaultfontstyle getkeystate - getrterror getrtlocation gizmoinfo gizmoscale gnoise grepstring hcsr - hermite hermitegauss hyperg0f1 hyperg1f1 hyperg2f1 hypergnoise hypergpfq - igorversion imag indextoscale integrate1d interp interp2d interp3d - inverseerf inverseerfc itemsinlist jacobicn jacobisn laguerre laguerrea - laguerregauss lambertw leftx legendrea limit ln log lognormalnoise - lorentziannoise magsqr mandelbrotpoint marcumq matrixcondition matrixdet - matrixdot matrixrank matrixtrace max mean median min mod moddate - norm numberbykey numpnts numtype numvarordefault nvar_exists p2rect - panelresolution paramisdefault pcsr pi pixelfromaxisval pnt2x - poissonnoise poly poly2d polygonarea qcsr r2polar real rightx round - sawtooth scaletoindex screenresolution sec sech selectnumber - setenvironmentvariable sign sin sinc sinh sinintegral sphericalbessj - sphericalbessjd sphericalbessy sphericalbessyd sphericalharmonics sqrt - startmstimer statsbetacdf statsbetapdf statsbinomialcdf statsbinomialpdf - statscauchycdf statscauchypdf statschicdf statschipdf statscmssdcdf - statscorrelation statsdexpcdf statsdexppdf statserlangcdf statserlangpdf - statserrorpdf statsevaluecdf statsevaluepdf statsexpcdf statsexppdf - statsfcdf statsfpdf statsfriedmancdf statsgammacdf statsgammapdf - statsgeometriccdf statsgeometricpdf statsgevcdf statsgevpdf - statshypergcdf statshypergpdf statsinvbetacdf statsinvbinomialcdf - statsinvcauchycdf statsinvchicdf statsinvcmssdcdf statsinvdexpcdf - statsinvevaluecdf statsinvexpcdf statsinvfcdf statsinvfriedmancdf - statsinvgammacdf statsinvgeometriccdf statsinvkuipercdf - statsinvlogisticcdf statsinvlognormalcdf statsinvmaxwellcdf - statsinvmoorecdf statsinvnbinomialcdf statsinvncchicdf statsinvncfcdf - statsinvnormalcdf statsinvparetocdf statsinvpoissoncdf statsinvpowercdf - statsinvqcdf statsinvqpcdf statsinvrayleighcdf statsinvrectangularcdf - statsinvspearmancdf statsinvstudentcdf statsinvtopdowncdf - statsinvtriangularcdf statsinvusquaredcdf statsinvvonmisescdf - statsinvweibullcdf statskuipercdf statslogisticcdf statslogisticpdf - statslognormalcdf statslognormalpdf 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 str2num - stringcrc stringmatch strlen strsearch studenta studentt sum svar_exists - tagval tan tanh textencodingcode threadgroupcreate threadgrouprelease - threadgroupwait threadprocessorcount threadreturnvalue ticks trunc - unsetenvironmentvariable variance vcsr voigtfunc wavecrc wavedims - waveexists wavemax wavemin waverefsequal wavetextencoding wavetype - whichlistitem wintype wnoise x2pnt xcsr zcsr zerniker zeta addlistitem - annotationinfo annotationlist axisinfo axislist base64_decode - base64_encode capturehistory childwindowlist cleanupname contourinfo - contournamelist controlnamelist converttextencoding csrinfo csrwave - csrxwave ctablist datafolderdir date fetchurl fontlist funcrefinfo - functioninfo functionlist functionpath getbrowserselection getdatafolder - getdefaultfont getdimlabel getenvironmentvariable geterrmessage - getformula getindependentmodulename getindexedobjname - getindexedobjnamedfr getrterrmessage getrtlocinfo getrtstackinfo - getscraptext getuserdata getwavesdatafolder greplist guideinfo - guidenamelist hash igorinfo imageinfo imagenamelist - independentmodulelist indexeddir indexedfile juliantodate layoutinfo - listmatch lowerstr macrolist nameofwave normalizeunicode note num2char - num2istr num2str operationlist padstring parsefilepath pathlist pictinfo - pictlist possiblyquotename proceduretext removebykey removeending - removefromlist removelistitem replacenumberbykey replacestring - replacestringbykey secs2date secs2time selectstring sortlist - specialcharacterinfo specialcharacterlist specialdirpath stringbykey - stringfromlist stringlist strvarordefault tableinfo textencodingname - textfile threadgroupgetdf time tracefrompixel traceinfo tracenamelist - trimstring uniquename unpadstring upperstr urldecode urlencode - variablelist waveinfo wavelist wavename waverefwavetolist waveunits - winlist winname winrecreation wmfindwholeword xwavename - contournametowaveref csrwaveref csrxwaveref imagenametowaveref - listtotextwave listtowaverefwave newfreewave tagwaveref - tracenametowaveref waverefindexed waverefindexeddfr xwavereffromtrace - getdatafolderdfr getwavesdatafolderdfr newfreedatafolder + 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( - abort addfifodata addfifovectdata addmovieaudio addmovieframe adoptfiles - apmath append appendimage appendlayoutobject appendmatrixcontour - appendtext appendtogizmo appendtograph appendtolayout appendtotable - appendxyzcontour autopositionwindow backgroundinfo beep boundingball - browseurl buildmenu button cd chart checkbox checkdisplayed choosecolor - close closehelp closemovie closeproc colorscale colortab2wave - concatenate controlbar controlinfo controlupdate - convertglobalstringtextencoding convexhull convolve copyfile copyfolder - copyscales correlate createaliasshortcut createbrowser cross - ctrlbackground ctrlfifo ctrlnamedbackground cursor curvefit - customcontrol cwt debugger debuggeroptions defaultfont - defaultguicontrols defaultguifont defaulttextencoding defineguide - delayupdate deleteannotations deletefile deletefolder deletepoints - differentiate dir display displayhelptopic displayprocedure doalert - doigormenu doupdate dowindow doxopidle dpss drawaction drawarc - drawbezier drawline drawoval drawpict drawpoly drawrect drawrrect - drawtext drawusershape dspdetrend dspperiodogram duplicate - duplicatedatafolder dwt edgestats edit errorbars execute - executescripttext experimentmodified exportgizmo extract - fastgausstransform fastop fbinread fbinwrite fft fgetpos fifo2wave - fifostatus filterfir filteriir findcontour findduplicates findlevel - findlevels findpeak findpointsinpoly findroots findsequence findvalue - fpclustering fprintf freadline fsetpos fstatus ftpcreatedirectory - ftpdelete ftpdownload ftpupload funcfit funcfitmd gbloadwave getaxis - getcamera getfilefolderinfo getgizmo getlastusermenuinfo getmarquee - getmouse getselection getwindow graphnormal graphwavedraw graphwaveedit - grep groupbox hanning hideigormenus hideinfo hideprocedures hidetools - hilberttransform histogram ica ifft imageanalyzeparticles imageblend - imageboundarytomask imageedgedetection imagefileinfo imagefilter - imagefocus imagefromxyz imagegenerateroimask imageglcm - 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 - killbackground killcontrol killdatafolder killfifo killfreeaxis killpath - killpicts killstrings killvariables killwaves killwindow kmeans label - layout layoutpageaction layoutslideshow legend - linearfeedbackshiftregister listbox loaddata loadpackagepreferences - loadpict loadwave loess lombperiodogram make makeindex markperftesttime - matrixconvolve matrixcorr matrixeigenv matrixfilter matrixgaussj - matrixglm matrixinverse matrixlinearsolve matrixlinearsolvetd matrixlls - matrixlubksub matrixlud matrixludtd matrixmultiply matrixop matrixschur - matrixsolve matrixsvbksub matrixsvd matrixtranspose measurestyledtext - mlloadwave modify modifybrowser modifycamera modifycontour modifycontrol - modifycontrollist modifyfreeaxis modifygizmo modifygraph modifyimage - modifylayout modifypanel modifytable modifywaterfall movedatafolder - movefile movefolder movestring movesubwindow movevariable movewave - movewindow multitaperpsd multithreadingcontrol neuralnetworkrun - neuralnetworktrain newcamera newdatafolder newfifo newfifochan - newfreeaxis newgizmo newimage newlayout newmovie newnotebook newpanel - newpath newwaterfall note notebook notebookaction open openhelp - opennotebook optimize parseoperationtemplate pathinfo pauseforuser - pauseupdate pca playmovie playmovieaction playsound popupcontextualmenu - popupmenu preferences primefactors print printf printgraphs printlayout - printnotebook printsettings printtable project pulsestats putscraptext - pwd quit ratiofromnumber redimension remove removecontour - removefromgizmo removefromgraph removefromlayout removefromtable - removeimage removelayoutobjects removepath rename renamedatafolder - renamepath renamepict renamewindow reorderimages reordertraces - replacetext replacewave resample resumeupdate reverse rotate save - savedata saveexperiment savegraphcopy savenotebook - savepackagepreferences savepict savetablecopy setactivesubwindow setaxis - setbackground setdashpattern setdatafolder setdimlabel setdrawenv - setdrawlayer setfilefolderinfo setformula 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 sprintf sscanf stack - stackwindows statsangulardistancetest statsanova1test statsanova2nrtest - statsanova2rmtest statsanova2test statschitest - statscircularcorrelationtest statscircularmeans statscircularmoments - statscirculartwosampletest statscochrantest statscontingencytable - statsdiptest statsdunnetttest statsfriedmantest statsftest - statshodgesajnetest statsjbtest statskde statskendalltautest statskstest - statskwtest statslinearcorrelationtest statslinearregression - statsmulticorrelationtest statsnpmctest statsnpnominalsrtest - statsquantiles statsrankcorrelationtest statsresample statssample - statsscheffetest statsshapirowilktest statssigntest statssrtest - statsttest statstukeytest statsvariancestest statswatsonusquaredtest - statswatsonwilliamstest statswheelerwatsontest statswilcoxonranktest - statswrcorrelationtest structget structput sumdimension sumseries - tabcontrol tag textbox threadgroupputdf threadstart tile tilewindows - titlebox tocommandline toolsgrid triangulate3d unwrap urlrequest - valdisplay waveclear wavemeanstdv wavestats wavetransform wfprintf - ) - end - - def self.hdf5Operation - @hdf5Operation ||= Set.new %w( - hdf5createfile hdf5openfile hdf5closefile hdf5creategroup hdf5opengroup - hdf5listgroup hdf5closegroup hdf5listattributes hdf5attributeinfo hdf5datasetinfo - hdf5loaddata hdf5loadimage hdf5loadgroup hdf5savedata hdf5saveimage hdf5savegroup - hdf5typeinfo hdf5createlink hdf5unlinkobject hdf5libraryinfo - hdf5dumpstate hdf5dump hdf5dumperrors + 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 @@ -279,9 +537,6 @@ def self.object_name elsif self.class.igorOperation.include? m[0].downcase token Keyword::Reserved push :operationFlags - elsif self.class.hdf5Operation.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 diff --git a/lib/rouge/lexers/java.rb b/lib/rouge/lexers/java.rb index 2a51fcc973..efc3ea3f01 100644 --- a/lib/rouge/lexers/java.rb +++ b/lib/rouge/lexers/java.rb @@ -21,7 +21,7 @@ class Java < RegexLexer public static strictfp super synchronized throws transient volatile ) - types = %w(boolean byte char double float int long short void) + types = %w(boolean byte char double float int long short var void) id = /[a-zA-Z_][a-zA-Z0-9_]*/ diff --git a/lib/rouge/lexers/javascript.rb b/lib/rouge/lexers/javascript.rb index bbce102b36..4915664a71 100644 --- a/lib/rouge/lexers/javascript.rb +++ b/lib/rouge/lexers/javascript.rb @@ -207,6 +207,7 @@ def self.id_regex state :dq do rule /[^\\"]+/, Str::Double + rule /\\n/, Str::Escape rule /\\"/, Str::Escape rule /"/, Str::Double, :pop! end diff --git a/lib/rouge/lexers/jsp.rb b/lib/rouge/lexers/jsp.rb new file mode 100644 index 0000000000..99ea697f03 --- /dev/null +++ b/lib/rouge/lexers/jsp.rb @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- # + +module Rouge + module Lexers + class JSP < TemplateLexer + desc 'JSP' + tag 'jsp' + filenames '*.jsp' + mimetypes 'text/x-jsp', 'application/x-jsp' + + def initialize(*) + super + @java = Java.new + end + + directives = %w(page include taglib) + actions = %w(scriptlet declaration expression) + + state :root do + + rule /<%--/, Comment, :jsp_comment + + rule /<%@\s*(#{directives.join('|')})\s*/, Name::Tag, :jsp_directive + + rule //, Name::Tag, :jsp_expression + + # start of tag, e.g. + rule /<[a-zA-Z]*:[a-zA-Z]*\s*/, Name::Tag, :jsp_tag + + # end of tag, e.g. + rule /<\/[a-zA-Z]*:[a-zA-Z]*>/, Name::Tag + + rule /<%[!=]?/, Name::Tag, :jsp_expression2 + + # fallback to HTML + rule(/(.+?)(?=(<%|<\/?[a-zA-Z]*:))/m) { delegate parent } + rule(/.+/m) { delegate parent } + end + + state :jsp_comment do + rule /(--%>)/, Comment, :pop! + rule /./m, Comment + end + + state :jsp_directive do + rule /(%>)/, Name::Tag, :pop! + mixin :attributes + rule(/(.+?)(?=%>)/m) { delegate parent } + end + + state :jsp_directive2 do + rule /(\/>)/, Name::Tag, :pop! + mixin :attributes + rule(/(.+?)(?=\/>)/m) { delegate parent } + end + + state :jsp_expression do + rule /<\/jsp:(#{actions.join('|')})>/, Name::Tag, :pop! + mixin :attributes + rule(/[^<\/]+/) { delegate @java } + end + + state :jsp_expression2 do + rule /%>/, Name::Tag, :pop! + rule(/[^%>]+/) { delegate @java } + end + + state :jsp_tag do + rule /\/?>/, Name::Tag, :pop! + mixin :attributes + rule(/(.+?)(?=\/?>)/m) { delegate parent } + end + + state :attributes do + rule /\s*[a-zA-Z0-9_:-]+\s*=\s*/m, Name::Attribute, :attr + end + + state :attr do + rule /"/ do + token Str + goto :double_quotes + end + + rule /'/ do + token Str + goto :single_quotes + end + + rule /[^\s>]+/, Str, :pop! + end + + state :double_quotes do + rule /"/, Str, :pop! + rule /\$\{/, Str::Interpol, :jsp_interp + rule /[^"]+/, Str + end + + state :single_quotes do + rule /'/, Str, :pop! + rule /\$\{/, Str::Interpol, :jsp_interp + rule /[^']+/, Str + end + + state :jsp_interp do + rule /\}/, Str::Interpol, :pop! + rule /'/, Literal, :jsp_interp_literal_start + rule(/[^'\}]+/) { delegate @java } + end + + state :jsp_interp_literal_start do + rule /'/, Literal, :pop! + rule /[^']*/, Literal + end + + end + end +end \ No newline at end of file diff --git a/lib/rouge/lexers/julia.rb b/lib/rouge/lexers/julia.rb index 62a64c602f..a4274696b7 100644 --- a/lib/rouge/lexers/julia.rb +++ b/lib/rouge/lexers/julia.rb @@ -16,26 +16,20 @@ def self.detect?(text) end BUILTINS = /\b(?: - applicable | assert | convert - | dlopen | dlsym | edit - | eps | error | exit - | finalizer | hash | im - | Inf | invoke | is - | isa | isequal | load - | method_exists | Nan | new - | ntuple | pi | promote - | promote_type | realmax | realmin - | sizeof | subtype | system - | throw | tuple | typemax - | typemin | typeof | uid - | whos + true | false | missing | nothing + | Inf | Inf16 | Inf32 | Inf64 + | NaN | NaN16 | NaN32 | NaN64 + | stdout | stderr | stdin | devnull + | pi | π | ℯ | im )\b/x KEYWORDS = /\b(?: function | return | module | import | export | if | else | elseif | end | for - | in | while | try | catch | super - | const + | in | isa | while | try | catch + | const | local | global | using | struct + | mutable struct | abstract type | finally + | begin | do | quote | macro | for outer )\b/x TYPES = /\b(?: @@ -44,14 +38,13 @@ def self.detect?(text) | Int32 | UInt32 | Int64 | UInt64 | Int128 | UInt128 | Float16 | Float32 | Float64 - | Bool | Inf | Inf16 - | Inf32 | NaN | NaN16 - | NaN32 | BigInt | BigFloat - | Char | ASCIIString | UTF8String - | UTF16String | UTF32String | AbstractString - | WString | String | Regex - | RegexMatch | Complex64 | Complex128 - | Any | Nothing | None + | Bool | BigInt | BigFloat + | Complex | ComplexF16 | ComplexF32 + | ComplexF64 | Missing | Nothing + | Char | String | SubString + | Regex | RegexMatch | Any + | Type | DataType | UnionAll + | (Abstract)?(Array|Vector|Matrix|VecOrMat) )\b/x OPERATORS = / \+ | = | - | \* | \/ @@ -64,10 +57,11 @@ def self.detect?(text) | <= | ≤ | >= | ≥ | \. | :: | <: | -> | \? | \.\* | \.\^ | \.\\ | \.\/ | \\ | < - | > + | > | ÷ | >: | : | === + | !== /x - PUNCTUATION = / [ \[ \] { } : \( \) , ; @ ] /x + PUNCTUATION = / [ \[ \] { } \( \) , ; @ ] /x state :root do diff --git a/lib/rouge/lexers/kotlin.rb b/lib/rouge/lexers/kotlin.rb index e78ed7503c..d7ff9c5d95 100644 --- a/lib/rouge/lexers/kotlin.rb +++ b/lib/rouge/lexers/kotlin.rb @@ -10,7 +10,7 @@ class Kotlin < RegexLexer desc "Kotlin Programming Language (http://kotlinlang.org)" tag 'kotlin' - filenames '*.kt' + filenames '*.kt', '*.kts' mimetypes 'text/x-kotlin' keywords = %w( diff --git a/lib/rouge/lexers/m68k.rb b/lib/rouge/lexers/m68k.rb new file mode 100644 index 0000000000..c612a4097f --- /dev/null +++ b/lib/rouge/lexers/m68k.rb @@ -0,0 +1,143 @@ +# -*- coding: utf-8 -*- # + +module Rouge + module Lexers + class M68k < RegexLexer + tag 'm68k' + + title "M68k" + desc "Motorola 68k Assembler" + + ws = %r((?:\s|;.*?\n/)+) + 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 /[\s\t\r]+/, Text + end + + state :whitespace do + rule /\n+/m, Text, :expr_bol + rule %r(^\*(\\.|.)*?\n), Comment::Single, :expr_bol + rule %r(;(\\.|.)*?\n), Comment::Single, :expr_bol + mixin :inline_whitespace + end + + state :root do + rule(//) { push :statements } + end + + state :statements do + mixin :whitespace + rule /"/, Str, :string + rule /#/, Name::Decorator + rule /^\.?[a-zA-Z0-9_]+:?/, Name::Label + rule /\.[bswl]\s/i, Name::Decorator + rule %r('(\\.|\\[0-7]{1,3}|\\x[a-f0-9]{1,2}|[^\\'\n])')i, Str::Char + rule /\$[0-9a-f]+/i, Num::Hex + rule /@[0-8]+/i, Num::Oct + rule /%[01]+/i, Num::Bin + rule /\d+/i, Num::Integer + rule %r([*~&+=\|?:<>/-]), Operator + rule /\\./, Comment::Preproc + rule /[(),.]/, Punctuation + rule /\[[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 /"/, Str, :pop! + rule /\\([\\abfnrtv"']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})/, Str::Escape + rule /[^\\"\n]+/, Str + rule /\\\n/, Str + rule /\\/, Str # stray backslash + end + end + end +end diff --git a/lib/rouge/lexers/markdown.rb b/lib/rouge/lexers/markdown.rb index 41c949ca6b..bbd4acd48a 100644 --- a/lib/rouge/lexers/markdown.rb +++ b/lib/rouge/lexers/markdown.rb @@ -77,7 +77,7 @@ def html end # links and images - rule /(!?\[)(#{edot}+?)(\])/ do + rule /(!?\[)(#{edot}*?)(\])/ do groups Punctuation, Name::Variable, Punctuation push :link end diff --git a/lib/rouge/lexers/mathematica.rb b/lib/rouge/lexers/mathematica.rb new file mode 100644 index 0000000000..a430ee9a72 --- /dev/null +++ b/lib/rouge/lexers/mathematica.rb @@ -0,0 +1,95 @@ +# -*- coding: utf-8 -*- # + +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 + load Pathname.new(__FILE__).dirname.join('mathematica/builtins.rb') + self.builtins + end + + state :root do + rule /\s+/, Text::Whitespace + rule /\(\*/, Comment, :comment + rule /#{base}\^\^#{number_base}#{precision}?(\*\^[+-]?\d+)?/, Num # a number with a base + rule /(?:#{number}#{precision}?(?:\*\^[+-]?\d+)?)/, Num # all other numbers + rule message, Name::Tag + rule in_out, Generic::Prompt + rule /#{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 /\(\*/, Comment, :comment + rule /\*\)/, Comment, :pop! + rule /::#{identifier}::/, Comment::Preproc + rule /[ ]:(#{identifier}|[^\S])+:[ ]/, Comment::Preproc + rule /./, Comment + end + end + end +end diff --git a/lib/rouge/lexers/mathematica/builtins.rb b/lib/rouge/lexers/mathematica/builtins.rb new file mode 100644 index 0000000000..a53eb5d2d6 --- /dev/null +++ b/lib/rouge/lexers/mathematica/builtins.rb @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- # +# automatically generated by `rake builtins:mathematica` +module Rouge + module Lexers + class Mathematica + def self.builtins + @builtins ||= Set.new %w(AASTriangle AnchoredSearch Assert AbelianGroup And AssociateTo Abort AndersonDarlingTest Association AbortKernels AngerJ AssociationFormat AbortProtect AngleBracket AssociationMap Above AnglePath AssociationQ Abs AnglePath3D AssociationThread AbsArg AngleVector AssumeDeterministic AbsoluteCorrelation AngularGauge Assuming AbsoluteCorrelationFunction Animate Assumptions AbsoluteCurrentValue AnimationDirection AsymptoticOutputTracker AbsoluteDashing AnimationRate Asynchronous AbsoluteFileName AnimationRepetitions AsynchronousTaskObject AbsoluteOptions AnimationRunning AsynchronousTasks AbsolutePointSize AnimationRunTime AtomQ AbsoluteThickness AnimationTimeIndex Attributes AbsoluteTime Animator Audio AbsoluteTiming Annotation AudioAmplify AccountingForm Annuity AudioBlockMap Accumulate AnnuityDue AudioCapture Accuracy Annulus AudioChannelAssignment AccuracyGoal Anonymous AudioChannelCombine ActionMenu Antialiasing AudioChannelMix Activate AntihermitianMatrixQ AudioChannels ActiveClassification Antisymmetric AudioChannelSeparate ActiveClassificationObject AntisymmetricMatrixQ AudioData ActivePrediction AnyOrder AudioDelay ActivePredictionObject AnySubset AudioDelete ActiveStyle AnyTrue AudioFade AcyclicGraphQ Apart AudioFrequencyShift AddTo ApartSquareFree AudioGenerator AddUsers APIFunction AudioInputDevice AdjacencyGraph Appearance AudioInsert AdjacencyList AppearanceElements AudioIntervals AdjacencyMatrix AppearanceRules AudioJoin AdjustmentBox AppellF1 AudioLabel AdjustmentBoxOptions Append AudioLength AdjustTimeSeriesForecast AppendTo AudioLocalMeasurements AdministrativeDivisionData Apply AudioLoudness AffineHalfSpace ArcCos AudioMeasurements AffineSpace ArcCosh AudioNormalize AffineStateSpaceModel ArcCot AudioOutputDevice AffineTransform ArcCoth AudioOverlay After ArcCsc AudioPad AggregationLayer ArcCsch AudioPan AircraftData ArcCurvature AudioPartition AirportData ARCHProcess AudioPause AirPressureData ArcLength AudioPitchShift AirTemperatureData ArcSec AudioPlay AiryAi ArcSech AudioPlot AiryAiPrime ArcSin AudioQ AiryAiZero ArcSinDistribution AudioReplace AiryBi ArcSinh AudioResample AiryBiPrime ArcTan AudioReverb AiryBiZero ArcTanh AudioSampleRate AlgebraicIntegerQ Area AudioSpectralMap AlgebraicNumber Arg AudioSpectralTransformation AlgebraicNumberDenominator ArgMax AudioSplit AlgebraicNumberNorm ArgMin AudioStop AlgebraicNumberPolynomial ARIMAProcess AudioStream AlgebraicNumberTrace ArithmeticGeometricMean AudioStreams Algebraics ARMAProcess AudioTimeStretch AlgebraicUnitQ ARProcess AudioTrim Alignment Array AudioType AlignmentPoint ArrayComponents AugmentedSymmetricPolynomial All ArrayDepth Authentication AllowedCloudExtraParameters ArrayFilter AutoAction AllowedCloudParameterExtensions ArrayFlatten Autocomplete AllowedDimensions ArrayMesh AutocompletionFunction AllowGroupClose ArrayPad AutoCopy AllowInlineCells ArrayPlot AutocorrelationTest AllowLooseGrammar ArrayQ AutoDelete AllowReverseGroupClose ArrayResample AutoIndent AllTrue ArrayReshape AutoItalicWords Alphabet ArrayRules Automatic AlphabeticOrder Arrays AutoMultiplicationSymbol AlphabeticSort Arrow AutoRefreshed AlphaChannel Arrowheads AutoRemove AlternateImage ASATriangle AutorunSequencing AlternatingFactorial Ask AutoScroll AlternatingGroup AskAppend AutoSpacing AlternativeHypothesis AskConfirm AutoSubmitting Alternatives AskDisplay Axes AltitudeMethod AskedQ AxesEdge AmbiguityFunction AskedValue AxesLabel AmbiguityList AskFunction AxesOrigin AnatomyData AskState AxesStyle AnatomyForm AskTemplateDisplay Axis AnatomyPlot3D AspectRatio BabyMonsterGroupB BetaPrimeDistribution BooleanMinimize Back BetaRegularized BooleanMinterms Background Between BooleanQ Backslash BetweennessCentrality BooleanRegion Backward BezierCurve Booleans Ball BezierFunction BooleanStrings Band BilateralFilter BooleanTable BandpassFilter Binarize BooleanVariables BandstopFilter BinaryDeserialize BorderDimensions BarabasiAlbertGraphDistribution BinaryDistance BorelTannerDistribution BarChart BinaryFormat Bottom BarChart3D BinaryImageQ BottomHatTransform BarcodeImage BinaryRead BoundaryDiscretizeGraphics BarcodeRecognize BinaryReadList BoundaryDiscretizeRegion BaringhausHenzeTest BinarySerialize BoundaryMesh BarLegend BinaryWrite BoundaryMeshRegion BarlowProschanImportance BinCounts BoundaryMeshRegionQ BarnesG BinLists BoundaryStyle BarOrigin Binomial BoundedRegionQ BarSpacing BinomialDistribution BoundingRegion BartlettHannWindow BinomialProcess BoxData BartlettWindow BinormalDistribution Boxed BaseForm BiorthogonalSplineWavelet BoxMatrix Baseline BipartiteGraphQ BoxObject BaselinePosition BiquadraticFilterModel BoxRatios BaseStyle BirnbaumImportance BoxStyle BasicRecurrentLayer BirnbaumSaundersDistribution BoxWhiskerChart BatchNormalizationLayer BitAnd BracketingBar BatchSize BitClear BrayCurtisDistance BatesDistribution BitGet BreadthFirstScan BattleLemarieWavelet BitLength Break BayesianMaximization BitNot BridgeData BayesianMaximizationObject BitOr BrightnessEqualize BayesianMinimization BitSet BroadcastStationData BayesianMinimizationObject BitShiftLeft Brown Because BitShiftRight BrownForsytheTest BeckmannDistribution BitXor BrownianBridgeProcess Beep BiweightLocation BSplineBasis Before BiweightMidvariance BSplineCurve Begin Black BSplineFunction BeginDialogPacket BlackmanHarrisWindow BSplineSurface BeginPackage BlackmanNuttallWindow BubbleChart BellB BlackmanWindow BubbleChart3D BellY Blank BubbleScale Below BlankNullSequence BubbleSizes BenfordDistribution BlankSequence BuildingData BeniniDistribution Blend BulletGauge BenktanderGibratDistribution Block BusinessDayQ BenktanderWeibullDistribution BlockMap ButterflyGraph BernoulliB BlockRandom ButterworthFilterModel BernoulliDistribution BlomqvistBeta Button BernoulliGraphDistribution BlomqvistBetaTest ButtonBar BernoulliProcess Blue ButtonBox BernsteinBasis Blur ButtonBoxOptions BesselFilterModel BodePlot ButtonData BesselI BohmanWindow ButtonFunction BesselJ Bold ButtonMinHeight BesselJZero Bookmarks ButtonNotebook BesselK Boole ButtonSource BesselY BooleanConsecutiveFunction Byte BesselYZero BooleanConvert ByteArray Beta BooleanCountingFunction ByteArrayQ BetaBinomialDistribution BooleanFunction ByteArrayToString BetaDistribution BooleanGraph ByteCount BetaNegativeBinomialDistribution BooleanMaxterms ByteOrdering C ClassifierInformation ContainsAll CachePersistence ClassifierMeasurements ContainsAny CalendarConvert ClassifierMeasurementsObject ContainsExactly CalendarData Classify ContainsNone CalendarType ClassPriors ContainsOnly Callout Clear ContentFieldOptions CalloutMarker ClearAll ContentLocationFunction CalloutStyle ClearAttributes ContentObject CallPacket ClearCookies ContentPadding CanberraDistance ClearPermissions ContentSelectable Cancel ClearSystemCache ContentSize CancelButton ClebschGordan Context CandlestickChart ClickPane Contexts CanonicalGraph Clip ContextToFileName CanonicalName ClippingStyle Continue CanonicalWarpingCorrespondence ClipPlanes ContinuedFraction CanonicalWarpingDistance ClipPlanesStyle ContinuedFractionK CantorMesh ClipRange ContinuousAction CantorStaircase Clock ContinuousMarkovProcess Cap ClockGauge ContinuousTask CapForm Close ContinuousTimeModelQ CapitalDifferentialD CloseKernels ContinuousWaveletData Capitalize ClosenessCentrality ContinuousWaveletTransform CapsuleShape Closing ContourDetect CaptureRunning CloudAccountData ContourLabels CarlemanLinearize CloudBase ContourPlot CarmichaelLambda CloudConnect ContourPlot3D CaseOrdering CloudDeploy Contours Cases CloudDirectory ContourShading CaseSensitive CloudDisconnect ContourStyle Cashflow CloudEvaluate ContraharmonicMean Casoratian CloudExport ContrastiveLossLayer Catalan CloudExpression Control CatalanNumber CloudExpressions ControlActive Catch CloudFunction ControllabilityGramian Catenate CloudGet ControllabilityMatrix CatenateLayer CloudImport ControllableDecomposition CauchyDistribution CloudLoggingData ControllableModelQ CauchyWindow CloudObject ControllerInformation CayleyGraph CloudObjects ControllerLinking CDF CloudPublish ControllerManipulate CDFDeploy CloudPut ControllerMethod CDFInformation CloudSave ControllerPath CDFWavelet CloudShare ControllerState Ceiling CloudSubmit ControlPlacement CelestialSystem CloudSymbol ControlsRendering Cell ClusterClassify ControlType CellAutoOverwrite ClusterDissimilarityFunction Convergents CellBaseline ClusteringComponents ConversionRules CellBracketOptions ClusteringTree ConvexHullMesh CellChangeTimes CMYKColor ConvolutionLayer CellContext CodeAssistOptions Convolve CellDingbat Coefficient ConwayGroupCo1 CellDynamicExpression CoefficientArrays ConwayGroupCo2 CellEditDuplicate CoefficientList ConwayGroupCo3 CellEpilog CoefficientRules CookieFunction CellEvaluationDuplicate CoifletWavelet CoordinateBoundingBox CellEvaluationFunction Collect CoordinateBoundingBoxArray CellEventActions Colon CoordinateBounds CellFrame ColorBalance CoordinateBoundsArray CellFrameColor ColorCombine CoordinateChartData CellFrameLabelMargins ColorConvert CoordinatesToolOptions CellFrameLabels ColorCoverage CoordinateTransform CellFrameMargins ColorData CoordinateTransformData CellGroup ColorDataFunction CoprimeQ CellGroupData ColorDistance Coproduct CellGrouping ColorFunction CopulaDistribution CellID ColorFunctionScaling Copyable CellLabel Colorize CopyDatabin CellLabelAutoDelete ColorNegate CopyDirectory CellMargins ColorProfileData CopyFile CellObject ColorQ CopyToClipboard CellOpen ColorQuantize CornerFilter CellPrint ColorReplace CornerNeighbors CellProlog ColorRules Correlation Cells ColorSeparate CorrelationDistance CellStyle ColorSetter CorrelationFunction CellTags ColorSlider CorrelationTest CellularAutomaton ColorSpace Cos CensoredDistribution ColorToneMapping Cosh Censoring Column CoshIntegral Center ColumnAlignments CosineDistance CenterArray ColumnLines CosineWindow CenterDot ColumnsEqual CosIntegral CentralFeature ColumnSpacings Cot CentralMoment ColumnWidths Coth CentralMomentGeneratingFunction CombinerFunction Count Cepstrogram CometData CountDistinct CepstrogramArray Commonest CountDistinctBy CepstrumArray CommonestFilter CountRoots CForm CommonName CountryData ChampernowneNumber CommonUnits Counts ChannelBase CommunityBoundaryStyle CountsBy ChannelBrokerAction CommunityGraphPlot Covariance ChannelDatabin CommunityLabels CovarianceEstimatorFunction ChannelListen CommunityRegionStyle CovarianceFunction ChannelListener CompanyData CoxianDistribution ChannelListeners CompatibleUnitQ CoxIngersollRossProcess ChannelObject CompilationOptions CoxModel ChannelPreSendFunction CompilationTarget CoxModelFit ChannelReceiverFunction Compile CramerVonMisesTest ChannelSend Compiled CreateArchive ChannelSubscribers CompiledFunction CreateCellID ChanVeseBinarize Complement CreateChannel Character CompleteGraph CreateCloudExpression CharacterCounts CompleteGraphQ CreateDatabin CharacterEncoding CompleteKaryTree CreateDialog CharacteristicFunction Complex CreateDirectory CharacteristicPolynomial Complexes CreateDocument CharacterName ComplexExpand CreateFile CharacterRange ComplexInfinity CreateIntermediateDirectories Characters ComplexityFunction CreateManagedLibraryExpression ChartBaseStyle ComponentMeasurements CreateNotebook ChartElementFunction ComposeList CreatePalette ChartElements ComposeSeries CreatePermissionsGroup ChartLabels CompositeQ CreateSearchIndex ChartLayout Composition CreateUUID ChartLegends CompoundElement CreateWindow ChartStyle CompoundExpression CriterionFunction Chebyshev1FilterModel CompoundPoissonDistribution CriticalityFailureImportance Chebyshev2FilterModel CompoundPoissonProcess CriticalitySuccessImportance ChebyshevT CompoundRenewalProcess CriticalSection ChebyshevU Compress Cross Check Condition CrossEntropyLossLayer CheckAbort ConditionalExpression CrossingDetect Checkbox Conditioned CrossMatrix CheckboxBar Cone Csc ChemicalData ConfidenceLevel Csch ChessboardDistance ConfidenceRange CubeRoot ChiDistribution ConfidenceTransform Cubics ChineseRemainder ConformAudio Cuboid ChiSquareDistribution ConformImages Cumulant ChoiceButtons Congruent CumulantGeneratingFunction ChoiceDialog ConicHullRegion Cup CholeskyDecomposition Conjugate CupCap Chop ConjugateTranspose Curl ChromaticityPlot Conjunction CurrencyConvert ChromaticityPlot3D ConnectedComponents CurrentDate ChromaticPolynomial ConnectedGraphComponents CurrentImage Circle ConnectedGraphQ CurrentNotebookImage CircleDot ConnectedMeshComponents CurrentScreenImage CircleMinus ConnectLibraryCallbackFunction CurrentValue CirclePlus ConnesWindow CurvatureFlowFilter CirclePoints ConoverTest CurveClosed CircleTimes Constant Cyan CirculantGraph ConstantArray CycleGraph CircularOrthogonalMatrixDistribution ConstantArrayLayer CycleIndexPolynomial CircularQuaternionMatrixDistribution ConstantImage Cycles CircularRealMatrixDistribution ConstantPlusLayer CyclicGroup CircularSymplecticMatrixDistribution ConstantRegionQ Cyclotomic CircularUnitaryMatrixDistribution Constants Cylinder Circumsphere ConstantTimesLayer CylindricalDecomposition CityData ConstellationData ClassifierFunction Containing D DeletePermissionsKey DiscreteMaxLimit DagumDistribution DeleteSearchIndex DiscreteMinLimit DamData DeleteSmallComponents DiscretePlot DamerauLevenshteinDistance DeleteStopwords DiscretePlot3D Darker DelimitedSequence DiscreteRatio Dashed Delimiter DiscreteRiccatiSolve Dashing DelimiterFlashTime DiscreteShift Databin Delimiters DiscreteTimeModelQ DatabinAdd DeliveryFunction DiscreteUniformDistribution DatabinRemove Dendrogram DiscreteVariables Databins Denominator DiscreteWaveletData DatabinUpload DensityHistogram DiscreteWaveletPacketTransform DataDistribution DensityPlot DiscreteWaveletTransform DataRange DensityPlot3D DiscretizeGraphics DataReversed DependentVariables DiscretizeRegion Dataset Deploy Discriminant DateBounds Deployed DisjointQ Dated Depth Disjunction DateDifference DepthFirstScan Disk DatedUnit Derivative DiskMatrix DateFormat DerivativeFilter DiskSegment DateFunction DescriptorStateSpace Dispatch DateHistogram DesignMatrix DispersionEstimatorFunction DateList Det DisplayAllSteps DateListLogPlot DeviceClose DisplayEndPacket DateListPlot DeviceConfigure DisplayForm DateListStepPlot DeviceExecute DisplayFunction DateObject DeviceExecuteAsynchronous DisplayPacket DateObjectQ DeviceObject DistanceFunction DateOverlapsQ DeviceOpen DistanceMatrix DatePattern DeviceRead DistanceTransform DatePlus DeviceReadBuffer Distribute DateRange DeviceReadLatest Distributed DateReduction DeviceReadList DistributedContexts DateString DeviceReadTimeSeries DistributeDefinitions DateTicksFormat Devices DistributionChart DateValue DeviceStreams DistributionFitTest DateWithinQ DeviceWrite DistributionParameterAssumptions DaubechiesWavelet DeviceWriteBuffer DistributionParameterQ DavisDistribution DGaussianWavelet Dithering DawsonF Diagonal Div DayCount DiagonalizableMatrixQ Divide DayCountConvention DiagonalMatrix DivideBy DayHemisphere Dialog Dividers DaylightQ DialogInput Divisible DayMatchQ DialogNotebook Divisors DayName DialogProlog DivisorSigma DayNightTerminator DialogReturn DivisorSum DayPlus DialogSymbols DMSList DayRange Diamond DMSString DayRound DiamondMatrix Do DeBruijnGraph DiceDissimilarity DockedCells Decapitalize DictionaryLookup DocumentGenerator DecimalForm DictionaryWordQ DocumentGeneratorInformation DeclarePackage DifferenceDelta DocumentGenerators Decompose DifferenceQuotient DocumentNotebook DeconvolutionLayer DifferenceRoot DocumentWeightingRules Decrement DifferenceRootReduce DominantColors Decrypt Differences Dot DecryptFile DifferentialD DotDashed DedekindEta DifferentialRoot DotEqual DeepSpaceProbeData DifferentialRootReduce DotLayer Default DifferentiatorFilter Dotted DefaultAxesStyle DigitBlock DoubleBracketingBar DefaultBaseStyle DigitCharacter DoubleDownArrow DefaultBoxStyle DigitCount DoubleLeftArrow DefaultButton DigitQ DoubleLeftRightArrow DefaultDuplicateCellStyle DihedralGroup DoubleLeftTee DefaultDuration Dilation DoubleLongLeftArrow DefaultElement DimensionalCombinations DoubleLongLeftRightArrow DefaultFaceGridsStyle DimensionalMeshComponents DoubleLongRightArrow DefaultFieldHintStyle DimensionReduce DoubleRightArrow DefaultFrameStyle DimensionReducerFunction DoubleRightTee DefaultFrameTicksStyle DimensionReduction DoubleUpArrow DefaultGridLinesStyle Dimensions DoubleUpDownArrow DefaultLabelStyle DiracComb DoubleVerticalBar DefaultMenuStyle DiracDelta DownArrow DefaultNaturalLanguage DirectedEdge DownArrowBar DefaultNewCellStyle DirectedEdges DownArrowUpArrow DefaultOptions DirectedGraph DownLeftRightVector DefaultPrintPrecision DirectedGraphQ DownLeftTeeVector DefaultTicksStyle DirectedInfinity DownLeftVector DefaultTooltipStyle Direction DownLeftVectorBar Defer Directive DownRightTeeVector DefineInputStreamMethod Directory DownRightVector DefineOutputStreamMethod DirectoryName DownRightVectorBar Definition DirectoryQ Downsample Degree DirectoryStack DownTee DegreeCentrality DirichletBeta DownTeeArrow DegreeGraphDistribution DirichletCharacter DownValues DEigensystem DirichletCondition Drop DEigenvalues DirichletConvolve DropoutLayer Deinitialization DirichletDistribution DSolve Del DirichletEta DSolveValue DelaunayMesh DirichletL Dt Delayed DirichletLambda DualSystemsModel Deletable DirichletTransform DumpSave Delete DirichletWindow DuplicateFreeQ DeleteBorderComponents DisableFormatting Duration DeleteCases DiscreteChirpZTransform Dynamic DeleteChannel DiscreteConvolve DynamicEvaluationTimeout DeleteCloudExpression DiscreteDelta DynamicGeoGraphics DeleteContents DiscreteHadamardTransform DynamicImage DeleteDirectory DiscreteIndicator DynamicModule DeleteDuplicates DiscreteLimit DynamicModuleValues DeleteDuplicatesBy DiscreteLQEstimatorGains DynamicSetting DeleteFile DiscreteLQRegulatorGains DynamicWrapper DeleteMissing DiscreteLyapunovSolve DeleteObject DiscreteMarkovProcess E Encrypt EvaluationElements EarthImpactData EncryptedObject EvaluationEnvironment EarthquakeData EncryptFile EvaluationMonitor EccentricityCentrality End EvaluationNotebook Echo EndDialogPacket EvaluationObject EchoFunction EndOfBuffer Evaluator EclipseType EndOfFile EvenQ EdgeAdd EndOfLine EventData EdgeBetweennessCentrality EndOfString EventHandler EdgeCapacity EndPackage EventLabels EdgeConnectivity EngineeringForm EventSeries EdgeContract EnterExpressionPacket ExactBlackmanWindow EdgeCost EnterTextPacket ExactNumberQ EdgeCount Entity ExampleData EdgeCoverQ EntityClass Except EdgeCycleMatrix EntityClassList ExcludedForms EdgeDelete EntityCopies ExcludedLines EdgeDetect EntityGroup ExcludedPhysicalQuantities EdgeForm EntityInstance ExcludePods EdgeIndex EntityList Exclusions EdgeLabeling EntityProperties ExclusionsStyle EdgeLabels EntityProperty Exists EdgeLabelStyle EntityPropertyClass Exit EdgeList EntityStore ExoplanetData EdgeQ EntityTypeName Exp EdgeRenderingFunction EntityValue Expand EdgeRules Entropy ExpandAll EdgeShapeFunction EntropyFilter ExpandDenominator EdgeStyle Environment ExpandFileName EdgeWeight Epilog ExpandNumerator Editable EpilogFunction Expectation EditDistance Equal ExpGammaDistribution EffectiveInterest EqualTilde ExpIntegralE Eigensystem EqualTo ExpIntegralEi Eigenvalues Equilibrium ExpirationDate EigenvectorCentrality EquirippleFilterKernel Exponent Eigenvectors Equivalent ExponentFunction Element Erf ExponentialDistribution ElementData Erfc ExponentialFamily ElementwiseLayer Erfi ExponentialGeneratingFunction ElidedForms ErlangB ExponentialMovingAverage Eliminate ErlangC ExponentialPowerDistribution Ellipsoid ErlangDistribution ExponentStep EllipticE Erosion Export EllipticExp ErrorBox ExportByteArray EllipticExpPrime EscapeRadius ExportForm EllipticF EstimatedBackground ExportString EllipticFilterModel EstimatedDistribution Expression EllipticK EstimatedProcess ExpressionCell EllipticLog EstimatorGains ExpToTrig EllipticNomeQ EstimatorRegulator ExtendedGCD EllipticPi EuclideanDistance Extension EllipticTheta EulerAngles ExtentElementFunction EllipticThetaPrime EulerE ExtentMarkers EmbedCode EulerGamma ExtentSize EmbeddedHTML EulerianGraphQ ExternalBundle EmbeddedService EulerMatrix ExternalEvaluate EmbeddingLayer EulerPhi ExternalOptions EmitSound Evaluatable ExternalSessionObject EmpiricalDistribution Evaluate ExternalSessions EmptyGraphQ EvaluatePacket ExternalTypeSignature EmptyRegion EvaluationBox Extract Enabled EvaluationCell ExtractArchive Encode EvaluationData ExtremeValueDistribution FaceForm FindFaces FormatType FaceGrids FindFile FormBox FaceGridsStyle FindFit FormBoxOptions Factor FindFormula FormControl Factorial FindFundamentalCycles FormFunction Factorial2 FindGeneratingFunction FormLayoutFunction FactorialMoment FindGeoLocation FormObject FactorialMomentGeneratingFunction FindGeometricTransform FormPage FactorialPower FindGraphCommunities FormulaData FactorInteger FindGraphIsomorphism FormulaLookup FactorList FindGraphPartition FortranForm FactorSquareFree FindHamiltonianCycle Forward FactorSquareFreeList FindHamiltonianPath ForwardBackward FactorTerms FindHiddenMarkovStates 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 FindMaximum FourierSequenceTransform FeatureExtractorFunction FindMaximumFlow FourierSeries FeatureNames FindMaxValue FourierSinCoefficient FeatureNearest FindMeshDefects FourierSinSeries FeatureSpacePlot FindMinimum FourierSinTransform FeatureTypes FindMinimumCostFlow FourierTransform FeedbackLinearize FindMinimumCut FourierTrigSeries FeedbackSector FindMinValue FractionalBrownianMotionProcess FeedbackSectorStyle FindPath FractionalGaussianNoiseProcess FeedbackType FindPeaks FractionalPart FetalGrowthData FindPermutation FractionBox Fibonacci FindPostmanTour FractionBoxOptions Fibonorial FindProcessParameters Frame FieldCompletionFunction FindRepeat FrameBox FieldHint FindRoot FrameBoxOptions FieldHintStyle FindSequenceFunction Framed FieldMasked FindSettings FrameLabel FieldSize FindShortestPath FrameMargins File FindShortestTour FrameRate FileBaseName FindSpanningTree FrameStyle FileByteCount FindThreshold FrameTicks FileDate FindTransientRepeat FrameTicksStyle FileExistsQ FindVertexCover FRatioDistribution FileExtension FindVertexCut FrechetDistribution FileFormat FindVertexIndependentPaths FreeQ FileHash FinishDynamic FrenetSerretSystem FileNameDepth FiniteAbelianGroupCount FrequencySamplingFilterKernel FileNameDrop FiniteGroupCount FresnelC FileNameForms FiniteGroupData FresnelF FileNameJoin First FresnelG FileNames FirstCase FresnelS FileNameSetter FirstPassageTimeDistribution Friday FileNameSplit FirstPosition FrobeniusNumber FileNameTake FischerGroupFi22 FrobeniusSolve FilePrint FischerGroupFi23 FromAbsoluteTime FileSize FischerGroupFi24Prime FromCharacterCode FileSystemMap FisherHypergeometricDistribution FromCoefficientRules FileSystemScan FisherRatioTest FromContinuedFraction FileTemplate FisherZDistribution FromDigits FileTemplateApply Fit FromDMS FileType FittedModel FromEntity FilledCurve FixedOrder FromJulianDate Filling FixedPoint FromLetterNumber FillingStyle FixedPointList FromPolarCoordinates FillingTransform Flat FromRomanNumeral FilterRules Flatten FromSphericalCoordinates FinancialBond FlattenAt FromUnixTime FinancialData FlattenLayer Front FinancialDerivative FlatTopWindow FrontEndDynamicExpression FinancialIndicator FlipView FrontEndEventActions Find Floor FrontEndExecute FindArgMax FlowPolynomial FrontEndToken FindArgMin Fold FrontEndTokenExecute FindChannels FoldList Full FindClique FoldPair FullDefinition FindClusters FoldPairList FullForm FindCookies FollowRedirects FullGraphics FindCurvePath FontColor FullInformationOutputRegulator FindCycle FontFamily FullRegion FindDevices FontSize FullSimplify FindDistribution FontSlant Function FindDistributionParameters FontSubstitutions FunctionDomain FindDivisions FontTracking FunctionExpand FindEdgeCover FontVariations FunctionInterpolation FindEdgeCut FontWeight FunctionPeriod FindEdgeIndependentPaths For FunctionRange FindEulerianCycle ForAll FunctionSpace FindExternalEvaluators Format FussellVeselyImportance GaborFilter GeoGraphics GraphDifference GaborMatrix GeogravityModelData GraphDisjointUnion GaborWavelet GeoGridLines GraphDistance GainMargins GeoGridLinesStyle GraphDistanceMatrix GainPhaseMargins GeoGridPosition GraphEmbedding GalaxyData GeoGroup GraphHighlight GalleryView GeoHemisphere GraphHighlightStyle Gamma GeoHemisphereBoundary GraphHub GammaDistribution GeoHistogram Graphics GammaRegularized GeoIdentify Graphics3D GapPenalty GeoImage GraphicsColumn GARCHProcess GeoLabels GraphicsComplex GatedRecurrentLayer GeoLength GraphicsGrid Gather GeoListPlot GraphicsGroup GatherBy GeoLocation GraphicsRow GaugeFaceElementFunction GeologicalPeriodData GraphIntersection GaugeFaceStyle GeomagneticModelData GraphLayout GaugeFrameElementFunction GeoMarker GraphLinkEfficiency GaugeFrameSize GeometricBrownianMotionProcess GraphPeriphery GaugeFrameStyle GeometricDistribution GraphPlot GaugeLabels GeometricMean GraphPlot3D GaugeMarkers GeometricMeanFilter GraphPower GaugeStyle GeometricTransformation GraphPropertyDistribution GaussianFilter GeoModel GraphQ GaussianIntegers GeoNearest GraphRadius GaussianMatrix GeoPath GraphReciprocity GaussianOrthogonalMatrixDistribution GeoPosition GraphStyle GaussianSymplecticMatrixDistribution GeoPositionENU GraphUnion GaussianUnitaryMatrixDistribution GeoPositionXYZ Gray GaussianWindow GeoProjection GrayLevel GCD GeoProjectionData Greater GegenbauerC GeoRange GreaterEqual General GeoRangePadding GreaterEqualLess GeneralizedLinearModelFit GeoRegionValuePlot GreaterEqualThan GenerateAsymmetricKeyPair GeoScaleBar GreaterFullEqual GenerateConditions GeoServer GreaterGreater GeneratedCell GeoStyling GreaterLess GeneratedDocumentBinding GeoStylingImageFunction GreaterSlantEqual GenerateDocument GeoVariant GreaterThan GeneratedParameters GeoVisibleRegion GreaterTilde GenerateHTTPResponse GeoVisibleRegionBoundary Green GenerateSymmetricKey GeoWithinQ GreenFunction GeneratingFunction GeoZoomLevel Grid GeneratorDescription GestureHandler GridBox GeneratorHistoryLength Get GridDefaultElement GeneratorOutputType GetEnvironment GridGraph GenericCylindricalDecomposition Glaisher GridLines GenomeData GlobalClusteringCoefficient GridLinesStyle GenomeLookup Glow GroebnerBasis GeoAntipode GoldenAngle GroupActionBase GeoArea GoldenRatio GroupBy GeoBackground GompertzMakehamDistribution GroupCentralizer GeoBoundingBox GoodmanKruskalGamma GroupElementFromWord GeoBounds GoodmanKruskalGammaTest GroupElementPosition GeoBoundsRegion Goto GroupElementQ GeoBubbleChart Grad GroupElements GeoCenter Gradient GroupElementToWord GeoCircle GradientFilter GroupGenerators GeodesicClosing GradientOrientationFilter Groupings GeodesicDilation GrammarApply GroupMultiplicationTable GeodesicErosion GrammarRules GroupOrbits GeodesicOpening GrammarToken GroupOrder GeoDestination Graph GroupPageBreakWithin GeodesyData Graph3D GroupSetwiseStabilizer GeoDirection GraphAssortativity GroupStabilizer GeoDisk GraphAutomorphismGroup GroupStabilizerChain GeoDisplacement GraphCenter GrowCutComponents GeoDistance GraphComplement Gudermannian GeoDistanceList GraphData GuidedFilter GeoElevationData GraphDensity GumbelDistribution GeoEntities GraphDiameter HaarWavelet HessenbergDecomposition HornerForm HadamardMatrix HexadecimalCharacter HostLookup HalfLine Hexahedron HotellingTSquareDistribution HalfNormalDistribution HiddenMarkovProcess HoytDistribution HalfPlane Highlighted HTTPErrorResponse HalfSpace HighlightGraph HTTPRedirect HamiltonianGraphQ HighlightImage HTTPRequest HammingDistance HighlightMesh HTTPRequestData HammingWindow HighpassFilter HTTPResponse HandlerFunctions HigmanSimsGroupHS Hue HandlerFunctionsKeys HilbertCurve HumanGrowthData HankelH1 HilbertFilter HumpDownHump HankelH2 HilbertMatrix HumpEqual HankelMatrix Histogram HurwitzLerchPhi HankelTransform Histogram3D HurwitzZeta HannPoissonWindow HistogramDistribution HyperbolicDistribution HannWindow HistogramList HypercubeGraph HaradaNortonGroupHN HistogramTransform HyperexponentialDistribution HararyGraph HistogramTransformInterpolation Hyperfactorial HarmonicMean HistoricalPeriodData Hypergeometric0F1 HarmonicMeanFilter HitMissTransform Hypergeometric0F1Regularized HarmonicNumber HITSCentrality Hypergeometric1F1 Hash HjorthDistribution Hypergeometric1F1Regularized Haversine HodgeDual Hypergeometric2F1 HazardFunction HoeffdingD Hypergeometric2F1Regularized Head HoeffdingDTest HypergeometricDistribution HeaderLines Hold HypergeometricPFQ Heads HoldAll HypergeometricPFQRegularized HeavisideLambda HoldAllComplete HypergeometricU HeavisidePi HoldComplete Hyperlink HeavisideTheta HoldFirst Hyperplane HeldGroupHe HoldForm Hyphenation Here HoldPattern HypoexponentialDistribution HermiteDecomposition HoldRest HypothesisTestData HermiteH HolidayCalendar HermitianMatrixQ HorizontalGauge I ImageTransformation Integers IconData ImageTrim IntegerString IconRules ImageType Integrate Identity ImageValue Interactive IdentityMatrix ImageValuePositions InteractiveTradingChart If ImagingDevice Interleaving IgnoreCase ImplicitRegion InternallyBalancedDecomposition IgnoreDiacritics Implies InterpolatingFunction IgnorePunctuation Import InterpolatingPolynomial IgnoringInactive ImportByteArray Interpolation Im ImportOptions InterpolationOrder Image ImportString InterpolationPoints Image3D ImprovementImportance Interpretation Image3DProjection In InterpretationBox Image3DSlices Inactivate InterpretationBoxOptions ImageAccumulate Inactive Interpreter ImageAdd IncidenceGraph InterquartileRange ImageAdjust IncidenceList Interrupt ImageAlign IncidenceMatrix IntersectingQ ImageApply IncludeConstantBasis Intersection ImageApplyIndexed IncludeGeneratorTasks Interval ImageAspectRatio IncludeInflections IntervalIntersection ImageAssemble IncludeMetaInformation IntervalMemberQ ImageAugmentationLayer IncludePods IntervalSlider ImageCapture IncludeQuantities IntervalUnion ImageChannels IncludeWindowTimes Inverse ImageClip Increment InverseBetaRegularized ImageCollage IndefiniteMatrixQ InverseCDF ImageColorSpace IndependenceTest InverseChiSquareDistribution ImageCompose IndependentEdgeSetQ InverseContinuousWaveletTransform ImageConvolve IndependentUnit InverseDistanceTransform ImageCooccurrence IndependentVertexSetQ InverseEllipticNomeQ ImageCorners Indeterminate InverseErf ImageCorrelate IndeterminateThreshold InverseErfc ImageCorrespondingPoints Indexed InverseFourier ImageCrop IndexGraph InverseFourierCosTransform ImageData InexactNumberQ InverseFourierSequenceTransform ImageDeconvolve InfiniteLine InverseFourierSinTransform ImageDemosaic InfinitePlane InverseFourierTransform ImageDifference Infinity InverseFunction ImageDimensions Infix InverseFunctions ImageDisplacements InflationAdjust InverseGammaDistribution ImageDistance InflationMethod InverseGammaRegularized ImageEffect Information InverseGaussianDistribution ImageExposureCombine Inherited InverseGudermannian ImageFeatureTrack InheritScope InverseHankelTransform ImageFileApply InhomogeneousPoissonProcess InverseHaversine ImageFileFilter InitialEvaluationHistory InverseJacobiCD ImageFileScan Initialization InverseJacobiCN ImageFilter InitializationCell InverseJacobiCS ImageFocusCombine InitializationObjects InverseJacobiDC ImageForestingComponents InitializationValue InverseJacobiDN ImageFormattingWidth Initialize InverseJacobiDS ImageForwardTransformation Inner InverseJacobiNC ImageGraphics Inpaint InverseJacobiND ImageHistogram Input InverseJacobiNS ImageIdentify InputAliases InverseJacobiSC ImageInstanceQ InputAssumptions InverseJacobiSD ImageKeypoints InputAutoReplacements InverseJacobiSN ImageLevels InputField InverseLaplaceTransform ImageLines InputForm InverseMellinTransform ImageMargins InputNamePacket InversePermutation ImageMarker InputNotebook InverseRadon ImageMeasurements InputPacket InverseRadonTransform ImageMesh InputStream InverseSeries ImageMultiply InputString InverseSurvivalFunction ImagePad InputStringPacket InverseTransformedRegion ImagePadding Insert InverseWaveletTransform ImagePartition InsertionFunction InverseWeierstrassP ImagePeriodogram InsertLinebreaks InverseWishartMatrixDistribution ImagePerspectiveTransformation InsertResults InverseZTransform ImagePreviewFunction Inset Invisible ImageQ Insphere IPAddress ImageReflect Install IrreduciblePolynomialQ ImageResize InstallService IslandData ImageResolution InstanceNormalizationLayer IsolatingInterval ImageRestyle InString IsomorphicGraphQ ImageRotate Integer IsotopeData ImageSaliencyFilter IntegerDigits Italic ImageScaled IntegerExponent Item ImageScan IntegerLength ItemAspectRatio ImageSize IntegerName ItemSize ImageSizeAction IntegerPart ItemStyle ImageSizeMultipliers IntegerPartitions ItoProcess ImageSubtract IntegerQ ImageTake IntegerReverse 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 Key KirchhoffGraph KaiserBesselWindow KeyCollisionFunction KirchhoffMatrix KaiserWindow KeyComplement KleinInvariantJ KalmanEstimator KeyDrop KnapsackSolve KalmanFilter KeyDropFrom KnightTourGraph KarhunenLoeveDecomposition KeyExistsQ KnotData KaryTree KeyFreeQ KnownUnitQ KatzCentrality KeyIntersection KochCurve KCoreComponents KeyMap KolmogorovSmirnovTest KDistribution KeyMemberQ KroneckerDelta KEdgeConnectedComponents KeypointStrength KroneckerModelDecomposition KEdgeConnectedGraphQ Keys KroneckerProduct KelvinBei KeySelect KroneckerSymbol KelvinBer KeySort KuiperTest KelvinKei KeySortBy KumaraswamyDistribution KelvinKer KeyTake Kurtosis KendallTau KeyUnion KuwaharaFilter KendallTauTest KeyValueMap KVertexConnectedComponents KernelMixtureDistribution KeyValuePattern KVertexConnectedGraphQ KernelObject Khinchin Kernels KillProcess LABColor LeveneTest ListPickerBoxOptions Label LeviCivitaTensor ListPlay Labeled LevyDistribution ListPlot LabelingFunction LibraryDataType ListPlot3D LabelStyle LibraryFunction ListPointPlot3D LaguerreL LibraryFunctionError ListPolarPlot LakeData LibraryFunctionInformation ListQ LambdaComponents LibraryFunctionLoad ListSliceContourPlot3D LaminaData LibraryFunctionUnload ListSliceDensityPlot3D LanczosWindow LibraryLoad ListSliceVectorPlot3D LandauDistribution LibraryUnload ListStepPlot Language LiftingFilterData ListStreamDensityPlot LanguageCategory LiftingWaveletTransform ListStreamPlot LanguageData LightBlue ListSurfacePlot3D LanguageIdentify LightBrown ListVectorDensityPlot LaplaceDistribution LightCyan ListVectorPlot LaplaceTransform Lighter ListVectorPlot3D Laplacian LightGray ListZTransform LaplacianFilter LightGreen LocalAdaptiveBinarize LaplacianGaussianFilter Lighting LocalCache Large LightingAngle LocalClusteringCoefficient Larger LightMagenta LocalizeVariables Last LightOrange LocalObject Latitude LightPink LocalObjects LatitudeLongitude LightPurple LocalResponseNormalizationLayer LatticeData LightRed LocalSubmit LatticeReduce LightYellow LocalSymbol LaunchKernels Likelihood LocalTime LayeredGraphPlot Limit LocalTimeZone LayerSizeFunction LimitsPositioning LocationEquivalenceTest LCHColor LindleyDistribution LocationTest LCM Line Locator LeaderSize LinearFractionalTransform LocatorAutoCreate LeafCount LinearGradientImage LocatorPane LeapYearQ LinearizingTransformationData LocatorRegion LearningRateMultipliers LinearLayer Locked LeastSquares LinearModelFit Log LeastSquaresFilterKernel LinearOffsetFunction Log10 Left LinearProgramming Log2 LeftArrow LinearRecurrence LogBarnesG LeftArrowBar LinearSolve LogGamma LeftArrowRightArrow LinearSolveFunction LogGammaDistribution LeftDownTeeVector LineBreakChart LogicalExpand LeftDownVector LineGraph LogIntegral LeftDownVectorBar LineIndent LogisticDistribution LeftRightArrow LineIndentMaxFraction LogisticSigmoid LeftRightVector LineIntegralConvolutionPlot LogitModelFit LeftTee LineIntegralConvolutionScale LogLikelihood LeftTeeArrow LineLegend LogLinearPlot LeftTeeVector LineSpacing LogLogisticDistribution LeftTriangle LinkActivate LogLogPlot LeftTriangleBar LinkClose LogMultinormalDistribution LeftTriangleEqual LinkConnect LogNormalDistribution LeftUpDownVector LinkCreate LogPlot LeftUpTeeVector LinkFunction LogRankTest LeftUpVector LinkInterrupt LogSeriesDistribution LeftUpVectorBar LinkLaunch Longest LeftVector LinkObject LongestCommonSequence LeftVectorBar LinkPatterns LongestCommonSequencePositions LegendAppearance LinkProtocol LongestCommonSubsequence Legended LinkRankCentrality LongestCommonSubsequencePositions LegendFunction LinkRead LongestOrderedSequence LegendLabel LinkReadyQ Longitude LegendLayout Links LongLeftArrow LegendMargins LinkWrite LongLeftRightArrow LegendMarkers LiouvilleLambda LongRightArrow LegendMarkerSize List LongShortTermMemoryLayer LegendreP Listable Lookup LegendreQ ListAnimate LoopFreeGraphQ Length ListContourPlot LowerCaseQ LengthWhile ListContourPlot3D LowerLeftArrow LerchPhi ListConvolve LowerRightArrow Less ListCorrelate LowerTriangularize LessEqual ListCurvePathPlot LowpassFilter LessEqualGreater ListDeconvolve LQEstimatorGains LessEqualThan ListDensityPlot LQGRegulator LessFullEqual ListDensityPlot3D LQOutputRegulatorGains LessGreater ListFormat LQRegulatorGains LessLess ListFourierSequenceTransform LucasL LessSlantEqual ListInterpolation LuccioSamiComponents LessThan ListLineIntegralConvolutionPlot LUDecomposition LessTilde ListLinePlot LunarEclipse LetterCharacter ListLogLinearPlot LUVColor LetterCounts ListLogLogPlot LyapunovSolve LetterNumber ListLogPlot LyonsGroupLy LetterQ ListPicker Level ListPickerBox MachineNumberQ MaxLimit MinColorDistance MachinePrecision MaxMemoryUsed MinDetect Magenta MaxMixtureKernels MineralData Magnification MaxPlotPoints MinFilter Magnify MaxRecursion MinimalBy MailAddressValidation MaxStableDistribution MinimalPolynomial MailReceiverFunction MaxStepFraction MinimalStateSpaceModel MailResponseFunction MaxSteps Minimize MailSettings MaxStepSize MinimumTimeIncrement Majority MaxTrainingRounds MinIntervalSize MakeBoxes MaxValue MinkowskiQuestionMark MakeExpression MaxwellDistribution MinLimit ManagedLibraryExpressionID MaxWordGap MinMax ManagedLibraryExpressionQ McLaughlinGroupMcL MinorPlanetData MandelbrotSetBoettcher Mean Minors MandelbrotSetDistance MeanAbsoluteLossLayer MinStableDistribution MandelbrotSetIterationCount MeanClusteringCoefficient Minus MandelbrotSetMemberQ MeanDegreeConnectivity MinusPlus MandelbrotSetPlot MeanDeviation MinValue MangoldtLambda MeanFilter Missing ManhattanDistance MeanGraphDistance MissingBehavior Manipulate MeanNeighborDegree MissingDataMethod Manipulator MeanShift MissingDataRules MannedSpaceMissionData MeanShiftFilter MissingQ MannWhitneyTest MeanSquaredLossLayer MissingString MantissaExponent Median MissingStyle Manual MedianDeviation MittagLefflerE Map MedianFilter MixedGraphQ MapAll MedicalTestData MixedMagnitude MapAt Medium MixedRadix MapIndexed MeijerG MixedRadixQuantity MAProcess MeijerGReduce MixedUnit MapThread MeixnerDistribution MixtureDistribution MarchenkoPasturDistribution MellinConvolve Mod MarcumQ MellinTransform Modal MardiaCombinedTest MemberQ ModularInverse MardiaKurtosisTest MemoryAvailable ModularLambda MardiaSkewnessTest MemoryConstrained Module MarginalDistribution MemoryConstraint Modulus MarkovProcessProperties MemoryInUse MoebiusMu Masking MengerMesh Moment MatchingDissimilarity MenuCommandKey MomentConvert MatchLocalNames MenuPacket MomentEvaluate MatchQ MenuSortingValue MomentGeneratingFunction MathematicalFunctionData MenuStyle MomentOfInertia MathieuC MenuView Monday MathieuCharacteristicA Merge Monitor MathieuCharacteristicB MergingFunction MonomialList MathieuCharacteristicExponent MersennePrimeExponent MonsterGroupM MathieuCPrime MersennePrimeExponentQ MoonPhase MathieuGroupM11 Mesh MoonPosition MathieuGroupM12 MeshCellCentroid MorletWavelet MathieuGroupM22 MeshCellCount MorphologicalBinarize MathieuGroupM23 MeshCellHighlight MorphologicalBranchPoints MathieuGroupM24 MeshCellIndex MorphologicalComponents MathieuS MeshCellLabel MorphologicalEulerNumber MathieuSPrime MeshCellMarker MorphologicalGraph MathMLForm MeshCellMeasure MorphologicalPerimeter Matrices MeshCellQuality MorphologicalTransform MatrixExp MeshCells MortalityData MatrixForm MeshCellShapeFunction Most MatrixFunction MeshCellStyle MountainData MatrixLog MeshCoordinates MouseAnnotation MatrixNormalDistribution MeshFunctions MouseAppearance MatrixPlot MeshPrimitives Mouseover MatrixPower MeshQualityGoal MousePosition MatrixPropertyDistribution MeshRefinementFunction MovieData MatrixQ MeshRegion MovingAverage MatrixRank MeshRegionQ MovingMap MatrixTDistribution MeshShading MovingMedian Max MeshStyle MoyalDistribution MaxCellMeasure Message Multicolumn MaxDetect MessageDialog MultiedgeStyle MaxDuration MessageList MultigraphQ MaxExtraBandwidths MessageName Multinomial MaxExtraConditions MessagePacket MultinomialDistribution MaxFeatureDisplacement Messages MultinormalDistribution MaxFeatures MetaInformation MultiplicativeOrder MaxFilter MeteorShowerData Multiselection MaximalBy Method MultivariateHypergeometricDistribution Maximize MexicanHatWavelet MultivariatePoissonDistribution MaxItems MeyerWavelet MultivariateTDistribution MaxIterations Min N NonCommutativeMultiply NotNestedGreaterGreater NakagamiDistribution NonConstants NotNestedLessLess NameQ None NotPrecedes Names NoneTrue NotPrecedesEqual Nand NonlinearModelFit NotPrecedesSlantEqual NArgMax NonlinearStateSpaceModel NotPrecedesTilde NArgMin NonlocalMeansFilter NotReverseElement NCache NonNegative NotRightTriangle NDEigensystem NonPositive NotRightTriangleBar NDEigenvalues Nor NotRightTriangleEqual NDSolve NorlundB NotSquareSubset NDSolveValue Norm NotSquareSubsetEqual Nearest Normal NotSquareSuperset NearestFunction NormalDistribution NotSquareSupersetEqual NearestNeighborGraph Normalize NotSubset NebulaData Normalized NotSubsetEqual NeedlemanWunschSimilarity NormalizedSquaredEuclideanDistance NotSucceeds Needs NormalMatrixQ NotSucceedsEqual Negative NormalsFunction NotSucceedsSlantEqual NegativeBinomialDistribution NormFunction NotSucceedsTilde NegativeDefiniteMatrixQ Not NotSuperset NegativeMultinomialDistribution NotCongruent NotSupersetEqual NegativeSemidefiniteMatrixQ NotCupCap NotTilde NeighborhoodData NotDoubleVerticalBar NotTildeEqual NeighborhoodGraph Notebook NotTildeFullEqual Nest NotebookApply NotTildeTilde NestedGreaterGreater NotebookAutoSave NotVerticalBar NestedLessLess NotebookClose Now NestGraph NotebookDelete NoWhitespace NestList NotebookDirectory NProbability NestWhile NotebookDynamicExpression NProduct NestWhileList NotebookEvaluate NRoots NetChain NotebookEventActions NSolve NetDecoder NotebookFileName NSum NetEncoder NotebookFind NuclearExplosionData NetEvaluationMode NotebookGet NuclearReactorData NetExtract NotebookImport Null NetFoldOperator NotebookInformation NullRecords NetGraph NotebookLocate NullSpace NetInitialize NotebookObject NullWords NetMapOperator NotebookOpen Number NetModel NotebookPrint NumberCompose NetNestOperator NotebookPut NumberDecompose NetPairEmbeddingOperator NotebookRead NumberExpand NetPort Notebooks NumberFieldClassNumber NetPortGradient NotebookSave NumberFieldDiscriminant NetReplacePart NotebookSelection NumberFieldFundamentalUnits NetTrain NotebookTemplate NumberFieldIntegralBasis NeumannValue NotebookWrite NumberFieldNormRepresentatives NevilleThetaC NotElement NumberFieldRegulator NevilleThetaD NotEqualTilde NumberFieldRootsOfUnity NevilleThetaN NotExists NumberFieldSignature NevilleThetaS NotGreater NumberForm NExpectation NotGreaterEqual NumberFormat NextCell NotGreaterFullEqual NumberLinePlot NextDate NotGreaterGreater NumberMarks NextPrime NotGreaterLess NumberMultiplier NHoldAll NotGreaterSlantEqual NumberPadding NHoldFirst NotGreaterTilde NumberPoint NHoldRest Nothing NumberQ NicholsGridLines NotHumpDownHump NumberSeparator NicholsPlot NotHumpEqual NumberSigns NightHemisphere NotificationFunction NumberString NIntegrate NotLeftTriangle Numerator NMaximize NotLeftTriangleBar NumericalOrder NMaxValue NotLeftTriangleEqual NumericalSort NMinimize NotLess NumericFunction NMinValue NotLessEqual NumericQ NominalVariables NotLessFullEqual NuttallWindow NoncentralBetaDistribution NotLessGreater NyquistGridLines NoncentralChiSquareDistribution NotLessLess NyquistPlot NoncentralFRatioDistribution NotLessSlantEqual NoncentralStudentTDistribution NotLessTilde O Operate OutputControllableModelQ ObservabilityGramian OperatingSystem OutputForm ObservabilityMatrix OptimumFlowData OutputNamePacket ObservableDecomposition Optional OutputResponse ObservableModelQ OptionalElement OutputSizeLimit OceanData Options OutputStream OddQ OptionsPattern OverBar Off OptionValue OverDot Offset Or Overflow On Orange OverHat ONanGroupON Order Overlaps Once OrderDistribution Overlay OneIdentity OrderedQ Overscript Opacity Ordering OverscriptBox OpacityFunction Orderless OverscriptBoxOptions OpacityFunctionScaling OrderlessPatternSequence OverTilde OpenAppend OrnsteinUhlenbeckProcess OverVector Opener Orthogonalize OverwriteTarget OpenerView OrthogonalMatrixQ OwenT Opening Out OwnValues OpenRead Outer OpenWrite OutputControllabilityMatrix PackingMethod PermutationCyclesQ PopupView PaddedForm PermutationGroup PopupWindow Padding PermutationLength Position PaddingLayer PermutationList PositionIndex PaddingSize PermutationListQ Positive PadeApproximant PermutationMax PositiveDefiniteMatrixQ PadLeft PermutationMin PositiveSemidefiniteMatrixQ PadRight PermutationOrder PossibleZeroQ PageBreakAbove PermutationPower Postfix PageBreakBelow PermutationProduct Power PageBreakWithin PermutationReplace PowerDistribution PageFooters Permutations PowerExpand PageHeaders PermutationSupport PowerMod PageRankCentrality Permute PowerModList PageTheme PeronaMalikFilter PowerRange PageWidth PersistenceLocation PowerSpectralDensity Pagination PersistenceTime PowersRepresentations PairedBarChart PersistentObject PowerSymmetricPolynomial PairedHistogram PersistentObjects PrecedenceForm PairedSmoothHistogram PersistentValue Precedes PairedTTest PersonData PrecedesEqual PairedZTest PERTDistribution PrecedesSlantEqual PaletteNotebook PetersenGraph PrecedesTilde PalindromeQ PhaseMargins Precision Pane PhaseRange PrecisionGoal Panel PhysicalSystemData PreDecrement Paneled Pi Predict PaneSelector Pick PredictorFunction ParabolicCylinderD PIDData PredictorInformation ParagraphIndent PIDDerivativeFilter PredictorMeasurements ParagraphSpacing PIDFeedforward PredictorMeasurementsObject ParallelArray PIDTune PreemptProtect ParallelCombine Piecewise Prefix ParallelDo PiecewiseExpand PreIncrement Parallelepiped PieChart Prepend ParallelEvaluate PieChart3D PrependTo Parallelization PillaiTrace PreprocessingRules Parallelize PillaiTraceTest PreserveColor ParallelMap PingTime PreserveImageOptions ParallelNeeds Pink PreviousCell Parallelogram PixelConstrained PreviousDate ParallelProduct PixelValue PriceGraphDistribution ParallelSubmit PixelValuePositions Prime ParallelSum Placed PrimeNu ParallelTable Placeholder PrimeOmega ParallelTry PlaceholderReplace PrimePi ParameterEstimator Plain PrimePowerQ ParameterMixtureDistribution PlanarGraph PrimeQ ParametricFunction PlanarGraphQ Primes ParametricNDSolve PlanckRadiationLaw PrimeZetaP ParametricNDSolveValue PlaneCurveData PrimitivePolynomialQ ParametricPlot PlanetaryMoonData PrimitiveRoot ParametricPlot3D PlanetData PrimitiveRootList ParametricRegion PlantData PrincipalComponents ParentBox Play PrincipalValue ParentCell PlayRange Print ParentDirectory Plot PrintableASCIIQ ParentNotebook Plot3D PrintingStyleEnvironment ParetoDistribution PlotLabel Printout3D ParkData PlotLabels Printout3DPreviewer Part PlotLayout PrintTemporary PartBehavior PlotLegends Prism PartialCorrelationFunction PlotMarkers PrivateCellOptions ParticleAcceleratorData PlotPoints PrivateFontOptions ParticleData PlotRange PrivateKey Partition PlotRangeClipping PrivateNotebookOptions PartitionGranularity PlotRangePadding Probability PartitionsP PlotRegion ProbabilityDistribution PartitionsQ PlotStyle ProbabilityPlot PartLayer PlotTheme ProbabilityScalePlot PartOfSpeech Pluralize ProbitModelFit PartProtection Plus ProcessConnection ParzenWindow PlusMinus ProcessDirectory PascalDistribution Pochhammer ProcessEnvironment PassEventsDown PodStates Processes PassEventsUp PodWidth ProcessEstimator Paste Point ProcessInformation PasteButton PointFigureChart ProcessObject Path PointLegend ProcessParameterAssumptions PathGraph PointSize ProcessParameterQ PathGraphQ PoissonConsulDistribution ProcessStatus Pattern PoissonDistribution Product PatternSequence PoissonProcess ProductDistribution PatternTest PoissonWindow ProductLog PauliMatrix PolarAxes ProgressIndicator PaulWavelet PolarAxesOrigin Projection Pause PolarGridLines Prolog PDF PolarPlot Properties PeakDetect PolarTicks Property PeanoCurve PoleZeroMarkers PropertyList PearsonChiSquareTest PolyaAeppliDistribution PropertyValue PearsonCorrelationTest PolyGamma Proportion PearsonDistribution Polygon Proportional PerfectNumber PolygonalNumber Protect PerfectNumberQ PolyhedronData Protected PerformanceGoal PolyLog ProteinData Perimeter PolynomialExtendedGCD Pruning PeriodicBoundaryCondition PolynomialGCD PseudoInverse Periodogram PolynomialLCM PsychrometricPropertyData PeriodogramArray PolynomialMod PublicKey Permanent PolynomialQ PublisherID Permissions PolynomialQuotient PulsarData PermissionsGroup PolynomialQuotientRemainder PunctuationCharacter PermissionsGroups PolynomialReduce Purple PermissionsKey PolynomialRemainder Put PermissionsKeys PoolingLayer PutAppend PermutationCycles PopupMenu Pyramid QBinomial QuantityArray QuartileDeviation QFactorial QuantityDistribution Quartiles QGamma QuantityForm QuartileSkewness QHypergeometricPFQ QuantityMagnitude Query QnDispersion QuantityQ QueueingNetworkProcess QPochhammer QuantityUnit QueueingProcess QPolyGamma QuantityVariable QueueProperties QRDecomposition QuantityVariableCanonicalUnit Quiet QuadraticIrrationalQ QuantityVariableDimensions Quit Quantile QuantityVariableIdentifier Quotient QuantilePlot QuantityVariablePhysicalQuantity QuotientRemainder Quantity Quartics RadialGradientImage RegionDistanceFunction ReturnTextPacket RadialityCentrality RegionEmbeddingDimension Reverse RadicalBox RegionEqual ReverseBiorthogonalSplineWavelet RadicalBoxOptions RegionFunction ReverseElement RadioButton RegionImage ReverseEquilibrium RadioButtonBar RegionIntersection ReverseGraph Radon RegionMeasure ReverseSort RadonTransform RegionMember ReverseUpEquilibrium RamanujanTau RegionMemberFunction RevolutionAxis RamanujanTauL RegionMoment RevolutionPlot3D RamanujanTauTheta RegionNearest RGBColor RamanujanTauZ RegionNearestFunction RiccatiSolve Ramp RegionPlot RiceDistribution RandomChoice RegionPlot3D RidgeFilter RandomColor RegionProduct RiemannR RandomComplex RegionQ RiemannSiegelTheta RandomEntity RegionResize RiemannSiegelZ RandomFunction RegionSize RiemannXi RandomGraph RegionSymmetricDifference Riffle RandomImage RegionUnion Right RandomInteger RegionWithin RightArrow RandomPermutation RegisterExternalEvaluator RightArrowBar RandomPoint RegularExpression RightArrowLeftArrow RandomPrime Regularization RightComposition RandomReal RegularlySampledQ RightCosetRepresentative RandomSample RegularPolygon RightDownTeeVector RandomSeeding ReIm RightDownVector RandomVariate RelationGraph RightDownVectorBar RandomWalkProcess ReleaseHold RightTee RandomWord ReliabilityDistribution RightTeeArrow Range ReliefImage RightTeeVector RangeFilter ReliefPlot RightTriangle RankedMax Remove RightTriangleBar RankedMin RemoveAlphaChannel RightTriangleEqual Raster RemoveAudioStream RightUpDownVector Raster3D RemoveBackground RightUpTeeVector Rasterize RemoveChannelListener RightUpVector RasterSize RemoveDiacritics RightUpVectorBar Rational RemoveInputStreamMethod RightVector Rationalize RemoveOutputStreamMethod RightVectorBar Rationals RemoveProperty RiskAchievementImportance Ratios RemoveUsers RiskReductionImportance RawBoxes RenameDirectory RogersTanimotoDissimilarity RawData RenameFile RollPitchYawAngles RayleighDistribution RenderingOptions RollPitchYawMatrix Re RenewalProcess RomanNumeral Read RenkoChart Root ReadLine RepairMesh RootApproximant ReadList Repeated RootIntervals ReadProtected RepeatedNull RootLocusPlot ReadString RepeatedTiming RootMeanSquare Real RepeatingElement RootOfUnityQ RealAbs Replace RootReduce RealBlockDiagonalForm ReplaceAll Roots RealDigits ReplaceImageValue RootSum RealExponent ReplaceList Rotate Reals ReplacePart RotateLabel RealSign ReplacePixelValue RotateLeft Reap ReplaceRepeated RotateRight RecognitionPrior ReplicateLayer RotationAction RecognitionThreshold RequiredPhysicalQuantities RotationMatrix Record Resampling RotationTransform RecordLists ResamplingAlgorithmData Round RecordSeparators ResamplingMethod RoundingRadius Rectangle Rescale Row RectangleChart RescalingTransform RowAlignments RectangleChart3D ResetDirectory RowBox RectangularRepeatingElement ReshapeLayer RowLines RecurrenceFilter Residue RowMinHeight RecurrenceTable ResizeLayer RowReduce Red Resolve RowsEqual Reduce ResourceData RowSpacings ReferenceLineStyle ResourceObject RSolve Refine ResourceRegister RSolveValue ReflectionMatrix ResourceRemove RudinShapiro ReflectionTransform ResourceSearch RudvalisGroupRu Refresh ResourceSubmit Rule RefreshRate ResourceUpdate RuleDelayed Region ResponseForm RulePlot RegionBinarize Rest Run RegionBoundary RestartInterval RunProcess RegionBounds Restricted RunThrough RegionCentroid Resultant RuntimeAttributes RegionDifference Return RuntimeOptions RegionDimension ReturnExpressionPacket RussellRaoDissimilarity RegionDisjoint ReturnPacket RegionDistance ReturnReceiptFunction SameQ Simplify StationaryDistribution SameTest Sin StationaryWaveletPacketTransform SampleDepth Sinc StationaryWaveletTransform SampledSoundFunction SinghMaddalaDistribution StatusArea SampledSoundList SingleLetterItalics StatusCentrality SampleRate SingularValueDecomposition StepMonitor SamplingPeriod SingularValueList StieltjesGamma SARIMAProcess SingularValuePlot StirlingS1 SARMAProcess Sinh StirlingS2 SASTriangle SinhIntegral StoppingPowerData SatelliteData SinIntegral StrataVariables SatisfiabilityCount SixJSymbol StratonovichProcess SatisfiabilityInstances Skeleton StreamColorFunction SatisfiableQ SkeletonTransform StreamColorFunctionScaling Saturday SkellamDistribution StreamDensityPlot Save Skewness StreamPlot SaveDefinitions SkewNormalDistribution StreamPoints SavitzkyGolayMatrix SkinStyle StreamPosition SawtoothWave Skip Streams Scale SliceContourPlot3D StreamScale Scaled SliceDensityPlot3D StreamStyle ScaleDivisions SliceDistribution String ScaleOrigin SliceVectorPlot3D StringCases ScalePadding Slider StringContainsQ ScaleRanges Slider2D StringCount ScaleRangeStyle SlideView StringDelete ScalingFunctions Slot StringDrop ScalingMatrix SlotSequence StringEndsQ ScalingTransform Small StringExpression Scan SmallCircle StringExtract ScheduledTask Smaller StringForm SchurDecomposition SmithDecomposition StringFormat ScientificForm SmithDelayCompensator StringFreeQ ScientificNotationThreshold SmithWatermanSimilarity StringInsert ScorerGi SmoothDensityHistogram StringJoin ScorerGiPrime SmoothHistogram StringLength ScorerHi SmoothHistogram3D StringMatchQ ScorerHiPrime SmoothKernelDistribution StringPadLeft ScreenStyleEnvironment SnDispersion StringPadRight ScriptBaselineShifts Snippet StringPart ScriptMinSize SocialMediaData StringPartition ScriptSizeMultipliers SocketConnect StringPosition Scrollbars SocketListen StringQ ScrollingOptions SocketListener StringRepeat ScrollPosition SocketObject StringReplace SearchAdjustment SocketOpen StringReplaceList SearchIndexObject SocketReadMessage StringReplacePart SearchIndices SocketReadyQ StringReverse SearchQueryString Sockets StringRiffle SearchResultObject SocketWaitAll StringRotateLeft Sec SocketWaitNext StringRotateRight Sech SoftmaxLayer StringSkeleton SechDistribution SokalSneathDissimilarity StringSplit SectorChart SolarEclipse StringStartsQ SectorChart3D SolarSystemFeatureData StringTake SectorOrigin SolidData StringTemplate SectorSpacing SolidRegionQ StringToByteArray SecuredAuthenticationKey Solve StringToStream SeedRandom SolveAlways StringTrim Select Sort StripBoxes Selectable SortBy StripOnInput SelectComponents Sound StripWrapperBoxes SelectedCells SoundNote StructuralImportance SelectedNotebook SoundVolume StructuredArray SelectFirst SourceLink StructuredSelection SelectionCreateCell Sow StruveH SelectionEvaluate SpaceCurveData StruveL SelectionEvaluateCreateCell Spacer Stub SelectionMove Spacings StudentTDistribution SelfLoopStyle Span Style SemanticImport SpanFromAbove StyleBox SemanticImportString SpanFromBoth StyleData SemanticInterpretation SpanFromLeft StyleDefinitions SemialgebraicComponentInstances SparseArray Subdivide SendMail SpatialGraphDistribution Subfactorial SendMessage SpatialMedian Subgraph Sequence SpatialTransformationLayer SubMinus SequenceAlignment Speak SubPlus SequenceAttentionLayer SpearmanRankTest SubresultantPolynomialRemainders SequenceCases SpearmanRho SubresultantPolynomials SequenceCount SpeciesData Subresultants SequenceFold SpecificityGoal Subscript SequenceFoldList SpectralLineData SubscriptBox SequenceHold Spectrogram SubscriptBoxOptions SequenceLastLayer SpectrogramArray Subsequences SequenceMostLayer Specularity Subset SequencePosition SpeechSynthesize SubsetEqual SequencePredict SpellingCorrection SubsetQ SequencePredictorFunction SpellingCorrectionList Subsets SequenceRestLayer SpellingOptions SubStar SequenceReverseLayer Sphere SubstitutionSystem Series SpherePoints Subsuperscript SeriesCoefficient SphericalBesselJ SubsuperscriptBox SeriesData SphericalBesselY SubsuperscriptBoxOptions ServiceConnect SphericalHankelH1 Subtract ServiceDisconnect SphericalHankelH2 SubtractFrom ServiceExecute SphericalHarmonicY Succeeds ServiceObject SphericalPlot3D SucceedsEqual SessionSubmit SphericalRegion SucceedsSlantEqual SessionTime SphericalShell SucceedsTilde Set SpheroidalEigenvalue SuchThat SetAccuracy SpheroidalJoiningFactor Sum SetAlphaChannel SpheroidalPS SumConvergence SetAttributes SpheroidalPSPrime SummationLayer SetCloudDirectory SpheroidalQS Sunday SetCookies SpheroidalQSPrime SunPosition SetDelayed SpheroidalRadialFactor Sunrise SetDirectory SpheroidalS1 Sunset SetEnvironment SpheroidalS1Prime SuperDagger SetFileDate SpheroidalS2 SuperMinus SetOptions SpheroidalS2Prime SupernovaData SetPermissions SplicedDistribution SuperPlus SetPrecision SplineClosed Superscript SetProperty SplineDegree SuperscriptBox SetSelectedNotebook SplineKnots SuperscriptBoxOptions SetSharedFunction SplineWeights Superset SetSharedVariable Split SupersetEqual SetStreamPosition SplitBy SuperStar SetSystemOptions SpokenString Surd Setter Sqrt SurfaceData SetterBar SqrtBox SurvivalDistribution Setting SqrtBoxOptions SurvivalFunction SetUsers Square SurvivalModel Shallow SquaredEuclideanDistance SurvivalModelFit ShannonWavelet SquareFreeQ SuzukiDistribution ShapiroWilkTest SquareIntersection SuzukiGroupSuz Share SquareMatrixQ SwatchLegend Sharpen SquareRepeatingElement Switch ShearingMatrix SquaresR Symbol ShearingTransform SquareSubset SymbolName ShellRegion SquareSubsetEqual SymletWavelet ShenCastanMatrix SquareSuperset Symmetric ShiftedGompertzDistribution SquareSupersetEqual SymmetricGroup ShiftRegisterSequence SquareUnion SymmetricKey Short SquareWave SymmetricMatrixQ ShortDownArrow SSSTriangle SymmetricPolynomial Shortest StabilityMargins SymmetricReduction ShortestPathFunction StabilityMarginsStyle Symmetrize ShortLeftArrow StableDistribution SymmetrizedArray ShortRightArrow Stack SymmetrizedArrayRules ShortUpArrow StackBegin SymmetrizedDependentComponents Show StackComplete SymmetrizedIndependentComponents ShowAutoSpellCheck StackedDateListPlot SymmetrizedReplacePart ShowAutoStyles StackedListPlot SynchronousInitialization ShowCellBracket StackInhibit SynchronousUpdating ShowCellLabel StadiumShape SyntaxForm ShowCellTags StandardAtmosphereData SyntaxInformation ShowCursorTracker StandardDeviation SyntaxLength ShowGroupOpener StandardDeviationFilter SyntaxPacket ShowPageBreaks StandardForm SyntaxQ ShowSelection Standardize SystemDialogInput ShowSpecialCharacters Standardized SystemInformation ShowStringCharacters StandardOceanData SystemOpen ShrinkingDelay StandbyDistribution SystemOptions SiderealTime Star SystemsModelDelay SiegelTheta StarClusterData SystemsModelDelayApproximate SiegelTukeyTest StarData SystemsModelDelete SierpinskiCurve StarGraph SystemsModelDimensions SierpinskiMesh StartExternalSession SystemsModelExtract Sign StartingStepSize SystemsModelFeedbackConnect Signature StartOfLine SystemsModelLabels SignedRankTest StartOfString SystemsModelLinearity SignedRegionDistance StartProcess SystemsModelMerge SignificanceLevel StateFeedbackGains SystemsModelOrder SignPadding StateOutputEstimator SystemsModelParallelConnect SignTest StateResponse SystemsModelSeriesConnect SimilarityRules StateSpaceModel SystemsModelStateFeedbackConnect SimpleGraph StateSpaceRealization SystemsModelVectorRelativeOrders SimpleGraphQ StateSpaceTransform Simplex StateTransformationLinearize Table ThermometerGauge ToUpperCase TableAlignments Thick Tr TableDepth Thickness Trace TableDirections Thin TraceAbove TableForm Thinning TraceBackward TableHeadings ThompsonGroupTh TraceDepth TableSpacing Thread TraceDialog TabView ThreadingLayer TraceForward TagBox ThreeJSymbol TraceOff TagBoxOptions Threshold TraceOn TaggingRules Through TraceOriginal TagSet Throw TracePrint TagSetDelayed ThueMorse TraceScan TagUnset Thumbnail TrackedSymbols Take Thursday TrackingFunction TakeDrop Ticks TracyWidomDistribution TakeLargest TicksStyle TradingChart TakeLargestBy TideData TraditionalForm TakeList Tilde TrainingProgressCheckpointing TakeSmallest TildeEqual TrainingProgressFunction TakeSmallestBy TildeFullEqual TrainingProgressReporting TakeWhile TildeTilde TransferFunctionCancel Tally TimeConstrained TransferFunctionExpand Tan TimeConstraint TransferFunctionFactor Tanh TimeDirection TransferFunctionModel TargetDevice TimeFormat TransferFunctionPoles TargetFunctions TimeGoal TransferFunctionTransform TargetUnits TimelinePlot TransferFunctionZeros TaskAbort TimeObject TransformationClass TaskExecute TimeObjectQ TransformationFunction TaskObject Times TransformationFunctions TaskRemove TimesBy TransformationMatrix TaskResume TimeSeries TransformedDistribution Tasks TimeSeriesAggregate TransformedField TaskSuspend TimeSeriesForecast TransformedProcess TaskWait TimeSeriesInsert TransformedRegion TautologyQ TimeSeriesInvertibility TransitionDirection TelegraphProcess TimeSeriesMap TransitionDuration TemplateApply TimeSeriesMapThread TransitionEffect TemplateBox TimeSeriesModel TransitiveClosureGraph TemplateBoxOptions TimeSeriesModelFit TransitiveReductionGraph TemplateExpression TimeSeriesResample Translate TemplateIf TimeSeriesRescale TranslationOptions TemplateObject TimeSeriesShift TranslationTransform TemplateSequence TimeSeriesThread Transliterate TemplateSlot TimeSeriesWindow Transparent TemplateWith TimeUsed Transpose TemporalData TimeValue TransposeLayer TemporalRegularity TimeZone TravelDirections Temporary TimeZoneConvert TravelDirectionsData TensorContract TimeZoneOffset TravelDistance TensorDimensions Timing TravelDistanceList TensorExpand Tiny TravelMethod TensorProduct TitsGroupT TravelTime TensorRank ToBoxes TreeForm TensorReduce ToCharacterCode TreeGraph TensorSymmetry ToContinuousTimeModel TreeGraphQ TensorTranspose Today TreePlot TensorWedge ToDiscreteTimeModel TrendStyle TestID ToEntity Triangle TestReport ToeplitzMatrix TriangleWave TestReportObject ToExpression TriangularDistribution TestResultObject Together TriangulateMesh Tetrahedron Toggler Trig TeXForm TogglerBar TrigExpand Text ToInvertibleTimeSeries TrigFactor TextAlignment TokenWords TrigFactorList TextCases Tolerance Trigger TextCell ToLowerCase TrigReduce TextClipboardType Tomorrow TrigToExp TextData ToNumberField TrimmedMean TextElement Tooltip TrimmedVariance TextGrid TooltipDelay TropicalStormData TextJustification TooltipStyle True TextPacket Top TrueQ TextPosition TopHatTransform TruncatedDistribution TextRecognize ToPolarCoordinates TsallisQExponentialDistribution TextSearch TopologicalSort TsallisQGaussianDistribution TextSearchReport ToRadicals TTest TextSentences ToRules Tube TextString ToSphericalCoordinates Tuesday TextStructure ToString TukeyLambdaDistribution TextTranslation Total TukeyWindow Texture TotalLayer TunnelData TextureCoordinateFunction TotalVariationFilter Tuples TextureCoordinateScaling TotalWidth TuranGraph TextWords TouchPosition TuringMachine Therefore TouchscreenAutoZoom TuttePolynomial ThermodynamicData TouchscreenControlPlacement TwoWayRule UnateQ UnitBox UpperCaseQ Uncompress UnitConvert UpperLeftArrow Undefined UnitDimensions UpperRightArrow UnderBar Unitize UpperTriangularize 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 UniformSumDistribution UpArrowDownArrow URLRead Uninstall Update URLResponseTime Union UpdateInterval URLShorten UnionPlus UpdateSearchIndex URLSubmit Unique UpDownArrow UsingFrontEnd UnitaryMatrixQ UpEquilibrium UtilityFunction ValidationLength VerifyTestAssumptions VertexQ ValidationSet VertexAdd VertexRenderingFunction ValueDimensions VertexCapacity VertexReplace ValuePreprocessingFunction VertexColors VertexShape ValueQ VertexComponent VertexShapeFunction Values VertexConnectivity VertexSize Variables VertexContract VertexStyle Variance VertexCoordinateRules VertexTextureCoordinates VarianceEquivalenceTest VertexCoordinates VertexWeight VarianceEstimatorFunction VertexCorrelationSimilarity VerticalBar VarianceGammaDistribution VertexCosineSimilarity VerticalGauge VarianceTest VertexCount VerticalSeparator VectorAngle VertexCoverQ VerticalSlider VectorColorFunction VertexDataCoordinates VerticalTilde VectorColorFunctionScaling VertexDegree ViewAngle VectorDensityPlot VertexDelete ViewCenter VectorPlot VertexDiceSimilarity ViewMatrix VectorPlot3D VertexEccentricity ViewPoint VectorPoints VertexInComponent ViewProjection VectorQ VertexInDegree ViewRange Vectors VertexIndex ViewVector VectorScale VertexJaccardSimilarity ViewVertical VectorStyle VertexLabeling Visible Vee VertexLabels Voice Verbatim VertexLabelStyle VoigtDistribution VerificationTest VertexList VolcanoData VerifyConvergence VertexNormals Volume VerifySecurityCertificates VertexOutComponent VonMisesDistribution VerifySolutions VertexOutDegree VoronoiMesh WaitAll WeierstrassHalfPeriodW1 WindowMargins WaitNext WeierstrassHalfPeriodW2 WindowMovable WakebyDistribution WeierstrassHalfPeriodW3 WindowOpacity WalleniusHypergeometricDistribution WeierstrassInvariantG2 WindowSize WaringYuleDistribution WeierstrassInvariantG3 WindowStatusArea WarpingCorrespondence WeierstrassInvariants WindowTitle WarpingDistance WeierstrassP WindowToolbars WatershedComponents WeierstrassPPrime WindSpeedData WatsonUSquareTest WeierstrassSigma WindVectorData WattsStrogatzGraphDistribution WeierstrassZeta WinsorizedMean WaveletBestBasis WeightedAdjacencyGraph WinsorizedVariance WaveletFilterCoefficients WeightedAdjacencyMatrix WishartMatrixDistribution WaveletImagePlot WeightedData With WaveletListPlot WeightedGraphQ WolframAlpha WaveletMapIndexed Weights WolframLanguageData WaveletMatrixPlot WelchWindow Word WaveletPhi WheelGraph WordBoundary WaveletPsi WhenEvent WordCharacter WaveletScale Which WordCloud WaveletScalogram While WordCount WaveletThreshold White WordCounts WeaklyConnectedComponents WhiteNoiseProcess WordData WeaklyConnectedGraphComponents WhitePoint WordDefinition WeaklyConnectedGraphQ Whitespace WordFrequency WeakStationarity WhitespaceCharacter WordFrequencyData WeatherData WhittakerM WordList WeatherForecastData WhittakerW WordOrientation WeberE WienerFilter WordSearch WebImageSearch WienerProcess WordSelectionFunction WebSearch WignerD WordSeparators Wedge WignerSemicircleDistribution WordSpacings Wednesday WikipediaData WordStem WeibullDistribution WikipediaSearch WordTranslation WeierstrassE1 WilksW WorkingPrecision WeierstrassE2 WilksWTest WrapAround WeierstrassE3 WindDirectionData Write WeierstrassEta1 WindowClickSelect WriteLine WeierstrassEta2 WindowElements WriteString WeierstrassEta3 WindowFloating Wronskian WeierstrassHalfPeriods WindowFrame XMLElement XMLTemplate Xor XMLObject Xnor XYZColor Yellow Yesterday YuleDissimilarity ZernikeR ZetaZero ZoomFactor ZeroSymmetric ZIPCodeData ZTest ZeroTest ZipfDistribution ZTransform Zeta ZoomCenter) + end + end + end +end diff --git a/lib/rouge/lexers/nix.rb b/lib/rouge/lexers/nix.rb index 32505949d8..d357068877 100644 --- a/lib/rouge/lexers/nix.rb +++ b/lib/rouge/lexers/nix.rb @@ -53,17 +53,22 @@ class Nix < RegexLexer end state :string do - rule /"/, Str::Double, :string_double_quoted - rule /''/, Str::Double, :string_indented + rule /"/, Str::Double, :double_quoted_string + rule /''/, Str::Double, :indented_string end state :string_content do + rule /\\./, Str::Escape + rule /\$\$/, Str::Escape rule /\${/, Str::Interpol, :string_interpolated_arg - mixin :escaped_sequence end - state :escaped_sequence do - rule /\\./, Str::Escape + state :indented_string_content do + rule /'''/, Str::Escape + rule /''\$/, Str::Escape + rule /\$\$/, Str::Escape + rule /''\\./, Str::Escape + rule /\${/, Str::Interpol, :string_interpolated_arg end state :string_interpolated_arg do @@ -71,13 +76,13 @@ class Nix < RegexLexer rule /}/, Str::Interpol, :pop! end - state :string_indented do - mixin :string_content + state :indented_string do + mixin :indented_string_content rule /''/, Str::Double, :pop! rule /./, Str::Double end - state :string_double_quoted do + state :double_quoted_string do mixin :string_content rule /"/, Str::Double, :pop! rule /./, Str::Double diff --git a/lib/rouge/lexers/objective_c.rb b/lib/rouge/lexers/objective_c.rb index 96ecf10765..63f23351d2 100644 --- a/lib/rouge/lexers/objective_c.rb +++ b/lib/rouge/lexers/objective_c.rb @@ -9,7 +9,7 @@ class ObjectiveC < C tag 'objective_c' title "Objective-C" desc 'an extension of C commonly used to write Apple software' - aliases 'objc' + aliases 'objc', 'obj-c', 'obj_c', 'objectivec' filenames '*.m', '*.h' mimetypes 'text/x-objective_c', 'application/x-objective_c' diff --git a/lib/rouge/lexers/perl.rb b/lib/rouge/lexers/perl.rb index 343d48c64c..2e0794e86f 100644 --- a/lib/rouge/lexers/perl.rb +++ b/lib/rouge/lexers/perl.rb @@ -10,7 +10,7 @@ class Perl < RegexLexer tag 'perl' aliases 'pl' - filenames '*.pl', '*.pm' + filenames '*.pl', '*.pm', '*.t' mimetypes 'text/x-perl', 'application/x-perl' def self.detect?(text) @@ -78,11 +78,11 @@ def self.detect?(text) rule /(?:eq|lt|gt|le|ge|ne|not|and|or|cmp)\b/, Operator::Word # common delimiters - rule %r(s/(\\\\|\\/|[^/])*/(\\\\|\\/|[^/])*/[egimosx]*), re_tok - rule %r(s!(\\\\|\\!|[^!])*!(\\\\|\\!|[^!])*![egimosx]*), re_tok - rule %r(s\\(\\\\|[^\\])*\\(\\\\|[^\\])*\\[egimosx]*), re_tok - rule %r(s@(\\\\|\\@|[^@])*@(\\\\|\\@|[^@])*@[egimosx]*), re_tok - rule %r(s%(\\\\|\\%|[^%])*%(\\\\|\\%|[^%])*%[egimosx]*), re_tok + rule %r(s/(\\\\|\\/|[^/])*/(\\\\|\\/|[^/])*/[msixpodualngc]*), re_tok + rule %r(s!(\\\\|\\!|[^!])*!(\\\\|\\!|[^!])*![msixpodualngc]*), re_tok + rule %r(s\\(\\\\|[^\\])*\\(\\\\|[^\\])*\\[msixpodualngc]*), re_tok + rule %r(s@(\\\\|\\@|[^@])*@(\\\\|\\@|[^@])*@[msixpodualngc]*), re_tok + rule %r(s%(\\\\|\\%|[^%])*%(\\\\|\\%|[^%])*%[msixpodualngc]*), re_tok # balanced delimiters rule %r(s{(\\\\|\\}|[^}])*}\s*), re_tok, :balanced_regex @@ -90,9 +90,13 @@ def self.detect?(text) rule %r(s\[(\\\\|\\\]|[^\]])*\]\s*), re_tok, :balanced_regex rule %r[s\((\\\\|\\\)|[^\)])*\)\s*], re_tok, :balanced_regex - rule %r(m?/(\\\\|\\/|[^/\n])*/[gcimosx]*), re_tok + rule %r(m?/(\\\\|\\/|[^/\n])*/[msixpodualngc]*), re_tok rule %r(m(?=[/!\\{<\[\(@%\$])), re_tok, :balanced_regex - rule %r(((?<==~)|(?<=\())\s*/(\\\\|\\/|[^/])*/[gcimosx]*), + + # Perl allows any non-whitespace character to delimit + # a regex when `m` is used. + rule %r(m(\S).*\1[msixpodualngc]*), re_tok + rule %r(((?<==~)|(?<=\())\s*/(\\\\|\\/|[^/])*/[msixpodualngc]*), re_tok, :balanced_regex rule /\s+/, Text diff --git a/lib/rouge/lexers/prolog.rb b/lib/rouge/lexers/prolog.rb index 05cf9bbf99..3792b72963 100644 --- a/lib/rouge/lexers/prolog.rb +++ b/lib/rouge/lexers/prolog.rb @@ -14,6 +14,7 @@ class Prolog < RegexLexer state :basic do rule /\s+/, Text rule /^#.*/, Comment::Single + rule /%.*/, Comment::Single rule /\/\*/, Comment::Multiline, :nested_comment rule /[\[\](){}|.,;!]/, Punctuation diff --git a/lib/rouge/lexers/python.rb b/lib/rouge/lexers/python.rb index 1f966f9eca..8225a26364 100644 --- a/lib/rouge/lexers/python.rb +++ b/lib/rouge/lexers/python.rb @@ -20,18 +20,18 @@ def self.keywords assert break continue del elif else except exec finally for global if lambda pass print raise return try while yield as with from import yield - async await + async await nonlocal ) end def self.builtins @builtins ||= %w( - __import__ abs all any apply basestring bin bool buffer + __import__ abs all any apply ascii basestring bin bool buffer bytearray bytes callable chr classmethod cmp coerce compile complex delattr dict dir divmod enumerate eval execfile exit - file filter float frozenset getattr globals hasattr hash hex id + file filter float format frozenset getattr globals hasattr hash hex id input int intern isinstance issubclass iter len list locals - long map max min next object oct open ord pow property range + long map max memoryview min next object oct open ord pow property range raw_input reduce reload repr reversed round set setattr slice sorted staticmethod str sum super tuple type unichr unicode vars xrange zip @@ -45,15 +45,21 @@ def self.builtins_pseudo def self.exceptions @exceptions ||= %w( ArithmeticError AssertionError AttributeError - BaseException DeprecationWarning EOFError EnvironmentError - Exception FloatingPointError FutureWarning GeneratorExit IOError - ImportError ImportWarning IndentationError IndexError KeyError - KeyboardInterrupt LookupError MemoryError NameError - NotImplemented NotImplementedError OSError OverflowError - OverflowWarning PendingDeprecationWarning ReferenceError - RuntimeError RuntimeWarning StandardError StopIteration - SyntaxError SyntaxWarning SystemError SystemExit TabError - TypeError UnboundLocalError UnicodeDecodeError + BaseException BlockingIOError BrokenPipeError BufferError + BytesWarning ChildProcessError ConnectionAbortedError + ConnectionError ConnectionRefusedError ConnectionResetError + DeprecationWarning EOFError EnvironmentError + Exception FileExistsError FileNotFoundError + FloatingPointError FutureWarning GeneratorExit IOError + ImportError ImportWarning IndentationError IndexError + InterruptedError IsADirectoryError KeyError KeyboardInterrupt + LookupError MemoryError ModuleNotFoundError NameError + NotADirectoryError NotImplemented NotImplementedError OSError + OverflowError OverflowWarning PendingDeprecationWarning + ProcessLookupError RecursionError ReferenceError ResourceWarning + RuntimeError RuntimeWarning StandardError StopAsyncIteration + StopIteration SyntaxError SyntaxWarning SystemError SystemExit + TabError TimeoutError TypeError UnboundLocalError UnicodeDecodeError UnicodeEncodeError UnicodeError UnicodeTranslateError UnicodeWarning UserWarning ValueError VMSError Warning WindowsError ZeroDivisionError @@ -69,13 +75,15 @@ def self.exceptions end rule /[^\S\n]+/, Text - rule /#.*$/, Comment + rule %r(#(.*)?\n?), Comment::Single rule /[\[\]{}:(),;]/, Punctuation rule /\\\n/, Text rule /\\/, Text rule /(in|is|and|or|not)\b/, Operator::Word - rule /!=|==|<<|>>|[-~+\/*%=<>&^|.]/, Operator + rule /(<<|>>|\/\/|\*\*)=?/, Operator + rule /[-~+\/*%=<>&^|@]=?|!=/, Operator + rule /\.(?![0-9])/, Operator # so it doesn't match float literals rule /(from)((?:\\\s|\s)+)(#{dotted_identifier})((?:\\\s|\s)+)(import)/ do groups Keyword::Namespace, @@ -129,12 +137,18 @@ def self.exceptions rule identifier, Name - rule /(\d+\.\d*|\d*\.\d+)(e[+-]?[0-9]+)?/i, Num::Float - rule /\d+e[+-]?[0-9]+/i, Num::Float - rule /0[0-7]+/, Num::Oct - rule /0x[a-f0-9]+/i, Num::Hex + digits = /[0-9](_?[0-9])*/ + decimal = /((#{digits})?\.#{digits}|#{digits}\.)/ + exponent = /e[+-]?#{digits}/i + rule /#{decimal}(#{exponent})?j?/i, Num::Float + rule /#{digits}#{exponent}j?/i, Num::Float + rule /#{digits}j/i, Num::Float + + rule /0b(_?[0-1])+/i, Num::Bin + rule /0o(_?[0-7])+/i, Num::Oct + rule /0x(_?[a-f0-9])+/i, Num::Hex rule /\d+L/, Num::Integer::Long - rule /\d+/, Num::Integer + rule /([1-9](_?[0-9])*|0(_?0)*)/, Num::Integer end state :funcname do diff --git a/lib/rouge/lexers/sqf.rb b/lib/rouge/lexers/sqf.rb new file mode 100644 index 0000000000..b171d1c5d6 --- /dev/null +++ b/lib/rouge/lexers/sqf.rb @@ -0,0 +1,108 @@ +# -*- coding: utf-8 -*- # + +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 + load Pathname.new(__FILE__).dirname.join("sqf/commands.rb") + @commands = self.commands + end + + state :root do + # Whitespace + rule %r"\s+", Text + + # Preprocessor instructions + rule %r"/\*.*?\*/"m, Comment::Multiline + rule %r"//.*\n", 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 diff --git a/lib/rouge/lexers/sqf/commands.rb b/lib/rouge/lexers/sqf/commands.rb new file mode 100644 index 0000000000..c90773657f --- /dev/null +++ b/lib/rouge/lexers/sqf/commands.rb @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- # +# automatically generated by `rake builtins:sqf` +module Rouge + module Lexers + class SQF < RegexLexer + def self.commands + @commands = Set.new %w( + 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 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 currenttask currenttasks currentthrowable currentvisionmode currentwaypoint currentweapon currentweaponmode currentzeroing cutobj cutrsc cuttext damage datetonumber deactivatekey debriefingtext debuglog 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 getdammage getdescription getdir getdirvisual getdlcassetsusagebyname getdlcs getdlcusagetime geteditorcamera geteditormode getenginetargetrpmrtd getfatigue getfieldmanualstartpage getforcedflagtexture getfuelcargo getgroupiconparams getgroupicons getitemcargo getmagazinecargo getmarkercolor getmarkerpos getmarkersize getmarkertype getmass getmissionconfig getmissionconfigvalue getmissionlayerentities getmodelinfo getnumber getobjectdlc getobjectmaterials getobjecttextures getobjecttype getoxygenremaining getpersonuseddlcs getpilotcameradirection getpilotcameraposition getpilotcamerarotation getpilotcameratarget getplatenumber getplayerchannel getplayerscores getplayeruid getpos getpos getposasl getposaslvisual getposaslw getposatl getposatlvisual getposvisual getposworld 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 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 markershape markersize markertext markertype 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 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 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 tostring toupper triggeractivated triggeractivation 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 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 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 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 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 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 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 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 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 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 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 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 setbleedingremaining setbrakesrtd setcamerainterest setcamuseti setcaptive setcenterofmass setcollisionlight setcombatmode setcombatmode setconvoyseparation setcuratorcameraareaceiling setcuratorcoef setcuratoreditingareatype setcuratorwaypointcost setcurrenttask setcurrentwaypoint setcustomaimcoef setcustomweightrtd setdamage setdammage setdebriefingtext setdestination setdir setdirection setdrawicon setdriveonpath setdropinterval setdynamicsimulationdistance setdynamicsimulationdistancecoef seteditormode seteditorobjectscope seteffectcondition 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 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 date daytime diag_activemissionfsms diag_activescripts diag_activesqfscripts diag_activesqsscripts 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 getclientstate getclientstatenumber getcursorobjectparams getdlcassetsusage getelevationoffset getmissiondlcs getmissionlayers getmouseposition getmusicplayedtime getobjectviewdistance getremotesensorsdisabled getresolution getshadowdistance getterraingrid gettotaldlcusagetime groupiconselectable groupiconsvisible grpnull gusts halt hasinterface hcshownbar hudmovementlevels humidity independent initambientlife is3den is3denmultiplayer isautotest isdedicated isfilepatchingenabled 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 +end diff --git a/lib/rouge/lexers/swift.rb b/lib/rouge/lexers/swift.rb index ca2fc29ef9..99893958d3 100644 --- a/lib/rouge/lexers/swift.rb +++ b/lib/rouge/lexers/swift.rb @@ -23,7 +23,7 @@ class Swift < RegexLexer ) declarations = Set.new %w( - class deinit enum extension final func import init internal lazy let optional private protocol public required static struct subscript typealias var dynamic indirect associatedtype open fileprivate + class deinit enum convenience extension final func import init internal lazy let optional private protocol public required static struct subscript typealias var dynamic indirect associatedtype open fileprivate ) constants = Set.new %w( diff --git a/lib/rouge/lexers/terraform.rb b/lib/rouge/lexers/terraform.rb new file mode 100644 index 0000000000..5b7d291f90 --- /dev/null +++ b/lib/rouge/lexers/terraform.rb @@ -0,0 +1,104 @@ +# -*- coding: utf-8 -*- # + +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 + + state :strings do + rule /\\./, Str::Escape + rule /\$\{/ do + token Keyword + push :interpolation + end + end + + state :dq do + rule /[^\\"\$]+/, Str::Double + mixin :strings + rule /"/, Str::Double, :pop! + end + + state :sq do + rule /[^\\'\$]+/, Str::Single + mixin :strings + rule /'/, Str::Single, :pop! + end + + state :heredoc do + rule /\n/, Str::Heredoc, :heredoc_nl + rule /[^$\n\$]+/, Str::Heredoc + rule /[$]/, Str::Heredoc + mixin :strings + end + + state :interpolation do + rule /\}/ do + token Keyword + pop! + end + + mixin :expression + end + + id = /[$a-z_\-][a-z0-9_\-]*/io + + state :expression do + mixin :primitives + rule /\s+/, Text + + rule %r(\+\+ | -- | ~ | && | \|\| | \\(?=\n) | << | >>>? | == | != )x, Operator + rule %r([-<>+*%&|\^/!=?:]=?), Operator + rule /[(\[,]/, Punctuation + rule /[)\].]/, 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 diff --git a/lib/rouge/lexers/vhdl.rb b/lib/rouge/lexers/vhdl.rb index 4255632ea3..9312595e5a 100644 --- a/lib/rouge/lexers/vhdl.rb +++ b/lib/rouge/lexers/vhdl.rb @@ -28,7 +28,7 @@ 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 + std_ulogic_vector string unsigned time time_vector ) end diff --git a/lib/rouge/version.rb b/lib/rouge/version.rb index 02429d7d40..dce74a76dd 100644 --- a/lib/rouge/version.rb +++ b/lib/rouge/version.rb @@ -3,6 +3,6 @@ module Rouge def self.version - "3.1.1" + "3.2.1" end end diff --git a/spec/lexers/crystal_spec.rb b/spec/lexers/crystal_spec.rb new file mode 100644 index 0000000000..6c1031b62f --- /dev/null +++ b/spec/lexers/crystal_spec.rb @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- # + +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 diff --git a/spec/lexers/jsp_spec.rb b/spec/lexers/jsp_spec.rb new file mode 100644 index 0000000000..3894b5f975 --- /dev/null +++ b/spec/lexers/jsp_spec.rb @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- # + +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 +end \ No newline at end of file diff --git a/spec/lexers/kotlin_spec.rb b/spec/lexers/kotlin_spec.rb index e7a17d8a41..5cef1c9a36 100644 --- a/spec/lexers/kotlin_spec.rb +++ b/spec/lexers/kotlin_spec.rb @@ -8,6 +8,7 @@ it 'guesses by filename' do assert_guess :filename => 'foo.kt' + assert_guess :filename => 'foo.kts' end it 'guesses by mimetype' do diff --git a/spec/lexers/mathematica_spec.rb b/spec/lexers/mathematica_spec.rb new file mode 100644 index 0000000000..5e1a138644 --- /dev/null +++ b/spec/lexers/mathematica_spec.rb @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- # + +describe Rouge::Lexers::Mathematica do + let(:subject) { Rouge::Lexers::Mathematica.new } + + describe 'guessing' do + include Support::Guessing + + it 'guesses by filename' do + assert_guess :filename => 'foo.wl' + assert_guess :filename => 'foo.m', :source => '(* Fibonacci numbers with memoization *)' + end + + it 'guesses by mimetype' do + assert_guess :mimetype => 'application/vnd.wolfram.mathematica.package' + assert_guess :mimetype => 'application/vnd.wolfram.wl' + end + end +end + diff --git a/spec/lexers/perl_spec.rb b/spec/lexers/perl_spec.rb index 71742da6a5..31ee119817 100644 --- a/spec/lexers/perl_spec.rb +++ b/spec/lexers/perl_spec.rb @@ -10,6 +10,7 @@ # *.pl needs source hints because it's also used by Prolog assert_guess :filename => 'foo.pl', :source => 'my $foo = 1' assert_guess :filename => 'foo.pm' + assert_guess :filename => 'test.t' end it 'guesses by mimetype' do diff --git a/spec/lexers/sqf_spec.rb b/spec/lexers/sqf_spec.rb new file mode 100644 index 0000000000..e3236cfbcb --- /dev/null +++ b/spec/lexers/sqf_spec.rb @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- # + +describe Rouge::Lexers::SQF do + let(:subject) { Rouge::Lexers::SQF.new } + + describe 'guessing' do + include Support::Guessing + + it 'guesses by filename' do + assert_guess :filename => 'foo.sqf' + end + end +end diff --git a/spec/lexers/terraform_spec.rb b/spec/lexers/terraform_spec.rb new file mode 100644 index 0000000000..1749cef645 --- /dev/null +++ b/spec/lexers/terraform_spec.rb @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- # + +describe Rouge::Lexers::Terraform do + let(:subject) { Rouge::Lexers::Terraform.new } + + include Support::Lexing + it 'parses a basic Terraform file' do + tokens = subject.lex('terraform {}').to_a + assert { tokens.size == 3 } + assert { tokens.first[0] == Token['Keyword'] } + end + + describe 'guessing' do + include Support::Guessing + + it 'guesses by filename' do + assert_guess :filename => 'foo.tf' + deny_guess :filename => 'foo' + end + + it 'guesses by mimetype' do + end + + it 'guesses by source' do + end + end +end diff --git a/spec/visual/samples/crystal b/spec/visual/samples/crystal new file mode 100644 index 0000000000..988753e96d --- /dev/null +++ b/spec/visual/samples/crystal @@ -0,0 +1,45 @@ +lib 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 diff --git a/spec/visual/samples/css b/spec/visual/samples/css index 0a0af14371..d76341752c 100644 --- a/spec/visual/samples/css +++ b/spec/visual/samples/css @@ -66,6 +66,7 @@ ul#nav li.new { #foo { unrecognized-prop: 1; -moz-prefixed-prop: 2; + font-size: 29px ! important; } a[target="_blank"] { diff --git a/spec/visual/samples/erb b/spec/visual/samples/erb index f29cde87bd..67ade6e4bb 100644 --- a/spec/visual/samples/erb +++ b/spec/visual/samples/erb @@ -13,6 +13,7 @@ <% end %> +<%# Sometimes you just need to use a variable or two %> <% header_tag = 'h1' %> <<%= header_tag %>> diff --git a/spec/visual/samples/haskell b/spec/visual/samples/haskell index 77c7f9df12..d30280d448 100644 --- a/spec/visual/samples/haskell +++ b/spec/visual/samples/haskell @@ -383,3 +383,12 @@ foo = replicate n '\x1f363' bar :: String bar = "\x1f389\x1f363\x1f389" + +quasi1 = [quoter|Some quoted text|] + +quasi2 = [quoter'|Some text with a | in it|] + +quasi3 = [here|Newlines +are part of +the quotation +|] diff --git a/spec/visual/samples/hcl b/spec/visual/samples/hcl new file mode 100644 index 0000000000..8ea3e4dcc2 --- /dev/null +++ b/spec/visual/samples/hcl @@ -0,0 +1 @@ +# See Terraform lexer diff --git a/spec/visual/samples/html b/spec/visual/samples/html index 2ba16e898d..d3b0cc5c8f 100644 --- a/spec/visual/samples/html +++ b/spec/visual/samples/html @@ -58,7 +58,7 @@ pre.syntax { padding: 5px; margin-top: 0px; } -
# -*- coding: utf-8 -*-
+
# -*- coding: utf-8 -*-
 """
     pocoo.pkg.core.acl
     ~~~~~~~~~~~~~~~~~~
diff --git a/spec/visual/samples/javascript b/spec/visual/samples/javascript
index 6c390c4ea8..d29fdf73d7 100644
--- a/spec/visual/samples/javascript
+++ b/spec/visual/samples/javascript
@@ -5,6 +5,8 @@ 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
 
diff --git a/spec/visual/samples/jsp b/spec/visual/samples/jsp
new file mode 100644
index 0000000000..7fda9ba54c
--- /dev/null
+++ b/spec/visual/samples/jsp
@@ -0,0 +1,142 @@
+<%@ 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!

+
+ + + + \ No newline at end of file diff --git a/spec/visual/samples/m68k b/spec/visual/samples/m68k new file mode 100644 index 0000000000..3018f846d3 --- /dev/null +++ b/spec/visual/samples/m68k @@ -0,0 +1,59 @@ +intin equ 8 ; setup some constants +ptsin equ 12 +colbit0 equ 24 +colbit1 equ 26 +colbit2 equ 28 +colbit3 equ 30 +lstlin equ 32 +lnmask equ 34 +wmode equ 36 +x1 equ 38 +y1 equ 40 +x2 equ 42 +y2 equ 44 +init equ $a000 +setpix equ $a001 +getpix equ $a002 +drwlin equ $a003 + +start: + jsr initialize + + dc.w init ; call line a init + + move.w #1,colbit0(a0) ; setup arguments to draw line + move.w #1,colbit1(a0) + move.w #1,colbit2(a0) + move.w #1,colbit3(a0) + move.w #0,lstlin(a0) + move.w #$ffff,lnmask(a0) + move.w #0,wmode(a0) + move.w #0,x1(a0) + move.w #0,y1(a0) + move.w #100,x2(a0) + move.w #100,y2(a0) + dc.w drwlin ;call line a draw line + + move.w #7,-(a7) + trap #1 ;wait keypress + addq.l #2,a7 + jsr restore + clr.l -(a7) ;call gemdos + trap #1 + +initialize: ; go into super user mode + clr.l -(a7) + move.w #32,-(a7) + trap #1 + addq.l #6,a7 + move.l d0,oldstack + rts + +restore: ; go back into user mode + move.l oldstack,-(a7) + move.w #32,-(a7) + trap #1 + addq.l #6,a7 + rts + +oldstack dc.l 0 diff --git a/spec/visual/samples/mathematica b/spec/visual/samples/mathematica new file mode 100644 index 0000000000..020beb50f5 --- /dev/null +++ b/spec/visual/samples/mathematica @@ -0,0 +1,29 @@ +(* :Title: Collatz Visualization *) +(* :Author: halirutan *) +(* :Mathematica Version: 10+ *) + +CollatzSequence::usage = "CollatzSequence[list] creates a Collatz sequence."; +CollatzSequence[list_] := Module[{memory, tmp, chain, result = Internal`Bag[]}, + memory[1] = False; + memory[n_] := (memory[n] = False; True); + + Do[ + chain = Internal`Bag[]; + tmp = l; + While[memory[tmp], + Internal`StuffBag[chain, tmp]; + tmp = If[EvenQ[tmp], tmp/2, 3 tmp + 1]; + ]; + Internal`StuffBag[chain, tmp]; + Internal`StuffBag[result, chain], + {l, list}]; + Internal`BagPart[#, All] & /@ Internal`BagPart[result, All] +]; + +Graph[ + Flatten[(Rule @@@ Partition[#, 2, 1]) & /@ + CollatzSequence[Range[50000]]], + PerformanceGoal -> "Speed", + GraphLayout -> {"PackingLayout" -> "ClosestPacking"}, + VertexStyle -> Opacity[0.2, RGBColor[44/51, 10/51, 47/255]], + EdgeStyle -> RGBColor[38/255, 139/255, 14/17]] diff --git a/spec/visual/samples/nix b/spec/visual/samples/nix index 634e223d12..83fef89e17 100644 --- a/spec/visual/samples/nix +++ b/spec/visual/samples/nix @@ -33,9 +33,12 @@ b > 10 && 42 >= 12 "this is a string" -"interpolated ${x}" +"antiquotation ${toString (x + 7)}" -"Escaped chars ${x} \n \r \t \${q}" +"escaped chars \n \r \t \q \${q}" + +''escaped chars ''\n ''\r ''\t ''\q ''' ''${q}'' +++ ''raw chars " \n \r \t \q'' # Examples from https://nixos.org/nix/manual/#idm140737318143152 @@ -43,13 +46,18 @@ b > 10 && 42 >= 12 "--with-freetype2-library=" + freetype + "/lib" -configureFlags = " - -system-zlib -system-libpng -system-libjpeg - ${if openglSupport then "-dlopen-opengl - -L${mesa}/lib -I${mesa}/include - -L${libXmu}/lib -I${libXmu}/include" else ""} - ${if threadSupport then "-thread" else "-no-thread"} -"; +configureFlags = [ + "-system-zlib" + "-system-libpng" + "-system-libjpeg" + (if threadSupport then "-thread" else "-no-thread") +] ++ stdenv.lib.optionals openglSupport [ + "-dlopen-opengl" + "-L${mesa}/lib" + "-I${mesa}/include" + "-L${libXmu}/lib" + "-I${libXmu}/include" +]; # indented string indented = '' @@ -93,15 +101,24 @@ __variable__z_ = variable-y local/file -https://nixos.org/nixos/manual/index.html -git+https://nixos.org/nixos/manual/index.html +./. # current directory -file:///tmp/nixos +/. # root directory ~ # not a path +. # not a path + / # not a path +# uri + +https://nixos.org/nixos/manual/index.html + +git+https://nixos.org/nixos/manual/index.html + +file:///tmp/nixos + # lists [ 123 ./foo.nix "abc" (f { x = y; }) ] diff --git a/spec/visual/samples/perl b/spec/visual/samples/perl index a89be5ece3..605e38e60a 100644 --- a/spec/visual/samples/perl +++ b/spec/visual/samples/perl @@ -225,4 +225,8 @@ sub foo { # operators my $moduloOperation = $totalNumber % $columns ? 1 : 0; +$moduloOperation = 2; my $addOperation = $totalNumber + $myOtherVar; + +# regexes delimited by non-standard (non-whitespace) character +if $filename and $filename =~ m,usr/share/doc/[^/]+/examples/,; diff --git a/spec/visual/samples/prolog b/spec/visual/samples/prolog index 347fd59c65..a7901c91d4 100644 --- a/spec/visual/samples/prolog +++ b/spec/visual/samples/prolog @@ -48,6 +48,10 @@ turing(Tape0, Tape) :- * This is a multiline comment. */ +% This is a single-line comment + +A is 1. % This is a trailing comment + perform(qf, Ls, Ls, Rs, Rs) :- !. perform(Q0, Ls0, Ls, Rs0, Rs) :- symbol(Rs0, Sym, RsRest), diff --git a/spec/visual/samples/python b/spec/visual/samples/python index 6e300e5e75..cbea36c3a1 100644 --- a/spec/visual/samples/python +++ b/spec/visual/samples/python @@ -113,6 +113,8 @@ def the_word_strand(): c = stror c = string +py2_long = -123L + # Python 3 def test(): @@ -123,3 +125,20 @@ def exceptions(): print("Hello") except Exception as e: print("Exception") + +# PEP 515 +integer_literals = [ + 123, -1_2_0, 0, 00, 0_0_00, 0b1, 0B1_0, 0b_1, 0b00_0, + 0o1, 0O1_2, 0O_1, 0o00_0, 0x1, 0X1_2, 0x_1, 0x00_0 +] +float_literals = [ + 0., 1., 00., 0_00., 1_0_0., 0_1., .0, + .1_2, 3.4_5, 1_2.3_4, 00_0.0_0_0, 0_0.1_2, + 0_1_2j, 0_00J, 1.2J, 0.1j, 1_0.J, + 0_00E+2_34_5, 0.e+1, 00_1.E-0_2, -100.e+20, 1e01, + 0_00E+2_34_5j, 0.e+1J, 00_1.E-0_2j, -100.e+20J 1e01j +] + +# PEP 465 +a = b @ c +x @= y diff --git a/spec/visual/samples/sqf b/spec/visual/samples/sqf new file mode 100644 index 0000000000..06241e1632 --- /dev/null +++ b/spec/visual/samples/sqf @@ -0,0 +1,50 @@ +/* + * Author: BaerMitUmlaut + * Generates and dumps a list of all currently available commands. + * List can be dumped to clipboard or global variable. + * + * Arguments: + * 0: Dump target (clipboard|var:VARNAME) + * 1: List delimiter (default: new line) + * + * Return Value: + * None + */ + +#define SORT_ASC true +#define SORT_DESC false +#define MAKE_UNIQUE(arr) (arr arrayIntersect arr) + +params [ + ["_target", "clipboard", [""]], + ["_delimiter", endl, [""]] +]; + +private _supportInfo = supportInfo ""; + +// Remove types from list +private _allCommands = _supportInfo select {_x find "t:" == -1}; + +// Sort commands into categories for processing +private _nulars = _allCommands select {_x find "n:" == 0}; +private _unaries = _allCommands select {_x find "u:" == 0}; +private _binaries = _allCommands select {_x find "b:" == 0}; + +// Remove argument types from command description +_nulars = _nulars apply {_x select [2]}; +_unaries = _unaries apply {_x select [2]}; +_unaries = _unaries apply {_x splitString " " select 0}; +_binaries = _binaries apply {_x splitString " " select 1}; + +// Merge lists +private _commandList = _nulars + _unaries + _binaries; +_commandList = MAKE_UNIQUE(_commandList); +_commandList sort SORT_ASC; + +// Dump list +if (_target find "var:" == 0) then { + missionNamespace setVariable [_target select [4], _commandList]; +} else { + _commandList = _commandList joinString _delimiter; + copyToClipboard _commandList; +}; diff --git a/spec/visual/samples/terraform b/spec/visual/samples/terraform new file mode 100644 index 0000000000..3179ba82db --- /dev/null +++ b/spec/visual/samples/terraform @@ -0,0 +1,326 @@ +# From https://github.com/terraform-providers/terraform-provider-aws/blob/master/examples/ecs-alb/main.tf + +# Specify the provider and access details +provider "aws" { + region = "${var.aws_region}" +} + +## EC2 + +### Network + +data "aws_availability_zones" "available" {} + +resource "aws_vpc" "main" { + cidr_block = "10.10.0.0/16" +} + +resource "aws_subnet" "main" { + count = "${var.az_count}" + cidr_block = "${cidrsubnet(aws_vpc.main.cidr_block, 8, count.index)}" + availability_zone = "${data.aws_availability_zones.available.names[count.index]}" + vpc_id = "${aws_vpc.main.id}" +} + +resource "aws_internet_gateway" "gw" { + vpc_id = "${aws_vpc.main.id}" +} + +resource "aws_route_table" "r" { + vpc_id = "${aws_vpc.main.id}" + + route { + cidr_block = "0.0.0.0/0" + gateway_id = "${aws_internet_gateway.gw.id}" + } +} + +resource "aws_route_table_association" "a" { + count = "${var.az_count}" + subnet_id = "${element(aws_subnet.main.*.id, count.index)}" + route_table_id = "${aws_route_table.r.id}" +} + +### Compute + +resource "aws_autoscaling_group" "app" { + name = "tf-test-asg" + vpc_zone_identifier = ["${aws_subnet.main.*.id}"] + min_size = "${var.asg_min}" + max_size = "${var.asg_max}" + desired_capacity = "${var.asg_desired}" + launch_configuration = "${aws_launch_configuration.app.name}" +} + +data "template_file" "cloud_config" { + template = "${file("${path.module}/cloud-config.yml")}" + + vars { + aws_region = "${var.aws_region}" + ecs_cluster_name = "${aws_ecs_cluster.main.name}" + ecs_log_level = "info" + ecs_agent_version = "latest" + ecs_log_group_name = "${aws_cloudwatch_log_group.ecs.name}" + } +} + +data "aws_ami" "stable_coreos" { + most_recent = true + + filter { + name = "description" + values = ["CoreOS Container Linux stable *"] + } + + filter { + name = "architecture" + values = ["x86_64"] + } + + filter { + name = "virtualization-type" + values = ["hvm"] + } + + owners = ["595879546273"] # CoreOS +} + +resource "aws_launch_configuration" "app" { + security_groups = [ + "${aws_security_group.instance_sg.id}", + ] + + key_name = "${var.key_name}" + image_id = "${data.aws_ami.stable_coreos.id}" + instance_type = "${var.instance_type}" + iam_instance_profile = "${aws_iam_instance_profile.app.name}" + user_data = "${data.template_file.cloud_config.rendered}" + associate_public_ip_address = true + + lifecycle { + create_before_destroy = true + } +} + +### Security + +resource "aws_security_group" "lb_sg" { + description = "controls access to the application ELB" + + vpc_id = "${aws_vpc.main.id}" + name = "tf-ecs-lbsg" + + ingress { + protocol = "tcp" + from_port = 80 + to_port = 80 + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + + cidr_blocks = [ + "0.0.0.0/0", + ] + } +} + +resource "aws_security_group" "instance_sg" { + description = "controls direct access to application instances" + vpc_id = "${aws_vpc.main.id}" + name = "tf-ecs-instsg" + + ingress { + protocol = "tcp" + from_port = 22 + to_port = 22 + + cidr_blocks = [ + "${var.admin_cidr_ingress}", + ] + } + + ingress { + protocol = "tcp" + from_port = 8080 + to_port = 8080 + + security_groups = [ + "${aws_security_group.lb_sg.id}", + ] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } +} + +## ECS + +resource "aws_ecs_cluster" "main" { + name = "terraform_example_ecs_cluster" +} + +data "template_file" "task_definition" { + template = "${file("${path.module}/task-definition.json")}" + + vars { + image_url = "ghost:latest" + container_name = "ghost" + log_group_region = "${var.aws_region}" + log_group_name = "${aws_cloudwatch_log_group.app.name}" + } +} + +resource "aws_ecs_task_definition" "ghost" { + family = "tf_example_ghost_td" + container_definitions = "${data.template_file.task_definition.rendered}" +} + +resource "aws_ecs_service" "test" { + name = "tf-example-ecs-ghost" + cluster = "${aws_ecs_cluster.main.id}" + task_definition = "${aws_ecs_task_definition.ghost.arn}" + desired_count = 1 + iam_role = "${aws_iam_role.ecs_service.name}" + + load_balancer { + target_group_arn = "${aws_alb_target_group.test.id}" + container_name = "ghost" + container_port = "2368" + } + + depends_on = [ + "aws_iam_role_policy.ecs_service", + "aws_alb_listener.front_end", + ] +} + +## IAM + +resource "aws_iam_role" "ecs_service" { + name = "tf_example_ecs_role" + + assume_role_policy = < mathematica_docs + + mathematica_docs.scan %r()m do |word| + p :word => word + yield word + end +end + +def mathematica_builtins_source + yield "# -*- coding: utf-8 -*- #" + yield "# automatically generated by `rake builtins:mathematica`" + yield "module Rouge" + yield " module Lexers" + yield " class Mathematica" + yield " def self.builtins" + yield " @builtins ||= Set.new %w(#{mathematica_builtins.to_a.join(' ')})" + yield " end" + yield " end" + yield " end" + yield "end" +end + +namespace :builtins do + task :mathematica do + File.open('lib/rouge/lexers/mathematica/builtins.rb', 'w') do |f| + mathematica_builtins_source do |line| + f.puts line + end + end + end +end diff --git a/tasks/sqf.rake b/tasks/sqf.rake new file mode 100644 index 0000000000..0e2f050959 --- /dev/null +++ b/tasks/sqf.rake @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- # +require 'open-uri' + +def render_sqf_commands + yield "# -*- coding: utf-8 -*- #" + yield "# automatically generated by `rake builtins:sqf`" + yield "module Rouge" + yield " module Lexers" + yield " class SQF < RegexLexer" + yield " def self.commands" + yield " @commands = Set.new %w(" + yield " #{fetch_sqf_commands().join(" ")}" + yield " )" + yield " end" + yield " end" + yield " end" + yield "end" +end + +def fetch_sqf_commands + url = "https://raw.githubusercontent.com/intercept/intercept/master/src/client/headers/client/sqf_assignments.hpp" + pattern = /(?<=\(").+?(?=")/ + + open(url) do |f| + f.read.scan(pattern) + end +end + +namespace :builtins do + task :sqf do + File.open('lib/rouge/lexers/sqf/commands.rb', 'w') do |f| + render_sqf_commands do |line| + f.puts line + end + end + end +end