bison/yacc: force look-ahead

hannes <hannes_e@my-deja.com>
18 Aug 1999 03:33:04 -0400

          From comp.compilers

Related articles
bison/yacc: force look-ahead hannes_e@my-deja.com (hannes) (1999-08-18)
Re: bison/yacc: force look-ahead saratoga@myremarq.com (1999-08-18)
| List of all articles for this month |

From: hannes <hannes_e@my-deja.com>
Newsgroups: comp.compilers,comp.lang.c
Date: 18 Aug 1999 03:33:04 -0400
Organization: Deja.com - 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
action?


/Hannes
[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.