Skip to content

Commit

Permalink
Yorick implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
dubek committed Sep 22, 2017
1 parent ccab8f5 commit 2198673
Show file tree
Hide file tree
Showing 21 changed files with 2,685 additions and 1 deletion.
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
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 2198673

Please sign in to comment.