Giter VIP home page Giter VIP logo

compiler's Introduction

Lexical Analyzer & Sysntax Analyzer : Team Project for Compiler Class

* All screen capture and detail of lexical&syntax_analyzer and more detail in " Team2_lexical(syntax)_analyzer_report.pdf "

2021-1 Compiler class in CAU Team2

Team Member

Name
배인경
좌민주

Brief project description

  1. Lexical analyzer
  • directory name : mid
  • lexical analyzer for a simplified Java programming language
  • Based on specification(by class note), define tokens (e.g., token names) for a simplified Java language, make regular expressions which describe the patterns of the tokens, construct a NFA for the regular expressions, translate the NFA into a DFA, especially in the form of a table, and implement a program which does a lexical analysis (recognizing tokens).
  1. Syntax analyzer
  • directory name : final
  • a bottom-up syntax analyzer (a.k.a., parser) for a simplified Java programming language
  • Implement a SLR parsing program for the simplified Java programming language by using the constructed table.

How to Compile

1 Lexical Analyzer(Run on Linux or Unix-like OS)__

  1. Open the Project directory(mid) that you want to execute.
  2. On a command line, your analyzer must run with the following command.
$ python3 lexical_analyzer.py <input_file_name>.java
  1. Input: A program written in a simplified Java programming language
  2. Output: <input_file_name>.out

2 Syntax Analyzer(Run on Linux or Unix-like OS)__

  1. Open the Project directory(final) that you want to execute.
  2. On a command line, your analyzer must run with the following command.
$ python3 lexical_analyzer.py <input_file_name>.java
$ python3 syntax_analyzer.py <input_file_name>.out
  1. Input: An output of your lexical analyzer program
  2. Output: just an acceptance message;(If an output is “reject”) please make an error report which explains why and where the error occurred (e.g., line number)

compiler's People

Contributors

inkyeongbae avatar jwaminju avatar

Watchers

James Cloos 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.