rq23 grammar now in yacker

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

http://www.w3.org/2005/01/yacker/uploads/rq23final

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.

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.

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]

Input:
[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
confused.

 Andy

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