Coder Social home page Coder Social logo

abnf's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

abnf's Issues

Hackage publish request

Thanks for your great library - I was looking for a Haskell equivalent to abnf.py, and this looks good!

Is it possible for you to please publish an updated version to Hackage? Version 0.4.1.0 has a base bound of >=4.8 && <4.10. base-4.10 was bundled with GHC 8.2.1 in 2017, so it's quite old now. However, I noticed that this repo has a much more recent bound, which would make it more widely usable.

Monad/Applicative instances

Document is missing Applicative and Monad instances and the Applicative instance for Content needs to be made explicit.

All those instances (incl. Functor) need their respective laws proven.

Usage example

Provide a usage example in the Text.ABNF module, as that is likely the first module a potential user clicks on.

Use only total functions

There are still two parsers using partial function - these will crash on certain invalid input

Memory profiling

The library should use linear (or close to) memory. Find out if that is the case and if it isn't - why.

Explicit export lists

These will probably break the tests, so the actual functions need to go into an Internal module, which gets selectively re-exported by the modules that currently exists.

Tests

Generated parser doesn't work. Needs tests.

(I suppose the ABNF parser can get some, too. While we're at it)

Does it work?

I was looking at using this project to make a parser for BCP47 Language-Tags, but I can't seem to make even simpler cases work.

I've started by using the following simplified rule,

Language-Tag = 2*3ALPHA

To parse a simple value,

en

But I always get

Left "Rule > Sum: Failed reading: empty."

I can tell something is working, because if I change the ABNF to,

Language-Tag = "en"

Then I get correctly,

Right (Document "Language-Tag" [Terminal "en"])

Am I doing something wrong? Shouldn't 2*3ALPHA produce a parser that succeeds on 2-3 alpha characters?

Better description

I have my doubts many people will immediately understand what this library is about.

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.