
- 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
10 lines
368 B
C++
10 lines
368 B
C++
// RUN: clang-pseudo -grammar=cxx -source=%s --print-forest | FileCheck %s
|
|
// Verify that the contextual-{final,override} rules are guarded conditionally,
|
|
// No ambiguous parsing for the virt-specifier.
|
|
class Foo {
|
|
void foo1() override;
|
|
// CHECK: virt-specifier-seq~IDENTIFIER := tok[7]
|
|
void foo2() final;
|
|
// CHECK: virt-specifier-seq~IDENTIFIER := tok[13]
|
|
};
|