SMC
6_0_1

net.sf.smc
Class SmcSyntaxChecker

java.lang.Object
  extended by net.sf.smc.model.SmcVisitor
      extended by net.sf.smc.SmcSyntaxChecker

public final class SmcSyntaxChecker
extends SmcVisitor

Performs a global syntax check on the various elements of the abstract syntax tree. This includes:

See Also:
SmcElement

Constructor Summary
SmcSyntaxChecker(java.lang.String fsm, SmcParser.TargetLanguage targetLanguage)
          Creates a syntax checker for the named FSM and target programming language.
 
Method Summary
 java.util.List<SmcMessage> getMessages()
          Returns a list of warning and error messages.
 boolean isValid()
          Returns true if no errors were found and false if there are syntax errors.
 void visit(SmcFSM fsm)
          Visits the top-level finite state machine element.
 void visit(SmcGuard guard)
          Visits a state tansition guard.
 void visit(SmcMap map)
          Visits a finite state machine submap.
 void visit(SmcParameter parameter)
          Visits a state transition parameter.
 void visit(SmcState state)
          Visits a finite state machine state.
 void visit(SmcTransition transition)
          Visits a finite state machine state transition.
 
Methods inherited from class net.sf.smc.model.SmcVisitor
visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmcSyntaxChecker

public SmcSyntaxChecker(java.lang.String fsm,
                        SmcParser.TargetLanguage targetLanguage)
Creates a syntax checker for the named FSM and target programming language.

Parameters:
fsm - the finite state machine's name.
targetLanguage - the target programming language.
Method Detail

isValid

public boolean isValid()
Returns true if no errors were found and false if there are syntax errors.

Returns:
true if no errors were found and false if there are syntax errors.

getMessages

public java.util.List<SmcMessage> getMessages()
Returns a list of warning and error messages.

Returns:
a list of warning and error messages.

visit

public void visit(SmcFSM fsm)
Description copied from class: SmcVisitor
Visits the top-level finite state machine element.

Overrides:
visit in class SmcVisitor
Parameters:
fsm - The top-level finite state machine element.

visit

public void visit(SmcMap map)
Description copied from class: SmcVisitor
Visits a finite state machine submap.

Overrides:
visit in class SmcVisitor
Parameters:
map - A finite state machine submap.

visit

public void visit(SmcState state)
Description copied from class: SmcVisitor
Visits a finite state machine state.

Overrides:
visit in class SmcVisitor
Parameters:
state - A finite state machine state.

visit

public void visit(SmcTransition transition)
Description copied from class: SmcVisitor
Visits a finite state machine state transition.

Overrides:
visit in class SmcVisitor
Parameters:
transition - A finite state machine state transition.

visit

public void visit(SmcGuard guard)
Description copied from class: SmcVisitor
Visits a state tansition guard.

Overrides:
visit in class SmcVisitor
Parameters:
guard - A state tansition guard.

visit

public void visit(SmcParameter parameter)
Description copied from class: SmcVisitor
Visits a state transition parameter.

Overrides:
visit in class SmcVisitor
Parameters:
parameter - A state transition parameter.

SMC
6_0_1

Copyright © 2009. Charles W. Rapp. All Rights Reserved. Use is subject to license terms.