public class Parser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static FsmLogger |
logger
The logger.
|
Constructor and Description |
---|
Parser() |
Modifier and Type | Method and Description |
---|---|
static QfsmProject |
parse(java.io.File file)
Parse a Qfsm file.
|
static QfsmProject |
parse(java.lang.String path)
Parse a Qfsm file.
|
private static QfsmInitialTransition |
parseInitialTransition(org.w3c.dom.Element itrEl) |
private static QfsmMachine |
parseMachine(org.w3c.dom.Element machineEl) |
private static QfsmProject |
parseProject(org.w3c.dom.Element projectEl) |
private static java.util.List<QfsmState> |
parseStates(java.util.List<org.w3c.dom.Element> elements) |
private static java.util.List<QfsmTransition> |
parseTransitions(java.util.List<org.w3c.dom.Element> elements) |
private static final FsmLogger logger
public static QfsmProject parse(java.lang.String path) throws QfsmException
path
- the file system pathQfsmException
- if parsing fails for any reasonparse(File)
public static QfsmProject parse(java.io.File file) throws QfsmException
QfsmMachine.startStateId
attribute is optional in Qfsm, a
warning will be logged if not defined.QfsmMachine.initialTransition
element is optional in Qfsm, a
warning will be logged if not defined.file
- the input fileQfsmException
- if parsing fails for any reasonprivate static QfsmProject parseProject(org.w3c.dom.Element projectEl) throws QfsmException
QfsmException
private static QfsmMachine parseMachine(org.w3c.dom.Element machineEl) throws QfsmException
QfsmException
private static java.util.List<QfsmState> parseStates(java.util.List<org.w3c.dom.Element> elements) throws QfsmException
QfsmException
private static java.util.List<QfsmTransition> parseTransitions(java.util.List<org.w3c.dom.Element> elements) throws QfsmException
QfsmException
private static QfsmInitialTransition parseInitialTransition(org.w3c.dom.Element itrEl) throws QfsmException
QfsmException
Copyright 2013 Michal Turek, AnotherFSM.