[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bison and $ (dollarsign) token at the end
From: |
Hans Aberg |
Subject: |
Re: Bison and $ (dollarsign) token at the end |
Date: |
Fri, 5 Jul 2002 18:58:59 +0200 |
At 18:28 +0200 2002/07/05, by way of Hans Aberg wrote:
>Sory for my poor english
That's OK -- just be careful to not say they opposite of what you want. :-)
> - I was working all night (now is 10 am. ) ... I think I must go to bad
>now ;-)
Well, if you have been up all night and it's ten in the morning, it's
probably time to go to bed. :-)
>Input to the parser is for example:
>NUMBER tg = 5;
>but it expects white space between 'tg' and '=' and '5' and ';'
The parser does not expect any characters in input, because it only parses
the tokens handed over by the lexer.
>- it looks like yylex is doing wrong
>job...
So this seems to be the problem. When using Flex, in order to zip out
white-space, one can put into the .l file the rule:
%%
[[:space:]]+ { /* Skip white-space. */ }
...
if white-space is wholly irrelevant. If white-space are relevant only in
parts, use Flex start-conditions; see the Flex manual and the
Help-flex mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-flex
Hans Aberg
- Re: Bison and $ (dollarsign) token at the end, (continued)
Re: Bison and $ (dollarsign) token at the end, Grzegorz_Szostak, 2002/07/05
Re: Bison and $ (dollarsign) token at the end, by way of Hans Aberg, 2002/07/05
- Re: Bison and $ (dollarsign) token at the end,
Hans Aberg <=
Re: Bison and $ (dollarsign) token at the end, Grzegorz_Szostak, 2002/07/09