protected function match_exceptions( $line, array &$exceptions, $line_no = 0 ) {
		if ( preg_match( '/^\s*([' . $this->word_characters . '-]+)\s*}\s*(?:%.*)?$/u', $line, $matches ) ) {
			$exceptions[] = $matches[1];
			return false;
		} if ( preg_match( '/^\s*((?:[' . $this->word_characters . '-]+\s*)+)\s*}\s*(?:%.*)?$/u', $line, $matches ) ) {
			$this->match_exceptions( $matches[1], $exceptions, $line_no );
			return false;
		} elseif ( preg_match( '/^\s*}\s*(?:%.*)?$/u', $line, $matches ) ) {
			return false;
		} elseif ( preg_match( '/^\s*([' . $this->word_characters . '-]+)\s*(?:%.*)?$/u',  $line, $matches ) ) {
			$exceptions[] = $matches[1];
		} elseif ( preg_match( '/^\s*((?:[' . $this->word_characters . '-]+\s*)+)(?:%.*)?$/u',  $line, $matches ) ) {
			// Sometimes there are multiple exceptions on a single line.
			foreach ( self::split_at_whitespace( $matches[1] ) as $match ) {
				$exceptions[] = $match;
			}
		} elseif ( preg_match( '/^\s*(?:%.*)?$/u', $line, $matches ) ) {
			// Ignore comments and whitespace in exceptions.
			return true;
		} else {
			throw new \RangeException( "Error: unknown exception $line on line $line_no\n" );
		}

		return true;
	}
protected function match_exceptions( $line, array &$exceptions, $line_no = 0 ) {
		if ( preg_match( '/^\s*([' . $this->word_characters . '-]+)\s*}\s*(?:%.*)?$/u', $line, $matches ) ) {
			$exceptions[] = $matches[1];
			return false;
		} if ( preg_match( '/^\s*((?:[' . $this->word_characters . '-]+\s*)+)\s*}\s*(?:%.*)?$/u', $line, $matches ) ) {
			$this->match_exceptions( $matches[1], $exceptions, $line_no );
			return false;
		} elseif ( preg_match( '/^\s*}\s*(?:%.*)?$/u', $line, $matches ) ) {
			return false;
		} elseif ( preg_match( '/^\s*([' . $this->word_characters . '-]+)\s*(?:%.*)?$/u',  $line, $matches ) ) {
			$exceptions[] = $matches[1];
		} elseif ( preg_match( '/^\s*((?:[' . $this->word_characters . '-]+\s*)+)(?:%.*)?$/u',  $line, $matches ) ) {
			// Sometimes there are multiple exceptions on a single line.
			foreach ( self::split_at_whitespace( $matches[1] ) as $match ) {
				$exceptions[] = $match;
			}
		} elseif ( preg_match( '/^\s*(?:%.*)?$/u', $line, $matches ) ) {
			// Ignore comments and whitespace in exceptions.
			return true;
		} else {
			throw new \RangeException( "Error: unknown exception $line on line $line_no\n" );
		}

		return true;
	}
protected function match_exceptions ( $ line , array & $ exceptions , $ line_no = 0 ) { if ( preg_match ( '/^\s*([' . $ this -> word_characters . '-]+)\s*}\s*(?:%.*)?$/u' , $ line , $ matches ) ) { $ exceptions [ ] = $ matches [ 1 ] ; return false ; } if ( preg_match ( '/^\s*((?:[' . $ this -> word_characters . '-]+\s*)+)\s*}\s*(?:%.*)?$/u' , $ line , $ matches ) ) { $ this -> match_exceptions ( $ matches [ 1 ] , $ exceptions , $ line_no ) ; return false ; } elseif ( preg_match ( '/^\s*}\s*(?:%.*)?$/u' , $ line , $ matches ) ) { return false ; } elseif ( preg_match ( '/^\s*([' . $ this -> word_characters . '-]+)\s*(?:%.*)?$/u' , $ line , $ matches ) ) { $ exceptions [ ] = $ matches [ 1 ] ; } elseif ( preg_match ( '/^\s*((?:[' . $ this -> word_characters . '-]+\s*)+)(?:%.*)?$/u' , $ line , $ matches ) ) { // Sometimes there are multiple exceptions on a single line. foreach ( self :: split_at_whitespace ( $ matches [ 1 ] ) as $ match ) { $ exceptions [ ] = $ match ; } } elseif ( preg_match ( '/^\s*(?:%.*)?$/u' , $ line , $ matches ) ) { // Ignore comments and whitespace in exceptions. return true ; } else { throw new \ RangeException ( "Error: unknown exception $line on line $line_no\n" ) ; } return true ; }
Try to match squences of TeX hyphenation exceptions.

@param string $line A line from the TeX pattern file.
@param array  $exceptions {
An array of hyphenation exceptions.

@type string $key Hyphenated key (e.g. 'something' => 'some-thing').
}
@param int    $line_no  Optional. Line number. Default 0.

@throws \RangeException Thrown when the exception line is malformed.

@return bool
Try to match squences of TeX hyphenation exceptions .