Lookahead vs. Scanner Feedback

hjelm+@cs.cmu.edu (Mark Hjelm)
Fri, 03 Jan 92 18:16:32 GMT

          From comp.compilers

Related articles
Lookahead vs. Scanner Feedback hjelm+@cs.cmu.edu (1992-01-03)
Re: Lookahead vs. Scanner Feedback rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) (1992-01-04)
Re: Lookahead vs. Scanner Feedback [erratum] rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) (1992-01-04)
Re: Lookahead vs. Scanner Feedback bliss@sp64.csrd.uiuc.edu (1992-01-07)
Re: Lookahead vs. Scanner Feedback sef@kithrup.COM (1992-01-07)
Re: Lookahead vs. Scanner Feedback Jan.Rekers@cwi.nl (1992-01-07)
Re: Lookahead vs. Scanner Feedback burley@geech.gnu.ai.mit.edu (1992-01-07)
[13 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: hjelm+@cs.cmu.edu (Mark Hjelm)
Keywords: yacc, parse, question
Organization: School of Computer Science, Carnegie Mellon
Date: Fri, 03 Jan 92 18:16:32 GMT

I have a parser, written using Yacc and Lex, for ANSI C. The grammar is
taken pretty much verbatim from the standard. The scanner uses the symbol
table to decide whether to return "identifier" or "typedef name" as the
token type for an identifier. How do I KNOW that there are no situations
which, due to parser lookahead, would cause the scanner to return an
incorrect token type for an identifier (i.e. return "identifier", even
though the identifier was just/will be made into a "typedef name")? Is
there a general answer to this question for other parsing strategies
(possibly with other amounts of lookahead) and other grammars (languages)?


Just Curious,
Mark


hjelm@cs.cmu.edu
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.