Pseudo-SQL: searching for Parser/Rewriter
hartmut Goebel
hartmut at oberon.noris.de
Sun Jan 2 08:58:30 EST 2000
Hello everyone,
I'm looking for a general purpose tokenizer/parser/rewriter for Python. If a
parser is available, it best should return a simple parse tree.
I need to rewrite Pseudo-SQL statements for hiding complex table layouts.
This sould convert eg.
FromName = 'hugo' or FromName = 'Hans' and ToName = 'me'
into
select ID from messages where
sender in (select ID from adresses where name='hugo' or name='Hans')
AND
ID in (select msgID from receivers where
type = 'to'
and
addrID in ( select ID from addresses where name='me' )
)
Huh, now I see how complicated this will become, I consider dropping this
feature ;-)
+++hartmut
More information about the Python-list
mailing list