shingarov / Pharo-ArchC

Generate binutils from formal spec
MIT License
4 stars 1 forks source link

Rework assembly syntax code #8

Closed janvrany closed 2 years ago

janvrany commented 2 years ago

This PR changes the way assembler format chunks are used. Instead of having a single sequence of chunks, we keep a tree of chunks that reflects somewhat common structure of assembly language(s) - that is, instruction is notated as a mnemonic followed by zero or more operands separated by comma.

The root of the tree is always AcAsmFormat.

Also, the parsing of assembly has been relaxed a bit for allowing extra (or no) spaces as hinted in ArchC manual (which is arguably out-dated).