public Collection<AssemblyParseResult> filterParse(Collection<AssemblyParseResult> parse)
			throws AssemblySyntaxException {
		syntaxErrors.clear();
		boolean gotOne = false;
		for (AssemblyParseResult pr : parse) {
			if (pr.isError()) {
				syntaxErrors.add(pr);
			}
			else {
				gotOne = true;
			}
		}
		if (!gotOne) {
			throw new AssemblySyntaxException(syntaxErrors);
		}
		return parse;
	}
Filter a collection of parse trees.

<p>
Generally, the assembly resolver considers every possible parsing of an assembly instruction.
If, for some reason, the user wishes to ignore certain trees (perhaps for efficiency, or
perhaps because a certain form of instruction is desired), entire parse trees may be pruned
here.

<p>
It is possible that no trees pass the filter. In this case, this method ought to throw an
{@link AssemblySyntaxException}. Another option is to pass the erroneous result on for
semantic analysis, in which case, the error is simply copied into an erroneous semantic
result. Depending on preferences, this may simplify the overall filtering and error-handling
logic.

<p>
By default, no filtering is applied. If all the trees produce syntax errors, an exception is
thrown.

@param parse the collection of parse results (errors and trees).
@return the filtered collection, optionally in-place.
@throws AssemblySyntaxException if the selector wishes to forward one or more syntax errors
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/AssemblySelector.java