calt: extends .case substitution on the left side up to five glyphs. Closes #57
This commit is contained in:
parent
387915558e
commit
4736bcc4f1
2 changed files with 20 additions and 6 deletions
|
|
@ -153,11 +153,16 @@ A*Y V*V W*W N*N X*X
|
||||||
Λ*Λ Σ*Σ Δ*Δ Y*Y &*
|
Λ*Λ Σ*Σ Δ*Δ Y*Y &*
|
||||||
|
|
||||||
calt case should cascade:
|
calt case should cascade:
|
||||||
U() U[] U{} — rightx should be rightx.case
|
U() U[] U{} rightx should be rightx.case
|
||||||
()U []U {}U — special-cased as "delim' delim -> delim.case"
|
()U []U {}U special-cased as "delim' delim -> delim.case"
|
||||||
U--- — all hyphens should be hyphen.case
|
---U--- all hyphens should be hyphen.case
|
||||||
---U — only the hyphen next to U should be hyphen.case
|
U-→(){}[]* all should be .case
|
||||||
U-→(){}[]*
|
|
||||||
|
left side cascades up to 5 characters:
|
||||||
|
******ABBA******
|
||||||
|
------M------
|
||||||
|
@@@@@@M@@@@@@
|
||||||
|
++++++M++++++
|
||||||
`)
|
`)
|
||||||
|
|
||||||
// From http://justanotherfoundry.com/generator
|
// From http://justanotherfoundry.com/generator
|
||||||
|
|
|
||||||
|
|
@ -715,9 +715,18 @@ feature calt {
|
||||||
@UC = [ @UC_ROMAN @UC_SET1 exclam question ];
|
@UC = [ @UC_ROMAN @UC_SET1 exclam question ];
|
||||||
@LC = [ @LC_ROMAN @LC_SET1 ];
|
@LC = [ @LC_ROMAN @LC_SET1 ];
|
||||||
|
|
||||||
|
# rules to support left-hand repetition of CASE{L}->{R} [issue #57]
|
||||||
|
# y' y y y Z -> x y y y Z
|
||||||
|
sub @CASE_L' @CASE_L @CASE_L @CASE_L @CASE_L @UC by @CASE_R;
|
||||||
|
# y' y y y Z -> x y y y Z
|
||||||
|
sub @CASE_L' @CASE_L @CASE_L @CASE_L @UC by @CASE_R;
|
||||||
|
# y' y y Z -> x y y Z
|
||||||
|
sub @CASE_L' @CASE_L @CASE_L @UC by @CASE_R;
|
||||||
|
# y' y Z -> x y Z
|
||||||
|
sub @CASE_L' @CASE_L @UC by @CASE_R;
|
||||||
|
|
||||||
sub [ @UC @CASE_R ] @CASE_L' by @CASE_R;
|
sub [ @UC @CASE_R ] @CASE_L' by @CASE_R;
|
||||||
ignore sub @LC @CASE_NONDELIM_L' @UC;
|
ignore sub @LC @CASE_NONDELIM_L' @UC;
|
||||||
sub @CASE_L' [ @CASE_R @UC ] by @CASE_R;
|
|
||||||
|
|
||||||
sub @CASE_DELIM_L' @CASE_DELIM_L [ @CASE_R @UC ] by @CASE_DELIM_R;
|
sub @CASE_DELIM_L' @CASE_DELIM_L [ @CASE_R @UC ] by @CASE_DELIM_R;
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue