incubator-imperius-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From praba...@apache.org
Subject svn commit: r616624 - in /incubator/imperius/trunk/imperius-splcore/src/main: antlr/org/apache/imperius/spl/parser/compiler/cimspl.tree.g java/org/apache/imperius/spl/parser/expression/primary/PrimaryExpression.java
Date Wed, 30 Jan 2008 05:08:49 GMT
Author: prabalig
Date: Tue Jan 29 21:08:48 2008
New Revision: 616624

URL: http://svn.apache.org/viewvc?rev=616624&view=rev
Log:
Bug: Globally declared variables cannot be accessed from within the policies (Key: 	 IMPERIUS-5)

Resolved: The primary Expression did not have recursion enabled while searching for a variable
in the SymbolTable.

Modified:
    incubator/imperius/trunk/imperius-splcore/src/main/antlr/org/apache/imperius/spl/parser/compiler/cimspl.tree.g
    incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expression/primary/PrimaryExpression.java

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=616624&r1=616623&r2=616624&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
Tue Jan 29 21:08:48 2008
@@ -277,7 +277,7 @@
         String arr = "";
 		String typestr="";
 		boolean isArr=false;
-        SPLSymbolTable macroSymTab = new SPLSymbolTable(symTab,2);
+        SPLSymbolTable macroSymTab = new SPLSymbolTable(symTab,SPLSymbolTable.MACRO);
         
         macroSymTab.setSymbolTableType(SPLSymbolTable.MACRO);
         symTab.addChildSymbolTable(macroSymTab);
@@ -430,8 +430,8 @@
 policydef[SPLSymbolTable symTab]  returns [PolicyDefinition pd = null]
      { 
         SPLSymbolTable lclSymTab = new SPLSymbolTable(symTab);
-        symTab.addChildSymbolTable(lclSymTab);
-     //   currSymbolTable = symTab;
+        //symTab.addChildSymbolTable(lclSymTab);
+        //currSymbolTable = symTab;
         DeclarationStatement d = null;
         Expression exp = null;
         ActionBlock dec = null;

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expression/primary/PrimaryExpression.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expression/primary/PrimaryExpression.java?rev=616624&r1=616623&r2=616624&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expression/primary/PrimaryExpression.java
(original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expression/primary/PrimaryExpression.java
Tue Jan 29 21:08:48 2008
@@ -252,7 +252,7 @@
         else
         {
             
-             if( _symTab.symbolExists(_classNameOrInstanceVariableName,false) )
+             if( _symTab.symbolExists(_classNameOrInstanceVariableName,true) )
              {
                  Symbol sym = _symTab.getSymbol(_classNameOrInstanceVariableName);
                  intermediateObject = sym.getValue();



Mime
View raw message