Michelson annotations: mismatch documentation / implementation e.g. %0
The docs
define the annotation format to be
@%|@%%|%@|[@:%][_a-zA-Z][_0-9a-zA-Z\.%@]*
. However, Michelson
parser in the node seems to accept more things, %0
.
arvid@arvid-XPS-15-7590-2:~$ tezos-client run script 'parameter (unit %0); storage unit; code { CAR; NIL operation; PAIR; }' on storage Unit and input Unit
storage
Unit
emitted operations
big_map diff
Also %%
, %.
, ... Is the documentation or the implementation
erroneus? It seems like LIGO depends on this behavior in their
annotations.
Then, on a more (natural language) semantics level, the statements from the documentation:
An annotation is a sequence of characters that matches the regular expression @%|@%%|%@|[@:%][_a-zA-Z][_0-9a-zA-Z.%@]*.
and
An annotation can be empty, in this case it will mean no annotation and can be used as a wildcard. For instance, it is useful to annotate only the right field of a pair instruction PAIR % %right or to ignore field access constraints, e.g. in the macro UNPPAIPAIR %x1 % %x3 %x4.
seem to me a bit contradictory (since an empty annotation is still an annotation, but it doesn't match the regular expression above.)
Credits to Michael from Baking Bad for finding this issue.