Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/q-uint/syntax
Parsers for ABNF Syntaxes
https://github.com/q-uint/syntax
iso8601 rfc2396 rfc3339 rfc3986
Last synced: 18 days ago
JSON representation
Parsers for ABNF Syntaxes
- Host: GitHub
- URL: https://github.com/q-uint/syntax
- Owner: q-uint
- License: mit
- Created: 2020-05-31T11:00:02.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-05T10:12:37.000Z (about 4 years ago)
- Last Synced: 2024-12-08T20:58:26.559Z (20 days ago)
- Topics: iso8601, rfc2396, rfc3339, rfc3986
- Language: Go
- Homepage:
- Size: 46.9 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ABNF Syntax Parsers
Contains auto-generated ABNF parsers w/ tests.
## Included
- [RFC2396](https://tools.ietf.org/html/rfc2396): Uniform Resource Identifiers (URI): Generic Syntax
- [RFC3339](https://tools.ietf.org/html/rfc3339): Date and Time on the Internet: Timestamps
- [RFC3986](https://tools.ietf.org/html/rfc3986): Uniform Resource Identifier (URI): Generic Syntax
- [RFC7159](https://tools.ietf.org/html/rfc7159) /
[RFC8259](https://tools.ietf.org/html/rfc8259): The JavaScript Object Notation (JSON) Data Interchange Format- [ISO8601](https://tools.ietf.org/html/rfc3339#appendix-A): ISO 8601 Collected ABNF (! based on the 1988 version)
## Validation
```go
import "github.com/di-wu/syntax/rfc3339"if !IsValid(rfc3339.DateTime, "1985-04-12T23:20:50.52Z") {
// date time is not valid
}
```##### CLI
```shell script
go run cli/cli.go -rfc=3339
``````shell script
go run cli/cli.go -in="./abnf/iso8601_date.abnf" -out="./iso8601/date.go" -pkg="iso8601" -core="DIGIT"
```