===================================================================
RCS file: /home/cvs/OpenXM/src/OpenMath/OM2OXM.java,v
retrieving revision 1.3
retrieving revision 1.7
diff -u -p -r1.3 -r1.7
--- OpenXM/src/OpenMath/OM2OXM.java 1999/11/12 07:46:37 1.3
+++ OpenXM/src/OpenMath/OM2OXM.java 1999/11/15 06:19:26 1.7
@@ -1,5 +1,5 @@
/**
- * $OpenXM: OpenXM/src/OpenMath/OM2OXM.java,v 1.2 1999/11/04 19:36:41 tam Exp $
+ * $OpenXM: OpenXM/src/OpenMath/OM2OXM.java,v 1.6 1999/11/14 22:57:44 tam Exp $
*
* このクラスでは以下の BNF で表される構文解析を実装している
* expr -> stag [expr | immediate]* etag
@@ -39,7 +39,7 @@ final class OM2OXM implements Runnable{
private int token = TT_NULL;
private boolean lexPushbackFlag = false;
private OpenXM asir; // for debug
- private boolean debug = true;
+ private boolean debug = false;
// Token Type for lexical analyzer
final static int TT_NULL = 0;
@@ -117,7 +117,7 @@ final class OM2OXM implements Runnable{
case CMO.CMO_DMS_GENERIC:
ret += "";
- ret += "2";
+ ret += "2";
return ret;
case CMO.CMO_DISTRIBUTED_POLYNOMIAL:
@@ -131,6 +131,15 @@ final class OM2OXM implements Runnable{
ret += "";
return ret;
+ case CMO.CMO_BIGFLOAT:
+ ret += "";
+ ret += CMO2OM_sub(((CMO_BIGFLOAT)cmo).getSyosubu());
+ ret += "";
+ ret += "2";
+ ret += CMO2OM_sub(((CMO_BIGFLOAT)cmo).getShisubu());
+ ret += "";
+ return ret;
+
case CMO.CMO_INDETERMINATE:
return "";
@@ -223,7 +232,7 @@ final class OM2OXM implements Runnable{
while((ch = is.read()) != '<' && ch != -1){
debug("debug: "+ch);
if(isSpace(ch)){
- String spaces = String.valueOf(ch);
+ String spaces = String.valueOf((char)ch);
while(isSpace(ch = is.read())){
spaces += (char)ch;
@@ -304,6 +313,7 @@ final class OM2OXM implements Runnable{
if(name.equals("DMP")){
ret = parse_symb_DMP();
+ debug("poly: "+ret);
}else{
ret = new CMO_TREE(name,"Basic",parse_objects());
}
@@ -423,6 +433,7 @@ final class OM2OXM implements Runnable{
array[i] = ((CMO_ZZ)degree.elementAt(i+1)).intValue();
}
+ //debug("monom: "+ new CMO_MONOMIAL32(array,(CMO_ZZ)degree.elementAt(0)));
return new CMO_MONOMIAL32(array,(CMO_ZZ)degree.elementAt(0));
}
@@ -441,7 +452,7 @@ final class OM2OXM implements Runnable{
array = new CMO[objects.size()];
objects.copyInto((Object[])array);
- System.out.println("debug :"+ new CMO_LIST(array));
+ debug("debug :"+ new CMO_LIST(array));
return new CMO_LIST(array);
}