public final class SmcSyntaxChecker extends SmcVisitor
SmcElement
Constructor and Description |
---|
SmcSyntaxChecker(java.lang.String fsm,
SmcParser.TargetLanguage targetLanguage)
Creates a syntax checker for the named FSM and target
programming language.
|
Modifier and Type | Method and Description |
---|---|
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.
|
visit
public SmcSyntaxChecker(java.lang.String fsm, SmcParser.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 java.util.List<SmcMessage> getMessages()
public void visit(SmcFSM fsm)
SmcVisitor
visit
in class SmcVisitor
fsm
- The top-level finite state machine element.public void visit(SmcMap map)
SmcVisitor
visit
in class SmcVisitor
map
- A finite state machine submap.public void visit(SmcState state)
SmcVisitor
visit
in class SmcVisitor
state
- A finite state machine state.public void visit(SmcTransition transition)
SmcVisitor
visit
in class SmcVisitor
transition
- A finite state machine state transition.public void visit(SmcGuard guard)
SmcVisitor
visit
in class SmcVisitor
guard
- A state tansition guard.public void visit(SmcParameter parameter)
SmcVisitor
visit
in class SmcVisitor
parameter
- A state transition parameter.Copyright © 2015. Charles W. Rapp. All Rights Reserved. Use is subject to license terms.