``dag``
This type represents a nestable directed graph of elements.
-``code``
- This represents a big hunk of text. This is lexically distinct from string
- values because it doesn't require escaping double quotes and other common
- characters that occur in code.
-
To date, these types have been sufficient for describing things that TableGen
has been used for, but it is straight-forward to extend this list if needed.
string value
``[{ ... }]``
- code fragment
+ usually called a "code fragment", but is just a multiline string literal
``[ X, Y, Z ]<type>``
list value. <type> is the type of the list element and is usually optional.
...
A ``defm`` can also be used inside a multiclass providing several levels of
-multiclass instanciations.
+multiclass instantiations.
.. code-block:: llvm
It's also possible to use "let" expressions inside multiclasses, providing more
ways to factor out commonality from the records, specially if using several
-levels of multiclass instanciations. This also avoids the need of using "let"
+levels of multiclass instantiations. This also avoids the need of using "let"
expressions within subsequent records inside a multiclass.
.. code-block:: llvm
TableGen backends
=================
+Until we get a step-by-step HowTo for writing TableGen backends, you can at
+least grab the boilerplate (build system, new files, etc.) from Clang's
+r173931.
+
TODO: How they work, how to write one. This section should not contain details
about any particular backend, except maybe ``-print-enums`` as an example. This
should highlight the APIs in ``TableGen/Record.h``.