-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How get values from pusher! macro? #55
Comments
Hi, it depends on what you want to do. If the data you want to parse can be entirely loaded into memory at once, you don't need pusher, you just call Will the producer be useful for your use case? By the way, you do not need to mess with producers and consumers for parser testing. Just load your test file and refer to an indexed slice of that file. |
I want parse a large file. And want do something with struct Test, for example (pseudocode):
or
With pusher!() I can parse file, but can't return structs from macros for do something. |
I see. I could provide another structure that will just apply the same parser over and over. Or provide an iterator |
Hi! I think the commit 700c942 should do what you want. Basically, this structure will wrap a producer, and has a Let me know if that could work for you. |
Hi!
I used pusher!() macro with FileProducer. But generated code doesn't return parser results.
For example, I have
I want get [Test] or iterable object of Test sequence.
Does nom have appropriate macro or example?
The text was updated successfully, but these errors were encountered: