state machine as C lexer