[Top][All Lists]

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

Re: problems with bison-flex

From: Laurence Finston
Subject: Re: problems with bison-flex
Date: Tue, 14 Oct 2008 08:48:49 +0200 (CEST)

On Mon, 13 Oct 2008, Jim Michaels wrote:

> fgets & fgetc stops when it reaches a ^z character (eof character) ^d on 
> unix. the batch mode flex does not I think do this, because it uses fread.  
> however, it might if you open the file in text mode instead of binary.
> If you happen to want to lex a ^z or ^d this can be a problem!
> will I need to redefine YY_INPUT in the case of a C++ lexer and parser?
> The C++ lexer uses <iostream> (hence fstream) rather than <stdio.h>.  this is 
> what I gathered from bison & flex 2.1 generated code.

I don't know anything about the C++ lexer.  I suggest writing a minimal 
scanner-parser pair and checking to see what happens.


reply via email to

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