Class VRML97FieldParser

java.lang.Object
org.web3d.parser.vrml97.VRML97FieldParser
All Implemented Interfaces:
VRML97FieldParserConstants

public class VRML97FieldParser extends Object implements VRML97FieldParserConstants
A parser class for raw field values to turn them into Java primitive 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.22 $
Author:
Justin Couch, Alan Hudson