Compiler Report
Compiler Report
Online Compiler
Submitted by
Group D
C201205 Mashruran Tazri
C201219 Sania Islam Nowshin
C201221 Fahmida Akter
C201232 Rebeka Sultana
C201235 Umma Farzana
Submitted to
Mrs. Israt Binteh Habib
Lecturer
Dept. of CSE, IIUC
ABSTRACT
Online Compiler
Compiler plays an important role in running programs. It converts source code written in the
form of text into an executable format known as the object code. If compiler is made to run
manually on every system it will cover a lot of space on the machine and it would also
require proper configuration if it is not installed using default parameters.
An Online compiler is a tool that allows us to compile source code and run it in several
different programming languages online. Online compiler is needed for program execution. It
converts the text-based source code into an executable representation known as object code.
If a compiler is designed to run manually on every system, it will take up more space on the
machine. It will also need correct configuration if not loaded with the default options. Most
apps and their related interfaces are designed to work online in today's world. Using different
online compilers at a single interface allows a programmer to compile and remove all errors
and efficiently store the bugs' output. Therefore, we have chosen to build an online compiler
for this project.
In today's world most of the applications and their associated interfaces are made to work
online. So, we have created online compiler. The main objective of such compiler is to
facilitate any user such that programs of any language can be compiled and run without
downloading any compiler.
INDEX
Online Compiler
1. Introduction………………………………………………………………………… 1
2. Problem Statement…………………………………………………………………. 2
3. Objectives………………………………………………………………………….. 3
4. Methodology…………………………………………………………………...….. 4-6
5. System Design…………………………………………………………………..,…7-9
6. Implementation………………………………………………………………..........10
7. Result ………………………………………………………………………………11
8. Conclusion………………………………………………………………………….12
9. Appendices …………………………………………………………………………12
Online Compiler
1. INTRODUCTION
A compiler is crucial for running programs. It transforms text-based source code into object
code, an executable file type. The design concepts of compilers offer a thorough
understanding of the translation and optimization process. The compiler works through the
preprocessed code line by line translating each line into the appropriate machine language
instruction. This will also uncover any syntax errors that are present in source code and will
throw an error to the command line.
Finally, if no errors are present, the compiler creates an object file with the machine language
binary necessary to run on machine. While the object file that the compiler just created is
likely enough to do something on a computer, it still isn’t a working executable of C++
program. There is a important step to reach an executable program.
Basic translation mechanisms and error detection & recovery are covered by compiler design.
Lexical, syntax, and semantic analysis are included in the front end, and code generation and
optimization are included in the back end. An IDE typically contains a code editor, a
compiler or interpreter, and a debugger, accessed through a single graphical user interface
(GUI). It also consists of tools required to develop and test software applications. The user
writes and edits source code in the code editor, to which the compiler translates the source
code into a readable language that is executable for a computer.
Therfore we have decided to test our capability in building an Online IDE which has these
tools, compiler and a debugger for languages such as C and C++. For a compiler which can
compile the C++ code sequentially goes through each source code (.cpp) file in your program
and does two important tasks: First, it checks a code to make sure it follows the rules of the
C++ language. If it does not, the compiler will give you an error (and the corresponding line
number) to help pinpoint what needs fixing. The compilation process will also be aborted
until the error is fixed. Second, it translates your C++ source code into a machine language
file called an object file. Object files are typically named name.o or name.obj where name is
the same name as the .cpp file it was produced from.
1
Online Compiler
2. PROBLEM STATEMENT
A compiler will cover a lot of space on the machine, if a compiler is made to run manually on
every system. It would also require proper configuration if it is not installed using default
parameters. In today’s world a major part of the applications and their associated interfaces
are made to work online. The main objective of an online IDE is to facilitate any user such
that programs of any language can be compiled and run without downloading any IDE
(Integrated Development Environment) or compiler. To use Online IDE user don’t need any
development kit in user machine.
Some advantage of creating an Online IDE are given below:
Maintenance: It is easy to maintain.
Security: It helps in protecting information, infrastructure related to it and also
provides data centralization.
Cost: It’s cost is effectively low.
Agility: It has the ability to adapt to any new change efficiently and rapidly.
API (Application Programming Interface): It helps in developing various
interfaces which provide accessibility to cloud software interacting machine.
2
Online Compiler
3. OBJECTIVE
4. METHODOLOGY
Online Compiler
To create a fully functional IDE we need to follow these minimum set of features:
Start with a plug-in framework.
Then develop an editor plug-in.
Add a compiler invocation plug-in.
Develop a program output viewer plug-in to see compiler results.
Write a plug-in for source code parsing.
This allows for a source code syntax colour highlighting plug-in.
Develop a HTML file viewer plug-in (for help files and Internet pages).
Write a project file manager plug-in to manage project files.
4
Online Compiler
Source Program
Lexical Analysis
Syntax Analysis
Code optimization
Code Generation
Target program
5
Online Compiler
6
Online Compiler
5. SYSTEM DESIGN
7
Online Compiler
8
Online Compiler
9
Online Compiler
6. IMPLEMENTATION
2. PHP is used for post method and XAMPP server is used to connect and run the site via the
local host of the computer.
putenv("PATH=C:\Program Files\CodeBlocks\MinGW\bin");
4.Written code will be passed to CodeBlocks for compilation according to the selected
Language.
10
Online Compiler
7.RESULT
Figure: Dropdown box to select language and text area to write the code.
11
Online Compiler
7. CONCLUSION
In today’s scenario, compiler is used by every machine separately. Thus, it will help in
avoiding the problem of installation of compiler separately. So, it aims at executing the
program and code at centralized server. Another feature is that whenever upgradation
advancement is done on any compiler, then that amendment is not required to be made on
their respective individual machine.
9. APPENDICES
1.https://khalilstemmler.com/blogs/thoughts/building-a-compiler/
2. https://github.com/SaniaNowshin/Online_Compiler
12