|
SMC 6_0_1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.smc.parser.SmcParser
public final class SmcParser
Reads in a finite state machine definition from an input
stream and returns the
FSM
model. If
parse()
throws an exception, then call
getMessages()
for a list of parser warning and error
messages which explain the problems found with the
FSM definition. A new parser instance must be instantiated for
each unique input stream. A parser instance cannot be reused
for a different stream.
Nested Class Summary | |
---|---|
static class |
SmcParser.TargetLanguage
The currently supported SMC target languages. |
Field Summary | |
---|---|
static int |
LANGUAGE_COUNT
SMC currently supports 16 different target languages. |
Constructor Summary | |
---|---|
SmcParser(java.lang.String name,
java.io.InputStream istream,
SmcParser.TargetLanguage targetLanguage,
boolean debugFlag)
Creates a parser for the named FSM in the given input stream. |
Method Summary | |
---|---|
java.util.List<SmcMessage> |
getMessages()
Returns the parser's warning and error messages list. |
SmcFSM |
parse()
Parses the named FSM in the given input stream and returns the finite state machine. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LANGUAGE_COUNT
Constructor Detail |
---|
public SmcParser(java.lang.String name, java.io.InputStream istream, SmcParser.TargetLanguage targetLanguage, boolean debugFlag)
debugFlag
is true
,
then the parser and lexer debug output will be generated.
name
- the finite state machine's name.istream
- the input stream contains the SMC code.targetLanguage
- Generates code for this target
language.debugFlag
- if true, turn on debug output.Method Detail |
---|
public SmcFSM parse() throws java.io.IOException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
getMessages()
for a list of
parser warnings and errors which explain the problems
found in the FSM defintion.
java.io.IOException
- if there is a problem reading the input stream.
java.lang.IllegalAccessException
- if there is a problem accessing the input stream.
java.lang.reflect.InvocationTargetException
- if there is a parse error.public java.util.List<SmcMessage> getMessages()
|
SMC 6_0_1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |