Group
Extension

Matches 10

Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/util/drift.pl ( view source; MetaCPAN )
le $module.Instances ()
where
import $module
import Data.Yaml.Syck
import DrIFT.YAML
import DrIFT.JSON
import DrIFT.Perl5
import DrIFT.Perl6Class
import Control.Monad
import qualified Data.ByteString 
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/docs/Pugs/Doc/Run.pod ( view source; MetaCPAN )
 are C<Pugs>, C<PIR>, C<GHC>, C<JS>, and various variants of PIL:
C<PIL1>, C<PIL1-Binary>, C<PIL1-JSON>, C<PIL1-Perl5> (and C<PIL2-...>).

Note that, as with C<-c>, C<BEGIN {...}> and C<CHECK {...}> b
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/misc/Parser-Mini/pil1_json_emit_forth.pl ( view source; MetaCPAN )
=pod

PIL2-JSON Forth-like code emitter
by fglock

  ../../pugs -CPIL2-JSON -e ' say "hello "; say 1 + 1 ' | \
    ../../pugs pil2_json_emit_forth.pl

  #! /usr/bin/forth
  : &*END ;
  "hello " &say
 
arator
}

# -- Main program
# this is the same for all languages

push @*INC, './';
require 'pil2_json_emit.pm';

# slurp stdin - xinming++ 
my $pil2 = ** $*IN.slurp;

my @b = tokenize( $pil2 );
# say
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/misc/Parser-Mini/pil1_json_emit_p6.pl ( view source; MetaCPAN )
=pod

PIL2-JSON simple Perl 6 code emitter
by fglock

  ../../pugs -CPIL2-JSON -e ' say "hello" ' | \
    ../../pugs pil2_json_emit_p6.pl

  use v6-alpha;
  &*END () {  }
  (&say("hello"));

Other exa
mples:

  ../../pugs -Cpil2-json -e ' my Int $x; ($x~"a")( "a",1,$x,$x+1); { say 1 } ' | \
    ../../pugs pil2_json_emit_p6.pl

The code created by this example has syntax errors, but I'm not sure if 
ngs are
really forbidden in p6:

  ../../pugs -Cpil2-json -e 'my ($x,$y)=(1,2); sub infix:<aaa>($a,$b){$a+1} 1 aaa 2;' | \
    ../../pugs pil2_json_emit_p6.pl

=cut

use v6-alpha;

# -- Language speci
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/misc/Parser-Mini/pil1_json_emit_php.pl ( view source; MetaCPAN )
=pod

PIL2-JSON simple Perl 6 code emitter
by fglock

  ../../pugs -CPIL2-JSON -e ' say "hello" ' | \
    ../../pugs pil2_json_emit_p6.pl

  use v6-alpha;
  &*END () {  }
  (&say("hello"));

Other exa
mples:

  ../../pugs -Cpil2-json -e ' my Int $x; ($x~"a")( "a",1,$x,$x+1); { say 1 } ' | \
    ../../pugs pil2_json_emit_p6.pl

The code created by this example has syntax errors, but I'm not sure if 
ngs are
really forbidden in p6:

  ../../pugs -Cpil2-json -e 'my ($x,$y)=(1,2); sub infix:<aaa>($a,$b){$a+1} 1 aaa 2;' | \
    ../../pugs pil2_json_emit_p6.pl

=cut

use v6-alpha;

# -- Language speci
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/misc/Parser-Mini/pil1_json_emit.pl ( view source; MetaCPAN )
# PIL2-JSON simple tokenizer, parser, and code emitter
# ../../pugs -CPIL2-JSON -e ' say "hello" ' | ../../pugs pil2_json_emit.pl

use v6-alpha;

# tokenizer

my $tokens =
    m:g:perl5 {(\"(?:\\\\|\\
"|.)*?\"|[\:\,\=\{\(\[\}\)\]]|\w+)};

# JSON parser 
# outputs a p6 tree = Hash of Array|Hash|Scalar ...

sub parse (@start, $token, @end, @_ is rw) {
    state %tok = (
        token => sub (@_ is rw
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/misc/Parser-Mini/pil1_json_emit_io.pl ( view source; MetaCPAN )
=pod

PIL2-JSON Forth-like code emitter
by fglock

  ../../pugs -CPIL2-JSON -e ' say "hello "; say 1 + 1 ' | \
    ../../pugs pil2_json_emit_forth.pl

  #! /usr/bin/forth
  : &*END ;
  "hello " &say
 
arator
}

# -- Main program
# this is the same for all languages

push @*INC, './';
require 'pil2_json_emit.pm';

# slurp stdin - xinming++ 
my $pil2 = ** $*IN.slurp;

my @b = tokenize( $pil2 );
# say
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/misc/Parser-Mini/pil1_json_emit.pm ( view source; MetaCPAN )
d

PIL2-JSON generic code emitter
by fglock

This is a non-runnable module - use 'pil2_json_emit_<language>.pl' instead

  ../../pugs -CPIL2-JSON -e ' say "hello" ' | \
    ../../pugs pil2_json_emit_p
kenize ( $s ) {
    $s ~~ m:g:perl5 {(\"(?:\\\\|\\"|.)*?\"|[\:\,\=\{\(\[\}\)\]]|\w+)};   #" 
}

# JSON parser - creates an Array [of Array]* of Str

sub parse (@start, $token, @end, @_ is rw) {
    st
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/misc/Parser-Mini/pil1_json_emit_pir.pl ( view source; MetaCPAN )
=pod

PIL2-JSON Parrot-like code emitter
by fglock

  ../../pugs -CPIL2-JSON -e ' say "hello "; say 1 + 1 ' | \
    ../../pugs pil2_json_emit_pir.pl

  #! /usr/bin/parrot
  ... TODO
  
=cut

use v6-al
arator
}

# -- Main program
# this is the same for all languages

push @*INC, './';
require 'pil2_json_emit.pm';

# slurp stdin - xinming++ 
my $pil2 = ** $*IN.slurp;

my @b = tokenize( $pil2 );
# say
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/misc/Parser-Mini/pil1_json_parser.pl ( view source; MetaCPAN )
/../pugs -CPIL2-JSON -e ' say "hello" ' | ../../pugs pil2_tokenizer.pl

use v6-alpha;

# tokenizer

my $tokens =
    m:g:perl5 {(\"(?:\\\\|\\"|.)*?\"|[\:\,\=\{\(\[\}\)\]]|\w+)};

# JSON parser 
# outp

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.