A 4GL variable is emitted with an L_/M_/G_ prefix and cannot collide with a C#
keyword. A record field keeps the name its schema gave it, and "ref", "out",
"in", "object", "lock" and "event" are ordinary column names - those came out
as
public int? ref;
... x.ref ...
which will not compile.
bad_idents.c already had the mechanism for this and its word list was empty, so
it always answered "fine". That list feeds the parser's reject path, though, and
filling it would make the compiler refuse such programs the way the C back end
does for its own reserved words. C# has a proper escape, so this adds
LEXLIB_A4GL_cs_identifier alongside it: the name survives intact as @ref and
reads back as the same identifier.
Applied at the use site and at all four declaration sites - flat members,
nested records and arrays of records. A second helper handles the declaration
sites, which build the type and the name into one string, so the identifier to
escape is the last token rather than the whole thing.