[PATCH] D154202: [MC/AsmLexer] Add '?' (Question) token

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 09:47:48 PDT 2023


barannikov88 added a comment.

In D154202#4464268 <https://reviews.llvm.org/D154202#4464268>, @MaskRay wrote:

> I'll be out for a few days and don't have time to read many patches today.

It is not urgent and I'm not pushing you. It's just I don't know who else to ask for review, not many people have been contributing to MC layer last years.

> Do you whether GNU assembler accepts `?` for any target? If not, this can be a bit strange...

Last time I checked, GNU assembler didn't have dedicated lexer. It has helper routines for parsing expressions, identifiers, numbers etc. but otherwise parsing is up to the target, so I guess it can accept pretty much everything.

I wish I could do it by adding some code to target-specific parser, but this is not currently possible: unrecognized characters are replaced with AsmToken::Error by the lexer and they do not even get to MCTargetAsmParser, which is the only customization point (apart from MCAsmInfo callbacks).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154202



More information about the llvm-commits mailing list