Understanding Points in MSIL (CIL) Keywords

I am working on a MSIL (CIL) code color coder, although I am not familiar with MSIL.

I found a list of all the keywords in the Common Language Infrastructure (CLI) .

These keywords include things such as add

, .file

, conv.i4

and unaligned.

.

I'm struggling a bit with dots that are part of the keyword. I'm sure the dots should be part of the keywords, since I don't think things like i4

are worth as keywords on their own. And I'm pretty sure I want the start point of multiple keywords to be part of the keyword.

But what about those with an endpoint like the last one? Is there a reason the endpoint is part of the keyword?

+3


source to share


1 answer


The dot is part of these instructions (I don't know why). There are several other prefix instructions, such as unaligned.

, volatile.

, constrained.

, readonly.

and tail.

. (I'm not sure I have listed all of them, but the point is your parser will need to recognize them.)

The documentation volatile.

specifically states that the instruction to which it applies must be preceded by at least one whitespace message. For example:

volatile. ldind.i4 // Correct

      



and

volatile.ldind.i4 // Syntax error

      

This is from Serge Lidin Expert .NET 2.0 IL Assembler (which is pretty much the definitive IL reference).

+4


source







All Articles