After playing around with regular expressions in my rfc2822 project it
was clear than I needed a different approach. I figured I'd give plain
'ol state-machines a go. I've now done so and the library is much
cleaner and easier to debug because of it and my question is thus: I
have, of course, made the state-machine bits an independent library. It
is about 44K including documentation. Does it warrant its own project?
It would be nice to get some speed-heads in on this and make sure it's
as lean and mean as it can be.
Example run from example.lisp:
* (state-machine::zeros-and-ones "010102101" t)
Current state: UNKNOWN-STATE
Data: (010102101)
Next state: WE-HAVE-A-ZERO
Current state: WE-HAVE-A-ZERO
Data: (10102101 . T)
Next state: WE-HAVE-A-ONE
Current state: WE-HAVE-A-ONE
Data: (10102101 . T)
Next state: WE-HAVE-A-ZERO
Current state: WE-HAVE-A-ZERO
Data: (0102101 . T)
Next state: WE-HAVE-A-ONE
Current state: WE-HAVE-A-ONE
Data: (102101 . T)
Next state: WE-HAVE-A-ZERO
Current state: WE-HAVE-A-ZERO
Data: (02101 . T)
Next state: END-STATE
Current state: END-STATE
Data: (2101)
Next state: NIL
NIL
*
Erik.