with my_alias as (
select * from view1@DBLINK1)
select (select * from view27 v27 where v27.col1 = a.col3)
from (select * from table1) a,
(select * from (select * from my_alias) b,
where c.fk = b.pk) d
where d.fk = a.pk
The with clause and inline views (in both the select and from clauses) and would cause many problems with anything but a reasonably close match to the SQL engine defined in Parse::RecDescent. I've previously written a tool to cross-reference function and procedure calls across packages which was hard enough to get right, parsing SQL to get a meaningful list of dependent objects would be a whole order of magnitude harder, IMO. I'm not saying it can't be done, I'm just pointing out that just looking for words after "from" wouldn't cut the mustard.