def-gthill / lexurgy

A high-powered sound change applier
GNU General Public License v3.0
47 stars 5 forks source link

Can't delete a repeater (*, +, ?) #21

Closed AdamantConlanger closed 3 years ago

AdamantConlanger commented 3 years ago

"Invalid element types: RepeaterMatcher and NullEmitter". I do not have these sequences of characters in my file and I believe they aren't mentioned in the guide. I have no idea what to do with them.

def-gthill commented 3 years ago

Huh, apparently the current version doesn't allow something like @consonant* => *. There's no reason that shouldn't be allowed. I'll add a test for that and get it fixed.

AdamantConlanger commented 3 years ago

Ok. I do have to note that I haven't used any "@" characters in my file, so it doesn't depend on the left side having classes. I did say [nasal syllabic] [nasal]? [nasal syllabic] => * * [long].

def-gthill commented 3 years ago

It's not the class, it's the * after it, meaning "zero or more copies of this". I expect ? and + would act similarly; they're all implemented internally by a RepeaterMatcher object. NullEmitter is the * on the right side. Naturally these names only make sense to me and shouldn't make their way into error messages!

def-gthill commented 3 years ago

Ok. I do have to note that I haven't used any "@" characters in my file, so it doesn't depend on the left side having classes. I did say [nasal syllabic] [nasal]? [nasal syllabic] => * * [long].

For now just use two rules: [nasal syllabic] [nasal] [nasal syllabic] => * * [long] and [nasal syllabic] [nasal syllabic] => * [long] (in that order)

AdamantConlanger commented 3 years ago

The next rule was Then: [nasal static] [nasal syllabic] => [long syllabic] * anyway, so I just had to switch some things up.

def-gthill commented 3 years ago

This is fixed in commit ff9436bbea8c6e9949f19147646044ed84e349a2 and will be included in the next release.