Skip to content

Commit

Permalink
Merge pull request #2 from josd/patch-3
Browse files Browse the repository at this point in the history
Update n3.pest
  • Loading branch information
pbonte authored Jun 24, 2022
2 parents 7ba626f + c3f7e7c commit 623d8bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/src/parsing/n3.pest
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ NewLine = { "\r" | "\n" }
Var = {"?"~ASCII_ALPHA+~ASCII_ALPHANUMERIC*}
Prefix = {"@prefix"~SPACE+~PrefixIdentifier~":"~SPACE+~"<"~Iri~">"~WS* ~"."~WS*}
PrefixIdentifier = {ASCII_ALPHANUMERIC*}
Prefixed = {PrefixIdentifier ~":"~ASCII_ALPHANUMERIC+}
LocalNameChar = {ASCII_ALPHANUMERIC | "_"}
Prefixed = {PrefixIdentifier ~":"~LocalNameChar+}
Term = {"<"~Iri~">" | Prefixed}
varOrTerm = { Term | Var}
Subject = { Term | Var}
Expand All @@ -85,4 +86,4 @@ TP = { WS*~Subject ~WS+~ Property ~WS+~ Object ~WS* ~"."? ~WS* }
Body = {"{"~TP+~"}"}
Head = {"{"~WS*~TP~WS*~"}"}
rule = { Body~WS*~"=>"~WS*~Head~WS*~"."? ~WS*}
document = {Prefix* ~ NewLine* ~rule+}
document = {Prefix* ~ NewLine* ~rule+}

0 comments on commit 623d8bf

Please sign in to comment.