Syntax-hilighting for ATS code in docbook

With the help of the atexting tool, I managed to syntax-hilight the ATS
code in docbook.
I had wanted to do this for so long :slight_smile:

For instance, please take a look at this book chapter:

http://ats-lang.sourceforge.net/DOCUMENT/ATS2TUTORIAL/HTML/HTMLTOC/c359.html

The texting functions for syntax-hilighting are sats2xhtml and dats2xhtml:

https://github.com/githwxi/ATS-Postiats/tree/master/doc/BOOK/ATS2TUTORIAL/ATEXT/myatexting.dats

Cheers!

You need to have config.h available at ${ATSHOME} (not ${PATSHOME)).On Sat, May 7, 2016 at 1:01 AM, Kiwamu Okabe kiw...@debian.or.jp wrote:

On Sat, May 7, 2016 at 1:50 PM, gmhwxi gmh...@gmail.com wrote:

You need now to execute

‘make synhilit’

to syntax-hilight the ATS code in the book.

Do you mean following commands?

$ pwd
/home/kiwamu/src/ATS-Postiats/doc/BOOK/INT2PROGINATS
$ make
$ make -C ATEXT
$ make -C HTML synhilit

However I catch following error…

$ pwd
/home/kiwamu/src/ATS-Postiats/doc/BOOK/INT2PROGINATS
$ make -C ATEXT
make: Entering directory
'/home/kiwamu/src/ATS-Postiats/doc/BOOK/INT2PROGINATS/ATEXT'
\
/home/kiwamu/src/ATS-Postiats/bin/patscc -O2 -o bin/myatexting \
  -D_ATS_GCBDW \
  -DATS_MEMALLOC_GCBDW \
  myatexting.dats
/home/kiwamu/src/ATS-Postiats/utils/atexting/atexting_mylib.dats \
  /home/kiwamu/src/ats-lang-anairiats-0.2.12/ccomp/runtime/ats_prelude.c
-L/home/kiwamu/src/ats-lang-anairiats-0.2.12/ccomp/lib
-L/home/kiwamu/src/ats-lang-anairiats-0.2.12/ccomp/lib64 -latsynmark
-latsopt -lats -lgmp -lgc

/home/kiwamu/src/ats-lang-anairiats-0.2.12/ccomp/runtime/ats_prelude.c:36:20:
fatal error: config.h: No such file or directory
compilation terminated.

It needs running “configure” at top directory?
But I catch more fail at “configure”.

$ pwd
/home/kiwamu/src/ATS-Postiats
$ autoreconf
$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
configure: error: cannot find install-sh, install.sh, or shtool in "."
"./.." "./../.."

Best regards,

Kiwamu Okabe at METASEPI DESIGN


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 https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/CAEvX6dkktAO3O52NufAxVgCnD2963NKR5-Gg4VAGZx%2BO%3DqB1rA%40mail.gmail.com
.

FYI.

All the ATS code in INT2PROGINATS is now syntax-hilited:

http://ats-lang.sourceforge.net/DOCUMENT/INT2PROGINATS/HTML/HTMLTOC/book1.htmlOn Wednesday, February 24, 2016 at 9:35:32 AM UTC-5, gmhwxi wrote:

FYI.

All the ATS code in ATS2TUTORIAL is now syntax-hilited:

A Tutorial on Programming Features in ATS

On Wednesday, February 24, 2016 at 2:38:59 AM UTC-5, gmhwxi wrote:

With the help of the atexting tool, I managed to syntax-hilight the ATS
code in docbook.
I had wanted to do this for so long :slight_smile:

For instance, please take a look at this book chapter:

Datatypes

The texting functions for syntax-hilighting are sats2xhtml and dats2xhtml:

https://github.com/githwxi/ATS-Postiats/tree/master/doc/BOOK/ATS2TUTORIAL/ATEXT/myatexting.dats

Cheers!

You are almost there.

cd ${PATSHOME}/utils/libatsopt

make

cd ${PATSHOME}/utlls/libatsynmark

make

After building libatsopt and libatsynmark, you can move them to
${ATSHOME}/ccomp/lib

Then it should work.On Sat, May 7, 2016 at 9:08 AM, Kiwamu Okabe kiw...@debian.or.jp wrote:

On Sat, May 7, 2016 at 10:02 PM, Hongwei Xi gmh...@gmail.com wrote:

Try

cp ${ATSHOME}/config.h ${PATSHOME}/.

$ pwd
/home/kiwamu/src/ATS-Postiats/doc/BOOK/INT2PROGINATS
$ cp ${ATSHOME}/config.h ${PATSHOME}/
$ make -C ATEXT
make: Entering directory
'/home/kiwamu/src/ATS-Postiats/doc/BOOK/INT2PROGINATS/ATEXT'
\
/home/kiwamu/src/ATS-Postiats/bin/patscc -O2 -o bin/myatexting \
  -D_ATS_GCBDW \
  -DATS_MEMALLOC_GCBDW \
  myatexting.dats
/home/kiwamu/src/ATS-Postiats/utils/atexting/atexting_mylib.dats \
  /home/kiwamu/src/ats-lang-anairiats-0.2.12/ccomp/runtime/ats_prelude.c
-L/home/kiwamu/src/ats-lang-anairiats-0.2.12/ccomp/lib
-L/home/kiwamu/src/ats-lang-anairiats-0.2.12/ccomp/lib64 -latsynmark
-latsopt -lats -lgmp -lgc
/usr/bin/ld: cannot find -latsynmark
/usr/bin/ld: cannot find -latsopt
collect2: error: ld returned 1 exit status
Makefile:33: recipe for target 'myatexting' failed

The libatsynmark and libatsopt come from ATS1?

Best regards,l

Kiwamu Okabe at METASEPI DESIGN


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 https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/CAEvX6dndgC02e3_aq45ofS6_TYFZf6sADm6%2BJC0-xDA1O0BLxA%40mail.gmail.com
.

Try

cp ${ATSHOME}/config.h ${PATSHOME}/.On Sat, May 7, 2016 at 8:46 AM, Kiwamu Okabe kiw...@debian.or.jp wrote:

On Sat, May 7, 2016 at 9:33 PM, Hongwei Xi gmh...@gmail.com wrote:

You need to have config.h available at ${ATSHOME} (not ${PATSHOME)).

Umm… I have it at ${ATSHOME}…

$ pwd
/home/kiwamu/src/ATS-Postiats/doc/BOOK/INT2PROGINATS
$ make -C ATEXT
make: Entering directory
'/home/kiwamu/src/ATS-Postiats/doc/BOOK/INT2PROGINATS/ATEXT'
\
/home/kiwamu/src/ATS-Postiats/bin/patscc -O2 -o bin/myatexting \
  -D_ATS_GCBDW \
  -DATS_MEMALLOC_GCBDW \
  myatexting.dats
/home/kiwamu/src/ATS-Postiats/utils/atexting/atexting_mylib.dats \
  /home/kiwamu/src/ats-lang-anairiats-0.2.12/ccomp/runtime/ats_prelude.c
-L/home/kiwamu/src/ats-lang-anairiats-0.2.12/ccomp/lib
-L/home/kiwamu/src/ats-lang-anairiats-0.2.12/ccomp/lib64 -latsynmark
-latsopt -lats -lgmp -lgc

/home/kiwamu/src/ats-lang-anairiats-0.2.12/ccomp/runtime/ats_prelude.c:36:20:
fatal error: config.h: No such file or directory
compilation terminated.
Makefile:33: recipe for target 'myatexting' failed
make: *** [myatexting] Error 1
make: Leaving directory
'/home/kiwamu/src/ATS-Postiats/doc/BOOK/INT2PROGINATS/ATEXT'
$ file $ATSHOME/config.h
/home/kiwamu/src/ats-lang-anairiats-0.2.12/config.h: ASCII text

Best regards,

Kiwamu Okabe at METASEPI DESIGN


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 https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/CAEvX6dkxDE_6E4xE-%3DLyQnOrhTjVWvzi-iOEiZH7o03UuNUegw%40mail.gmail.com
.

FYI.

All the ATS code in ATS2TUTORIAL is now syntax-hilited:

http://ats-lang.sourceforge.net/DOCUMENT/ATS2TUTORIAL/HTML/HTMLTOC/book1.htmlOn Wednesday, February 24, 2016 at 2:38:59 AM UTC-5, gmhwxi wrote:

With the help of the atexting tool, I managed to syntax-hilight the ATS
code in docbook.
I had wanted to do this for so long :slight_smile:

For instance, please take a look at this book chapter:

Datatypes

The texting functions for syntax-hilighting are sats2xhtml and dats2xhtml:

https://github.com/githwxi/ATS-Postiats/tree/master/doc/BOOK/ATS2TUTORIAL/ATEXT/myatexting.dats

Cheers!

You need now to execute

‘make synhilit’

to syntax-hilight the ATS code in the book.On Wednesday, February 24, 2016 at 2:38:59 AM UTC-5, gmhwxi wrote:

With the help of the atexting tool, I managed to syntax-hilight the ATS
code in docbook.
I had wanted to do this for so long :slight_smile:

For instance, please take a look at this book chapter:

Datatypes

The texting functions for syntax-hilighting are sats2xhtml and dats2xhtml:

https://github.com/githwxi/ATS-Postiats/tree/master/doc/BOOK/ATS2TUTORIAL/ATEXT/myatexting.dats

Cheers!

Please take a look at the following script to see how libatsopt can be
built:

https://github.com/ats-lang/ats-lang.github.io/blob/master/SCRIPT/C9-ATS2-install-latest.shOn Sat, May 7, 2016 at 9:23 AM, Kiwamu Okabe kiw...@debian.or.jp wrote:

On Sat, May 7, 2016 at 10:17 PM, Hongwei Xi gmh...@gmail.com wrote:

You are almost there.

cd ${PATSHOME}/utils/libatsopt

make

cd ${PATSHOME}/utlls/libatsynmark

make

After building libatsopt and libatsynmark, you can move them to
${ATSHOME}/ccomp/lib

Then it should work.

$ cd ${PATSHOME}/utils/libatsopt
$ make
--snip--
gcc -O2 -I. -I./ccomp/runtime -c -o pats_ccomp_emit3_dats.o
pats_ccomp_emit3_dats.c
gcc -O2 -I. -I./ccomp/runtime -c -o pats_ccomp_main_dats.o
pats_ccomp_main_dats.c
gcc -O2 -I. -I./ccomp/runtime -c -o pats_comarg_dats.o pats_comarg_dats.c
make[1]: *** No rule to make target 'prelude_basics_sta_sats.o',
needed by 'prelude_libats.o'.  Stop.
make[1]: Leaving directory '/home/kiwamu/src/ATS-Postiats/src/CBOOT'
Makefile:29: recipe for target 'libatsopt' failed


Kiwamu Okabe at METASEPI DESIGN


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 https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/CAEvX6dk25doAq0WU1fEdtgSpCWhTp3_%3D-sKKzxd6q4H6v2M5MQ%40mail.gmail.com
.

I modified that script a bit. You can now use it to build libatsopt and
libatsynmark.On Saturday, May 7, 2016 at 9:31:48 AM UTC-4, gmhwxi wrote:

Please take a look at the following script to see how libatsopt can be
built:

https://github.com/ats-lang/ats-lang.github.io/blob/master/SCRIPT/C9-ATS2-install-latest.sh

On Sat, May 7, 2016 at 9:23 AM, Kiwamu Okabe wrote:

On Sat, May 7, 2016 at 10:17 PM, Hongwei Xi wrote:

You are almost there.

cd ${PATSHOME}/utils/libatsopt

make

cd ${PATSHOME}/utlls/libatsynmark

make

After building libatsopt and libatsynmark, you can move them to
${ATSHOME}/ccomp/lib

Then it should work.

$ cd ${PATSHOME}/utils/libatsopt
$ make
--snip--
gcc -O2 -I. -I./ccomp/runtime -c -o pats_ccomp_emit3_dats.o
pats_ccomp_emit3_dats.c
gcc -O2 -I. -I./ccomp/runtime -c -o pats_ccomp_main_dats.o
pats_ccomp_main_dats.c
gcc -O2 -I. -I./ccomp/runtime -c -o pats_comarg_dats.o pats_comarg_dats.c
make[1]: *** No rule to make target 'prelude_basics_sta_sats.o',
needed by 'prelude_libats.o'.  Stop.
make[1]: Leaving directory '/home/kiwamu/src/ATS-Postiats/src/CBOOT'
Makefile:29: recipe for target 'libatsopt' failed


Kiwamu Okabe at METASEPI DESIGN


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 https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/CAEvX6dk25doAq0WU1fEdtgSpCWhTp3_%3D-sKKzxd6q4H6v2M5MQ%40mail.gmail.com
.