Parsing incpmplete statements?

4 views
Skip to first unread message

Ned Batchelder

unread,
Nov 28, 2006, 8:58:18 PM11/28/06
to pyggy
I would like to use PyGgy to parse command-line input, similar to the
way SQL is parsed by a database command-line utility. When entering a
SQL statement, if no semi-colon is encountered, then the prompt changes
to indicate the statement is incomplete, and more input is collected.

I'm not that familiar with the interfaces between PyGgy and PyLly. Is
there a way to do what I want? It seems like I have to feed the first
line to the parser, then determine if the statement is incomplete, and
if so, collect another line of input to continue parsing. Is PyGgy
structured in such a way that I can do that?

--Ned.

Reply all
Reply to author
Forward
0 new messages