From 00177962ed13d58cd9d8825e093d7d25d3b9450f Mon Sep 17 00:00:00 2001 From: MLIR Team Date: Fri, 23 Aug 2019 10:34:04 -0700 Subject: [PATCH] NFC: Update in-code documentation. Make the two grammar definitions of static-dimension-list consistent. PiperOrigin-RevId: 265084348 --- mlir/lib/Parser/Parser.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mlir/lib/Parser/Parser.cpp b/mlir/lib/Parser/Parser.cpp index 0c6249fe42d6..4d432bf5512b 100644 --- a/mlir/lib/Parser/Parser.cpp +++ b/mlir/lib/Parser/Parser.cpp @@ -836,8 +836,10 @@ Type Parser::parseTupleType() { /// Parse a vector type. /// -/// vector-type ::= `vector` `<` static-dimension-list type `>` -/// static-dimension-list ::= (decimal-literal `x`)+ +/// vector-type ::= `vector` `<` non-empty-static-dimension-list type `>` +/// non-empty-static-dimension-list ::= decimal-literal `x` +/// static-dimension-list +/// static-dimension-list ::= (decimal-literal `x`)* /// VectorType Parser::parseVectorType() { consumeToken(Token::kw_vector); @@ -868,7 +870,7 @@ VectorType Parser::parseVectorType() { /// dimension-list-ranked ::= (dimension `x`)* /// dimension ::= `?` | decimal-literal /// -/// When `allowDynamic` is not set, this can be also used to parse +/// When `allowDynamic` is not set, this is used to parse: /// /// static-dimension-list ::= (decimal-literal `x`)* ParseResult