alpha-coder13 / compiler-design-laboratory-1-alpha-coder13

compiler-design-laboratory-1-alpha-coder13 created by GitHub Classroom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hello! This is a public repository of compiler design lab codes. following are the details of the creator and purpose of this repository.


Tags Information
Name Amardeep Saha
Roll Number 2019UGCS029R
Branch C.S.E.
Subject Compiler Design Lab
Faculty Incharge Dr. Bhaskar Mondal
Institution Indian Institute of Information Technology, Ranchi


The codes in this repository uses Flex as lexical analyzer to convert the respective lex files into c files. The file system in this repo contains:-

  • Lex file with myfile.l format.
  • Lexically analyzed lex.yy.c c file.
  • GCC compiled a.out file.


The following are the guides to install respective dependencies to run the programs.

  • Flex (the Lexical Analyzer):-

For Ubuntu (v 20.04 LTS) :-

  • Open terminal.

  • Type sudo apt install flex.

  • Flex will be installed.

For Windows (10 home) :-

  • Go to google and search Flex.

  • Open the first link showing flex-GnuWin32 .

  • Downoload the Flex file and install it in your system (Make sure to note the PATH of the installed Flex program).

  • Change add a system PATH to the file directory of the installed flex program.

  • C Compiler (the compiler for compiling lex.yy.c file) :-

For Ubuntu (v 20.04 LTS) :-

  • Open terminal.

  • Type sudo apt install gcc .

  • Flex will be installed.

For Windows (10 home) :-

  • Go to google and search GNU-GCC.

  • Open the first link and Download the required version of the compiler.

  • Install the downloaded file in your system.

  • Check whether the GCC compiler is installed by running gcc -version code in cmd.

  • Any code editor can be installed for writing lex programs (Notepad can also do the work).


The readme files in the file system will show the terminal input output of the a.out files


-- Thank you for visiting this repository --

About

compiler-design-laboratory-1-alpha-coder13 created by GitHub Classroom


Languages

Language:C 99.3%Language:Lex 0.7%