Z80 ASM BNF structure… am I on the right track?

Old-school assemblers were typically hand-coded in assembler and used adhoc parsing techniques to process assembly source lines to produce actual assembler code. When assembler syntax is simple (e.g. always OPCODE REG, OPERAND) this worked well enough. Modern machines have messy, nasty instruction sets with lots of instruction variations and operands, which may be expressed with … Read more

How to convert BNF to EBNF

EBNF or Extended Backus-Naur Form is ISO 14977:1996, and is available in PDF from ISO for free*. It is not widely used by the computer language standards. There’s also a paper that describes it, and that paper contains this table summarizing EBNF notation. Table 1: Extended BNF Extended BNF Operator Meaning ————————————————————- unquoted words Non-terminal … Read more