[PATCH] D91460: [AsmParser] make .ascii support spaces as separators

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 4 14:35:39 PST 2020


jrtc27 added inline comments.


================
Comment at: llvm/lib/MC/MCParser/AsmParser.cpp:3005
 /// parseDirectiveAscii:
-///   ::= ( .ascii | .asciz | .string ) [ "string" ( , "string" )* ]
+///   ::= .ascii [ "string" ( ( , ) "string" )* ]
+///   ::= ( .asciz | .string ) [ "string" ( , "string" )* ]
----------------
Hm, this isn't particularly clear as it stands that multiple strings next to each other is valid, it just looks like the comma has been put it in brackets. Maybe this to better reflect how it's parsed (square brackets around the comma instead would also work, but doesn't capture the logical parse tree so well)? I don't know if the `"string"` needs to be put in parentheses though to apply `+` to it; is this a real BNF-esque grammar or just a hand-wavey one for human consumption?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91460/new/

https://reviews.llvm.org/D91460



More information about the llvm-commits mailing list