Second Step – Grammar Syntax For Transition's expression



transitionExpression = [ event ] [ "[" condition "]" ] [ /actions ]



event = string



condition = expr

| expr (compOp | logicOp) condition

| "("condition")"

| notOp condition



actions = TimeoutAction

| Actions



Actions = Actions connectiveOp action



action = "process_messages"

| "publish_all"

| "publish" "." topic "." commType "." msgType "." membersetfunction “(“ val “)”



TimeoutAction = TimeoutAction"."topic"."time



expr = varVal | func "(" args ")"



func = <any_valid_cpp_decleared_function_name>

| TimeoutCheck “(” topic “)”



args = varVal

| varVal "," args



varVal = variable | value



value = constant | stringLiteral | number+



compOp = "<" | "<=" | ">" | ">=" | "==" | "!="



logicOp = "&&" | "||"



notOp = "!"



connectiveOp = ";"



message = topic "." commType "." msgType



variable = message "." member



commType = Signal | State | Data



host = string



topic = string



msgType = string



member = string “(”“ number* “)” ( “.”string “(” number* “)” )



membersetfunction = string ( “(” number* “)” “.” string)*



time = number +



stringLiteral = " string "



string = letter (letter | number | “_” )*



letter = "a" | “A” | "b" | “ B” | "c" | “C” | "d" | "D" | ...



number = “0” | “1” | “2” | “3” …



In case you are using the provided generator and you would like the transition

expression to be true when a message(blackboard' s message) is null you would

have to write topic "." commType "." msgType == NULL in condition expression.



Please in case of a TimeoutAction use always TimeoutCheck first in the condition expression.



GO TO Table Of Contents