[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison help
From: |
Fred 24 |
Subject: |
Re: bison help |
Date: |
Mon, 15 Jul 2002 14:10:24 +0000 |
(Please reply to my email)
Hi,
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 ???
SELECT STAR WhereClause OrderClause
"*" return STAR;
"SELECT" return SELECT;
WhereClause: {
$$ = NULL;
}
...
OrderClause:
{
$$ = NULL;
}
...
Eg.:
SELECT *
WHERE ID = 5
It is not valid because a \n is between a "*" and "WHERE". The parser return
an error and I want it to be valid with \n or not !
Thanks again
(Please reply to my email)
From: Hans Aberg <address@hidden>
To: "Fred 24" <address@hidden>
CC: address@hidden
Subject: Re: bison help
Date: Fri, 12 Jul 2002 23:18:25 +0200
At 18:41 +0000 2002/07/12, Fred 24 wrote:
>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 ???
Bisn parser only parses the tokens as handed over by the lexer, so your
problem is alexer problems. If you use Flex, white-space can be removed by
a rule
%%
[[:space:]]+ { /* Skip white-space. */ }
For more info see rge Flex manual, and the
Help-flex mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-flex
Hans Aberg
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com