Unless you can guarantee that the SQL is in a certain format making it easy to pick out tables, what you will need is a PLSQL/SQL lexical analyser.
See this for details :
Where can I find an official grammar for the PL/SQL programming language?
To illustrate my point, take this example:
SELECT a, b
FROM tabA, tabB
WHERE x = y;
will work if you grep 'FROM[:space:]' | cut -d' ' -f2
.
But, if you have:
SELECT a, b
FROM tabA,
tabB
WHERE c IN ( SELECT x
FROM tabC,
tabD
.
.
Then things get tricky, and you need Lex/Yacc type grammar analyser.
UPDATE, INSERT, DELETE should be fairly simple:
egrep '(UPDATE|INSERT|DELETE)[:space:]' src.sql | cut -d' ' -f2
Should get you started.
But, once you get more flowery layouts you will find it starts to miss things.