Implementation of the pol language, a language of security and privacy policies
- - Download and install the eclipse IDE
- - Setup your workspace where you cloned the pol repository
- Install XText 2.7.3
- Go to
Help > Install New Software...
- Enter
http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/
in theWork With
textbox - Hit Enter and wait for the list to load (this will take a few moments)
- Expand the
Xtext
node and checkXtext Complete SDK
(ensure the version is 2.7.3x) - Click
Next
, agree to the EULA, and click finish - Let the installer finish and restart Eclipse
- Go to
- Install ANTLR 4 IDE
- Go to
Help > Eclipse Marketplace...
- Search for
antlr
- Choose
ANTLR 4 IDE
(make sure it's ANTLR 4 IDE not ANTLR IDE) - Click Install
- Let the installer finish clicking ok if it prompts and restart Eclipse
- Go to
- Go to
File > New Project > Project
- Select folder General > Select ANTLR 4 Project
- Next > Put the project name "PolicyLanguage" > Finish
- Right click on
Pol.g4
>Run as...
>External tools configuration
- Paste this on the arguments
-no-listener -visitor -encoding UTF-8
- Run the PoL.g4
-
Go to File > New Project > Java Project
-
Next > Put the project name "PolicyLanguageCore" > Finish
- Right Click on Project > Configure > Convert to Maven Project
- Copy all the files of
PolicyLanguage > target > generated-resources > antlr
exceptPoLBaseVisitor.java
toPolicyLanguageCore > src > structure
- Put your file path as argument when running the
PolicyBuilder.java
inRun Configurations
- Run the project