Skip to content

Parser for Protelis, the practical aggregate programming language

License

Notifications You must be signed in to change notification settings

Protelis/Protelis-Parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Protelis-Parser

Parser for Protelis, the practical aggregate programming language

Badges

Info

Travis (.com) CII Best Practices GitHub language count GitHub top language Lines of Code GitHub code size in bytes GitHub repo size Maven Central GitHub contributors

Coverage

Codacy coverage Code Climate coverage Codecov Coverage

Quality

Codacy Badge Code Climate coverage Code Climate maintainability Code Climate maintainability Code Climate maintainability CodeFactor Quality Gate Status Bugs Code Smells Duplicated Lines (%) Maintainability Rating Reliability Rating Security Rating Technical Debt Vulnerabilities

Progress

GitHub issues GitHub closed issues GitHub pull requests GitHub closed pull requests GitHub commit activity GitHub commits since latest release (by date) GitHub last commit

What is it

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.

Contributing

Bug reports

Issues for this project are tracked together with the issues of the Protelis interpreter. Please open bug reports and feature requests there.

Importing the project

Eclipse is probably the best IDE to develop this component, as it relies on the Xtext infrastructure.

  • Install Eclipse
  • Install the Xtext plugin from the Eclipse Marketplace
  • Clone the project
  • Import the project in Eclipse.

Writing tests

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.

Build with Gradle

The project is built with Gradle:

  • On Unix, run ./gradlew build --parallel
  • On Windows, run gradlew.bat build --parallel

Co-develop Protelis DSL and Protelis VM

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:

  1. In the main build.gradle.kts file, enable publishing on the local Maven repository by adding mavenLocal() to the repositories block found inside subprojects;
  2. pull up a terminal and run ./gradlew publishJavaOnMavenLocal;
  3. open the Protelis interpreter project in a separate IDE;
  4. change the 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;
  5. in the gradle/libs.versions.toml file of the interpreter project, change the parser version to the one you picked for your modified parser;
  6. tell your IDE of choice for the interpreter to refresh the Gradle project import;
  7. you should now be working with your custom parser!