[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison with reentrant flex
From: |
Hans Aberg |
Subject: |
Re: bison with reentrant flex |
Date: |
Sun, 15 Apr 2007 15:03:57 +0200 |
On 14 Apr 2007, at 01:51, Dilyan Palauzov wrote:
I am trying to make a reentrant bison parser, using reentrant
flex lexer. A reentrant flex parser requires a call to yylex_init
before the first yylex, and a call to yylex_destroy after the last
call to yylex .
I put yylex_init in %initial-action , how shall I introduce
yylex_destroy in the .y file? I would like not to expose the
yylex_destroy out of the .y-file .
You can write a new function
myparse(...) {
/* Initialize lexer */
yyparse(...);
/* Destroy lexer */
}
Hans Aberg