Message Splitter
MessageSplitter is used to split Avail message names into a sequence of instructions that can be used directly for parsing.
Message splitting occurs in two phases. In the first setPhase, the message is tokenized and parsed into an abstract Expression tree. In the second setPhase, a tuple type of phrase types is supplied, and produces a tuple of integer-encoded ParsingOperations.
Author
Mark van Gulik
Todd L Smith
Parameters
An Avail string specifying the keywords and arguments of some message being defined.
Throws
If the message name is malformed.Constructors
Construct a new MessageSplitter, parsing the provided message into token strings and generating parsing for parsing occurrences of this message.
Types
Functions
Check that an implementation with the given signature is appropriate for a message like this.
Answer whether the given list is correctly internally structured for a send of this message. It must recursively match the expected number of arguments, as well as have the expected permutations in the corresponding recursive Expressions.
Answer a String containing the message name with an indicator inserted to show which area of the message is being parsed by the given program counter.
Answer a tuple of Avail integers describing how to parse this message. See MessageSplitter and ParsingOperation for an understanding of the parse instructions.
Pretty-print a send of this message with given argument phrases.
Properties
The individual tokens (strings) constituting the message.
Return the number of arguments a MethodDefinitionDescriptor implementing this name would accept. Note that this is not necessarily the number of underscores and ellipses, as a guillemet group may contain zero or more underscores/ellipses (and other guillemet groups) but count as one top-level argument.
Answer whether there are any reordered expressions anywhere inside this method name. Reordering is specified by placing circled numbers (e.g., ①, ②) after all argument-yielding Expressions occurring in some Sequence. Either none or all must be numbered within any sequence, and the numbers must be a non-identity permutation (not simply ①, ②, ③, etc.).