Re: [vos-d] eliminating flex/bison

2005-06-22 Thread Braden McDaniel
On Wed, 2005-06-22 at 23:51 -0400, Braden McDaniel wrote:
> On Wed, 2005-06-22 at 23:12 -0400, Peter Amstutz wrote:
> 
> > Braden, you're using spirit for OpenVRML, right?
> 
> Used to. I made a URI parser with it.
> 
> >  What's your experience been?
> 
> That certain Spirit constructs are not threadsafe at a fundamental
> level. That is, two different parser instances used by two different
> threads don't work. Not all the time, anyway.

Or I could be full of shit.

Reading a bit now, I see that BOOST_SPIRIT_THREADSAFE must be defined to
make Spirit threadsafe. I don't think I knew that before.

All that aside, Spirit is a pretty damn nifty piece of work. The biggest
thing to adjust to when using it is identifying what things will happen
in Spirit's "lazy context"--that is, the code that gets run during the
parse, rather than before it.

-- 
Braden McDaniel   e-mail: <[EMAIL PROTECTED]>
Jabber: <[EMAIL PROTECTED]>


___
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] eliminating flex/bison

2005-06-22 Thread Braden McDaniel
On Wed, 2005-06-22 at 23:12 -0400, Peter Amstutz wrote:

> Braden, you're using spirit for OpenVRML, right?

Used to. I made a URI parser with it.

>  What's your experience been?

That certain Spirit constructs are not threadsafe at a fundamental
level. That is, two different parser instances used by two different
threads don't work. Not all the time, anyway.

I didn't do a lot of research into "why"; this might be an easily
fixable bug in Spirit. I don't think it was a bug in my use of it. I
couldn't tell you, though, just what it was about my grammar that made
it unsafe. It was really too easy for me to just chuck the whole thing
and replace it with boost::regex.

I can certainly send you the grammar if you're interested.

-- 
Braden McDaniel   e-mail: <[EMAIL PROTECTED]>
Jabber: <[EMAIL PROTECTED]>


___
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


[vos-d] eliminating flex/bison

2005-06-22 Thread Peter Amstutz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Lalo and I were just talking on #vos, he was having problems with the 
flex-generated scanner files, which has been a recurring problem for 
people trying to build VOS for quite a while.


It occurred to me that maybe the ideal solution would be to eliminate flex 
(and bison) altogether.  This would mean two things:


 * For libvos, we would drop support for the "legacy" text/xml based VOP 
and only support the binary encoding (which is the current default anyhow)
 * For everything else (parsing the search query language, vosapp config 
files, and mesh command line) we would covert over to using boost::spirit, 
which is a template-based recursive decent parser generator.


Braden, you're using spirit for OpenVRML, right?  What's your experience 
been?  Our needs are quite modest.


[   Peter Amstutz   ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED]  ]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCuii9aeHUyhjCHfcRAvhPAJ9lUI8qQtfMZcgmxHrmsacplBHzuQCZATSi
JyTulScTdv3k/UCnoSuPdRw=
=aujH
-END PGP SIGNATURE-


___
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d