Skip to content

Nom5#22

Open
glennpierce wants to merge 3 commits intorekka:masterfrom
glennpierce:nom5
Open

Nom5#22
glennpierce wants to merge 3 commits intorekka:masterfrom
glennpierce:nom5

Conversation

@glennpierce
Copy link
Copy Markdown

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.

@rekka
Copy link
Copy Markdown
Owner

rekka commented Dec 8, 2019

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! :)

@michel-slm
Copy link
Copy Markdown

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

@rekka
Copy link
Copy Markdown
Owner

rekka commented Jan 13, 2022

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.?

Titaniumtown pushed a commit to Titaniumtown/meval-rs that referenced this pull request Feb 16, 2022
based on work from: rekka#22
Titaniumtown pushed a commit to Titaniumtown/meval-rs that referenced this pull request Feb 16, 2022
based on work from: rekka#22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants