help-bison
[Top][All Lists]
Advanced

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

Re: I can't make sure it's a bug. But I think it's important.


From: Akim Demaille
Subject: Re: I can't make sure it's a bug. But I think it's important.
Date: Thu, 26 Sep 2013 15:51:37 +0200

Le 23 sept. 2013 à 16:28, 王波 <address@hidden> a écrit :

> Demaille,

Akim is my first name.

> Now I have another question.
> 
> When Flex reads "EOF", but I want to judge the former character, if it's 
> "\n", I will terminate, otherwise I will let Flex read a "\n", then 
> terminate. 
> 
> Now, I resolve it by using "yy_scan_string" and appending "\n" for all "EOF" 
> . About appending "\n", I  realize it by adding a flag to judge if it's the 
> first time to add.
> I think it's not a good solution.
> 
> Is there a good way to resolve it?  
> I think Flex should support a variable or function to resolve it( like 
> less(), but how to replace some unexpected characters).

I don't know offhand a good means to do that.  Would it be a problem
is <<EOF>> always emitted a \n before ending?

Anyway, this is about Flex/Lex, not about Bison, so this is not the
right place.

Cheers,

        Akim




reply via email to

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