Coder Social home page Coder Social logo

ldthomas / apg-js2 Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 8.0 397 KB

Deprecated. Use the updated version, apg-js, instead. JavaScript APG Version 2.0. APG is an ABNF Parser Generator. It generates recursive-descent parsers from a superset of ABNF grammars.

License: BSD 3-Clause "New" or "Revised" License

JavaScript 99.23% Shell 0.77%

apg-js2's People

Contributors

kaicode avatar ldthomas avatar vsemozhetbyt avatar wking avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

apg-js2's Issues

RFC 7405

I was just having a quick play around with APG, and I'm getting errors for case-sensitive literal text strings introduced in RFC 7405 (which updates RFC 5234). For example:

keyword = %s"array" / %s"bool"

Results in Unrecognized SABNF element. for both instances of %s.

In addition, RFC 5234 is case insensitive, and the parsers that APG currently generates do not seem to be honoring this (I say this from looking at the generated parser, and only seeing ASCII values for exact case matches):

ABNF strings are case insensitive and the character set for these strings is US-ASCII.

Hence:

rulename = "abc"

and:

rulename = "aBc"

will match "abc", "Abc", "aBc", "abC", "ABc", "aBC", "AbC", and "ABC".

Move functionality to apg-lib

Most of the functionality could be exported to apg-js2-lib in order to make the apg-js2 suite of packages platform agnostic and would enable packages like apg-js2-exp compatible with react native (ldthomas/apg-js2-exp#3)

An alternative would be to make a apg-js2-parse lib or something...

What do you think?

rfc5234 core rules

I seem to be getting that ALPHA and WSP, etc. aren't defined. This are specified in the core rules section of the rfc spec. Am I missing where these are or are they not implemented in this parser? Thank you!

unable to use in browser using webpack

I'm trying to use this library in the browser in a webpack application instead of a browserify application. Everytime it tries to build the bundle it complains about not being able to resolve the 'fs' module. Would you have any advice on solving this? I'll post any updates here for future users if I have any luck.

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.