[ragel-users] The best way to stop and force error state?

Ivan Ristić ivan.ristic at gmail.com
Fri Nov 22 11:12:52 UTC 2013

What is the best way to stop the parser from within an action and force
the error state at the same time?

At the moment I am doing this:

%%machine foo

action bar {
    if (error) {
        fnext *foo_error;

I was expecting something like:

action bar {
    if (error) ferror;

I like this because it's succinct and does not reference the machine
error state (which simplifies the code reduces the chance of mistakes in
the copy & paste scenarios).


ragel-users mailing list
ragel-users at complang.org

More information about the ragel-users mailing list