RIDDL Documentation
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Entity

(* RIDDL EBNF Grammar For Entity definition *)

entity = entity kind, "entity", "is", "{",
    entity options, entity definitions,
  "}", description ;

entity kind = [ "device" | "actor" | "concept"] ;

entity options = single option | multi options ;

single-option = "option", "is", entity option kinds;

multi-option = "options", "(", { entity option kinds },  ")";

entity option kinds = "event sourced" | "value" | "aggregate" | "persistent" |
   "consistent" | "available";

entity definition =
    handler | feature | function | invariant | typeDef | state;

entity definitions =  entity definition { entity definition } ;

entity state = "state", identifier, "is", "{", identifier, "is", typeExpression, "}", description

State

A state is defined with the state keyword in the content of an entity using this syntax:

state = "state", identifier, "is", aggregate, description

For details see the following production descriptions