From 0dd5b9cb335dd2991fd4495637366948aed7da88 Mon Sep 17 00:00:00 2001 From: Jiahao Chen Date: Sun, 17 Aug 2014 14:08:03 -0400 Subject: [PATCH 1/3] =?UTF-8?q?Defines=20joins=20(=E2=A8=9D=20=E2=9F=95=20?= =?UTF-8?q?=E2=9F=96=20=E2=9F=97)=20and=20antijoin=20(=E2=96=B7)=20as=20va?= =?UTF-8?q?lid=20infix=20operators?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note: ▷ is semantically a geometric shape, but I could not find a separate character for antijoin --- src/julia-parser.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/julia-parser.scm b/src/julia-parser.scm index 0c43298b0da8d..e16a9289452ae 100644 --- a/src/julia-parser.scm +++ b/src/julia-parser.scm @@ -16,7 +16,7 @@ (define prec-colon '(: |..|)) (define prec-plus '(+ - ⊕ ⊖ ⊞ ⊟ |.+| |.-| |++| |\|| ∪ ∨ $ ⊔ ± ∓ ∔ ∸ ≂ ≏ ⊎ ⊻ ⊽ ⋎ ⋓ ⧺ ⧻ ⨈ ⨢ ⨣ ⨤ ⨥ ⨦ ⨧ ⨨ ⨩ ⨪ ⨫ ⨬ ⨭ ⨮ ⨹ ⨺ ⩁ ⩂ ⩅ ⩊ ⩌ ⩏ ⩐ ⩒ ⩔ ⩖ ⩗ ⩛ ⩝ ⩡ ⩢ ⩣)) (define prec-bitshift '(<< >> >>> |.<<| |.>>| |.>>>|)) -(define prec-times '(* / |./| ÷ |.÷| % ⋅ ∘ × |.%| |.*| |\\| |.\\| & ∩ ∧ ⊗ ⊘ ⊙ ⊚ ⊛ ⊠ ⊡ ⊓ ∗ ∙ ∤ ⅋ ≀ ⊼ ⋄ ⋆ ⋇ ⋉ ⋊ ⋋ ⋌ ⋏ ⋒ ⟑ ⦸ ⦼ ⦾ ⦿ ⧶ ⧷ ⨇ ⨰ ⨱ ⨲ ⨳ ⨴ ⨵ ⨶ ⨷ ⨸ ⨻ ⨼ ⨽ ⩀ ⩃ ⩄ ⩋ ⩍ ⩎ ⩑ ⩓ ⩕ ⩘ ⩚ ⩜ ⩞ ⩟ ⩠ ⫛ ⊍)) +(define prec-times '(* / |./| ÷ |.÷| % ⋅ ∘ × |.%| |.*| |\\| |.\\| & ∩ ∧ ⊗ ⊘ ⊙ ⊚ ⊛ ⊠ ⊡ ⊓ ∗ ∙ ∤ ⅋ ≀ ⊼ ⋄ ⋆ ⋇ ⋉ ⋊ ⋋ ⋌ ⋏ ⋒ ⟑ ⦸ ⦼ ⦾ ⦿ ⧶ ⧷ ⨇ ⨰ ⨱ ⨲ ⨳ ⨴ ⨵ ⨶ ⨷ ⨸ ⨻ ⨼ ⨽ ⩀ ⩃ ⩄ ⩋ ⩍ ⩎ ⩑ ⩓ ⩕ ⩘ ⩚ ⩜ ⩞ ⩟ ⩠ ⫛ ⊍ ▷ ⨝ ⟕ ⟖ ⟗)) (define prec-rational '(// .//)) (define prec-power '(^ |.^| ↑ ↓ ⇵ ⟰ ⟱ ⤈ ⤉ ⤊ ⤋ ⤒ ⤓ ⥉ ⥌ ⥍ ⥏ ⥑ ⥔ ⥕ ⥘ ⥙ ⥜ ⥝ ⥠ ⥡ ⥣ ⥥ ⥮ ⥯ ↑ ↓)) (define prec-decl '(|::|)) From 6341f7df2213dde6a2c29c630a84bc4a4186ec03 Mon Sep 17 00:00:00 2001 From: Jiahao Chen Date: Tue, 20 Oct 2015 15:05:08 -0400 Subject: [PATCH 2/3] Update latex_symbols - Minor clean up of latex_symbols generator script - Update list of latex symbols --- base/latex_symbols.jl | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/base/latex_symbols.jl b/base/latex_symbols.jl index bf63a5ec9f0dc..fd3027129ee0c 100644 --- a/base/latex_symbols.jl +++ b/base/latex_symbols.jl @@ -47,16 +47,21 @@ end # Additional symbols were generated from the unicode-math LaTeX package # symbol listing, using the following script: #= -# download("http://mirror.math.ku.edu/tex-archive/macros/latex/contrib/unicode-math/unicode-math-table.tex", "unicode-math-table.tex") +fname = "unicode-math-table.tex" +isfile(fname) || download("http://mirror.math.ku.edu/tex-archive/macros/latex/contrib/unicode-math/$fname", fname) const latex_strings = Set(values(Base.REPLCompletions.latex_symbols)) -open("unicode-math-table.tex") do f +open(fname) do f for L in eachline(f) x = map(s -> rstrip(s, [' ','\t','\n']), split(replace(L, r"[{}\"]+", "\t"), "\t")) c = Char(parse(Int, x[2], 16)) if (Base.is_id_char(c) || Base.isoperator(symbol(c))) && string(c) ∉ latex_strings && !isascii(c) - println(" \"", escape_string(x[3]), "\" => \"", + tabcomname = escape_string(x[3]) + if startswith(tabcomname, "math") + tabcomname = tabcomname[5:end] + end + println(" \"", tabcomname, "\" => \"", escape_string("$c"), "\", # ", x[5]) end end @@ -2543,4 +2548,21 @@ const latex_symbols = Dict( "\\mtteight" => "𝟾", # mathematical monospace digit 8 "\\mttnine" => "𝟿", # mathematical monospace digit 9 + "\\triangleright" => "▷", # (large) right triangle, open; z notation range restriction + "\\triangleleft" => "◁", # (large) left triangle, open; z notation domain restriction + "\\leftouterjoin" => "⟕", # left outer join + "\\rightouterjoin" => "⟖", # right outer join + "\\fullouterjoin" => "⟗", # full outer join + "\\Join" => "⨝", # join + "\\underbar" => "̲", # combining low line + "\\underleftrightarrow" => "͍", # underleftrightarrow accent + "\\leftwavearrow" => "↜", # left arrow-wavy + "\\rightwavearrow" => "↝", # right arrow-wavy + "\\varbarwedge" => "⌅", # /barwedge b: logical and, bar above [projective (bar over small wedge)] + "\\smallblacktriangleright" => "▸", # right triangle, filled + "\\smallblacktriangleleft" => "◂", # left triangle, filled + "\\leftmoon" => "☾", # last quarter moon + "\\smalltriangleright" => "▹", # right triangle, open + "\\smalltriangleleft" => "◃", # left triangle, open + ) From 93668d10b2e08d23c10d974c1056ea9b2eba611f Mon Sep 17 00:00:00 2001 From: Jiahao Chen Date: Tue, 20 Oct 2015 16:17:18 -0400 Subject: [PATCH 3/3] Update NEWS --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index bd50a0f5c70e8..0d7e5d0659023 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,6 +9,8 @@ Language changes * `using` and `import` are now case-sensitive even on case-insensitive filesystems (common on Mac and Windows) ([#13542]). + * Relational symbols are now allowed as infix operators ([#8036]). + Command-line option changes ---------------------------