Inspired by rob pikes design. Note that this is a toy project so it may jave bugs, but I think it's an interesting example of an alternative method for building a lexer.
use the included shell script ./mk.sh
invoke as ./a.out sample.json
See Rob Pike's talk Lexical Scanning in Go