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

Sam McCall via All-commits all-commits at lists.llvm.org
Tue May 3 06:43:04 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eac22d0754f70df10ea0eb6f59cbd1ef012ab5a4
      https://github.com/llvm/llvm-project/commit/eac22d0754f70df10ea0eb6f59cbd1ef012ab5a4
  Author: Sam McCall <sam.mccall 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;

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




More information about the All-commits mailing list