1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.asn1new.ber.grammar;
18
19 /***
20 * This interface is used to store the different states of a grammar. While
21 * tracing debugging information, the methods to dump the current state
22 * as a string are called.
23 *
24 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
25 */
26 public interface IStates {
27 /*** The initial state of every grammar */
28 static int INIT_GRAMMAR_STATE = 0;
29
30 /*** The ending state for every grammars */
31 static int GRAMMAR_END = -1;
32
33 /*** The END_STATE */
34 static int END_STATE = -1;
35
36 /*** The mask to filter grammar switch */
37 final static int GRAMMAR_SWITCH_MASK = 0xFF00;
38
39 /*** The mask to filter states transition */
40 final static int STATES_SWITCH_MASK = 0x00FF;
41
42 /*** Get the current state for a specified grammar */
43 String getState( int grammar, int state );
44
45 /*** Return the grammar name from a grammar */
46 String getGrammarName(IGrammar grammar);
47
48 /*** Return the grammar name from a grammar number */
49 String getGrammarName(int grammar);
50 }