From 61cf19932e928d2cee5c9408fd8a1dadeb4508c1 Mon Sep 17 00:00:00 2001 From: dchandler Date: Sun, 26 Oct 2003 17:47:35 +0000 Subject: [PATCH] ACIP {B5} and {7'} were problematic; that's fixed. --- source/org/thdl/tib/text/ttt/TPairList.java | 6 +++--- source/org/thdl/tib/text/ttt/TParseTree.java | 2 +- source/org/thdl/tib/text/ttt/TStackList.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/org/thdl/tib/text/ttt/TPairList.java b/source/org/thdl/tib/text/ttt/TPairList.java index 6df7031..a92e04b 100644 --- a/source/org/thdl/tib/text/ttt/TPairList.java +++ b/source/org/thdl/tib/text/ttt/TPairList.java @@ -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; } diff --git a/source/org/thdl/tib/text/ttt/TParseTree.java b/source/org/thdl/tib/text/ttt/TParseTree.java index 5d94cbe..a1bd462 100644 --- a/source/org/thdl/tib/text/ttt/TParseTree.java +++ b/source/org/thdl/tib/text/ttt/TParseTree.java @@ -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]"); } } } diff --git a/source/org/thdl/tib/text/ttt/TStackList.java b/source/org/thdl/tib/text/ttt/TStackList.java index e3404cf..3bd4840 100644 --- a/source/org/thdl/tib/text/ttt/TStackList.java +++ b/source/org/thdl/tib/text/ttt/TStackList.java @@ -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;