GithubHelp home page GithubHelp logo

bruno-medeiros1 / parser-for-mini-c Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 306 KB

This project was made in the 2nd year and 1st semester of Computer Science in UTAD, Portugal. :school:

Lex 6.17% C 2.13% TeX 67.41% Yacc 24.29%
parser yacc lexical-analyzer analisador-lexico analisador-sintatico naive-c c

parser-for-mini-c's Introduction

Parser for Mini C Language ๐Ÿ’ป

This project consists in implementing a mini C compiler using lex and yacc.

Team Members

  1. Bruno Medeiros
  2. Joel Pinto -> GitHub Account: https://github.com/Fockester
  3. Jorge Machado -> GitHub Account: https://github.com/Twixxx79

Phases

  1. DONE Lexical analyser
  2. DONE Parser
  3. DONE Latex Report

Parser Specifications

The syntactic analyser should parse programs that contain:

  • Whole and real numbers
  • Declaration of variables: int, float, char, void, double
  • Assignment instructions and instructions while, for, if, else, printf
  • Data structures: struct
  • Other commands: #include
  • Operators: <=,> =, == ,! =, <,>
  • Comments: text between / โˆ— and โˆ— /

It can also detected multiple errors in multiple lines and tell which token is missing.

Observations

  1. The report file was written in portuguese as so the comments in the .yac and .l files.
  2. The main.c file contains an example code written in naive C (simplistic C) where it contains 3 errors that will be detected by the parser when executed.

Thanks for reading! ๐Ÿ˜„

parser-for-mini-c's People

Contributors

bruno-medeiros1 avatar

Stargazers

 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.