private boolean handleNCName(Lexer baseLexer, IElementType type) {
    if (baseLexer.getState() == _XPathLexer.TYPE) {
      if (!lookingAt(baseLexer, XPathTokenTypes.COL, XPathTokenTypes.NCNAME) && !lookingAt(baseLexer, XPath2TokenTypes.OCCURRENCE_OPS)) {
        setState(baseLexer, _XPathLexer.S1);
      }
    } else {
      if (!replaceTokenFollowedBy(baseLexer, XPathTokenTypes.FUNCTION_NAME, XPathTokenTypes.LPAREN)) { // NCNAME / "(" -> FUNCTION_NAME
        if (lookingAt(baseLexer, XPathTokenTypes.COL, XPathTokenTypes.NCNAME, XPathTokenTypes.LPAREN)) { // NCNAME / ":" NCNAME "(" -> EXT_PREFIX
          advanceAs(baseLexer, XPathTokenTypes.EXT_PREFIX);
        } else {
          if (!replaceTokenFollowedBy(baseLexer, XPathTokenTypes.BAD_AXIS_NAME, XPathTokenTypes.COLCOL)) { // NCNAME / "::" -> BAD_AXIS_NAME
            advanceAs(baseLexer, type);
          }
        }
      }
      return true;
    }
    return false;
  }
private boolean handleNCName(Lexer baseLexer, IElementType type)