From cd780240553fab9b966882076fc852dce02fd68b Mon Sep 17 00:00:00 2001 From: Vanessa McHale Date: Sat, 18 Jan 2025 09:58:42 -0500 Subject: [PATCH] fun --- doc/apple-by-example.md | 4 ++-- docs/index.html | 18 ++++++++++++------ src/L.x | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/doc/apple-by-example.md b/doc/apple-by-example.md index 6ecd34ec3..10537e3e5 100644 --- a/doc/apple-by-example.md +++ b/doc/apple-by-example.md @@ -642,10 +642,10 @@ is equivalent to Identifiers may be latin or greek characters, or a single character from the mathematical greek or mathematical latin unicode block, optionally followed by -some subscript alphanumeric characters. The single-character lambda `λ` is reserved. `∫`, `𝛻`, +some subscript alphanumeric characters. `∂` may appear at the beginning of multi-character identifiers or on its own. The single-character lambda `λ` is reserved. `∫`, `𝛻`, and `∇` are also identifiers but may not be followed by a subscript. -Thus `pxs`, `aₙ`, `sn₁`, `𝐶`, `φs`, `𝜉`, and `𝜌₀` are valid identifiers but `𝜉s` is not. +Thus `pxs`, `aₙ`, `sn₁`, `𝐶`, `φs`, `∂f`, `𝜉`, and `𝜌₀` are valid identifiers but `𝜉s`, `𝜉∂`, and `f∂` are parsed as application of one identifier to another. ### Vulgar Fractions diff --git a/docs/index.html b/docs/index.html index ba6f5a4b0..4ba60edaa 100644 --- a/docs/index.html +++ b/docs/index.html @@ -772,13 +772,16 @@

Matrix Dimensions

Identifiers

Identifiers may be latin or greek characters, or a single character from the mathematical greek or mathematical latin unicode block, -optionally followed by some subscript alphanumeric characters. The -single-character lambda λ is reserved. , -𝛻, and are also identifiers but may not be -followed by a subscript.

+optionally followed by some subscript alphanumeric characters. + may appear at the beginning of multi-character +identifiers or on its own. The single-character lambda λ is +reserved. , 𝛻, and are also +identifiers but may not be followed by a subscript.

Thus pxs, aₙ, sn₁, -𝐶, φs, 𝜉, and 𝜌₀ are -valid identifiers but 𝜉s is not.

+𝐶, φs, ∂f, 𝜉, and +𝜌₀ are valid identifiers but 𝜉s, +𝜉∂, and f∂ are parsed as application of one +identifier to another.

Vulgar Fractions

Unicode vulgar fractions are considered float literals:

 > ⅚
@@ -8443,6 +8446,7 @@ 

Sample Normal Distribution

processEnvironments: true }, displayAlign: 'center', + messageStyle: 'none', CommonHTML: { linebreaks: { automatic: true @@ -16075,6 +16079,7 @@

Image Processing

processEnvironments: true }, displayAlign: 'center', + messageStyle: 'none', CommonHTML: { linebreaks: { automatic: true @@ -23758,6 +23763,7 @@

Random Walks

processEnvironments: true }, displayAlign: 'center', + messageStyle: 'none', CommonHTML: { linebreaks: { automatic: true diff --git a/src/L.x b/src/L.x index e12cf584d..05361b26e 100644 --- a/src/L.x +++ b/src/L.x @@ -54,7 +54,7 @@ $sub = [$subscript $digitsubscript] @follow_char = [$letter $digit \_] -- TODO: M₂,₂ without the space -@name = ($letter#[Λλ] @follow_char* $sub* | $mathgreek $sub* | $mathlatin $sub* | ∫ | 𝛻 | ∇) [′″‴⁗]? +@name = ([$letter ∂]#[Λλ] @follow_char* $sub* | $mathgreek $sub* | $mathlatin $sub* | ∫ | 𝛻 | ∇) [′″‴⁗]? @exp = e\-?$digit+ @float = ($digit+\.$digit+@exp? | $digit+@exp)