Can you give a somewhat comprehensive example?

Anyway, you have to do the following steps once you start scanning a date string: (1) push all elements (at this point you are just scanning a signed integer) onto a stack, possibly recognizing bogus characters (but not the correct day and month chars (because you need to have the end of the string to do that)) (2) at the end of the string (not just a valid final state), start to pop the elements and check them semantically for correctness:
(first 2 pops: day, next 2 pops: month, rest: year)
How you do that depends a bit on the characteristics of your stream (essentially how easy it is do detect when going out of the "date machine").

I hope this helps.

jg


_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users

Reply via email to