Your approach sounds like a cleaner way to do it and I am aware of
another parser that is similar. I will be interested to see whether
such an approach stands the test of time.
However I think it is unlikely that we will rewrite all of our parsers
at this stage as I am confident that our parsers are very robust.
Fixing bugs just takes a few minutes, as we have an extensive test
suite of 100 or more files submitted by users.
I'm curious though - why did you write your own parser instead of
using the existing one in cclib?
- Noel
On 26 January 2010 17:20, Mark Monroe <mo...@oc...> wrote:
> Dear cclib developers,
>
> Have you thought of using a more robust representation of what to match
> than regular expressions? The cclib-Bugs-2939920 is an example of why
> regular expressions are not the best way to go.
>
> I have written my own GAMESS parsing library using a combination of
> regular expressions and the pyparsing library.
>
> The regular expressions are used to extract blocks of text from a GAMESS
> output file. Then pyparsing is used to extract the data I need from
> those blocks.
>
> Pyparsing is slow compared to regular expressions, but far easier to use
> and specify what you want to match. By extracting and processing
> meaningful blocks of text, like the HESS-END block in a GAMESS dat file,
> you can then use pyparsing to easily extract the data you want.
>
> Mark
>
>
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> cclib-devel mailing list
> ccl...@li...
> https://lists.sourceforge.net/lists/listinfo/cclib-devel
>
|