Package com.bc.ceres.binio.util
Class TypeParser
- java.lang.Object
-
- com.bc.ceres.binio.util.TypeParser
-
public class TypeParser extends Object
A simple parser which can be used to read type definition units using the following syntax:unit := compounds
For example:compounds := { compound }
compound := compound-name { members } [;]
members := { member }
member := type member-name ;
type := scalar-type | array-type
array-type := element-type [element-count] { [element-count] }
element-type := scalar-type
element-count := integer | member-reference
scalar-type := simple-type | compound-name
simple-type := byte | ubyte | short | ushort | int | uint | long | float | double
member-reference := $member-name (member must be an integer type)
compound-name := name
member-name := name
name := java-identifier | any character sequence within two enclosing " (double quote)
Dataset { int lineCount; Scanline[$lineCount] scanlines; }; Scanline { int flags; double[512] data; };
-
-
Field Summary
Fields Modifier and Type Field Description static SimpleType[]
SIMPLE_TYPES
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CompoundType[]
parseCompoundTypes()
static CompoundType[]
parseUnit(Reader reader)
-
-
-
Field Detail
-
SIMPLE_TYPES
public static final SimpleType[] SIMPLE_TYPES
-
-
Method Detail
-
parseUnit
public static CompoundType[] parseUnit(Reader reader) throws IOException, ParseException
- Throws:
IOException
ParseException
-
parseCompoundTypes
public CompoundType[] parseCompoundTypes() throws IOException, ParseException
- Throws:
IOException
ParseException
-
-