-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hey there,
Edward Cherlin wrote: > On Mon, Oct 5, 2009 at 11:18 AM, Philip Herron > <[email protected]> wrote: Hey guys, > > I've been looking around your wiki's tutorials etc and it all seems > pretty interesting, I've been developing my own interpreter for a > language I've been designing for some time now. Just not quite sure > how it could all fit together if i wanted to create byte-code > using parrot. > >> I am collecting such questions for the FAQs and possibly for >> writing more extensive documentation. Where have you looked for >> information? Have you looked at > >> http://docs.parrot.org/parrot/latest/html/ Documentation? Yeah I've been on there its quite good! > >> In particular, > >> http://www.parrotblog.org/2008/03/targeting-parrot-vm.html >> tutorial series on building a compiler with the Parrot Compiler >> Tools I didn't see this it seems to be what i want to be reading more of. > > What i mean is, I've been parsing and doing my own runtime and > garbage collection etc as an interpreter written in C using some > things like yacc and lex, readline, gnu/mp, mpfr ... . But if i was > to make an implementation to produce byte-code to run on parrot, > what do i do? > >> Try the link above, and let us know if you have further >> questions. The short answer is that the minimum requirement is >> two files, one to define the syntax of your language, and one for >> the semantics. There are many examples you can study. > > Can i still use my own parser from the examples I've been looking > at it seems to be you have your own parser tools? Or am i thinking > about how it all works wrong. And if i am still able to use my own > parser i guess it means i must have to try and link against .pir > stuff, so that probably doesn't work. > >> You can in fact connect to Parrot at any level. For example, you >> could use an existing compiler with cross-platform code >> generation, and just generate PIR or Parrot byte code. I am quite tempted to go this path as in generate PIR code. > > Another idea might be if i was still to use my own parser and bits > and pieces, is it safe to just produce byte-code manually from a > program i make on my side and run it on parrot if i see more what > the byte-code looks like. > >> For certain values of 'safe'. It is about as safe as generating >> any machine language, or perhaps less so given the power of >> Parrot. > > Anyways parrot seems like a cool project :) i should really start > playing with the examples now. So i understand it all a bit better. > > > --Phil I would just like to say thanks for all your opinions so far its been really helpful to see how it all fits together. :) - --Phil -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkrKTwgACgkQAhcOgIaQQ2GOFwCeNPtRZGP43jtGGCqp4d9MhaI5 naUAn1GC8Slr5E6hdrb6ZFcppdFUfpne =ZpxH -----END PGP SIGNATURE----- _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev
