<div dir="ltr"><div>practically I cannot use a function namly <b>getMnemonicAcceptInfo</b> (mnemonic as input, and number of possible outputs as output), because there are mnemonics that accepts different number of operands! :-/<br><br></div>Any help is highly appreciated.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 28, 2015 at 10:53 AM, Sky Flyer <span dir="ltr"><<a href="mailto:skylake007@googlemail.com" target="_blank">skylake007@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<br><br>in most of the architectures, assembly operands are comma-separated.<br>I would like to parse an assembly code that is space-separated and I am having a bit of problem.<br>In <b>ParseInstruction</b> function, I don't know what is the easiest way to figure out how many operands a mnemonic expected to have.<br>In comma-separated assembly code, it just consuming commas (while (getLexer().is(AsmToken::Comma))) and adds operands, but it's not the case for space...<br><br>I have a dirty hack, that I manually provide such information (number of operands) in a function called for example getMnemonicAcceptInfo and with a for loop I parse the operand!!<br><br>What would you suggest for parsing space-separated assembly codes when it comes to figuring out if a mnemonic has two operands or one?<br><br>Cheers,<br>ES</div>
</blockquote></div><br></div>