[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
many file parse.
From: |
Choi He Chul |
Subject: |
many file parse. |
Date: |
Wed, 14 Feb 2001 19:01:26 +0900 |
User-agent: |
Mutt/1.2.5i |
Hello
I’m using flex 2.5.4, bison 1.28 and g++.
I want to parse many files one by one, but when I parsed one and tried to do
another,
segmentation fault occurred. I tried ‘yyrestart’, but the result is same.
However if I parse other files using
'yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE))'
not after termination but during execution, it works well.
I guess after a file is parsed, it can’t return to initial state.
Can I find any way of initiating?
Thank you very much.
Ps.
I ‘m not good at Englisth, so I’m sorry for my poor English.
Is ther any ambiguous things in my question, please let me know.
here is part of my source
------------------------
yyin = fopen ( (char *) filename.c_str() , "r");
if ( yyin == NULL )
return FALSE;
yyparse ();
fclose ( yyin );
//another file parse..
f = fopen ( (char *) filename2.c_str() , "r");
if ( f == NULL )
return FALSE;
// yyrestart(f);
yyin = f;
yyparse();
fclose ( f );
--
address@hidden
http://jangnan.org
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- many file parse.,
Choi He Chul <=