I really hesitate to commit this because I'm not sure what it brings to the

table exactly and I fear that it makes the ACIP->Tibetan converter code
a lot uglier.  The TODO(DLC)[EWTS->Tibetan] comments littered throughout
are part of the ugliness; they point to the ugliness.  If each were addressed,
cleanliness could perhaps be achieved.

I've largely forgotten exactly what this change does, but it attempts to
improve EWTS->Tibetan conversion.  The lexer is probably really, really
primitive.  I concentrate here on converting a single tsheg bar rather than
a whole document.

Eclipse was used during part of my journey here and some imports were
reorganized merely because I could.  :)

(Eclipse was needed when the usual ant build failed to run a new test
EWTSTest.  And I wanted its debugger.)

Next steps: end-to-end EWTS tests should bring many problems to light.  Fix
those.  Triage all the TODO comments.

I don't know that I'll ever really trust the implementation.  The tests are
valuable, though.  A clean implementation of EWTS->Tibetan in Jython
might hold enough interest for me; I'd like to learn Python.
This commit is contained in:
dchandler 2005-06-20 06:18:00 +00:00
parent f64bae8ea6
commit 7198f23361
45 changed files with 1666 additions and 695 deletions

View file

@ -21,8 +21,9 @@ package org.thdl.util;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import javax.swing.JScrollPane;
import javax.swing.JEditorPane;
import javax.swing.JScrollPane;
/** An HTMLPane is a JScrollPane displaying the contents of an HTML
* file. DLC FIXME: at present, neither internal nor external

View file

@ -17,7 +17,6 @@ Contributor(s): ______________________________________.
*/
package org.thdl.util;
import java.io.*;
/** Used by {@link SimplifiedLinkedList} to provide the implementation of a
simple dynamic link list.

View file

@ -18,13 +18,11 @@ Contributor(s): ______________________________________.
package org.thdl.util;
import org.thdl.util.ThdlDebug;
import java.util.ArrayList;
import java.io.IOException;
import java.io.FilterInputStream;
import java.io.BufferedInputStream;
import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
/** Provides an input stream that fixes another RTF input stream so

View file

@ -18,11 +18,12 @@ Contributor(s): ______________________________________.
package org.thdl.util;
import junit.framework.TestCase;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import junit.framework.TestCase;
/**
* @author David Chandler
*

View file

@ -21,11 +21,12 @@ package org.thdl.util;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import javax.swing.JScrollPane;
import javax.swing.JTextPane;
import javax.swing.text.BadLocationException;
import javax.swing.text.DefaultStyledDocument;
import javax.swing.text.rtf.RTFEditorKit;
import javax.swing.text.BadLocationException;
/** An RTFPane is a JScrollPane displaying the contents of a rich text
file (an RTF file). */

View file

@ -18,13 +18,12 @@ Contributor(s): ______________________________________.
package org.thdl.util;
import javax.swing.JFrame;
import java.awt.Container;
import java.awt.Component;
import java.awt.Container;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
import org.thdl.util.RTFPane;
import javax.swing.JFrame;
/** An SimpleFrame is a top-level window displaying a JScrollPane. */
public class SimpleFrame extends JFrame {

View file

@ -18,7 +18,7 @@ Contributor(s): ______________________________________.
package org.thdl.util;
import java.io.*;
import java.io.PrintWriter;
/** Implementation of a simple dynamic link list. Be careful with word order!
Why not just use java.util.LinkedList? It is not supported for the

View file

@ -17,7 +17,7 @@ Contributor(s): ______________________________________.
*/
package org.thdl.util;
import java.util.*;
import java.util.LinkedList;
/** Used by {@link LinkedList} to provide the implementation of a
simple dynamic link list.

View file

@ -18,11 +18,13 @@ Contributor(s): ______________________________________.
package org.thdl.util;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.Stack;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
/** A StatusBar can be added to a component, typically to the bottom
of it, in order to show the user the status of the program. There
are methods to change the status, and there are actually a LIFO

View file

@ -18,11 +18,10 @@ Contributor(s): ______________________________________.
package org.thdl.util;
import javax.swing.AbstractAction;
import javax.swing.Icon;
import java.awt.event.ActionEvent;
import org.thdl.util.ThdlDebug;
import javax.swing.AbstractAction;
import javax.swing.Icon;
/**
* This ActionListener is like any other except in the way that it

View file

@ -18,10 +18,8 @@ Contributor(s): ______________________________________.
package org.thdl.util;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import org.thdl.util.ThdlDebug;
import java.awt.event.ActionListener;
/**
* This ActionListener is like any other except in the way that it

View file

@ -18,12 +18,9 @@ Contributor(s): ______________________________________.
package org.thdl.util;
import java.io.PrintStream;
import java.io.FileOutputStream;
import java.io.File;
import org.thdl.util.TeeStream;
import org.thdl.util.ThdlOptions;
import java.io.FileOutputStream;
import java.io.PrintStream;
/**
* This uninstantiable class provides assertions and the like in a

View file

@ -2,6 +2,7 @@ package org.thdl.util;
import java.util.Locale;
import java.util.ResourceBundle;
import javax.swing.JComponent;
public class ThdlI18n {

View file

@ -18,9 +18,9 @@ Contributor(s): ______________________________________.
package org.thdl.util;
import junit.framework.TestCase;
import java.io.IOException;
import java.io.IOException; /* a checked exception */
import junit.framework.TestCase;
/**
* @author David Chandler

View file

@ -18,17 +18,14 @@ Contributor(s): ______________________________________.
package org.thdl.util;
import java.io.InputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.Properties;
import org.thdl.util.ThdlLazyException;
import org.thdl.util.OperatingSystemUtils;
/**
* Provides a clean interface to the multi-tiered system of user
* preferences (also known as options).

View file

@ -81,7 +81,6 @@ Contributor(s): ______________________________________.
package org.thdl.util;
import org.thdl.util.ThdlDebug;
/**
* A digital search trie for 7-bit ASCII text. The API is a subset of