https://github.com/krshrimali/compiler-design-codes
Compiler Design Codes
https://github.com/krshrimali/compiler-design-codes
Last synced: 2 months ago
JSON representation
Compiler Design Codes
- Host: GitHub
- URL: https://github.com/krshrimali/compiler-design-codes
- Owner: krshrimali
- Created: 2019-04-01T08:42:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-01T10:19:56.000Z (over 6 years ago)
- Last Synced: 2025-03-12T08:26:10.454Z (7 months ago)
- Language: C
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Compiler-Design-Codes
## Lab Session - 1: 01/04/2019
**Objectives**
1. Lexical Analyzer
2. Syntax Analyzer**Steps**
1. Installed flex and bison parser generator.
2. Installing Flex:
`sudo apt-get update`
`sudo apt-get install flex`To verify: `lex -V`
Output: `lex 2.6.0`
3. Installing Bison:
`wget http://ftp.gnu.org/gnu/bison/bison-2.3.tar.gz`
`tar -xvzf bison-2.3.tar.gz`
`cd bison-2.3`
`./configure --prefix=/usr/local/bison --with-libiconv-prefix=/usr/local/libiconv/`
`make`
`sudo make install`Source: https://geeksww.com/tutorials/miscellaneous/bison_gnu_parser_generator/installation/installing_bison_gnu_parser_generator_ubuntu_linux.php
**Programs**
1. Program to count number of words: words_count.l
2. Program to ignore comments from a file. (C/C++ Style comments: / and /*)
3.
4. Syntax Analysis using yacc