Coder Social home page Coder Social logo

basemax / infix2postfix Goto Github PK

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

This is a simple infix to postfix converter written in JavaScript. It is a simple project that I made to show other students how they can easily design this type of program and how they can use it to solve their problems.

License: GNU General Public License v3.0

JavaScript 100.00%
infix infix-calculator infix-expression infix-expression-parser infix-expressions infix-notation infix-to-postfix infixtopostfix infixtopostfix-expression javascript

infix2postfix's Introduction

Infix To Postfix Converter (Infix2Postfix)

This is a simple infix to postfix converter written in JavaScript.

It is a simple project that I made to show other students how they can easily design this type of program and how they can use it to solve their problems.

How to use

  1. Clone the repository
  2. Enter your infix expression in the example.js file
  3. Run example.js in your terminal
  4. You will get the postfix expression as output

Example

convert_infix_to_postfix("5 + 6 * 7")
// [ '5', '6', '7', '*', '+' ]

convert_infix_to_postfix("(((a/b)-c) + (d*e))- (a*c)")
// [
//   'a', 'b', '/', 'c',
//   '-', 'd', 'e', '*',
//   '+', 'a', 'c', '*',
//   '-'
// ]

convert_infix_to_postfix("(k+l)-(m*n)+(o^p)*w/v/u*t+q")
// [
//   'k', 'l', '+', 'm', 'n',
//   '*', '-', 'o', 'p', '^',
//   'w', '*', 'v', '/', 'u',
//   '/', 't', '*', '+', 'q',
//   '+'
// ]

© Copyright (c) 2022 Max Base

infix2postfix's People

Watchers

 avatar

Forkers

pioupia

infix2postfix's Issues

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.