Lingua-tlhInganHol-yIghun

 view release on metacpan or  search on metacpan

lib/Lingua/tlhInganHol/yIghun.pm  view on Meta::CPAN

	Hegh		die	
	ghuHmoH		warn	
	pa'Hegh		Carp::croak
	pa'ghuHmoH	Carp::carp
	pongwI'		caller	
	buv		ref	
	bagh'a'		tied	
	poQ		require	
	ghomchoH	chdir	
	Sach		glob	
	teq		unlink	
	ghomtagh	mkdir	
	ghomteq		rmdir	
	Del		stat	
	ghum		alarm	
	mol		dump	
	tagh		exec	
	Qong		sleep	
	ra'		system	
	loS		wait	
	ghomneH		wantarray
);
my $v_arg1 = enqr keys %v_arg1;
sub to_arg1 {
	my ($arg, $func) = @_;
	$arg ||= {trans=>""};	# handle optional args
	return $arg->{trans}."->$func->{trans}()" if $arg->{object};
	return $func->{trans}."($arg->{trans})";
}

my %v_arg1_da = qw (
	poS		open	
	laD		readline
	bot		flock	
	nup		truncate
	chaqpoDmoH	chomp	
	poDmoH		chop	
	chImmoH		undef	
	Say'moH		reset	
	woD		pop	
	nIH		shift	
	SoQmoH		close	
	Qaw'		delete	
	baghHa'		untie	
);
my $v_arg1_da = enqr keys %v_arg1_da;
sub to_arg1_da {
	my ($arg, $func) = @_;
	$arg ||= {trans=>""};	# handle optional args
	return $arg->{trans}."->$func->{trans}()" if $arg->{object};
	return "$func->{trans} $arg->{trans}" if $arg->{type} =~ /handle$/;
	return $func->{trans}."($arg->{trans})";
}

my %v_arg2 = qw (
	qojHa'		atan2	
	So'		crypt	
	boSHa'		unpack	
	Sam		index	
	naw'choH	chmod	
	pIn'a'choH	chown	
	rar		link	
	neq		rename	
);
my $v_arg2 = enqr keys %v_arg2;
sub to_arg2 {
	my ($arg1, $arg2, $func) = @_;
	return $arg1->{trans}."->$func->{trans}($arg2->{trans})"
		if $arg1->{object};
	return "$func->{trans}($arg1->{trans}, $arg2->{trans})";
}

# my %v_arg2_i = qw (
# );
# my $v_arg2_i = enqr keys %v_arg2_i;
##  sub to_arg2_i {
	# my ($arg1, $arg2, $func) = @_;
	# return "$arg1->{trans} $func->{trans} $arg2->{trans}";
# }

my %v_arg2_da = qw (
	DoQ		bless	
	bot		flock	
);
my $v_arg2_da = enqr keys %v_arg2_da;
sub to_arg2_da {
	my ($arg1, $arg2, $func) = @_;
	return $arg1->{trans}."->$func->{trans}($arg2->{trans})"
		if $arg1->{object};
	return "$func->{trans} $arg1->{trans} ($arg2->{trans})"
		if $arg1->{type} =~ /handle$/;
	return "$func->{trans}($arg1->{trans}, $arg2->{trans})";
}

my %v_arg2_a = qw (
	DIch		[...]
	DIchvo'		[...]
	DIchvaD		[...]
	Suq		{...}
	Suqvo'		{...}
	SuqvaD		{...}
);
my $v_arg2_a = enqr keys %v_arg2_a;
sub to_arg2_a {
	my ($arg1, $arg2, $func) = @_;
	$arg1->{trans} =~ s/^(\$.*)/$1\->/;
	$arg1->{trans} =~ s/^([%@])/\$/;
	die "<<Suq>> yIlo'Qo' <<DIch>> yIlo' jay'"	# Not "Suq"! "DIch"!
		if substr($func->{raw},0,3) eq 'Suq' && $1 eq '@';
	die "<<DIch>> yIlo'Qo' <<Suq>> yIlo' jay'"	# Not "DIch"! "Suq"!
		if substr($func->{raw},0,3) eq 'DIch' && $1 eq '%';
	$func->{trans} =~ s/\Q.../$arg2->{trans}/;

	return "$arg1->{trans}$func->{trans}";
}

my %v_args = qw (
	noD		reverse		
	boS		pack	
	sIj		split	
	muv		join	

lib/Lingua/tlhInganHol/yIghun.pm  view on Meta::CPAN

        ghum            alarm
        HaD             study
        Hegh            die
        Hiv             kill
        HoH             kill
        Hut             9
        ja'             tell
        jaH             goto
        jav             6
        jegh            unshift
        jey             kill
        joqtaH          sin
        joqtaHHa'       cos
        juH             main
        juv             length
        laD             readline
        mungna'vo'      STDIN (used as name -- i.e. in an open)
        mungna'vo'Hal   STDIN (used as handle -- i.e. in a readline)
        lagh            substr
        lI'a'           exists
        lo'             use
        lo'laH          values
        lo'Qo'          no
        lo'Sar          sqrt
        logh            x
        loS             4
        loS             wait
        ma'             our
        mach            lc
        mach law'       lt
        machbe' law'    ge
        maH             -0
        maHghurtaH      log
        maj             our
        mej             exit
        mI'pIm'a'       !=
        mI'rap'a'       ==
        mIS             rand
        mIScher         srand
        mISHa'          sort
        mob             scalar
        mol             dump
        mugh            tr
        muH             kill
        muv             join
        nab             sub
        nargh           quotemeta
        natlhwI'        $|
        naw'choH        chmod
        nej             seek
        neq             rename
        netlh           -0000
        nIH             shift
        nob             =
        noD             reverse
        nup             truncate
        pa'ghuHmoH      carp
        pa'Hegh         croak
        pagh            0
        pIm'a'          ne
        pIn'a'choH      chown
        poD             int
        poDmoH          chop
        pong            keys
        pongwI'         caller
        poQ             require
        poS             open
        luSpetna'	STDERR (used as name -- i.e. in an open)
        luSpetna'DoS    STDERR (used as handle -- i.e. in a print)
        Qaw'            delete
        qoj             or
        qojHa'          atan2
        Qong            sleep
        ra'             system
        rap'a'          eq
        rar             link
        rIn             continue
        rIn             continue
        rIn'a'          eof
        Sach            glob
        SaD             -000
        Sam             index
        SanID           -000
        Say'moH         reset
        sIj             split
        So'             crypt
        Soch            7
        SoQmoH          close
        Such            each
        Suq             ...{...}
        SuqvaD          ...{...} (when it's an lvalue)
        Suqvo'          ...{...} (when it's to be further indexed)
        tagh            exec
        tam             s
        tatlh           return
        teHchugh        if
        teHchughbe'     unless
        teHtaHvIS       while
        teHtaHvISbe'    until
        teq             unlink
        tI-             imperative prefix (2 or more arguments)
        tIn             uc
        tIn law'        gt
        tInbe' law'     le
        tIqel           for
        tlhoch          not
        toq'a'          defined
        vagh            5
        vam             local
        vang            do
        vatlh           -00
        wa'             1
        wa'Dichmach     lcfirst
        wa'DichtIn      ucfirst
        wej             3
        wI'             my
        wIj             my
        wIv             grep
        woD             pop
        wuq             ...?...:...
        yI-             imperative prefix (0 or 1 argument)
        yInargh         last
        yInHa'          kill
        yInIDqa'        redo
        yItaH           next 
        yoS             package
        yuv             push




=head1 Appendix 2: Terran-thlIngan dictionary

        
        Terran          thlIngan        Literal translation
        ======          ========        ===================
        =               nob             "give"
        ..              chen            "build up"
        {...}           {...}           "attacking batleth...defending batleth"
                                        (betleH HivtaH...betleH HubtaH")
        (...)           (...)           "attacking sword...defending sword"
                                        ('etlh HivtaH...'etlh HubtaH")
        ...[...]        DIch            ordinal suffix
        ...{...}        Suq             "get"
        ...?...:...     wuq             "decide"
        x               logh            "repeated"
        %               chuv            "be left over"
        +               chel            "add"
        -               chelHa'         "un-add"
        /               wav             "divide"
        ==              mI'rap'a'       "number same?"
        !=              mI'pIm'a'       "number different?"
        \& <sub ref>    -laHwI'         "one who is able to do..."
        abs             'ar             "how much"
        alarm           ghum            "alarm"
        and             'ej             "and"
        atan2           qojHa'          "anti cliff"
        bless           DoQ             "claim ownership of"
        caller          pongwI'         "one who calls"
        carp            pa'ghuHmoH      "warn over there"
        chdir           ghomchoH        "change grouping"
        chmod           naw'choH        "change access"
        chomp           chaqpoDmoH      "maybe clip"
        chop            poDmoH          "clip"
        chown           pIn'a'choH      "change master"
        close           SoQmoH          "close"
        cmp             'ov             "compete"
        continue        rIn             "be complete"
        cos             joqtaHHa'       "counter waving"
        croak           pa'Hegh         "die over there"
        crypt           So'             "hide"
        DATA            De'Daqvo'       "place from which data comes"
        defined         toq'a'          "is inhabited"
        delete          Qaw'            "destroy"
        die             Hegh            "die"
        do              vang            "take action"
        dump            mol             "bury"
        each            Such            "visit"
        eof             rIn'a'          "is finished"
        eq              rap'a'          "same?"
        eval            chov            "evaluate"
        exec            tagh            "begin a process"
        exists          lI'a'           "is useful"
        exit            mej             "depart"
        flock           bot             "prohibit"
        for             tIqel           "consider them"
        fork            bogh            "be born"
        ge              machbe' law'    "be not smaller"
        glob            Sach            "expand"
        goto            jaH             "go"
        grep            wIv             "choose"
        gt              tIn law'        "be larger"
        if              teHchugh        "if true"
        index           Sam             "locate"
        int             poD             "clip"
        join            muv             "join"
        keys            pong            "name"
        kill            HoH             "kill"
        kill            muH             "execute"
        kill            chot            "murder"
        kill            bach            "shoot"
        kill            Hiv             "attack"
        kill            DIS             "stop"
        kill            jey             "defeat"
        last            yInargh         "escape"
        lc              mach            "be small"
        lcfirst         wa'Dichmach     "the first be small"
        le              tInbe' law'     "be not larger"
        length          juv             "measure"
        link            rar             "connect"
        local           vam             "this"
        log             maHghurtaH      "ten log"
        lt              mach law'       "be smaller"
        m               ghov            "recognize"
        main            juH             "home"
        map             choH            "alter"
        mkdir           ghomtagh        "initiate grouping"
        my              wI'             "my sapient"
        my              wIj             "my"
        ne              pIm'a'          "different?"
        next            yItaH           "go on"
        no              lo'Qo'          "don't use"
        not             tlhoch          "contradict"
        open            poS             "open"
        or              qoj             "inclusive or"



( run in 0.875 second using v1.01-cache-2.11-cpan-007c89162af )