Giter VIP home page Giter VIP logo

compiler_bhaskara_analyzer's Introduction

Compiler_Bhaskara_Analyzer

C Program that analyzes and calculate expressions with addition, subtraction, multiplication, division, sign change and square root.

Grammar:

E -> T E1		{E1.h = Tptr} E1 {Eptr = E1.s}
E1 -> + T E2	{E2.h = geranodo('+',E1h,Tptr)} E2 {E1.s = E2.s}
E1 -> - T E2	{E2.h = geranodo('-',E1h,Tptr)} E2 {E1.s = E2.s}
E1 -> vazio		{E1s = E1h}

T -> F {T1.h = Fptr} T1 {Tptr = T1s}
T1 -> * F {T2.h = geranodo('*',T1h,Fptr)} T2 {T1.s = T2.s}
T1 -> / F {T2.h = geranodo('/',T1h,Fptr)} T2 {T1.s = T2.s}
T1 -> vazio		{T1s = T1h}

F -> ( E ) {Fptr = Eptr}
F -> raiz(E) {Fptr = geranodo('raiz', Eptr, 1);
F -> - F {Fptr = geranodo(*,-1,F1ptr)}
F -> id {gerafolha}
F -> num {gerafolha}

compiler_bhaskara_analyzer's People

Contributors

nicolaszanatto avatar

Watchers

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