01
the problem
Executing RPAL requires transforming source text through lexical, syntactic, structural, and runtime representations.
case study 06 / Programming languages
A Java interpreter that tokenises RPAL, builds and standardises an abstract syntax tree, then evaluates it with a Control-Stack-Environment machine.
01
Executing RPAL requires transforming source text through lexical, syntactic, structural, and runtime representations.
02
Co-developed as a two-person Programming Languages project. The repository and report verify the complete pipeline but do not allocate individual components, so the work is presented as team-owned.
03
Standardise high-level syntax into a smaller set of core tree forms before evaluation, keeping the CSE machine focused on a compact runtime model.
visual evidence pending
No repository screenshot is published for this project. A real application capture should replace this clearly marked placeholder.
stage 01
RPAL source
stage 02
Scanner
stage 03
Recursive-descent parser
stage 04
AST
stage 05
Standardised tree
stage 06
CSE evaluation
Regex-backed lexical scanner for identifiers, integers, strings, operators, punctuation, and comments.
Recursive-descent parser following the RPAL grammar and producing a child-sibling AST.
Tree-standardisation rules for constructs including let, where, within, functions, simultaneous definitions, and recursion.
CSE evaluation with control and value stacks, environments, closures, tuples, conditionals, operators, and built-ins.
A collection of RPAL programs and expected AST or output fixtures for manual verification.
The included report names two group members but does not map implementation areas to either person.
The repository is a single squashed commit, so Git history cannot provide finer attribution.
Test programs are fixtures rather than an automated test harness.
Maintaining correct tree relationships and lexical environments through standardisation, closures, recursion, tuples, and conditional evaluation.
Interpreters become easier to reason about when parsing, representation transformation, and evaluation are separate stages.