Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.
/ supercoolQL Public archive

Implementation of the Language Workbench Challenge 2013 Assignment

License

Notifications You must be signed in to change notification settings

matt-chapman/supercoolQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QL Implementation

Author: Matt Chapman

Example QL File

form exampleForm {
  "Test question 1"
    testQuestion1: boolean;
  "Test question 2"
    testQuestion2: boolean;
  "Test question 3"
    testQuestion3: boolean;

  if (testQuestion1 && testQuestion2 || testQuestion3) {
    "Conditional question 1"
      conditionalQuestion1: integer;
    "Conditional question 2"
      conditionalQuestion2: integer;
    "Math question 1:"
      mathQuestion1:integer =
        (conditionalQuestion1 - conditionalQuestion2);
  }

   if (complexConditional) {
     "if Question"
         complexConditionalQuestion1: boolean;
   } else {
     "else Question"
        complexConditionalQuestion2: boolean;
   }
}

Prerequisites

  • Antlr4
  • JUnit 4

Usage

java Launcher to run. The application will provide a filepicker for input. Append the argument -debug to bypass the filepicker and run using res/test.txt.

Implementation Progress

  • QL Grammar
  • QLVisitor implementation
  • Replacement error listener for parser
  • Application launcher
  • AST
    • Form, Statement, Question classes
    • IfStatement, IfElseStatement classes
    • Classes for Operations
    • Basic types
      • Strings
      • Booleans
      • Integers
  • AST Processing
    • Type checking
      • reference to undefined questions
      • duplicate question declarations with different types
      • conditions that are not of the type boolean
      • operands of invalid type to operators
      • cyclic dependencies between questions
      • duplicate labels
    • Error handling
      • Error class
      • Error collection class
      • Make all tests return Error objects
      • Halt on bad error - don't throw exception!
      • Output in GUI
  • GUI generation
  • Unit tests

About

Implementation of the Language Workbench Challenge 2013 Assignment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published