package org.spoofax.jsglr2.inputstack;

import org.spoofax.jsglr2.inputstack.incremental.AbstractInputStack;

public class InputStack extends AbstractInputStack {
    int currentChar; // Current ASCII char in range [0, 256]

    public InputStack(String inputString) {
        super(inputString);
        currentChar = getChar(currentOffset);
    }

    @Override public InputStack clone() {
        InputStack clone = new InputStack(inputString);
        clone.currentChar = currentChar;
        clone.currentOffset = currentOffset;
        return clone;
    }

    @Override public boolean hasNext() {
        return currentOffset <= inputLength;
    }

    @Override public void next() {
        currentOffset++;
        currentChar = getChar(currentOffset);
    }

    @Override public int getChar() {
        return currentChar;
    }

}

@@ -216,12 +216,28 @@
 %5B0, 
-256%5D
+MAX_CHAR%5D or EOF_INT
 %0A%0A  

Make comment refer to MAX_CHAR instead of 256