Original Post
I am having trouble with my flex scanner. This is for school so if people could just give me hints/advice instead of actual code I would appreciate it. Here is the relavent part of my scan.l file: digit [0-9] integer {digit}+ alpha [a-z]|[A-Z] alphanum {alpha}|{digit}|"_" ident {alpha}|{alpha}{alphanum}+ ... %% ... {integer} {return(INTEGER );} {ident} {return(IDENT );} The problem (I think) is with ident. When I take out that line everything compiles and works fine (except for ident of course). When it is in there I get these errors: flex scan.l "scan.l", line 63: warning, rule cannot be matched "scan.l", line 64: warning, rule cannot be matched "scan.l", line 65: warning, rule cannot be matched "scan.l", line 66: warning, rule cannot be matched "scan.l", line 67: warning, rule cannot be matched "scan.l", line 68: warning, rule cannot be matched "scan.l", line 69: warning, rule cannot be matched "scan.l", line 70: warning, rule cannot be matched "scan.l", line 71: warning, rule cannot be matched "scan.l", line 72: warning, rule cannot be matched "scan.l", line 73: warning, rule cannot be matched "scan.l", line 74: warning, rule cannot be matched gcc -c lex.yy.c Those lines start on the ident line and go on for the rest of the file. I know the other commands work (and the warnings get removed when I take out ident). Does anyone know why I get these warnings? -Greg