Comments (6)
Hi, just wonder if there is anyone working on this? I've just finished one project using Parsy and willing to contribute.
from parsy.
I'm not working on this, contributions would be welcome. notFollowedBy
is already implemented in the form of should_fail.
from parsy.
I've just sent a PR implementing the lookAhead #29
from parsy.
And here's a proposal for manyTill
: #31
from parsy.
I've got a concern about my implementation of lookAhead
. peek
is a function rather than a method on Parser
. It's something I find confusing when I'm working with Parsy: Is stuff
a method or a function that takes a parser?
I did make a function, because it's how I implemented this as a helper function in a project of mine, no other reason.
Is there a rule of thumb for this dilemma, method or function?
Note that peek(p)
is the exact equivalent of p.should_fail().should_fail()
(and we should benchmark this to decide wich implementation is better). Maybe it makes sense to make it a method on Parser.
Same question for #31.
from parsy.
@lisael - yes, it is a bit hard to decide in some cases.
I think many_until
makes more sense as a method, because it is similar to other things like many
, and peek
for a similar argument comparing to should_fail
. I guess it's about a consistent fluent API.
For things that don't take a parser as an argument, or can take more than one, we use functions. I think that's a good rule of thumb.
from parsy.
Related Issues (20)
- >>= for bind HOT 14
- Missing documentation for eof parser? HOT 1
- Improve debugging: peek show next data in errors HOT 5
- Recompute line number for ParseError passed up from .bind
- Improve debugging ergonomics HOT 3
- Inline (explicit) and implicit tracing
- Missing seq import statement in tutorial HOT 1
- Help with parsing that "hangs" HOT 3
- Bug with backtracking and generate? HOT 4
- Parsy 1.3.0 fails to support 'group' keyword of `regex` function HOT 1
- async/await support in generate() HOT 6
- Release HOT 2
- Interested in a version of parsy with type annotations? HOT 3
- Allow providing a default to optional() HOT 2
- maintaining state while parsing HOT 3
- combine fails when nothing is produced by many HOT 2
- [bug] Parser.desc() causes loss of error information, simple fix HOT 2
- alt doesn't use fallback parsers when initial parser has .many()/.sep_by() HOT 1
- Processing list of tokens HOT 1
- Seeking Guidance on Implementing Parser Autocomplete HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parsy.