diff options
-rw-r--r-- | libdbpp/sqlParse.ll | 4 | ||||
-rw-r--r-- | libdbpp/unittests/parseTest.sql | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/libdbpp/sqlParse.ll b/libdbpp/sqlParse.ll index 5ab7899..7649445 100644 --- a/libdbpp/sqlParse.ll +++ b/libdbpp/sqlParse.ll @@ -60,6 +60,10 @@ scriptdir "$SCRIPTDIR" Comment(YYText()); } +<INITIAL>{term} { + // Random terminator +} + {other} { statement += YYText(); yy_push_state(STATEMENT); diff --git a/libdbpp/unittests/parseTest.sql b/libdbpp/unittests/parseTest.sql index 56eac57..cfba78f 100644 --- a/libdbpp/unittests/parseTest.sql +++ b/libdbpp/unittests/parseTest.sql @@ -9,4 +9,7 @@ INSERT INTO name(t, i) VALUES('string', 3); Multi line comment */ +/*! Stupid MySQL terminates */; +/*! comments with a ;*/; +/*! Because reasons */; |