|Handling keywords that are not reserved? amb@Apple.COM (1991-01-15)|
|Handling keywords that are not reserved? firstname.lastname@example.org (1991-01-17)|
|From:||amb@Apple.COM (A. Michael Burbidge)|
|Keywords:||parse, yacc, question|
|Organization:||Apple Computer Inc., Cupertino, CA|
|Date:||15 Jan 91 23:38:09 GMT|
I am writing a parser for MPW's Object Pascal. Some of the extension keywords
to standard Pascal are not reserved. I am using yacc and having some trouble
figuring out a clean way to handle non-reserved keywords.
I know this is a rather vague question, but if anyone has any tips or hints on
handling non-reserved keywords using yacc please let me know.
Apple Computer, Inc.
[There isn't any clean way to handle non-reserved keywords in yacc. You
have to feed information from the parser back to the lexer to tell it when
a token can be a keyword and when it can't. -John]
Return to the
Search the comp.compilers archives again.