I have a number of fragments in an Oracle grammar that I'm trying to translate to ANTLR V4 with a target of C#. The original target was C.
These fragments have a basic format that looks like this:
r_unique : r='UNIQUE' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ;
UNIQUE: 'UNIQUE';
I cannot complete discern the intent here so that I can translate this to ANTLR v4. From what I can tell, the author was creating a new fragment derived from UNIQUE. He associates UNIQUE with the variable r and injects C code that sets the type of the fragment to the type of T_RESERVED. I'm not sure where the author defines or gets user1 from.
If anyone has an idea of what the intent is here and can explain it to me, I would be appreciative.
- Robert Eberhart