| Vern Paxson 2005-08-05, 10:01 pm |
| [ In response to a question about flex DFA table formats -John ]
> I assume that the first field represents the state, the second field, the
> ...
> Am I correct in making these assumptions ?
Yes.
> a] I assume (after having mined the source of flex) that "257" refers to
> any character (or '.'). Am I correct ?
257 refers to an "epsilon" transition (i.e., an NFS transition that occurs
without consuming a character).
> b] What do the "-1', "-2", "-3" and "-4" character classes represent ?
They refer to each character class as they are encountered, i.e., the first
in the input is -1, the second -2, etc. Charcter classes are reused,
though (i.e., a second reference to the same class will use the same index),
with (I believe) -1 being the '.' character class.
> c] Can someone explain the character classes dumped at the end of the
> "test.out" file ?
These are equivalence classes rather than character classes. So for example:
> Equivalence Classes:
>
> \000 = -1 ' ' = 1 @ = 1 ` = 1 \200 = 1 \240 = 1 \300 = 1 \340
> = 1
> \001 = 1 ! = 1 A = 3 a = 4 \201 = 1 \241 = 1 \301 = 1 \341
This is saying that blank, @, etc., are all in equivalence class 1; the
character 'A' is in class 3; 'a' is in '4' etc.
Vern
|