function validate( str ) {
	var validators;
	var section;
	var asts;
	var ast;
	var i;
	var j;
	var k;

	validators = this.validators; // eslint-disable-line no-invalid-this

	debug( 'Generating AST.' );
	asts = parse( str );
	debug( 'Successfully generated AST.' );

	debug( 'Number of interfaces: %d', asts.length );
	for ( j = 0; j < validators.interfaces.length; j++ ) {
		debug( 'Rule: %s', validators.interfaces[ j ].id );
		validators.interfaces[ j ].validate( asts );
	}
	for ( i = 0; i < asts.length; i++ ) {
		debug( 'Validating interface: %d', i+1 );
		ast = asts[ i ];
		for ( j = 0; j < validators.function.length; j++ ) {
			debug( 'Rule: %s', validators.function[ j ].id );
			validators.function[ j ].validate( ast );
		}
		if ( ast.signature ) {
			debug( 'Validating signature.' );
			for ( j = 0; j < validators.signature.length; j++ ) {
				debug( 'Rule: %s', validators.signature[ j ].id );
				validators.signature[ j ].validate( ast.signature );
			}
		}
		if ( ast.description ) {
			debug( 'Validating description.' );
			for ( j = 0; j < validators.description.length; j++ ) {
				debug( 'Rule: %s', validators.description[ j ].id );
				validators.description[ j ].validate( ast.description );
			}
		}
		if ( ast.sections ) {
			debug( 'Validating sections.' );
			for ( j = 0; j < validators.sections.length; j++ ) {
				debug( 'Rule: %s', validators.sections[ j ].id );
				validators.sections[ j ].validate( ast.sections );
			}
			for ( k = 0; k < ast.sections.length; k++ ) {
				section = ast.sections[ k ];
				for ( j = 0; j < validators.section.length; j++ ) {
					debug( 'Rule: %s', validators.section[ j ].id );
					validators.section[ j ].validate( section );
				}
				if ( section.title === 'Parameters' ) {
					debug( 'Validating parameters section.' );
					for ( j = 0; j < validators.parameters.length; j++ ) {
						debug( 'Rule: %s', validators.parameters[ j ].id );
						validators.parameters[ j ].validate( section );
					}
				} else if ( section.title === 'Returns' ) {
					debug( 'Validating returns section.' );
					for ( j = 0; j < validators.returns.length; j++ ) {
						debug( 'Rule: %s', validators.returns[ j ].id );
						validators.returns[ j ].validate( section );
					}
				} else if ( section.title === 'Examples' ) {
					debug( 'Validating examples section.' );
					for ( j = 0; j < validators.examples.length; j++ ) {
						debug( 'Rule: %s', validators.examples[ j ].id );
						validators.examples[ j ].validate( section );
					}
				}
			}
		}
		debug( 'Finished validating interface.' );
	}
}
Validates `repl.txt` contents.

@private
@param {string} str - `repl.txt` contents
@param {Object} meta - meta-information