Related articles |
---|
Re: Inquiry about nfa output by flex vern@icir.org (Vern Paxson) (2005-08-05) |
Re: Inquiry about nfa output by flex bharath.bhushan@gmail.com (bharath) (2005-08-10) |
Re: Inquiry about nfa output by flex vern@icir.org (Vern Paxson) (2005-08-31) |
From: | Vern Paxson <vern@icir.org> |
Newsgroups: | comp.compilers |
Date: | 31 Aug 2005 00:34:42 -0400 |
Organization: | Compilers Central |
Keywords: | lex |
Posted-Date: | 31 Aug 2005 00:34:42 EDT |
> The -1 character class is "." i believe.
>
> What is the -2 character class ?
Actually, it looks from -T output that I didn't state that correctly.
-1 is the first character class in the input, -2 the second, etc.,
and then the match-any character class is created for the default
rule, so it'll be -n if you have n-1 explicit character classes.
> If I have a regular expression like
>
> ((~[A-Z][0-9A-Za-z\&\.\-\, ]+~(N|J)[^~]*~[0-9]+~)+~[0-9A-Za-z\
> \$\&\.\-\,]+~[^~]*MAKE[^~]*~[0-9]+~)
>
> I get character classes -1 to -7 in the nfa output by flex
Hmmmm, I get -1 to -6.
> To verify this, I wrote a simple regular expression with a single dot
> i.e,
>
> .
>
> And I got two character classes in the NFA output by flex : -1 and -2.
> What is character class does -2 represent ?
-1 is '.' and -2 is the equivalent of '.|\n'.
Vern
Return to the
comp.compilers page.
Search the
comp.compilers archives again.