[all-commits] [llvm/llvm-project] fe66ae: [pseudo] Define a clangPseudoCLI library.

Haojian Wu via All-commits all-commits at lists.llvm.org
Thu Jun 30 23:31:52 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fe66aebd755191fac66a73b50d94c29f60be9a88
      https://github.com/llvm/llvm-project/commit/fe66aebd755191fac66a73b50d94c29f60be9a88
  Author: Haojian Wu <hokein.wu at gmail.com>
  Date:   2022-07-01 (Fri, 01 Jul 2022)

  Changed paths:
    M clang-tools-extra/pseudo/benchmarks/Benchmark.cpp
    M clang-tools-extra/pseudo/benchmarks/CMakeLists.txt
    M clang-tools-extra/pseudo/fuzzer/CMakeLists.txt
    M clang-tools-extra/pseudo/fuzzer/Fuzzer.cpp
    M clang-tools-extra/pseudo/include/clang-pseudo/GLR.h
    A clang-tools-extra/pseudo/include/clang-pseudo/Language.h
    A clang-tools-extra/pseudo/include/clang-pseudo/ParseLang.h
    A clang-tools-extra/pseudo/include/clang-pseudo/cli/CLI.h
    M clang-tools-extra/pseudo/include/clang-pseudo/cxx/CXX.h
    M clang-tools-extra/pseudo/include/clang-pseudo/grammar/Grammar.h
    M clang-tools-extra/pseudo/lib/CMakeLists.txt
    A clang-tools-extra/pseudo/lib/cli/CLI.cpp
    A clang-tools-extra/pseudo/lib/cli/CMakeLists.txt
    M clang-tools-extra/pseudo/lib/cxx/CXX.cpp
    M clang-tools-extra/pseudo/tool/CMakeLists.txt
    M clang-tools-extra/pseudo/tool/ClangPseudo.cpp
    M clang-tools-extra/pseudo/unittests/GLRTest.cpp

  Log Message:
  -----------
  [pseudo] Define a clangPseudoCLI library.

- define a common data structure Language which is a compiled result of the
  bnf grammar. It is defined in Language.h;
- creates a clangPseudoCLI lib which defines a grammar commandline flag and
  expose a function to get the Language. 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.

Differential Revision: https://reviews.llvm.org/D128679




More information about the All-commits mailing list