forked from OSchip/llvm-project
[mlir][LangRef] Add top-level production to the MLIR grammar
The LangRef currently lacks a top-level production, leaving the productions attribute-alias-def and type-alias-defunused. Clarify the situation by declaring what is to be parsed by an MLIR parser at the toplevel. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D117668
This commit is contained in:
parent
b6a41fddcf
commit
357f2d9ccf
|
@ -179,6 +179,19 @@ string-literal ::= `"` [^"\n\f\v\r]* `"` TODO: define escaping rules
|
|||
Not listed here, but MLIR does support comments. They use standard BCPL syntax,
|
||||
starting with a `//` and going until the end of the line.
|
||||
|
||||
|
||||
### Top level Productions
|
||||
|
||||
```
|
||||
// Top level production
|
||||
toplevel := (operation | attribute-alias-def | type-alias-def)*
|
||||
```
|
||||
|
||||
The production `toplevel` is the top level production that is parsed by any parsing
|
||||
consuming the MLIR syntax. [Operations](#operations),
|
||||
[Attribute alises](#attribute-value-aliases), and [Type aliases](#type-aliases)
|
||||
can be declared on the toplevel.
|
||||
|
||||
### Identifiers and keywords
|
||||
|
||||
Syntax:
|
||||
|
|
Loading…
Reference in New Issue