diff --git a/source/org/thdl/tib/text/ttt/ACIPConverter.java b/source/org/thdl/tib/text/ttt/ACIPConverter.java index 6c3c8c5..97f977b 100644 --- a/source/org/thdl/tib/text/ttt/ACIPConverter.java +++ b/source/org/thdl/tib/text/ttt/ACIPConverter.java @@ -675,11 +675,21 @@ public class ACIPConverter { } } } else if (stype == TString.START_PAREN) { + if (null != writer) + writer.write("[ERROR " + + ErrorsAndWarnings.getMessage(142, + shortMessages, + "(" /* hard-coded ACIP value */) + "]"); if (null != tdoc) { tdoc.setTibetanFontSize(smallFontSize); } continue; } else if (stype == TString.END_PAREN) { + if (null != writer) + writer.write("[ERROR " + + ErrorsAndWarnings.getMessage(143, + shortMessages, + ")" /* hard-coded ACIP value */) + "]"); if (null != tdoc) { tdoc.setTibetanFontSize(regularFontSize); } diff --git a/source/org/thdl/tib/text/ttt/ErrorsAndWarnings.java b/source/org/thdl/tib/text/ttt/ErrorsAndWarnings.java index 65af97e..9d1de0a 100644 --- a/source/org/thdl/tib/text/ttt/ErrorsAndWarnings.java +++ b/source/org/thdl/tib/text/ttt/ErrorsAndWarnings.java @@ -252,7 +252,11 @@ public class ErrorsAndWarnings { ThdlDebug.verify(translit.length() == 1); return "" + code + ": While waiting for a closing bracket, an opening bracket, '" + translit + "', was found instead. Nesting of bracketed expressions is not permitted."; + case 142: // this number is referenced in error 143's message + return "" + code + ": Because you requested conversion to a Unicode text file, there is no way to indicate that the font size is supposed to decrease starting here and continuing until error 143. That is, this is the beginning of a region in YIG CHUNG."; + case 143: // this number is referenced in error 142's message + return "" + code + ": Because you requested conversion to a Unicode text file, there is no way to indicate that the font size is supposed to increase (go back to the size it was before the last error 142, that is) starting here. That is, this is the end of a region in YIG CHUNG."; @@ -326,7 +330,7 @@ public class ErrorsAndWarnings { } private static final int MIN_ERROR = 101; // inclusive - private static final int MAX_ERROR = 141; // inclusive + private static final int MAX_ERROR = 143; // inclusive private static final int MIN_WARNING = 501; // inclusive private static final int MAX_WARNING = 512; // inclusive diff --git a/source/org/thdl/tib/text/ttt/PackageTest.java b/source/org/thdl/tib/text/ttt/PackageTest.java index 47240e9..6e26191 100644 --- a/source/org/thdl/tib/text/ttt/PackageTest.java +++ b/source/org/thdl/tib/text/ttt/PackageTest.java @@ -10323,6 +10323,11 @@ tstHelper("shKA"); } public void testBrackets() { + uhelp("GA (GA )KHA ", + "\u0f42\u0f0b[ERROR 142: Because you requested conversion to a Unicode text file, there is no way to indicate that the font size is supposed to decrease starting here and continuing until error 143. That is, this is the beginning of a region in YIG CHUNG.]\u0f42\u0f0b[ERROR 143: Because you requested conversion to a Unicode text file, there is no way to indicate that the font size is supposed to increase (go back to the size it was before the last error 142, that is) starting here. That is, this is the end of a region in YIG CHUNG.]\u0f41\u0f0b"); + uhelp("(GA (GA )KHA )", + "[ERROR 142: Because you requested conversion to a Unicode text file, there is no way to indicate that the font size is supposed to decrease starting here and continuing until error 143. That is, this is the beginning of a region in YIG CHUNG.]\u0f42\u0f0b[#ERROR 111: Found an illegal open parenthesis, '('. Nesting of parentheses is not allowed.]\u0f42\u0f0b[ERROR 143: Because you requested conversion to a Unicode text file, there is no way to indicate that the font size is supposed to increase (go back to the size it was before the last error 142, that is) starting here. That is, this is the end of a region in YIG CHUNG.]\u0f41\u0f0b[#ERROR 112: Unexpected closing parenthesis, ')', found.]"); + if (ACIPTshegBarScanner.BRACKETED_SECTIONS_PASS_THROUGH_UNMODIFIED) { uhelpShortMessages("{ DD }", " DD "); uhelpShortMessages("{D X}", "D X");