Re: A question about regexes
- From: Jym <Jean-Yves.Moyen+news@xxxxxxxxxxxx>
- Date: Sun, 07 Oct 2007 09:54:30 +0200
On Sun, 07 Oct 2007 04:47:25 +0200, Altu <altu59@xxxxxxxxx> wrote:
Hi
In Java, the following regex:
"a.b"
matches any string that starts with a then any character and then b.
I am trying to create a DFATable for regexes that are in that format.
However the algorithms in the compiler book I have, only support
cases like:
a[a|b]b
but the problem is that the set of allowed symbols are not confined to
a and b in my language.
Is there an equivalent of "a.b" available that is expressible only
using
concatenation, or, and *?
It's a[a|b|c|...]b
where the [...] ranges over all the characters of your alphabet.
Which, depending on the formalism/conventions/... you use for describing your DFA may or may not be "summed up" (eg a transition with no label which consume any one letter, ...)
--
Hypocoristiquement,
Jym.
.
- References:
- A question about regexes
- From: Altu
- A question about regexes
- Prev by Date: Re: KMP Algorithm supporting * notation
- Next by Date: Grammar First Set
- Previous by thread: A question about regexes
- Next by thread: Grammar First Set
- Index(es):
Relevant Pages
|