directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r161402 - directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/grammar/GrammarTransition.java
Date Fri, 15 Apr 2005 05:45:42 GMT
Author: elecharny
Date: Thu Apr 14 22:45:42 2005
New Revision: 161402

URL: http://svn.apache.org/viewcvs?view=rev&rev=161402
Log:
Changed a parameter of thz constructor. We now pass a numeric value instead of a String for
the transition name.
It's easier to correct a bad name, as it's now done in StatesEnum.

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/grammar/GrammarTransition.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/grammar/GrammarTransition.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/grammar/GrammarTransition.java?view=diff&r1=161401&r2=161402
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/grammar/GrammarTransition.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/grammar/GrammarTransition.java
Thu Apr 14 22:45:42 2005
@@ -33,21 +33,21 @@
     /** The action associated to the transition */
     private GrammarAction action;
 
-    /** A name is given to each transition, for debuging purpose */
-    private String        name;
+    /** The current state */
+    private int        currentState;
 
     //~ Constructors -------------------------------------------------------------------------------
 
     /**
      * Creates a new GrammarTransition object.
      *
-     * @param name The transition's name
+     * @param currentState The current transition 
      * @param nextState The target state
      * @param action The action to execute. It could be null.
      */
-    public GrammarTransition(  String name, int nextState, GrammarAction action )
+    public GrammarTransition(  int currentState, int nextState, GrammarAction action )
     {
-        this.name      = name;
+        this.currentState      = currentState;
         this.nextState = nextState;
         this.action    = action;
     }
@@ -99,8 +99,8 @@
 
         StringBuffer sb = new StringBuffer();
 
-        sb.append( "Transition <" ).append( name ).append( ", " )
-          .append( StatesEnum.getState( grammar, nextState ) ).append( ", " )
+        sb.append( "Transition from <" ).append( StatesEnum.getState( grammar, currentState
) ).append( "> to <" )
+          .append( StatesEnum.getState( grammar, nextState ) ).append( ">, action : "
)
           .append( ( ( action == null ) ? "no action" : action.toString() ) ).append( ">"
);
 
         return sb.toString();



Mime
View raw message