W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2005

rq23 grammar now in yacker

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Wed, 31 Aug 2005 20:30:42 +0100
Message-ID: <43160562.7060107@hp.com>
To: 'RDF Data Access Working Group' <public-rdf-dawg@w3.org>

I took the grammar in v1.479 and put it into yacker, then generated Perl, C
and C++ grammars with no errors.


As this is close to the real thing, I went through and noted differences to
the EBNF in the document in case they affect the parsers output or because
we will be linking to this representation of the grammar.

[66] Q_IRI_REF ::= '<' ([^<>]-[#00-#20])* '>'

Yacker input:
[66] Q_IRI_REF ::= '<' ([^<>\r\n \t])* '>'

I had to change this because yacker doesn't understand character class "-".
Eric is on the case.  When it's upgraded I'll insert the exact chars
from rq23.

Yacker output:
[66] <Q_IRI_REF> ::= "<" [^<>\r\n\t ]* ">"

Yacker puts <> round tokens.  A while ago the WG asked that terminals
weren't picked out because there are alternative tokenizations of the grammar.

[77] ECHAR ::=	'\' [tbnrf\"']

Yacker input:
[77] ECHAR ::= '\\' [tbnrf"'\\]

By experimentation, I found I had to double up various \'s
I'm not sure what needs to be done and what doesn't.

Similarly rules [80] and [81]

[78] STRING_LITERAL1 ::=  "'" ( ([^#x27#x5C#xA#xD]) | ECHAR )* "'"
[79] STRING_LITERAL2 ::=  '"' ( ([^#x22#x5C#xA#xD]) | ECHAR )* '"'

Yacker output:
[78] <STRING_LITERAL1>  ::= "'" ( [^'\\\n\r] | <ECHAR> )* "'"
[79] <STRING_LITERAL2>  ::= '"' ( [^\"\\\n\r] | <ECHAR> )* '"'

#xXX not preserved.

Yacker adds a rule that is not in the grammar:
[88]    	PASSED TOKENS 	   ::=    	[ \t\r\n]+

(Eric - any chance this could be suppressed in the HTML output, especially 
as it has a space in the rule name and the rule isn't mentioned elsewhere?).

The CSS formats grammar rules and tokens slightly differently for me with
Firefox.  The fonts are different sizes.

Eric - please delete "rq23-final" The "-" seems to cause problems so there
is a broken upload there.  I put a trivial grammar there so we don't get

Received on Wednesday, 31 August 2005 19:30:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:00:36 UTC