directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ersi...@apache.org
Subject svn commit: r519453 - in /directory: apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/trigger/DefaulTriggerServiceITest.java shared/trunk/ldap/src/main/antlr/TriggerSpecification.g
Date Sat, 17 Mar 2007 21:56:43 GMT
Author: ersiner
Date: Sat Mar 17 14:56:43 2007
New Revision: 519453

URL: http://svn.apache.org/viewvc?view=rev&rev=519453
Log:
Fixed TriggerSpecification.g ambiguity.
Made tiny change to test specs to show grammar flexibility about spaces.

Modified:
    directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/trigger/DefaulTriggerServiceITest.java
    directory/shared/trunk/ldap/src/main/antlr/TriggerSpecification.g

Modified: directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/trigger/DefaulTriggerServiceITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/trigger/DefaulTriggerServiceITest.java?view=diff&rev=519453&r1=519452&r2=519453
==============================================================================
--- directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/trigger/DefaulTriggerServiceITest.java
(original)
+++ directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/trigger/DefaulTriggerServiceITest.java
Sat Mar 17 14:56:43 2007
@@ -55,8 +55,8 @@
         // Create the Triger Specification within a Trigger Subentry.
         createTriggerSubentry( "triggerSubentry1",
             "AFTER Delete " +
-            "CALL \"" + BackupUtilities.class.getName() + ".backupDeleted\" ( $ldapContext
\"\", $name, $operationPrincipal, $deletedEntry ); " +
-            "CALL \"" + BackupUtilities.class.getName() + ".duplicateDeletedEntry\" ( $ldapContext
\"\", $name, $operationPrincipal, $deletedEntry );" );
+            "  CALL \"" + BackupUtilities.class.getName() + ".backupDeleted\" ( $ldapContext
\"\", $name, $operationPrincipal, $deletedEntry );" +
+            "CALL \"" + BackupUtilities.class.getName() + ".duplicateDeletedEntry\" ( $ldapContext
\"\", $name, $operationPrincipal, $deletedEntry );  " );
         
         // Create a test entry which is selected by the Trigger Subentry.
         Attributes testEntry = new AttributesImpl( "ou", "testou", true );

Modified: directory/shared/trunk/ldap/src/main/antlr/TriggerSpecification.g
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/antlr/TriggerSpecification.g?view=diff&rev=519453&r1=519452&r2=519453
==============================================================================
--- directory/shared/trunk/ldap/src/main/antlr/TriggerSpecification.g (original)
+++ directory/shared/trunk/ldap/src/main/antlr/TriggerSpecification.g Sat Mar 17 14:56:43
2007
@@ -112,7 +112,7 @@
     spSpecs = new ArrayList<SPSpec>(); 
 }
     :
-    ( SP )* triggerSpec=triggerSpecification ( SP )* EOF
+    ( SP )* triggerSpec=triggerSpecification EOF
     ;
 
 // -----------------------------------------------------------------------------
@@ -160,11 +160,11 @@
     log.debug( "entered modifyOperationAndStoredProcedureCalls()" );
 }
     :
-    ID_modify
+    ID_modify ( SP )+
     ( theCompositeRuleForCallAndSPNameAndSPOptionList
     OPEN_PARAN ( SP )*
         ( modifyStoredProcedureParameterList )?
-    CLOSE_PARAN ( SP )* SEMI
+    CLOSE_PARAN ( SP )* SEMI ( SP )*
     {
     	spSpecs.add( new SPSpec(triggerStoredProcedureName, triggerStoredProcedureOptions, triggerStoredProcedureParameters
) );
     })+
@@ -175,11 +175,11 @@
     log.debug( "entered addOperationAndStoredProcedureCalls()" );
 }
     :
-    ID_add
+    ID_add ( SP )+
     ( theCompositeRuleForCallAndSPNameAndSPOptionList
     OPEN_PARAN ( SP )*
         ( addStoredProcedureParameterList )?
-    CLOSE_PARAN ( SP )* SEMI
+    CLOSE_PARAN ( SP )* SEMI ( SP )*
     {
     	spSpecs.add( new SPSpec(triggerStoredProcedureName, triggerStoredProcedureOptions, triggerStoredProcedureParameters
) );
     }
@@ -191,11 +191,11 @@
     log.debug( "entered deleteOperationAndStoredProcedureCalls()" );
 }
     :
-    ID_delete
+    ID_delete ( SP )+
     ( theCompositeRuleForCallAndSPNameAndSPOptionList
     OPEN_PARAN ( SP )*
         ( deleteStoredProcedureParameterList )?
-    CLOSE_PARAN ( SP )* SEMI
+    CLOSE_PARAN ( SP )* SEMI ( SP )*
     {
     	spSpecs.add( new SPSpec(triggerStoredProcedureName, triggerStoredProcedureOptions, triggerStoredProcedureParameters
) );
     }
@@ -211,10 +211,10 @@
     ( ( ID_modifyDNRename { triggerLdapOperation = LdapOperation.MODIFYDN_RENAME; }
     | ID_modifyDNExport { triggerLdapOperation = LdapOperation.MODIFYDN_EXPORT; }
     | ID_modifyDNImport { triggerLdapOperation = LdapOperation.MODIFYDN_IMPORT; } )
-    theCompositeRuleForCallAndSPNameAndSPOptionList
+    ( SP )+ theCompositeRuleForCallAndSPNameAndSPOptionList
     OPEN_PARAN ( SP )*
         ( modifyDNStoredProcedureParameterList )?
-    CLOSE_PARAN ( SP )* SEMI
+    CLOSE_PARAN ( SP )* SEMI ( SP )*
     {
     	spSpecs.add( new SPSpec(triggerStoredProcedureName, triggerStoredProcedureOptions, triggerStoredProcedureParameters
) );
     }
@@ -235,7 +235,7 @@
     log.debug( "entered theCompositeRuleForCallAndSPNameAndSPOptionList()" );
 }
     :
-    SP ID_CALL
+    ID_CALL
     {
     	triggerStoredProcedureName = null;
     	triggerStoredProcedureParameters = new ArrayList();



Mime
View raw message