Re-implement psql's input scanning to use a flex-generated lexer, as per

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 4b39aa3a7cc51d130016ed8d5e443b436d3ae92d
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2004-02-19T19:40:09Z
Releases: 8.0.0
Re-implement psql's input scanning to use a flex-generated lexer, as per
recent discussion.  The lexer is used for both SQL command text and
backslash commands.  The purpose of this change is to make it easier to
track the behavior of the backend's SQL lexer --- essentially identical
flex rules are now used by psql.  Also, this cleans up a lot of very
squirrelly code in mainloop.c and command.c.  The flex code is somewhat
bulkier than the removed code, but should be lots easier to maintain.

Files

PathChange+/−
src/bin/psql/command.c modified +117 −561
src/bin/psql/command.h modified +4 −7
src/bin/psql/.cvsignore modified +1 −0
src/bin/psql/mainloop.c modified +86 −264
src/bin/psql/Makefile modified +14 −3
src/bin/psql/psqlscan.h added +65 −0
src/bin/psql/psqlscan.l added +1506 −0
src/bin/psql/startup.c modified +11 −2