The BNF file does not have numeric labels for rules; the HTML table does.
Add number to the BNF text presentation for the grammar.
The numbering should line up with the HTML table.
Such numbering is may be not "strict" W3C EBNF but there again, nor are newlines inside rules.
Numbering is easy to remove.
(The BNF file is new in SPARQL 1.2)
Before:
QueryUnit ::= Query
Query ::= Prologue ( SelectQuery | ConstructQuery | DescribeQuery | AskQuery ) ValuesClause
UpdateUnit ::= Update
Prologue ::= ( BaseDecl | PrefixDecl | VersionDecl )*
BaseDecl ::= 'BASE' IRIREF
PrefixDecl ::= 'PREFIX' PNAME_NS IRIREF
. . .
PN_CHARS ::= PN_CHARS_U | '-' | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040]
PN_PREFIX ::= PN_CHARS_BASE ((PN_CHARS|'.')* PN_CHARS)?
PN_LOCAL ::= (PN_CHARS_U | ':' | [0-9] | PLX ) ((PN_CHARS | '.' | ':' | PLX)* (PN_CHARS | ':' | PLX) )?
PLX ::= PERCENT | PN_LOCAL_ESC
PERCENT ::= '%' HEX HEX
HEX ::= [0-9] | [A-F] | [a-f]
PN_LOCAL_ESC ::= '\' ( '_' | '~' | '.' | '-' | '!' | '$' | '&' | "'" | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' | '%' )
After:
[1] QueryUnit ::= Query
[2] Query ::= Prologue ( SelectQuery | ConstructQuery | DescribeQuery | AskQuery ) ValuesClause
[3] UpdateUnit ::= Update
[4] Prologue ::= ( BaseDecl | PrefixDecl | VersionDecl )*
[5] BaseDecl ::= 'BASE' IRIREF
[6] PrefixDecl ::= 'PREFIX' PNAME_NS IRIREF
. . .
[188] PN_CHARS ::= PN_CHARS_U | '-' | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040]
[189] PN_PREFIX ::= PN_CHARS_BASE ((PN_CHARS|'.')* PN_CHARS)?
[190] PN_LOCAL ::= (PN_CHARS_U | ':' | [0-9] | PLX ) ((PN_CHARS | '.' | ':' | PLX)* (PN_CHARS | ':' | PLX) )?
[191] PLX ::= PERCENT | PN_LOCAL_ESC
[192] PERCENT ::= '%' HEX HEX
[193] HEX ::= [0-9] | [A-F] | [a-f]
[194] PN_LOCAL_ESC ::= '\' ( '_' | '~' | '.' | '-' | '!' | '$' | '&' | "'" | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' | '%' )
The BNF file does not have numeric labels for rules; the HTML table does.
Add number to the BNF text presentation for the grammar.
The numbering should line up with the HTML table.
Such numbering is may be not "strict" W3C EBNF but there again, nor are newlines inside rules.
Numbering is easy to remove.
(The BNF file is new in SPARQL 1.2)
Before:
After: