Heuristically match a
(vl-parse-property-list-of-arguments &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Our goal is to match
property_list_of_arguments ::= [property_actual_arg] { ',' [property_actual_arg] } { ',' '.' identifier '(' [property_actual_arg] ')' } | '.' identifier ( [property_actual_arg] ) { ',' '.' identifier ( [property_actual_arg] ) }
Here is a slightly revised, equivalent grammar:
named_property_list_of_arguments ::= '.' identifier ( [property_actual_arg] ) { ',' '.' identifier ( [property_actual_arg] ) } property_list_of_arguments ::= [property_actual_arg] { ',' [property_actual_arg] } [named_property_list_of_arguments] | named_property_list_of_arguments
Note that we can match
Distressingly this rule is quite ambiguous. We describe some of the basic
So how can we handle this. One option would be to try to aggressively use
backtracking to find a match. But even then we have to make rather arbitrary
distinctions for expressions like
So I think something I like better is to be a little more restrictive.
Suppose that instead of the full
Coming up with a proper solution to this would probably require a lot of experimentation. This language is so awful...