[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison help
From: |
Hans Aberg |
Subject: |
Re: bison help |
Date: |
Mon, 15 Jul 2002 19:06:52 +0200 |
At 14:10 +0000 2002/07/15, Fred 24 wrote:
> my problem is to skip the \n the white-space is not my problem. I have
>trouble with the \n. When a \n occurs between rules, bison return an error.
>What can I do for the \n to be valid between rules ???
One way is to read the material you just quoted:
- Bison doesn't do anything wrong; your lexer probably gives the Bison
generated parser a token it does not recognize. So fix your lexer.
- To Flex, '\n' is white-space, see its manual; so if whitespace is
stripped out, also '\n' is stripped out. Or else strip out only \n, or give
it a token name that your Bison grammar recognizes, or if you return
characters codes as token numbers, put in a '\n' somewhere in this your
Bison grammar.
- Flex questions to the Help Flex list.
Hans Aberg