X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FTableGen%2FLangRef.rst;h=bd28a9031d74ecdcdd95c2514ad996238a5207c1;hb=7042aa598dde44ef74eb3ba1ae729729e64c46cf;hp=42819987349a2fb8766f2ec48b50c2fac500e1ab;hpb=d155ffc03fd744c8b1c67b0a913c55d6e42044c8;p=oota-llvm.git diff --git a/docs/TableGen/LangRef.rst b/docs/TableGen/LangRef.rst index 42819987349..bd28a9031d7 100644 --- a/docs/TableGen/LangRef.rst +++ b/docs/TableGen/LangRef.rst @@ -74,6 +74,11 @@ TableGen also has two string-like literals: TokString: '"' '"' TokCodeFragment: "[{" "}]" +.. note:: + The current implementation accepts the following C-like escapes:: + + \\ \' \" \t \n + 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 -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 ====== @@ -279,7 +286,7 @@ given values. .. 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. @@ -291,7 +298,7 @@ Bodies .. productionlist:: ObjectBody: `BaseClassList` `Body` - BaseClassList: [`BaseClassListNE`] + BaseClassList: [":" `BaseClassListNE`] BaseClassListNE: `SubClassRef` ("," `SubClassRef`)* SubClassRef: (`ClassID` | `MultiClassID`) ["<" `ValueList` ">"] DefmID: `TokIdentifier` @@ -336,7 +343,7 @@ a ``foreach``. -------- .. 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.