[all-commits] [llvm/llvm-project] 9f38da: [pseudo] Implement the GLR parsing algorithm.

Haojian Wu via All-commits all-commits at lists.llvm.org
Tue May 3 11:28:27 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9f38da258ea75874808e6da756bac831cada180f
  Author: Haojian Wu <hokein.wu at gmail.com>
  Date:   2022-05-03 (Tue, 03 May 2022)

  Changed paths:
    M clang-tools-extra/pseudo/include/clang-pseudo/Forest.h
    A clang-tools-extra/pseudo/include/clang-pseudo/GLR.h
    M clang-tools-extra/pseudo/lib/CMakeLists.txt
    A clang-tools-extra/pseudo/lib/GLR.cpp
    A clang-tools-extra/pseudo/test/glr.cpp
    M clang-tools-extra/pseudo/tool/ClangPseudo.cpp
    M clang-tools-extra/pseudo/unittests/CMakeLists.txt
    A clang-tools-extra/pseudo/unittests/GLRTest.cpp

  Log Message:
  [pseudo] Implement the GLR parsing algorithm.

This patch implements a standard GLR parsing algorithm, the
core piece of the pseudoparser.

- it parses preprocessed C++ code, currently it supports correct code
  only and parse them as a translation-unit;
- it produces a forest which stores all possible trees in an efficient
  manner (only a single node being build for per (SymbolID, Token Range));
  no disambiguation yet;

Reland with a fix for g++'s -fpermissive error on previous declaration `GSS& GSS;`.

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

More information about the All-commits mailing list