AST
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
Ian Piumarta 49dda1f2c4 realistic prep for standalone mode; import should work again před 2 roky
drafts Modify drafts and tests před 4 roky
tests Add Objects with prototypes před 4 roky
.dockerignore Add Dockerfile and instructions to build with Docker před 4 roky
.gitignore Add Objects with prototypes před 4 roky
Dockerfile Update README and Dockerfile před 4 roky
LICENSE.txt Add MIT License před 4 roky
Makefile Add floats (#22) před 4 roky
README.md Update README and Dockerfile před 4 roky
TODO.txt Add tests and update todo před 4 roky
bench-fib.txt Add the usual two micro-bencharks (nfibs and prime sieve) před 4 roky
bench-sieve.txt Add the usual two micro-bencharks (nfibs and prime sieve) před 4 roky
bootstrap.txt add allKeys, allValues; add @@ syntax to unquote and splice an array into a list of arguments or parameters před 4 roky
buffer.h Add printOn function and fix readEvalPrint with imports před 4 roky
calc.leg Fix symbol table před 4 roky
object.c add getFloat() před 2 roky
parse.leg realistic prep for standalone mode; import should work again před 2 roky
test-error.txt Fix relations to compare more than just integers, fix semicolons to end před 4 roky
test-float.txt Add floats (#22) před 4 roky
test-incdec.txt Add tests for incdec and object instanciation před 4 roky
test-module.txt Add slice '[n:m]' for strings and array-like maps před 4 roky
test-namespace.txt Fix relations to compare more than just integers, fix semicolons to end před 4 roky
test-object.txt add allKeys, allValues; add @@ syntax to unquote and splice an array into a list of arguments or parameters před 4 roky
test-proto.txt Add nice format for runtime errors (#12) před 4 roky
test-require.txt Add slice '[n:m]' for strings and array-like maps před 4 roky
test-runtime-error.txt Fix try catch mechanism and runtimeError with mrAST před 4 roky
test-slice.txt Correctly add slice '[n:m]' for strings and array-like maps před 4 roky
test-splice.txt add argument splicing (aka unpacking, aka splatting); add test-splice.txt to test argument splicing před 4 roky
test-strings.txt Add '*' operator for string multiplication před 4 roky
test-switch.txt Add test-switch.txt před 4 roky
test-syntax.txt Add test-syntax.txt před 4 roky
test-throw.txt Fix try catch mechanism and runtimeError with mrAST před 4 roky
test-try-catch.txt Fix try catch mechanism and runtimeError with mrAST před 4 roky
test.txt Update test files před 4 roky
test1.txt Optimizing integers před 4 roky
test2.txt Modify drafts and tests před 4 roky

README.md

Sandbox

Build the project

Requirements

Please install peg/leg manually or with a package manager, for example with Homebrew:

$ brew install peg

Please install the Boehm-Demers-Weiser conservative garbage collector manually or with a package manager, for example with Homebrew:

$ brew install bdw-gc

Build

$ make

Build with Docker

The Docker image provides a ready to go environment to experiment with the project. Just build the image locally and run an interactive shell inside the container:

$ docker build . --tag mtardy/sandbox
$ docker run -it mtardy/sandbox

Usage

Single input

You can pass your program:

  • via the standard input
$ echo "a=2+3 a*2" | ./parse
$ ./parse < file
  • via a file
$ ./parse file

Multiple inputs

You can also pass multiple files and use - in any order as the standard input when mixing files and standard input, for example:

$ ./parse file1 - file2 < file3
$ echo "a=2+3 a*2" | ./parse file1 file2 -