Next: , Previous: , Up: FAQ   [Contents][Index]


My actions are executing out of order or sometimes not at all.

Most likely, you have (in error) placed the opening ‘{’ of the action block on a different line than the rule, e.g.,

^(foo|bar)
{  <<<--- WRONG!

}

flex requires that the opening ‘{’ of an action associated with a rule begin on the same line as does the rule. You need instead to write your rules as follows:

^(foo|bar)   {  // CORRECT!

}