Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-rouge for openSUSE:Factory checked in at 2022-04-30 22:52:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-rouge (Old) and /work/SRC/openSUSE:Factory/.rubygem-rouge.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-rouge" Sat Apr 30 22:52:45 2022 rev:17 rq:974071 version:3.28.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-rouge/rubygem-rouge.changes 2022-02-02 22:45:02.646055432 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-rouge.new.1538/rubygem-rouge.changes 2022-04-30 22:52:58.716260033 +0200 @@ -1,0 +2,6 @@ +Thu Apr 28 05:46:16 UTC 2022 - Stephan Kulow <coolo@suse.com> + +updated to version 3.28.0 + no changelog found + +------------------------------------------------------------------- Old: ---- rouge-3.27.0.gem New: ---- rouge-3.28.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-rouge.spec ++++++ --- /var/tmp/diff_new_pack.rFAp3u/_old 2022-04-30 22:52:59.416260980 +0200 +++ /var/tmp/diff_new_pack.rFAp3u/_new 2022-04-30 22:52:59.420260985 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-rouge -Version: 3.27.0 +Version: 3.28.0 Release: 0 %define mod_name rouge %define mod_full_name %{mod_name}-%{version} ++++++ rouge-3.27.0.gem -> rouge-3.28.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile new/Gemfile --- old/Gemfile 2021-12-15 16:36:24.000000000 +0100 +++ new/Gemfile 2022-02-04 00:58:13.000000000 +0100 @@ -37,5 +37,8 @@ else gem 'sinatra' end + + # Ruby 3 no longer ships with a web server + gem 'puma' if RUBY_VERSION >= '3' gem 'shotgun' end Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/demos/fluent new/lib/rouge/demos/fluent --- old/lib/rouge/demos/fluent 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rouge/demos/fluent 2022-02-04 00:58:13.000000000 +0100 @@ -0,0 +1,13 @@ +# Simple things are simple. +hello-user = Hello, {$userName}! + +# Complex things are possible. +shared-photos = + {$userName} {$photoCount -> + [one] added a new photo + *[other] added {$photoCount} new photos + } to {$userGender -> + [male] his stream + [female] her stream + *[other] their stream + }. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/demos/stan new/lib/rouge/demos/stan --- old/lib/rouge/demos/stan 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rouge/demos/stan 2022-02-04 00:58:13.000000000 +0100 @@ -0,0 +1,13 @@ +data { + int<lower=0> N; + vector[N] x; + vector[N] y; +} +parameters { + real alpha; + real beta; + real<lower=0> sigma; +} +model { + y ~ normal(alpha + beta * x, sigma); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/demos/stata new/lib/rouge/demos/stata --- old/lib/rouge/demos/stata 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rouge/demos/stata 2022-02-04 00:58:13.000000000 +0100 @@ -0,0 +1,14 @@ +* Run a series of linear regressions +sysuse auto, clear +foreach v of varlist mpg weight-turn { + regress price `v', robust +} + +regress price i.foreign +local num_obs = e(N) +global myglobal = 4 + +* Generate and manipulate variables +generate newvar1 = "string" +generate newvar2 = 34 - `num_obs' +replace newvar2 = $myglobal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/lexers/c.rb new/lib/rouge/lexers/c.rb --- old/lib/rouge/lexers/c.rb 2021-12-15 16:36:24.000000000 +0100 +++ new/lib/rouge/lexers/c.rb 2022-02-04 00:58:13.000000000 +0100 @@ -170,12 +170,22 @@ end state :macro do - # NB: pop! goes back to :bol - rule %r/\n/, Comment::Preproc, :pop! + mixin :include rule %r([^/\n\\]+), Comment::Preproc rule %r/\\./m, Comment::Preproc mixin :inline_whitespace rule %r(/), Comment::Preproc + # NB: pop! goes back to :bol + rule %r/\n/, Comment::Preproc, :pop! + end + + state :include do + rule %r/(include)(\s*)(<[^>]+>)([^\n]*)/ do + groups Comment::Preproc, Text, Comment::PreprocFile, Comment::Single + end + rule %r/(include)(\s*)("[^"]+")([^\n]*)/ do + groups Comment::Preproc, Text, Comment::PreprocFile, Comment::Single + end end state :if_0 do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/lexers/console.rb new/lib/rouge/lexers/console.rb --- old/lib/rouge/lexers/console.rb 2021-12-15 16:36:24.000000000 +0100 +++ new/lib/rouge/lexers/console.rb 2022-02-04 00:58:13.000000000 +0100 @@ -103,7 +103,7 @@ end def line_regex - /(\\.|[^\\])*?(\n|$)/m + /(.*?)(\n|$)/ end def output_lexer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/lexers/cpp.rb new/lib/rouge/lexers/cpp.rb --- old/lib/rouge/lexers/cpp.rb 2021-12-15 16:36:24.000000000 +0100 +++ new/lib/rouge/lexers/cpp.rb 2022-02-04 00:58:13.000000000 +0100 @@ -22,12 +22,14 @@ def self.keywords @keywords ||= super + Set.new(%w( - asm auto catch const_cast delete dynamic_cast explicit export friend + asm auto catch char8_t concept + consteval constexpr constinit const_cast co_await co_return co_yield + delete dynamic_cast explicit export friend mutable namespace new operator private protected public - reinterpret_cast restrict size_of static_cast this throw throws + reinterpret_cast requires restrict size_of static_cast this throw throws typeid typename using virtual final override - alignas alignof constexpr decltype noexcept static_assert + alignas alignof decltype noexcept static_assert thread_local try )) end @@ -68,7 +70,7 @@ rule %r/#{dq}[lu]*/i, Num::Integer rule %r/\bnullptr\b/, Name::Builtin rule %r/(?:u8|u|U|L)?R"([a-zA-Z0-9_{}\[\]#<>%:;.?*\+\-\/\^&|~!=,"']{,16})\(.*?\)\1"/m, Str - rule %r/::/, Operator + rule %r/(::|<=>)/, Operator end state :classname do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/lexers/cypher.rb new/lib/rouge/lexers/cypher.rb --- old/lib/rouge/lexers/cypher.rb 2021-12-15 16:36:24.000000000 +0100 +++ new/lib/rouge/lexers/cypher.rb 2022-02-04 00:58:13.000000000 +0100 @@ -45,6 +45,7 @@ state :root do rule %r/[\s]+/, Text rule %r(//.*?$), Comment::Single + rule %r(/\*), Comment::Multiline, :multiline_comments rule %r([*+\-<>=&|~%^]), Operator rule %r/[{}),;\[\]]/, Str::Symbol @@ -103,6 +104,13 @@ rule %r/'(\\\\|\\'|[^'])*'/, Str::Single rule %r/`(\\\\|\\`|[^`])*`/, Str::Backtick end + + state :multiline_comments do + rule %r(/[*]), Comment::Multiline, :multiline_comments + rule %r([*]/), Comment::Multiline, :pop! + rule %r([^/*]+), Comment::Multiline + rule %r([/*]), Comment::Multiline + end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/lexers/dart.rb new/lib/rouge/lexers/dart.rb --- old/lib/rouge/lexers/dart.rb 2021-12-15 16:36:24.000000000 +0100 +++ new/lib/rouge/lexers/dart.rb 2022-02-04 00:58:13.000000000 +0100 @@ -5,25 +5,25 @@ module Lexers class Dart < RegexLexer title "Dart" - desc "The Dart programming language (dartlang.com)" + desc "The Dart programming language (dart.dev)" tag 'dart' filenames '*.dart' mimetypes 'text/x-dart' keywords = %w( - as assert break case catch continue default do else finally for - if in is new rethrow return super switch this throw try while with + as assert await break case catch continue default do else finally for + if in is new rethrow return super switch this throw try while with yield ) declarations = %w( - abstract dynamic const external extends factory final get implements - native operator set static typedef var + abstract async dynamic const covariant external extends factory final get + implements late native on operator required set static sync typedef var ) - types = %w(bool double Dynamic enum int num Object Set String void) + types = %w(bool Comparable double Dynamic enum Function int List Map Never Null num Object Pattern Set String Symbol Type Uri void) - imports = %w(import export library part\s*of part source) + imports = %w(import deferred export library part\s*of part source) id = /[a-zA-Z_]\w*/ @@ -53,7 +53,7 @@ rule %r/(?:#{declarations.join('|')})\b/, Keyword::Declaration rule %r/(?:#{types.join('|')})\b/, Keyword::Type rule %r/(?:true|false|null)\b/, Keyword::Constant - rule %r/(?:class|interface)\b/, Keyword::Declaration, :class + rule %r/(?:class|interface|mixin)\b/, Keyword::Declaration, :class rule %r/(?:#{imports.join('|')})\b/, Keyword::Namespace, :import rule %r/(\.)(#{id})/ do groups Operator, Name::Attribute diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/lexers/fluent.rb new/lib/rouge/lexers/fluent.rb --- old/lib/rouge/lexers/fluent.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rouge/lexers/fluent.rb 2022-02-04 00:58:13.000000000 +0100 @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- # +# frozen_string_literal: true + +module Rouge + module Lexers + class Fluent < RegexLexer + title 'Fluent' + desc 'Fluent localization files' + tag 'fluent' + aliases 'ftl' + filenames '*.ftl' + + state :root do + rule %r{( *)(\=)( *)} do + groups Text::Whitespace, Punctuation, Text::Whitespace + push :template + end + + rule %r{(?:\s*\n)+}m, Text::Whitespace + rule %r{\#{1,3}(?: .*)?$}, Comment::Single + rule %r{[a-zA-Z][a-zA-Z0-9_-]*}, Name::Constant + rule %r{\-[a-zA-Z][a-zA-Z0-9_-]*}, Name::Entity + rule %r{\s*\.[a-zA-Z][a-zA-Z0-9_-]*}, Name::Attribute + rule %r{\s+(?=[^\s\.])}, Text::Whitespace, :template + end + + state :template do + rule %r{\n}m, Text::Whitespace, :pop! + rule %r{[^\{\n\}\*]+}, Text + rule %r{\{}, Punctuation, :placeable + rule %r{(?=\})}, Punctuation, :pop! + end + + state :placeable do + rule %r{\s+}m, Text::Whitespace + rule %r{\{}, Punctuation, :placeable + rule %r{\}}, Punctuation, :pop! + rule %r{\$[a-zA-Z][a-zA-Z0-9_-]*}, Name::Variable + rule %r{\-[a-zA-Z][a-zA-Z0-9_-]*}, Name::Entity + rule %r{\.[a-zA-Z][a-zA-Z0-9_-]*}, Name::Attribute + rule %r{[A-Z]+}, Name::Builtin + rule %r{[a-zA-Z][a-zA-Z0-9_-]*}, Name::Constant + rule %r{[\(\),\:]}, Punctuation + rule %r{->}, Punctuation + rule %r{\*}, Punctuation::Indicator + rule %r{\-?\d+\.\d+?}, Literal::Number::Float + rule %r{\-?\d+}, Literal::Number::Integer + rule %r{"}, Str::Double, :string + + rule %r{(\[)(\-?\d+\.\d+)(\])} do + groups Punctuation, Literal::Number::Float, Punctuation + push :template + end + + rule %r{(\[)(\-?\d+)(\])} do + groups Punctuation, Literal::Number::Integer, Punctuation + push :template + end + + rule %r{(\[)([a-zA-Z][a-zA-Z0-9_-]+)(\])} do + groups Punctuation, Str::Symbol, Punctuation + push :template + end + end + + state :string do + rule %r{\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{6}}, Str::Escape + rule %r{\\.}, Str::Escape + rule %r{[^\"\\]}, Str::Double + rule %r{"}, Str::Double, :pop! + end + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/lexers/hcl.rb new/lib/rouge/lexers/hcl.rb --- old/lib/rouge/lexers/hcl.rb 2021-12-15 16:36:24.000000000 +0100 +++ new/lib/rouge/lexers/hcl.rb 2022-02-04 00:58:13.000000000 +0100 @@ -5,6 +5,7 @@ module Lexers class Hcl < RegexLexer tag 'hcl' + filenames '*.hcl', '*.nomad' title 'Hashicorp Configuration Language' desc 'Hashicorp Configuration Language, used by Terraform and other Hashicorp tools' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/lexers/jsx.rb new/lib/rouge/lexers/jsx.rb --- old/lib/rouge/lexers/jsx.rb 2021-12-15 16:36:24.000000000 +0100 +++ new/lib/rouge/lexers/jsx.rb 2022-02-04 00:58:13.000000000 +0100 @@ -57,7 +57,7 @@ push :interpol push :expr_start end - rule %r/\w+/, Name::Attribute + rule %r/\w[\w-]*/, Name::Attribute rule %r/=/, Punctuation rule %r/(["']).*?(\1)/, Str end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/lexers/kotlin.rb new/lib/rouge/lexers/kotlin.rb --- old/lib/rouge/lexers/kotlin.rb 2021-12-15 16:36:24.000000000 +0100 +++ new/lib/rouge/lexers/kotlin.rb 2022-02-04 00:58:13.000000000 +0100 @@ -116,12 +116,14 @@ rule class_name, Name::Class rule %r'(<)', Punctuation, :generic_parameters rule %r'(reified|out|in)', Keyword - rule %r'([,:])', Punctuation + rule %r'([,:.?])', Punctuation rule %r'(\s+)', Text rule %r'(>)', Punctuation, :pop! end state :property do + rule %r'(<)', Punctuation, :generic_parameters + rule %r'(\s+)', Text rule name, Name::Property, :pop! end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/lexers/rust.rb new/lib/rouge/lexers/rust.rb --- old/lib/rouge/lexers/rust.rb 2021-12-15 16:36:24.000000000 +0100 +++ new/lib/rouge/lexers/rust.rb 2022-02-04 00:58:13.000000000 +0100 @@ -22,10 +22,13 @@ def self.keywords @keywords ||= %w( - as assert async await break crate const continue copy do drop dyn else enum extern - fail false fn for if impl let log loop macro match mod move mut priv pub pure - ref return self Self static struct super true try trait type union unsafe use - where while yield box + as async await break const continue crate dyn else enum extern false + fn for if impl in let log loop match mod move mut pub ref return self + Self static struct super trait true type unsafe use where while + abstract become box do final macro + override priv typeof unsized virtual + yield try + union ) end @@ -212,7 +215,8 @@ state :has_literals do # constants - rule %r/\b(?:true|false|nil)\b/, Keyword::Constant + rule %r/\b(?:true|false)\b/, Keyword::Constant + # characters/bytes rule %r( b?' (?: #{escapes} | [^\\] ) ' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/lexers/sparql.rb new/lib/rouge/lexers/sparql.rb --- old/lib/rouge/lexers/sparql.rb 2021-12-15 16:36:24.000000000 +0100 +++ new/lib/rouge/lexers/sparql.rb 2022-02-04 00:58:13.000000000 +0100 @@ -41,16 +41,17 @@ rule %r('''), Str::Single, :string_single_literal rule %r('), Str::Single, :string_single - rule %r([$?]\w+), Name::Variable - rule %r((\w*:)(\w+)?) do |m| + rule %r([$?][[:word:]]+), Name::Variable + rule %r(([[:word:]-]*)(:)([[:word:]-]+)?) do |m| token Name::Namespace, m[1] - token Str::Symbol, m[2] + token Operator, m[2] + token Str::Symbol, m[3] end rule %r(<[^>]*>), Name::Namespace rule %r(true|false)i, Keyword::Constant rule %r/a\b/, Keyword - rule %r([A-Z]\w+\b)i do |m| + rule %r([A-Z][[:word:]]+\b)i do |m| if self.class.builtins.include? m[0].upcase token Name::Builtin elsif self.class.keywords.include? m[0].upcase diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/lexers/stan.rb new/lib/rouge/lexers/stan.rb --- old/lib/rouge/lexers/stan.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rouge/lexers/stan.rb 2022-02-04 00:58:13.000000000 +0100 @@ -0,0 +1,451 @@ +# -*- coding: utf-8 -*- # +# frozen_string_literal: true + +module Rouge + module Lexers + class Stan < RegexLexer + title "Stan" + desc 'Stan Modeling Language (mc-stan.org)' + tag 'stan' + filenames '*.stan', '*.stanfunctions' + + # optional comment or whitespace + WS = %r((?:\s|//.*?\n|/[*].*?[*]/)+) + ID = /[a-zA-Z_][a-zA-Z0-9_]*/ + RT = /(?:(?:[a-z_]\s*(?:\[[0-9, ]\])?)\s+)*/ + OP = Regexp.new([ + # Assigment operators + "=", + + # Comparison operators + "<", "<=", ">", ">=", "==", "!=", + + # Boolean operators + "!", "&&", "\\|\\|", + + # Real-valued arithmetic operators + "\\+", "-", "\\*", "/", "\\^", + + # Transposition operator + "'", + + # Elementwise functions + "\\.\\+", "\\.-", "\\.\\*", "\\./", "\\.\\^", + + # Matrix division operators + "\\\\", + + # Compound assigment operators + "\\+=", "-=", "\\*=", "/=", "\\.\\*=", "\\./=", + + # Sampling + "~", + + # Conditional operator + "\\?", ":" + ].join("|")) + + def self.keywords + @keywords ||= Set.new %w( + if else while for break continue print reject return + ) + end + + def self.types + @types ||= Set.new %w( + int real vector ordered positive_ordered simplex unit_vector + row_vector matrix cholesky_factor_corr cholesky_factor_cov corr_matrix + cov_matrix data void complex array + ) + end + + def self.reserved + @reserved ||= Set.new [ + # Reserved words from Stan language + "for", "in", "while", "repeat", "until", "if", "then", "else", "true", + "false", "target", "functions", "model", "data", "parameters", + "quantities", "transformed", "generated", + + # Reserved names from Stan implementation + "var", "fvar", "STAN_MAJOR", "STAN_MINOR", "STAN_PATCH", + "STAN_MATH_MAJOR", "STAN_MATH_MINOR", "STAN_MATH_PATCH", + + # Reserved names from C++ + "alignas", "alignof", "and", "and_eq", "asm", "auto", "bitand", + "bitor", "bool", "break", "case", "catch", "char", "char16_t", + "char32_t", "class", "compl", "const", "constexpr", "const_cast", + "continue", "decltype", "default", "delete", "do", "double", + "dynamic_cast", "else", "enum", "explicit", "export", "extern", + "false", "float", "for", "friend", "goto", "if", "inline", "int", + "long", "mutable", "namespace", "new", "noexcept", "not", "not_eq", + "nullptr", "operator", "or", "or_eq", "private", "protected", + "public", "register", "reinterpret_cast", "return", "short", "signed", + "sizeof", "static", "static_assert", "static_cast", "struct", + "switch", "template", "this", "thread_local", "throw", "true", "try", + "typedef", "typeid", "typename", "union", "unsigned", "using", + "virtual", "void", "volatile", "wchar_t", "while", "xor", "xor_eq" + ] + end + + def self.builtin_functions + @builtin_functions ||= Set.new [ + # Integer-Valued Basic Functions + + ## Absolute functions + "abs", "int_step", + + ## Bound functions + "min", "max", + + ## Size functions + "size", + + # Real-Valued Basic Functions + + ## Log probability function + "target", "get_lp", + + ## Logical functions + "step", "is_inf", "is_nan", + + ## Step-like functions + "fabs", "fdim", "fmin", "fmax", "fmod", "floor", "ceil", "round", + "trunc", + + ## Power and logarithm functions + "sqrt", "cbrt", "square", "exp", "exp2", "log", "log2", "log10", + "pow", "inv", "inv_sqrt", "inv_square", + + ## Trigonometric functions + "hypot", "cos", "sin", "tan", "acos", "asin", "atan", "atan2", + + ## Hyperbolic trigonometric functions + "cosh", "sinh", "tanh", "acosh", "asinh", "atanh", + + ## Link functions + "logit", "inv_logit", "inv_cloglog", + + ## Probability-related functions + "erf", "erfc", "Phi", "inv_Phi", "Phi_approx", "binary_log_loss", + "owens_t", + + ## Combinatorial functions + "beta", "inc_beta", "lbeta", "tgamma", "lgamma", "digamma", + "trigamma", "lmgamma", "gamma_p", "gamma_q", + "binomial_coefficient_log", "choose", "bessel_first_kind", + "bessel_second_kind", "modified_bessel_first_kind", + "log_modified_bessel_first_kind", "modified_bessel_second_kind", + "falling_factorial", "lchoose", "log_falling_factorial", + "rising_factorial", "log_rising_factorial", + + ## Composed functions + "expm1", "fma", "multiply_log", "ldexp", "lmultiply", "log1p", + "log1m", "log1p_exp", "log1m_exp", "log_diff_exp", "log_mix", + "log_sum_exp", "log_inv_logit", "log_inv_logit_diff", + "log1m_inv_logit", + + ## Special functions + "lambert_w0", "lambert_wm1", + + # Complex-Valued Basic Functions + + ## Complex constructors and accessors + "to_complex", "get_real", "get_imag", + + ## Complex special functions + "arg", "norm", "conj", "proj", "polar", + + # Array Operations + + ## Reductions + "sum", "prod", "log_sum_exp", "mean", "variance", "sd", "distance", + "squared_distance", "quantile", + + ## Array size and dimension function + "dims", "num_elements", + + ## Array broadcasting + "rep_array", + + ## Array concatenation + "append_array", + + ## Sorting functions + "sort_asc", "sort_desc", "sort_indices_asc", "sort_indices_desc", + "rank", + + ## Reversing functions + "reverse", + + # Matrix Operations + + ## Integer-valued matrix size functions + "num_elements", "rows", "cols", + + ## Dot products and specialized products + "dot_product", "columns_dot_product", "rows_dot_product", "dot_self", + "columns_dot_self", "rows_dot_self", "tcrossprod", "crossprod", + "quad_form", "quad_form_diag", "quad_form_sym", "trace_quad_form", + "trace_gen_quad_form", "multiply_lower_tri_self_transpose", + "diag_pre_multiply", "diag_post_multiply", + + ## Broadcast functions + "rep_vector", "rep_row_vector", "rep_matrix", + "symmetrize_from_lower_tri", + + ## Diagonal matrix functions + "add_diag", "diagonal", "diag_matrix", "identity_matrix", + + ## Container construction functions + "linspaced_array", "linspaced_int_array", "linspaced_vector", + "linspaced_row_vector", "one_hot_int_array", "one_hot_array", + "one_hot_vector", "one_hot_row_vector", "ones_int_array", + "ones_array", "ones_vector", "ones_row_vector", "zeros_int_array", + "zeros_array", "zeros_vector", "zeros_row_vector", "uniform_simplex", + + ## Slicing and blocking functions + "col", "row", "block", "sub_col", "sub_row", "head", "tail", + "segment", + + ## Matrix concatenation + "append_col", "append_row", + + ## Special matrix functions + "softmax", "log_softmax", "cumulative_sum", + + ## Covariance functions + "cov_exp_quad", + + ## Linear algebra functions and solvers + "mdivide_left_tri_low", "mdivide_right_tri_low", "mdivide_left_spd", + "mdivide_right_spd", "matrix_exp", "matrix_exp_multiply", + "scale_matrix_exp_multiply", "matrix_power", "trace", "determinant", + "log_determinant", "inverse", "inverse_spd", "chol2inv", + "generalized_inverse", "eigenvalues_sym", "eigenvectors_sym", + "qr_thin_Q", "qr_thin_R", "qr_Q", "qr_R", "cholseky_decompose", + "singular_values", "svd_U", "svd_V", + + # Sparse Matrix Operations + + ## Conversion functions + "csr_extract_w", "csr_extract_v", "csr_extract_u", + "csr_to_dense_matrix", + + ## Sparse matrix arithmetic + "csr_matrix_times_vector", + + # Mixed Operations + "to_matrix", "to_vector", "to_row_vector", "to_array_2d", + "to_array_1d", + + # Higher-Order Functions + + ## Algebraic equation solver + "algebra_solver", "algebra_solver_newton", + + ## Ordinary differential equation + "ode_rk45", "ode_rk45_tol", "ode_ckrk", "ode_ckrk_tol", "ode_adams", + "ode_adams_tol", "ode_bdf", "ode_bdf_tol", "ode_adjoint_tol_ctl", + + ## 1D integrator + "integrate_1d", + + ## Reduce-sum function + "reduce_sum", "reduce_sum_static", + + ## Map-rect function + "map_rect", + + # Deprecated Functions + "integrate_ode_rk45", "integrate_ode", "integrate_ode_adams", + "integrate_ode_bdf", + + # Hidden Markov Models + "hmm_marginal", "hmm_latent_rng", "hmm_hidden_state_prob" + ] + end + + def self.distributions + @distributions ||= Set.new( + [ + # Discrete Distributions + + ## Binary Distributions + "bernoulli", "bernoulli_logit", "bernoulli_logit_glm", + + ## Bounded Discrete Distributions + "binomial", "binomial_logit", "beta_binomial", "hypergeometric", + "categorical", "categorical_logit_glm", "discrete_range", + "ordered_logistic", "ordered_logistic_glm", "ordered_probit", + + ## Unbounded Discrete Distributions + "neg_binomial", "neg_binomial_2", "neg_binomial_2_log", + "neg_binomial_2_log_glm", "poisson", "poisson_log", + "poisson_log_glm", + + ## Multivariate Discrete Distributions + "multinomial", "multinomial_logit", + + # Continuous Distributions + + ## Unbounded Continuous Distributions + "normal", "std_normal", "normal_id_glm", "exp_mod_normal", + "skew_normal", "student_t", "cauchy", "double_exponential", + "logistic", "gumbel", "skew_double_exponential", + + ## Positive Continuous Distributions + "lognormal", "chi_square", "inv_chi_square", + "scaled_inv_chi_square", "exponential", "gamma", "inv_gamma", + "weibull", "frechet", "rayleigh", + + ## Positive Lower-Bounded Distributions + "pareto", "pareto_type_2", "wiener", + + ## Continuous Distributions on [0, 1] + "beta", "beta_proportion", + + ## Circular Distributions + "von_mises", + + ## Bounded Continuous Distributions + "uniform", + + ## Distributions over Unbounded Vectors + "multi_normal", "multi_normal_prec", "multi_normal_cholesky", + "multi_gp", "multi_gp_cholesky", "multi_student_t", + "gaussian_dlm_obs", + + ## Simplex Distributions + "dirichlet", + + ## Correlation Matrix Distributions + "lkj_corr", "lkj_corr_cholesky", + + ## Covariance Matrix Distributions + "wishart", "inv_wishart" + ].product([ + "", "_lpmf", "_lupmf", "_lpdf", "_lcdf", "_lccdf", "_rng", "_log", + "_cdf_log", "_ccdf_log" + ]).map {|s| "#{s[0]}#{s[1]}"} + ) + end + + def self.constants + @constants ||= Set.new [ + # Mathematical constants + "pi", "e", "sqrt2", "log2", "log10", + + # Special values + "not_a_number", "positive_infinity", "negative_infinity", + "machine_precision" + ] + end + + state :root do + mixin :whitespace + rule %r/#include/, Comment::Preproc, :include + rule %r/#.*$/, Generic::Deleted + rule %r( + functions + |(?:transformed\s+)?data + |(?:transformed\s+)?parameters + |model + |generated\s+quantities + )x, Name::Namespace + rule %r(\{), Punctuation, :bracket_scope + mixin :scope + end + + state :include do + rule %r((\s+)(\S+)(\s*)) do |m| + token Text, m[1] + token Comment::PreprocFile, m[2] + token Text, m[3] + pop! + end + end + + state :whitespace do + rule %r(\n+)m, Text + rule %r(//(\\.|.)*?$), Comment::Single + mixin :inline_whitespace + end + + state :inline_whitespace do + rule %r([ \t\r]+), Text + rule %r(/(\\\n)?[*].*?[*](\\\n)?/)m, Comment::Multiline + end + + state :statements do + mixin :whitespace + rule %r/#include/, Comment::Preproc, :include + rule %r/#.*$/, Generic::Deleted + rule %r("), Str, :string + rule %r( + ( + ((\d+[.]\d*|[.]?\d+)e[+-]?\d+|\d*[.]\d+|\d+) + (#{WS})[+-](#{WS}) + ((\d+[.]\d*|[.]?\d+)e[+-]?\d+|\d*[.]\d+|\d+)i + ) + |((\d+[.]\d*|[.]?\d+)e[+-]?\d+|\d*[.]\d+|\d+)i + |((\d+[.]\d*|[.]?\d+)e[+-]?\d+|\d*[.]\d+) + )mx, Num::Float + rule %r/\d+/, Num::Integer + rule %r(\*/), Error + rule OP, Operator + rule %r([\[\],.;]), Punctuation + rule %r([|](?![|])), Punctuation + rule %r(T\b), Keyword::Reserved + rule %r((lower|upper)\b), Name::Attribute + rule ID do |m| + name = m[0] + + if self.class.keywords.include? name + token Keyword + elsif self.class.types.include? name + token Keyword::Type + elsif self.class.reserved.include? name + token Keyword::Reserved + else + token Name::Variable + end + end + end + + state :scope do + mixin :whitespace + rule %r( + (#{RT}) # Return type + (#{ID}) # Function name + (?=\([^;]*?\)) # Signature or arguments + )mx do |m| + recurse m[1] + + name = m[2] + if self.class.builtin_functions.include? name + token Name::Builtin, name + elsif self.class.distributions.include? name + token Name::Builtin, name + elsif self.class.constants.include? name + token Keyword::Constant + else + token Name::Function, name + end + end + rule %r(\{), Punctuation, :bracket_scope + rule %r(\(), Punctuation, :parens_scope + mixin :statements + end + + state :bracket_scope do + mixin :scope + rule %r(\}), Punctuation, :pop! + end + + state :parens_scope do + mixin :scope + rule %r(\)), Punctuation, :pop! + end + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/lexers/stata.rb new/lib/rouge/lexers/stata.rb --- old/lib/rouge/lexers/stata.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rouge/lexers/stata.rb 2022-02-04 00:58:13.000000000 +0100 @@ -0,0 +1,165 @@ +# -*- coding: utf-8 -*- # +# frozen_string_literal: true + +module Rouge + module Lexers + class Stata < RegexLexer + title "Stata" + desc "The Stata programming language (www.stata.com)" + tag 'stata' + filenames '*.do', '*.ado' + mimetypes 'application/x-stata', 'text/x-stata' + + ### + # Stata reference manual is available online at: https://www.stata.com/features/documentation/ + ### + + # Partial list of common programming and estimation commands, as of Stata 16 + # Note: not all abbreviations are included + KEYWORDS = %w( + do run include clear assert set mata log + by bys bysort cap capt capture char class classutil which cdir confirm new existence creturn + _datasignature discard di dis disp displ displa display ereturn error _estimates exit file open read write seek close query findfile fvexpand + gettoken java home heapmax java_heapmax icd9 icd9p icd10 icd10cm icd10pcs initialize javacall levelsof + tempvar tempname tempfile macro shift uniq dups retokenize clean sizeof posof + makecns matcproc marksample mark markout markin svymarkout matlist + accum define dissimilarity eigenvalues get rowjoinbyname rownames score svd symeigen dir list ren rename + more pause plugin call postfile _predict preserve restore program define drop end python qui quietly noi noisily _return return _rmcoll rmsg _robust + serset locale_functions locale_ui signestimationsample checkestimationsample sleep syntax sysdir adopath adosize + tabdisp timer tokenize trace unab unabcmd varabbrev version viewsource + window fopen fsave manage menu push stopbox + net from cd link search install sj stb ado update uninstall pwd ssc ls + using insheet outsheet mkmat svmat sum summ summarize + graph gr_edit twoway histogram kdensity spikeplot + mi miss missing var varname order compress append + gen gene gener genera generat generate egen replace duplicates + estimates nlcom lincom test testnl predict suest + _regress reg regr regre regres regress probit logit ivregress logistic svy gmm ivprobit ivtobit + bsample assert codebook collapse compare contract copy count cross datasignature d ds desc describe destring tostring + drawnorm edit encode decode erase expand export filefilter fillin format frame frget frlink gsort + import dbase delimited excel fred haver sas sasxport5 sasxport8 spss infile infix input insobs inspect ipolate isid + joinby label language labelbook lookfor memory mem merge mkdir mvencode notes obs odbc order outfile + pctile xtile _pctile putmata range recast recode rename group reshape rm rmdir sample save saveold separate shell snapshot sort split splitsample stack statsby sysuse + type unicode use varmanage vl webuse xpose zipfile + number keep tab table tabulate stset stcox tsset xtset + ) + + # Complete list of functions by name, as of Stata 16 + PRIMITIVE_FUNCTIONS = %w( + abbrev abs acos acosh age age_frac asin asinh atan atan2 atanh autocode + betaden binomial binomialp binomialtail binormal birthday bofd byteorder + c _caller cauchy cauchyden cauchytail Cdhms ceil char chi2 chi2den chi2tail Chms + chop cholesky clip Clock clock clockdiff cloglog Cmdyhms Cofc cofC Cofd cofd coleqnumb + collatorlocale collatorversion colnfreeparms colnumb colsof comb cond corr cos cosh + daily date datediff datediff_frac day det dgammapda dgammapdada dgammapdadx dgammapdxdx dhms + diag diag0cnt digamma dofb dofC dofc dofh dofm dofq dofw dofy dow doy dunnettprob e el epsdouble + epsfloat exp expm1 exponential exponentialden exponentialtail + F Fden fileexists fileread filereaderror filewrite float floor fmtwidth frval _frval Ftail + fammaden gammap gammaptail get hadamard halfyear halfyearly has_eprop hh hhC hms hofd hours + hypergeometric hypergeometricp + I ibeta ibetatail igaussian igaussianden igaussiantail indexnot inlist inrange int inv invbinomial invbinomialtail + invcauchy invcauchytail invchi2 invchi2tail invcloglog invdunnettprob invexponential invexponentialtail invF + invFtail invgammap invgammaptail invibeta invibetatail invigaussian invigaussiantail invlaplace invlaplacetail + invlogistic invlogistictail invlogit invnbinomial invnbinomialtail invnchi2 invnchi2tail invnF invnFtail invnibeta invnormal invnt invnttail + invpoisson invpoissontail invsym invt invttail invtukeyprob invweibull invweibullph invweibullphtail invweibulltail irecode islepyear issymmetric + J laplace laplaceden laplacetail ln ln1m ln1p lncauchyden lnfactorial lngamma lnigammaden lnigaussianden lniwishartden lnlaplaceden lnmvnormalden + lnnormal lnnormalden lnnormalden lnnormalden lnwishartden log log10 log1m log1p logistic logisticden logistictail logit + matmissing matrix matuniform max maxbyte maxdouble maxfloat maxint maxlong mdy mdyhms mi min minbyte mindouble minfloat minint minlong minutes + missing mm mmC mod mofd month monthly mreldif msofhours msofminutes msofseconds + nbetaden nbinomial nbinomialp nbinomialtail nchi2 nchi2den nchi2tail nextbirthday nextleapyear nF nFden nFtail nibeta + normal normalden npnchi2 npnF npnt nt ntden nttail nullmat + plural poisson poissonp poissontail previousbirthday previousleapyear qofd quarter quarterly r rbeta rbinomial rcauchy rchi2 recode + real regexm regexr regexs reldif replay return rexponential rgamma rhypergeometric rigaussian rlaplace rlogistic rnormal + round roweqnumb rownfreeparms rownumb rowsof rpoisson rt runiform runiformint rweibull rweibullph + s scalar seconds sign sin sinh smallestdouble soundex soundex_nara sqrt ss ssC strcat strdup string stritrim strlen strlower + strltrim strmatch strofreal strpos strproper strreverse strrpos strrtrim strtoname strtrim strupper subinstr subinword substr sum sweep + t tan tanh tC tc td tden th tin tm tobytes tq trace trigamma trunc ttail tukeyprob tw twithin + uchar udstrlen udsubstr uisdigit uisletter uniform ustrcompare ustrcompareex ustrfix ustrfrom ustrinvalidcnt ustrleft ustrlen ustrlower + ustrltrim ustrnormalize ustrpos ustrregexm ustrregexra ustrregexrf ustrregexs ustrreverse ustrright ustrrpos ustrrtrim ustrsortkey + ustrsortkeyex ustrtitle ustrto ustrtohex ustrtoname ustrtrim ustrunescape ustrupper ustrword ustrwordcount usubinstr usubstr + vec vecdiag week weekly weibull weibullden weibullph weibullphden weibullphtail weibulltail wofd word wordbreaklocale wordcount + year yearly yh ym yofd yq yw + ) + + # Note: types `str1-str2045` handled separately below + def self.type_keywords + @type_keywords ||= Set.new %w(byte int long float double str strL numeric string integer scalar matrix local global numlist varlist newlist) + end + + # Stata commands used with braces. Includes all valid abbreviations for 'forvalues'. + def self.reserved_keywords + @reserved_keywords ||= Set.new %w(if else foreach forv forva forval forvalu forvalue forvalues to while in of continue break nobreak) + end + + ### + # Lexer state and rules + ### + state :root do + + # Pre-processor commands: # + rule %r/^\s*#.*$/, Comment::Preproc + + # Hashbang comments: *! + rule %r/^\*!.*$/, Comment::Hashbang + + # Single-line comment: * + rule %r/^\s*\*.*$/, Comment::Single + + # Keywords: recognize only when they are the first word + rule %r/^\s*(#{KEYWORDS.join('|')})\b/, Keyword + + # Whitespace. Classify `\n` as `Text` to avoid interference with `Comment` and `Keyword` above + rule(/[ \t]+/, Text::Whitespace) + rule(/[\n\r]+/, Text) + + # In-line comment: // + rule %r/\/\/.*?$/, Comment::Single + + # Multi-line comment: /* and */ + rule %r(/(\\\n)?[*].*?[*](\\\n)?/)m, Comment::Multiline + + # Strings indicated by compound double-quotes (`""') and double-quotes ("") + rule %r/`"(\\.|.)*?"'/, Str::Double + rule %r/"(\\.|.)*?"/, Str::Double + + # Format locals (`') and globals ($) as strings + rule %r/`(\\.|.)*?'/, Str::Double + rule %r/(?<!\w)\$\w+/, Str::Double + + # Display formats + rule %r/\%\S+/, Name::Property + + # Additional string types: str1-str2045 + rule %r/\bstr(204[0-5]|20[0-3][0-9]|[01][0-9][0-9][0-9]|[0-9][0-9][0-9]|[0-9][0-9]|[1-9])\b/, Keyword::Type + + # Only recognize primitive functions when they are actually used as a function call, i.e. followed by an opening parenthesis + # `Name::Builtin` would be more logical, but is not usually highlighted, so use `Name::Function` instead + rule %r/\b(#{PRIMITIVE_FUNCTIONS.join('|')})(?=\()/, Name::Function + + # Matrix operator `..` (declare here instead of with other operators, in order to avoid conflict with numbers below) + rule %r/\.\.(?=.*\])/, Operator + + # Numbers + rule %r/[+-]?(\d+([.]\d+)?|[.]\d+)([eE][+-]?\d+)?/, Num + + # Factor variable and time series operators + rule %r/\b[ICOicoLFDSlfds]\w*\./, Operator + rule %r/\b[ICOicoLFDSlfds]\w*(?=\(.*\)\.)/, Operator + + rule %r/\w+/ do |m| + if self.class.reserved_keywords.include? m[0] + token Keyword::Reserved + elsif self.class.type_keywords.include? m[0] + token Keyword::Type + else + token Name + end + end + + rule %r/[\[\]{}();,]/, Punctuation + + rule %r([-<>?*+'^/\\!#.=~:&|]), Operator + end + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/lexers/toml.rb new/lib/rouge/lexers/toml.rb --- old/lib/rouge/lexers/toml.rb 2021-12-15 16:36:24.000000000 +0100 +++ new/lib/rouge/lexers/toml.rb 2022-02-04 00:58:13.000000000 +0100 @@ -11,14 +11,15 @@ filenames '*.toml', 'Pipfile' mimetypes 'text/x-toml' - identifier = /\S+/ + # bare keys and quoted keys + identifier = %r/(?:\S+|"[^"]+"|'[^']+')/ state :basic do rule %r/\s+/, Text rule %r/#.*?$/, Comment rule %r/(true|false)/, Keyword::Constant - rule %r/(\S+)(\s*)(=)(\s*)(\{)/ do |m| + rule %r/(#{identifier})(\s*)(=)(\s*)(\{)/ do groups Name::Namespace, Text, Operator, Text, Punctuation push :inline end @@ -48,6 +49,11 @@ state :content do mixin :basic + + rule %r/(#{identifier})(\s*)(=)/ do + groups Name::Property, Text, Punctuation + end + rule %r/"""/, Str, :mdq rule %r/"/, Str, :dq rule %r/'''/, Str, :msq @@ -95,10 +101,6 @@ state :inline do mixin :content - rule %r/(#{identifier})(\s*)(=)/ do - groups Name::Property, Text, Punctuation - end - rule %r/\}/, Punctuation, :pop! end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rouge/version.rb new/lib/rouge/version.rb --- old/lib/rouge/version.rb 2021-12-15 16:36:24.000000000 +0100 +++ new/lib/rouge/version.rb 2022-02-04 00:58:13.000000000 +0100 @@ -3,6 +3,6 @@ module Rouge def self.version - "3.27.0" + "3.28.0" end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2021-12-15 16:36:24.000000000 +0100 +++ new/metadata 2022-02-04 00:58:13.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: rouge version: !ruby/object:Gem::Version - version: 3.27.0 + version: 3.28.0 platform: ruby authors: - Jeanine Adkisson -autorequire: +autorequire: bindir: bin cert_chain: [] -date: 2021-12-15 00:00:00.000000000 Z +date: 2022-02-03 00:00:00.000000000 Z dependencies: [] description: Rouge aims to a be a simple, easy-to-extend drop-in replacement for pygments. email: @@ -80,6 +80,7 @@ - lib/rouge/demos/erlang - lib/rouge/demos/escape - lib/rouge/demos/factor +- lib/rouge/demos/fluent - lib/rouge/demos/fortran - lib/rouge/demos/freefem - lib/rouge/demos/fsharp @@ -199,6 +200,8 @@ - lib/rouge/demos/sqf - lib/rouge/demos/sql - lib/rouge/demos/ssh +- lib/rouge/demos/stan +- lib/rouge/demos/stata - lib/rouge/demos/supercollider - lib/rouge/demos/swift - lib/rouge/demos/systemd @@ -309,6 +312,7 @@ - lib/rouge/lexers/erlang.rb - lib/rouge/lexers/escape.rb - lib/rouge/lexers/factor.rb +- lib/rouge/lexers/fluent.rb - lib/rouge/lexers/fortran.rb - lib/rouge/lexers/freefem.rb - lib/rouge/lexers/fsharp.rb @@ -440,6 +444,8 @@ - lib/rouge/lexers/sqf/keywords.rb - lib/rouge/lexers/sql.rb - lib/rouge/lexers/ssh.rb +- lib/rouge/lexers/stan.rb +- lib/rouge/lexers/stata.rb - lib/rouge/lexers/supercollider.rb - lib/rouge/lexers/swift.rb - lib/rouge/lexers/systemd.rb @@ -504,7 +510,7 @@ changelog_uri: https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md documentation_uri: https://rouge-ruby.github.io/docs/ source_code_uri: https://github.com/rouge-ruby/rouge -post_install_message: +post_install_message: rdoc_options: [] require_paths: - lib @@ -519,8 +525,8 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubygems_version: 3.0.3 -signing_key: +rubygems_version: 3.2.22 +signing_key: specification_version: 4 summary: A pure-ruby colorizer based on pygments test_files: []