net.sourceforge.chaperon.process
Class LexicalAutomaton

java.lang.Object
  extended bynet.sourceforge.chaperon.process.LexicalAutomaton
All Implemented Interfaces:
java.io.Serializable

public class LexicalAutomaton
extends java.lang.Object
implements java.io.Serializable

The lexical automaton holds all automata for the the lexemes of a lexicon.

Version:
CVS $Id: LexicalAutomaton.java,v 1.3 2003/12/09 19:55:53 benedikta Exp $
Author:
Stephan Michels
See Also:
Serialized Form

Constructor Summary
LexicalAutomaton(int lexemecount)
          Create a lexical automaton.
 
Method Summary
 int getLexemeCount()
          Return the count of lexemes.
 PatternAutomaton getLexemeDefinition(int index)
          Returns the pattern automaton for a lexeme.
 java.lang.String getLexemeSymbol(int index)
          Returns the name of a terminal symbol
 void setLexemeDefinition(int index, PatternAutomaton definition)
          Sets the pattern automaton for a lexeme
 void setLexemeSymbol(int index, java.lang.String symbol)
          Sets the name of a terminal symbol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LexicalAutomaton

public LexicalAutomaton(int lexemecount)
Create a lexical automaton.

Parameters:
lexemecount - Count of lexemes.
Method Detail

setLexemeSymbol

public void setLexemeSymbol(int index,
                            java.lang.String symbol)
Sets the name of a terminal symbol.

Parameters:
index - Index of the lexeme.
symbol - Name of the symbol.

getLexemeSymbol

public java.lang.String getLexemeSymbol(int index)
Returns the name of a terminal symbol

Parameters:
index - Index of the lexeme.
Returns:
Name of the symbol.

setLexemeDefinition

public void setLexemeDefinition(int index,
                                PatternAutomaton definition)
Sets the pattern automaton for a lexeme

Parameters:
index - Index of the lexeme.
definition - Pattern automaton.

getLexemeDefinition

public PatternAutomaton getLexemeDefinition(int index)
Returns the pattern automaton for a lexeme.

Parameters:
index - Index of the lexeme.
Returns:
Pattern automaton.

getLexemeCount

public int getLexemeCount()
Return the count of lexemes.

Returns:
Count of lexemes.


Copyright ? 2003 Chaperon project. All Rights Reserved.