lingua-franca
lingua-franca copied to clipboard
Replace the `at` notation with attributes
#977 is going to add support for attributes. In that effort, due to an ambiguity in the grammar caused by the "at" clause, a temporary fix was applied that requires reactor instantiations that use the "at" clause to terminate with a semicolon.
I propose to replace the at
notation entirely with attributes. For example:
@Host(foo@host:port)
or
@Federated(
host: foo@host:port
)
This strikes me as a cleaner and less intrusive solution.
Perhaps, some day, attributes can become configurable using external config files, which could pave the way to achieve what was suggested by @housengw here.
Another solution would be to use "at" instead of "@" for the host assignment.
Well, the "@" is used in IPV4Host, IPV6Host, and NamedHost rules right now to enable the following syntax:
c = new Fed() at user@addr:port;
We can also not have these rules in the grammar and parse a string instead.
I'm not sure about this one. This proposed change strikes me a premature considering there is a larger discussion to be had about this construct.