PROBLEM: (QAR57670) (Patch ID: OSF425-400455) ******** This patch fixes a problem with the lex command. Programs built with lex may exhibit various problems which only occur after the following warning: Maximum token length exceeded To reproduce the problem, use the following lex specification: %{ #define NUMBER 400 #define COMMENT 401 #define TEXT 402 #define COMMAND 403 #if defined (YYLMAX) #undef YYLMAX #define YYLMAX 20 #endif %} %% [ \t]+ ; [0-9]+ | [0-9]+\.[0-9]\+ | \.[0-9]+ { return NUMBER; } #* { return COMMENT; } \.[^\"\n]*\" { return TEXT; } [a-zA-Z][a-zA-Z0-9]+ { return COMMAND; } \n { return '\n'; } %% #include int main(int argc, char *argv[]) { int val; while(val = yylex()) switch(val) { case NUMBER: printf("NUMBER\n"); break; case COMMENT: printf("COMMENT\n"); break; case TEXT: printf("TEXT\n"); break; case COMMAND: printf("COMMAND\n"); break; case '\n': printf("RETURN\n"); break; default: printf("Unknown:%d\n", val); } return 0; } lex lexer.l cc lex.yy.c -o lexer To execute the test, type in any character sequence. If you type a character sequence greater than 20, you will receive the following message: Maximum token length exceeded