2 ms·
In principle, you can embed languages without the need for strings. However, when you do so, you need to worry about the tokenization of languages to see that a
by jcranmer 6y ago
In principle, you can embed languages without the need for strings. However, when you do so, you need to worry about the tokenization of languages to see that a) they combine in a sensible way and b) tools won't get confused if they don't understand the sub-language (this is a real issue that cropped with XHTML and JS).
In practice, inline assembly has pretty much been seen as a "paste this text into the generated assembly of the program, after substituting some values determined by register allocation"--in other words, it's a pretty natural string formatting problem, and describing the language like you would a formatted string is a natural step to take.
Another point to make is that assembly languages are wildly divergent in their actual syntax. ARM uses # to denote literals, x86 (Intel syntax) uses # to denote comments.