[llvm-commits] Initial TableGen language reference

Sean Silva silvas at purdue.edu
Wed Jan 2 16:19:13 PST 2013

On Wed, Jan 2, 2013 at 10:52 AM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
> What are your plans for the existing 'TableGen Fundamentals' document?

I envision "LangRef" (the name is tentative) being a lot more formal,
like a spec, and only dealing with the language in and of itself
(roughly: how to understand a given construct in terms of how it
affects the final set of records represented by the TableGen file).
The document can be written assuming that the reader knows what
TableGen is, why they would want to use it, etc.

In contrast, I envision TableGenFundamentals being more like a
manual/introduction, whose content/organization/style is tailored to
motivating and imparting a practical and conceptual understanding of
the tool as a whole (including things like TableGen backends, although
that probably deserves its own document). Having a "LangRef" to link
to will probably be able to simplify some aspects of
TableGenFundamentals as well.

Apart from the obvious benefits of having a spec for the purpose of
documentation for users, another goal of "LangRef" is to help
stabilize the language and paper-over/address quirks of
implementation/history which someday ought to be fixed (such as the
"field" keyword, or the strange behavior due to lexing '-' as part of
a number literal instead of as a unary operator like in most

-- Sean Silva

More information about the llvm-commits mailing list