You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2005/04/23 08:09:20 UTC

svn commit: r164345 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/grammar/IStates.java

Author: elecharny
Date: Fri Apr 22 23:09:19 2005
New Revision: 164345

URL: http://svn.apache.org/viewcvs?rev=164345&view=rev
Log:
Added this interface in order to split the StatesEnum class to specific classes, depending on the grammars.

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

Added: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/grammar/IStates.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/grammar/IStates.java?rev=164345&view=auto
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/grammar/IStates.java (added)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/grammar/IStates.java Fri Apr 22 23:09:19 2005
@@ -0,0 +1,37 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.asn1.ber.grammar;
+
+/**
+ * This interface is used to store the different states of a grammar. While
+ * tracing debugging information, the methods to dump the current state
+ * as a string are called.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public interface IStates {
+    /** The initial state of every grammar */
+    public static int INIT_GRAMMAR_STATE = 0;
+
+    /** The ending state for every grammars */
+    public static int GRAMMAR_END = -1;
+
+    /** The mask to filter between states transition and grammar switch */
+    public final static int GRAMMAR_SWITCH_MASK = 0x0F00;
+    
+    String getState( int grammar, int state );
+}