[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bison: Syntax error with german "umlaute"
From: |
Hans Aberg |
Subject: |
Re: Bison: Syntax error with german "umlaute" |
Date: |
Mon, 1 Jul 2002 11:35:32 +0200 |
>> From: Wolfgang Gabriel <address@hidden>
>> Date: 27 Jun 2002 23:51:00 -0700
>
>> using Bison V1.25 (under HP-UX) I always get a "Syntax error"
>> (function YYERROR will be called) if the parsed source code contains
>> german umlaute
This seems to be a lexer problem, not a Bison problem, as Bison only parser
the token numbers it receives.
>> How can I avoid this error?
If you are using Flex, check that it produces 128 character tables.
At 01:58 -0700 2002/07/01, Paul Eggert wrote:
>Most likely you are on a host with signed char, and your umlauted
>character code has a negative value after it is converted to type
>'char'. When yylex returns a negative value, that is considered to be
>end-of-input.
Actually, it works on MacOS my CodeWarrior compiler, which I think uses
signed characters. (I have checked on such nasty characters as 127, which
might be confudes with -1, but it works OK, it seems.) So Flex seems to do
the right thing.
Check the Flex manual, and for Flex help/bugs, use the
Help-flex mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-flex
Hans Aberg
- Re: Bison: Syntax error with german "umlaute",
Hans Aberg <=