<?php
/*
**
** The PHP code is generated by atscc2php
** The starting compilation time is: 2014-8-28: 23h:35m
**
*/
function
fibats($arg0)
{
/*
// $tmpret0
*/
__patsflab_fibats:
$tmpret0 = loop_1($arg0, 0, 1);
return $tmpret0;
} // end-of-function
function
loop_1($arg0, $arg1, $arg2)
{
/*
// $apy0
// $apy1
// $apy2
// $tmpret1
// $tmp2
// $tmp3
// $tmp4
*/
__patsflab_loop_1:
$tmp2 = ats2phppre_gt_int1_int1($arg0, 0);
if($tmp2) {
$tmp3 = ats2phppre_sub_int1_int1($arg0, 1);
$tmp4 = ats2phppre_add_int1_int1($arg1, $arg2);
// ATStailcalseq_beg
$apy0 = $tmp3;
$apy1 = $arg2;
$apy2 = $tmp4;
$arg0 = $apy0;
$arg1 = $apy1;
$arg2 = $apy2;
goto __patsflab_loop_1;
// ATStailcalseq_end
} else {
$tmpret1 = $arg1;
} // endif
return $tmpret1;
} // end-of-function
/* ****** ****** */
/* end-of-compilation-unit */
?>
I also wrote a code generator from ATS to PHP:
https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/ATS-parse-emit/PHP
Compared to the code generators for Python and JavaScript, the one for PHP is much simpler. If you
are interested in writing a code generator from ATS to some language X, I recommend that you study
this one first.
--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/e2e02e43-85de-4f20-a9bb-64a781e16e2a%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/CAJ7XQb6YOPLo19%2B4HToA0fPYUw9ZYJQ%2BCcD_tkFRuWjXW2BXAA%40mail.gmail.com.