w3c / shacl

SHACL Community Group (Post-REC activitities)
31 stars 5 forks source link

consider edmondchuc/shaclc #69

Open VladimirAlexiev opened 1 month ago

VladimirAlexiev commented 1 month ago

hi @edmondchuc! I'll add your implementation https://github.com/edmondchuc/shaclc/ to the list that we keep

edmondchuc commented 3 weeks ago

Hi @VladimirAlexiev, thanks for considering my implementation. I currently don't have a use for SHACLC, so can't really provide any meaningful input as to what a SHACLC 1.2 should look like. But I am happy to stay up to date with what you and the rest of the SHACLC WG propose and potentially implement those new additions to my python lark implementation and provide it as implementation evidence to the WG.

From memory, I think the lark grammar is faithfully produced from https://w3c.github.io/shacl/shacl-compact-syntax/#grammar-section. The only thing I remember deviating from the grammar is to allow for case-insensitive keywords. For example, PREFIX, Prefix, prefix are all valid.

You can play around with the lark grammar by using this browser IDE and pasting the lark grammar there to see what AST is produces.

There's also a shaclc playground online here where you can see how the shaclc syntax is converted into normal RDF SHACL syntax.