[libc] add scanf string converters
authorMichael Jones <michaelrj@google.com>
Thu, 3 Nov 2022 21:22:34 +0000 (14:22 -0700)
committerMichael Jones <michaelrj@google.com>
Mon, 7 Nov 2022 21:49:01 +0000 (13:49 -0800)
commit1c40d5ec7dc5b782262c79b0f7a57bfea6fbe75c
treefe618f91061544c0b121e8f686ab854e125b2eb7
parent0c8db885f62713af06116fc02cf19b4e0ba701f4
[libc] add scanf string converters

This patch adds the basic conversion facilities to scanf as well as unit
tests for them. It also adds scanf_main which will be used for the
eventual scanf entrypoints.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D137376
12 files changed:
libc/src/stdio/scanf_core/CMakeLists.txt
libc/src/stdio/scanf_core/converter.cpp [new file with mode: 0644]
libc/src/stdio/scanf_core/converter.h [new file with mode: 0644]
libc/src/stdio/scanf_core/core_structs.h
libc/src/stdio/scanf_core/reader.cpp
libc/src/stdio/scanf_core/reader.h
libc/src/stdio/scanf_core/scanf_main.cpp [new file with mode: 0644]
libc/src/stdio/scanf_core/scanf_main.h [new file with mode: 0644]
libc/src/stdio/scanf_core/string_converter.cpp [new file with mode: 0644]
libc/src/stdio/scanf_core/string_converter.h [new file with mode: 0644]
libc/test/src/stdio/scanf_core/CMakeLists.txt
libc/test/src/stdio/scanf_core/converter_test.cpp [new file with mode: 0644]