Code Monkey home page Code Monkey logo

Comments (4)

ojwb avatar ojwb commented on June 29, 2024

It's a known limitation of SWIG's parser that it doesn't handle < or > in constant expressions. Here's a closely related existing bug which gives a bit more background:

http://sourceforge.net/p/swig/bugs/1139/

I don't know of a good general workaround I'm afraid. If you can modify the header being wrapped, then using !(a <= b) instead of (a > b) is an option as <= and >= are handled.

from swig.

gokceneraslan avatar gokceneraslan commented on June 29, 2024

That bug also hit me in Eigen headers: https://bitbucket.org/eigen/eigen/src/60f8b0f18340337e036b566bc583c77deb52f965/Eigen/src/Core/PlainObjectBase.h?at=default&fileviewer=file-view-default#PlainObjectBase.h-142

from swig.

ojwb avatar ojwb commented on June 29, 2024

I wondered if we could at least support < and > when in a subexpression inside ( ... ) which looks like it would cover all the examples here, in #635 and in the older linked issue in the SF tracker. The Eigen link above doesn't work for me now so I can't easily check that. This wouldn't be a completely perfect solution, but would fix some cases.

I had a quick try and managed to avoid introducing any reduce/reduce conflicts (which is great) but handling < introduces 2 new shift/reduce conflicts (which we ideally want to avoid). I'll mull this over and see if I can figure out how to make it work without any new conflicts, but if someone with bison expertise wants to take a look please say.

from swig.

wsfulton avatar wsfulton commented on June 29, 2024

Great tactical solution @ojwb

from swig.

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.