Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
mtardy a1bc3ba26b Add default error case in switch(getType()) to remove warnings of enumeration values not handled in switch il y a 4 ans
drafts Modify drafts and tests il y a 4 ans
tests Add Objects with prototypes il y a 4 ans
.dockerignore Add Dockerfile and instructions to build with Docker il y a 4 ans
.gitignore Add Objects with prototypes il y a 4 ans
Dockerfile Update README and Dockerfile il y a 4 ans
LICENSE.txt Add MIT License il y a 4 ans
Makefile Add floats (#22) il y a 4 ans
README.md Update README and Dockerfile il y a 4 ans
TODO.txt Add tests and update todo il y a 4 ans
bench-fib.txt Add the usual two micro-bencharks (nfibs and prime sieve) il y a 4 ans
bench-sieve.txt Add the usual two micro-bencharks (nfibs and prime sieve) il y a 4 ans
bootstrap.txt add allKeys, allValues; add @@ syntax to unquote and splice an array into a list of arguments or parameters il y a 4 ans
buffer.h Add printOn function and fix readEvalPrint with imports il y a 4 ans
calc.leg Fix symbol table il y a 4 ans
object.c Fix indentation issues il y a 4 ans
parse.leg Add default error case in switch(getType()) to remove warnings of enumeration values not handled in switch il y a 4 ans
test-error.txt Fix relations to compare more than just integers, fix semicolons to end il y a 4 ans
test-float.txt Add floats (#22) il y a 4 ans
test-incdec.txt Add tests for incdec and object instanciation il y a 4 ans
test-module.txt Add slice '[n:m]' for strings and array-like maps il y a 4 ans
test-namespace.txt Fix relations to compare more than just integers, fix semicolons to end il y a 4 ans
test-object.txt add allKeys, allValues; add @@ syntax to unquote and splice an array into a list of arguments or parameters il y a 4 ans
test-proto.txt Add nice format for runtime errors (#12) il y a 4 ans
test-require.txt Add slice '[n:m]' for strings and array-like maps il y a 4 ans
test-runtime-error.txt Fix try catch mechanism and runtimeError with mrAST il y a 4 ans
test-slice.txt Correctly add slice '[n:m]' for strings and array-like maps il y a 4 ans
test-splice.txt add argument splicing (aka unpacking, aka splatting); add test-splice.txt to test argument splicing il y a 4 ans
test-strings.txt Add '*' operator for string multiplication il y a 4 ans
test-switch.txt Add test-switch.txt il y a 4 ans
test-syntax.txt Add test-syntax.txt il y a 4 ans
test-throw.txt Fix try catch mechanism and runtimeError with mrAST il y a 4 ans
test-try-catch.txt Fix try catch mechanism and runtimeError with mrAST il y a 4 ans
test.txt Update test files il y a 4 ans
test1.txt Optimizing integers il y a 4 ans
test2.txt Modify drafts and tests il y a 4 ans

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 -