public final class SmcSyntaxChecker extends SmcVisitor
SmcElement| Constructor and Description |
|---|
SmcSyntaxChecker(String fsm,
TargetLanguage targetLanguage)
Creates a syntax checker for the named FSM and target
programming language.
|
| Modifier and Type | Method and Description |
|---|---|
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)
Verifies that the context class and source files exist.
|
void |
visit(SmcGuard guard)
Checks if the guard has a valid end state.
|
void |
visit(SmcMap map)
Checks the map's states.
|
void |
visit(SmcParameter parameter)
Checks if the parameter types are acceptable.
|
void |
visit(SmcState state)
Checks if the state's transitions contain valid end states.
|
void |
visit(SmcTransition transition)
Checks the transition guards.
|
visitpublic SmcSyntaxChecker(String fsm, TargetLanguage targetLanguage)
fsm - the finite state machine's name.targetLanguage - the target programming language.public boolean isValid()
true if no errors were found and
false if there are syntax errors.true if no errors were found and
false if there are syntax errors.public List<SmcMessage> getMessages()
public void visit(SmcFSM fsm)
visit in class SmcVisitorfsm - verify this FSM instance.public void visit(SmcMap map)
visit in class SmcVisitormap - verify this FSM map.public void visit(SmcState state)
visit in class SmcVisitorstate - verify this FSM state.public void visit(SmcTransition transition)
visit in class SmcVisitortransition - check this FSM transition.public void visit(SmcGuard guard)
visit in class SmcVisitorguard - verify this FSM guard.public void visit(SmcParameter parameter)
visit in class SmcVisitorparameter - verify this FSM parameter.Copyright © 2019. All rights reserved.