help-bison
[Top][All Lists]
Advanced

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

Problem in Input from File and Buffer


From: banda bindas
Subject: Problem in Input from File and Buffer
Date: Sat, 12 Jul 2003 02:46:29 -0700 (PDT)

Hi,
   I am having problem with Flex/Bison in getting input. I am designing an application which will take input from File and from Buffer(at diferent instances). To read the buffer, I defined a class like this
public:
 LexChild(){}
 void lexRestart(YY_Lexer_IFILE *input_file ){ yyrestart(input_file);}
 void lex_switch_to_buffer( ){
  if(YY_CURRENT_BUFFER)
  {
   yy_delete_buffer(YY_CURRENT_BUFFER);
  }
  yy_switch_to_buffer( yy_create_buffer( NULL, YY_BUF_SIZE) );
 }
};
Parser has two different functions for working in two conditions..in case of buffer and in case of File.
Now, I am not able to parse through file, although the buffer part works just fine. I was able to parse the file before adding the buffer part..
Please help in this regard.
Thanking you all,
praveen


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
reply via email to

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