Standalone Parser for PL/pgSQL
От | Matt Miller |
---|---|
Тема | Standalone Parser for PL/pgSQL |
Дата | |
Msg-id | 1121286839.8246.49.camel@dbamm01-linux обсуждение исходный текст |
Ответы |
Re: Standalone Parser for PL/pgSQL
|
Список | pgsql-general |
I'd like (to find or make) a utility that inputs the code of a Pl/pgSQL function (e.g. from a text file or from STDIN, and then parses the function definition, building a complete symbol table. I would then write C code that walks that symbol table and does stuff. As a starting point I'd be happy if I could just visit each node in the symbol table and dump that node out to another file. I'm thinking that the code in src/pl/plpgsql/src is where to start, but I need some guidance sorting through that stuff. I understand (in theory, anyway) how flex and bison work, so maybe I just need a bit of hand-holding to get a simple standalone PL/pgSQL parser up and running. I want to analyze/transform some Oracle PL/SQL procs, and PL/pgSQL is so close to PL/SQL that I figured that a PL/pgSQL parser would be a good starting point.
В списке pgsql-general по дате отправления: