help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

my bison didn't get correct value from flex


From: ??????
Subject: my bison didn't get correct value from flex
Date: Tue, 5 Jul 2022 15:55:00 +0800

Dear Sir or Madam,


I encountered some troubles when attempting to recognize identifiers of C 
language via flex. As for program shown below, what identifier returned by flex 
was "main", whereas bison got "main(){
    return 3;
}".

Identifiers were only mentioned in the following two places. In flex,


and in bison,



I tried tracking IDENT with yacc.output and debug mode of bison on. IDENT 
was changed at the other one stage, but I hadn't completely figure it out 
yet.


Could you give me a hand? If you need any more information or code, let me 
know please.


Yours sincerely,
Yanhui Xu

JPEG image

JPEG image

JPEG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]