rcj (01/11/83)
Hear, hear!! I have run into the one-parser-per-program-when-using-yacc problem myself, and I think that a mod such as the one suggested that would change the yy prefix to something else for the second, etc. parsers would be most welcome. I took a course in compiler construction in my senior year in college and had a choice of using a horribly archaic and complex system favored by my instructor (LALR1, I believe; PASCAL-based on a DEC-10), or going it alone with yacc and lex (no one had ever used it before). My buddy and I decided on the yacc and lex route, only to find out halfway through that lex would not, as promised, be up on our PDP-11/34 running Unix Version 6. We wanted desperately to use yacc to generate at least the meat of a lexical analyzer, but couldn't do it because we were already using yacc as our parser. (Admittedly, the task of writing the lexical analyzer without lex was not terribly difficult, but I was pulling 25 hours to get out of school that semester and he had 18 of all computer science). Ah, to have had a yacc version which would generate two seperate parsers with seperate tables!!! I am not enough of a wizard to undertake this mod, but if anyone does it; please let me know!! The MAD Programmer alias: Curtis Jackson (...!floyd!burl!rcj)