Skip to content

Pivot is a small language for home automation. Includes both a compiler and a paper with the documentation.

Notifications You must be signed in to change notification settings

philipholler/Pivot-Language-for-Home-Automation-P4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

P4Grammar

CREATORS:

Philip Holler

Magnus Kirkegaard

Mads Faber

Mads Bau

Asger Bertel

Hannah Lockey


BEFORE GETTING STARTED

  1. Install the IntelliJ ANTLR plugin called 'ANTLR v4 Grammar Plugin, v1.9'

  2. Have Java 11 installed


BUILD AND RUN THE COMPILER

  1. Set the file to be compiled in the Compiler class.
  2. Use the Maven build 'Build and run compiler'

BUILD AND RUN GENERATED MODULE

  1. Use the Maven build 'Build and run Generated Module'

BUILD AND RUN TESTS

  1. Use the Maven build "Build and run tests" (this also builds the compiler)

TEST COVERAGE

  1. Use the Maven build "Build and run tests"
  2. Go to analyze -> Show Code Coverage Data -> + -> Select the /target/coverage-reports/jacoco-unit.exec

RUN JASMIN CODE / JAVA BYTE CODE VERSION

  1. Set the source fil in the compiler to ByteCodeTestProgram.pvt
  2. Compile using maven build 'Build and run compiler'. This gives the file PivotClass.J in the project root dir
  3. Download jasmin .Jar file with this link (https://sourceforge.net/projects/jasmin/)
  4. Use the Jasmin.jar file to translate from jasmin to ByteCode using the terminal and the following command ' java -jar jasmin.jar PivotClass.j'
  5. Run the ByteCode in the terminal with the following command 'java PivotClass'

HAVE FUN!

About

Pivot is a small language for home automation. Includes both a compiler and a paper with the documentation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published