private StructuralToken getTokenFromOpenBracket() {
        String c = getCharAtCurrentLineIndex();
        if (c.equals("[")) {
            linePtr++;
            if (!lineHasNext()) { //Must be just a | barline
                return new StructuralToken(StructType.BARLINE);
            }
            else {
                c = getCharAtCurrentLineIndex();
                if (c.equals("|")) {
                    linePtr++; //linePtr points to first character after [|
                    if (lineHasNext()) {
                        c = getCharAtCurrentLineIndex();
                        if (c.equals("|") || c.equals("]")) {
                            throw new IllegalArgumentException("Cannot have three of [ or | or ] in a row");
                        }
                    }
                    return new StructuralToken(StructType.ENDOFSECTION);  
                }
                else if (c.equals("1")) {
                    linePtr++; //linePtr points to first character after [1
                    return new StructuralToken(StructType.FIRSTREPEAT);  
                }
                else if (c.equals("2")) {
                    linePtr++; //linePtr points to first character after [2
                    return new StructuralToken(StructType.SECONDREPEAT);  
                }
                else { //Begin chord
                    return new StructuralToken(StructType.BEGINCHORD);
                }
            }
        }
        else {
            throw new IllegalArgumentException("Expected a [");
        }
    }