thomas@duteca (Thomas Okken) (03/01/91)
I am working on porting "rayshade" to the Mac's MPW Shell. Rayshade uses lex and yacc to scan and parse its input files, and it reports errors using the yylineno variable. When lex is used to generate the scanner, yylineno is incremented as each LF is read, and a routine in the ".l" file takes care of updating yylineno and yyfilename when cpp-style "#line" directives are scanned. Flex, however, does *not* update yylineno. This is very annoying, as all errors are now reported to take place in line #1. The README file warns that lex features missing from flex are probably hard to implement (which is why it hasn't been done already), and some nosing around the flex sources has confirmed this. If anyone has a fix for changing the flex skeleton to support updating yylineno, please let me know. Thanks! - Thomas (thomas@duteca.et.tudelft.nl)