← Home ← Back to /g/

Thread 106473125

9 posts 4 images /g/
Anonymous No.106473125 >>106473150 >>106473151
why doesn't assembly language have a parse tree?
Anonymous No.106473142
wdym
Anonymous No.106473150 >>106473375
>>106473125 (OP)
There isn't any part of it that's tree-like.
Anonymous No.106473151
>>106473125 (OP)
ASTs are bloat
Anonymous No.106473327 >>106473485
file ::= (label | instruction)+

label ::= id ':'

instruction ::= mnemonic(op (op)?)?

mnemonic::= id
op ::= id // todo add different op types
Anonymous No.106473375 >>106473658
>>106473150
why not? also what about [1+2*rax]
Anonymous No.106473485 >>106475141
>>106473327
how 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.
Anonymous No.106473658
>>106473375
Those expressions are parsed by the assembler, encoded and then promptly discarded.
Anonymous No.106475141
>>106473485
I'm pretty sure that anon wasn't intending his post to be comprehensive.