Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.trapezium.vrml.grammar
Class BuiltInNodeRule  view BuiltInNodeRule download BuiltInNodeRule.java

java.lang.Object
  extended bycom.trapezium.vrml.grammar.BuiltInNodeRule
Direct Known Subclasses:
PROTONodeRule

class BuiltInNodeRule
extends java.lang.Object

Creates built in VRML node scene graph components. Grammar handled by "Build" method:

    builtInNodeTypeId { builtInNodeGuts }
  
Grammar handled by "BuildNodeGuts" method:
    builtInNodeGuts ::=
       nodeBodyElement |
       nodeBodyElement nodeBody |
       empty ;
  

Since:
1.0
Version:
1.12, 24 April 1998, added DEFNameFactory control, 1.1, 8 Jan 1998

Field Summary
(package private)  DEFNameFactory defNameFactory
           
(package private)  NodeBodyRule nodeBodyRule
           
 
Constructor Summary
(package private) BuiltInNodeRule(NodeRule nodeRule)
          class constructor
 
Method Summary
(package private)  void Build(java.lang.String nodeType, int tokenOffset, com.trapezium.parse.TokenEnumerator v, com.trapezium.vrml.Scene scene, com.trapezium.vrml.VrmlElement parent)
          Create a built in node and add to Scene graph.
(package private)  void BuildNodeGuts(com.trapezium.vrml.node.Node node, int tokenOffset, com.trapezium.parse.TokenEnumerator v, com.trapezium.vrml.Scene scene)
          Create node body, and add to node.
(package private)  void setDEFNameFactory(DEFNameFactory defNameFactory)
          Set the DEFNameFactory, used when scene factory overrides parser factory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodeBodyRule

NodeBodyRule nodeBodyRule

defNameFactory

DEFNameFactory defNameFactory
Constructor Detail

BuiltInNodeRule

BuiltInNodeRule(NodeRule nodeRule)
class constructor

Method Detail

setDEFNameFactory

void setDEFNameFactory(DEFNameFactory defNameFactory)
Set the DEFNameFactory, used when scene factory overrides parser factory


Build

void Build(java.lang.String nodeType,
           int tokenOffset,
           com.trapezium.parse.TokenEnumerator v,
           com.trapezium.vrml.Scene scene,
           com.trapezium.vrml.VrmlElement parent)
Create a built in node and add to Scene graph.


BuildNodeGuts

void BuildNodeGuts(com.trapezium.vrml.node.Node node,
                   int tokenOffset,
                   com.trapezium.parse.TokenEnumerator v,
                   com.trapezium.vrml.Scene scene)
Create node body, and add to node.

Node body is assumed to be: "{ ..node body.. }"

If left brace is missing, record the error, then continue parsing as if it were there.

If right bracket encountered where right brace might be expected, report the error, keep token enumerator pointing to right bracket.