Is it possible to add a systematic way to use "potential reserved words" as identifiers?
For example, nasm has a nice feature -- you can prefix a "$" to an identifier, then it is no longer an reserved word.
In masm it is incrediblely and unreasonably hard to call a function named "add" or "enter".
The "option nokeyword" is hard to use.
And since newer CPUs keep adding new instructions, there is always a risk of conflicts.
Could you not just prefix the thing you want to add which would be a reserved word? - I'm not sure I like the idea of overriding reserved words - it has a bad smell to me and not sure I'd personally go with the NASM version.
I mean you have the same situation in any other language, you can't make a C function called struct() for example .. I kind of think the restriction is there for a good reason, when this happens to me I normally just do something IDENTIFIER or IDENTIFIER etc.
Open to discussion on this though.
Regarding this issue, I'm considering using this assembler as a backend assembler for C (or some other language). C's reserved words differ from those in assembly language, making it challenging to handle all reserved words (and new CPUs may continue to introduce new instructions).
I think it's incredibly unlikely that you'd get a collision between new instructions and reserved words, given how bizarre most new instruction mnemonics are :) - it's not impossible though I guess.
I'm not sure how well the symbol and ID lookup system would handle being able to switch these things on/off - I'll have a look at how NOKEYWORD works behind the scenes and see if theres a way to expose it in a more friendly way.