net.sf.smc
Class SmcParser

java.lang.Object
  extended by net.sf.smc.SmcParser

public final class SmcParser
extends java.lang.Object


Constructor Summary
SmcParser(java.lang.String name, java.io.InputStream istream, 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
 

Constructor Detail

SmcParser

public SmcParser(java.lang.String name,
                 java.io.InputStream istream,
                 boolean debugFlag)
Creates a parser for the named FSM in the given input stream. If debugFlag is true, then the parser and lexer debug output will be generated.

Parameters:
fsmName - the finite state machine's name.
istream - the input stream contains the SMC code.
debugFlag - if true, turn on debug output.
Method Detail

parse

public SmcFSM parse()
             throws java.io.IOException,
                    java.lang.IllegalAccessException,
                    java.lang.reflect.InvocationTargetException
Parses the named FSM in the given input stream and returns the finite state machine.

Throws:
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

getMessages

public java.util.List<SmcMessage> getMessages()
Returns the parser's warning and error messages list.

Returns:
the parser's warning and error messages list.