Skip to content

Parser generator for languages with grammar given by arbitrary sequences of tokens

License

Notifications You must be signed in to change notification settings

1mchlkrpch/Rebecca

Repository files navigation

Generator of parser

That is simple tool to generate parser for arbitrary grammar defined as sequences of tokens.

Try out first example

Let's make AST for file examples/function.rbc.

  1. Clone the project:
git clone git@github.com:mchlkrpch/Rebecca.git
cd Rebecca
  1. Generate parser's and tokenizer's files from file include/function.rbc; this file defines grammar of language by YACC-similar-rules
make init
cd build
cmake ..
make
./rbc ../include/function.rbc
  1. Parse the program.
cd ../out
make init
cd build
cmake ..
make
./rbc ../../examples/function.rbc

And we have AST of our program!

ast_example

You can check details in description file

About

Parser generator for languages with grammar given by arbitrary sequences of tokens

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages