From: Eric Hodel Date: 2003-07-31T08:18:15-07:00 Subject: Re: Parser generator --IiVenqGWf+H9Y6IX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Robert Feldt (feldt@ce.chalmers.se) wrote: > My plan is to get it working as I want with the C back-ends and then > translate the necessary parts to Ruby. Having a pure Ruby one is > essential yes. Well if you aren't in too big of a hurry, there's a pure Ruby Coco/R port coming out RSN (hopefully next tuesday). > I'd say they are not super-easy to translate since there is no real > docs on the design and internals. However, you can start with > only the parts that are necessary during parsing since they are generally > smaller than the rest. Thus you can generate both fast parsers using C > but can be compiled to Ruby extension and have a pure Ruby parser when > you want for portability. When that is in place you can focus on > doing the rest of it in pure Ruby (Since the GLR generation phase is > very similar to the LALR one you could actually use parts of Racc, > unclear if its worth it though). We found that porting Coco/R from Java to Ruby was pretty easy, because the Java knew how to generate itself, so we just needed to make all the same function calls in the same order, and we'd be done. (It took a while to figure this out though.) We still need to unbreak encapsulation, because the people who wrote Coco/R for Java did that quite a bit. --=20 Eric Hodel - drbrain@segment7.net - http://segment7.net All messages signed with fingerprint: FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 --IiVenqGWf+H9Y6IX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/KTM3MypVHHlsnwQRAobOAKDgujxNRoNgHFbOegimGAK1VSj1ywCfRtly THfRG3fbGtrbDQ6K8by9h7Y= =TdYZ -----END PGP SIGNATURE----- --IiVenqGWf+H9Y6IX--