de.intarsys.tools.number
Class NumberParser

java.lang.Object
  extended by de.intarsys.tools.number.NumberParser

public class NumberParser
extends java.lang.Object

A parser able to read a definition of numbers.

The parser supports single numbers, enumeration of numbers and intervals.

 S ::= NumberString
 NumberString ::= ( Number | Interval) [ ";" (Number | Interval) ]*
 Interval ::= Number "-" Number
 Number ::= a valid number literal
 


Constructor Summary
protected NumberParser(java.lang.String numberstring)
           
 
Method Summary
 int getChar()
           
static NumberWrapper parse(java.lang.String numberstring)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberParser

protected NumberParser(java.lang.String numberstring)
Method Detail

parse

public static NumberWrapper parse(java.lang.String numberstring)
                           throws java.io.IOException
Throws:
java.io.IOException

getChar

public int getChar()
            throws java.io.IOException
Throws:
java.io.IOException