On 12-10-27 03:24 PM, Peter Gervais wrote:

I need to parse an input set of characters with the following results :
If char = 'a' goto next state else call error

You can do this by intersecting with 'm'.

action a { if ( !foo ) error(); }

m = (any @a)*;

This logic would be used for every character in the string. The intent is to 
show exactly where the failure has occurred on the input string versus the 
expected string.
Ideally the error call could have a parameter such as an offset to indicate 
where within the string the match failed.
Any ideas would be greatly appreciated.

Also, you may want to use an error action.

-Adrian

_______________________________________________
ragel-users mailing list
ragel-users@complang.org
http://www.complang.org/mailman/listinfo/ragel-users

Reply via email to