Lex and initial start conditions
    Esmond Pitt 
    ejp at bohra.cpg.oz
       
    Fri Jun  1 10:53:47 AEST 1990
    
    
  
In article <1990May31.161800.11133 at iwarp.intel.com> merlyn at iwarp.intel.com (Randal Schwartz) writes:
>In article <116 at bohra.cpg.oz>, ejp at bohra (Esmond Pitt) [me] writes:
>| 
>| Placing non-labelled rules before labelled rules is probably the single
>| most common error in writing LEX scripts, even after 15 years.
>| 
>| I don't know why.
>
>Because it is insufficient.  It's not "first match", but "longest
>match" that determines rule triggering.  ("first match" applies when
>the rules have the same length.)
How does this explain why people put labelled states after non-labelled
states, when the manual says not to?
-- 
Esmond Pitt, Computer Power Group
ejp at bohra.cpg.oz
D
    
    
More information about the Comp.lang.c
mailing list