Giter Site home page Giter Site logo

man-yadul / s7-csl411-compiler-lab Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 2.0 959 KB

C 71.07% Lex 22.99% Yacc 5.93%
compiler compiler-design first-of-grammar lexical-analysis lexical-analyzer nfa-to-dfa-conversion parser recursive-descent-parser shift-reduce-parsers yacc

s7-csl411-compiler-lab's Introduction

S7-CSL411-COMPILER-LAB

RAJAGIRI SCHOOL OF ENGINEERING AND TECHNOLOGY

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

SEMESTER - VII

COMPILER LAB

LAB CYCLE

  1. Design and implement a lexical analyzer using C language to recognize all valid tokens in the input program. The lexical analyzer should ignore redundant spaces, tabs and newlines. It should also ignore comments.

  2. a) Write a lex program to display the number of lines, words and characters in an input text. b) Write a LEX Program to convert the substring abc to ABC from the given input string. c) Write a lex program to find out total number of vowels and consonants from the given input sting.

  3. a) Generate a YACC specification to recognize a valid arithmetic expression that uses operators +, โ€“ , *,/ and parenthesis. b) Generate a YACC specification to recognize a valid identifier which starts with a letter followed by any number of letters or digits.

  4. Implementation of Calculator using LEX and YACC

  5. Write a program to convert NFA to DFA.

  6. Write a program to find First of any given grammar.

  7. Design and implement a recursive descent parser for a given grammar.

  8. Construct a Shift Reduce Parser for a given language.

  9. Write a program to perform constant propagation.

  10. Implement Intermediate code generation for simple expressions.

  11. Implement the back end of the compiler which takes the three address code and produces the 8086 assembly language instructions. The target assembly instructions can be simple move, add, sub, jump etc.

s7-csl411-compiler-lab's People

Contributors

man-yadul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.