code: @Nullable
    private static CSSNode _readStyleSheet (@Nonnull final CharStream aCharStream,
                                            @Nonnull final ECSSVersion eVersion,
                                            @Nullable final ICSSParseErrorHandler aCustomErrorHandler,
                                            @Nonnull final ICSSParseExceptionCallback aCustomExceptionHandler,
                                            final boolean bBrowserCompliantMode)
    {
      try
      {
        switch (eVersion)
        {
          case CSS21:
          case CSS30:
          {
            final ParserCSS30TokenManager aTokenHdl = new ParserCSS30TokenManager (aCharStream);
            aTokenHdl.setCustomErrorHandler (aCustomErrorHandler);
            final ParserCSS30 aParser = new ParserCSS30 (aTokenHdl);
            aParser.setCustomErrorHandler (aCustomErrorHandler);
            aParser.setBrowserCompliantMode (bBrowserCompliantMode);
            // Main parsing
            return aParser.styleSheet ();
          }
          default:
            throw new IllegalArgumentException ("Unsupported CSS version " + eVersion);
        }
      }
      catch (final ParseException ex)
      {
        // Unrecoverable error
        aCustomExceptionHandler.onException (ex);
        return null;
      }
      catch (final Throwable ex)
      {
        // As e.g. indicated by https://github.com/phax/ph-css/issues/9
        aCustomExceptionHandler.onException (new ParseException (ex.getMessage ()));
        return null;
      }
    }
docs: Main reading of the CSS
  
  @param aCharStream
  The stream to read from. May not be <code>null</code>.
  @param eVersion
  The CSS version to use. May not be <code>null</code>.
  @param aCustomErrorHandler
  A custom handler for recoverable errors. May be <code>null</code>.
  @param aCustomExceptionHandler
  A custom handler for unrecoverable errors. May not be
  <code>null</code>.
  @param bBrowserCompliantMode
  <code>true</code> for browser compliant parsing, <code>false</code>
  for default parsing.
  @return <code>null</code> if parsing failed with an unrecoverable error
  (and no throwing exception handler is used), or <code>null</code>
  if a recoverable error occurred and no
  {@link com.helger.css.reader.errorhandler.ThrowingCSSParseErrorHandler}
  was used or non-<code>null</code> if parsing succeeded.