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.
ATS is first compiled into a simple subset of C. Then it is just a matter
of interpreting this subset in PHP.
By the way, not all of ATS can be compiled this way. So far, what is
supported includes the functional core
(datatypes + higher-order functions) plus templates.On Sat, Sep 27, 2014 at 10:24 PM, ‘Yannick Duchêne’ via ats-lang-users < ats-lan...@googlegroups.com> wrote:
Le vendredi 29 août 2014 05:39:57 UTC+2, gmhwxi a écrit :
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.
Please, how do code generation take care of the target language semantic?
Is this based on reasonably safe and predictable subset or average
assumptions? (I mean in the general case, not specifically PHP).
ATS is first compiled into a simple subset of C. Then it is just a matter of
interpreting this subset in PHP. By the way, not all of ATS can be compiled this way.
So, there are also other “kernels” that could be targeted, to give
more/other portability to ATS.
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.
Please, how do code generation take care of the target language semantic?
Is this based on reasonably safe and predictable subset or average
assumptions? (I mean in the general case, not specifically 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.
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.
Indeed. However, this should probably be done by someone who wants to use
such a code generator.
I did atscc2js and atscc2php because I wanted to use them to add some
dynamic
content to the ATS webpage.On Mon, Sep 29, 2014 at 2:21 AM, Raoul Duke rao...@gmail.com wrote:
ATS is first compiled into a simple subset of C. Then it is just a
matter of
interpreting this subset in PHP. By the way, not all of ATS can be
compiled this way.
So, there are also other “kernels” that could be targeted, to give
more/other portability to ATS.