From c7645d65831de312689516f39f81224358db5ee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Thu, 26 Jan 2017 16:12:41 +0100 Subject: [PATCH] Readme update --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 058080a..de1bbf5 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ The following dependencies will be automatically downloaded with git while build * [mstch](https://github.com/no1msd/mstch) * [optparse](https://github.com/myint/optparse) +* Lexesis ## Building Get your terminal in the source tree and run the following commands: @@ -63,6 +64,14 @@ The output should be located in `build/doc`, with the main *html* page in `build ### Running tests +To run the unit tests: simply run `make test` +To run the tests for the generated parser: build the examples and run `python3 ./run_tests.py` in the project root + +### Building examples + +To build the examples: after running `make install`, run `cmake . && make examples` +You will now find the examples built in the *example* subdirectory of the build folder + ## Getting started Now that Parsodus is successfully built and your terminal is in the `build` folder, it's time to generate the parser based on your input file. @@ -99,15 +108,13 @@ Conventionally, terminals are all caps, while variables are lowercase. ### Using the parser -Of course, how you use the generated lexer highly depends on which backend you used to generate it. For the default c++ backend however, the easiest way of getting to know the parser is probably having a look at the class definition in the generated header file, usually named *<Parsername>.h*. +Of course, how you use the generated parser highly depends on which backend you used to generate it. For the default c++ backend however, the easiest way of getting to know the parser is probably having a look at the class definition in the generated header file, usually named *<Parsername>.h*. In general, there should be some way to run the parser, along with user defined actions, and get back the generated structure or abstract syntax tree. ## More examples More examples can be found in the *examples* subdirectory, go ahead an have a look at them. Feel free to play around and experiment with them. -## Tested with - ## Authors * Thomas Avé * Robin Jadoul