Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
mtardy 2837e6fede Fix runtime error backtrace printing for function call há 4 anos
drafts Modify drafts and tests há 4 anos
tests Add Objects with prototypes há 4 anos
.dockerignore Add Dockerfile and instructions to build with Docker há 4 anos
.gitignore Add Objects with prototypes há 4 anos
Dockerfile Update README and Dockerfile há 4 anos
Makefile Clean Makefile há 4 anos
README.md Update README and Dockerfile há 4 anos
TODO.txt Add tests and update todo há 4 anos
bootstrap.txt Fix circular printing, comparison and pass scope to primitives há 4 anos
buffer.h Add printOn function and fix readEvalPrint with imports há 4 anos
calc.leg Fix symbol table há 4 anos
object.c Fix circular printing, comparison and pass scope to primitives há 4 anos
parse.leg Fix runtime error backtrace printing for function call há 4 anos
test-incdec.txt Add tests for incdec and object instanciation há 4 anos
test-module.txt Fix circular printing, comparison and pass scope to primitives há 4 anos
test-object.txt Update tests há 4 anos
test-proto.txt Add nice format for runtime errors (#12) há 4 anos
test-require.txt Fix circular printing, comparison and pass scope to primitives há 4 anos
test-runtime-error.txt Fix try catch mechanism and runtimeError with mrAST há 4 anos
test-strings.txt Add '*' operator for string multiplication há 4 anos
test-throw.txt Fix try catch mechanism and runtimeError with mrAST há 4 anos
test-try-catch.txt Fix try catch mechanism and runtimeError with mrAST há 4 anos
test.txt Update test files há 4 anos
test1.txt Optimizing integers há 4 anos
test2.txt Modify drafts and tests há 4 anos

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 -