[PATCH] D126536: [pseudo] Add grammar annotations support.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 1 04:29:20 PDT 2022
hokein updated this revision to Diff 433351.
hokein marked 3 inline comments as done and an inline comment as not done.
hokein added a comment.
[pseudo] Support annotations in the grammar.
This patch adds annotations in the bnf grammar.
Annotations (which has a form of `[key1=value;key2=value]`) specify extensions,
which can be associated with a grammar symbol or a rule.
It provides a way to inject custom code into the general GLR parser, we will
use it for error recovery and more freely control the reduce actions.
This patch is part of D126536 <https://reviews.llvm.org/D126536>, focusing on the grammar level.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126536/new/
https://reviews.llvm.org/D126536
Files:
clang-tools-extra/pseudo/include/clang-pseudo/Grammar.h
clang-tools-extra/pseudo/lib/cxx/CMakeLists.txt
clang-tools-extra/pseudo/lib/grammar/Grammar.cpp
clang-tools-extra/pseudo/lib/grammar/GrammarBNF.cpp
clang-tools-extra/pseudo/unittests/GrammarTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126536.433351.patch
Type: text/x-patch
Size: 9140 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220601/93ed07d1/attachment-0001.bin>
More information about the cfe-commits
mailing list