int.java

来自「JAVA在编译原理上的应用。」· Java 代码 · 共 28 行

JAVA
28
字号
package lolo.scans;/** A class to scan for integer numbers.  * * @author <a href="http://www.inf.uos.de/bernd" target="_blank">Bernd K&uuml;hl</a>           (<a href="mailto:bernd@informatik.uni-osnabrueck.de">bernd@informatik.uni-osnabrueck.de</a>) */public class Int extends SetMN {    /** Constructs a recognizer which scans one ore more digits as symbol. */    public Int() {        this(Integer.MAX_VALUE);    }    /** Constructs a recognizer which scans one or up to <tt>maxDigits</tt> digits as symbol.     *     * @param maxDigits the maximal number if digits per symbol.     */    public Int(int maxDigits) {        super("0123456789", true, 1, maxDigits);    }    /** Returns a string representation of the object.     *     * @return a string representation of the object.     */    public String toString() {        return getClass().getName()+"[maxDigits "+n+"]";    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?