mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
docs: Bring TableGen syntax a bit closer to reality.
It's not just def's but actually a limited subset of Object's that are allowed inside a multiclass. Spotted by Joel Jones. llvm-svn: 171935
This commit is contained in:
parent
38c8e00aa9
commit
83bc854f4c
@ -370,6 +370,7 @@ applied at the end of parsing the base classes of a record.
|
||||
|
||||
.. productionlist::
|
||||
MultiClass: "multiclass" `TokIdentifier` [`TemplateArgList`]
|
||||
: [":" `BaseMultiClassList`] "{" `MultiClassDef`+ "}"
|
||||
: [":" `BaseMultiClassList`] "{" `MultiClassObject`+ "}"
|
||||
BaseMultiClassList: `MultiClassID` ("," `MultiClassID`)*
|
||||
MultiClassID: `TokIdentifier`
|
||||
MultiClassObject: `Def` | `Defm` | `Let` | `Foreach`
|
||||
|
@ -2160,7 +2160,12 @@ bool TGParser::ParseTopLevelLet(MultiClass *CurMultiClass) {
|
||||
/// ParseMultiClass - Parse a multiclass definition.
|
||||
///
|
||||
/// MultiClassInst ::= MULTICLASS ID TemplateArgList?
|
||||
/// ':' BaseMultiClassList '{' MultiClassDef+ '}'
|
||||
/// ':' BaseMultiClassList '{' MultiClassObject+ '}'
|
||||
/// MultiClassObject ::= DefInst
|
||||
/// MultiClassObject ::= MultiClassInst
|
||||
/// MultiClassObject ::= DefMInst
|
||||
/// MultiClassObject ::= LETCommand '{' ObjectList '}'
|
||||
/// MultiClassObject ::= LETCommand Object
|
||||
///
|
||||
bool TGParser::ParseMultiClass() {
|
||||
assert(Lex.getCode() == tgtok::MultiClass && "Unexpected token");
|
||||
|
Loading…
x
Reference in New Issue
Block a user