serenity/Tests
Jan de Visser 5c4890411b LibSQL: Make lexer and parser more standard SQL compliant
SQL was standardized before there was consensus on sane language syntax
constructs had evolved. The language is mostly case-insensitive, with
unquoted text converted to upper case. Identifiers can include lower
case characters and other 'special' characters by enclosing the
identifier with double quotes. A double quote is escaped by doubling it.
Likewise, a single quote in a literal string is escaped by doubling it.

All this means that the strategy used in the lexer, where a token's
value is a StringView 'window' on the source string, does not work,
because the value needs to be massaged before being handed to the
parser. Therefore a token now has a String containing its value. Given
the limited lifetime of a token, this is acceptable overhead.

Not doing this means that for example quote removal and double quote
escaping would need to be done in the parser or in AST node
construction, which would spread lexing basically all over the place.
Which would be suboptimal.

There was some impact on the sql utility and SyntaxHighlighter component
which was addressed by storing the token's end position together with
the start position in order to properly highlight it.

Finally, reviewing the tests for parsing numeric literals revealed an
inconsistency in which tokens we accept or reject: `1a` is accepted but
`1e` is rejected. Related to this is the fate of `0x`. Added a FIXME
reminding us to address this.
2021-06-24 00:36:53 +02:00
..
AK AK: Add support for keeping trailing zeros in fixed precision floats 2021-06-19 16:13:59 +01:00
Kernel Tests: Add a test for ProcFS fd interaction 2021-06-18 10:15:14 +02:00
LibC LibC: Implement strerror_r() 2021-05-25 17:36:02 +02:00
LibCompress Tests: Use ByteBuffer::create_zeroed in TestDeflate instead of memset 2021-05-27 15:18:03 +02:00
LibCore LibCore: Add unit test for File::read_line 2021-06-22 18:54:40 +04:30
LibCpp LibCpp: Add regression tests for the parser 2021-05-19 23:19:07 +02:00
LibCrypto LibCrypto+LibTLS: Split and move test suite into Tests directory 2021-06-19 19:05:36 +04:30
LibELF Tests: Add LibELF tests 2021-05-15 11:02:04 +01:00
LibGfx Tests: Remove default font tests from LibGfx/TestFontHandling 2021-05-21 21:02:43 +02:00
LibJS Everywhere: Add component declarations 2021-06-17 11:03:51 +02:00
LibM Tests: Establish root Tests directory, move Userland/Tests there 2021-05-06 17:54:28 +02:00
LibPthread LibC: Do not include errno.h inside unistd.h 2021-05-14 22:24:02 +02:00
LibRegex Tests: Add test for case-insensitive matching 2021-06-16 16:30:12 +04:30
LibSQL LibSQL: Make lexer and parser more standard SQL compliant 2021-06-24 00:36:53 +02:00
LibTLS LibCrypto+LibTLS: Split and move test suite into Tests directory 2021-06-19 19:05:36 +04:30
LibWasm Meta+LibWasm: Add support for module linking tests 2021-06-22 00:26:25 +04:30
LibWeb Everywhere: Add component declarations 2021-06-17 11:03:51 +02:00
UserspaceEmulator LibC: Move mman.h to sys/mman.h 2021-05-14 22:24:02 +02:00
CMakeLists.txt LibCrypto+LibTLS: Split and move test suite into Tests directory 2021-06-19 19:05:36 +04:30