public class GffAutomatonParser extends java.lang.Object implements AutomatonParser
| Modifier and Type | Class and Description |
|---|---|
protected static class |
GffAutomatonParser.Element
The main sections of the XML document
|
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,AtomicEvent> |
m_events
A map between atomic symbols and atomic events
|
protected int |
m_labelCnt
A counter to give unique names to events
|
protected static java.util.regex.Pattern |
s_atomPattern
The regex pattern matching the proposition tag
|
protected static java.util.regex.Pattern |
s_fromPattern
The regex pattern matching the source state tag
|
protected static java.util.regex.Pattern |
s_idPattern
The regex pattern matching the initial state ID tag
|
protected static java.util.regex.Pattern |
s_labelPattern
The regex pattern matching the label tag (first variant)
|
protected static java.util.regex.Pattern |
s_readPattern
The regex pattern matching the label tag (second variant)
|
protected static java.util.regex.Pattern |
s_statePattern
The regex pattern matching the state ID attribute
|
protected static java.util.regex.Pattern |
s_toPattern
The regex pattern matching the source state tag
|
| Constructor and Description |
|---|
GffAutomatonParser()
Creates a new instance of the parser.
|
| Modifier and Type | Method and Description |
|---|---|
protected AtomicEvent |
getLabel(java.lang.String labels) |
Automaton |
parse(java.util.Scanner scanner,
java.lang.String title)
Parses an automaton.
|
Automaton |
parse(java.lang.String content,
java.lang.String title)
Parses an automaton.
|
void |
reset()
Resets the parser.
|
protected static final transient java.util.regex.Pattern s_atomPattern
protected static final transient java.util.regex.Pattern s_fromPattern
protected static final transient java.util.regex.Pattern s_toPattern
protected static final transient java.util.regex.Pattern s_labelPattern
protected static final transient java.util.regex.Pattern s_readPattern
protected static final transient java.util.regex.Pattern s_idPattern
protected static final transient java.util.regex.Pattern s_statePattern
protected transient java.util.Map<java.lang.String,AtomicEvent> m_events
protected int m_labelCnt
public GffAutomatonParser()
public Automaton parse(java.util.Scanner scanner, java.lang.String title)
AutomatonParserparse in interface AutomatonParserscanner - A scanner open on a source of text linestitle - A title given to the automatonpublic Automaton parse(java.lang.String content, java.lang.String title)
AutomatonParserparse in interface AutomatonParsertitle - A title given to the automatonprotected AtomicEvent getLabel(java.lang.String labels)
public void reset()
AutomatonParserreset in interface AutomatonParserCopyright © Sylvain HallĂ©. All Rights Reserved.