[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Label problems
From: |
Akim Demaille |
Subject: |
Re: Label problems |
Date: |
31 Oct 2001 12:01:08 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence) |
>>>>> "Hans" == Hans Aberg <address@hidden> writes:
Hans> At 00:25 -0800 2001/10/31, ROLAND wrote:
>> And what I mean with a label, is that when I try to scan a file
>> that contains the word 'eccmstate' my parser only reads 'eccmstat'
>> and then goes to the next word. Then when I try to analyze the
>> results from the parser (using FLEX), I get an error because of an
>> unknown label in the parsed file...
Hans> You do not give much hints of what your problems are. Here, one
Hans> might guess that you have successfully compiled the .l and .y
Hans> files using Flex/Bison, then successfully compiled their output
Hans> using a C compiler, and when you then run that program, reading
Hans> a file with it, it somehow cannot recognize the full word you
Hans> expect.
Hans> Right?
Hans> If so, the problem is that the Flex generated lexer is not
Hans> reading lexemes that same way as the one generated by lex, and
Hans> you need to check the Flex settings and perhaps grammar and
Hans> correct for that (unless there is a problem in the C code).
I agree with Hans. And I'm quite sure the problem is not in Bison.
If I were you, I'd read the Flex and Bison docs about debugging
scanners and parsers at runtime, and try to see in the log what is
happening.