uabelho added inline comments.
Comment at: clang-tools-extra/pseudo/lib/grammar/GrammarBNF.cpp:235
Out.Sequence.push_back({Chunk});
}
hokein wrote:
> uabelho wrote:
> > I get a warning/error on this line with this commit:
> > ```
> > 13:31:17 ../../
hokein added inline comments.
Comment at: clang-tools-extra/pseudo/lib/grammar/GrammarBNF.cpp:235
Out.Sequence.push_back({Chunk});
}
uabelho wrote:
> I get a warning/error on this line with this commit:
> ```
> 13:31:17 ../../clang-tools-extra/pseud
uabelho added inline comments.
Comment at: clang-tools-extra/pseudo/lib/grammar/GrammarBNF.cpp:235
Out.Sequence.push_back({Chunk});
}
I get a warning/error on this line with this commit:
```
13:31:17 ../../clang-tools-extra/pseudo/lib/grammar/Gramma
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf1ac00c9b0d1: [pseudo] Add grammar annotations support.
(authored by hokein).
Changed prior to commit:
https://reviews.llvm.org/D126536?vs=434906&
hokein marked an inline comment as done.
hokein added inline comments.
Comment at: clang-tools-extra/pseudo/include/clang-pseudo/Grammar.h:219
+ // ExtensionID is the index of the table.
+ std::vector AttributeValues;
};
sammccall wrote:
> looking at this agai
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
Comment at: clang-tools-extra/pseudo/include/clang-pseudo/Grammar.h:91
+// attribute value (all attributes share a namespace).
+// An ExtensionID is the index into
hokein added inline comments.
Comment at: clang-tools-extra/pseudo/include/clang-pseudo/Grammar.h:22
//
+// The grammar supports extensions, which have the syntax form of
+// [key=value;key=value]. Extensions are associated with a grammar symbol (
sammccall wr
hokein updated this revision to Diff 434906.
hokein marked 5 inline comments as done.
hokein added a comment.
- bring back the attribute concept, narrow down the ExtensionID scope (only
used for semantic);
- loose and simplify the BNF annotations parsing; ([] only allows single
attribute, attrib
sammccall added a comment.
Thanks, this looks better.
Sorry about confusion with the names - I think annotation is a great name, and
we should only use "extension" for the narrower "opaque thing that an
annotation value refers to".
Happy to chat about this offline if you like
hokein updated this revision to Diff 433354.
hokein marked 2 inline comments as done.
hokein added a comment.
remove a left-out change.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126536/new/
https://reviews.llvm.org/D126536
Files:
clang-tools
hokein added a comment.
I addressed comments on the grammar part, (the remaining GLR, pseudo_gen parts
are not covered yet), I think it would be better them into different patches,
so that we can land the grammar bit first, then start doing the error recovery
and guard implementation in paralle
hokein updated this revision to Diff 433351.
hokein marked 3 inline comments as done and an inline comment as not done.
hokein added a comment.
[pseudo] Support annotations in the grammar.
This patch adds annotations in the bnf grammar.
Annotations (which has a form of `[key1=value;key2=value]`)
sammccall added a comment.
Nice!
This has tests for the parsing-the-attribute bits, but I think we're missing
tests for the actual guards added.
Comment at: clang-tools-extra/pseudo/include/clang-pseudo/GLR.h:114
+using ReduceGuard =
+std::function RHS,
+
hokein added inline comments.
Comment at: clang-tools-extra/pseudo/include/clang-pseudo/Grammar.h:87
+// Defines the built-in attribute keys.
+enum class AttributeKey : uint8_t {
+ // A guard controls whether a reduction of a rule will be conducted by the
GLR
n
hokein added a comment.
This patch might cover too many things (at least we could split the guide/glr
implementation bit), but want to give you an overview of the picture first.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126536/new/
https://rev
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-tools-extra.
- Add annotation handling ([key=val
16 matches
Mail list logo