[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to use our own token ?
From: |
Akim Demaille |
Subject: |
Re: How to use our own token ? |
Date: |
Sat, 30 Jan 2010 13:44:35 +0100 |
Le 29 janv. 2010 à 03:11, Aurelien Tran a écrit :
> I know that this is the general way to do this but the lexer is in fact an
> external module that I cant modify. I would like to avoid rewriting all the
> token and their value in another file. If need to I will but I would to
> avoid it in order to have more maintainable source code.
>
> I just want to be sure that Bison do not support this kind of feature (Which
> is actually the real purpose of my post here).
Bison needs to know the tokens, you can't have it use yours. Yet, you can
assign the numbers you want to the tokens, for instance
%token FOO 123
does what you want.