Class X3DFieldParser

java.lang.Object
org.web3d.parser.x3d.X3DFieldParser
All Implemented Interfaces:
X3DFieldParserConstants

public class X3DFieldParser extends Object implements X3DFieldParserConstants
A parser class for raw field values to turn them into Java primitive types suitable for dealing with X3D field types.

The parser assumes that we have a raw field value that does not contain any surrounding values. For example, it expects MFField values to be stripped of surrounding brackets before being passed to these methods.

There are two ways of using this class: parsing a know field type, and parsing an unknown field type and getting the parser to return the appropriate (closest guess) value to you.

This parser has been continually evolving since first written for the VRML97 open source effort. The original contributor was Rick Goldberg of Sun Microsystems. Since then it has been through numerous tweaks and re-writes

The assumption of this parser is that each time you call the method it will have a non-zero length, non-empty string. There should be at least one non-whitespace character in the string. If not, a parse exception will be raised. You can see what JavaCC thinks the grammar is here

Version:
Grammar $Revision: 1.12 $
Author:
Justin Couch, Alan Hudson