Re: StringBuilder Extension: IsQuotedBy

Sébastien Lorion <[email protected]> Thu, 14 Feb 2008 09:29:15 -0500
Newsgroups gmane.comp.windows.devel.dotnet.clr
Message-ID <[email protected]>
On 2/14/08, Frans Bouma <[email protected]> wrote:
>         Did you measure this? My regexp based parsers for UBB and our own DSL
>  as well as my LR(1) parser based on a regexp-using tokenizer disagrees with
>  you. Using compiled regexp's ofcourse (which is the default anyway in .net
>  2.0+ if I'm not mistaken, as regexp's are cached and compiled at first run).
>
>         So unless you want to write your own NFA based tokenizer/scanner,
>  which is fun but also a lot of work, regexp's can greatly help and aren't
>  necessarily slower.

It is only one example, and a case where hand-coding a parser can be
done in a reasonable time, but my CSV reader still beats hand down any
other NFA/DFA based parser (15x vs regexp and 5x vs GoldParser, with a
parsing expr./grammar not supporting multiline fields which mine
does).

http://www.codeproject.com/KB/database/CsvReader.aspx
http://www.devincook.com/goldparser/

Sébastien

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com