Parser for Protelis, the practical aggregate programming language
This project hosts the parsing infrastructure of the Protelis programming language, as well as its Eclipse plugin. It is a plain Xtext project. Users interested in using Protelis should most likely refer to the official Protelis website. This project is of use for Protelis developers willing to make changes to the language itself.
Issues for this project are tracked together with the issues of the Protelis interpreter. Please open bug reports and feature requests there.
Create your own fork of this project,
make changes, and open a pull request towards the develop
branch of this project.
To make sure that changes get accepted,
please open a discussion first on the Protelis issue tracker,
where the project maintainer may contribute.
Eclipse is probably the best IDE to develop this component, as it relies on the Xtext infrastructure.
Even though we provide a target definition that you can use You can use your own Eclipse as a target platform for developing the system, the standard target is enforced in continuous integration anyway.
You can pick the target plaform of your like from within the Eclipse preferences:
If you make a change to the Protelis.xtext
file describing the language grammar and crossreferences,
you need to re-generate the parsing and linking infrastructure.
To do so, right click on the GenerateProtelis.mw2 file and run as MWE2 Workflow:
If you want to quickly test your changes within an Eclipse environment,
you can do so by launching the .ui
project as Eclipse Application:
A new Eclipse IDE will pop up with your changes installed. Now:
All new features or bug fixes should get appropriately tested.
To do so, there is a testing infrastructure in place.
New tests can be defined in the protelis.parser.test
project,
inside the ProtelisParsingTest.xtend
file.
The structure should be clear, and support is provided to verify that pieces of code emit warnings, throw errors, or parse correctly.
In order to co-develop on the Protelis DSL and VM simultaneously, you will need to leverage the local Maven repository. Once the changes in the parser are satisfactory, proceed as follows:
pom.xml
and MANIFEST.MF
files with one of your like;mvn clean install
(you must have Apache Maven installed)build.gradle.kts
file of the interpreter project by adding, inside the repositories
block, a call to the mavenLocal()
method as the first entry of the block;versions.properties
file of the interpreter project, change the parser version to the one you picked for your modified parser;