[PATCH] D127357: [pseudo] wip/prototype: use LR0 instead of SLR1 table

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 21 07:08:19 PDT 2022


sammccall added a comment.

In D127357#3569386 <https://reviews.llvm.org/D127357#3569386>, @hokein wrote:

> Thanks for experimenting this!
>
>> the size of the LR table is much smaller (In this patch we go from 340kB => 120kB, and the encoding isn't efficient)
>
> This is interesting. I'd expect we now add more reduce actions into the LRTable, thus the table size should grow (I guess the saving is because we don't need to store different token kinds, instead just a single `eod` token)?

Yes, before we store (State, Tok) => Reduce(L := R) for every Tok in Follow(L).
Now we only store (State, eod) => Reduce(L := R).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127357/new/

https://reviews.llvm.org/D127357



More information about the cfe-commits mailing list