bison/yacc: force look-ahead

hannes <>
18 Aug 1999 03:33:04 -0400

          From comp.compilers

Related articles
bison/yacc: force look-ahead (hannes) (1999-08-18)
Re: bison/yacc: force look-ahead (1999-08-18)
| List of all articles for this month |

From: hannes <>
Newsgroups: comp.compilers,comp.lang.c
Date: 18 Aug 1999 03:33:04 -0400
Organization: - Share what you know. Learn what you don't.
Keywords: yacc, lex, question, comment

In a bison action I can discover that there is
no lookahead token (yychar == YYEMPTY)

How (if at all) do I force bison to do the lookahead
anyway, so I can examine the next symbol in the

[The usual advice is "don't do that". I suppose you could call yylex,
stick the result in yychar, and hope the bison would do the right
thing. -John]

Post a followup to this message

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