How to port?

(I feel like I’ve asked this before so apologies if somebody already
did and I’m being really thick and unable to find the answer via web
searching.)

If I wanted to port ATS to generate some other language as output, is
there a guide to doing that? I could try to divine it from how the
other backends are today, but it would probably be nice for posterity
to have a document about the overall general way to approach it in
steps.

thanks!

No. Fallthrough is not needed.On Monday, May 18, 2015 at 10:38:34 AM UTC-4, Brandon Barker wrote:

Is the requirement that switch-like statements support fallthrough a
big part of this delineation?

On Fri, Dec 19, 2014 at 8:56 PM, gmhwxi <gmh...@gmail.com <javascript:>> wrote:

There isn’t really any formal documentation at this point. Just code.

First clone the following directory:

https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/ATS-parse-emit

Say you want atscc2XYZ for a language called XYZ.

Create a directory of the name XYZ (or any other name you like) and some
symbolic links:

mkdir XYZ
cd XYZ
ln -s …/*.?ats .

Now you can study atscc2py, atscc2js and atscc2php.

  1. atscc2py is the hardest as
    it does not support (1) goto labels or (2) switch statements
  2. atscc2php is the easiest as it supports both (1) and (2)
  3. atscc2js is in the middle: it suports (2) but not (1)

It is a bit unfortunate that atscc2lua seems to need to take the
atscc2py route as Lua does not support either (1) or (2).

On Wednesday, December 17, 2014 7:07:04 PM UTC-5, Raoul Duke wrote:

(I feel like I’ve asked this before so apologies if somebody already
did and I’m being really thick and unable to find the answer via web
searching.)

If I wanted to port ATS to generate some other language as output, is
there a guide to doing that? I could try to divine it from how the
other backends are today, but it would probably be nice for posterity
to have a document about the overall general way to approach it in
steps.

thanks!


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...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
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/f2570e61-c318-4240-b57d-9d99ab4c9007%40googlegroups.com.


Brandon Barker
brand...@gmail.com <javascript:>

Is the requirement that switch-like statements support fallthrough a
big part of this delineation?On Fri, Dec 19, 2014 at 8:56 PM, gmhwxi gmh...@gmail.com wrote:

There isn’t really any formal documentation at this point. Just code.

First clone the following directory:

https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/ATS-parse-emit

Say you want atscc2XYZ for a language called XYZ.

Create a directory of the name XYZ (or any other name you like) and some
symbolic links:

mkdir XYZ
cd XYZ
ln -s …/*.?ats .

Now you can study atscc2py, atscc2js and atscc2php.

  1. atscc2py is the hardest as
    it does not support (1) goto labels or (2) switch statements
  2. atscc2php is the easiest as it supports both (1) and (2)
  3. atscc2js is in the middle: it suports (2) but not (1)

It is a bit unfortunate that atscc2lua seems to need to take the
atscc2py route as Lua does not support either (1) or (2).

On Wednesday, December 17, 2014 7:07:04 PM UTC-5, Raoul Duke wrote:

(I feel like I’ve asked this before so apologies if somebody already
did and I’m being really thick and unable to find the answer via web
searching.)

If I wanted to port ATS to generate some other language as output, is
there a guide to doing that? I could try to divine it from how the
other backends are today, but it would probably be nice for posterity
to have a document about the overall general way to approach it in
steps.

thanks!


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/f2570e61-c318-4240-b57d-9d99ab4c9007%40googlegroups.com.

Brandon Barker
brandon...@gmail.com

There isn’t really any formal documentation at this point. Just code.

First clone the following directory:

https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/ATS-parse-emit

Say you want atscc2XYZ for a language called XYZ.

Create a directory of the name XYZ (or any other name you like) and some
symbolic links:

mkdir XYZ
cd XYZ
ln -s …/*.?ats .

Now you can study atscc2py, atscc2js and atscc2php.

  1. atscc2py is the hardest as
    it does not support (1) goto labels or (2) switch statements
  2. atscc2php is the easiest as it supports both (1) and (2)
  3. atscc2js is in the middle: it suports (2) but not (1)

It is a bit unfortunate that atscc2lua seems to need to take the
atscc2py route as Lua does not support either (1) or (2).On Wednesday, December 17, 2014 7:07:04 PM UTC-5, Raoul Duke wrote:

(I feel like I’ve asked this before so apologies if somebody already
did and I’m being really thick and unable to find the answer via web
searching.)

If I wanted to port ATS to generate some other language as output, is
there a guide to doing that? I could try to divine it from how the
other backends are today, but it would probably be nice for posterity
to have a document about the overall general way to approach it in
steps.

thanks!

thanks!