xandaros / abnf Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 2-Clause "Simplified" License
License: BSD 2-Clause "Simplified" License
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.
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.
β¦to prevent people from accidentally using uncanonicalised rules
Provide a usage example in the Text.ABNF
module, as that is likely the first module a potential user clicks on.
There are still two parsers using partial function - these will crash on certain invalid input
The library should use linear (or close to) memory. Find out if that is the case and if it isn't - why.
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.
Generated parser doesn't work. Needs tests.
(I suppose the ABNF parser can get some, too. While we're at it)
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?
I have my doubts many people will immediately understand what this library is about.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.