Index: Singular/grammar.y
===================================================================
--- Singular/grammar.y	(revision 609ba11e29d4d3c44b5785da0728121bbc8e0065)
+++ Singular/grammar.y	(revision 34fbd934a748fec8c0dcc9325052eddde20bd10e)
@@ -2,5 +2,5 @@
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id: grammar.y,v 1.61 1999-05-29 12:00:01 Singular Exp $ */
+/* $Id: grammar.y,v 1.62 1999-07-09 14:58:24 Singular Exp $ */
 /*
 * ABSTRACT: SINGULAR shell grammatik
@@ -58,5 +58,5 @@
 char       my_yylinebuf[80];
 char *     currid;
-BOOLEAN    noringvars=FALSE;
+BOOLEAN    yyInRingConstruction=FALSE;
 BOOLEAN    expected_parms;
 int        cmdtok;
@@ -364,5 +364,5 @@
             siq=0;
             #endif
-	    noringvars = FALSE;
+	    yyInRingConstruction = FALSE;
             currentVoice->ifsw=0;
             if (inerror)
@@ -941,11 +941,6 @@
         UNKNOWN_IDENT
         {
-#if 0          
-          if (!($$=rOrderName($1)))
-            YYERROR;
-#else
           // let rInit take care of any errors 
           $$=rOrderName($1);
-#endif          
         }
         ;
@@ -1309,5 +1304,5 @@
 
 ringcmd1:
-       RING_CMD { noringvars = TRUE; }
+       RING_CMD { yyInRingConstruction = TRUE; }
        ;
 
@@ -1343,5 +1338,5 @@
             $6.CleanUp();
             $8.CleanUp();
-	    noringvars = FALSE;
+	    yyInRingConstruction = FALSE;
             if (b==NULL)
             {
@@ -1371,7 +1366,7 @@
             if(do_pop) namespaceroot->pop();
 #endif /* HAVE_NAMESPACES */
-	    noringvars = FALSE;
-          }
-        | DRING_CMD { noringvars = TRUE; }
+	    yyInRingConstruction = FALSE;
+          }
+        | DRING_CMD { yyInRingConstruction = TRUE; }
           elemexpr cmdeq
           rlist     ','       /* description of coeffs */
@@ -1412,5 +1407,5 @@
             rDSet();
             #endif
-	    noringvars = FALSE;
+	    yyInRingConstruction = FALSE;
           }
         ;
Index: Singular/iparith.cc
===================================================================
--- Singular/iparith.cc	(revision 609ba11e29d4d3c44b5785da0728121bbc8e0065)
+++ Singular/iparith.cc	(revision 34fbd934a748fec8c0dcc9325052eddde20bd10e)
@@ -2,5 +2,5 @@
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id: iparith.cc,v 1.157 1999-07-09 14:06:45 obachman Exp $ */
+/* $Id: iparith.cc,v 1.158 1999-07-09 14:58:25 Singular Exp $ */
 
 /*
@@ -4311,5 +4311,5 @@
   leftv v=u->next;
   u->next=NULL;
-  BOOLEAN b=iiExprArith2(res,u,iiOp,v);
+  BOOLEAN b=iiExprArith2(res,u,iiOp,v, (iiOp > 255));
   u->next=v;
   return b;
@@ -4522,4 +4522,10 @@
 static BOOLEAN jjKLAMMER_PL(leftv res, leftv u)
 {
+  if (yyInRingConstruction)
+  {
+    memcpy(res,u,sizeof(sleftv));
+    memset(u,0,sizeof(sleftv));
+    return FALSE;
+  }
   leftv v=u->next;
   BOOLEAN b;
Index: Singular/ipshell.h
===================================================================
--- Singular/ipshell.h	(revision 609ba11e29d4d3c44b5785da0728121bbc8e0065)
+++ Singular/ipshell.h	(revision 34fbd934a748fec8c0dcc9325052eddde20bd10e)
@@ -4,5 +4,5 @@
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id: ipshell.h,v 1.17 1999-04-15 17:28:05 Singular Exp $ */
+/* $Id: ipshell.h,v 1.18 1999-07-09 14:58:28 Singular Exp $ */
 /*
 * ABSTRACT
@@ -32,4 +32,5 @@
 extern cmdnames cmds[];
 extern char *lastreserved;
+extern BOOLEAN yyInRingConstruction; /* 1: during ring construction */
 
 int     IsCmd(char *n, int & tok);
Index: Singular/scanner.l
===================================================================
--- Singular/scanner.l	(revision 609ba11e29d4d3c44b5785da0728121bbc8e0065)
+++ Singular/scanner.l	(revision 34fbd934a748fec8c0dcc9325052eddde20bd10e)
@@ -3,5 +3,5 @@
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id: scanner.l,v 1.17 1999-07-06 15:32:44 Singular Exp $ */
+/* $Id: scanner.l,v 1.18 1999-07-09 14:58:29 Singular Exp $ */
 #include <stdio.h>
 #include <string.h>
@@ -23,5 +23,4 @@
 //extern unsigned char * yytext;
 extern int yyleng;
-extern BOOLEAN noringvars;
 extern int inerror;
 
Index: Singular/subexpr.cc
===================================================================
--- Singular/subexpr.cc	(revision 609ba11e29d4d3c44b5785da0728121bbc8e0065)
+++ Singular/subexpr.cc	(revision 34fbd934a748fec8c0dcc9325052eddde20bd10e)
@@ -5,5 +5,5 @@
 * ABSTRACT: handling of leftv
 */
-/* $Id: subexpr.cc,v 1.51 1999-06-15 11:36:41 Singular Exp $ */
+/* $Id: subexpr.cc,v 1.52 1999-07-09 14:58:30 Singular Exp $ */
 
 #include <stdlib.h>
@@ -1211,5 +1211,4 @@
 * utility for grammar and iparith
 */
-extern BOOLEAN noringvars;
 void syMake(leftv v,char * id, idhdl packhdl)
 {
@@ -1333,5 +1332,5 @@
     {
       BOOLEAN ok=FALSE;
-      poly p = (!noringvars) ? pmInit(id,ok) : (poly)NULL;
+      poly p = (!yyInRingConstruction) ? pmInit(id,ok) : (poly)NULL;
       if (ok)
       {
@@ -1363,6 +1362,7 @@
     {
       BOOLEAN ok=FALSE;
-      poly p = ((currRingHdl!=NULL)&&(!noringvars)&&(IDLEV(currRingHdl)!=myynest))
-               /* ring required */  /* not in decl */    /* already in case 4/6 */
+      poly p = ((currRingHdl!=NULL)     /* ring required */
+               &&(!yyInRingConstruction) /* not in decl */
+	       &&(IDLEV(currRingHdl)!=myynest)) /* already in case 4/6 */
                      ? pmInit(id,ok) : (poly)NULL;
       if (ok)
