HHaojian Wu[pseudo] Implement guard extension.
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[pseudo] Define a clangPseudoCLI library. - define a common data structure Language which is a compiled result of the bnf grammar. It is defined in Language.h; - creates a clangPseudoCLI lib which defines a grammar commandline flag and expose a function to get the Language. It supports --grammar=cxx, --grammmar=/path/to/file.bnf; - use the clangPseudoCLI in clang-pseudo, fuzzer, and benchmark tools ( simplify the code and use the prebuilt cxx grammar); Split out from https://reviews.llvm.org/D127448. Differential Revision: https://reviews.llvm.org/D128679 | 3 年前 | |
[pseudo] Implement guard extension. - Extend the GLR parser to allow conditional reduction based on the guard functions; - Implement two simple guards (contextual-override/final) for cxx.bnf; - layering: clangPseudoCXX depends on clangPseudo (as the guard function need to access the TokenStream); Differential Revision: https://reviews.llvm.org/D127448 | 3 年前 | |
[pseudo] Add fuzzer for the pseudoparser. As confirmation, running this locally found 2 crashes: - trivial: crashes on file with no tokens - lexer: hits an assertion failure on bytes: 0x5c,0xa,0x5c,0x1,0x65,0x5c,0xa Differential Revision: https://reviews.llvm.org/D125037 | 4 年前 |