| re '$'
{
+ headcnt = 0;
+ trailcnt = 1;
+ rulelen = 1;
+ varlength = false;
+
+ current_state_type = STATE_TRAILING_CONTEXT;
+
if ( trlcontxt )
{
synerr( "trailing context used twice" );
/* See the comment in the rule for "re2 re"
* above.
*/
- if ( ! varlength || headcnt != 0 )
- warn(
+ warn(
"trailing context made variable due to preceding '|' action" );
- /* Mark as variable. */
varlength = true;
- headcnt = 0;
}
- if ( lex_compat || (varlength && headcnt == 0) )
+ if ( lex_compat || varlength )
{
/* Again, see the comment in the rule for
* "re2 re" above.
variable_trail_rule = true;
}
- else
- {
- if ( ! varlength )
- headcnt = rulelen;
-
- ++rulelen;
- trailcnt = 1;
- }
-
trlcontxt = true;
eps = mkstate( SYM_EPSILON );