GithubHelp home page GithubHelp logo

Comments (9)

nblumhardt avatar nblumhardt commented on August 17, 2024

Because Superpower doesn't backtrack, I'd expect A.Then(B).Or(C).Or(D).Many().AtEnd() to fail if B fails, without attempting any additional parses. Does that match what you see?

from superpower.

AndrewSav avatar AndrewSav commented on August 17, 2024

@nblumhardt no, not really, unfortunately. Consider the case when A is zero-width, e.g. Parse.Not(something)

from superpower.

AndrewSav avatar AndrewSav commented on August 17, 2024

Here is an example: https://github.com/AndrewSav/CommandLineParserPoc/blob/ca154fec085b96966d5cd45373270bef1b40536c/CommandLineParserPoC/CommandLineParser.cs#L161

The parser matches either binary switch list switch or value switch. The remaining type is value and it is invalid in the beginning. So I want to test for it and fail if that's so with a nice error message. Currently I'm getting the "At end" message that is not that nice.

from superpower.

nblumhardt avatar nblumhardt commented on August 17, 2024

Will have a closer look at this - thanks 👍

from superpower.

nblumhardt avatar nblumhardt commented on August 17, 2024

Closing this one as stale; still seems worth investigating but will need some concrete direction to move forwards. Thanks @AndrewSav

from superpower.

AndrewSav avatar AndrewSav commented on August 17, 2024

@nblumhardt Seriously? What have I done wrong?

from superpower.

nblumhardt avatar nblumhardt commented on August 17, 2024

Perhaps I misunderstood your conclusions in your PR - is it possible to implement this atop what we have in Superpower today?

from superpower.

AndrewSav avatar AndrewSav commented on August 17, 2024

@nblumhardt apologies, what PR are we talking about? I might have forgotten something.

is it possible to implement this atop what we have in Superpower today?

That's what this issue is about. Is it possible? If not, why? This seems to me as something that is reasonable. I understand that did not come up in your usage scenarios, so I wanted to know if there are ways to solve this I have not thought of with what is already there. If there are not, than solving it by improving Superpower seems as a good thing to do for wider users or Superpower, so I was looking for ideas on how we go about it, what is actually required to make this work.

If your resources constraint and time allocation simply does not allow for improving the library beyond your own needs, and you want to close issues on that basis, then just let me know. To me reading this thread feels like you said you would take a closer look and then closed it with a comment I could not really understand.

from superpower.

nblumhardt avatar nblumhardt commented on August 17, 2024

Sorry Andrew, I think it's me confused, I thought the linked PR which you closed was exploring this.

Time for working on this is low right now, but no doubt some opportunities will come up in the future and I'll have a chance to dig in.

The aim is to keep the open issues list fresh, so that when some time is available, I can skip any dead-ends or no-longer-needed requests. Between the Datalust projects, Serilog-related ones, and others, this can mean sorting through a lot of issues, and it's not a 100% scientific process :-)

On this issue in particular, it seems to need some deep digging; if anyone following along is able to get to the bottom of what's needed, that would help guide it towards a solution. Cheers!

from superpower.

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.