Skip to content

ss16118/wacc-language-support

Repository files navigation

Wacc Language Support

This is a VS Code extension written for the WACC language used in the compiler course of Imperial College London.

WACC is a simple variant on the While family of languages. It features all of the common language constructs such as program variables, simple expressions, conditional branching, looping and no-ops. It also features a rich set of extra constructs, such as simple types, functions, arrays, and basic tuple creation on the heap.

Features

Since this is the very first version of the extension, it only provides basic syntax highlighting for the WACC language. More features, such as auto-complete and a full WACC compiler, are expected to be added in the future. This extension only supports the most basic version of WACC as defined in the specs.

  • Syntax highlighting
  • Autocomplete
  • Code diagnostics
  • WACC compiler

Release Notes

2.2.0 2020/3/5

A full WACC compiler is added to the extension. Now your WACC code can be executed by simply open up the command palette (right-click in the editor), and search for 'Execute WACC'. Note that you will have to type in the input used by the code right after. After a short period of time, the output of the program will be shown in the 'wacc-language-server' output channel. The assembly code is generated by a compiler written by my WACC group, yet to guarantee that the code can be run without installing an ARM emulator, I used the refEmulate ruby script provided by DoC.

2.1.0 2020/3/4 [Major Update]

The extension now catches most of the syntactic and semantic errors while writing a WACC program. It has to be noted that the messages prompted for syntactic errors might not be very informative since they are taken simply from ANTLR.

2.0.0 2020/2/7 [Major Update]

This extension now takes advantage of the WACC compiler to correctly identify scopes. It is now able to recognize unused variables and multiple definitions of the same variable in different scopes.

1.2.0 2020/2/4

Added autocomplete of code and code snippets for generating functions, code blocks, if-statements and while-loops.

1.1.0: 2020/2/1

Added language server and provided code diagnostics and error highlight for identifiers. The language server is based on the example from this repo.

Issue: code diagnostics does not recognize scopes. Auto-complete and other more complicated code diagnostics will be added later.

1.0.0: 2020/1/31

Initial release of WACC language support: provides simple syntax highlighting for the WACC language.

About

VSCode language support for WACC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published