Code Monkey home page Code Monkey logo

Comments (4)

VinGarcia avatar VinGarcia commented on May 30, 2024

Hello, @SweetVishnya I am sorry, I've only seen your message now.

I was going to tell you that the project doesn't support it, but it was a simple thing to add so I just did it:

5080c49

Now it should be easy to use hex numbers and also octal numbers, e.g.:

// Hex number:
calculator::calculate("0x1f").asInt()
// Octal number:
calculator::calculate("010").asInt() 

from cparse.

VinGarcia avatar VinGarcia commented on May 30, 2024

I will close this issue, but feel free to reopen it if you find this solution doesn't solve your problem.

from cparse.

SweetVishnya avatar SweetVishnya commented on May 30, 2024

Hi!

I already implemented a shutting yard algorithm for my specific application. Also, your solution won't support uint64_t numbers.

from cparse.

VinGarcia avatar VinGarcia commented on May 30, 2024

Hello @SweetVishnya, my fault for taking so long to answer sorry 😅 , but regarding uint64_t yeah I wont support it by default since the idea is to have a simple generic parser, but you should be able to personalize it creating:

A new type

And then a new reserved word such as 10u that would convert the previous token from an int into an unsigned int, or alternatively if you used it as a prefix u10 then you could actually parse the number as an unsigned int from the start, which would be better.

Even though if you have already implemented it its probably better for you to just use your own implementation =P

from cparse.

Related Issues (20)

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.