The textual representation of KGCL needs a way to cope with the possibility that a textual value associated with a change (e.g., the old or new value of a label, definition, synonym, etc.) may contain quote characters.
There are several possible options:
C-style escape sequences, e.g., create related synonym 'poor man\'s synonym' for EX:0001;
alternating between single- and double-quotes as needed (use single-quotes if the value contains a double-quote and vice-versa) – this does not allow a value to contain both single- and double-quotes simultaneously;
Python-style triple-quoting, e.g. create related synonym '''poor man's synonym''' for EX:0001.
Currently, the Python implementation of KGCL seems to opt for triple-quoting when rendering, but the Lark grammar does not allow that for most literal values: synonyms, labels, and definitions are all ultimately expected to be SINGLE_QUOTE_LITERAL, i.e. can only be enclosed in '...'.
The textual representation of KGCL needs a way to cope with the possibility that a textual value associated with a change (e.g., the old or new value of a label, definition, synonym, etc.) may contain quote characters.
There are several possible options:
create related synonym 'poor man\'s synonym' for EX:0001
;create related synonym '''poor man's synonym''' for EX:0001
.Currently, the Python implementation of KGCL seems to opt for triple-quoting when rendering, but the Lark grammar does not allow that for most literal values: synonyms, labels, and definitions are all ultimately expected to be
SINGLE_QUOTE_LITERAL
, i.e. can only be enclosed in'...'
.