[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: bison puts too many tokens in the semantic value
From: |
Hans Aberg |
Subject: |
RE: bison puts too many tokens in the semantic value |
Date: |
Sun, 4 Mar 2001 10:23:54 +0100 |
>Is there any way to get around this problem? I thought it was possible to
>access tokens in the middle of a rule from an action at the end.
Yes -- to write correct code. :-) Flex was designed that way. It does not
have anything with Bison to do:
Bison only cares about the token codes, and does nothing with the token
values except copying it from time to time. If your token value is a
pointer into a buffer which changes values, then the dereferenced token
value will change, clearly.
Hans Aberg