projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[SystemZ] Add test missing from r186148
[oota-llvm.git]
/
docs
/
TableGen
/
LangRef.rst
diff --git
a/docs/TableGen/LangRef.rst
b/docs/TableGen/LangRef.rst
index 34098a0eb6bb273500f877dfe7c4fd9f10c6c352..bd28a9031d74ecdcdd95c2514ad996238a5207c1 100644
(file)
--- a/
docs/TableGen/LangRef.rst
+++ b/
docs/TableGen/LangRef.rst
@@
-74,6
+74,11
@@
TableGen also has two string-like literals:
TokString: '"' <non-'"' characters and C-like escapes> '"'
TokCodeFragment: "[{" <shortest text not containing "}]"> "}]"
TokString: '"' <non-'"' characters and C-like escapes> '"'
TokCodeFragment: "[{" <shortest text not containing "}]"> "}]"
+.. note::
+ The current implementation accepts the following C-like escapes::
+
+ \\ \' \" \t \n
+
TableGen also has the following keywords::
bit bits class code dag
TableGen also has the following keywords::
bit bits class code dag
@@
-81,11
+86,13
@@
TableGen also has the following keywords::
int let list multiclass string
TableGen also has "bang operators" which have a
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
======
Syntax
======
@@
-279,7
+286,7
@@
given values.
.. productionlist::
SimpleValue: "(" `DagArg` `DagArgList` ")"
DagArgList: `DagArg` ("," `DagArg`)*
.. 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.
The initial :token:`DagArg` is called the "operator" of the dag.
@@
-291,14
+298,14
@@
Bodies
.. productionlist::
ObjectBody: `BaseClassList` `Body`
.. productionlist::
ObjectBody: `BaseClassList` `Body`
- BaseClassList: [`BaseClassListNE`]
+ BaseClassList: [
":"
`BaseClassListNE`]
BaseClassListNE: `SubClassRef` ("," `SubClassRef`)*
BaseClassListNE: `SubClassRef` ("," `SubClassRef`)*
- SubClassRef: (`ClassID` | `
Defm
ID`) ["<" `ValueList` ">"]
+ SubClassRef: (`ClassID` | `
MultiClass
ID`) ["<" `ValueList` ">"]
DefmID: `TokIdentifier`
DefmID: `TokIdentifier`
-The version with the :token:`
Defm
ID` is only valid in the
+The version with the :token:`
MultiClass
ID` is only valid in the
:token:`BaseClassList` of a ``defm``.
:token:`BaseClassList` of a ``defm``.
-The :token:`
Defm
ID` should be the name of a ``multiclass``.
+The :token:`
MultiClass
ID` should be the name of a ``multiclass``.
.. put this somewhere else
.. put this somewhere else
@@
-336,7
+343,7
@@
a ``foreach``.
--------
.. productionlist::
--------
.. productionlist::
- Defm: "defm" `TokIdentifier` ":" `BaseClassList` ";"
+ Defm: "defm" `TokIdentifier` ":" `BaseClassList
NE
` ";"
Note that in the :token:`BaseClassList`, all of the ``multiclass``'s must
precede any ``class``'s that appear.
Note that in the :token:`BaseClassList`, all of the ``multiclass``'s must
precede any ``class``'s that appear.
@@
-370,6
+377,7
@@
applied at the end of parsing the base classes of a record.
.. productionlist::
MultiClass: "multiclass" `TokIdentifier` [`TemplateArgList`]
.. productionlist::
MultiClass: "multiclass" `TokIdentifier` [`TemplateArgList`]
- : [":" `BaseMultiClassList`] "{" `MultiClass
Def
`+ "}"
+ : [":" `BaseMultiClassList`] "{" `MultiClass
Object
`+ "}"
BaseMultiClassList: `MultiClassID` ("," `MultiClassID`)*
MultiClassID: `TokIdentifier`
BaseMultiClassList: `MultiClassID` ("," `MultiClassID`)*
MultiClassID: `TokIdentifier`
+ MultiClassObject: `Def` | `Defm` | `Let` | `Foreach`