regular expression generation

Ralph Boland <>
Sun, 31 Jan 2010 10:50:14 -0800 (PST)

          From comp.compilers

Related articles
regular expression generation (Ralph Boland) (2010-01-31)
Re: regular expression generation (Hans-Peter Diettrich) (2010-02-02)
Re: regular expression generation (Matthias-Christian Ott) (2010-02-02)
| List of all articles for this month |

From: Ralph Boland <>
Newsgroups: comp.compilers
Date: Sun, 31 Jan 2010 10:50:14 -0800 (PST)
Organization: Compilers Central
Keywords: lex, parse, testing
Posted-Date: 01 Feb 2010 18:25:23 EST

I am building a finite state machine generator.
It currently has the ability to generate random
regular expressions for testing the engine
but the generation of random character classes
(i.e. expressions of the form [ab-ew-zA-CD;@&])
is not supported.
I was wondering if anyone has done this and can
give me ideas on the best way to do so.

Some user level control of the randomization process
is desired. For example with binary operators I can
make assignments as to the probabilities of each binary
operator being used.


Ralph Boland

P.S. I am also designing (not yet implementing) a parser generator
tool. If anybody has implemented a random context free grammar
generator (preferably supporting regular right hand sides) that could
be useful in testing parsers and is open source I would like to see
your code/algorithm.

Note that I plan for my finite state machine generator
and parser generator to be open source and free.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.