Advice on detecting errors
ma... at nanorex.com
Fri Mar 28 13:34:44 UTC 2008
I have two questions.
I'm not clear on how to detect syntax errors in Ragel. As a simple
example, if I want allow a statement:
set <name> = <value>;
for which my pattern would be something like:
set_stmt = space* 'set' (alpha alnum*) space* '=' space* digit+
and if I provide input like
set var = 123bad;
How can I get Ragel to point out a syntax error here?
If I set up a scanner with a list of allowed expressions and ragel
encounters an expression that is not on the list, what does it do? Is it
possible to create a 'trap' pattern to output an unrecognized or badly
More information about the ragel-users