TokString: '"' <non-'"' characters and C-like escapes> '"'
TokCodeFragment: "[{" <shortest text not containing "}]"> "}]"
+:token:`TokCodeFragment` is essentially a multiline string literal
+delimited by ``[{`` and ``}]``.
+
.. note::
The current implementation accepts the following C-like escapes::
int let list multiclass string
TableGen also has "bang operators" which have a
-wide variety of meanings::
+wide variety of meanings:
- !eq !if !head !tail !con
- !shl !sra !srl
- !cast !empty !subst !foreach !strconcat
+.. productionlist::
+ BangOperator: one of
+ :!eq !if !head !tail !con
+ :!add !shl !sra !srl
+ :!cast !empty !subst !foreach !strconcat
Syntax
======
.. productionlist::
SimpleValue: "(" `DagArg` `DagArgList` ")"
DagArgList: `DagArg` ("," `DagArg`)*
- DagArg: `Value` [":" `TokVarName`]
+ DagArg: `Value` [":" `TokVarName`] | `TokVarName`
The initial :token:`DagArg` is called the "operator" of the dag.
.. productionlist::
ObjectBody: `BaseClassList` `Body`
- BaseClassList: [`BaseClassListNE`]
+ BaseClassList: [":" `BaseClassListNE`]
BaseClassListNE: `SubClassRef` ("," `SubClassRef`)*
SubClassRef: (`ClassID` | `MultiClassID`) ["<" `ValueList` ">"]
DefmID: `TokIdentifier`
--------
.. productionlist::
- Defm: "defm" `TokIdentifier` ":" `BaseClassList` ";"
+ Defm: "defm" `TokIdentifier` ":" `BaseClassListNE` ";"
Note that in the :token:`BaseClassList`, all of the ``multiclass``'s must
precede any ``class``'s that appear.