public IElementType parsePackage(){
  CharSequence tokenText=yytext();
  Matcher m=AMBIGUOUS_PACKAGE_PATTERN.matcher(tokenText);
  if (m.matches()) {
    String packageIdentifier=m.group(1);
    preparsedTokensList.clear();
    int packageIdentifierEnd=getTokenStart() + packageIdentifier.length();
    CustomToken barewordToken=new CustomToken(packageIdentifierEnd,getTokenEnd(),IDENTIFIER);
    preparsedTokensList.add(barewordToken);
    setTokenEnd(packageIdentifierEnd);
    return parsePackageCanonical();
  }
 else {
    throw new RuntimeException("Inappropriate package name " + tokenText);
  }
}

public IElementType parsePackage ( ) { CharSequence tokenText = yytext ( ) ; Matcher m = AMBIGUOUS_PACKAGE_PATTERN . matcher ( tokenText ) ; if ( m . matches ( ) ) { String packageIdentifier = m . group ( 1 ) ; preparsedTokensList . clear ( ) ; int packageIdentifierEnd = getTokenStart ( ) + packageIdentifier . length ( ) ; CustomToken barewordToken = new CustomToken ( packageIdentifierEnd , getTokenEnd ( ) , IDENTIFIER ) ; preparsedTokensList . add ( barewordToken ) ; setTokenEnd ( packageIdentifierEnd ) ; return parsePackageCanonical ( ) ; } else { throw new RuntimeException ( "Inappropriate package name " + tokenText ) ; } }
splitting ambiguous package to package_identifier and identifier
