meval-rs icon indicating copy to clipboard operation
meval-rs copied to clipboard

Nom5

Open glennpierce opened this issue 5 years ago • 3 comments

If you are interested I need a basic parser / evaluator to perform simple maths on vectors of data. Why trying to learn your code I made a port to use nom 5 if you are interested. If so here is the pull request.

glennpierce avatar Dec 05 '19 22:12 glennpierce

Thanks for the updated code. I will check it out if I find time; I'm unfortunately a bit busy these days. I didn't even know that there is already nom version 5! :)

rekka avatar Dec 08 '19 21:12 rekka

any update here? nu-command requires meval, and we have nom 7.1.0 in Fedora so unless we maintain nom 1.x there separately, we can't build Nushell without heavily patching meval

michel-slm avatar Jan 12 '22 21:01 michel-slm

Thanks for the ping.

I am not at all familiar with packaging programs for Fedora (is this the Linux distribution we are talking about?)

I have not updated to newer versions of nom since I do not see the benefit of the extra work (and serious lack of available time). Last time I checked it looked like that only the API changed, which might make writing new parsers easier I suppose, but I did not see any performance gains that would justify the update. I do not plan to expand the functionality of meval's parser. I checked and nom 1 is still available on crates.io and as far as I know it compiles on the current rustc just fine.

Is there a bug in nom 1 that is a cause for concern?

My worry is that the semantics of nom changed between 1 and 7, in particular the handling of complete/incomplete parsing, and this makes updating the current parser somewhat subtle. I cannot say that my unit tests are exhaustive...

I am sorry for my lack of knowledge, but can you give me more details why it is necessary to update to newer nom? Would I need to update to a newer version of nom again when nom bumps the version to 8, 9, etc.?

rekka avatar Jan 13 '22 07:01 rekka