From: Sharon C. <sha...@si...> - 2012-08-05 19:30:41
|
There's not really a good way built into the language--normally you'd have to list all the pairs using separate rules. But here's another idea: table(glyph) g_b {type = 1}; g_c {type = 2}; g_d {type = 3}; g_f {type = 4}; etc. Consonant = (g_b, g_c, g_d, g_f, ...); endtable; table(sub) Consonant Consonant > Consonant Gemination_Diacritic / _ {type == @2.type} _ ; endtable; Actually making a set of separate rules is probably slightly more efficient--using a finite state machine to match rules is more efficient than testing the glyph attribute. But maybe the code isn't as neat. Although either way you have to make a long list. On 8/5/2012 7:52 AM, Carsten Becker wrote: > Hi, > > I've got another question regarding GDL and substitution: How do I match > and replace two subsequent identical characters? What I want to do is > basically this: > > Consonant Same_Consonant > Consonant Gemination_Diacritic > > Since according to the documentation it's not possible to use > referencing with @ or $ on the LHS, I'm a little stumped. Is this maybe > solvable with some flag, or a recursive rule? > > Regards > Carsten > |