[x3d-public] [x3d] Spec Comment by brutzman on 19776-2: ClassicVRML Encoding - V3.3 [Mantis 1167]

Roy Walmsley roy.walmsley at ntlworld.com
Wed Jul 19 11:11:28 PDT 2017


Hi,

 

Having looked at the grammar relating to prototype instances I think it does
not actually need modification. That said, however, I think clarity could be
improved. I suggest the following.

 

The current productions for the non-terminals proto and externproto are as
follows:

 

proto ::= 

PROTO nodeTypeId [ interfaceDeclarations ] { protoBody } ; 

externproto ::= 

EXTERNPROTO nodeTypeId [ externInterfaceDeclarations ] URLList ;

 

The non-terminal nodeTypeId is the same non-terminal that is used in the
definition of the production for the non-terminal node:

 

node ::= 

nodeTypeId { nodeBody } | 

Script { scriptBody } |

ComposedShader {composedShaderBody} |
PackagedShader {packagedShaderBody} |
ShaderProgram {shaderProgramBody} ; 

 

I think this could be improved by introducing two additional non-terminals,
namely protoInstance and protoNodeTypeId. Taking the latter first, this
would align with nodeTypeId and have the following production:

 

protoNodeTypeId ::= 

Id ; 

 

The production for protoInstance, aligning with node, would be:

 

protoInstance ::= 

protoNodeTypeId { nodeBody } ; 

 

The productions for the non-terminals proto and externproto would then be
amended to

 

proto ::= 

PROTO protoNodeTypeId [ interfaceDeclarations ] { protoBody } ; 

externproto ::= 

EXTERNPROTO protoNodeTypeId [ externInterfaceDeclarations ] URLList ;

 

Finally, the production for the non-terminal nodeStatement would be expanded
to explicitly include protoInstance, as follows:

 

nodeStatement ::= 

node | 

protoInstance |

DEF nodeNameId node | 

DEF nodeNameId protoInstance |

USE nodeNameId ;

 

This has the following advantages:

1.	It allows text that states the non-terminal nodeTypeId can be the
type of any of the built-in nodes defined in the abstract standard 19775-1. 
2.	It allows text that states the non-terminal protoNodeTypeId is the
type of any user defined prototype
3.	It clearly separates the built-in nodes from prototypes within the
grammar.

 

All the best,

 

Roy

 

-----Original Message-----
From: x3d [mailto:x3d-bounces at web3d.org] On Behalf Of Spec Feedback
Sent: 19 July 2017 17:59
To: x3d at web3d.org
Subject: [x3d] Spec Comment by brutzman on 19776-2: ClassicVRML Encoding -
V3.3

 

-- Submitter indicates that this comment may be public: *Yes* --

 

Comment on 19776-2: ClassicVRML Encoding - V3.3 Annex A (normative) Grammar
<http://www.web3d.org/documents/specifications/19776-2/V3.3/Part02/grammar.h
tml>
http://www.web3d.org/documents/specifications/19776-2/V3.3/Part02/grammar.ht
ml

 

-----------------

Subject: need explicit definition of DEF and USE associated with prototype
instances in ClassicVRML grammar

 

ClassicVRML formal grammar does not include explicit definition of DEF and
USE associated with prototype instance statements.

 

The current grammar seems to lean on prose definitions in section A.2 to
augment rules in A.3.  More is needed: better prose, additional rule(s), or
both.

 

Email thread exploring this issue found at
<http://web3d.org/pipermail/x3d-public_web3d.org/2017-July/007155.html>
http://web3d.org/pipermail/x3d-public_web3d.org/2017-July/007155.html

(see second half)

-----------------

 

Submitted on Wednesday, 2017,  July 19 - 9:59am by brutzman (brutzman )

IP: 162.225.68.164

 

See:  <http://www.web3d.org/node/1694/submission/1396>
http://www.web3d.org/node/1694/submission/1396

 

 

_______________________________________________

x3d mailing list

 <mailto:x3d at web3d.org> x3d at web3d.org

 <http://web3d.org/mailman/listinfo/x3d_web3d.org>
http://web3d.org/mailman/listinfo/x3d_web3d.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170719/3ca5ecdd/attachment.html>


More information about the x3d-public mailing list