When using the AS option in a "USE FROM" or "REFERENCE FROM" statement the original entity
is undefined during the second pass as shown below. I've attached the UsedAsTest.exp file.
The problem is interesting, the scope within the USE FROM is that
of the "used" schema, but it is defining new identifiers for the
"using" schema. I've a fix that works in this case but doesn't work in
the case where the rename is being done becase of a name collision in the
schemas, which the current software does handle! To test this replace
"PropertyRef" with "Property" in UsedAsTest.exp.
java PrettyPrinter -v UsedAsTest.exp UsedAsTest.pretty
Java Express Pretty Printer - alpha version
by Stephane Lardet (email@example.com)
File reading... done
First pass... done
Second pass... line 8: unexpected token: Property
Pretty printing generation...expecting NAMED_TYPES, found 'ENTITY_ID'