Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n3Directive0!:
- d:AT_PREFIX ns:nsprefix u:uriref
- {directive(#d, #ns, #u);}
- ;
- propertyList![AST subj]
- : NAME_OP! anonnode[subj] propertyList[subj]
- | propValue[subj] (SEMI propertyList[subj])?
- | // void : allows for [ :a :b ] and empty list "; .".
- ;
- propValue [AST subj]
- : v1:verb objectList[subj, #v1]
- // Reverse the subject and object
- | v2:verbReverse subjectList[subj, #v2]
- ;
- subjectList![AST oldSub, AST prop]
- : obj:item { emitQuad(#obj, prop, oldSub) ; }
- (COMMA subjectList[oldSub, prop])? ;
- objectList! [AST subj, AST prop]
- : obj:item { emitQuad(subj,prop,#obj) ; }
- (COMMA objectList[subj, prop])?
- | // Allows for empty list ", ."
- ;
- n3Directive0!:
- d=AT_PREFIX ns=nsprefix u=uriref
- {directive($d, $ns, $u);}
- ;
Add Comment
Please, Sign In to add comment