SystemJ for VS Code
Basic language support for .sysj files (the SystemJ GALS reactive/synchronous language): syntax highlighting and snippets. This is a "Tier 1" extension — a TextMate grammar plus snippets, no language server, no semantic analysis. It doesn't understand your code; it just makes it easier to read than plain text.
What it does
- Highlights SystemJ control constructs:
input/output signal, emit, await, abort, present, sustain, pause, loop, and the || parallel-block operator.
- Highlights the embedded Java (keywords, types, strings, numbers, comments, method calls) since a
.sysj reaction body is Java with SystemJ constructs woven in.
- Highlights
#signalName value reads and the ModuleName( ports ) -> { ... } module header.
- Comment toggling (
//, /* */), bracket matching/auto-closing, and basic brace-based indentation.
- Snippets for the common constructs (
module, abort, await, present, sustain, loop, par, plus an emithold snippet for the time-bounded "hold a signal instead of a single racy tick" pattern used for cross-clock-domain signals).
What it does not do
No parsing, no completion beyond static snippets, no diagnostics, no go-to-definition. That would require a real language server built on the SystemJ grammar (sjc) — a much bigger project than this one.
Try it locally
- Open this folder in VS Code.
- Press
F5 (or Run > Start Debugging) to launch an Extension Development Host.
- Open any
.sysj file in that host window — highlighting and snippets are active immediately.
Install without publishing
npm install -g @vscode/vsce
vsce package
This produces a .vsix file. Install it with:
code --install-extension systemj-language-0.1.0.vsix
Notes on the grammar
There's no separate SystemJ tokenizer here — the grammar rules were derived by reading the .sysj sources and the SystemJ language reference directly (module header syntax, input/output [Type] signal declarations, abort/await/present/sustain/pause/loop, and the || parallel-thread operator), then falling back to generic Java-style rules (keywords, types, strings, numbers, comments) for the embedded reaction code. Extend syntaxes/systemj.tmLanguage.json if you add constructs (e.g. trap/exit/select) that aren't used yet in this project's .sysj files.
| |