Skip to content

Commit

Permalink
Merge pull request kanaka#288 from dubek/yorick
Browse files Browse the repository at this point in the history
Yorick implementation
  • Loading branch information
kanaka authored Sep 25, 2017
2 parents ccab8f5 + 33f404a commit 77968ca
Show file tree
Hide file tree
Showing 24 changed files with 2,752 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ matrix:
- {env: IMPL=vb, services: [docker]}
- {env: IMPL=vhdl, services: [docker]}
- {env: IMPL=vimscript, services: [docker]}
- {env: IMPL=yorick, services: [docker]}

script:
# Build
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ IMPLS = ada awk bash basic c d chuck clojure coffee common-lisp cpp crystal cs d
haxe hy io java julia js kotlin logo lua make mal ocaml matlab miniMAL \
nim objc objpascal perl perl6 php pil plpgsql plsql powershell ps \
python r racket rexx rpython ruby rust scala scheme skew swift swift3 tcl \
ts vb vhdl vimscript livescript elm
ts vb vhdl vimscript yorick livescript elm

EXTENSION = .mal

Expand Down Expand Up @@ -238,6 +238,7 @@ ts_STEP_TO_PROG = ts/$($(1)).js
vb_STEP_TO_PROG = vb/$($(1)).exe
vhdl_STEP_TO_PROG = vhdl/$($(1))
vimscript_STEP_TO_PROG = vimscript/$($(1)).vim
yorick_STEP_TO_PROG = yorick/$($(1)).i
guile_STEP_TO_PROG = guile/$($(1)).scm
livescript_STEP_TO_PROG = livescript/$($(1)).js
elm_STEP_TO_PROG = elm/$($(1)).js
Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Mal is a Clojure inspired Lisp interpreter.

Mal is implemented in 70 languages:
Mal is implemented in 71 languages:

* Ada
* GNU awk
Expand Down Expand Up @@ -78,6 +78,7 @@ Mal is implemented in 70 languages:
* VHDL
* Vimscript
* Visual Basic.NET
* Yorick


Mal is a learning tool. See the [make-a-lisp process
Expand Down Expand Up @@ -1006,6 +1007,17 @@ make
mono ./stepX_YYY.exe
```

### Yorick

*The Yorick implementation was created by [Dov Murik](https://github.com/dubek)*

The Yorick implementation of mal was tested on Yorick 2.2.04.

```
cd yorick
yorick -batch ./stepX_YYY.i
```



## Running tests
Expand Down
26 changes: 26 additions & 0 deletions yorick/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM ubuntu:xenial
MAINTAINER Joel Martin <github@martintribe.org>

##########################################################
# 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

RUN mkdir -p /mal
WORKDIR /mal

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

RUN apt-get -y install yorick yorick-yeti yorick-yeti-regex

ENV HOME /mal
24 changes: 24 additions & 0 deletions yorick/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
SOURCES_BASE = hash.i types.i reader.i printer.i
SOURCES_LISP = env.i core.i stepA_mal.i
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)

.PHONY: all dist clean stats stats-lisp

all: dist

dist: mal

mal: $(SOURCES)
echo "#!/usr/bin/yorick -batch" > $@
cat $+ | grep -v "^require," >> $@
chmod +x $@

clean:
rm -f mal

stats: $(SOURCES)
@wc $^
@printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*//|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
stats-lisp: $(SOURCES_LISP)
@wc $^
@printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*//|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
Loading

0 comments on commit 77968ca

Please sign in to comment.