w3c / N3

W3C's Notation 3 (N3) Community Group
47 stars 18 forks source link

Can the `id` be anthing other than an IRI #158

Open jeswr opened 1 year ago

jeswr commented 1 year ago

For instance can I write [ id "abc" :p :o ].

Either way it would be good to have some positive or negative syntax tests for this.

william-vw commented 1 year ago

See the grammar: https://w3c.github.io/N3/spec/#grammar-production-iriPropertyList

You can always try out the latest grammar here: https://n3-editor.herokuapp.com/n3/editor/s/XQpxtP1C

jeswr commented 1 year ago

You can always try out the latest grammar here: https://n3-editor.herokuapp.com/n3/editor/s/XQpxtP1C

What parser are you using internally for this?

william-vw commented 1 year ago

A JavaScript ANTLR parser generated from n3.g4 (which is itself based on the EBNF grammar). See here for more.