0

what is a compiler if someone can explain??

24th Nov 2019, 9:46 PM
menna wael
4 Answers
+ 2
A compiler consists in general of 3 parts. The syntax analysis, context analysis and than the machine code generation. Always when it finds an error the compiler tells you what went wrong( this are the compiler exceptions, runtime exceptions are thrown while execution) Syntax analysis: wrong spelling of words or wrong construction of for example variable definitions. In this analysis an abstraction syntax tree (AST) is created only consisting on the importent information( no spaces or language specific syntax) This ast ist used in context analysis and code generation. Maschine code needs to be generated cause for example Java is a high level language and has a lot of abstraction which cant be directly used in hardware. So the compiler is used to make an executable out of your code so you can run it after that.
24th Nov 2019, 10:26 PM
Jnn
Jnn - avatar
+ 1
the short version is: A compiler converts source code of compiled languages such as java, C++ and C sharp into binary executables. that is machine code ( 0s & 1s ).
25th Nov 2019, 12:44 AM
Logomonic Learning
Logomonic Learning - avatar
0
Read on the difference between INTERPRETET & COMPILER
24th Nov 2019, 10:05 PM
Da2
Da2 - avatar
0
Thanks
25th Nov 2019, 10:52 AM
menna wael