ACIP {B5} and {7'} were problematic; that's fixed.

This commit is contained in:
dchandler 2003-10-26 17:47:35 +00:00
parent ad7b20e485
commit 61cf19932e
3 changed files with 5 additions and 5 deletions

View file

@ -348,7 +348,7 @@ class TPairList {
// this starts at 0.
int stackStart = (get(0).endsACIPStack()) ? 1 : 0;
int numeric = 0; // 1 means surely, 0 means we don't know yet, -1 means surely not
int numeric = get(0).isNumeric() ? 1 : (get(0).isDisambiguator() ? 0 : -1);
for (int i = 1; i < sz; i++) {
if (ddebug) System.out.println("i is " + i);
@ -363,10 +363,10 @@ class TPairList {
return null; // you can't mix numbers and letters.
else if (0 == numeric)
numeric = 1;
} else {
} else if (!p.isDisambiguator()) {
if (numeric == 1)
return null; // you can't mix numbers and letters.
else if (0 == numeric && !p.isDisambiguator())
else if (0 == numeric)
numeric = -1;
}

View file

@ -317,7 +317,7 @@ class TParseTree {
if (warningLevel == "All")
return "Warning: The last stack does not have a vowel in the ACIP {" + ((null != originalACIP) ? originalACIP : recoverACIP()) + "}; this may indicate a typo, because Sanskrit, which this is (because it's not legal Tibetan), should have a vowel after each stack.";
} else {
return "Warning: Trying to stack non-consonants."; // DLC
throw new Error("Can't happen now that we stack greedily [2]");
}
}
}

View file

@ -214,7 +214,7 @@ class TStackList {
if (null != isLastStack) {
isLastStack[0] = (i + 1 == size());
if (!isLastStack[0]) {
System.err.println("DLC NOW: But we now stack greedily! '7 and B5 cause trouble, though, e.g. " + this);
throw new Error("But we now stack greedily!");
}
}
return true;