diff options
author | Martin Gruner <mg.pub@gmx.net> | 2006-07-11 20:02:44 +0000 |
---|---|---|
committer | Martin Gruner <mg.pub@gmx.net> | 2006-07-11 20:02:44 +0000 |
commit | bbc9701b175697d709c1e79e304f55d22ef28510 (patch) | |
tree | 5cbc3b02d5536f4feba72b65ab20e8014a88770c /modules/hebrew-wlc/WLC2OSIS | |
parent | ef1078232e3f3acad072a2504d21355fd868a74e (diff) | |
download | sword-tools-bbc9701b175697d709c1e79e304f55d22ef28510.tar.gz |
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@73 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/hebrew-wlc/WLC2OSIS')
-rw-r--r-- | modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Parser.java | 21 | ||||
-rw-r--r-- | modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/WKQ.java | 100 |
2 files changed, 4 insertions, 117 deletions
diff --git a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Parser.java b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Parser.java index 836d961..d3ac78e 100644 --- a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Parser.java +++ b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Parser.java @@ -129,24 +129,11 @@ public void parse(){ if ((oldVerse == newVerse) && (oldWordNumber != newWordNumber)){ A.writer.appendText(" "); } + + System.out.println("Expression: " + expression); + + w.process(expression); -// Process a word. - -/* if (s.length() > 1){ - w.process(s) ; - } - else{ -// Look for 1 letter words. - if( s.compareTo("P")==0){ - m.pe(); - } - else if( s.compareTo("S")==0){ - m.samek() ; - } - else{ // It's a word - w.process(s) ; - } - }*/ oldBookCode = newBookCode; oldChapter = newChapter; oldVerse = newVerse; diff --git a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/WKQ.java b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/WKQ.java deleted file mode 100644 index 28ab4bb..0000000 --- a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/WKQ.java +++ /dev/null @@ -1,100 +0,0 @@ -package WLC2OSIS.Translate; - -import WLC2OSIS.Parse.* ; -//============================================================================== -/** - * <b>Processes usual and Ketib/Qere words.</b><p> - * - * Modified for WLC **qq and *kk null qere and null ketib entries. - */ -//============================================================================== -public class WKQ{ - -Parser P ; - -String Ketib; -int KCount ; -boolean KStarted ; - -String Qere ; -int QCount ; -boolean QStarted ; -//----------------------------------------------------------------------------- - -public WKQ( Parser P ) { - this.P = P ; - } -//------------------------------------------------------------------------------ -/** - * Processes MCW words, writing them using the Word.write(Word, Type) method. - * - * @param W String containing MCW word of any type. - */ -public void process(String W) { - - int asteriskcount = P.countChar(W, '*') ; - int FirstAsterisk = W.indexOf('*') ; - int LastAsterisk = W.lastIndexOf("*") ; -//---------------------------------------------------------------------------------- - -// Process a non-KQ - - if (asteriskcount == 0){ - P.w.write(W, "w") ; - } -//---------------------------------------------------------------------------------- - -// Look for a KQ that starts with a non-KQ string in the word -// usually abc*xyz. Write abc as a nonKQ word, the process *wxyz. - - - if (FirstAsterisk > 0 && P.countChar(W,'*') >= 1 ){ - String NonKQ = W.substring(0, FirstAsterisk) ; - P.w.write(NonKQ, "w") ; - W = W.substring(FirstAsterisk, W.length() ) ; - process(W) ; // Could be either K or Q - } -//----------------------------------------------------------------------------- - -// One word has two K,Q sections. *xyz**abc, **xyz*abc, *xyz*abc, **xyz**abc -// Process the two parts separately. - - else if(P.countChar(W,'*') >= 2 & LastAsterisk > 1 ){ - int Split = W.indexOf('*', 2) ; - String Part1 = W.substring(0, Split) ; - String Part2 = W.substring(Split, W.length()) ; - process(Part1) ; - process(Part2) ; - } -//----------------------------------------------------------------------------- - -// W has ONLY a leading asterisk or two leading asterisks - - else{ - if(W.charAt(0) == '*'){ - if(W.charAt(1) != '*'){ - -// Ketib - -// Do nothing if a null K - if (W.compareTo("*kk") != 0){ - P.w.write(W.substring(1, W.length() ), "k") ; - } - } - else{ - -// Qere - -// Check for a null Q - if (W.compareTo("**qq") != 0){ - P.w.write(W.substring(2, W.length() ), "q") ; - } - } - } - } - return ; - } -//------------------------------------------------------------------------------ -} -//============================================================================== -//============================================================================== |