in reply to using perlsyntax for other languages?

Why do you think it would be easier than B::C which is simply an opcode serializer? For what you'd want to do, you'd need to serialize the opcodes AND port the C code that forms Perl, starting with basics like porting scalars.
  • Comment on Re: using perlsyntax for other languages?

Replies are listed 'Best First'.
Re^2: using perlsyntax for other languages?
by LanX (Saint) on Apr 16, 2010 at 15:34 UTC
    Since my intention is not to emulate perl but to reuse perl syntax with foreign semantics.

    B::CC tries to emulate all Perl semantics , I just wanna use Perl's syntax to write a foreign code.

    The complication of B::CC is the goal that running the perl-interpreter produces in details the same result with the same code ...

    But thats not realistic, I'd rather prefer throwing errors when not easily implementable features are requested.

    For instance a really easy thing like if () {} else {} has plenty of flavors in lisp to avoid parens, that could be simplified.

    Cheers Rolf

      I didn't mention B:CC???

      Since my intention is not to emulate perl but to reuse perl syntax with foreign semantics

      So you want a Perl tokenizer or parser. On both counts, the answer is PPI.

      Update: Mentioned PPI.
      Update: Mentioned tokenizer.

        >I didn't mention B:CC???

        No you didn't ... I did !x3

        BTW: To which version of your updates am I supposed to answer?

        Cheers Rolf