Hi Dan,
MariaDB (5.2.0+) supports virtual columns and the syntax is
<type> [GENERATED ALWAYS] AS ( <expression> ) [VIRTUAL | PERSISTENT] [UNIQUE] [UNIQUE KEY] [COMMENT <text>]
While implementing [1], to add parser support for virtual columns, I tried to model this syntax using $FIELD_OPTIONS [2]. Even though I am able to retrieve the expression this way, all the brackets and spaces of the expression are gone. As I understand, this due to the tokenization.
Do you have any suggestion for an alternative approach?