changes to PatternResolver visitor.
New visitor AllDefinitionLocator.
finishing the AllDefinitionLocator.