incubator-imperius-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jnee...@apache.org
Subject svn commit: r686743 [2/10] - in /incubator/imperius/trunk: imperius-javaspl/src/main/java/org/apache/imperius/javaspl/ imperius-splcore/src/main/antlr/org/apache/imperius/spl/parser/compiler/ imperius-splcore/src/main/java/org/apache/imperius/spl/datas...
Date Mon, 18 Aug 2008 12:50:42 GMT
Modified: incubator/imperius/trunk/imperius-splcore/src/main/antlr/org/apache/imperius/spl/parser/compiler/cimspl.tree.g
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/antlr/org/apache/imperius/spl/parser/compiler/cimspl.tree.g?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/antlr/org/apache/imperius/spl/parser/compiler/cimspl.tree.g (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/antlr/org/apache/imperius/spl/parser/compiler/cimspl.tree.g Mon Aug 18 05:50:36 2008
@@ -91,15 +91,21 @@
 {
 SPLSymbolTable globalSymbolTable = new SPLSymbolTable();
 private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+private List errorList = null;
+private String errorMsg = null;    
     
 SPLSymbolTable currSymbolTable = globalSymbolTable;
 String currAnchor = "";
 DataCollector dataCollector = null;
 
+public List getErrorList()
+{
+	return errorList;
+}
 //ExpressionFactory expressionFactory = new ExpressionFactory();
 }
 
-splpolicy[DataCollector dc, SPLSymbolTable currentSymTab] returns [SPLPolicy cp = null]
+splpolicy[DataCollector dc, SPLSymbolTable currentSymTab] returns [SPLPolicy cp = null] 
 {
 		dataCollector = dc;
         SPLSymbolTable symTab = new SPLSymbolTable(currentSymTab,SPLSymbolTable.POLICYGROUP);
@@ -112,16 +118,16 @@
         ArrayList pStmtList = new ArrayList();
         DeclarationStatement d = null;
         StrategyStatement s = null;
-		
+        if(errorList == null)
+        	errorList = new ArrayList();
+	
 }
 :
         (i=importstatement[symTab]{importStatementList.add(i);})+ s=strategystatement (d=declarationstatement[symTab])? (p=policystatement[symTab] {pStmtList.add(p);} )+
         { 
                 cp = new SPLPolicy(importStatementList,s,d,pStmtList,symTab);
                 if(logger.isLoggable(Level.FINE))
-                	logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: SPLPolicy Created");
-            
-          
+                	logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: SPLPolicy Created");
         }
         ;  
 //i:"Import"^ {#i.setType(IMPORT_DEF);} IDENT (DOT! IDENT)* (identList)? (expression)? SEMI! 
@@ -145,6 +151,8 @@
 	  	catch (SPLException exep)
 	  	{ 
 	  			ASTWithLineNumber q = (ASTWithLineNumber)i1;
+	  			errorMsg = exep.getMessage() + "at line" + q.getLine();
+	  			errorList.add(errorMsg);
 	  			//System.out.println(exep.getMessage() + "at line" + q.getLine()); 
 	  			
 	  	}
@@ -154,12 +162,10 @@
 //  currSymbolTable.setAnchor(i4.getText());
 	  i = new ImportStatement(className.toString(),instanceInfoList,e,symTab); 
 	  //if(logger.isLoggable(Level.FINE))
-	  //logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: ImportStatement Created");
-            
-  
+	  //logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: ImportStatement Created");
   	}
-                  
 
+  	
 ; 
 
 qualifier returns [String qualifier = null]
@@ -184,7 +190,7 @@
                 {
                    	s = new StrategyStatement("Execute_All_Applicable");
                    	if(logger.isLoggable(Level.FINE))
-  				   		logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: StrategyStatement Created");
+  				   		logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: StrategyStatement Created");
    
                 }
                 | 
@@ -192,7 +198,7 @@
                  {
                    	s = new StrategyStatement("Execute_First_Applicable");
                    	if(logger.isLoggable(Level.FINE))
-  				   		logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: StrategyStatement Created");
+  				   		logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: StrategyStatement Created");
    
                  }
                 
@@ -214,7 +220,7 @@
                 {
                         d = new DeclarationStatement(cList,mList,symTab);
                         if(logger.isLoggable(Level.FINE))
-  				   			logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: DeclarationStatement Created");
+  				   			logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: DeclarationStatement Created");
    
                 }
 
@@ -235,17 +241,19 @@
                  		symTab.insertVariableSymbol(id.getText(),v.getType(),false,false); 
                   		cd = new ConstantDefinition(id.getText(),v,symTab);
                   		if(logger.isLoggable(Level.FINE))
-  				   			logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: ConstantDefinition Created "+id.getText());
+  				   			logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: ConstantDefinition Created "+id.getText());
    
                  	}
                  	catch(SPLException excep)
 					{
 						ASTWithLineNumber q = (ASTWithLineNumber)t;
-						logger.severe(excep.getMessage());
-						logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception inserting symbol "+id.getText() +" at line "+q.getLine());
-						//System.out.println(excep.getMessage());
-						//System.out.println("TreeParser::Exception inserting symbol "+id.getText() +" at line "+q.getLine());
-						System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+						// logger.severe(excep.getMessage());
+						errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception inserting symbol "+id.getText() +" at line "+q.getLine();
+						logger.severe(errorMsg);
+						// System.out.println(excep.getMessage());
+						// System.out.println("TreeParser::Exception inserting symbol "+id.getText() +" at line "+q.getLine());
+						// System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+						errorList.add(errorMsg);
 						throw new RecognitionException(excep.getMessage());
 					}
                   
@@ -290,7 +298,7 @@
                        // currSymbolTable.insertMethodSymbol(id.getText(),c.getText(),a);
                   //System.out.println("treeparser c= "+c.getText());
                   if(logger.isLoggable(Level.FINE))
-  				   		logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: MacroDefinition type "+arr);
+  				   		logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: MacroDefinition type "+arr);
    
                   if(arr!=null)
                 	{
@@ -298,10 +306,10 @@
 	                	{
 	                		typestr=arr.substring(0,arr.indexOf("["));
 	                		if(logger.isLoggable(Level.FINE))
-  				   				logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: MacroDefinition typestr "+typestr);
+  				   				logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: MacroDefinition typestr "+typestr);
 	                		isArr=true;
 	                		if(logger.isLoggable(Level.FINE))
-  				   				logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: macro isArray = "+isArr);
+  				   				logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: macro isArray = "+isArr);
    
 	                	}
 	                	else
@@ -327,22 +335,24 @@
                   	//System.out.println("MacroDefinition : "+id.getText()+" "+typestr);
                   	
                     if(logger.isLoggable(Level.FINE))
-  				   		logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: MacroDefinition Created "+id.getText());
+  				   		logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: MacroDefinition Created "+id.getText());
    
                   	symTab.insertMacroSymbol(id.getText(),typestr,isArr,a,m);
                   	//System.out.println("inserted MacroSymbol into Symbol Table : "+id.getText());
                   	if(logger.isLoggable(Level.FINE))
-  				   		logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: MacroDefinition inserted into SymbolTable "+id.getText());
+  				   		logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: MacroDefinition inserted into SymbolTable "+id.getText());
    
                   }
                   catch(SPLException excep)
                   {
                   		ASTWithLineNumber q = (ASTWithLineNumber)id;
-						logger.severe(excep.getMessage());
-						logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception inserting symbol "+id.getText() +" at line "+q.getLine());
+						// logger.severe(excep.getMessage());
+						errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception inserting symbol "+id.getText() +" at line "+q.getLine();
+						logger.severe(errorMsg);
 						//System.out.println(excep.getMessage());
 						//System.out.println("TreeParser::Exception inserting symbol "+id.getText() +" at line "+q.getLine());
-						System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+						// System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+						errorList.add(errorMsg);
 						throw new RecognitionException(excep.getMessage());
 						
                   }		
@@ -367,7 +377,7 @@
                 #(ARG_DEF #(TYPE arr=splType ) i:IDENT )
                 {
                 	if(logger.isLoggable(Level.FINE))
-  				   			logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: macro arr = "+arr);
+  				   			logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: macro arr = "+arr);
    
                 	if(arr!=null)
                 	{
@@ -375,10 +385,10 @@
 	                	{
 	                		typestr=arr.substring(0,arr.indexOf("["));
 	                		if(logger.isLoggable(Level.FINE))
-  				   				logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: MacroDefinition typestr "+typestr);
+  				   				logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: MacroDefinition typestr "+typestr);
 	                		isArr=true;
 	                		if(logger.isLoggable(Level.FINE))
-  				   				logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: macro isArray = "+isArr);
+  				   				logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: macro isArray = "+isArr);
    
 	                	}	
 	                	else
@@ -398,21 +408,23 @@
 	                		
                 	    	symTab.insertVariableSymbol(i.getText(),type,null,isArr,false,false);
                 	    	if(logger.isLoggable(Level.FINE))
-  				   				logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: Variable inserted into SymbolTable "+i.getText());
+  				   				logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: Variable inserted into SymbolTable "+i.getText());
    
                         	tp = new ArgumentImpl(typestr,i.getText(),isArr,null); 
                         	if(logger.isLoggable(Level.FINE))
-  				   				logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: Argument created");
+  				   				logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: Argument created");
    
                 		}
                 		catch(SPLException excep)
                 		{
                 			ASTWithLineNumber q = (ASTWithLineNumber)i;
-							logger.severe(excep.getMessage());
-							logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception inserting symbol "+i.getText() +" at line "+q.getLine());
+							//logger.severe(excep.getMessage());
+							errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception inserting symbol "+i.getText() +" at line "+q.getLine();
+							logger.severe(errorMsg);
 							//System.out.println(excep.getMessage());
 							//System.out.println("TreeParser::Exception inserting symbol "+i.getText() +" at line "+q.getLine());
-							System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+							//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+							errorList.add(errorMsg);
 							throw new RecognitionException(excep.getMessage());
                 		}		
                 }
@@ -420,14 +432,14 @@
 ;
 
 
-policystatement[SPLSymbolTable symTab] returns [PolicyStatement p = null]
+policystatement[SPLSymbolTable symTab] returns [PolicyStatement p = null] 
 :
                 ( p = policydef[symTab] | p =  policyGroup[symTab] )
         
 ;
 
 
-policydef[SPLSymbolTable symTab]  returns [PolicyDefinition pd = null]
+policydef[SPLSymbolTable symTab]  returns [PolicyDefinition pd = null] 
      { 
         SPLSymbolTable lclSymTab = new SPLSymbolTable(symTab);
         //symTab.addChildSymbolTable(lclSymTab);
@@ -443,7 +455,7 @@
                // currSymbolTable = currSymbolTable.getParentSymbolTable(); 
                 pd = new PolicyDefinition(d,exp,dec,p.getText(),lclSymTab);
                 if(logger.isLoggable(Level.FINE))
-  				   logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: PolicyDefinition Created");
+  				   logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: PolicyDefinition Created");
    
         
         
@@ -452,12 +464,12 @@
       
 ;
 
-conditionstatement[SPLSymbolTable symTab] returns [Expression exp = null]:
+conditionstatement[SPLSymbolTable symTab] returns [Expression exp = null] :
         #(CONDITION_DEF exp=expression[symTab])
         {/*//System.out.println("cimspl.tree.g condition statement "+exp);*/}
     
 ;
-decision[SPLSymbolTable symTab] returns [ActionBlock ab=null]:
+decision[SPLSymbolTable symTab] returns [ActionBlock ab=null] :
 
         #(DECISION_DEF ab=actionBlock[symTab])
     
@@ -485,17 +497,19 @@
         	{ 
         		e = ExpressionFactory.createExpression(e1,e2,ASSIGN,symTab); 
         		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
         	}
         	catch (SPLException excep) 
         	{
         		ASTWithLineNumber q = (ASTWithLineNumber)t;
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
 				//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());
         	}
         }
@@ -505,18 +519,20 @@
 	    	{ 
 	    		e = ExpressionFactory.createExpression(e1,e2,LOR,symTab);
 	    		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	    	}
 	    	catch (SPLException excep) 
 	    	{
 	    		ASTWithLineNumber q = (ASTWithLineNumber)t1;
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
 				//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
 				//throw new RecognitionException(excep.getMessage());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());
 			}
 	   }
@@ -526,18 +542,20 @@
         	{
         		e = ExpressionFactory.createExpression(e1,e2,LAND,symTab);
         		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
         	}
         	catch (SPLException excep) 
         	{
         		ASTWithLineNumber q = (ASTWithLineNumber)t2;
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
 				//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
 				//throw new RecognitionException(excep.getMessage());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());			
         	}
        }
@@ -547,17 +565,19 @@
 	       	{
 	       		e = ExpressionFactory.createExpression(e1,e2,BXOR,symTab);
 	       		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	       	}
 	       	catch (SPLException excep) 
 	       	{
 	       		ASTWithLineNumber q = (ASTWithLineNumber)t3;
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
 				//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());			
 	       	}
        }
@@ -567,17 +587,19 @@
 	       	{
 	       		e = ExpressionFactory.createExpression(e1,e2,NOT_EQUAL,symTab);
 	       		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	       	}
 	       	catch (SPLException excep) 
 	       	{
 	       		ASTWithLineNumber q = (ASTWithLineNumber)t4;
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
 				//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());			
 	       	}
        }
@@ -587,7 +609,7 @@
 	       	{
 	       		e = ExpressionFactory.createExpression(e1,e2,EQUAL,symTab);
 	       		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	       		
 	       	}
@@ -595,10 +617,12 @@
 	       	{
 	       		ASTWithLineNumber q = (ASTWithLineNumber)t5;
 	       		//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());			
 			}
        }
@@ -608,7 +632,7 @@
 	       	{
 	       		e = ExpressionFactory.createExpression(e1,e2,LT,symTab);
 	       		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	       		
 			}
@@ -616,10 +640,12 @@
 			{
 				ASTWithLineNumber q = (ASTWithLineNumber)t6;
 				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());				
 			}
 	   }
@@ -629,17 +655,19 @@
 	       	{
 	       		e = ExpressionFactory.createExpression(e1,e2,GT,symTab);
 	       		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	       	}
 	       	catch (SPLException excep) 
 	       	{
 	       		ASTWithLineNumber q = (ASTWithLineNumber)t7;
 	       		//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());				
 	       	}
        }
@@ -649,17 +677,19 @@
 	       	{
 	       		e = ExpressionFactory.createExpression(e1,e2,LE,symTab);
 	       		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	       	}
 	       	catch (SPLException excep) 
 	       	{
 	       		ASTWithLineNumber q = (ASTWithLineNumber)t8;
 	       		//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());			
 	       	}
        }
@@ -669,17 +699,19 @@
 	       	{
 	       		e = ExpressionFactory.createExpression(e1,e2,GE,symTab);
 	       		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	       	}
 	       	catch (SPLException excep) 
 	       	{
 	       		ASTWithLineNumber q = (ASTWithLineNumber)t9;
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
 				//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());			
 	       	}
        }
@@ -689,17 +721,19 @@
 	       	{
 	       		e = ExpressionFactory.createExpression(e1,e2,PLUS,symTab);
 	       		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	       	} 
 	       	catch (SPLException excep) 
 	       	{
 	       		ASTWithLineNumber q = (ASTWithLineNumber)t10;
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
 				//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());			
 	       	}
        }
@@ -709,17 +743,19 @@
 	       	{
 	       		e = ExpressionFactory.createExpression(e1,e2,MINUS,symTab);
 	       		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	       	}
 	       	catch (SPLException excep) 
 	       	{
 	       		ASTWithLineNumber q = (ASTWithLineNumber)t11;
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
 				//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());			
 	       	}
        }
@@ -729,17 +765,19 @@
 	       	{
 	       		e = ExpressionFactory.createExpression(e1,e2,DIV,symTab);
 	       		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	       	} 
 	       	catch (SPLException excep) 
 	       	{
 	       		ASTWithLineNumber q = (ASTWithLineNumber)t12;
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
 				//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());			
 	       	}
        }
@@ -749,17 +787,19 @@
 	       	{
 	       		e = ExpressionFactory.createExpression(e1,e2,STAR,symTab);
 	       		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	       	}
 	       	catch (SPLException excep) 
 	       	{
 	       		ASTWithLineNumber q = (ASTWithLineNumber)t13;
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
 				//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());			
 	       	}
        }
@@ -769,18 +809,20 @@
 	       	{
 	       		e = ExpressionFactory.createExpression(e1,UNARY_MINUS,symTab);
 	       		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	       	} 
 	       	catch (SPLException excep) 
 	       	{
 	       		ASTWithLineNumber q = (ASTWithLineNumber)t14;
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
 				//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
 				//throw new RecognitionException("");
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());			
 	       	}
        }
@@ -790,17 +832,19 @@
 	       	{
 	       		e = ExpressionFactory.createExpression(e1,UNARY_PLUS,symTab);
 	       		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	       	}
 	       	catch (SPLException excep) 
 	       	{
 	       		ASTWithLineNumber q = (ASTWithLineNumber)t15;
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
 				//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());				
 	       	}
        }
@@ -810,17 +854,19 @@
 	       	{
 	       		e = ExpressionFactory.createExpression(e1,UNARY_NOT,symTab);
 	       		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	       	}
 	       	catch (SPLException excep) 
 	       	{
 	       		ASTWithLineNumber q = (ASTWithLineNumber)t16;
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
 				//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());			
 	       	}
        }
@@ -841,17 +887,19 @@
 	          	{ 
 	          		e = ExpressionFactory.createExpression(t.getText(),TypeConstants.booleanType);
 	          		if(logger.isLoggable(Level.FINE))
-  						logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  						logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	          	}
 	          	catch (SPLException excep) 
 	          	{
 	          		ASTWithLineNumber q = (ASTWithLineNumber)t;
-					logger.severe(excep.getMessage());
-					logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+					//logger.severe(excep.getMessage());
+					errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+					logger.severe(errorMsg);
 					//System.out.println(excep.getMessage());
 					//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-					System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+					//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+					errorList.add(errorMsg);
 					throw new RecognitionException(excep.getMessage());				
 	          	}
           }
@@ -861,16 +909,18 @@
 	          	{
 	          		e = ExpressionFactory.createExpression(f.getText(),TypeConstants.booleanType);
 	          		if(logger.isLoggable(Level.FINE))
-  						logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  						logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    
 	          	}catch (SPLException excep) 
 	          	{
 	          		ASTWithLineNumber q = (ASTWithLineNumber)f;
-					logger.severe(excep.getMessage());
-					logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+					//logger.severe(excep.getMessage());
+					errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+					logger.severe(errorMsg);
 					//System.out.println(excep.getMessage());
 					//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-					System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+					//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+					errorList.add(errorMsg);
 					throw new RecognitionException(excep.getMessage());				
 	          	}
           }
@@ -881,15 +931,17 @@
           		//System.out.println("Self expression");
           		e = ExpressionFactory.createSelfExpression(symTab);
           		if(logger.isLoggable(Level.FINE))
-  					logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+e.toString());
+  					logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+e.toString());
    				}catch (SPLException excep) 
 	          	{
 	          		ASTWithLineNumber q = (ASTWithLineNumber)s;
-					logger.severe(excep.getMessage());
-					logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+					//logger.severe(excep.getMessage());
+					errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+					logger.severe(errorMsg);
 					//System.out.println(excep.getMessage());
 					//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-					System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+					//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+					errorList.add(errorMsg);
 					throw new RecognitionException(excep.getMessage());				
 	          	}
           }
@@ -963,7 +1015,7 @@
 	            	if(logger.isLoggable(Level.FINE))
 	            	{
   						logger.fine(Thread.currentThread().getName()+
-  							" CIMSPLTreeParser:: expression created "+e.toString());
+  							" SPLTreeParser:: expression created "+e.toString());
 	            	}		
             	}
             	else
@@ -972,7 +1024,7 @@
             		if(logger.isLoggable(Level.FINE))
             		{
   						logger.fine(Thread.currentThread().getName()+
-  							" CIMSPLTreeParser:: expression created "+e.toString());
+  							" SPLTreeParser:: expression created "+e.toString());
             		}		
             	}			
    
@@ -980,11 +1032,13 @@
             catch(SPLException excep)
             {
             	ASTWithLineNumber q = (ASTWithLineNumber)i1;
-				logger.severe(excep.getMessage());
-				logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+				//logger.severe(excep.getMessage());
+				errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+				logger.severe(errorMsg);
 				//System.out.println(excep.getMessage());
 				//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-				System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+				errorList.add(errorMsg);
 				throw new RecognitionException(excep.getMessage());				
             }
               
@@ -1014,17 +1068,19 @@
 		//System.out.println("createCollectExpression"); 
         expr = ExpressionFactory.createCollectExpression(paramList,postExpr,collectSymbolTable);
         if(logger.isLoggable(Level.FINE))
-  			logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+expr.toString());
+  			logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+expr.toString());
    
 	}
 	catch (SPLException excep)  
 	{
             ASTWithLineNumber q = (ASTWithLineNumber)c;
-			logger.severe(excep.getMessage()); 
-			logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+			//logger.severe(excep.getMessage());
+			errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();  
+			logger.severe(errorMsg);
 			//System.out.println(excep.getMessage());
 			//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-			System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+			//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+			errorList.add(errorMsg);
 			throw new RecognitionException(excep.getMessage());			
 	}	    
 }   
@@ -1045,16 +1101,18 @@
 	{
         exp = ExpressionFactory.createPostCollectExpression(arrExp1, ident,arrExp2 ,pList,cSymTab);
         if(logger.isLoggable(Level.FINE))
-  			logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+exp.toString());
+  			logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+exp.toString());
    }
 	catch (SPLException excep)  
 	{
             ASTWithLineNumber q = (ASTWithLineNumber)id; 
-			logger.severe(excep.getMessage()); 
-			logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+			//logger.severe(excep.getMessage());
+			errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();  
+			logger.severe(errorMsg);
 			//System.out.println(excep.getMessage());
 			//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-			System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+			//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+			errorList.add(errorMsg);
 			throw new RecognitionException(excep.getMessage());			
 	}	 
 }
@@ -1086,7 +1144,7 @@
         expr = ExpressionFactory.createBasicCollectExpression(paramList,collectSymbolTable);
 		if(expr!=null){
 			if(logger.isLoggable(Level.FINE))
-  				logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+expr.toString());
+  				logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+expr.toString());
    
 		}
 		else{
@@ -1098,11 +1156,13 @@
 	catch (SPLException excep)  
 	{
 		ASTWithLineNumber q = (ASTWithLineNumber)c;
-		logger.severe(excep.getMessage());
-		logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+		//logger.severe(excep.getMessage());
+		errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+		logger.severe(errorMsg);
 		//System.out.println(excep.getMessage());
 		//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-		System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+		//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+		errorList.add(errorMsg);
 		throw new RecognitionException(excep.getMessage());	
 	}	    
 }   
@@ -1141,17 +1201,19 @@
 				{
 					ce = ExpressionFactory.createExpression(ni.getText(),TypeConstants.intType);
 					if(logger.isLoggable(Level.FINE))
-  						logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+ce.toString());
+  						logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+ce.toString());
    
 				}
 				catch (SPLException excep) 
 				{
 					ASTWithLineNumber q = (ASTWithLineNumber)ni;
-					logger.severe(excep.getMessage());
-					logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+					//logger.severe(excep.getMessage());
+					errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage(); 
+					logger.severe(errorMsg);
 					//System.out.println(excep.getMessage());
 					//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-					System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+					//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+					errorList.add(errorMsg);
 					throw new RecognitionException(excep.getMessage());	
 				}
 			}
@@ -1161,17 +1223,19 @@
         		{
         			ce = ExpressionFactory.createExpression(cl.getText(),TypeConstants.charType);
         			if(logger.isLoggable(Level.FINE))
-  						logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+ce.toString());
+  						logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+ce.toString());
    
         		}
         		catch (SPLException excep) 
         		{
         			ASTWithLineNumber q = (ASTWithLineNumber)cl;
-					logger.severe(excep.getMessage());
-					logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+					//logger.severe(excep.getMessage());
+					errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage(); 
+					logger.severe(errorMsg);
 					//System.out.println(excep.getMessage());
 					//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-        			System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+        			//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+        			errorList.add(errorMsg);
 					throw new RecognitionException(excep.getMessage());
         		}
         	}
@@ -1181,16 +1245,18 @@
         		{
         			ce = ExpressionFactory.createExpression(sl.getText(),TypeConstants.stringType);
         			if(logger.isLoggable(Level.FINE))
-  						logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+ce.toString());
+  						logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+ce.toString());
    
         		}catch (SPLException excep) 
         		{
         			ASTWithLineNumber q = (ASTWithLineNumber)sl;
-					logger.severe(excep.getMessage());
-					logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+					//logger.severe(excep.getMessage());
+					errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage();
+					logger.severe(errorMsg);
 					//System.out.println(excep.getMessage());
 					//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-        			System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+        			//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+        			errorList.add(errorMsg);
 					throw new RecognitionException(excep.getMessage());
         		}
         	}
@@ -1200,17 +1266,19 @@
         		{
         			ce = ExpressionFactory.createExpression(nf.getText(),TypeConstants.floatType);
         			if(logger.isLoggable(Level.FINE))
-  						logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+ce.toString());
+  						logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+ce.toString());
    
         		}
         		catch (SPLException excep) 
         		{
         			ASTWithLineNumber q = (ASTWithLineNumber)nf;
-					logger.severe(excep.getMessage());
-					logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+					//logger.severe(excep.getMessage());
+					errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage(); 
+					logger.severe(errorMsg);
 					//System.out.println(excep.getMessage());
 					//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-        			System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+        			//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+        			errorList.add(errorMsg);
 					throw new RecognitionException(excep.getMessage());
         		}
         	}
@@ -1220,17 +1288,19 @@
         		{
         			ce = ExpressionFactory.createExpression(nl.getText(),TypeConstants.longType);
         			if(logger.isLoggable(Level.FINE))
-  						logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+ce.toString());
+  						logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+ce.toString());
    
         		}
         		catch (SPLException excep) 
         		{
         			ASTWithLineNumber q = (ASTWithLineNumber)nl;
-					logger.severe(excep.getMessage());
-					logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+					//logger.severe(excep.getMessage());
+					errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage(); 
+					logger.severe(errorMsg);
 					//System.out.println(excep.getMessage());
 					//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-        			System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+        			//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+        			errorList.add(errorMsg);
 					throw new RecognitionException(excep.getMessage());
         		}
         	}
@@ -1240,17 +1310,19 @@
         		{
         			ce = ExpressionFactory.createExpression(nd.getText(),TypeConstants.doubleType);
         			if(logger.isLoggable(Level.FINE))
-  						logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: expression created "+ce.toString());
+  						logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: expression created "+ce.toString());
    
         		} 
         		catch (SPLException excep) 
         		{
         			ASTWithLineNumber q = (ASTWithLineNumber)nd;
-					logger.severe(excep.getMessage());
-					logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
+					//logger.severe(excep.getMessage());
+					errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + excep.getMessage(); 
+					logger.severe(errorMsg);
 					//System.out.println(excep.getMessage());
 					//System.out.println("TreeParser::Exception inserting symbol at line "+q.getLine());
-        			System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+        			//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+excep.getMessage());
+        			errorList.add(errorMsg);
 					throw new RecognitionException(excep.getMessage());
         		}
         	}
@@ -1258,7 +1330,7 @@
 
 
 
-actionBlock[SPLSymbolTable symTab] returns [ActionBlock ab = null]
+actionBlock[SPLSymbolTable symTab] returns [ActionBlock ab = null] 
 {
   ActionBlock ab1 = null;
   ActionBlock ab2 = null;
@@ -1268,21 +1340,21 @@
                 {
                  	ab = ActionFactory.createAction(ab1,ab2,ARROW,symTab); 
                  	if(logger.isLoggable(Level.FINE))
-  						logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: ARROW ActionBlock created ");
+  						logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: ARROW ActionBlock created ");
    
                 }
                 |#(LOR ab1 = actionBlock[symTab] ab2 = actionBlock[symTab]) 
                 {
                 	ab = ActionFactory.createAction(ab1,ab2,LOR,symTab); 
                 	if(logger.isLoggable(Level.FINE))
-  						logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: LOR ActionBlock created ");
+  						logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: LOR ActionBlock created ");
    
                 }
                 |#(LAND ab1 = actionBlock[symTab] ab2 = actionBlock[symTab])
                 {
                 	ab = ActionFactory.createAction(ab1,ab2,LAND,symTab); 
                 	if(logger.isLoggable(Level.FINE))
-  						logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: LAND ActionBlock created ");
+  						logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: LAND ActionBlock created ");
    
                 }
                 |#(BOR ab1 = actionBlock[symTab] ab2 = actionBlock[symTab]) 
@@ -1296,7 +1368,7 @@
        ;
                              
                         
-basicActionBlock[SPLSymbolTable symTab] returns [ActionBlock ab=null] :
+basicActionBlock[SPLSymbolTable symTab] returns [ActionBlock ab=null]  :
 {
     	String st = "";
     	String op = "";
@@ -1375,20 +1447,21 @@
 			// System.out.println("creating action : "+ident1+" "+ident2+" "+st+" "+op);
 			ab = ActionFactory.createAction(ident1, paramList, identTupleList, isBuiltInMethod, st, op, c, symTab);
 			if(logger.isLoggable(Level.FINE))
-				logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: basicActionBlock created ");
+				logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: basicActionBlock created ");
        }
        catch (SPLException ex)
        {
 			ASTWithLineNumber q = (ASTWithLineNumber)i1;
-			logger.severe(ex.getMessage());
-			logger.severe(Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine());
-			System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+ex.getMessage());
-			throw new RecognitionException(ex.getMessage());
+			//logger.severe(ex.getMessage());
+			errorMsg = Thread.currentThread().getName()+" "+"TreeParser::Exception creating Expression at line "+q.getLine() + " : " + ex.getMessage();
+			logger.severe(errorMsg);
+			//System.err.println("$SPLTreeParser$ Error at line no#"+q.getLine()+":"+ex.getMessage());
+			errorList.add(errorMsg);
        }		 	
 	}                 
 ;    
 
-policyGroup[SPLSymbolTable symTab] returns [PolicyGroup pg = null]:
+policyGroup[SPLSymbolTable symTab] returns [PolicyGroup pg = null]  :
 {
    String assocName = "CIM_Component";
    String role1="GroupComponent";
@@ -1401,7 +1474,7 @@
    
    pg = new PolicyGroup(assocName,role1,role2,c,p.getText(),symTab);
    if(logger.isLoggable(Level.FINE))
-  		logger.fine(Thread.currentThread().getName()+" CIMSPLTreeParser:: PolicyGroup created ");
+  		logger.fine(Thread.currentThread().getName()+" SPLTreeParser:: PolicyGroup created ");
          
 }        
 ;    

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/datastore/PolicyDataStore.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/datastore/PolicyDataStore.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/datastore/PolicyDataStore.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/datastore/PolicyDataStore.java Mon Aug 18 05:50:36 2008
@@ -17,7 +17,6 @@
  * under the License.  
  */
 
-
 /**
  * @author Prashant Baliga <prabalig@in.ibm.com>
  *
@@ -25,7 +24,6 @@
 
 package org.apache.imperius.spl.datastore;
 
-
 import java.util.List;
 import java.util.Map;
 
@@ -33,39 +31,35 @@
 import org.apache.imperius.spl.parser.statements.impl.PolicyInfo;
 import org.apache.imperius.spl.parser.statements.impl.SPLPolicy;
 
-
-public interface PolicyDataStore
+public interface PolicyDataStore 
 {
-    
-    public String getPolicy(String policyName)
-            throws SPLException;
-    
-    public PolicyInfo getPolicyInfo(String policyName)
-    throws SPLException;
-    
-    public boolean createPolicy(String policyName, String policyString) throws SPLException;
-    
-    public boolean validatePolicyString(String policyString) throws SPLException;
-    
-    
-    public SPLPolicy createSPLPolicyObject(String policyName, String policyString) 
-	throws SPLException;
-	
-    public void updatePolicy(String policyName, String policyString) throws SPLException;
-    
-    public void deletePolicy(String policyName)
-            throws SPLException;
-    
-    public Map getAllPolicies() throws SPLException;
-    
-    public List getAllPolicyNames() throws SPLException;
-    
-    public void init() throws SPLException;
-    
-    public void shutdown();
-    
-       
-    public SPLPolicy getInternalPolicyObject(String PolicyRuleName)
-            throws SPLException;
-    
+	public String getPolicy(String policyName) throws SPLException;
+
+	public PolicyInfo getPolicyInfo(String policyName) throws SPLException;
+
+	public boolean createPolicy(String policyName, String policyString)
+			throws SPLException;
+
+	public boolean validatePolicyString(String policyString)
+			throws SPLException;
+
+	public SPLPolicy createSPLPolicyObject(String policyName,
+			String policyString) throws SPLException;
+
+	public void updatePolicy(String policyName, String policyString)
+			throws SPLException;
+
+	public void deletePolicy(String policyName) throws SPLException;
+
+	public Map getAllPolicies() throws SPLException;
+
+	public List getAllPolicyNames() throws SPLException;
+
+	public void init() throws SPLException;
+
+	public void shutdown();
+
+	public SPLPolicy getInternalPolicyObject(String PolicyRuleName)
+			throws SPLException;
+
 }

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/datastore/PolicyRepository.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/datastore/PolicyRepository.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/datastore/PolicyRepository.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/datastore/PolicyRepository.java Mon Aug 18 05:50:36 2008
@@ -34,7 +34,8 @@
 
 public interface PolicyRepository
 {
-    
+	public static final String REPOSITORY_FILE_NAME = "PolicyStorage.DAT"; //$NON-NLS-1$
+	
     public String getPolicyString(String PolicyRuleName) throws SPLException;
             
     

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/datastore/impl/PolicyCache.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/datastore/impl/PolicyCache.java?rev=686743&r1=686742&r2=686743&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/datastore/impl/PolicyCache.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/datastore/impl/PolicyCache.java Mon Aug 18 05:50:36 2008
@@ -17,7 +17,6 @@
  * under the License.  
  */
 
-
 /**
  * @author Prashant Baliga <prabalig@in.ibm.com>
  *
@@ -30,87 +29,94 @@
 
 import org.apache.imperius.spl.parser.exceptions.SPLException;
 import org.apache.imperius.spl.parser.statements.impl.SPLPolicy;
-
+import org.apache.imperius.util.Messages;
 
 public class PolicyCache 
 {
-    private Map _policyCache = new Hashtable();
-    private static PolicyCache singletonObj = null;
+	private Map _policyCache = new Hashtable();
+	private static PolicyCache singletonObj = null;
+
+	private PolicyCache() 
+	{
+
+	}
 
-    private PolicyCache()
-    {
-        
-    }
-    
-    public static synchronized PolicyCache getInstance()
-    {
-        if(singletonObj == null)
-        {
-            singletonObj = new PolicyCache();
-        }
-        return singletonObj;
-    }
-    
-    public boolean policyExists(String policyName)
-    {
-        if (!_policyCache.containsKey(policyName))
-        {
-            return false;
-        }
-        return true;
-    }
-    
-    public synchronized boolean insertPolicy(String policyName, SPLPolicy policyObject)
-    {
-        if (!policyExists(policyName))
-        {
-            _policyCache.put(policyName,policyObject);
-            return true;
-        }
-        else
-        {
-            return false;
-        }
-    }
-    
-    public boolean updatePolicy(String policyName, SPLPolicy policyObject)
-        throws SPLException
-    {
-        if(policyExists(policyName))
-        {
-            _policyCache.remove(policyName);
-            _policyCache.put(policyName, policyObject);
-            return true;
-        }
-        else
-        {
-            throw new SPLException("policy does not exist in cache");
-        }
-    }
-
-    public synchronized boolean deletePolicy(String policyName) throws SPLException
-    {
-        if(policyExists(policyName))
-        {
-            _policyCache.remove(policyName);
-            return true;
-        }
-        else
-        {
-            return false;
-        }
-    }
-
-    public synchronized SPLPolicy getPolicy(String policyName) throws SPLException
-    {
-        if(policyExists(policyName))
-        {
-            SPLPolicy pol = (SPLPolicy)_policyCache.get(policyName);
-            return pol;
-        }
-        else
-        {
-            throw new SPLException("policy does not exist in cache");
-        }
-    }
+	public static synchronized PolicyCache getInstance() 
+	{
+		if (singletonObj == null) 
+		{
+			singletonObj = new PolicyCache();
+		}
+		return singletonObj;
+	}
+
+	public boolean policyExists(String policyName)
+	{
+		if (!_policyCache.containsKey(policyName)) 
+		{
+			return false;
+		}
+		return true;
+	}
+
+	public synchronized boolean insertPolicy(String policyName,
+			SPLPolicy policyObject) 
+	{
+		if (!policyExists(policyName)) 
+		{
+			_policyCache.put(policyName, policyObject);
+			return true;
+		} 
+		else 
+		{
+			return false;
+		}
+	}
+
+	public boolean updatePolicy(String policyName, SPLPolicy policyObject)
+			throws SPLException 
+	{
+		if (policyExists(policyName)) 
+		{
+			_policyCache.remove(policyName);
+			_policyCache.put(policyName, policyObject);
+			return true;
+		} 
+		else 
+		{
+			throw new SPLException(
+					Messages
+							.getString("SPL_POLICY_DOES_NOT_EXIST_IN_CACHE_EXCEPTION_MSG"));
+		}
+	}
+
+	public synchronized boolean deletePolicy(String policyName)
+			throws SPLException 
+	{
+		if (policyExists(policyName)) 
+		{
+			_policyCache.remove(policyName);
+			return true;
+		} 
+		else 
+		{
+			return false;
+		}
+	}
+
+	public synchronized SPLPolicy getPolicy(String policyName)
+			throws SPLException 
+	{
+		if (policyExists(policyName)) 
+		{
+			SPLPolicy pol = (SPLPolicy) _policyCache.get(policyName);
+			return pol;
+		} 
+		else 
+		{
+			throw new SPLException(
+					Messages
+							.getString("SPL_POLICY_DOES_NOT_EXIST_IN_CACHE_EXCEPTION_MSG"));
+		}
+	}
 }



Mime
View raw message