// Path: src/main/java/com/nebhale/jsonpath/internal/parser/PathCharacter.java
// enum CharacterType {
//     ARRAY_CLOSE, //
//     ARRAY_OPEN, //
//     COMMA, //
//     COMPLEX_NAME_CHARACTER, //
//     DIGIT, //
//     DOT, //
//     DOUBLE_QUOTE, //
//     END, //
//     HYPHEN, //
//     INDEX_CHARACTER, //
//     LETTER, //
//     QUOTE, //
//     ROOT, //
//     SIMPLE_NAME_CHARACTER, //
//     SPACE, //
//     UNDERSCORE, //
//     WILDCARD;
// }
// 
// Path: src/main/java/com/nebhale/jsonpath/internal/parser/Token.java
// enum TokenType {
// 
//     CHILD, //
//     DEEP_WILDCARD, //
//     INDEX, //
//     ROOT, //
//     WILDCARD
// 
// }


import java.util.ArrayList;
import java.util.List;
import com.nebhale.jsonpath.internal.parser.PathCharacter.CharacterType;
import com.nebhale.jsonpath.internal.parser.Token.TokenType;
    }

    private void arrayOpen(LexerContext context, PathCharacter c) {
        if (c.isType(CharacterType.DOUBLE_QUOTE)) {
            context.scanner.consume();
            context.parsingState = ParsingState.DOUBLE_QUOTE_CHILD;
        } else if (c.isType(CharacterType.QUOTE)) {
            context.scanner.consume();
            context.parsingState = ParsingState.QUOTE_CHILD;
        } else if (c.isType(CharacterType.ARRAY_CLOSE)) {
            context.parsingState = ParsingState.ARRAY_CLOSE;
        } else if (c.isType(CharacterType.DIGIT)) {
            context.parsingState = ParsingState.INDEX;
        } else if (c.isType(CharacterType.WILDCARD)) {
            context.parsingState = ParsingState.INDEX;
        } else {
            emitIllegalCharacter(context, c);
            context.scanner.consume();
        }
    }

    private void base(LexerContext context, PathCharacter c) {
        if (c.isType(CharacterType.ARRAY_OPEN)) {
            context.parsingState = ParsingState.ARRAY_OPEN;
        } else if (c.isType(CharacterType.DOT)) {
            context.parsingState = ParsingState.DOT_CHILD;
        } else if (c.isType(CharacterType.ROOT)) {
            Token token = new Token(TokenType.ROOT, c.getPosition());
            context.tokenStream.add(token);
        } else if (!c.isType(CharacterType.END)) {
// Path: src/main/java/com/nebhale/jsonpath/internal/parser/PathCharacter.java
// enum CharacterType {
//     ARRAY_CLOSE, //
//     ARRAY_OPEN, //
//     COMMA, //
//     COMPLEX_NAME_CHARACTER, //
//     DIGIT, //
//     DOT, //
//     DOUBLE_QUOTE, //
//     END, //
//     HYPHEN, //
//     INDEX_CHARACTER, //
//     LETTER, //
//     QUOTE, //
//     ROOT, //
//     SIMPLE_NAME_CHARACTER, //
//     SPACE, //
//     UNDERSCORE, //
//     WILDCARD;
// }
// 
// Path: src/main/java/com/nebhale/jsonpath/internal/parser/Token.java
// enum TokenType {
// 
//     CHILD, //
//     DEEP_WILDCARD, //
//     INDEX, //
//     ROOT, //
//     WILDCARD
// 
// }


// Path: src/main/java/com/nebhale/jsonpath/internal/parser/RecoveringPathLexer.java
import java.util.ArrayList;
import java.util.List;
import com.nebhale.jsonpath.internal.parser.PathCharacter.CharacterType;
import com.nebhale.jsonpath.internal.parser.Token.TokenType;

    }

    private void arrayOpen(LexerContext context, PathCharacter c) {
        if (c.isType(CharacterType.DOUBLE_QUOTE)) {
            context.scanner.consume();
            context.parsingState = ParsingState.DOUBLE_QUOTE_CHILD;
        } else if (c.isType(CharacterType.QUOTE)) {
            context.scanner.consume();
            context.parsingState = ParsingState.QUOTE_CHILD;
        } else if (c.isType(CharacterType.ARRAY_CLOSE)) {
            context.parsingState = ParsingState.ARRAY_CLOSE;
        } else if (c.isType(CharacterType.DIGIT)) {
            context.parsingState = ParsingState.INDEX;
        } else if (c.isType(CharacterType.WILDCARD)) {
            context.parsingState = ParsingState.INDEX;
        } else {
            emitIllegalCharacter(context, c);
            context.scanner.consume();
        }
    }

    private void base(LexerContext context, PathCharacter c) {
        if (c.isType(CharacterType.ARRAY_OPEN)) {
            context.parsingState = ParsingState.ARRAY_OPEN;
        } else if (c.isType(CharacterType.DOT)) {
            context.parsingState = ParsingState.DOT_CHILD;
        } else if (c.isType(CharacterType.ROOT)) {
            Token token = new Token(TokenType.ROOT, c.getPosition());
            context.tokenStream.add(token);
        } else if (!c.isType(CharacterType.END)) {
            emitIllegalCharacter(context, c);