Readme update

This commit is contained in:
Thomas Avé 2017-01-26 16:12:41 +01:00
parent cf689e64b1
commit c7645d6583
1 changed files with 10 additions and 3 deletions

View File

@ -42,6 +42,7 @@ The following dependencies will be automatically downloaded with git while build
* [mstch](https://github.com/no1msd/mstch) * [mstch](https://github.com/no1msd/mstch)
* [optparse](https://github.com/myint/optparse) * [optparse](https://github.com/myint/optparse)
* Lexesis
## Building ## Building
Get your terminal in the source tree and run the following commands: 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 ### 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 ## 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. 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 ### 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. 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
More examples can be found in the *examples* subdirectory, go ahead an have a look at them. 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. Feel free to play around and experiment with them.
## Tested with
## Authors ## Authors
* Thomas Avé * Thomas Avé
* Robin Jadoul * Robin Jadoul