Coder Social home page Coder Social logo

Comments (5)

lihaoyi avatar lihaoyi commented on June 1, 2024

I understand the problem with ~!.

OTOH I'm also reluctant to make it ~>; that re-uses an operator already defined in scala-parser-combinators and atto, and pretty widely used, to do something totally different. That's not great for people coming from the other two libraries, which I'd guess are a non-trivial number.

Basically anything starting with ~ will have the correct precedence; maybe something like ~/? I don't actually know if it's worth changing, but maybe that's my thousands-of-lines-of-scala-parser-combinator-experience speaking...

from fastparse.

Ichoran avatar Ichoran commented on June 1, 2024

Well, almost anything would be better than ~!, since your writeup made it seem like a really good idea to use cuts, and I used them, and then was immediately bitten by the difficulty of reading and not typoing the syntax. ~/ would be okay. ~# is faster to type and is more visually distinct. ~~~ is also pretty fast to type and visually clear, though it's not so obvious it might mean no backtracking.

from fastparse.

Alain-Bearez avatar Alain-Bearez commented on June 1, 2024

What about ~!~ which would keep the idea of the classical sequence operator, only cut in the middle? This way any whitespace on either side of the central ! would lead to a compile error, while maintaining the exclamation point separated from the following parser.

from fastparse.

Alain-Bearez avatar Alain-Bearez commented on June 1, 2024

I implemented this alternate cut sequence operator in pull request #53, for you to check.

from fastparse.

lihaoyi avatar lihaoyi commented on June 1, 2024

Closed by #57

from fastparse.

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.