diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2022-05-24 17:35:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-24 17:35:04 -0700 |
commit | 3542bd9429529bfd9fbe6a85f8f97a9388ef3c2a (patch) | |
tree | eb938ceda474b88011ade83d4880ec5f252c2ec9 /src/shell-interface.h | |
parent | 4c193ecdfc873201c9feab61b9533216deb53f70 (diff) | |
download | binaryen-3542bd9429529bfd9fbe6a85f8f97a9388ef3c2a.tar.gz binaryen-3542bd9429529bfd9fbe6a85f8f97a9388ef3c2a.tar.bz2 binaryen-3542bd9429529bfd9fbe6a85f8f97a9388ef3c2a.zip |
[Parser] Start a new text format parser (#4680)
Begin implementing a new text format parser that will accept the
standard text format. Start with a lexer that can iterate over
tokens in an underlying text buffer. The initial supported tokens
are integers, parentheses, and whitespace including comments.
The implementation is in a new private internal header so it can
be included into a gtest source file even though it is not meant
to be a public API. Once the parser is more complete, there will
be an additional public header exposing a more concise public API
and the private header will be included into a source file that
implements that public API.
The new parser will improve on the existing text format parser
not only because it will accept the full standard text format,
but also because its code will be simpler and easier to maintain
and because it will hopefully be faster as well. The new parser
will be built out of small functions that closely mirror the
grammar productions given in the spec and will heavily use C++17
features like string_view, optional, and variant to provide more
self-documenting and efficient code.
Future PRs will add support for lexing other kinds of tokens
followed by support for parsing more complex constructs.
Diffstat (limited to 'src/shell-interface.h')
0 files changed, 0 insertions, 0 deletions