Hi all, I am trying to create an application that takes a command such as: #SET,1,57600,8,N,1\n
The problem is, I don't now to cleanly extract each parameter. In regular expressions you can use named groups. I don't see anything similar in Ragel. Below is my first attempt. As you can see it kind of works, I would just need to do a little manual processing inside each action. It seems like the way I am doing it here there is very little advantage over strtok. I have tried searching for a solution to this, but I don't think I came up with very good search terms. Any help you could offer would be greatly appreciated. - Sam http://dumpz.org/79505/ Output: #SET,1,57600,8,N,1 <--- this is my input 1,57600,8,N,1 57600,8,N,1 8,N,1 N,1 1 Do sweet uC stuff here _______________________________________________ ragel-users mailing list [email protected] http://www.complang.org/mailman/listinfo/ragel-users
