On Mon, Oct 5, 2009 at 11:18 AM, Philip Herron <[email protected]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > 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? In particular, http://www.parrotblog.org/2008/03/targeting-parrot-vm.html tutorial series on building a compiler with the Parrot Compiler Tools > 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. > 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 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkrKOFsACgkQAhcOgIaQQ2EBjwCbBtxNPcCHOthk6xueSk3Qz2aU > bDgAn0gRKmpaUzxFMHeYN9XV7f4+LcUn > =ccAh > -----END PGP SIGNATURE----- > > _______________________________________________ > http://lists.parrot.org/mailman/listinfo/parrot-dev -- Edward Mokurai (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) Cherlin Silent Thunder is my name, and Children are my nation. The Cosmos is my dwelling place, the Truth my destination. http://earthtreasury.org/ _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev
