[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: Th155Doremy2.png (386 KB, 591x662)
386 KB
386 KB PNG
why doesn't assembly language have a parse tree?
>>
wdym
>>
>>106473125
There isn't any part of it that's tree-like.
>>
File: Sakuya2.jpg (127 KB, 850x1247)
127 KB
127 KB JPG
>>106473125
ASTs are bloat
>>
file ::= (label | instruction)+

label ::= id ':'

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

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



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.