Commit graph

7 commits

Author SHA1 Message Date
eelke
0cd019db92 Fix for $-quoted strings
Note this does not solve all issues because we are tokenizing contents of strings of which we do not know they contains SQL
when the string is actually not SQL and contains $ the tokenizer gets confused.
2023-01-07 07:41:58 +01:00
eelke
48ac8c6bab Improved generation of c/cpp string from query
Extra lines before and after query are removed. Whitespace at end of line
is removed. SQL comments are converted to cpp style comments and are outside
the string literal.

To achieve this the function now uses the SQLLexer to know what is comment.
This also required the additional capability in the lexer to also return whitespace and newline tokens.
Also a few bugs in the lexer were fixed.
2019-08-19 13:52:23 +02:00
eelke
3b482c1c73 Fix lexer for empty input. 2019-01-28 20:52:39 +01:00
eelke
8f4845d4d2 Lot of code for generating code. Working on unit tests. 2018-09-09 21:04:23 +02:00
eelke
da45929b12 Fix SqlLexer test 2018-09-09 16:20:30 +02:00
eelke
914d2fe9fa Lexical analyzer should now be less confused by dots and comma's and an assortment of other single character symbols. 2018-02-05 22:25:38 +01:00
eelke
ee321b3fb1 Bunch of tests were in header files so they all got compiled when main got compiled.
Prefer to have them in seperate compilation units for faster make times when changing tests.
Also parallel build is faster with seperate cpps.
2018-01-07 09:19:19 +01:00
Renamed from tests/pglabtests/tst_SqlLexer.h (Browse further)