creadur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Burrell Donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: RAT: IHeaderMatcher Design
Date Tue, 16 Jul 2013 19:52:46 GMT
On 07/13/13 18:52, P. Ottlinger wrote:
> Hi *,
>
> thanks for raising the issue.
>
> Am 12.07.2013 21:26, schrieb Robert Burrell Donkin:
>> I wonder whether it might be more intuitive (as well as opening
>> potential for faster parsing) to use immutable domain objects for
>> licenses and so on, making them data rather than processors.
>
> +1
>
> Licences should be data objects.

+1

> What about adding a parserFactory whose default implementation is the
> line based parser and adding a parser to the licence data objects.
>
> Thus a matcher were to contain a pair of data object/licence and parser.
>
> This would reduce the amount of duplication since most licences use the
> default parser.

Text files are searched for a header, boilerplate or complete license text.

(Here's my understanding of the domain. Please jump in with questions, 
clarifications or to correct any misunderstanding...)

The parser needs to be smart enough to strip out not only white space 
but also appropriate comments indicators (for example '*') before 
searching for the text.

The headers, boilerplates and licenses may include some parameterized. 
For example, to use some BSD licenses, the name of the organisation 
issuing the license needs to be included.

Each license may have several different headers that all indicate that 
the file is issued under that license. For example, the standard Apache 
Software Foundation boilerplate is different from the recommended text 
for application by individuals. Some policies may need to distinguish 
between these cases, but most will be more interested in the license.

Robert

Mime
View raw message