[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bison version 1.875e available for testing
From: |
Laurence Finston |
Subject: |
Re: Bison version 1.875e available for testing |
Date: |
Wed, 15 Dec 2004 19:14:11 +0100 (MET) |
On Wed, 15 Dec 2004, Akim Demaille wrote:
>
> Well, there are many others to finish first. And I would like to have
> a look at the actual code needing this feature.
The following is the code in question. The complete code for
GNU 3DLDF is available at:
http://savannah.gnu.org/cgi-bin/viewcvs/3dldf/3dldf/Group/CWEB/
`Scanner_Node scanner_node' is the parameter passed to `yyparse()'.
`Scanner_Node' is declared as `typedef Scanner_Type* Scanner_Node'.
The parser code is in files with names of the pattern "p*.w", e.g.,
"parser.w".
/* Beginning of code. */
@<Common declarations for rules@>=
Scanner_Node scanner_node = static_cast<Scanner_Node>(parameter);
ostream* out_stream_metapost
= scanner_node->out[Run_State::METAPOST]->stream_ptr;
bool error_stop_value = ( scanner_node->run_state.error_stop_mode
== Run_State::STOPPING
&& scanner_node->in->type != Io_Struct::STDIN_TYPE)
? true : false;
bool warning_stop_value = ( scanner_node->run_state.warning_stop_mode
== Run_State::STOPPING
&& scanner_node->in->type
!= Io_Struct::STDIN_TYPE)
? true : false;
Id_Map_Entry_Node entry;
int status;
using namespace Scan_Parse;
stringstream cerr_strm;
stringstream location_strm;
string thread_name;
#ifdef HAVE_PTHREAD_H
if ( scanner_node->run_state.multithread_input
|| scanner_node->run_state.multithread_output)
thread_name = scanner_node->thread_info->name;
#else /* |HAVE_PTHREAD_H| is undefined. */@;
if (0) /* Dummy conditional. */
;
#endif /* |HAVE_PTHREAD_H| is undefined. */@;
else /* Threads not available or not using them. */
thread_name = "";
#if DEBUG_COMPILE
bool DEBUG = false;
#endif /* |DEBUG_COMPILE| */@;
/* End of code. */
>
> in this specific case, I'm not very fond of opening the guts of
> yyparse, there are many risks in there.
>
I understand.
Laurence
- Re: Bison version 1.875e available for testing, (continued)
- Re: Bison version 1.875e available for testing, Laurence Finston, 2004/12/11
- Re: Bison version 1.875e available for testing, Akim Demaille, 2004/12/15
- Re: Bison version 1.875e available for testing, Laurence Finston, 2004/12/15
- Re: Bison version 1.875e available for testing, Akim Demaille, 2004/12/15
- Re: Bison version 1.875e available for testing, Laurence Finston, 2004/12/15
- Re: Bison version 1.875e available for testing, Akim Demaille, 2004/12/15
- Re: Bison version 1.875e available for testing, Kelly Leahy, 2004/12/15
- Re: Bison version 1.875e available for testing, Laurence Finston, 2004/12/15
Re: Bison version 1.875e available for testing, Hans Aberg, 2004/12/15
Re: Bison version 1.875e available for testing, Hans Aberg, 2004/12/15