why doesn't assembly language have a parse tree?
wdym
>>106473125There isn't any part of it that's tree-like.
>>106473125ASTs are bloat
file ::= (label | instruction)+label ::= id ':'instruction ::= mnemonic(op (op)?)?mnemonic::= idop ::= id // todo add different op types
>>106473150why not? also what about [1+2*rax]
>>106473327how do you accomidate affixes? cisc assembly isn't an isolating language like most formal languages, it's polysynthetic. operands can have (restricted) arithmetic expressions, and instructions can have suffixes and infixes. also you haven't accounted for pointer dereferencing, non-instruction directives, literals, segments, etc.
>>106473375Those expressions are parsed by the assembler, encoded and then promptly discarded.
>>106473485I'm pretty sure that anon wasn't intending his post to be comprehensive.