Re: PIE Soundchanges - Grassman & Bartholomae
From: | Henrik Theiling <theiling@...> |
Date: | Monday, May 8, 2006, 13:06 |
Hi!
Paul Bennett <paul-bennett@...> writes:
>...
> Ch > C / ChV? _ s
> Ch > C / _ VCh
> (C)h(C) > ($1)($2)h
>
> Actually, Henrik: are rules like that third one allowed in SCH files?
No, the regexp numbers are used internally and the compiler'd have to
re-enumerate them, which it currently does not do. Unfortunately, the
above input does not trigger an error message. Sorry.
Anyway, you can rewrite the above rule this way:
hC > Ch / C_
This is because the replacement is allowed to contain group names if
these are used in the match as well. The compiler then replaces the
group name in the replacement by the internal $<number> it uses for
that group in the match. This only works when the group name is
unique in the match, which is why you cannot refer to C in a match
like ChC (there are two C's). The above rule can be rewritten to move
one C into a context, but this need not be possible for arbitrary
metathesis rules. Extending this is on by TODO list.
> More to the point, given the syllable-based approach of SCH, is a
> rule like that even easily to implement across syllable borders?
Yes, you can match on several syllables at once by not putting
adjacent syllable constraint into brackets: the string the replacement
rules will match is a concatenation of the non-bracketed syllables.
E.g.:
rule "blah"
syllable [ first ], any, any
lV > Vl / k_V
With the right input encoding, this would transform 'nuclear >
nukelar' (not exactly what was intended, but you get the point).
**Henrik
Reply