Created
October 30, 2020 16:31
-
-
Save dustinknopoff/30608fa09925ba3715b4b8dc57451512 to your computer and use it in GitHub Desktop.
If I ever decide to go back to generating rust structs/definitions for Schema.org
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WHITESPACE = _{NEWLINE | " " | "\n" | "\t"} | |
SchemaString = {"\"" ~ (("\\" ~ "\"") | (!"\"" ~ ANY))+ ~ "\"" ~ ("@" ~ ASCII_ALPHA+)? } | |
UrlNode = {(!(">" | "<") ~ ANY)+} | |
TAG = { "<" ~ UrlNode ~ ">"} | |
// Use url = "2.1" to parse out URLs...need to extract protocol, hostname, path, search, fragment | |
// A UrlNode is "subClassOf" "http://www.w3.org/2000/01/rdf-schema" "http://www.w3.org/2000/01/rdf-schema#subClassOf" | |
TRIPLE = { TAG ~ TAG ~ (TAG | SchemaString) ~ "." } | |
parse = { | |
SOI ~ TRIPLE* | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment