Closed MichaelWedel closed 7 years ago
This contains updates as suggested. It's a bit less regex-centric now, but regex groups are still being used in Func
. Maybe that could move into PatternMatcher
as well. If you're generally okay with the way this is implemented, I'd like to go ahead and update documentation.
This fixes #216.
Thanks to the scanf package, it's possible to make
scanf
format specifications available forCmd
andVar
.The changes are not complete, this is just my current suggestion. It preserves everything that has been implemented so far (regular expressions for
Cmd
andVar
by default), makes it relatively easy for an interface to use scanf patterns for commands by default and still leaves the possibility to have "one offs" within a device. It does not place any syntax constraints on the patterns and adds the possibility for even more types of patterns (that can be translated to regex)...should that ever be necessary.If there's no major disagreement I'd go forward with adding/adjusting documentation.