[Koha-devel] [bug 6458]: need some help for a parsing problem in 'misc/translator/TTParser.pm'

Frère Sébastien Marie semarie-koha at latrappe.fr
Wed Jul 20 11:50:01 CEST 2011


On Wed, Jul 20, 2011 at 06:42:24AM +1200, Chris Cormack wrote:
> Hi
> 
> Adding tests to xt/ to catch these would be awesome too, then it would stop
> more creeping in.
> 
> I could add it as a step for jenkins, so if you wanted to share the parser
> that would be excellent, I have a koha-qa git repo we could add it to.

As said, the parser is in haskell language (exactly, ni literate haskell).

So before including in t/ , it should be refactoring (I have tried, but my knowledge in perl is too bad, even for creating a simple stream parser).

The haskell parser is just a program which take on STDIN a file content, and output:
 - nothing : no problem found
 - numbers separated by space : lines number where DIRECTIVE are found in TAG
 - an error message in parentheses

For generate the log file, a used a couple of shell script (a wrapper around 'find', and a wrapper around the parser).
-- 
Frère Sébastien Marie
Abbaye Notre Dame de La Trappe
61380 Soligny-la-Trappe
Tél: 02.33.84.17.00
Fax: 02.33.34.98.57
Web: http://www.latrappe.fr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: directive-template.lhs
Type: text/x-literate-haskell
Size: 4035 bytes
Desc: not available
URL: </pipermail/koha-devel/attachments/20110720/d874ce37/attachment-0001.lhs>


More information about the Koha-devel mailing list