Skip to content

Commit

Permalink
Merge pull request kanaka#497 from alimpfard/xslt
Browse files Browse the repository at this point in the history
XSLT impl
  • Loading branch information
kanaka authored Jun 1, 2020
2 parents 6fe3a6f + 607742f commit 73a159a
Show file tree
Hide file tree
Showing 33 changed files with 8,159 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ matrix:
- {env: IMPL=wasm wasm_MODE=warpy NO_SELF_HOST_PERF=1, services: [docker]}
- {env: IMPL=wasm wasm_MODE=wace_libc NO_SELF_HOST_PERF=1, services: [docker]}
- {env: IMPL=wren, services: [docker]}
- {env: IMPL=xslt, services: [docker]}
- {env: IMPL=yorick, services: [docker]}
- {env: IMPL=zig, services: [docker]}

Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ IMPLS = ada ada.2 awk bash basic bbc-basic c chuck clojure coffee common-lisp cp
guile haskell haxe hy io java js jq julia kotlin livescript logo lua make mal \
matlab miniMAL nasm nim objc objpascal ocaml perl perl6 php picolisp pike plpgsql \
plsql powershell ps python python.2 r racket rexx rpython ruby rust scala scheme skew \
swift swift3 swift4 swift5 tcl ts vala vb vhdl vimscript wasm wren yorick zig
swift swift3 swift4 swift5 tcl ts vala vb vhdl vimscript wasm wren yorick xslt zig

EXTENSION = .mal

Expand Down Expand Up @@ -135,6 +135,7 @@ step5_EXCLUDES += plpgsql # too slow for 10,000
step5_EXCLUDES += plsql # too slow for 10,000
step5_EXCLUDES += powershell # too slow for 10,000
step5_EXCLUDES += $(if $(filter cpp,$(haxe_MODE)),haxe,) # cpp finishes 10,000, segfaults at 100,000
step5_EXCLUDES += xslt # iteration cannot be expressed

dist_EXCLUDES += mal
# TODO: still need to implement dist
Expand All @@ -157,6 +158,7 @@ mal_TEST_OPTS = --start-timeout 60 --test-timeout 180
else ifeq ($(MAL_IMPL),powershell)
mal_TEST_OPTS = --start-timeout 60 --test-timeout 180
endif
xslt_TEST_OPTS = --test-timeout 120


#
Expand Down Expand Up @@ -266,6 +268,7 @@ vimscript_STEP_TO_PROG = impls/vimscript/$($(1)).vim
wasm_STEP_TO_PROG = impls/wasm/$($(1)).$(if $(filter lucet,$(wasm_MODE)),so,wasm)
wren_STEP_TO_PROG = impls/wren/$($(1)).wren
yorick_STEP_TO_PROG = impls/yorick/$($(1)).i
xslt_STEP_TO_PROG = impls/xslt/$($(1))
zig_STEP_TO_PROG = impls/zig/$($(1))

#
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ guide](process/guide.md) there is also a [mal/make-a-lisp
FAQ](docs/FAQ.md) where I attempt to answer some common questions.


**3. Mal is implemented in 81 languages (84 different implementations and 104 runtime modes)**
**3. Mal is implemented in 82 languages (85 different implementations and 105 runtime modes)**

| Language | Creator |
| -------- | ------- |
Expand Down Expand Up @@ -127,6 +127,7 @@ FAQ](docs/FAQ.md) where I attempt to answer some common questions.
| [Visual Basic.NET](#visual-basicnet) | [Joel Martin](https://github.com/kanaka) |
| [WebAssembly](#webassembly-wasm) (wasm) | [Joel Martin](https://github.com/kanaka) |
| [Wren](#wren) | [Dov Murik](https://github.com/dubek) |
| [XSLT](#xslt) | [Ali MohammadPur](https://github.com/alimpfard) |
| [Yorick](#yorick) | [Dov Murik](https://github.com/dubek) |
| [Zig](#zig) | [Josh Tobin](https://github.com/rjtobin) |

Expand Down Expand Up @@ -1144,6 +1145,15 @@ make wasm_MODE=warpy
warpy --argv --memory-pages 256 ./stepX_YYY.wasm
```

### XSLT

The XSLT implementation of mal is written with XSLT 3 and tested on Saxon 9.9.1.6 Home Edition.

```
cd impls/xslt
STEP=stepX_YY ./run
```

### Wren

The Wren implementation of mal was tested on Wren 0.2.0.
Expand Down
33 changes: 33 additions & 0 deletions impls/xslt/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ubuntu:bionic
MAINTAINER Joel Martin <[email protected]>

##########################################################
# General requirements for testing or common across many
# implementations
##########################################################

RUN apt-get -y update

# Required for running tests
RUN apt-get -y install make python

# Some typical implementation and test requirements
RUN apt-get -y install curl libreadline-dev libedit-dev libpcre3-dev

RUN mkdir -p /mal
WORKDIR /mal

#########################################################
# Specific implementation requirements
#########################################################

RUN apt-get -y install python3.8 openjdk-8-jre
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.8 10

RUN curl https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/9.9.1-6/Saxon-HE-9.9.1-6.jar -O

RUN mv Saxon-HE-9.9.1-6.jar /bin/Saxon-HE-9.9.1-6.jar

RUN echo -n "#!/bin/sh\njava -Xmx2G -cp /bin/Saxon-HE-9.9.1-6.jar net.sf.saxon.Transform \"\$@\"" > /usr/bin/saxon && chmod +x /usr/bin/saxon


7 changes: 7 additions & 0 deletions impls/xslt/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DEFAULT:
echo

.PHONY: clean

all:
echo "hello there general kenobi"
Loading

0 comments on commit 73a159a

Please sign in to comment.