will result in a network with 7 states and 8 arcs -- same as if the first line wasn't there. Using regular expressions to for the same grammar
set minimal OFF
read regex {pack} | {talk} | {walk} ;
correctly creates an FSA with 13 states and 12 arcs.
As a side note, if I comment out the some lines from lexc_to_fsm in lexcread.c (lexc_merge_states(), and everything at the end), I end up with a network of 11 states and 13 arcs: this is the same as the previous one with the accepting states collapsed into one.
The main problem is that read lexc does not respect the minimal variable.
I don't think it is optimal that the two unminimized networks are different either, but I can live with that.
Take the following grammar:
The load foma, and
will result in a network with 7 states and 8 arcs -- same as if the first line wasn't there. Using regular expressions to for the same grammar
correctly creates an FSA with 13 states and 12 arcs.
As a side note, if I comment out the some lines from
lexc_to_fsm
in lexcread.c (lexc_merge_states()
, and everything at the end), I end up with a network of 11 states and 13 arcs: this is the same as the previous one with the accepting states collapsed into one.The main problem is that
read lexc
does not respect theminimal
variable. I don't think it is optimal that the two unminimized networks are different either, but I can live with that.