Coder Social home page Coder Social logo

Comments (9)

shnewto avatar shnewto commented on August 26, 2024

Yeah I've been thinking about this one too. Thanks for raising it.

from bnf.

shnewto avatar shnewto commented on August 26, 2024

One note, I'd like it if we didn't require a newline either so breaking up long productions or expressions across lines wouldn't prohibit parsing.

from bnf.

CrockAgile avatar CrockAgile commented on August 26, 2024

Not requiring the newline seems trickier to me, but sounds like you have an idea. How would that work?

from bnf.

shnewto avatar shnewto commented on August 26, 2024

@CrockAgile I've got a lot of faith in what we can get out of nom, I could be misguided but here's my general thought. Productions can end on a ; on eof or if with peek or some similar custom mechanism we are able to see that a <...> ::= is next in line. What do you think?

from bnf.

CrockAgile avatar CrockAgile commented on August 26, 2024

@Snewt that seems reasonable to me. I still need to brush up on nom to know how it handles forward peeking, but you are probably right it is doable. I would guess it would improve usability with negligible impact on performance or code readability

from bnf.

CrockAgile avatar CrockAgile commented on August 26, 2024

@Snewt Would it be too slick/hacky to sidestep this issue by honoring BNF comments? If BNF comments are from ; to the end of line, then essentially they become optional. And would support comments in the input string.

from bnf.

shnewto avatar shnewto commented on August 26, 2024

@CrockAgile I'm not sure that would really sidestep the issue as it stands. It could be that we add support for ; comments but as it is they are expected to only show up in specific instances.

from bnf.

CrockAgile avatar CrockAgile commented on August 26, 2024

@Snewt Sounds good! I think I got confused anyway by glancing at the algol example in the history section on the wiki.

from bnf.

shnewto avatar shnewto commented on August 26, 2024

closed by 21338d3

from bnf.

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.