[PATCH] D121150: [pseudo][WIP] Implement a GLR parser.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 7 12:54:27 PST 2022


hokein created this revision.
hokein added a reviewer: sammccall.
Herald added subscribers: mgrang, mgorny.
Herald added a project: All.
hokein requested review of this revision.
Herald added a subscriber: alextsao1999.
Herald added a project: clang.

This patch implements a standard(Tomita's) GLR parsing algorithm, the
core piece of the pseudoparser.

It produces a parse forest sible parse tree) from a given TokenStream.
In the implementation, we use the known graph-structured stack (GSS)
optimization, which shares the common prefixes and suffixes of active
stacks.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121150

Files:
  clang/include/clang/Tooling/Syntax/Pseudo/Forest.h
  clang/include/clang/Tooling/Syntax/Pseudo/GLRParser.h
  clang/lib/Tooling/Syntax/Pseudo/CMakeLists.txt
  clang/lib/Tooling/Syntax/Pseudo/Forest.cpp
  clang/lib/Tooling/Syntax/Pseudo/GLRParser.cpp
  clang/tools/clang-pseudo/ClangPseudo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121150.413602.patch
Type: text/x-patch
Size: 32139 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220307/2d550dd6/attachment-0001.bin>


More information about the cfe-commits mailing list