简体   繁体   中英

the difference between parsing and compiling

I am new to the world of the assembly and would like to know what parsing means in this context and the difference between parsing and compiling. Thank you.

A recognizer does verify that a sequence of symbols belongs or not to a given language. With the assumption that it terminates, it will terminate with a Boolean value: true (belongs) or false (does not belong).

A parser is a recognizer that also outputs the derivation steps that one can use to build a syntax tree .

Parsing is the process that the parser performs.

A translator does translate from one language to another.

A compiler is a translator that translates from a high-level language to a low-level language.

Compiling is the process that the compiler performs.

A decompiler is a translator that translates from a low-level language to a high-level language.

An assembly language is low-level language that uses mnemonics that are very close to a given machine language . It is the "human friendly" version of the machine language, often with some extras like comments.

A machine language is the language that is used to write machine code and that will be executed by the hardware. For example, the Central Processor Unit (CPU).

It seems to me that its more correct to say that the assembly language is compiled by an assembler to produce a machine code written in a machine language. The term assembled is also used in this case. I write compiled , because, the assembly languages express not exactly the machine language, but have extras, that I think is somehow "higher" level compared to the machine language.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM