Example for /doc/examples/ using Flex and Bison

lfinsto at gwdg.de lfinsto at gwdg.de
Thu Aug 5 09:12:17 CEST 2010


On Wed, August 4, 2010 6:43 pm, Nikos Mavrogiannopoulos wrote:
> On Fri, Jul 30, 2010 at 5:24 PM,  <lfinsto at gwdg.de> wrote:
>> Hello,
>> This may or not be of interest to you, but I thought I'd send it in case
>> it is.
>> The application I've written for my job uses a server and client that
>> communicate using two scanner/parser pairs, one for each peer.  They
>> are
>> written using Flex and GNU Bison.  It is slightly tricky getting this
>> to
>> work and the actual application is already fairly complicated, so I
>> wanted
>> to make a simple example, while it's fresh in my mind.  I think it
>> would
>> be most useful if it was included in the GNUTLS package, where people
>> would find it.
>
> Hi Laurence,
>  I'm on holidays and haven't checked the code, but my question would
> be why would this be good as an example? The examples included in
> gnutls have to be pretty simple, so developers can understand the
> usage of the underlying gnutls functions. For example in most of the
> examples we hide out the TCP/IP functions, for simplicity. Having a
> parser as an example would be confusing to people who don't know
> bison/flex and I don't know what the benefit would be to people who
> know how to use them. (this written without having seen the actual
> code)

It's up to you and Simon, of course.  My idea is that it would be a
simple, realistic example that shows how communication between a server
and client could be implemented.

The existing examples are good for demonstrating how to use GNUTLS, but
(unless I've missed something) don't address the issue of how a server and
client are supposed to communicate with each other on a higher level,
i.e., how to implement a "protocol".  It seems to me that using Flex and
Bison would be one of the most practical ways of implementing this
communication.

>From the Bison mailing list, I know that it's not clear to many people how
to generate a reentrant parser, pass a parameter to yylex and yyparse, use
multiple parsers in a single project, etc.  Having gotten these sorts of
things to work, it seems to me that it would be useful to have a simple
example of it somewhere.

It was just an idea and it's not a problem for me if you and/or Simon
don't think it would be worth pursuing.

Laurence

>
> regards,
> Nikos
>


-------------------------------------------------------------
Laurence Finston
Gesellschaft fuer wissenschaftliche Datenverarbeitung mbH
Am Fassberg 11
37077 Goettingen

Telefon: 	+49 551 201-1882
E-Mail: 	lfinsto at gwdg.de





More information about the Gnutls-devel mailing list