`frozenset` and `frozendict` comprehensions

Of course it is possible as it was done here using special code in the production rules to provide syntax error suggestions for || and && (which are actually tokenized as two tokens), however this is done here only for invalid rules. And, yes, using the production rules for deciding if a rule should be accepted is a hack.

If you want to make it happen also for valid rules, that would be possible in theory. However that would mean that aspects of the valid syntax would not show up in the Full Grammar specification, defeating the purpose of a Full Grammar specification.

There was a discussion on that approach recently showing all the problems with the {{-approach.

1 Like