Skip to main content

Compiler Design & Construction Basic Concepts

Compiler Design & Construction Basic Concepts

Compiler Design & Construction Basic ConceptsDefinition of Compiler Design & Construction Basic Concepts – A compiler is a computer program which is used to convert high level language (Source code) into another program (target code), which are easily executable by computer machine. The target code is in the binary form which is executable by CPU of a Computer System. Alternatively, the compiler is designed to convert High level language into low level language (e.g. Assembly language or machine code). The conversion is required because the HLL language is not understandable or executable by computer operating system or CPU. The CPU processor only execute machine language code or binary codes. The compiler can also translate the high level source programs into target program in machine language for the specific hardware.

What is Cross Compiler?

The compiler that runs on one computer but produces object code for a different type of computer. Since the compiler program is working on computer-A but it is producing Object code for Computer-B. This type of compiler is called as Cross Compiler.

What is Decompiler?

The Program which translates low level languages into High level language is called as Decompiler. The computer program which takes an executable file as input and convert it into Source file (HLL), which can be compiled further. In reality the Decompiler are unable to reconstruct the original source code, there remains some obfuscated code.

What are the Types of Compiler?

There are many types of compiler being design according to the Application areas.

  1. Source to Source Compiler – The compiler which takes high level language as input and outputs a High level language after conversion. Ex – Automatic Parallelizing Compiler

  2. Hardware Compilers – The compiler output target computer hardware at a very low level. Such compilers are also called as hardware compilers because the source code they compile controls the final configuration of the hardware and how it operates. The output of these compilation shows an interconnection of transistors or lookup tables. Example – XST (Xilinx Synthesis Tool) is used to configure FPGAs.

  3. Bytecode Compilers – The compiler which compile source code into assembly language. Warren Abstract Machine (WAM), bytecode compiler for java and python are some examples.

  4. JIT (Just In Time) Compiler – It is the last part of a multi-pass compiler chain in which some compilation stages are deferred to run-time.
    Ex – Smalltalk, Microsoft .NETs CIL System.

What is Interpreter?

The interpreter is a computer program which executes directly instructions written in a program or scripting language without being previously compiled into machine language. The interpreter translate one statement at a time.

What are the difference between Interpreter and Compiler?

  1. Interpreter translates one statement at a time. But Compiler scans the entire program and translates it as a whole into machine code.

  2. Interpreter takes less amount of time to analyze the source code but the overall execution time is slower. But compiler takes large amount of time to analyze the source code but the overall execution time is comparatively faster.

  3. The interpreter translate the program until the first error is met. So debugging is easy. The Compiler It shows the error message only after scanning the whole program. So debugging is comparatively hard.

  4. Interpreter are used in language like Python, Ruby. In case of Compiler C, C++ Programming language use Compiler. Compiler Design & Construction Basic Concepts.

Popular posts from this blog

When Task Scheduler gets Infected by Malware

When Task Scheduler gets Infected by Malware

When Task Scheduler gets Infected by Malware - We are familiar with malware attacks on Computer. The hackers infect one or more files and thereby attaining full control on the System. There are millions of victims who had loosen either data or dollars in this respect. In this article we see a System file which is infected by these hackers at first stage. The System file infected by malware at first stage is Task Scheduler Engine (Taskeng.exe). The Task Scheduler Engine is a system file located in C:\Windows\System32 folder. This location is the default location for Taskeng.exe.

The Task Scheduler Engine is responsible for keeping track of tasks set to run at a time predefined by the user of the PC. As said earlier, the original location of this scheduler is C:\Windows\System32 folder. But it is suspicious if the location of scheduler gets change. If it is found in some other folder then it must be infectious. As a result, you constantly get a…

How to Project Android Phone Screen on Windows PC

How to Project Android Phone Screen on Windows PC

Project Android Phone Screen on Windows PC - Four out of Five of us have Smartphones in our Pocket. We spend lots of time on Smartphone utilities like Facebook, Twitter, WhatsApp, YouTube and other interesting Apps. These Smartphones are tremendously used due to Android Operating System installed in it. Android OS is one the successful mobile based OS running in the market.

On the Other side, Microsoft is emphasizing on features to ease Android user's connectivity with it. Microsoft has done lots of improvement for mobile utilities to the Windows 10 version 1809. With this upgradation, we can easily project Android phone screen on Windows PC. The extensive use of such features is seen on Digital Smart TVs Today. The introduction of Wi-Fi feature makes more reliable and user friendly.

So, if you are boredom with 5-6-inch Android Screen and want to mirror it on Computer screen, then read the full article to know the process, how to proj…

Fix Windows could not find a driver for your network adapter error

Fix Windows could not find a driver for your network adapter error

A Computer run smoothly with the coordination of Software & Hardware. In the absence of any one it will not run at all. Software being the Master utilizes each hardware attached to the System. And each hardware is operated with the help of Device Drivers installed in it. Operating System (OS) uses these device drivers to control & utilize each hardware when needed. Each hardware connected to the system must have their own Device Driver installed. A device driver is a program to initiate a hardware when required by Operating System.

Suppose, you want your PC to connect to the Network, it can only be possible when your PC has network related Device Driver. These Device Drivers are easily downloaded from Manufacturer Websites. In this article we focus on Network related problem. Suppose, your PC not obtaining Network connectivity. And each time you are getting an error message saying "Windows could not find a d…