You're looking for a fuzzer. Well, I think you're looking for that. You'll
find that it's practically impossible to prove what your parser doesn't
parse. On a generic level, I mean.

A fuzzer generates random input tailored to whatever you want to parse. It
just tries and tries. Basically a proof from the absurd; so by absence of
proof of failing :)

Writing fuzzers is fun too, especially if you're into parser ;)

- peter
On 6 Oct 2011 19:31, "Cheney, Austin" <austin.che...@travelocity.com> wrote:
> Could you define "text" more specifically? Do you mean Basic Latin 1, or
Extended Latin, or Unicode BMP? Are you looking for any text, code, natural
language, or some subset of these? To be clear in the world of computer
science text is any conveyance where the composition is transposed by a
character representation, glyphs, opposed to byte code or binary.
>
> Thanks,
> Austin Cheney, CISSP
>
> From: jsmentors@googlegroups.com [mailto:jsmentors@googlegroups.com] On
Behalf Of Bemi Faison
> Sent: Thursday, October 06, 2011 11:33 AM
> To: jsmentors@googlegroups.com
> Subject: [JSMentors] Jabberwocky test for text parsers
>
> I was writing unit tests for a parser when I realized that the task was
larger than anticipated. Since the test must ensure my parser can properly
distinguish text patterns, I'm worried that the one pattern it fails won't
be included.
>
> Then, I thought of those early pre-press applications, like Quark, which
could inject random text (see "greek" or "Lorem Ipsum") into a page layout.
I think they called such text Jabberwocky - or maybe that was the name of a
plugin... I digress.
>
> What's a good way to throw these kinds of garbage/random strings at a
parser, to ensure the parser doesn't fail? Any examples of a test that used
the parsing rules against the parser? Is there a simple pattern for doing
this? More over, in case I'm reinventing the wheel, is there a tiny (tiny)
library for parsing text?
> --
> To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/jsmentors@jsmentors.com/
>
> To search via a non-Google archive, visit here:
http://www.mail-archive.com/jsmentors@googlegroups.com/
>
> To unsubscribe from this group, send email to
> jsmentors+unsubscr...@googlegroups.com
>
> --
> To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/jsmentors@jsmentors.com/
>
> To search via a non-Google archive, visit here:
http://www.mail-archive.com/jsmentors@googlegroups.com/
>
> To unsubscribe from this group, send email to
> jsmentors+unsubscr...@googlegroups.com

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/jsmentors@jsmentors.com/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/jsmentors@googlegroups.com/

To unsubscribe from this group, send email to
jsmentors+unsubscr...@googlegroups.com

Reply via email to