[llvm-dev] Tablegen Grammar "include" as a keyword
Sean Silva via llvm-dev
llvm-dev at lists.llvm.org
Thu Oct 10 12:35:58 PDT 2019
It's great to see work on improving language support for TableGen in tools!
"include" is technically a preprocessing directive in TableGen. It is not a
keyword of the TableGen grammar proper, just as "include" is not a keyword
in the C/C++ grammar. E.g. "include" is not listed in section "2.11
Keywords [lex.key]" in the C++ language standard
rather only mentioned in a highly specific way in "16 Preprocessing
We mention TableGen's include mechanism briefly in
TableGen has an include mechanism. It does not play a role in the syntax
per se, since it is lexically replaced with the contents of the included
IncludeDirective ::= "include" TokString
Since that's the only "preprocessing" TableGen has, we don't have a while
explicit section (analogous to "16 Preprocessing directives [cpp]" in the
C++ standard) giving more details on the TableGen "preprocessor" in this
sense. We maybe should, technically speaking.
TableGen's top-level grammar production is `TableGenFile ::= Object*`,
analogous to C++'s "translation-unit" production.
-- Sean Silva
On Fri, Oct 4, 2019 at 10:50 AM Codetector via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Was in the process of creating an TabelGen plugin for IntelliJ IDEs,
> wondering why in the documentation "include" is not listed as a keyword?
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev