Haskell-Things / ImplicitCAD

A math-inspired CAD program in haskell. CSG, bevels, and shells; 2D & 3D geometry; 2D gcode generation...
https://implicitcad.org/
GNU Affero General Public License v3.0
1.39k stars 142 forks source link

Incompatibility: ternary operator with comparison not recognized #177

Closed Cookshak closed 5 years ago

Cookshak commented 8 years ago

The parser does not recognize a ternary operator expression that has a comparison as the leftmost expression: a < b ? 3 : 4

The workaround is to add parentheses: (a < b) ? 3 : 4

There is a disable test in the parser test suite to check for this.

julialongtin commented 7 years ago

Is this one of the parser bugs you've addressed?

Cookshak commented 7 years ago

I don't think I worked how to fix this in the original parser, just in the alternate one.

Are you just grabbing the pull request i submitted to mmachenry's repo, or are you looking at mods from my fork? I haven't created a pull request for most of the work I've done, yet.

The only pull request I've added to mmachenry is to fix let expressions.

On Nov 3, 2016 8:13 PM, "Julia Longtin" notifications@github.com wrote:

Is this one of the parser bugs you've addressed?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/colah/ImplicitCAD/issues/177#issuecomment-258328032, or mute the thread https://github.com/notifications/unsubscribe-auth/ATedL_CDiSmU8fv0JqFVhLfeJMfga0llks5q6pTQgaJpZM4JOECY .

julialongtin commented 7 years ago

I'm digging into the mods in the fork, but a lot of it is above my haskell. can you pop onto the IRC channel, #implicitcad on freenode, so we can discuss this all?

Sorry to be a blocker for this obviously good work, but I'm trying not to commit code I do not understand.. and there's a lot I don't understand in ImplicitCAD. :)

Julia Longtin

On 11/4/16, Cookshak notifications@github.com wrote:

I don't think I worked how to fix this in the original parser, just in the alternate one.

Are you just grabbing the pull request i submitted to mmachenry's repo, or are you looking at mods from my fork? I haven't created a pull request for most of the work I've done, yet.

The only pull request I've added to mmachenry is to fix let expressions.

On Nov 3, 2016 8:13 PM, "Julia Longtin" notifications@github.com wrote:

Is this one of the parser bugs you've addressed?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/colah/ImplicitCAD/issues/177#issuecomment-258328032, or mute the thread https://github.com/notifications/unsubscribe-auth/ATedL_CDiSmU8fv0JqFVhLfeJMfga0llks5q6pTQgaJpZM4JOECY .

You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/colah/ImplicitCAD/issues/177#issuecomment-258465966

julialongtin commented 5 years ago

Integrated all of the alternate expression parser work, without breaking the functionality of the original parser. The test in the test suite runs successfully.