[all-commits] [llvm/llvm-project] a2fab8: [pseudo] Implement LRTable.

Haojian Wu via All-commits all-commits at lists.llvm.org
Wed Feb 23 00:21:52 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a2fab82f33bb8cc38cd1dfe7856dae706ce4297a
      https://github.com/llvm/llvm-project/commit/a2fab82f33bb8cc38cd1dfe7856dae706ce4297a
  Author: Haojian Wu <hokein.wu at gmail.com>
  Date:   2022-02-23 (Wed, 23 Feb 2022)

  Changed paths:
    M clang/include/clang/Tooling/Syntax/Pseudo/Grammar.h
    A clang/include/clang/Tooling/Syntax/Pseudo/LRTable.h
    M clang/lib/Tooling/Syntax/Pseudo/CMakeLists.txt
    M clang/lib/Tooling/Syntax/Pseudo/Grammar.cpp
    M clang/lib/Tooling/Syntax/Pseudo/GrammarBNF.cpp
    A clang/lib/Tooling/Syntax/Pseudo/LRTable.cpp
    A clang/lib/Tooling/Syntax/Pseudo/LRTableBuild.cpp
    M clang/test/Syntax/check-cxx-bnf.test
    A clang/test/Syntax/lr-build-basic.test
    A clang/test/Syntax/lr-build-conflicts.test
    M clang/tools/clang-pseudo/ClangPseudo.cpp
    M clang/unittests/Tooling/Syntax/Pseudo/CMakeLists.txt
    R clang/unittests/Tooling/Syntax/Pseudo/LRGraphTest.cpp
    A clang/unittests/Tooling/Syntax/Pseudo/LRTableTest.cpp

  Log Message:
  -----------
  [pseudo] Implement LRTable.

This patch introduces a dense implementation of the LR parsing table, which is
used by LR parsers.

We build a SLR(1) parsing table from the LR(0) graph.

Statistics of the LR parsing table on the C++ spec grammar:
  - number of states: 1449
  - number of actions: 83069
  - size of the table (bytes): 334928

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




More information about the All-commits mailing list