Re: bison/yacc: force look-ahead (China Blue)
18 Aug 1999 11:27:54 -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: (China Blue)
Newsgroups: comp.compilers,comp.lang.c
Date: 18 Aug 1999 11:27:54 -0400
Organization: Collective Against Consenual Sanity
References: 99-08-074
Keywords: yacc

/ 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]

[Or wonder why not defer the action until the next symbol is shifted or

Post a followup to this message

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