Hi Harold, I am in the process of implementing a tokenizer for the RIF and I am having headaches sorting out the various kinds of tokens a RIF-BLD PS lexer should have for a quick prototype. I have a specific question: In http://www.w3.org/TR/rif-bld/#EBNF_for_the_Rule_Language, you specified: IRIMETA ::= '(*' IRICONST? (Frame | 'And' '(' Frame* ')')? '*)' Frame ::= TERM '[' (TERM '->' TERM)* ']' TERM ::= IRIMETA? (Const | Var | Expr | 'External' '(' Expr ')') Const ::= '"' UNICODESTRING '"^^' SYMSPACE | CONSTSHORT SYMSPACE ::= ANGLEBRACKIRI | CURIE where CONSTSHORT, ANGLEBRACKIRI, and CURIE are defined in: http://www.w3.org/TR/2008/WD-rif-dtb-20080730/#sec-shortcuts-constants by: ANGLEBRACKIRI ::= IRI_REF CURIE ::= PNAME_LN | PNAME_NS CONSTSHORT ::= ANGLEBRACKIRI // shortcut for "..."^^rif:iri | CURIE // shortcut for "..."^^rif:iri | '"' UNICODESTRING '"' // shortcut for "..."^^xs:string | NumericLiteral // shortcut for "..."^^xs:integer,xs:decimal,xs:double | '_' LocalName // shortcut for "..."^^rif:local However, when one looks at the example you give with meta-annotation: > Example 4 (A RIF-BLD document containing an annotated group). the meta-annoation PS you give for that example is: > (* "http://sample.org"^^rif:iri pd[dc:publisher -> http://www.w3.org/ > dc:date -> "2008-04-04"^^xs:date] *) Can you please explain to me how http://www.w3.org/ can be derived as a TERM according to the EBNF rules cited above? Thanks. -hak PS/ BTW, the PS grammar's tokenizing is now complexified due to using PS to declare Prefix and Base pragmas not using double-quoted strings around the IRI's. The alternative would be to parse IRI's - which is beyond such a prototype's goal. In the canonical PS, all such IRI's are double-quoted strings which greatly simplifies the tokenizing. It'd be as simple and as easy to do so for the Prefix and Base pragmas. -- Hassan Aït-Kaci * ILOG, Inc. - Product Division R&D http://koala.ilog.fr/wiki/bin/view/Main/HassanAitKaciReceived on Sunday, 21 September 2008 00:35:30 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:33:54 GMT