[PATCH] D128679: [pseudo] Define a clangPseudoCLI library.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 27 13:21:23 PDT 2022


hokein created this revision.
hokein added a reviewer: sammccall.
Herald added a subscriber: mgorny.
Herald added a project: All.
hokein requested review of this revision.
Herald added a subscriber: alextsao1999.
Herald added a project: clang-tools-extra.

- define a common data structure ParseLang which is a compiled result of the bnf grammar. It is defined in ParseLang.h;
- creates a clangPseudoCLI lib which defines a `grammar` commandline flag and expose a function to get the ParseLang. It supports --grammar=cxx, --grammmar=/path/to/file.bnf;
- Use the clangPseudoCLI in clang-pseudo, fuzzer, and benchmark tools (simplify the code and use the prebuilt cxx grammar);

Split out from https://reviews.llvm.org/D127448 with comments addressed


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D128679

Files:
  clang-tools-extra/pseudo/benchmarks/Benchmark.cpp
  clang-tools-extra/pseudo/benchmarks/CMakeLists.txt
  clang-tools-extra/pseudo/fuzzer/CMakeLists.txt
  clang-tools-extra/pseudo/fuzzer/Fuzzer.cpp
  clang-tools-extra/pseudo/include/clang-pseudo/GLR.h
  clang-tools-extra/pseudo/include/clang-pseudo/ParseLang.h
  clang-tools-extra/pseudo/include/clang-pseudo/cli/CLI.h
  clang-tools-extra/pseudo/include/clang-pseudo/cxx/CXX.h
  clang-tools-extra/pseudo/lib/CMakeLists.txt
  clang-tools-extra/pseudo/lib/cli/CLI.cpp
  clang-tools-extra/pseudo/lib/cli/CMakeLists.txt
  clang-tools-extra/pseudo/lib/cxx/CXX.cpp
  clang-tools-extra/pseudo/tool/CMakeLists.txt
  clang-tools-extra/pseudo/tool/ClangPseudo.cpp
  clang-tools-extra/pseudo/unittests/GLRTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128679.440365.patch
Type: text/x-patch
Size: 29962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220627/fa44584e/attachment-0001.bin>


More information about the cfe-commits mailing list