New answers tagged


Most binaries compiled for x86 will work on x86 because all x86 processors have the same binary instruction format. Instruction set extensions are quite rare and happen after several consultations between the different vendors. For example, one of the most famous extension is the AES encryption extension to the x86 instruction set called AES-NI and developed ...


As a trivial problem, you can write a program that will try to print on which processor it is running, how many cores, how much memory etc. Such a program should obviously produce different results on an x86 and an AMD CPU. On the other hand, it is quite possible to write code that runs correctly on a variety of very similar processors. AMD and x86 being &...


Many languages support unicode. For example, ①②③⑳ would be a valid Swift identifier. But being able to have the same character sequence being both an identifier and a number is at best confusing and useless.


It's worth noting that there are some programming languages, even common ones, that support what you want. For example: In Common Lisp, 1+ is a valid symbol name. C# supports verbatim identifiers, to interoperate with languages that have a different notion of "identifier" than C# does.


In many languages, 1e3 is a literal that represents 1000, 0x10 is a literal that represents 16. If we used your proposed regexp for variable names, it would be ambiguous whether those expressions should be represented as a literal or as a variable name.


Yes, normally a parser calls the lexical analyser every time it needs a token, and this results in many, many, many calls to the lexical analyser. It is well known by compiler writers that the lexical analysis can consume the larger proportion of the compilers execution time. However, the lexical analysis process would normally use a Chomsky type 3 grammar, ...

Top 50 recent answers are included