[Mlir-commits] [mlir] abacd36 - [mlir][doc] Fix the EBNF description of mlir syntax in language reference doc

Mehdi Amini llvmlistbot at llvm.org
Thu May 11 01:45:27 PDT 2023


Author: Yan Xin
Date: 2023-05-11T09:45:15+01:00
New Revision: abacd363834f42e3a44c4eba087ec0f5698d3eef

URL: https://github.com/llvm/llvm-project/commit/abacd363834f42e3a44c4eba087ec0f5698d3eef
DIFF: https://github.com/llvm/llvm-project/commit/abacd363834f42e3a44c4eba087ec0f5698d3eef.diff

LOG: [mlir][doc] Fix the EBNF description of mlir syntax in language reference doc

According to the EBNF syntax described in the 'Common syntax' chapter,
literal characters should be surrounded by backticks (`). However, in
some sections of this document, single quotes (') are used instead.
So, fix them.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D150067

Added: 
    

Modified: 
    mlir/docs/LangRef.md

Removed: 
    


################################################################################
diff  --git a/mlir/docs/LangRef.md b/mlir/docs/LangRef.md
index ec30ce9c6505d..d29c3ced267dd 100644
--- a/mlir/docs/LangRef.md
+++ b/mlir/docs/LangRef.md
@@ -662,8 +662,8 @@ function-type ::= (type | type-list-parens) `->` (type | type-list-parens)
 ### Type Aliases
 
 ```
-type-alias-def ::= '!' alias-name '=' type
-type-alias ::= '!' alias-name
+type-alias-def ::= `!` alias-name `=` type
+type-alias ::= `!` alias-name
 ```
 
 MLIR supports defining named aliases for types. A type alias is an identifier
@@ -691,18 +691,18 @@ system.
 ```
 dialect-namespace ::= bare-id
 
-dialect-type ::= '!' (opaque-dialect-type | pretty-dialect-type)
+dialect-type ::= `!` (opaque-dialect-type | pretty-dialect-type)
 opaque-dialect-type ::= dialect-namespace dialect-type-body
-pretty-dialect-type ::= dialect-namespace '.' pretty-dialect-type-lead-ident
+pretty-dialect-type ::= dialect-namespace `.` pretty-dialect-type-lead-ident
                                               dialect-type-body?
-pretty-dialect-type-lead-ident ::= '[A-Za-z][A-Za-z0-9._]*'
+pretty-dialect-type-lead-ident ::= `[A-Za-z][A-Za-z0-9._]*`
 
-dialect-type-body ::= '<' dialect-type-contents+ '>'
+dialect-type-body ::= `<` dialect-type-contents+ `>`
 dialect-type-contents ::= dialect-type-body
-                            | '(' dialect-type-contents+ ')'
-                            | '[' dialect-type-contents+ ']'
-                            | '{' dialect-type-contents+ '}'
-                            | '[^\[<({\]>)}\0]+'
+                            | `(` dialect-type-contents+ `)`
+                            | `[` dialect-type-contents+ `]`
+                            | `{` dialect-type-contents+ `}`
+                            | [^\[<({\]>)}\0]+
 ```
 
 Dialect types are generally specified in an opaque form, where the contents
@@ -794,8 +794,8 @@ storage.
 ### Attribute Value Aliases
 
 ```
-attribute-alias-def ::= '#' alias-name '=' attribute-value
-attribute-alias ::= '#' alias-name
+attribute-alias-def ::= `#` alias-name `=` attribute-value
+attribute-alias ::= `#` alias-name
 ```
 
 MLIR supports defining named aliases for attribute values. An attribute alias is
@@ -823,18 +823,18 @@ Similarly to operations, dialects may define custom attribute values.
 ```
 dialect-namespace ::= bare-id
 
-dialect-attribute ::= '#' (opaque-dialect-attribute | pretty-dialect-attribute)
+dialect-attribute ::= `#` (opaque-dialect-attribute | pretty-dialect-attribute)
 opaque-dialect-attribute ::= dialect-namespace dialect-attribute-body
-pretty-dialect-attribute ::= dialect-namespace '.' pretty-dialect-attribute-lead-ident
+pretty-dialect-attribute ::= dialect-namespace `.` pretty-dialect-attribute-lead-ident
                                               dialect-attribute-body?
-pretty-dialect-attribute-lead-ident ::= '[A-Za-z][A-Za-z0-9._]*'
+pretty-dialect-attribute-lead-ident ::= `[A-Za-z][A-Za-z0-9._]*`
 
-dialect-attribute-body ::= '<' dialect-attribute-contents+ '>'
+dialect-attribute-body ::= `<` dialect-attribute-contents+ `>`
 dialect-attribute-contents ::= dialect-attribute-body
-                            | '(' dialect-attribute-contents+ ')'
-                            | '[' dialect-attribute-contents+ ']'
-                            | '{' dialect-attribute-contents+ '}'
-                            | '[^\[<({\]>)}\0]+'
+                            | `(` dialect-attribute-contents+ `)`
+                            | `[` dialect-attribute-contents+ `]`
+                            | `{` dialect-attribute-contents+ `}`
+                            | [^\[<({\]>)}\0]+
 ```
 
 Dialect attributes are generally specified in an opaque form, where the contents


        


More information about the Mlir-commits mailing list