Skip to content

A project to write an executable version of a subset of the NESA SDD Pseudocode

Notifications You must be signed in to change notification settings

ProfStick/12SDD_PseudoExe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aurora 12SDD PseudoExe Language Project

A project for Year 12 Software Design and Development which will allow students to explore:

  • Machine code and the CPU
  • Metalanguages
  • Translation, specifically:
    • lexical analysis including token generation
    • syntactical analysis including parsing
    • code generation

Motivation

Theoretical discussion of metalanguages, and lexical and syntactical analysis can be quite dry and often the importance is lost on students who wonder why the hell they are learning this stuff that they will never use. The intent here is to introduce these concepts through the challenge of developing their own executable language. It also addresses the issue that a syntactically rigid pseudocode like that specified in the SDD Course Specifications defeats the whole purpose of pseudocode (don't get me started)

The Task

The initial task is to write an executable version of pseudocode that can print out the fibonacci series. The PseudoExe scripts will have a suffix of *.pse. The script for the ultimate goal is fibonacci.pse is:

BEGIN Fibonacci

LET currentNumber = 0

DISPLAY currentNumber

LET prevNumber = currentNumber
LET currentNumber = prevNumber + 1

DISPLAY currentNumber

FOR LET counter = 0 TO 20 STEP 1
    LET tempNumber = currentNumber
    LET currentNumber = currentNumber + prevNumber
    LET prevNumber = tempNumber
    DISPLAY currentNumber
NEXT counter

END Fibonacci

Resources

This project is very heavily based on Marcelo Andrade's work Writing your own programming language and compiler with Python

You will need to install the following:

  • LLVMLite A lightweight LLVM python binding for writing JIT compilers
pip install llvmlite
  • RPLY A pure Python parser generator
pip install rply
  • LLC An LLVM static compiler
  • GCC or other linking tool

Other useful references

NOTES

ATM this project is compLETely untested - we are on this journey together

TODO

About

A project to write an executable version of a subset of the NESA SDD Pseudocode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages