Jeff Garzik
40ad74b2ba
sql.y: separate parse-param params onto separate lines, for compat
...
with older bisons.
2016-07-29 16:43:21 -04:00
Jeff Garzik
1c44fab959
Travis clean-up
2016-07-29 16:32:16 -04:00
Jeff Garzik
51d7f01c3d
Add Travis-CI config
2016-07-29 16:26:07 -04:00
Jeff Garzik
379dc16c5e
Add simple test suite.
2016-07-29 16:24:02 -04:00
Jeff Garzik
4e996af1b1
README: add build docs
2016-07-29 16:16:07 -04:00
Jeff Garzik
49aa79705f
sql.y: program returns success (0) or fail (1)
...
depending on parse outcome.
2016-07-29 09:24:42 -04:00
Jeff Garzik
b3db299602
.gitignore: ignore 'Makefile'
2016-07-29 06:28:30 -04:00
Jeff Garzik
e1e9c6558c
Switch to autoconf/automake/libtool.
...
libtool is included as future preparation for exporting a library.
2016-07-29 06:27:45 -04:00
Jeff Garzik
32043a11c3
Pass parser state ptr to each parser executor callback.
2016-07-28 18:34:21 -04:00
Jeff Garzik
ea2ca5f51b
Move psql_state into sql-parser.h.
2016-07-28 18:14:36 -04:00
Jeff Garzik
c9fe196102
Add LICENSE, README.
2016-07-28 08:43:36 -04:00
Jeff Garzik
0d452ccef6
Fix build with bison 3.0 + reentrant bison + reentrant flex
2016-07-27 23:34:05 -04:00
Jeff Garzik
1cb0591141
sql.y: Add missing semi-colons to statements
2016-07-27 22:20:03 -04:00
Jeff Garzik
dfe7c6a758
Update lexer/parser header: link to book and software for ease and credit.
...
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-11-14 04:32:31 -05:00
Jeff Garzik
63371d1513
const-ify yyerror format arg
...
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-11-09 02:30:52 -05:00
Jeff Garzik
35a5e94310
Convert lexer and parser to be reentrant ("pure lexer" and "pure parser").
...
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-11-09 02:06:10 -05:00
Jeff Garzik
d5e59cd6db
emit() sweep: finish conversion, converting 'strange func call' cases
...
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-11-08 23:52:47 -05:00
Jeff Garzik
ebcaf5895e
emit() sweep: convert everything else, except for strange-func-call cases
...
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-11-08 23:33:06 -05:00
Jeff Garzik
dd1900b02b
emit() sweep: converting several of the stragglers remaining
...
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-11-08 23:11:39 -05:00
Jeff Garzik
38ec0eb526
emit() sweep: convert expressions, values, DELETE and SELECT
...
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-11-08 22:19:53 -05:00
Jeff Garzik
5f11c7e1e0
emit() sweep: convert CREATE TABLE column definition/attribs/constraints
...
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-11-08 21:16:50 -05:00
Jeff Garzik
8948cfcb31
emit() sweep: basics of CREATE TABLE now converted to API form
...
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-11-08 19:32:25 -05:00
Jeff Garzik
af321368f2
Begin replacing emit() placeholders with API function calls
...
CREATE DATABASE, DROP DATABASE, DROP TABLE, sql statement, and list
of table names all have associated API calls.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-11-08 18:57:33 -05:00
Jeff Garzik
93996b7097
sql.y: support DROP DATABASE, DROP TABLE
...
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-11-08 18:31:04 -05:00
Jeff Garzik
b8dbe27f6c
Makefile: create OBJS list, to ease addition of new .c modules
...
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-11-08 18:26:56 -05:00
Jeff Garzik
62870f4575
Check in SQL lexer and parser from John Levine's _Flex & Bison_ O'Reilly book
...
The only changes were those needed to make the newly renamed parser build,
makefile and header file name changes.
Book URL, which describes the parser's construction (chapter 4):
http://oreilly.com/catalog/9780596155988
Software URL: ftp://ftp.iecc.com/pub/file/flexbison.zip
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-11-08 17:34:31 -05:00